ayushtkn commented on code in PR #6894:
URL: https://github.com/apache/hadoop/pull/6894#discussion_r1666384647
##########
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNNThroughputBenchmark.java:
##########
@@ -246,4 +246,25 @@ public void testNNThroughputWithBaseDir() throws Exception
{
}
}
}
+
+ /**
+ * This test runs {@link NNThroughputBenchmark} against a mini DFS cluster
+ * for blockSize with letter suffix.
+ */
+ @Test(timeout = 120000)
+ public void testNNThroughputForBlockSizeWithLetterSuffix() throws Exception {
+ final Configuration conf = new HdfsConfiguration();
+ conf.setInt(DFSConfigKeys.DFS_NAMENODE_MIN_BLOCK_SIZE_KEY, 16);
+ conf.set(DFSConfigKeys.DFS_BLOCK_SIZE_KEY, "1m");
+ try (MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).
+ numDataNodes(3).build()) {
Review Comment:
no need of ``numDataNodes(3)``, you don't need 3 datanodes, you will have 1
by default
##########
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNNThroughputBenchmark.java:
##########
@@ -246,4 +246,25 @@ public void testNNThroughputWithBaseDir() throws Exception
{
}
}
}
+
+ /**
+ * This test runs {@link NNThroughputBenchmark} against a mini DFS cluster
+ * for blockSize with letter suffix.
+ */
+ @Test(timeout = 120000)
+ public void testNNThroughputForBlockSizeWithLetterSuffix() throws Exception {
+ final Configuration conf = new HdfsConfiguration();
+ conf.setInt(DFSConfigKeys.DFS_NAMENODE_MIN_BLOCK_SIZE_KEY, 16);
+ conf.set(DFSConfigKeys.DFS_BLOCK_SIZE_KEY, "1m");
+ try (MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).
+ numDataNodes(3).build()) {
+ cluster.waitActive();
+ final Configuration benchConf = new HdfsConfiguration();
+ benchConf.setLong(DFSConfigKeys.DFS_NAMENODE_MIN_BLOCK_SIZE_KEY, 16);
+ benchConf.set(DFSConfigKeys.DFS_BLOCK_SIZE_KEY, "1m");
+ FileSystem.setDefaultUri(benchConf, cluster.getURI());
+ NNThroughputBenchmark.runBenchmark(benchConf,
+ new String[]{"-op", "create", "-keepResults", "-files", "3",
"-close"});
Review Comment:
Should add a case where blockSize is specified as an argument
--
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]