HDFS-8639. Add Option for NameNode HTTP port in MiniDFSClusterManager. Contributed by Kai Sasaki.
This commit is contained in:
parent
49dfad9429
commit
2ba6465721
|
@ -663,6 +663,9 @@ Release 2.8.0 - UNRELEASED
|
||||||
HDFS-6564. Use slf4j instead of common-logging in hdfs-client.
|
HDFS-6564. Use slf4j instead of common-logging in hdfs-client.
|
||||||
(Rakesh R via wheat9)
|
(Rakesh R via wheat9)
|
||||||
|
|
||||||
|
HDFS-8639. Add Option for NameNode HTTP port in MiniDFSClusterManager.
|
||||||
|
(Kai Sasaki via jing9)
|
||||||
|
|
||||||
OPTIMIZATIONS
|
OPTIMIZATIONS
|
||||||
|
|
||||||
HDFS-8026. Trace FSOutputSummer#writeChecksumChunks rather than
|
HDFS-8026. Trace FSOutputSummer#writeChecksumChunks rather than
|
||||||
|
|
|
@ -65,6 +65,7 @@ public class MiniDFSClusterManager {
|
||||||
private String writeDetails;
|
private String writeDetails;
|
||||||
private int numDataNodes;
|
private int numDataNodes;
|
||||||
private int nameNodePort;
|
private int nameNodePort;
|
||||||
|
private int nameNodeHttpPort;
|
||||||
private StartupOption dfsOpts;
|
private StartupOption dfsOpts;
|
||||||
private String writeConfig;
|
private String writeConfig;
|
||||||
private Configuration conf;
|
private Configuration conf;
|
||||||
|
@ -84,6 +85,7 @@ public class MiniDFSClusterManager {
|
||||||
.addOption("cmdport", true,
|
.addOption("cmdport", true,
|
||||||
"Which port to listen on for commands (default 0--we choose)")
|
"Which port to listen on for commands (default 0--we choose)")
|
||||||
.addOption("nnport", true, "NameNode port (default 0--we choose)")
|
.addOption("nnport", true, "NameNode port (default 0--we choose)")
|
||||||
|
.addOption("httpport", true, "NameNode http port (default 0--we choose)")
|
||||||
.addOption("namenode", true, "URL of the namenode (default "
|
.addOption("namenode", true, "URL of the namenode (default "
|
||||||
+ "is either the DFS cluster or a temporary dir)")
|
+ "is either the DFS cluster or a temporary dir)")
|
||||||
.addOption(OptionBuilder
|
.addOption(OptionBuilder
|
||||||
|
@ -137,6 +139,7 @@ public class MiniDFSClusterManager {
|
||||||
*/
|
*/
|
||||||
public void start() throws IOException, FileNotFoundException {
|
public void start() throws IOException, FileNotFoundException {
|
||||||
dfs = new MiniDFSCluster.Builder(conf).nameNodePort(nameNodePort)
|
dfs = new MiniDFSCluster.Builder(conf).nameNodePort(nameNodePort)
|
||||||
|
.nameNodeHttpPort(nameNodeHttpPort)
|
||||||
.numDataNodes(numDataNodes)
|
.numDataNodes(numDataNodes)
|
||||||
.startupOption(dfsOpts)
|
.startupOption(dfsOpts)
|
||||||
.format(format)
|
.format(format)
|
||||||
|
@ -198,6 +201,7 @@ public class MiniDFSClusterManager {
|
||||||
// HDFS
|
// HDFS
|
||||||
numDataNodes = intArgument(cli, "datanodes", 1);
|
numDataNodes = intArgument(cli, "datanodes", 1);
|
||||||
nameNodePort = intArgument(cli, "nnport", 0);
|
nameNodePort = intArgument(cli, "nnport", 0);
|
||||||
|
nameNodeHttpPort = intArgument(cli, "httpport", 0);
|
||||||
if (cli.hasOption("format")) {
|
if (cli.hasOption("format")) {
|
||||||
dfsOpts = StartupOption.FORMAT;
|
dfsOpts = StartupOption.FORMAT;
|
||||||
format = true;
|
format = true;
|
||||||
|
|
Loading…
Reference in New Issue