lokeshj1703 commented on a change in pull request #2349:
URL: https://github.com/apache/ozone/pull/2349#discussion_r671119224
##########
File path:
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/ReplicationManager.java
##########
@@ -1169,78 +1173,61 @@ private void handleOverReplicatedContainer(final
ContainerInfo container,
}
}
eligibleReplicas.removeAll(unhealthyReplicas);
-
- excess -= handleMoveIfNeeded(container, eligibleReplicas);
-
removeExcessReplicasIfNeeded(excess, container, eligibleReplicas);
}
}
/**
- * if the container is in inflightMove, handle move if needed.
+ * if the container is in inflightMove, handle move.
*
* @param cif ContainerInfo
- * @param eligibleReplicas An list of replicas, which may have excess
replicas
- * @return minus how many replica is removed through sending delete command
+ * @param replicaSet An Set of replicas, which may have excess replicas
*/
- private int handleMoveIfNeeded(final ContainerInfo cif,
- final List<ContainerReplica> eligibleReplicas) {
- int minus = 0;
+ private void handleMove(final ContainerInfo cif,
Review comment:
This function assumes replication has completed. It would be good to
document that.
##########
File path:
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/ReplicationManager.java
##########
@@ -1169,78 +1173,61 @@ private void handleOverReplicatedContainer(final
ContainerInfo container,
}
}
eligibleReplicas.removeAll(unhealthyReplicas);
-
- excess -= handleMoveIfNeeded(container, eligibleReplicas);
-
removeExcessReplicasIfNeeded(excess, container, eligibleReplicas);
}
}
/**
- * if the container is in inflightMove, handle move if needed.
+ * if the container is in inflightMove, handle move.
*
* @param cif ContainerInfo
- * @param eligibleReplicas An list of replicas, which may have excess
replicas
- * @return minus how many replica is removed through sending delete command
+ * @param replicaSet An Set of replicas, which may have excess replicas
*/
- private int handleMoveIfNeeded(final ContainerInfo cif,
- final List<ContainerReplica> eligibleReplicas) {
- int minus = 0;
+ private void handleMove(final ContainerInfo cif,
Review comment:
It might be better to rename this function to sth like
deleteSrcDnForMove.
--
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]