Skip to content

[filesystem] Add JuiceFS filesystem support - #3870

Open
weizuo93 wants to merge 1 commit into
apache:mainfrom
weizuo93:support-juicefs-filesystem
Open

[filesystem] Add JuiceFS filesystem support#3870
weizuo93 wants to merge 1 commit into
apache:mainfrom
weizuo93:support-juicefs-filesystem

Conversation

@weizuo93

@weizuo93 weizuo93 commented Aug 5, 2026

Copy link
Copy Markdown

Purpose

Linked issue: close #3866

This PR adds support for JuiceFS — a widely-adopted open-source distributed file system that is built on top of object storage and exposes a Hadoop-compatible Java SDK. With this change, users can point remote.data.dir at a jfs:// volume and store Fluss snapshots (Primary-Key Tables) and tiered log segments (Log Tables) on their existing JuiceFS deployments

Brief change log

  • Add a new Maven module fluss-filesystems/fluss-fs-juicefs, registered as a child of fluss-filesystems.
  • Implement JuiceFsPlugin implements FileSystemPlugin:
    • Registers the jfs:// URI scheme.
    • Loads io.juicefs.JuiceFileSystem reflectively via org.apache.hadoop.fs.FileSystem.newInstance, so Fluss has no hard compile-time dependency on io.juicefs.* classes.
    • Forwards any Fluss configuration entry whose key starts with fs.jfs. or juicefs. to the underlying Hadoop Configuration.
    • Injects sensible defaults when not set by the user:
      • fs.jfs.impl = io.juicefs.JuiceFileSystem
      • fs.jfs.impl.disable.cache = false
  • Implement JuiceFsFileSystem extends HadoopFileSystem:
    • Wraps the JuiceFS Hadoop FileSystem.
    • Returns an empty placeholder security token from obtainSecurityToken(), because JuiceFS handles authentication locally on each node against its metadata engine and backing object storage — no STS / delegation-token exchange is required.
  • SPI registration via META-INF/services/org.apache.fluss.fs.FileSystemPlugin.
  • Shading / packaging consistent with sibling filesystem plugins; depends on fluss-fs-hadoop-shaded, fluss-fs-hadoop, and io.juicefs:juicefs-hadoop:1.4.0.
  • Documentation:
    • New page website/docs/maintenance/tiered-storage/filesystems/juicefs.md.
    • Add JuiceFS to the overview.md list of pluggable filesystems.

Tests

Unit tests added in JuiceFsPluginTest:

  • testScheme — verifies the plugin registers the jfs scheme.
  • testHadoopConfigPropagation — verifies fs.jfs.* and juicefs.* entries are forwarded to the Hadoop Configuration, and that unrelated keys are not forwarded.
  • testApplyJuiceFsDefaultsInjectsImpl — verifies default injection of fs.jfs.impl and fs.jfs.impl.disable.cache.
  • testApplyJuiceFsDefaultsDoesNotOverrideUserValues — verifies user-supplied values take precedence over the injected defaults.
  • testGetHadoopConfigurationWithNullFlussConfig — null-safety.

Run locally with:

mvn test -Dtest=JuiceFsPluginTest -DfailIfNoTests=false -pl fluss-filesystems/fluss-fs-juicefs -am

API and Format

No changes to public APIs, wire format, or on-disk / storage format. The change is purely additive — a new implementation of the existing FileSystemPlugin SPI.

Documentation

@weizuo93
weizuo93 force-pushed the support-juicefs-filesystem branch from 9c4d2e9 to 6a7557f Compare August 6, 2026 04:59
@weizuo93
weizuo93 force-pushed the support-juicefs-filesystem branch from 6a7557f to e0ed750 Compare August 6, 2026 06:10
@luoyuxia
luoyuxia requested a lite review from Copilot August 6, 2026 12:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new pluggable filesystem module under fluss-filesystems/ to support using JuiceFS (jfs://) as Fluss remote storage (snapshots and tiered logs) via the existing FileSystemPlugin SPI, plus accompanying documentation and tests.

Changes:

  • Introduces new fluss-fs-juicefs plugin module that wires the jfs:// scheme to JuiceFS’s Hadoop FileSystem and forwards fs.jfs.* / juicefs.* configuration.
  • Adds unit tests for scheme registration, config propagation, and default injection.
  • Documents JuiceFS installation/configuration and updates filesystem overview; updates test-coverage exclusions.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
website/docs/maintenance/tiered-storage/filesystems/overview.md Adds JuiceFS to the supported filesystems list and links to the new docs page.
website/docs/maintenance/tiered-storage/filesystems/juicefs.md New documentation page describing manual plugin installation and configuration for JuiceFS.
fluss-test-coverage/pom.xml Excludes the new JuiceFS filesystem package from aggregated coverage instrumentation.
fluss-filesystems/pom.xml Registers the new fluss-fs-juicefs module under the filesystems aggregator.
fluss-filesystems/fluss-fs-juicefs/src/test/java/org/apache/fluss/fs/juicefs/JuiceFsPluginTest.java Adds unit tests for the new plugin’s scheme/config propagation/defaults.
fluss-filesystems/fluss-fs-juicefs/src/main/resources/META-INF/services/org.apache.fluss.fs.FileSystemPlugin Registers JuiceFsPlugin with Java SPI for plugin discovery.
fluss-filesystems/fluss-fs-juicefs/src/main/resources/META-INF/NOTICE Adds NOTICE content for the new module and bundled dependencies.
fluss-filesystems/fluss-fs-juicefs/src/main/java/org/apache/fluss/fs/juicefs/JuiceFsPlugin.java Implements the JuiceFS FileSystemPlugin and Hadoop Configuration propagation/defaulting.
fluss-filesystems/fluss-fs-juicefs/src/main/java/org/apache/fluss/fs/juicefs/JuiceFsFileSystem.java Provides a HadoopFileSystem wrapper with a placeholder token implementation.
fluss-filesystems/fluss-fs-juicefs/pom.xml New module build, dependencies, and shading configuration for JuiceFS support.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +141 to +144
LOG.debug(
"Adding Fluss config entry for {} as {} to Hadoop config",
key,
conf.get(key));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[filesystem] Add JuiceFS filesystem support

2 participants