hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cdoug...@apache.org
Subject svn commit: r677056 - in /hadoop/core/branches/branch-0.17: CHANGES.txt src/java/org/apache/hadoop/dfs/DataNode.java
Date Tue, 15 Jul 2008 21:37:18 GMT
Author: cdouglas
Date: Tue Jul 15 14:37:18 2008
New Revision: 677056

URL: http://svn.apache.org/viewvc?rev=677056&view=rev
Log:
HADOOP-3758. Shutdown datanode on version mismatch instead of retrying
continuously, preventing excessive logging at the namenode. Contributed by
lohit vijayarenu.

Modified:
    hadoop/core/branches/branch-0.17/CHANGES.txt
    hadoop/core/branches/branch-0.17/src/java/org/apache/hadoop/dfs/DataNode.java

Modified: hadoop/core/branches/branch-0.17/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.17/CHANGES.txt?rev=677056&r1=677055&r2=677056&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.17/CHANGES.txt (original)
+++ hadoop/core/branches/branch-0.17/CHANGES.txt Tue Jul 15 14:37:18 2008
@@ -15,6 +15,10 @@
 
     HADOOP-3685. Unbalanced replication target. (hairong)
 
+    HADOOP-3758. Shutdown datanode on version mismatch instead of retrying
+    continuously, preventing excessive logging at the namenode.
+    (lohit vijayarenu via cdouglas)
+
 Release 0.17.1 - 2008-06-23
 
   INCOMPATIBLE CHANGES

Modified: hadoop/core/branches/branch-0.17/src/java/org/apache/hadoop/dfs/DataNode.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.17/src/java/org/apache/hadoop/dfs/DataNode.java?rev=677056&r1=677055&r2=677056&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.17/src/java/org/apache/hadoop/dfs/DataNode.java (original)
+++ hadoop/core/branches/branch-0.17/src/java/org/apache/hadoop/dfs/DataNode.java Tue Jul
15 14:37:18 2008
@@ -30,6 +30,7 @@
 import org.apache.hadoop.util.*;
 import org.apache.hadoop.util.DiskChecker.DiskErrorException;
 import org.apache.hadoop.util.DiskChecker.DiskOutOfSpaceException;
+import org.apache.hadoop.dfs.IncorrectVersionException;
 import org.apache.hadoop.mapred.StatusHttpServer;
 import org.apache.hadoop.dfs.BlockCommand;
 import org.apache.hadoop.dfs.DatanodeProtocol;
@@ -609,6 +610,7 @@
           // -- Total capacity
           // -- Bytes remaining
           //
+          lastHeartbeat = startTime;
           DatanodeCommand cmd = namenode.sendHeartbeat(dnRegistration,
                                                        data.getCapacity(),
                                                        data.getDfsUsed(),
@@ -617,7 +619,6 @@
                                                        getXceiverCount());
           myMetrics.heartbeats.inc(now() - startTime);
           //LOG.info("Just sent heartbeat, with name " + localName);
-          lastHeartbeat = startTime;
           if (!processCommand(cmd))
             continue;
         }
@@ -699,7 +700,8 @@
       } catch(RemoteException re) {
         String reClass = re.getClassName();
         if (UnregisteredDatanodeException.class.getName().equals(reClass) ||
-            DisallowedDatanodeException.class.getName().equals(reClass)) {
+            DisallowedDatanodeException.class.getName().equals(reClass) ||
+            IncorrectVersionException.class.getName().equals(reClass)) {
           LOG.warn("DataNode is shutting down: " + 
                    StringUtils.stringifyException(re));
           shutdown();



Mime
View raw message