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

Rakesh R commented on HDFS-12395:
---------------------------------

Thanks [~Sammi] for the patch. Adding few comments on the patch:

# Missing new EC opcodes in {{editsStored.xml}}.
# Update javadocs for:
{code}
FSNamesystem#addErasureCodingPolicies, FSNamesystem#removeErasureCodingPolicy, 
FSNamesystem#enableErasureCodingPolicy, FSNamesystem#disableErasureCodingPolicy

FSDirErasureCodingOp#addErasureCodingPolicy, 
FSDirErasureCodingOp#removeErasureCodingPolicy, 
FSDirErasureCodingOp#enableErasureCodingPolicy, 
FSDirErasureCodingOp#disableErasureCodingPolicy functions.
{code}
# I could see {{CacheEntry}} and {{CacheEntryWithPayload}} used in the patch. 
Is it intentionally used differently for different cases?
# Can we move {{checkOperation()}} and {{checkNameNodeSafeMode()}} checks 
outside for loop. If it throws exception, then #addErasureCodingPolicies() 
operation won't be atomic anyway, right? Atomic op, I meant either API should 
consider all policies and shouldn't add policies partially.
{code}
FSNamesystem#addErasureCodingPolicies()
          ......
      for (ErasureCodingPolicy policy : policies) {
        try {
          checkOperation(OperationCategory.WRITE);
          checkNameNodeSafeMode("Cannot add erasure coding policy");
          ErasureCodingPolicy newPolicy =
              FSDirErasureCodingOp.addErasureCodingPolicy(this, policy,
                  logRetryCache);
{code}
# Looks like test case failures are related, please take care.

> Support add, remove, disable and enable erasure coding policy operations in 
> edit log
> ------------------------------------------------------------------------------------
>
>                 Key: HDFS-12395
>                 URL: https://issues.apache.org/jira/browse/HDFS-12395
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: erasure-coding
>            Reporter: SammiChen
>            Assignee: SammiChen
>              Labels: hdfs-ec-3.0-must-do
>         Attachments: HDFS-12395.001.patch
>
>
> Support add, remove, disable, enable erasure coding policy operation in edit 
> log. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to