|
@@ -63,6 +63,7 @@ import org.apache.hadoop.tools.GetUserMappingsProtocol;
|
|
|
import org.apache.hadoop.tracing.SpanReceiverHost;
|
|
|
import org.apache.hadoop.tracing.TraceAdminProtocol;
|
|
|
import org.apache.hadoop.util.ExitUtil.ExitException;
|
|
|
+import org.apache.hadoop.util.GenericOptionsParser;
|
|
|
import org.apache.hadoop.util.JvmPauseMonitor;
|
|
|
import org.apache.hadoop.util.ServicePlugin;
|
|
|
import org.apache.hadoop.util.StringUtils;
|
|
@@ -1370,6 +1371,10 @@ public class NameNode implements NameNodeStatusMXBean {
|
|
|
LOG.info("createNameNode " + Arrays.asList(argv));
|
|
|
if (conf == null)
|
|
|
conf = new HdfsConfiguration();
|
|
|
+ // Parse out some generic args into Configuration.
|
|
|
+ GenericOptionsParser hParser = new GenericOptionsParser(conf, argv);
|
|
|
+ argv = hParser.getRemainingArgs();
|
|
|
+ // Parse the rest, NN specific args.
|
|
|
StartupOption startOpt = parseArguments(argv);
|
|
|
if (startOpt == null) {
|
|
|
printUsage(System.err);
|