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

Jing Zhao commented on HDFS-7076:
---------------------------------

Thanks for the review, Yi!

I agree that allowing admin to redefine an existing policy (or delete then add 
with the same name/id) may cause files to be migrated "silently" later when 
running mover. This may not be a good behavior. Instead, another option can be 
only allowing users to add new policies. The ID of the new policies will be 
assigned by the NN, and the admin only provides policy name and the content of 
the policy. Once a policy is added it cannot be deleted or modified.

If we go this way then we need to remove or loose the restriction on the total 
number of policies in the system. Currently we have two places causing the 
policy number limitation. The first one is that we only use 4 bits in INodeFile 
to store the policy ID. The second one is that the editlog of 
{{setStoragePolicy}} takes a byte as the policy id. To avoid the 
incompatibility, currently we can increase the max number of policies to 127, 
and always use xattr to associate user-defined policies (whose id starts from 
16) with file/directory.


> Persist Block Storage Policy in FSImage and Edit Log
> ----------------------------------------------------
>
>                 Key: HDFS-7076
>                 URL: https://issues.apache.org/jira/browse/HDFS-7076
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: namenode
>            Reporter: Jing Zhao
>            Assignee: Jing Zhao
>         Attachments: HDFS-7076.000.patch, HDFS-7076.001.patch, 
> HDFS-7076.002.patch, HDFS-7076.003.patch, HDFS-7076.004.patch, 
> HDFS-7076.005.patch, HDFS-7076.005.patch, editsStored
>
>
> Currently block storage policies are hard coded.  This JIRA is to persist the 
> policies in FSImage and Edit Log in order to support adding new policies or 
> modifying existing policies.



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

Reply via email to