JindoFS in block storage mode provides advanced data management policies to meet storage requirements in different scenarios. The advanced policies include storage policies and compression policies. This topic describes the policies in detail and provides examples to show how to use the policies.

Storage policies

JindoFS provides the five storage policies described in the following table to support flexible storage.
Policy Description
AR Data has only one backup. The backup is stored as an Archive object in OSS.
IA Data has only one backup. The backup is stored as an Infrequent Access (IA) object in OSS.
COLD Data has only one backup. The backup is stored as a Standard object in OSS.
WARM Data has one backup in OSS and one local backup. The local backup can effectively accelerate data read operations.

By default, this storage policy is used.

HOT Data has one backup in OSS and one local backup. The local backup is forcibly locked. This way, it is not deleted when the cache is automatically cleared. This policy can achieve a better acceleration effect than the WARM policy and is suitable for the hottest data.

For more information about the storage classes of OSS, see Overview.

A newly added file is stored based on the storage policy specified for its parent directory. Example:
  • Run the following command to configure a storage policy:
    jindo jfs -setStoragePolicy [-R] <StoragePolicy>(AR/IA/COLD/WARM/HOT) <path> ...
    where:
    • [-R]: specifies that a recursive operation is performed to configure the same storage policy for all sub-directories of the directory.
    • <path>: the name of the directory for which the storage policy is configured.
  • Run the following command to obtain the storage policy configured for a directory:
    jindo jfs -getStoragePolicy <path>

Compression policies

JindoFS allows you to compress data blocks before you store them. This feature effectively reduces the storage space occupied by data blocks and improves data read and write efficiency. This feature is suitable for files that have a high compression ratio. The following table describes the supported compression policies.
Policy Description
NONE Data blocks are not compressed.

By default, this compression policy is used.

ZSTD The Zstandard compression algorithm is used to compress data blocks.
A newly added file is compressed based on the compression policy specified for its parent directory before it is stored. Example:
  • Run the following command to configure a compression policy:
    jindo jfs -setCompressionPolicy [-R] <CompressionPolicy>(NONE/ZSTD) <path> ...
    where:
    • [-R]: specifies that a recursive operation is performed to configure the same compression policy for all sub-directories of the directory.
    • <path>: the name of the directory for which the compression policy is configured.
  • Run the following command to obtain the compression policy configured for a directory:
    jindo jfs -getCompressionPolicy <path> ...