HDFS-15835. Erasure coding: Add/remove logs for the better readability/debugging. Contributed by Bhavik Patel.
This commit is contained in:
parent
9a298d180d
commit
25af8901a9
|
@ -343,6 +343,7 @@ public final class ErasureCodingPolicyManager {
|
|||
policiesByName.values().toArray(new ErasureCodingPolicyInfo[0]);
|
||||
allPersistedPolicies.put(policy.getId(),
|
||||
new ErasureCodingPolicyInfo(policy));
|
||||
LOG.info("Added erasure coding policy " + policy);
|
||||
return policy;
|
||||
}
|
||||
|
||||
|
@ -414,7 +415,7 @@ public final class ErasureCodingPolicyManager {
|
|||
enabledPolicies =
|
||||
enabledPoliciesByName.values().toArray(new ErasureCodingPolicy[0]);
|
||||
info.setState(ErasureCodingPolicyState.DISABLED);
|
||||
LOG.info("Disable the erasure coding policy " + name);
|
||||
LOG.info("Disabled the erasure coding policy " + name);
|
||||
allPersistedPolicies.put(info.getPolicy().getId(),
|
||||
createPolicyInfo(info.getPolicy(),
|
||||
ErasureCodingPolicyState.DISABLED));
|
||||
|
@ -448,7 +449,7 @@ public final class ErasureCodingPolicyManager {
|
|||
enabledPoliciesByName.values().toArray(new ErasureCodingPolicy[0]);
|
||||
allPersistedPolicies.put(ecPolicy.getId(),
|
||||
createPolicyInfo(info.getPolicy(), ErasureCodingPolicyState.ENABLED));
|
||||
LOG.info("Enable the erasure coding policy " + name);
|
||||
LOG.info("Enabled the erasure coding policy " + name);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -8226,7 +8226,6 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|||
checkOperation(OperationCategory.WRITE);
|
||||
checkErasureCodingSupported(operationName);
|
||||
boolean success = false;
|
||||
LOG.info("Disable the erasure coding policy " + ecPolicyName);
|
||||
try {
|
||||
writeLock();
|
||||
try {
|
||||
|
|
|
@ -2258,10 +2258,10 @@ public class NameNodeRpcServer implements NamenodeProtocols {
|
|||
try {
|
||||
if (ecPolicyName == null) {
|
||||
ecPolicyName = defaultECPolicyName;
|
||||
LOG.trace("No policy name is specified, " +
|
||||
LOG.debug("No policy name is specified, " +
|
||||
"set the default policy name instead");
|
||||
}
|
||||
LOG.trace("Set erasure coding policy " + ecPolicyName + " on " + src);
|
||||
LOG.debug("Set erasure coding policy {} on {}", ecPolicyName, src);
|
||||
namesystem.setErasureCodingPolicy(src, ecPolicyName, cacheEntry != null);
|
||||
success = true;
|
||||
} finally {
|
||||
|
@ -2491,6 +2491,7 @@ public class NameNodeRpcServer implements NamenodeProtocols {
|
|||
}
|
||||
boolean success = false;
|
||||
try {
|
||||
LOG.debug("Unset erasure coding policy on {}", src);
|
||||
namesystem.unsetErasureCodingPolicy(src, cacheEntry != null);
|
||||
success = true;
|
||||
} finally {
|
||||
|
|
Loading…
Reference in New Issue