hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s..@apache.org
Subject [4/4] hadoop git commit: HDFS-2580. NameNode#main(...) can make use of GenericOptionsParser. Contributed by harsh. (harsh)
Date Tue, 03 May 2016 00:56:00 GMT
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/89c00da6
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/89c00da6
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/89c00da6

Branch: refs/heads/branch-2
Commit: 89c00da611dbbc635f7798ed05db16b84b0a1f97
Parents: 5f46076
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:54:31 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/89c00da6/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 de63bc8..3d2fbda 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
@@ -80,6 +80,7 @@ import org.apache.hadoop.tracing.TraceAdminProtocol;
 import org.apache.hadoop.tracing.TraceUtils;
 import org.apache.hadoop.tracing.TracerConfigurationManager;
 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;
@@ -1556,6 +1557,10 @@ public class NameNode extends ReconfigurableBase implements
     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