From de34fc148ca4785c2ae7204df15096b955e671c4 Mon Sep 17 00:00:00 2001 From: Weiwei Yang Date: Tue, 22 Jan 2019 12:01:08 +0800 Subject: [PATCH] HDFS-14207. ZKFC should catch exception when ha configuration missing. Contributed by Fei Hui. --- .../org/apache/hadoop/hdfs/tools/DFSZKFailoverController.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 96723da7c70..be17f24d757 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 @@ -189,9 +189,9 @@ public class DFSZKFailoverController extends ZKFailoverController { 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 "