hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yjzhan...@apache.org
Subject hadoop git commit: HDFS-9181. Better handling of exceptions thrown during upgrade shutdown. Contributed by Wei-Chiu Chuang.
Date Fri, 09 Oct 2015 16:31:28 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 2d8f9e3fd -> 61988f801


HDFS-9181. Better handling of exceptions thrown during upgrade shutdown. Contributed by Wei-Chiu
Chuang.

(cherry picked from commit c11fc8a1be222f870cded0b24736387e44cc788c)


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

Branch: refs/heads/branch-2
Commit: 61988f80167f3c97b940c7cfa1fd78175b70ebd3
Parents: 2d8f9e3
Author: Yongjun Zhang <yzhang@cloudera.com>
Authored: Fri Oct 9 09:21:29 2015 -0700
Committer: Yongjun Zhang <yzhang@cloudera.com>
Committed: Fri Oct 9 09:24:37 2015 -0700

----------------------------------------------------------------------
 hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt                  | 3 +++
 .../org/apache/hadoop/hdfs/server/datanode/DataNode.java     | 3 ++-
 .../apache/hadoop/hdfs/server/datanode/TestDataNodeExit.java | 8 ++++----
 3 files changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/61988f80/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 97a50bc..290c5ef 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -676,6 +676,9 @@ Release 2.8.0 - UNRELEASED
     HDFS-8164. cTime is 0 in VERSION file for newly formatted NameNode.
     (Xiao Chen via Yongjun Zhang)
 
+    HDFS-9181. Better handling of exceptions thrown during upgrade shutdown.
+    (Wei-Chiu Chuang via Yongjun Zhang)
+
   OPTIMIZATIONS
 
     HDFS-8026. Trace FSOutputSummer#writeChecksumChunks rather than

http://git-wip-us.apache.org/repos/asf/hadoop/blob/61988f80/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java
index b9be20e..e0e8de5 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java
@@ -1765,8 +1765,9 @@ public class DataNode extends ReconfigurableBase
         xserver.sendOOBToPeers();
         ((DataXceiverServer) this.dataXceiverServer.getRunnable()).kill();
         this.dataXceiverServer.interrupt();
-      } catch (Throwable e) {
+      } catch (Exception e) {
         // Ignore, since the out of band messaging is advisory.
+        LOG.trace("Exception interrupting DataXceiverServer: ", e);
       }
     }
 

http://git-wip-us.apache.org/repos/asf/hadoop/blob/61988f80/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDataNodeExit.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDataNodeExit.java
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDataNodeExit.java
index da98d26..7a15b85 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDataNodeExit.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDataNodeExit.java
@@ -96,13 +96,13 @@ public class TestDataNodeExit {
   public void testSendOOBToPeers() throws Exception {
     DataNode dn = cluster.getDataNodes().get(0);
     DataXceiverServer spyXserver = Mockito.spy(dn.getXferServer());
-    NullPointerException e = new NullPointerException();
-    Mockito.doThrow(e).when(spyXserver).sendOOBToPeers();
+    NullPointerException npe = new NullPointerException();
+    Mockito.doThrow(npe).when(spyXserver).sendOOBToPeers();
     dn.xserver = spyXserver;
     try {
       dn.shutdown();
-    } catch (Throwable t) {
-      fail("DataNode shutdown should not have thrown exception " + t);
+    } catch (Exception e) {
+      fail("DataNode shutdown should not have thrown exception " + e);
     }
   }
 }


Mime
View raw message