ayushtkn commented on code in PR #6319:
URL: https://github.com/apache/hadoop/pull/6319#discussion_r1413157796
##########
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/NNThroughputBenchmark.java:
##########
@@ -1348,7 +1363,7 @@ class ReplicationStats extends OperationStatsBase {
static final String OP_REPLICATION_USAGE =
"-op replication [-datanodes T] [-nodesToDecommission D] " +
"[-nodeReplicationLimit C] [-totalBlocks B] [-blockSize S] "
- + "[-replication R]";
+ + "[-replication R] [-baseDirName N]";
Review Comment:
somewhere us baseDirName D and here it is baseDirName N
Shouldn't be inconsistent I believe
##########
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/NNThroughputBenchmark.java:
##########
@@ -736,7 +746,7 @@ class OpenFileStats extends CreateFileStats {
static final String OP_OPEN_NAME = "open";
static final String OP_USAGE_ARGS =
" [-threads T] [-files N] [-blockSize S] [-filesPerDir P]"
- + " [-useExisting]";
+ + " [-baseDirName D] [-useExisting]";
Review Comment:
add the new parameter towards the end
##########
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNNThroughputBenchmark.java:
##########
@@ -60,6 +60,18 @@ public void testNNThroughput() throws Exception {
NNThroughputBenchmark.runBenchmark(conf, new String[] {"-op", "all"});
}
+ @Test
+ public void testNNThroughputWithBaseDir() throws Exception {
+ Configuration conf = new HdfsConfiguration();
+ conf.setInt(DFSConfigKeys.DFS_BLOCK_SIZE_KEY, 16);
+ File nameDir = new File(MiniDFSCluster.getBaseDirectory(), "name");
+ conf.set(DFSConfigKeys.DFS_NAMENODE_NAME_DIR_KEY,
+ nameDir.getAbsolutePath());
+ DFSTestUtil.formatNameNode(conf);
+ NNThroughputBenchmark.runBenchmark(conf,
+ new String[] {"-op", "all", "-baseDirName",
"/nnThroughputBenchmark1"});
Review Comment:
test should check ``nnThroughputBenchmark1 `` was used & the default
directory wasn't created nor used.
try with other operations as well apart from ``all``
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]