HDFS-11751. DFSZKFailoverController daemon exits with wrong status code. Contributed by Bharat Viswanadham

(cherry picked from commit 6d16a99ae8821c13eec90132e2c63a96fce4b08a)
This commit is contained in:
Brahma Reddy Battula 2017-12-05 19:53:46 +05:30
parent 05fda24b1b
commit ceb4043ae1

View File

@ -19,6 +19,7 @@
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;
@ -188,14 +189,13 @@ public static void main(String args[])
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