[
https://issues.apache.org/jira/browse/HDFS-17117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17747243#comment-17747243
]
ASF GitHub Bot commented on HDFS-17117:
---------------------------------------
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.
> 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]