Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
3.0.0
-
None
-
Reviewed
Description
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.
FSNamesystem.java
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); }
Attachments
Attachments
Issue Links
- is duplicated by
-
HDFS-13218 Log audit event only used last EC policy name when add multiple policies from file
- Resolved