[ 
https://issues.apache.org/jira/browse/HDFS-9534?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15143703#comment-15143703
 ] 

Arpit Agarwal commented on HDFS-9534:
-------------------------------------

Thanks for updating the patch [~xiaobingo]. My comments on the v2 patch:
# I understand why you instantiate a dummy policy in 
{{FsDirAttrOp#unsetStoragePolicy}} to avoid the extra call to getPolicy. 
Instead can we just pass the storage policy ID to {{setStoragePolicy}}? Then we 
need no change to FsEditLogLoader.java. We will need to fix the 
{{isCopyOnCreateFile}} check in {{unprotectedSetStoragePolicy}}.
# Update [storage policy 
docs|https://hadoop.apache.org/docs/stable/hadoop-project-dist/hadoop-hdfs/ArchivalStorage.html#Storage_Policy_Commands]
 to add a section for unset policy (see ArchivalStorage.md). Also mention here 
that 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.
# We need more tests, for one check that unsetPolicy is correctly applied from 
the edit log on restart. I think you have a test case for nested storage 
policies. Could you split up {{testUnsetStoragePolicy}} into multiple smaller 
tests to make it clearer what is being tested?
# Also we should separate the command test from the RPC handling tests. The 
command tests can check for a couple of simple cases.


> Add CLI command to clear storage policy from a path.
> ----------------------------------------------------
>
>                 Key: HDFS-9534
>                 URL: https://issues.apache.org/jira/browse/HDFS-9534
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: tools
>            Reporter: Chris Nauroth
>            Assignee: Xiaobing Zhou
>         Attachments: HDFS-9534.001.patch, HDFS-9534.002.patch
>
>
> The {{hdfs storagepolicies}} command has sub-commands for 
> {{-setStoragePolicy}} and {{-getStoragePolicy}} on a path.  However, there is 
> no {{-removeStoragePolicy}} to remove a previously set storage policy on a 
> path.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to