From the link below, i see options to set and get storage policies on hdfs for files/dirs
Also hdfs command displays -
hdfs storagepolicies --help Can't understand command '--help' Usage: bin/hdfs storagepolicies [COMMAND] [-listPolicies] [-setStoragePolicy -path <path> -policy <policy>] [-getStoragePolicy -path <path>] [-help <command-name>]
Can you let me know how to delete if there is any storage policy applied ?
There is no specific 'removeStoragePolicy' command.
So what you want to do, I guess, is to get it back to the default value, right? The workaround is you could use '-setStoragePolicy' to set it to 'HOT'(default value), or you could use '-getStoragePolicy' to check the policy of the parent directory first and then use '-setStoragePolicy' to set it.
Hi Sagar, Currently I don't think there is remove storage policy function. The only way is to copy/move data to a new dir and then delete and rename the new one created.