### JindoSDK Go quickstart execution output Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/zh/jindosdk/golang/jindosdk_golang_quickstart.md Output of the JindoSDK Go quickstart example. It shows successful mkdir, write, getInfo, listResult, getContentSummary, read, and remove operations on OSS paths, including file sizes, timestamps, and operation durations. ```text success to mkdir success to write 0: 41943040, takes: 1 sec success to write 1: 41943040, takes: 2 sec success to write 2: 41943040, takes: 2 sec success to write 3: 41943040, takes: 1 sec success to write 4: 41943040, takes: 2 sec success to write 5: 41943040, takes: 2 sec success to write 6: 41943040, takes: 1 sec success to write 7: 41943040, takes: 2 sec success to write 8: 41943040, takes: 2 sec success to write 9: 41943040, takes: 1 sec success to getInfo oss://jindosdk-gosdk-demo-bucket/test-go-example, user testuser, group testuser, Length 0, Mtime 1744686630369, Atime 0 success to getInfo oss://jindosdk-gosdk-demo-bucket/test-go-example/test_1744686615_0, user warlock, group warlock, Length 41943040, Mtime 1744686616545, Atime 1744686615728 success to getInfo oss://jindosdk-gosdk-demo-bucket/test-go-example/test_1744686615_1, user warlock, group warlock, Length 41943040, Mtime 1744686618285, Atime 1744686616580 success to getInfo oss://jindosdk-gosdk-demo-bucket/test-go-example/test_1744686615_2, user warlock, group warlock, Length 41943040, Mtime 1744686620061, Atime 1744686618288 success to getInfo oss://jindosdk-gosdk-demo-bucket/test-go-example/test_1744686615_3, user warlock, group warlock, Length 41943040, Mtime 1744686621733, Atime 1744686620064 success to getInfo oss://jindosdk-gosdk-demo-bucket/test-go-example/test_1744686615_4, user warlock, group warlock, Length 41943040, Mtime 1744686623446, Atime 1744686621737 success to getInfo oss://jindosdk-gosdk-demo-bucket/test-go-example/test_1744686615_5, user warlock, group warlock, Length 41943040, Mtime 1744686625144, Atime 1744686623450 success to getInfo oss://jindosdk-gosdk-demo-bucket/test-go-example/test_1744686615_6, user warlock, group warlock, Length 41943040, Mtime 1744686626853, Atime 1744686625148 success to getInfo oss://jindosdk-gosdk-demo-bucket/test-go-example/test_1744686615_7, user warlock, group warlock, Length 41943040, Mtime 1744686628758, Atime 1744686626857 success to getInfo oss://jindosdk-gosdk-demo-bucket/test-go-example/test_1744686615_8, user warlock, group warlock, Length 41943040, Mtime 1744686630366, Atime 1744686628761 success to getInfo oss://jindosdk-gosdk-demo-bucket/test-go-example/test_1744686615_9, user warlock, group warlock, Length 41943040, Mtime 1744686631976, Atime 1744686630369 success to listResult of 0, name oss://jindosdk-gosdk-demo-bucket/test-go-example/test_1744686615_0, user warlock, group warlock, Length 41943040, Mtime 1744686616545, Atime 1744686615728 success to listResult of 1, name oss://jindosdk-gosdk-demo-bucket/test-go-example/test_1744686615_1, user warlock, group warlock, Length 41943040, Mtime 1744686618285, Atime 1744686616580 success to listResult of 2, name oss://jindosdk-gosdk-demo-bucket/test-go-example/test_1744686615_2, user warlock, group warlock, Length 41943040, Mtime 1744686620061, Atime 1744686618288 success to listResult of 3, name oss://jindosdk-gosdk-demo-bucket/test-go-example/test_1744686615_3, user warlock, group warlock, Length 41943040, Mtime 1744686621733, Atime 1744686620064 success to listResult of 4, name oss://jindosdk-gosdk-demo-bucket/test-go-example/test_1744686615_4, user warlock, group warlock, Length 41943040, Mtime 1744686623446, Atime 1744686621737 success to listResult of 5, name oss://jindosdk-gosdk-demo-bucket/test-go-example/test_1744686615_5, user warlock, group warlock, Length 41943040, Mtime 1744686625144, Atime 1744686623450 success to listResult of 6, name oss://jindosdk-gosdk-demo-bucket/test-go-example/test_1744686615_6, user warlock, group warlock, Length 41943040, Mtime 1744686626853, Atime 1744686625148 success to listResult of 7, name oss://jindosdk-gosdk-demo-bucket/test-go-example/test_1744686615_7, user warlock, group warlock, Length 41943040, Mtime 1744686628758, Atime 1744686626857 success to listResult of 8, name oss://jindosdk-gosdk-demo-bucket/test-go-example/test_1744686615_8, user warlock, group warlock, Length 41943040, Mtime 1744686630366, Atime 1744686628761 success to listResult of 9, name oss://jindosdk-gosdk-demo-bucket/test-go-example/test_1744686615_9, user warlock, group warlock, Length 41943040, Mtime 1744686631976, Atime 1744686630369 success to getContentSummary oss://jindosdk-gosdk-demo-bucket/test-gosdk-nextarch/, FileSize 419430400, FileCount 10, DirCount 1 success to read 0: 41943040, takes: 0 sec success to read 1: 41943040, takes: 2 sec success to read 2: 41943040, takes: 2 sec success to read 3: 41943040, takes: 2 sec success to read 4: 41943040, takes: 1 sec success to read 5: 41943040, takes: 2 sec success to read 6: 41943040, takes: 2 sec success to read 7: 41943040, takes: 1 sec success to read 8: 41943040, takes: 2 sec success to read 9: 41943040, takes: 2 sec success to remove ``` -------------------------------- ### Example output of JindoSDK lib listing Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/zh/upgrade/emr2_upgrade_jindosdk.md Example output showing the JindoSDK 6.2.0 library files after a successful rollback. ```bash -rw-r--r-- 1 root root 1253740 Apr 24 17:40 jindo-core-6.2.0.jar -rw-r--r-- 1 root root 13110547 Apr 24 17:40 jindo-core-linux-el7-aarch64-6.2.0.jar -rw-r--r-- 1 root root 4432227 Apr 24 17:40 jindo-sdk-6.2.0.jar drwxr-xr-x 2 root root 4096 Apr 24 17:40 native ``` -------------------------------- ### Example output with -path option Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/zh/oss/dls_dump_inventory_howto.md Example output when using the -path option to analyze a specific directory, showing only entries under that path. ```json {"id":6246684106789500069,"path":"/dls-1000326249/benchmark","type":"directory","size":0,"user":"hadoop","group":"supergroup","atime":0,"mtime":1660889124590,"permission":511,"state":0} {"id":6246684106789500070,"path":"/dls-1000326249/benchmark/n1","type":"directory","size":0,"user":"hadoop","group":"supergroup","atime":0,"mtime":1660889124590,"permission":511,"state":0} {"id":6246684106789500071,"path":"/dls-1000326249/benchmark/n1/490747449","type":"directory","size":0,"user":"hadoop","group":"supergroup","atime":0,"mtime":1660895613953,"permission":511,"state":0} ``` -------------------------------- ### Example output of DataLoad status (Loading) Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/zh/fluid-jindoruntime/jindo_fluid_dataload.md Example output from 'kubectl get dataload spark-dataload' showing the DataLoad in the 'Loading' phase. ```bash NAME DATASET PHASE AGE spark-dataload spark Loading 2m13s ``` -------------------------------- ### Example output of downloaded files Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/en/upgrade/emr2_upgrade_jindosdk_arm.md Example output of the ls -l command showing the downloaded files with their permissions and sizes. ```bash -rw-r----- 1 hadoop hadoop xxxx May 01 00:00 bootstrap_jindosdk.sh -rw-r----- 1 hadoop hadoop xxxxxxxxx May 01 00:00 jindosdk-6.10.8-linux-el7-aarch64.tar.gz -rw-r----- 1 hadoop hadoop xxxx May 01 00:00 jindosdk-patches.tar.gz ``` -------------------------------- ### Example hosts file content Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/en/upgrade/emr2_upgrade_jindosdk.md Example content of the hosts file, listing node hostnames such as master-1-1 and core-1-1. ```bash master-1-1 core-1-1 core-1-2 ``` -------------------------------- ### Example jindosdk.cfg configuration Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/en/jindosdk/jindosdk_deployment_ai.md Example INI-style configuration for jindosdk.cfg with common and jindosdk sections. Replace placeholders with actual endpoint and credentials. ```ini [common] logger.dir = /tmp/jindosdk-log [jindosdk] # Replace with the actual endpoint for your created OSS Bucket. For example, for East China 1 (Hangzhou), use oss-cn-hangzhou.aliyuncs.com. # Replace with the actual endpoint for your created OSS-HDFS Bucket. For example, for East China 1 (Hangzhou), use cn-hangzhou.oss-dls.aliyuncs.com. fs.oss.endpoint = # Replace with your AccessKey ID and AccessKey Secret for accessing OSS. AccessKey has full API access rights and is highly risky. Strongly recommended to create and use a RAM user for API access or daily operations. Log in to the RAM Console to create a RAM user. fs.oss.accessKeyId = fs.oss.accessKeySecret = ``` -------------------------------- ### jindofs.cfg configuration example Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/en/jindofs/jindofs_client_tools.md Example configuration file for the JindoFS command-line tool. Set the JINDOSDK_CONF_DIR environment variable to a directory containing this file. The commented lines show how to enable EMR Credential provider for password-free access. ```text [client] fs.oss.accessKeyId = fs.oss.accessKeySecret = fs.oss.endpoint = fs.oss.data.lake.storage.enable = true # fs.oss.provider.endpoint = ECS_ROLE # EMR Credential provider for password-free access # fs.oss.provider.format = JSON ``` -------------------------------- ### Example apply_all.sh command Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/en/upgrade/emr_upgrade_jindosdk.md Runs the upgrade script with a specific version, e.g., 6.10.8. ```bash ./apply_all.sh 6.10.8 ``` -------------------------------- ### Example output of DataLoad describe Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/zh/fluid-jindoruntime/jindo_fluid_dataload.md Example output from 'kubectl describe dataload spark-dataload' showing the DataLoad in the 'Loading' phase with the event 'DataLoadJobStarted'. ```bash Name: spark-dataload Namespace: default Labels: Annotations: API Version: data.fluid.io/v1alpha1 Kind: DataLoad ... Spec: Dataset: Name: spark Namespace: default Status: Conditions: Phase: Loading Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal DataLoadJobStarted 80s DataLoad The DataLoad job spark-dataload-loader-job started ``` -------------------------------- ### Example hosts file content Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/en/upgrade/emr_upgrade_jindosdk.md Shows an example of the hosts file content with node hostnames such as emr-header-1 and emr-worker-1. ```bash emr-header-1 emr-worker-1 emr-worker-2 ``` -------------------------------- ### Install libfuse 3.11 for JindoSDK 4.5.1+ Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/en/oss/usages/oss_posix.md Install libfuse 3.7+ for JindoSDK 4.5.1 and later. This example installs fuse-3.11.0 and requires meson, ninja, and a newer g++ on CentOS. ```bash # Build fuse requires meson & ninja, for Debian: apt install -y pkg-config meson ninja-build sudo yum install -y meson ninja-build # Compile fuse requires a newer g++ (only for CentOS) sudo yum install -y scl-utils sudo yum install -y alinux-release-experimentals sudo yum install -y devtoolset-8-gcc devtoolset-8-gdb devtoolset-8-binutils devtoolset-8-make devtoolset-8-gcc-c++ sudo su -c "echo 'source /opt/rh/devtoolset-8/enable' > /etc/profile.d/g++.sh" source /opt/rh/devtoolset-8/enable sudo ln -s /opt/rh/devtoolset-8/root/bin/gcc /usr/local/bin/gcc sudo ln -s /opt/rh/devtoolset-8/root/bin/g++ /usr/local/bin/g++ # Compile & install libfuse wget https://github.com/libfuse/libfuse/releases/download/fuse-3.11.0/fuse-3.11.0.tar.xz xz -d fuse-3.11.0.tar.xz tar xf fuse-3.11.0.tar cd fuse-3.11.0/ mkdir build; cd build meson .. sudo ninja install ``` -------------------------------- ### Example jindofsx-patches directory listing Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/zh/upgrade/emr2_upgrade_jindofsx.md Example output of the jindofsx-patches directory contents, showing the hosts file, the extracted JindoFSX directory, the tarball, and the upgrade scripts. ```bash -rw-r--r-- 1 emr-user emr-user 29 Sep 13 17:24 hosts drwxr-xr-x 8 emr-user emr-user 4096 Sep 27 2023 jindofsx-4.6.12-linux -rw-rw-r-- 1 emr-user emr-user 331179396 Nov 8 11:11 jindofsx-4.6.12-linux.tar.gz -rwxr-xr-x 1 emr-user emr-user 774 Nov 8 11:09 upgrade_one.sh -rwxr-xr-x 1 emr-user emr-user 1010 Nov 8 11:06 upgrade.sh ``` -------------------------------- ### Example output of JindoSDK library symlinks Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/en/upgrade/emr2_upgrade_jindosdk.md Example output from the ls command showing symlinks to the JindoSDK 6.10.8 libraries, confirming the latest fixes are loaded. ```bash lrwxrwxrwx 1 root root 64 Apr 12 11:08 jindo-core-6.2.0.jar -> /opt/apps/JINDOSDK/jindosdk-6.10.8-linux/lib/jindo-core-6.10.8.jar lrwxrwxrwx 1 root root 82 Apr 12 11:08 jindo-core-linux-el7-aarch64-6.2.0.jar -> /opt/apps/JINDOSDK/jindosdk-6.10.8-linux/lib/jindo-core-linux-el7-aarch64-6.10.8.jar lrwxrwxrwx 1 root root 63 Apr 12 11:08 jindo-sdk-6.2.0.jar -> /opt/apps/JINDOSDK/jindosdk-6.10.8-linux/lib/jindo-sdk-6.10.8.jar lrwxrwxrwx 1 root root 50 Apr 12 11:08 native -> /opt/apps/JINDOSDK/jindosdk-6.10.8-linux/lib/native lrwxrwxrwx 1 root root 57 Apr 12 11:08 site-packages -> /opt/apps/JINDOSDK/jindosdk-6.10.8-linux/lib/site-packages ``` -------------------------------- ### Example output of DataLoad status (Complete) Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/zh/fluid-jindoruntime/jindo_fluid_dataload.md Example output showing the DataLoad phase as 'Complete', indicating the data loading process has finished. ```bash NAME DATASET PHASE AGE spark-dataload spark Complete 5m17s ``` -------------------------------- ### Run apply_all.sh with JINDOSDK_VERSION Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/en/upgrade/emr_upgrade_jindosdk.md Execute the apply_all.sh script to start the upgrade process, passing the JINDOSDK_VERSION as an argument. ```bash ./apply_all.sh $JINDOSDK_VERSION ``` -------------------------------- ### Example output of ls -l after rollback Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/zh/upgrade/emr_upgrade_jindosdk.md Example output after rollback to version 4.3.0, showing jindo-core-4.3.0.jar and jindo-sdk-4.3.0.jar present in the extra-jars directory. ```bash drwxr-xr-x 2 root root 4096 Apr 24 17:37 flink -rw-r--r-- 1 hadoop hadoop 189081 Apr 24 17:21 hadoop-lzo-0.4.21-SNAPSHOT.jar drwxr-xr-x 2 root root 4096 Apr 24 17:37 hive -rw-r--r-- 1 root root 85025668 Apr 24 17:36 jindo-core-4.3.0.jar -rw-r--r-- 1 root root 3165000 Apr 24 17:36 jindo-sdk-4.3.0.jar drwxr-xr-x 2 root root 4096 Apr 24 17:37 native drwxr-xr-x 2 root root 4096 Apr 24 17:37 spark drwxr-xr-x 2 root root 4096 Apr 24 17:37 spark3 ``` -------------------------------- ### Example output of jindosdk-patches folder Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/en/upgrade/emr_upgrade_jindosdk.md Shows the expected file listing in the jindosdk-patches folder after downloading the package, including apply_all.sh, apply.sh, hosts, and the JindoSDK tarball. ```bash -rwxrwxr-x 1 hadoop hadoop 1263 May 01 00:00 apply_all.sh -rwxrwxr-x 1 hadoop hadoop 6840 May 01 00:00 apply.sh -rw-rw-r-- 1 hadoop hadoop 40 May 01 00:00 hosts -rw-r----- 1 hadoop hadoop xxxxxxxxx May 01 00:00 jindosdk-6.10.8-linux.tar.gz ``` -------------------------------- ### Install Fluid with JindoRuntime via Helm Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/zh/fluid-jindoruntime/case/jindo_fluid_oss_append_fuseonly.md Installs Fluid with JindoRuntime enabled using Helm. Replace with the actual version. ```shell helm install --set runtime.jindo.enabled=true fluid fluid-.tgz ``` -------------------------------- ### Get moveTo help Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/en/jindotools/jindotable_moveto.md Displays help information for the moveTo command. ```shell jindotable -help moveTo ``` -------------------------------- ### List downloaded JindoCache files Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/zh/upgrade/emr2_upgrade_jindocache.md Example output of the `ls -l` command showing the downloaded files with placeholder sizes and dates. ```bash -rw-r----- 1 hadoop hadoop xxxx May 01 00:00 bootstrap_jindocache.sh -rw-r----- 1 hadoop hadoop xxxxxxxxx May 01 00:00 jindocache-6.10.8-linux.tar.gz -rw-r----- 1 hadoop hadoop xxxx May 01 00:00 jindocache-patches.tar.gz ``` -------------------------------- ### Upgrade script output Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/zh/upgrade/emr2_upgrade_jindofsx.md Example output after running the upgrade script, showing success messages for each node and a final message to restart the JindoFSX service. ```text Start upgrade JindoFSX Service to 4.6.12 with platform linux [1] 11:14:46 [SUCCESS] core-1-2 [2] 11:14:47 [SUCCESS] core-1-1 [3] 11:14:47 [SUCCESS] master-1-1 [1] 11:15:23 [SUCCESS] core-1-1 [2] 11:15:23 [SUCCESS] core-1-2 [3] 11:15:24 [SUCCESS] master-1-1 [1] 11:15:26 [SUCCESS] core-1-1 [2] 11:15:26 [SUCCESS] core-1-2 [3] 11:15:27 [SUCCESS] master-1-1 [1] 11:15:29 [SUCCESS] core-1-2 [2] 11:15:30 [SUCCESS] core-1-1 [3] 11:15:30 [SUCCESS] master-1-1 [1] 11:15:31 [SUCCESS] master-1-1 [2] 11:15:31 [SUCCESS] core-1-1 [3] 11:15:31 [SUCCESS] core-1-2 Successfully upgrade JindoFSX Service to 4.6.12 with platform linux, Please restart JindoFSX Service ``` -------------------------------- ### Get Help for -setStorageClass Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/en/jindotools/jindotable_set_storage_class.md Displays help information for the -setStorageClass command, including usage and parameters. ```bash jindotable help -setStorageClass ``` -------------------------------- ### Lite Installation on Linux x86 with JAR Files Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/en/jindosdk/jindosdk_deployment_multi_platform.md Downloads the jindo-sdk and jindo-core JARs for version 6.10.8 and copies them into /share/hadoop/hdfs/lib/. Assumes the downloaded JAR files are placed in that directory. ```bash wget https://jindodata-binary.oss-cn-shanghai.aliyuncs.com/mvn-repo/com/aliyun/jindodata/jindo-sdk/6.10.8/jindo-sdk-6.10.8.jar wget https://jindodata-binary.oss-cn-shanghai.aliyuncs.com/mvn-repo/com/aliyun/jindodata/jindo-core/6.10.8/jindo-core-6.10.8.jar cp jindo-core-6.10.8.jar /share/hadoop/hdfs/lib/ cp jindosdk-6.10.8.jar /share/hadoop/hdfs/lib/ ``` -------------------------------- ### Build and run JindoFS Go SDK demo Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/zh/jindosdk/golang/jindosdk_golang_quickstart.md Builds the demo with `go build` and runs it with `LD_LIBRARY_PATH=./jindo` to locate the Jindo native library. Run from the `jindo-gosdk-demo` directory. ```bash cd jindo-gosdk-demo go build LD_LIBRARY_PATH=./jindo ./jindo-gosdk-demo ``` -------------------------------- ### Example output of dataset cache status Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/zh/fluid-jindoruntime/jindo_fluid_dataload.md Example output from 'kubectl get dataset spark' showing that all data (1.92GiB) is cached, with a cached percentage of 100.0%. ```bash NAME UFS TOTAL SIZE CACHED CACHE CAPACITY CACHED PERCENTAGE PHASE AGE spark 1.92GiB 1.92GiB 4.00GiB 100.0% Bound 7m41s ``` -------------------------------- ### Start Presto console with Hive catalog Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/en/jindosdk/presto/jindosdk_on_presto.md Starts a Presto console session using the Hive catalog. Requires that JindoSDK for Hive is installed and configured as described in the Hive documentation. ```bash presto --server : --catalog hive ``` -------------------------------- ### Install Fluid CSI Driver Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/zh/fluid-jindoruntime/jindo_fluid_question.md Installs the CSI Driver if it is not installed. ```bash kubectl apply -f charts/fluid/fluid/templates/csi/driver.yaml ``` -------------------------------- ### Manually install Fluid CRDs Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/zh/fluid-jindoruntime/jindo_fluid_question.md Manually installs the CRDs for Fluid when using Helm versions below 3, which do not automatically install CRDs during 'helm install'. ```bash kubectl create -f fluid/crds ``` -------------------------------- ### Install fsspec dependency Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/en/jindosdk/python/pyjindo_quickstart.md Install the fsspec package for Python 3.8 using pip with the Aliyun mirror. ```bash python3.8 -m pip install fsspec --trusted-host mirrors.aliyun.com -i http://mirrors.aliyun.com/pypi/simple/ ``` -------------------------------- ### Full Installation on Linux x86 with Environment Variables Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/en/jindosdk/jindosdk_deployment_multi_platform.md Downloads and extracts the JindoSDK 6.10.8 Linux x86 tarball to /usr/lib/, then sets the required environment variables (JINDOSDK_HOME, JINDOSDK_CONF_DIR, PATH, LD_LIBRARY_PATH, HADOOP_CLASSPATH). Assumes the extracted folder is at /usr/lib/jindosdk-6.10.8-linux. ```bash wget https://jindodata-binary.oss-cn-shanghai.aliyuncs.com/release/6.10.8/jindosdk-6.10.8-linux.tar.gz tar zxvf jindosdk-6.10.8-linux.tar.gz -C /usr/lib/ export JINDOSDK_HOME=/usr/lib/jindosdk-6.10.8-linux export JINDOSDK_CONF_DIR=${JINDOSDK_HOME}/conf export PATH=${PATH}:${JINDOSDK_HOME}/bin export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${JINDOSDK_HOME}/lib/native export HADOOP_CLASSPATH=$HADOOP_CLASSPATH:${JINDOSDK_HOME}/lib/* ``` -------------------------------- ### Demo 目录结构 Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/zh/jindosdk/golang/jindosdk_golang_quickstart.md 展示 jindo-gosdk-demo 解压后的目录结构,包含 Go 模块文件、Jindo SDK 源码和动态库。 ```text . ├── Gopkg.lock ├── Gopkg.toml ├── README.md ├── go.mod ├── jindo │ ├── jindo_const.go │ ├── jindo_error.go │ ├── jindo_filesystem.go │ ├── jindo_reader.go │ ├── jindo_util.go │ ├── jindo_wrapper.go │ ├── jindo_writer.go │ └── libjindosdk_go.so └── main.go 2 directories, 13 files ``` -------------------------------- ### Open core-site.xml for editing Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/en/jindosdk/jindosdk_deployment_lite_hadoop.md Opens Hadoop's core-site.xml in vim for configuration. The file path uses the placeholder. ```bash vim /etc/hadoop/core-site.xml ``` -------------------------------- ### Create demo application pod from YAML Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/zh/fluid-jindoruntime/case/jindo_fluid_nas_ufs_example.md Creates the demo application pod defined in app.yaml. ```shell kubectl create -f app.yaml ``` -------------------------------- ### Example output with -field path -field mtime Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/zh/oss/dls_dump_inventory_howto.md Example output when using the -field option to export only the 'path' and 'mtime' fields. ```json {"path":"/","mtime":1666581702933} {"path":"/dls-1000326249","mtime":1660889124590} {"path":"/dls-1000326249/benchmark","mtime":1660889124590} {"path":"/dls-1000326249/benchmark/n1","mtime":1660889124590} {"path":"/dls-1000326249/benchmark/n1/490747449","mtime":1660895613953} ``` -------------------------------- ### Lite Installation on Linux aarch64 with JAR Files Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/en/jindosdk/jindosdk_deployment_multi_platform.md Downloads the jindo-sdk and the aarch64-specific jindo-core JARs for version 6.10.8 and copies them into /share/hadoop/hdfs/lib/. Assumes the downloaded JAR files are placed in that directory. ```bash wget https://jindodata-binary.oss-cn-shanghai.aliyuncs.com/mvn-repo/com/aliyun/jindodata/jindo-sdk/6.10.8/jindo-sdk-6.10.8.jar wget https://jindodata-binary.oss-cn-shanghai.aliyuncs.com/mvn-repo/com/aliyun/jindodata/jindo-core-linux-el7-aarch64/6.10.8/jindo-core-linux-el7-aarch64-6.10.8.jar cp jindo-core-linux-el7-aarch64-6.10.8.jar /share/hadoop/hdfs/lib/ cp jindo-core-6.10.8.jar /share/hadoop/hdfs/lib/ cp jindosdk-6.10.8.jar /share/hadoop/hdfs/lib/ ``` -------------------------------- ### Full Installation on Linux aarch64 with Environment Variables Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/en/jindosdk/jindosdk_deployment_multi_platform.md Downloads and extracts the JindoSDK 6.10.8 Linux aarch64 tarball to /usr/lib/, then sets the required environment variables. Assumes the extracted folder is at /usr/lib/jindosdk-6.10.8-linux-el7-aarch64. ```bash wget https://jindodata-binary.oss-cn-shanghai.aliyuncs.com/release/x.y.z/jindosdk-6.10.8-linux-el7-aarch64.tar.gz tar zxvf jindosdk-6.10.8-linux-el7-aarch64.tar.gz -C /usr/lib/ export JINDOSDK_HOME=/usr/lib/jindosdk-6.10.8-linux-el7-aarch64 export JINDOSDK_CONF_DIR=${JINDOSDK_HOME}/conf export PATH=${PATH}:${JINDOSDK_HOME}/bin export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${JINDOSDK_HOME}/lib/native export HADOOP_CLASSPATH=$HADOOP_CLASSPATH:${JINDOSDK_HOME}/lib/* ``` -------------------------------- ### Install PyJindo for Python 3.8 Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/en/jindosdk/python/pyjindo_quickstart.md Commands to ensure pip is available, upgrade pip using Aliyun mirror, and install the PyJindo wheel for Python 3.8. ```bash python3.8 -m ensurepip python3.8 -m pip install pip --upgrade --trusted-host mirrors.aliyun.com -i http://mirrors.aliyun.com/pypi/simple/ python3.8 -m pip install pyjindo-6.10.8-cp38-abi3-linux_x86_64.whl ``` -------------------------------- ### Initialize JfsFileSystem client Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/en/jindofs/jindofs_java_sdk.md Creates a JfsFileSystem instance and initializes it with an OSS-HDFS URI, a username, and a JfsConfiguration object. Replace the bucket, endpoint, and init-path placeholders with your actual values. ```java JfsFileSystem fs = new JfsFileSystemImpl(); fs.initialize(new URI("oss://./"), "user", conf); ``` -------------------------------- ### Install TensorFlow 2.8 with pip3 Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/en/jindosdk/tensorflow/jindosdk_on_tensorflow.md Install TensorFlow 2.8, one of the two supported versions (1.15 and 2.8). Use this command in a Python environment where pip3 is available. ```bash pip3 install tensorflow==2.8 ``` -------------------------------- ### 查看目录配额功能 Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/zh/jindofs/jindofs_directory_quota.md 查看目录配额功能是否开启,通过 -getConfig 命令获取 namespace.directory.quota.enable 的值。 ```bash jindofs admin -getConfig -dlsUri oss://./ -name namespace.directory.quota.enable ``` -------------------------------- ### Install FUSE 3 dependencies for JindoSDK up to 4.5.0 Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/en/oss/usages/oss_posix.md Install FUSE 3 dependencies for JindoSDK versions up to 4.5.0. Use the CentOS command on CentOS systems and the Debian command on Debian-based systems. ```bash # On CentOS yum install -y fuse3 fuse3-devel # On Debian apt install -y fuse3 libfuse3-dev ``` -------------------------------- ### Configure OSS/OSS-HDFS implementation classes in core-site.xml Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/en/jindosdk/jindosdk_deployment_lite_hadoop.md Adds the fs.AbstractFileSystem.oss.impl and fs.oss.impl properties to core-site.xml, pointing to the JindoOSS and JindoOssFileSystem classes. ```xml fs.AbstractFileSystem.oss.impl com.aliyun.jindodata.oss.JindoOSS fs.oss.impl com.aliyun.jindodata.oss.JindoOssFileSystem ``` -------------------------------- ### Example inventory JSON output Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/en/oss/dls_dump_inventory_howto.md Example JSON lines from the exported inventory file. Each line represents a file or directory with metadata fields such as id, path, type, size, user, group, atime, mtime, permission, and state. ```json {"id":16385,"path":"/","type":"directory","size":0,"user":"admin","group":"supergroup","atime":0,"mtime":1666581702933,"permission":511,"state":1} {"id":6246684106789500068,"path":"/dls-1000326249","type":"directory","size":0,"user":"hadoop","group":"supergroup","atime":0,"mtime":1660889124590,"permission":511,"state":0} {"id":6246684106789500069,"path":"/dls-1000326249/benchmark","type":"directory","size":0,"user":"hadoop","group":"supergroup","atime":0,"mtime":1660889124590,"permission":511,"state":0} {"id":6246684106789500070,"path":"/dls-1000326249/benchmark/n1","type":"directory","size":0,"user":"hadoop","group":"supergroup","atime":0,"mtime":1660889124590,"permission":511,"state":0} {"id":6246684106789500071,"path":"/dls-1000326249/benchmark/n1/490747449","type":"directory","size":0,"user":"hadoop","group":"supergroup","atime":0,"mtime":1660895613953,"permission":511,"state":0} ``` -------------------------------- ### DataLoad: Set cache replica count per target Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/zh/fluid-jindoruntime/jindo_fluid_dataload.md Controls the number of cache replicas per target path. Files under /sparkV1/spark-2.4.7 get 1 replica, while /sparkV1/spark-3.0.1/pyspark-3.0.1.tar.gz gets 2 replicas in the distributed cache engine. ```yaml apiVersion: data.fluid.io/v1alpha1 kind: DataLoad metadata: name: spark-dataload spec: dataset: name: spark namespace: default loadMetadata: true target: - path: /sparkV1/spark-2.4.7 replicas: 1 - path: /sparkV1/spark-3.0.1/pyspark-3.0.1.tar.gz replicas: 2 ``` -------------------------------- ### Execute upgrade.sh with version and platform Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/zh/upgrade/emr2_upgrade_jindofsx.md Run the upgrade script with the new JindoFSX version and platform as arguments to perform the upgrade. ```bash bash upgrade.sh $NEW_JINDOFSX_VERSION $PLATFORM ``` -------------------------------- ### 创建应用容器 app.yaml Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/zh/fluid-jindoruntime/jindo_fluid_oss_ufs_example.md 定义名为 demo-app 的 Pod,挂载名为 hadoop 的 PVC 到 /data 路径,用于访问 JindoFSx 加速的数据集。 ```yaml apiVersion: v1 kind: Pod metadata: name: demo-app spec: containers: - name: demo image: nginx volumeMounts: - mountPath: /data name: hadoop volumes: - name: hadoop persistentVolumeClaim: claimName: hadoop ``` -------------------------------- ### JindoFuse Input/output error example Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/en/jindofuse/jindofuse_quickstart.md Example of a generic operating system error shown by JindoFuse when an I/O error occurs, unlike JindoSDK APIs which provide detailed ErrorMsg. To troubleshoot, check the log file at the path specified by logger.dir (jindosdk.log). ```bash $ ls /mnt/oss/ ls: /mnt/oss/: Input/output error ``` -------------------------------- ### 执行 create 命令 Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/zh/fluid-jindoruntime/jindo_fluid_hdfs_ufs_example.md 使用 kubectl 创建 Dataset 和 JindoRuntime 资源。 ```shell $ kubectl create -f runtime.yaml ``` -------------------------------- ### Complete Jindo TensorFlow MNIST Training Example Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/en/jindosdk/tensorflow/jindosdk_on_tensorflow.md A complete example that loads MNIST data from OSS-HDFS using GFile, builds a simple neural network with Keras, and trains it. The model uses Flatten, Dense, Dropout, and softmax layers with sparse categorical crossentropy. ```python import tensorflow as tf import numpy as np tf.load_library("/path/to/jindosdk-x.x.x/lib/native/libjindo-tensorflow2.8.so") gmnist = tf.io.gfile.GFile("joss:///mnist.npz", 'rb') print(gmnist.size()) with np.load(gmnist) as f: x_train, y_train = f['x_train'], f['y_train'] x_test, y_test = f['x_test'], f['y_test'] model = tf.keras.models.Sequential([ tf.keras.layers.Flatten(input_shape=(28, 28)), tf.keras.layers.Dense(128, activation='relu'), tf.keras.layers.Dropout(0.2), tf.keras.layers.Dense(10, activation='softmax') ]) model.compile(optimizer='adam', loss='sparse_categorical_crossentropy', metrics=['accuracy']) model.fit(x_train, y_train, epochs=5) ``` -------------------------------- ### 执行升级脚本 upgrade.sh Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/zh/upgrade/emr2_upgrade_jindocache.md 通过 upgrade.sh 脚本执行修复操作,需要传入新版本号和平台参数。 ```bash bash upgrade.sh $NEW_jindocache_VERSION $PLATFORM ``` -------------------------------- ### List jindosdk-patches contents Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/zh/upgrade/emr2_upgrade_jindosdk.md Example output of the jindosdk-patches directory contents after extraction. ```bash -rwxrwxr-x 1 emr-user emr-user 2439 May 01 00:00 apply_all.sh -rwxrwxr-x 1 emr-user emr-user 7315 May 01 00:00 apply.sh -rw-rw-r-- 1 emr-user emr-user 40 May 01 00:00 hosts -rw-r----- 1 emr-user emr-user xxxxxxxxx May 01 00:00 jindosdk-6.10.8-linux.tar.gz -rwxrwxr-x 1 emr-user emr-user 1112 May 01 00:00 revert_all.sh -rwxrwxr-x 1 emr-user emr-user 2042 May 01 00:00 revert.sh ``` -------------------------------- ### Create namespace fluid-system Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/zh/fluid-jindoruntime/case/jindo_fluid_oss_append_fuseonly.md Creates the Kubernetes namespace 'fluid-system' where Fluid components will be installed. ```shell kubectl create ns fluid-system ``` -------------------------------- ### Create test directories and files Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/en/oss/dls_snapshot_quickstart.md Creates test directories and files under TestSnapshot before creating a snapshot. ```bash # Creating test directories and files hdfs dfs -mkdir oss://oss-dfs-test./TestSnapshot/dir1 hdfs dfs -mkdir oss://oss-dfs-test./TestSnapshot/dir2 hdfs dfs -touchz oss://oss-dfs-test./TestSnapshot/dir1/file1 hdfs dfs -touchz oss://oss-dfs-test./TestSnapshot/dir3/file2 ``` -------------------------------- ### Temporary Restore Task Status: PENDING Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/en/jindofs/jindofs_check_beckendFile_storagepolicy.md Returned when the temporary restore task has not started or has expired. ```text The status storage policy transfer job for [Archive->ArchiveRestored] : PENDING ``` -------------------------------- ### 查看 Dataset 状态 Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/zh/fluid-jindoruntime/jindo_fluid_oss_ufs_example.md 使用 kubectl get dataset 查看 dataset 的绑定状态,Bound 表示绑定成功。 ```shell $ kubectl get dataset hadoop NAME UFS TOTAL SIZE CACHED CACHE CAPACITY CACHED PERCENTAGE PHASE HCFS URL TOTAL FILES CACHE HIT RATIO AGE hadoop [Calculating] 0.00B 200.00GiB Bound hadoop-jindofs-master-0.default:18844 [Calculating] 6m28s ``` -------------------------------- ### Write file to JindoFuse Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/en/jindofuse/jindofuse_quickstart.md Writes the text 'hello world' to a file named hello.txt in the mounted JindoFuse directory. ```bash echo "hello world" > /mnt/oss/dir1/hello.txt ``` -------------------------------- ### Filter file content for --filters Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/zh/jindotools/jindodistcp_quickstart.md Example content of filter.txt. Files with 'test' in their path are not copied. ```text .*test.* ``` -------------------------------- ### Download jindo-sdk-memleak-check-1.0.jar Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/en/jindosdk/jindosdk_memory_best_practice.md Downloads the jindo-sdk-memleak-check-1.0.jar tool used to evaluate the effect of the jemalloc settings. ```bash wget https://jindodata-binary.oss-cn-shanghai.aliyuncs.com/resources/memcheck/jindo-sdk-memleak-check-1.0.jar ``` -------------------------------- ### Upgrade JindoFSX to 4.6.12 on linux Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/zh/upgrade/emr2_upgrade_jindofsx.md Example command to upgrade JindoFSX to version 4.6.12 on the linux platform. ```bash bash upgrade.sh 4.6.12 linux ``` -------------------------------- ### 配置 jindofs.cfg 中的 AK 信息 Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/zh/jindofs/jindofs_acls.md 在 jindofs.cfg 配置文件中设置 AK 信息。需要先设置环境变量 JINDOSDK_CONF_DIR 指向目录,并在该目录下创建 jindofs.cfg 文件。支持对所有 Bucket 生效的默认 AK,以及仅对特定 Bucket 生效的 AK,后者优先级更高。 ```yaml [client] fs.oss.accessKeyId = # 对所有 Bucket 生效的默认 AK key fs.oss.accessKeySecret = # 对所有 Bucket 生效的默认 AK secret fs.oss.bucket..accessKeyId = # 仅对某 Bucket 生效的 AK key,优先级高于默认 fs.oss.bucket..accessKeySecret = # 仅对某 Bucket 生效的 AK secret ``` -------------------------------- ### 开启快照功能(jindofs admin -allowSnapshot) Source: https://github.com/aliyun/alibabacloud-jindodata/blob/latest/docs/user/zh/oss/dls_snapshot_quickstart.md 使用 jindofs 命令行工具开启目录的快照功能。默认情况下,目录的快照功能是关闭的。 ```bash ./jindofs admin -allowSnapshot -dlsUri ``` ```bash ./jindofs admin -allowSnapshot -dlsUri oss://oss-dfs-test./TestSnapshot ```