hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject [1/3] hadoop git commit: HDFS-9839. Reduce verbosity of processReport logging. (Contributed by Arpit Agarwal)
Date Sun, 21 Feb 2016 07:23:32 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 7f6737951 -> 7660cfd91
  refs/heads/branch-2.8 d31660ef4 -> 4823fbb49
  refs/heads/trunk e54cc2931 -> d5abd293a


HDFS-9839. Reduce verbosity of processReport logging. (Contributed by Arpit Agarwal)

This closes #78


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/d5abd293
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/d5abd293
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/d5abd293

Branch: refs/heads/trunk
Commit: d5abd293a890a8a1da48a166a291ae1c5644ad57
Parents: e54cc29
Author: Arpit Agarwal <arp@apache.org>
Authored: Sat Feb 20 23:19:09 2016 -0800
Committer: Arpit Agarwal <arp@apache.org>
Committed: Sat Feb 20 23:19:09 2016 -0800

----------------------------------------------------------------------
 hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt       |  2 ++
 .../hdfs/server/blockmanagement/BlockManager.java | 18 +++++++++---------
 2 files changed, 11 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/d5abd293/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 1d0379c..9215488 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -2802,6 +2802,8 @@ Release 2.8.0 - UNRELEASED
     HDFS-6832. Fix the usage of 'hdfs namenode' command.
     (Manjunath Ballur via aajisaka)
 
+    HDFS-9839. Reduce verbosity of processReport logging. (Arpit Agarwal)
+
 Release 2.7.3 - UNRELEASED
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/d5abd293/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 cc52b6e..eaebed9 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
@@ -2060,7 +2060,7 @@ public class BlockManager implements BlockStatsMXBean {
     final long startTime = Time.monotonicNow(); //after acquiring write lock
     final long endTime;
     DatanodeDescriptor node;
-    Collection<Block> invalidatedBlocks = null;
+    Collection<Block> invalidatedBlocks = Collections.emptyList();
 
     try {
       node = datanodeManager.getDatanode(nodeID);
@@ -2136,11 +2136,9 @@ public class BlockManager implements BlockStatsMXBean {
       namesystem.writeUnlock();
     }
 
-    if (invalidatedBlocks != null) {
-      for (Block b : invalidatedBlocks) {
-        blockLog.info("BLOCK* processReport: {} on node {} size {} does not " +
-            "belong to any file", b, node, b.getNumBytes());
-      }
+    for (Block b : invalidatedBlocks) {
+      blockLog.debug("BLOCK* processReport: {} on node {} size {} does not " +
+          "belong to any file", b, node, b.getNumBytes());
     }
 
     // Log the block report processing stats from Namenode perspective
@@ -2149,9 +2147,11 @@ public class BlockManager implements BlockStatsMXBean {
       metrics.addBlockReport((int) (endTime - startTime));
     }
     blockLog.info("BLOCK* processReport: from storage {} node {}, " +
-            "blocks: {}, hasStaleStorage: {}, processing time: {} msecs", storage
-            .getStorageID(), nodeID, newReport.getNumberOfBlocks(),
-        node.hasStaleStorages(), (endTime - startTime));
+        "blocks: {}, hasStaleStorage: {}, processing time: {} msecs, " +
+        "invalidatedBlocks: {}", storage.getStorageID(), nodeID,
+        newReport.getNumberOfBlocks(),
+        node.hasStaleStorages(), (endTime - startTime),
+        invalidatedBlocks.size());
     return !node.hasStaleStorages();
   }
 


Mime
View raw message