hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sj...@apache.org
Subject [18/43] hadoop git commit: HDFS-7763. fix zkfc hung issue due to not catching exception in a corner case. Contributed by Liang Xie.
Date Fri, 14 Aug 2015 07:18:04 GMT
HDFS-7763. fix zkfc hung issue due to not catching exception in a corner case. Contributed
by Liang Xie.

(cherry picked from commit 7105ebaa9f370db04962a1e19a67073dc080433b)
(cherry picked from commit efb7e287f45c6502f293456034a37d9209a917be)


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

Branch: refs/heads/sjlee/hdfs-merge
Commit: fd70e4db105e140fc3d60042abb3f598c9afd13f
Parents: d5ddc34
Author: Andrew Wang <wang@apache.org>
Authored: Tue Feb 24 15:31:13 2015 -0800
Committer: Sangjin Lee <sjlee@apache.org>
Committed: Wed Aug 12 23:25:12 2015 -0700

----------------------------------------------------------------------
 .../apache/hadoop/hdfs/tools/DFSZKFailoverController.java   | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/fd70e4db/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSZKFailoverController.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSZKFailoverController.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSZKFailoverController.java
index a42b1e3..85f77f1 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSZKFailoverController.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSZKFailoverController.java
@@ -176,8 +176,13 @@ public class DFSZKFailoverController extends ZKFailoverController {
         new HdfsConfiguration(), args);
     DFSZKFailoverController zkfc = DFSZKFailoverController.create(
         parser.getConfiguration());
-    
-    System.exit(zkfc.run(parser.getRemainingArgs()));
+    int retCode = 0;
+    try {
+      retCode = zkfc.run(parser.getRemainingArgs());
+    } catch (Throwable t) {
+      LOG.fatal("Got a fatal error, exiting now", t);
+    }
+    System.exit(retCode);
   }
 
   @Override


Mime
View raw message