Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created 04-07-2016 10:20 AM
Hi team
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 ?
Created 04-07-2016 10:30 AM
Unfortunately, I think can't delete (yet) due to https://issues.apache.org/jira/browse/HDFS-9534
Created 04-07-2016 10:30 AM
Unfortunately, I think can't delete (yet) due to https://issues.apache.org/jira/browse/HDFS-9534
Created 04-07-2016 10:34 AM
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.
Created 04-07-2016 10:34 AM
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.
Created 08-31-2017 01:26 AM
As we moved into 2017, we can now remove storage policy for a certain path!
hdfs storagepolicies -unsetStoragePolicy -path <path>