Repository: hadoop Updated Branches: refs/heads/branch-2.7 e67bd31ac -> faeb8b9b5
HDFS-7962. Remove duplicated logs in BlockManager. (yliu) Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/faeb8b9b Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/faeb8b9b Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/faeb8b9b Branch: refs/heads/branch-2.7 Commit: faeb8b9b53a6a8858a7ca31f930189949f6026c7 Parents: e67bd31 Author: yliu <[email protected]> Authored: Fri Mar 20 05:32:19 2015 +0800 Committer: yliu <[email protected]> Committed: Fri Mar 20 05:32:19 2015 +0800 ---------------------------------------------------------------------- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 2 ++ .../server/blockmanagement/BlockManager.java | 21 ++++++++------------ 2 files changed, 10 insertions(+), 13 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/faeb8b9b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index ee5c665..79785d9 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -442,6 +442,8 @@ Release 2.7.0 - UNRELEASED HDFS.7849. Update documentation for enabling a new feature in rolling upgrade ( J.Andreina via vinayakumarb ) + HDFS-7962. Remove duplicated logs in BlockManager. (yliu) + OPTIMIZATIONS HDFS-7454. Reduce memory footprint for AclEntries in NameNode. http://git-wip-us.apache.org/repos/asf/hadoop/blob/faeb8b9b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java index 73c1425..e582f11 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java @@ -365,10 +365,10 @@ public class BlockManager { if (!isEnabled) { if (UserGroupInformation.isSecurityEnabled()) { - LOG.error("Security is enabled but block access tokens " + - "(via " + DFSConfigKeys.DFS_BLOCK_ACCESS_TOKEN_ENABLE_KEY + ") " + - "aren't enabled. This may cause issues " + - "when clients attempt to talk to a DataNode."); + LOG.error("Security is enabled but block access tokens " + + "(via " + DFSConfigKeys.DFS_BLOCK_ACCESS_TOKEN_ENABLE_KEY + ") " + + "aren't enabled. This may cause issues " + + "when clients attempt to talk to a DataNode."); } return null; } @@ -1223,10 +1223,6 @@ public class BlockManager { NumberReplicas nr = countNodes(b.stored); if (nr.replicasOnStaleNodes() > 0) { blockLog.info("BLOCK* invalidateBlocks: postponing " + - "invalidation of " + b + " on " + dn + " because " + - nr.replicasOnStaleNodes() + " replica(s) are located on nodes " + - "with potentially out-of-date block reports"); - blockLog.info("BLOCK* invalidateBlocks: postponing " + "invalidation of {} on {} because {} replica(s) are located on " + "nodes with potentially out-of-date block reports", b, dn, nr.replicasOnStaleNodes()); @@ -1499,8 +1495,10 @@ public class BlockManager { } } } - blockLog.debug("BLOCK* neededReplications = {} pendingReplications = {}", - neededReplications.size(), pendingReplications.size()); + if (blockLog.isDebugEnabled()) { + blockLog.debug("BLOCK* neededReplications = {} pendingReplications = {}", + neededReplications.size(), pendingReplications.size()); + } return scheduledWork; } @@ -2480,9 +2478,6 @@ public class BlockManager { } } else if (result == AddBlockResult.REPLACED) { curReplicaDelta = 0; - blockLog.warn("BLOCK* addStoredBlock: " + "block " + storedBlock - + " moved to storageType " + storageInfo.getStorageType() - + " on node " + node); blockLog.warn("BLOCK* addStoredBlock: block {} moved to storageType " + "{} on node {}", storedBlock, storageInfo.getStorageType(), node); } else {
