All Products
Search
Document Center

Configure the storage policy for hot and cold data

Last Updated: Jul 09, 2021

This topic describes how to configure a storage policy for hot and cold data on LindormDFS of ApsaraDB for Lindorm (Lindorm).

Prerequisites

Multiple storage specifications can be used in the Lindorm system. For more information about the characteristics of each storage specification, see Select storage specifications.

A combination of storage types is configured for your instance to store hot and cold data: standard storage + capacity-optimized storage or performance-optimized storage + capacity-optimized storage.

Configure the storage policy for hot and cold data

You can use an open source HDFS client to configure a storage policy for hot and cold data. For more information about how to configure the client, see Use open source HDFS clients to access LindormDFS.

You can run the following command to configure a storage policy for hot and cold data that is stored in a directory. The configured storage policy applies to all the files that are recursively included in this directory.

$HADOOP_HOME/bin/hdfs storagepolicies -setStoragePolicy -path <PATH> -policy  <POLICY>

Values of the POLICY parameter:

  • HOT: Data is stored in the standard storage or the performance-optimized storage. When you do not configure the POLICY parameter, LindormDFS uses this policy for data storage by default.

  • COLD: Data is stored in the capacity-optimized storage.