[ 
https://issues.apache.org/jira/browse/HDFS-17117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17747371#comment-17747371
 ] 

ASF GitHub Bot commented on HDFS-17117:
---------------------------------------

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.





> BlockManager#processMisReplicatesAsync can periodically print 
> reconstructionQueuesInitProgress
> ----------------------------------------------------------------------------------------------
>
>                 Key: HDFS-17117
>                 URL: https://issues.apache.org/jira/browse/HDFS-17117
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>            Reporter: Haiyang Hu
>            Assignee: Haiyang Hu
>            Priority: Major
>              Labels: pull-request-available
>
> BlockManager#processMisReplicatesAsync can periodically print 
> reconstructionQueuesInitProgress,  so that the admin can get the progress of 
> the replication queues initialisation.
> Ready to add logs and metrics.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to