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