sumitagrawl commented on code in PR #5651:
URL: https://github.com/apache/ozone/pull/5651#discussion_r1441647606
##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/fsck/ContainerHealthStatus.java:
##########
@@ -78,6 +100,14 @@ public int getReplicationFactor() {
}
public boolean isHealthy() {
+ return containerReplicaCount.isHealthy();
+ }
+
+ public boolean isSufficientlyReplicated() {
+ return containerReplicaCount.isSufficientlyReplicated();
+ }
+
+ public boolean isProperlyReplicated() {
Review Comment:
isSufficientlyReplicated is where delta is 0 or over-replication, and
isProperlyReplicated is delta 0 (no under/over replication) and no
misReplication.
I think over-replication can be considered as healthy only (may not need
check delta=0).
When perfectly replicated (delta=0), in that case need check for
misReplication
We can rename method as isHealtyReplication() with above 2 condition, as
sufficently replication also means properly replication.
Can see some comment in code related to this point,
org.apache.hadoop.hdds.scm.SCMCommonPlacementPolicy#validateContainerPlacement
> // There are scenarios where there could be excessive replicas on a rack
due to nodes
> // in decommission or maintenance or over-replication in general.
> // In these cases, ReplicationManager shouldn't report mis-replication.
> // The original intention of mis-replication was to indicate that
there isn't enough rack tolerance.
> // In case of over-replication, this isn't an issue.
> // Mis-replication should be an issue once over-replication is fixed,
not before.
> // Adjust the maximum number of replicas per rack to allow containers
> // with excessive replicas to not be reported as mis-replicated.
> maxReplicasPerRack += Math.max(0, dns.size() - replicas);
> return new ContainerPlacementStatusDefault(
> currentRackCount.size(), requiredRacks, numRacks,
maxReplicasPerRack,
> currentRackCount);
--
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]