HDFS-14207. ZKFC should catch exception when ha configuration missing. Contributed by Fei Hui.

This commit is contained in:
Weiwei Yang 2019-01-22 12:01:08 +08:00
parent d43df31751
commit de34fc148c

View File

@ -189,9 +189,9 @@ public static void main(String args[])
GenericOptionsParser parser = new GenericOptionsParser(
new HdfsConfiguration(), args);
DFSZKFailoverController zkfc = DFSZKFailoverController.create(
parser.getConfiguration());
try {
DFSZKFailoverController zkfc = DFSZKFailoverController.create(
parser.getConfiguration());
System.exit(zkfc.run(parser.getRemainingArgs()));
} catch (Throwable t) {
LOG.error("DFSZKFailOverController exiting due to earlier exception "