You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2021/07/12 08:11:32 UTC

[GitHub] [ozone] ChenSammi commented on a change in pull request #2382: HDDS-5401. Add more metrics to ReplicationManager to help monitor replication progress.

ChenSammi commented on a change in pull request #2382:
URL: https://github.com/apache/ozone/pull/2382#discussion_r667717201



##########
File path: hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/ReplicationManager.java
##########
@@ -353,12 +352,22 @@ private void processContainer(ContainerInfo container) {
          */
         updateInflightAction(container, inflightReplication,
             action -> replicas.stream()
-                .anyMatch(r -> r.getDatanodeDetails().equals(action.datanode)));
+                .anyMatch(r -> r.getDatanodeDetails().equals(action.datanode)),
+            ()-> metrics.incrNumReplicateCmdsTimeout(),
+            () -> {
+              metrics.incrNumReplicateCmdsCompleted();
+              metrics.incrNumReplicateBytesCompleted(container.getUsedBytes());
+            });
 
         updateInflightAction(container, inflightDeletion,
             action -> replicas.stream()
                 .noneMatch(r ->
-                    r.getDatanodeDetails().equals(action.datanode)));
+                    r.getDatanodeDetails().equals(action.datanode)),
+            () -> metrics.incrNumDeleteCmdsTimeout(),
+            () -> metrics.incrNumDeleteCmdsCompleted());
+
+        metrics.setInflightReplication(inflightReplication.size());
+        metrics.setInflightDeletion(inflightDeletion.size());

Review comment:
       Can we keep the existing way of these two metrices, avoiding set the value every time. 




-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org