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)
(cherry picked from commit fd70e4db105e140fc3d60042abb3f598c9afd13f)
This commit is contained in:
Andrew Wang 2015-02-24 15:31:13 -08:00 committed by Vinod Kumar Vavilapalli
parent be4d4c9cbf
commit 406ec495bb
2 changed files with 10 additions and 2 deletions

View File

@ -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

View File

@ -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