diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 3731fe9ebcc..09122f98232 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -79,6 +79,9 @@ Release 2.6.1 - UNRELEASED HDFS-7009. Active NN and standby NN have different live nodes. (Ming Ma via cnauroth) + HDFS-7763. fix zkfc hung issue due to not catching exception in a corner + case. (Liang Xie via wang) + Release 2.6.0 - 2014-11-18 INCOMPATIBLE CHANGES 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 a42b1e31895..85f77f1b7d1 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 static void main(String args[]) 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