From 2253a86a3f4cdfaf2dcd1c2ac7eeddef651c6c97 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. (cherry picked from commit de34fc148ca4785c2ae7204df15096b955e671c4) --- .../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 5ae535a2c4f..88a208efd81 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 "