HDFS-11751. DFSZKFailoverController daemon exits with wrong status code. Contributed by Bharat Viswanadham
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/6d16a99a Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/6d16a99a Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/6d16a99a Branch: refs/heads/HDFS-7240 Commit: 6d16a99ae8821c13eec90132e2c63a96fce4b08a Parents: 99ccca3 Author: Brahma Reddy Battula <[email protected]> Authored: Tue Dec 5 19:53:46 2017 +0530 Committer: Brahma Reddy Battula <[email protected]> Committed: Tue Dec 5 19:53:46 2017 +0530 ---------------------------------------------------------------------- .../org/apache/hadoop/hdfs/tools/DFSZKFailoverController.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/6d16a99a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSZKFailoverController.java ---------------------------------------------------------------------- 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 a454d73..e0a4f70 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 @@ -19,6 +19,7 @@ package org.apache.hadoop.hdfs.tools; import static org.apache.hadoop.hdfs.DFSConfigKeys.DFS_NAMENODE_KEYTAB_FILE_KEY; import static org.apache.hadoop.hdfs.DFSConfigKeys.DFS_NAMENODE_KERBEROS_PRINCIPAL_KEY; +import static org.apache.hadoop.util.ExitUtil.terminate; import java.io.ByteArrayOutputStream; import java.io.IOException; @@ -190,14 +191,13 @@ public class DFSZKFailoverController extends ZKFailoverController { new HdfsConfiguration(), args); DFSZKFailoverController zkfc = DFSZKFailoverController.create( parser.getConfiguration()); - int retCode = 0; try { - retCode = zkfc.run(parser.getRemainingArgs()); + System.exit(zkfc.run(parser.getRemainingArgs())); } catch (Throwable t) { LOG.fatal("DFSZKFailOverController exiting due to earlier exception " + t); + terminate(1, t); } - System.exit(retCode); } @Override --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
