HDFS-7763. fix zkfc hung issue due to not catching exception in a corner case. Contributed by Liang Xie.

This commit is contained in:
Andrew Wang 2015-02-24 15:31:13 -08:00
parent 9a37247a67
commit 7105ebaa9f
2 changed files with 10 additions and 2 deletions

View File

@ -1020,6 +1020,9 @@ Release 2.7.0 - UNRELEASED
HDFS-7831. Fix the starting index and end condition of the loop in
FileDiffList.findEarlierSnapshotBlocks(). (Konstantin Shvachko via jing9)
HDFS-7763. fix zkfc hung issue due to not catching exception in a corner
case. (Liang Xie via wang)
BREAKDOWN OF HDFS-7584 SUBTASKS AND RELATED JIRAS
HDFS-7720. Quota by Storage Type API, tools and ClientNameNode

View File

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