-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Add jfs support doc for hudi #3736
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,91 @@ | ||
| --- | ||
| title: JuiceFS | ||
| keywords: [ hudi, hive, jfs, spark, flink] | ||
| summary: On this page, we go over how to configure Hudi with JuiceFS. | ||
| last_modified_at: 2021-09-30T17:24:24-10:00 | ||
| --- | ||
| On this page, we explain how to use Hudi with JuiceFS. | ||
|
|
||
| ## JuiceFS Preparing | ||
|
|
||
| JuiceFS is a high-performance distributed file system. Any data stored into JuiceFS, the data itself will be persisted in object storage (e.g. Amazon S3), and the metadata corresponding to the data can be persisted in various database engines such as Redis, MySQL, and TiKV according to the needs of the scene. | ||
|
|
||
| There are three configurations required for Hudi-JuiceFS compatibility: | ||
|
|
||
| - Creating JuiceFS | ||
| - Adding JuiceFS configuration for Hudi | ||
| - Adding required jar to `classpath` | ||
|
|
||
| ### Creating JuiceFS | ||
|
|
||
| JuiceFS supports multiple engines such as Redis, MySQL, SQLite, and TiKV. | ||
|
|
||
| This example uses Redis as Meta Engine and AWS S3 as Data Storage in Linux env. | ||
|
|
||
| - Download | ||
| ```shell | ||
| JFS_LATEST_TAG=$(curl -s https://api.github.com/repos/juicedata/juicefs/releases/latest | grep 'tag_name' | cut -d '"' -f 4 | tr -d 'v') | ||
| wget "https://github.com/juicedata/juicefs/releases/download/v${JFS_LATEST_TAG}/juicefs-${JFS_LATEST_TAG}-linux-amd64.tar.gz" | ||
| ``` | ||
|
|
||
| - Install | ||
| ```shell | ||
| mkdir juice && tar -zxvf "juicefs-${JFS_LATEST_TAG}-linux-amd64.tar.gz" -C juice | ||
| sudo install juice/juicefs /usr/local/bin | ||
| ``` | ||
|
|
||
| - Format a filesystem | ||
| ```shell | ||
| juicefs format \ | ||
| --storage s3 \ | ||
| --bucket https://<your-bucket-name> \ | ||
| --access-key <your-access-key-id> \ | ||
| --secret-key <your-access-key-secret> \ | ||
| redis://:<password>@<redis-host>:6379/1 \ | ||
| myjfs | ||
| ``` | ||
|
|
||
| ### JuiceFS configuration | ||
|
|
||
| Add the required configurations in your core-site.xml from where Hudi can fetch them. | ||
|
|
||
| ```xml | ||
| <property> | ||
| <name>fs.defaultFS</name> | ||
| <value>jfs://myfs</value> | ||
| <description>Optional, you can also specify full path "jfs://myfs/path-to-dir" with location to use JuiceFS</description> | ||
| </property> | ||
| <property> | ||
| <name>fs.jfs.impl</name> | ||
| <value>io.juicefs.JuiceFileSystem</value> | ||
| </property> | ||
| <property> | ||
| <name>fs.AbstractFileSystem.jfs.impl</name> | ||
| <value>io.juicefs.JuiceFS</value> | ||
| </property> | ||
| <property> | ||
| <name>juicefs.meta</name> | ||
| <value>redis://:<password>@<redis-host>:6379/1</value> | ||
| </property> | ||
| <property> | ||
| <name>juicefs.cache-dir</name> | ||
| <value>/path-to-your-disk</value> | ||
| </property> | ||
| <property> | ||
| <name>juicefs.cache-size</name> | ||
| <value>1024</value> | ||
| </property> | ||
| <property> | ||
| <name>juicefs.access-log</name> | ||
| <value>/tmp/juicefs.access.log</value> | ||
| </property> | ||
| ``` | ||
|
|
||
| ### JuiceFS Hadoop SDK | ||
| You can download the JuiceFS java Hadoop SDK jar from [here](https://github.com/juicedata/juicefs/releases/download/v0.17.0/juicefs-hadoop-0.17.0-linux-amd64.jar), and place it to the `classpath`. | ||
| You can also visit [JuiceFS Releases](https://github.com/juicedata/juicefs/releases)) to get the latest version or compile by your self. | ||
|
|
||
| For example: | ||
| - $SPARK_HOME/jars | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.