[ https://issues.apache.org/jira/browse/HDFS-11072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15734398#comment-15734398 ]
SammiChen commented on HDFS-11072: ---------------------------------- I'm rethinking about Rakesh and Andrew's comments. A directory can be one of these three states, 1. it has normal ec policy on itself 2. it has replication policy on itself 3 it has nothing policy on itself. it inherits whatever from its parent group >From user's point of view, the new created directory has state 3. If user >wants the directory stop inheriting, he/she can use setErasureCodingPolicy >API to set either normal ec policy or replication policy on directory, then >the directory transforms to state 1 or state 2 respectively. To transfer >directory from state 1 or state 2 back to state 3, we need a >removeErasureCodingPolicy API which will remove both the normal ec and >replication policy. Given the above 3 states, when user call getErasureCodingPolicy, the API will return the normal ec policy. The replication policy will not be returned, both directory and file. I think user only cares about whether the directory is a ec directory or a 3 way replication directory. I mean if a directory in state 2, user don't care about whether it's inherited or because of there is replication policy on itself. Andrew, can you explain why you think for a directory, the replication policy should be return when getErasureCodingPolicy is called? So it seems keep the replication policy internal and hide from end user is not feasible. We requires user explicitly set the replication policy through setErasureCodingPolicy API. Unless we introduce another policy manipulation API, such as "setDefaultReplicationPolicy" which handles change directory from ec policy to replication policy. What do you think? [~andrew.wang] , [~rakeshr] > Add ability to unset and change directory EC policy > --------------------------------------------------- > > Key: HDFS-11072 > URL: https://issues.apache.org/jira/browse/HDFS-11072 > Project: Hadoop HDFS > Issue Type: Sub-task > Components: erasure-coding > Affects Versions: 3.0.0-alpha1 > Reporter: Andrew Wang > Assignee: SammiChen > Labels: hdfs-ec-3.0-must-do > Attachments: HDFS-11072-v1.patch, HDFS-11072-v2.patch, > HDFS-11072-v3.patch, HDFS-11072-v4.patch > > > Since the directory-level EC policy simply applies to files at create time, > it makes sense to make it more similar to storage policies and allow changing > and unsetting the policy. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org