hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aengin...@apache.org
Subject [14/33] hadoop git commit: HADOOP-14108. CLI MiniCluster: add an option to specify NameNode HTTP port. Contributed by Takanobu Asanuma.
Date Wed, 08 Mar 2017 23:46:12 GMT
HADOOP-14108. CLI MiniCluster: add an option to specify NameNode HTTP port. Contributed by
Takanobu Asanuma.


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

Branch: refs/heads/HDFS-7240
Commit: 28529e52045236282cb53d09751aef9b5cc542e5
Parents: b13878c
Author: Akira Ajisaka <aajisaka@apache.org>
Authored: Tue Mar 7 01:32:47 2017 +0900
Committer: Anu Engineer <aengineer@apache.org>
Committed: Wed Mar 8 15:33:58 2017 -0800

----------------------------------------------------------------------
 .../hadoop-common/src/site/markdown/CLIMiniCluster.md.vm      | 1 +
 .../org/apache/hadoop/mapreduce/MiniHadoopClusterManager.java | 7 ++++++-
 2 files changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/28529e52/hadoop-common-project/hadoop-common/src/site/markdown/CLIMiniCluster.md.vm
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/site/markdown/CLIMiniCluster.md.vm b/hadoop-common-project/hadoop-common/src/site/markdown/CLIMiniCluster.md.vm
index 74c2414..806df0a 100644
--- a/hadoop-common-project/hadoop-common/src/site/markdown/CLIMiniCluster.md.vm
+++ b/hadoop-common-project/hadoop-common/src/site/markdown/CLIMiniCluster.md.vm
@@ -55,6 +55,7 @@ There are a number of command line arguments that the users can use to control
w
     $ -namenode <arg>        URL of the namenode (default is either the DFS
     $                        cluster or a temporary dir)
     $ -nnport <arg>          NameNode port (default 0--we choose)
+    $ -nnhttpport <arg>      NameNode HTTP port (default 0--we choose)
     $ -nodemanagers <arg>    How many nodemanagers to start (default 1)
     $ -nodfs                 Don't start a mini DFS cluster
     $ -nomr                  Don't start a mini MR cluster

http://git-wip-us.apache.org/repos/asf/hadoop/blob/28529e52/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/MiniHadoopClusterManager.java
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/MiniHadoopClusterManager.java
b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/MiniHadoopClusterManager.java
index 3cc73b5..324f0ca 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/MiniHadoopClusterManager.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/MiniHadoopClusterManager.java
@@ -69,6 +69,7 @@ public class MiniHadoopClusterManager {
   private int numNodeManagers;
   private int numDataNodes;
   private int nnPort;
+  private int nnHttpPort;
   private int rmPort;
   private int jhsPort;
   private StartupOption dfsOpts;
@@ -92,6 +93,8 @@ public class MiniHadoopClusterManager {
         .addOption("datanodes", true, "How many datanodes to start (default 1)")
         .addOption("format", false, "Format the DFS (default false)")
         .addOption("nnport", true, "NameNode port (default 0--we choose)")
+        .addOption("nnhttpport", true,
+            "NameNode HTTP port (default 0--we choose)")
         .addOption(
             "namenode",
             true,
@@ -152,7 +155,8 @@ public class MiniHadoopClusterManager {
       URISyntaxException {
     if (!noDFS) {
       dfs = new MiniDFSCluster.Builder(conf).nameNodePort(nnPort)
-          .numDataNodes(numDataNodes).startupOption(dfsOpts).build();
+          .nameNodeHttpPort(nnHttpPort).numDataNodes(numDataNodes)
+          .startupOption(dfsOpts).build();
       LOG.info("Started MiniDFSCluster -- namenode on port "
           + dfs.getNameNodePort());
     }
@@ -254,6 +258,7 @@ public class MiniHadoopClusterManager {
     noDFS = cli.hasOption("nodfs");
     numDataNodes = intArgument(cli, "datanodes", 1);
     nnPort = intArgument(cli, "nnport", 0);
+    nnHttpPort = intArgument(cli, "nnhttpport", 0);
     dfsOpts = cli.hasOption("format") ? StartupOption.FORMAT
         : StartupOption.REGULAR;
 


---------------------------------------------------------------------
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