jianghuazhu commented on a change in pull request #3544: URL: https://github.com/apache/hadoop/pull/3544#discussion_r739952380
########## File path: hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNNThroughputBenchmark.java ########## @@ -166,4 +166,25 @@ public void testNNThroughputForAppendOp() throws Exception { } } } + + /** + * This test runs {@link NNThroughputBenchmark} against a mini DFS cluster + * for block report operation. + */ + @Test(timeout = 120000) + public void testNNThroughputForBlockReportOp() throws Exception { + final Configuration conf = new HdfsConfiguration(); + conf.setInt(DFSConfigKeys.DFS_NAMENODE_MIN_BLOCK_SIZE_KEY, 16); + conf.setInt(DFSConfigKeys.DFS_BLOCK_SIZE_KEY, 16); + try (MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf). + numDataNodes(3).build()) { + cluster.waitActive(); + final Configuration benchConf = new HdfsConfiguration(); + benchConf.setInt(DFSConfigKeys.DFS_NAMENODE_MIN_BLOCK_SIZE_KEY, 16); + benchConf.setInt(DFSConfigKeys.DFS_BLOCK_SIZE_KEY, 16); + NNThroughputBenchmark.runBenchmark(benchConf, + new String[]{"-fs", cluster.getURI().toString(), "-op", + "blockReport", "-datanodes", "3", "-reports", "2"}); Review comment: Sorry, the information shown here cannot fully demonstrate my thoughts. I will submit some updates. ![image](https://user-images.githubusercontent.com/6416939/139640085-b474b30b-a117-453e-bc90-520074b5b9b3.png) -- 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: common-issues-unsubscr...@hadoop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org