hadoop-hdfs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "liaoyuxiangqin (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HDFS-13217) Log audit event only used last EC policy name when add multiple policies from file
Date Fri, 02 Mar 2018 07:41:00 GMT
liaoyuxiangqin created HDFS-13217:
-------------------------------------

             Summary: Log audit event only used last EC policy name when add multiple policies
from file 
                 Key: HDFS-13217
                 URL: https://issues.apache.org/jira/browse/HDFS-13217
             Project: Hadoop HDFS
          Issue Type: Improvement
          Components: erasure-coding
    Affects Versions: 3.1.0
            Reporter: liaoyuxiangqin


When i read the addErasureCodingPolicies() of FSNamesystem class in namenode, i found the
following code only used last ec policy name for  logAuditEvent, i think this audit log
can't track whole policies for the add multiple erasure coding policies to the ErasureCodingPolicyManager. Thanks.
{code:java|title=FSNamesystem.java|borderStyle=solid}
try {
      checkOperation(OperationCategory.WRITE);
      checkNameNodeSafeMode("Cannot add erasure coding policy");
      for (ErasureCodingPolicy policy : policies) {
        try {
          ErasureCodingPolicy newPolicy =
              FSDirErasureCodingOp.addErasureCodingPolicy(this, policy,
                  logRetryCache);
          addECPolicyName = newPolicy.getName();
          responses.add(new AddErasureCodingPolicyResponse(newPolicy));
        } catch (HadoopIllegalArgumentException e) {
          responses.add(new AddErasureCodingPolicyResponse(policy, e));
        }
      }
      success = true;
      return responses.toArray(new AddErasureCodingPolicyResponse[0]);
    } finally {
      writeUnlock(operationName);
      if (success) {
        getEditLog().logSync();
      }
      logAuditEvent(success, operationName,addECPolicyName, null, null);
    }

{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-dev-help@hadoop.apache.org


Mime
View raw message