hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dhr...@apache.org
Subject svn commit: r641990 - in /hadoop/core/trunk: CHANGES.txt src/java/org/apache/hadoop/dfs/FSNamesystem.java src/java/org/apache/hadoop/mapred/JobTracker.java
Date Thu, 27 Mar 2008 21:23:31 GMT
Author: dhruba
Date: Thu Mar 27 14:23:29 2008
New Revision: 641990

URL: http://svn.apache.org/viewvc?rev=641990&view=rev
Log:
HADOOP-3065. Better logging message if the rack location of a datanode
cannot be determined.  (Devaraj Das via dhruba)


Modified:
    hadoop/core/trunk/CHANGES.txt
    hadoop/core/trunk/src/java/org/apache/hadoop/dfs/FSNamesystem.java
    hadoop/core/trunk/src/java/org/apache/hadoop/mapred/JobTracker.java

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=641990&r1=641989&r2=641990&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Thu Mar 27 14:23:29 2008
@@ -392,6 +392,9 @@
     HADOOP-2982. Fixes a problem in the way HOD looks for free nodes.
     (Hemanth Yamijala via ddas)
 
+    HADOOP-3065. Better logging message if the rack location of a datanode
+    cannot be determined.  (Devaraj Das via dhruba)
+
 Release 0.16.2 - Unreleased
 
   BUG FIXES

Modified: hadoop/core/trunk/src/java/org/apache/hadoop/dfs/FSNamesystem.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/java/org/apache/hadoop/dfs/FSNamesystem.java?rev=641990&r1=641989&r2=641990&view=diff
==============================================================================
--- hadoop/core/trunk/src/java/org/apache/hadoop/dfs/FSNamesystem.java (original)
+++ hadoop/core/trunk/src/java/org/apache/hadoop/dfs/FSNamesystem.java Thu Mar 27 14:23:29
2008
@@ -1910,7 +1910,12 @@
           }
           List<String> rName = dnsToSwitchMapping.resolve(dnHosts);
           if (rName == null) {
-            continue;
+            LOG.error("The resolve call returned null! Using " + 
+                NetworkTopology.DEFAULT_RACK + " for some hosts");
+            rName = new ArrayList<String>(dnHosts.size());
+            for (int i = 0; i < dnHosts.size(); i++) {
+              rName.add(NetworkTopology.DEFAULT_RACK);
+            }
           }
           int i = 0;
           for (String m : rName) {
@@ -2689,6 +2694,8 @@
     }
     
     if (node.getNetworkLocation().equals(NetworkTopology.UNRESOLVED)) {
+      LOG.info("Ignoring block report from " + nodeID.getName() + 
+          " because rack location for this datanode is still to be resolved."); 
       return null; //drop the block report if the dn hasn't been resolved
     }
 

Modified: hadoop/core/trunk/src/java/org/apache/hadoop/mapred/JobTracker.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/java/org/apache/hadoop/mapred/JobTracker.java?rev=641990&r1=641989&r2=641990&view=diff
==============================================================================
--- hadoop/core/trunk/src/java/org/apache/hadoop/mapred/JobTracker.java (original)
+++ hadoop/core/trunk/src/java/org/apache/hadoop/mapred/JobTracker.java Thu Mar 27 14:23:29
2008
@@ -1468,7 +1468,12 @@
           }
           List<String> rName = dnsToSwitchMapping.resolve(dnHosts);
           if (rName == null) {
-            continue;
+            LOG.error("The resolve call returned null! Using " + 
+                NetworkTopology.DEFAULT_RACK + " for some hosts");
+            rName = new ArrayList<String>(dnHosts.size());
+            for (int i = 0; i < dnHosts.size(); i++) {
+              rName.add(NetworkTopology.DEFAULT_RACK);
+            }
           }
           int i = 0;
           for (String m : rName) {



Mime
View raw message