JindoFS cache mode stores files as objects in Object Storage Service (OSS) and caches them locally in your E-MapReduce cluster based on access patterns. This improves data access efficiency while preserving OSS object semantics and ensuring full compatibility with other OSS clients.
Background information
Cache mode preserves the original OSS object semantics, so you can use JindoFS without migrating or converting existing data. The local cluster cache improves data access performance and reduces bandwidth consumption for OSS read and write operations.
Configuration methods
JindoFS in cache mode offers two configuration methods for different use cases.
OSS Scheme
For more information, see Configure the OSS scheme (recommended).
JFS Scheme
For more information, see Configure the JFS scheme.
OSS scheme (recommended)
The OSS scheme uses the standard oss://<bucket_name>/<path_of_your_file> path format. It works out of the box after you create an E-MapReduce cluster, with no additional configuration required. Existing jobs that read from or write to OSS run without modification.
JFS scheme
- Go to the SmartData service.
- Log on to the EMR console.
- In the top navigation bar, select a region and a resource group as needed.
- Click the Clusters tab.
- On the Clusters page, find your cluster and click Details in the Actions column.
- In the navigation pane on the left, choose .
- Log on to the EMR console.
- Go to the namespace tab for the SmartData service.
- Click the Configure tab.
- Click the namespace tab in the Service Configuration section.

- Configure the following parameters.
JindoFS supports multiple namespaces. This topic uses
testas an example namespace.- Set jfs.namespaces to test.
test is an example namespace name. To configure multiple namespaces, separate their names with commas (,).
- Click Custom Configuration. In the Add Configuration Item dialog box, add the following parameters.
Parameter Description Example jfs.namespaces.test.oss.uri The storage backend for the testnamespace.oss://<oss_bucket>/<oss_dir>/ Note You must set this parameter to a specific directory in an OSS bucket or to the root directory.jfs.namespaces.test.mode Specifies that the testnamespace uses cache mode.cache
- Set jfs.namespaces to test.
- In the upper-right corner, click Save.
- In the upper-right corner, choose .
After the service restarts, you can access files in JindoFS using the path
jfs://test/<path_of_file>.
Enable cache
JindoFS can use local disks to cache frequently accessed data blocks. Caching is disabled by default, and all read operations access OSS directly.
- On the Configure tab of the service, click the client tab.
- Set the jfs.cache.data-cache.enable parameter to 1 to enable caching.
This is a client-side configuration and does not require you to restart the SmartData service.
After caching is enabled, the Jindo service automatically manages the local cache and evicts data based on the configured watermark. Configure the storage ratio based on your needs. For more information, see Control disk space by using watermarks.
Control disk space usage
JindoFS uses OSS as its storage backend, which provides vast storage capacity. However, the local disk space on your cluster is finite. To manage this space, JindoFS automatically evicts cold data from the local cache. You can control this eviction behavior with the storage.watermark.high.ratio and storage.watermark.low.ratio parameters. These parameters accept decimal values between 0 and 1 that represent the ratio of disk space used.
- Modify disk usage configurations. In the Service Configuration section for the SmartData service, click the storage tab and configure the parameters described in the following table.

Parameter Description storage.watermark.high.ratio The upper limit of disk usage. When the disk usage of JindoFS data exceeds this limit, JindoFS automatically deletes data in the disk. Default value: 0.4. storage.watermark.low.ratio The lower limit of disk usage. After automatic data deletion is triggered, JindoFS starts to delete data until the disk usage of JindoFS data is reduced to this limit. Default value: 0.2. Note You can configure the upper limit and lower limit to adjust the disk space assigned to JindoFS. Make sure that the upper limit is greater than the lower limit. - Save the configurations.
- In the upper-right corner of the Service Configuration section, click Save.
- In the Confirm Changes dialog box, specify Description and turn on Auto-update Configuration.
- Click OK.
- Restart Jindo Storage Service to apply the configurations.
- Select Restart Jindo Storage Service from the drop-down list in the upper-right corner.
- In the Cluster Activities dialog box, specify the related parameters.
- Click OK.
- In the Confirm message, click OK.
Accessing an OSS bucket
- OSS scheme
- On the Configure tab of the service, click the smartdata-site tab.
- Click Custom Configuration. In the Add Configuration Item dialog box, add the following parameters and click OK.
Parameter Description fs.jfs.cache.oss-accessKeyId The AccessKey ID for the OSS storage backend. fs.jfs.cache.oss-accessKeySecret The AccessKey Secret for the OSS storage backend. fs.jfs.cache.oss-endpoint The endpoint for the OSS storage backend.
- JFS scheme
- On the Configure tab of the service, click the bigboot tab.
- Set the jfs.namespaces parameter to test.
- Click Custom Configuration. In the Add Configuration Item dialog box, add the following parameters and click OK.
Parameter Description jfs.namespaces.test.oss.uri The storage backend for the testnamespace. Example: oss://<oss_bucket.endpoint>/<oss_dir>.The endpoint is specified directly in the URI.
jfs.namespaces.test.oss.access.key The AccessKey ID for the OSS storage backend. jfs.namespaces.test.oss.access.secret The AccessKey Secret for the OSS storage backend.
OSS Scheme
For more information, see Configure OSS Scheme (recommended).
JFS Scheme
For more information, see Configure JFS Scheme.
Advanced settings
These client-side configurations take effect without restarting the SmartData service.
- In the Service Configuration section, on the client tab, configure the following parameters.
Parameter Description client.oss.upload.threads The number of OSS upload threads for each file write stream. Default: 4. client.oss.upload.max.parallelism The maximum number of concurrent OSS uploads per process. Limits bandwidth and memory consumption from upload threads. Default: 16. - In the Service Configuration section, on the smartdata-site tab, configure the following parameters.
Parameter Description fs.jfs.cache.copy.simple.max.byte The maximum file size for standard copy during a rename. Files below this threshold use the standard copy interface; larger files use the multipart copy interface for better efficiency. Note If you have enabled the OSS fast copy feature, set this parameter to -1 to use the standard copy interface for all file sizes, leveraging fast copy for optimal rename performance.fs.jfs.cache.write.buffer.size The buffer size for file write streams. Must be a power of two, up to 8 MB. Reduce this value if concurrent write streams cause high memory usage. Default: 1048576. fs.oss.committer.magic.enabled Enables the Jindo Job Committer, which improves performance by avoiding rename operations during the job commit phase. Default: true. Note Object storage systems like OSS perform poorly during rename operations. The Jindo Job Committer addresses this in cache mode.