hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dhr...@apache.org
Subject svn commit: r613058 - in /lucene/hadoop/trunk: CHANGES.txt src/java/org/apache/hadoop/dfs/DataNode.java
Date Fri, 18 Jan 2008 05:23:35 GMT
Author: dhruba
Date: Thu Jan 17 21:23:30 2008
New Revision: 613058

URL: http://svn.apache.org/viewvc?rev=613058&view=rev
Log:
HADOOP-290. A DataNode log message now prints the target of a replication
request correctly. (dhruba)


Modified:
    lucene/hadoop/trunk/CHANGES.txt
    lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DataNode.java

Modified: lucene/hadoop/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/CHANGES.txt?rev=613058&r1=613057&r2=613058&view=diff
==============================================================================
--- lucene/hadoop/trunk/CHANGES.txt (original)
+++ lucene/hadoop/trunk/CHANGES.txt Thu Jan 17 21:23:30 2008
@@ -503,6 +503,9 @@
     upgrade from a pre-0.16 install of HDFS.
     (Hairong Kuang via dhruba)
 
+    HADOOP-290. A DataNode log message now prints the target of a replication
+    request correctly. (dhruba)
+
 Release 0.15.3 - 2008-01-18
 
   BUG FIXES

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DataNode.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DataNode.java?rev=613058&r1=613057&r2=613058&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DataNode.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DataNode.java Thu Jan 17 21:23:30 2008
@@ -833,8 +833,21 @@
                              errStr);
         break;
       }
-      if (xferTargets[i].length > 0) {
-        LOG.info(dnRegistration + " Starting thread to transfer block " + blocks[i] + " to
" + xferTargets[i][0].getName());
+      int numTargets = xferTargets[i].length;
+      if (numTargets > 0) {
+        if (LOG.isInfoEnabled()) {
+          StringBuilder xfersBuilder = new StringBuilder();
+          for (int j = 0; j < numTargets; j++) {
+            DatanodeInfo nodeInfo = xferTargets[i][j];
+            xfersBuilder.append(nodeInfo.getName());
+            if (j < (numTargets - 1)) {
+              xfersBuilder.append(", ");
+            }
+          }
+          String xfersTo = xfersBuilder.toString();
+          LOG.info(dnRegistration + " Starting thread to transfer block " + 
+                   blocks[i] + " to " + xfersTo);                       
+        }
         new Daemon(new DataTransfer(xferTargets[i], blocks[i])).start();
       }
     }



Mime
View raw message