This topic describes how to mount a unified namespace by running Jindo commands to implement cache-based acceleration.
Background information
The JindoFSx storage acceleration system allows you to mount the unified namespace jindo:// to applications. Then, the applications can use the unified namespace and APIs to access different independent storage systems. This way, the applications can communicate with the storage systems based on only the connection to JindoFSx.
Prerequisites
- A cluster of E-MapReduce (EMR) V3.42.0 or a later minor version, or EMR V5.6.0 or a later minor version is created in the EMR console. For more information about how to create a cluster, see Create a cluster.
- If your data source is Object Storage Service (OSS), OSS-HDFS, or Apache HDFS, make sure that the following operations are complete:
- If your data source is Apsara File Storage NAS (NAS), make sure that the data source is mounted to the same path of the nodes on which the namespace and the storage service are deployed.
Note In this example, a cluster of EMR V3.42.0 is used.
Run Jindo commands to mount a data source
- Run the following command to mount a data source:
jindo admin -mount <path> <realpath>
- Run the following command to mount the OSS or OSS-HDFS path:
jindo admin -mount /jindooss oss://<yourBucketName>/<dir>
- Run the following command to access
jindo://emr-header-1:8101/jindooss/
:hdfs dfs -ls jindo://emr-header-1:8101/jindooss
This operation is equivalent to the operation of accessing
oss://<yourBucketName>/<dir>
. - Run the following command to mount the HDFS path:
jindo admin -mount /hdfs hdfs://<ip>:<port>/dir
- Run the following command to access
jindo://emr-header-1:8101/hdfs/
:hdfs dfs -ls jindo://emr-header-1:8101/hdfs
The returned information is
jindo://emr-header-1:8101/hdfs
. This operation is equivalent to the operation of accessinghdfs://<ip>:<port>/dir
. - Run the following command to mount the NAS path:
jindo admin -mount /nas local:///mnt/nas
/mnt/nas
in the command is the mount point path of NAS on the physical machine. You must addlocal://
before /mnt/nas. - Run the following command to access
jindo://emr-header-1:8101/nas/
:hdfs dfs -ls jindo://emr-header-1:8101/nas
The returned information is
jindo://emr-header-1:8101/nas
. This operation is equivalent to the operation of accessing files in the/mnt/nas
directory.