Commands for configuring storage policies
Depending on your requirements, use the hdfs storagepolicy sub-commands to set storage policies or list the storage policies applied on a file or a directory.
Setting storage policies
Command: hdfs storagepolicies -setStoragePolicy <path> <policyName>Argument | Description |
---|---|
<path> | The path to a directory or file. |
<policyName> | The name of the storage policy. |
hdfs storagepolicies -setStoragePolicy /cold1 COLD
Listing storage policies
Command: hdfs storagepolicies -getStoragePolicy <path>Argument | Description |
---|---|
<path> | The path to a directory or file. |
hdfs storagepolicies -getStoragePolicy /cold1