hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s..@apache.org
Subject [1/4] hadoop git commit: HDFS-2580. NameNode#main(...) can make use of GenericOptionsParser. Contributed by harsh. (harsh)
Date Tue, 03 May 2016 00:55:57 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 5f46076f2 -> 89c00da61
  refs/heads/branch-2.6 fffa13b2d -> 916f94913
  refs/heads/branch-2.7 6347f8f4d -> d490cfc42
  refs/heads/branch-2.8 1207cf1cf -> cf6efcceb


HDFS-2580. NameNode#main(...) can make use of GenericOptionsParser. Contributed by harsh.
(harsh)

(cherry picked from commit 54e612bfb9f877e58f7f153c43cb4147876826d3)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/916f9491
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/916f9491
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/916f9491

Branch: refs/heads/branch-2.6
Commit: 916f949131afa2d6f20bf654f5fde40377c5f618
Parents: fffa13b
Author: Harsh J <harsh@apache.org>
Authored: Sat Sep 1 19:22:11 2012 +0000
Committer: Konstantin V Shvachko <shv@apache.org>
Committed: Mon May 2 17:50:30 2016 -0700

----------------------------------------------------------------------
 .../java/org/apache/hadoop/hdfs/server/namenode/NameNode.java   | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/916f9491/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java
index f1e3868..95370a1 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java
@@ -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);


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message