storagepolicies

Lists/sets/unsets storage policies.

The usage is as follows:

$ hdfs storagepolicies
      [-listPolicies]
      [-setStoragePolicy -path <path> -policy <policy>]
      [-getStoragePolicy -path <path>]
      [-unsetStoragePolicy -path <path>]
      [-satisfyStoragePolicy -path <path>]
      [-isSatisfierRunning]
      [-help <command-name>]
Arguments

-listPolicies

Lists out all the storage policies

-setStoragePolicy -path <path> -policy <policy>

Sets a storage policy to a file or a directory:

  • <path> — the path referring to either a directory or a file;

  • <policy> — the name of the storage policy.

-getStoragePolicy -path <path>

Gets the storage policy of a file or a directory.
<path> refers to either a directory or a file

-unsetStoragePolicy -path <path>

Unsets a storage policy to a file or a directory.
<path> refers to either a directory or a file.
After the unset command the storage policy of the nearest ancestor will apply, and if there is no policy on any ancestor, then the default storage policy will apply

-satisfyStoragePolicy -path <path>

Schedules blocks to move based on file’s/directory’s current storage policy.
<path> refers to either a directory or a file

Found a mistake? Seleсt text and press Ctrl+Enter to report it