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

(cherry picked from commit 7105ebaa9f)
This commit is contained in:
Andrew Wang 2015-02-24 15:31:13 -08:00
parent 5f0d1f10db
commit efb7e287f4
2 changed files with 10 additions and 2 deletions

View File

@ -720,6 +720,9 @@ Release 2.7.0 - UNRELEASED
HDFS-7831. Fix the starting index and end condition of the loop in HDFS-7831. Fix the starting index and end condition of the loop in
FileDiffList.findEarlierSnapshotBlocks(). (Konstantin Shvachko via jing9) 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 BREAKDOWN OF HDFS-7584 SUBTASKS AND RELATED JIRAS
HDFS-7720. Quota by Storage Type API, tools and ClientNameNode HDFS-7720. Quota by Storage Type API, tools and ClientNameNode

View File

@ -176,8 +176,13 @@ public class DFSZKFailoverController extends ZKFailoverController {
new HdfsConfiguration(), args); new HdfsConfiguration(), args);
DFSZKFailoverController zkfc = DFSZKFailoverController.create( DFSZKFailoverController zkfc = DFSZKFailoverController.create(
parser.getConfiguration()); parser.getConfiguration());
int retCode = 0;
System.exit(zkfc.run(parser.getRemainingArgs())); try {
retCode = zkfc.run(parser.getRemainingArgs());
} catch (Throwable t) {
LOG.fatal("Got a fatal error, exiting now", t);
}
System.exit(retCode);
} }
@Override @Override