haiyang1987 commented on code in PR #5877: URL: https://github.com/apache/hadoop/pull/5877#discussion_r1274547701
########## hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/metrics/NamenodeBeanMetrics.java: ########## @@ -884,6 +884,11 @@ public int getPendingSPSPaths() { return 0; } + @Override + public double getReconstructionQueuesInitProgress() { Review Comment: Hi Sir, thanks for your suggestion. I think the reconstructionQueuesInitProgress is enough to use float, here is just to get a percentage progress, maybe don't need higher precision, i will update it later. ########## hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFSNamesystemMBean.java: ########## @@ -225,4 +229,44 @@ public void testFsEditLogMetrics() throws Exception { } } } + + /** + * Test metrics associated with reconstructionQueuesInitProgress. + */ + @Test + public void testReconstructionQueuesInitProgressMetrics() throws Exception { + Configuration conf = new Configuration(); + try (MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).numDataNodes(1).build()) { + cluster.waitActive(); + final FSNamesystem fsNamesystem = cluster.getNamesystem(); + final DistributedFileSystem fs = cluster.getFileSystem(); + + // validate init reconstructionQueuesInitProgress value. Review Comment: yeah, i will update later. ########## hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFSNamesystemMBean.java: ########## @@ -225,4 +229,44 @@ public void testFsEditLogMetrics() throws Exception { } } } + + /** + * Test metrics associated with reconstructionQueuesInitProgress. + */ + @Test + public void testReconstructionQueuesInitProgressMetrics() throws Exception { + Configuration conf = new Configuration(); + try (MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).numDataNodes(1).build()) { Review Comment: yeah, i will update later. -- 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