Hexiaoqiao commented on code in PR #5877:
URL: https://github.com/apache/hadoop/pull/5877#discussion_r1274324258


##########
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:
   Is it `float` enough?



##########
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:
   The first letter should be uppercase.



##########
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:
   The `numDataNodes(1)` is same as the default value, so it should be removed 
if equal to default.



-- 
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]

Reply via email to