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

Zhe Zhang commented on HDFS-7839:
---------------------------------

While working on the code I found it hard to store EC policy only on dir level. 
NameNode frequently checks this information (e.g. {{getReplication}}) to make 
internal decisions. It is too expensive to traverse the namespace for every 
such operation (the traversal also requires readLock).

So I guess we need to separately store _desired_ and _actual_ EC policies even 
at this stage. Currently the EC policy is binary. My plan is to store desired 
policy in dir's XAttr, and get actual policy by checking whether 
{{FileWithStripedBlocksFeature}} is set.

As part of HDFS-7337 we'll need to store the EC schema. I guess we can store 
the desired schema in dir's XAttr and extend {{FileWithStripedBlocksFeature}} 
to store the actual schema.

> Erasure coding: implement facilities in NameNode to create and manage EC zones
> ------------------------------------------------------------------------------
>
>                 Key: HDFS-7839
>                 URL: https://issues.apache.org/jira/browse/HDFS-7839
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: Zhe Zhang
>            Assignee: Zhe Zhang
>         Attachments: HDFS-7839-000.patch, HDFS-7839-001.patch
>
>
> As a quick first step to facilitate initial development and testing, 
> HDFS-7347 added EC configuration in file header as one storage policy. We 
> have discussed and [concluded 
> |https://issues.apache.org/jira/browse/HDFS-7285?focusedCommentId=14296210&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14296210]
>  that EC configurations should be part of XAttr. This JIRA aims to add the 
> basic EC XAttr structure. HDFS-7337 will add configurable and pluggable 
> schema info.
> This JIRA will follow the [plan | 
> https://issues.apache.org/jira/browse/HDFS-7285?focusedCommentId=14370307&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14370307]
>  we made under HDFS-7285.



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

Reply via email to