sodonnel commented on code in PR #4598:
URL: https://github.com/apache/ozone/pull/4598#discussion_r1172746780
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/replication/ReplicationManager.java:
##########
@@ -922,6 +923,27 @@ protected void processContainer(ContainerInfo
containerInfo,
}
}
+ /**
+ * Increments and samples health states for container when there are no
+ * replicas.
+ * @param replicas The replicas for which size is checked.
+ * @param containerInfo The container info used to retrieve container id.
+ * @param report The report which is incremented and sampled
+ */
+ public void setHealthStateForClosing(Set<ContainerReplica> replicas,
+ ContainerInfo containerInfo,
+ ReplicationManagerReport report) {
+ if (replicas.size() != 0) {
+ return;
+ }
+
+ report.incrementAndSample(HealthState.MISSING,
containerInfo.containerID());
+ report.incrementAndSample(HealthState.UNDER_REPLICATED,
Review Comment:
In the "new" RM, we are keeping to having a single state for a container to
be in, so in this case, the container would be MISSING only, and we don't
increment under or mis-replicated.
--
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]