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/11/30 11:12:02 UTC

[GitHub] [ozone] lokeshj1703 commented on a change in pull request #2756: HDDS-5602. always choose the nearest one as the target in the candidates according to networkTopology

lokeshj1703 commented on a change in pull request #2756:
URL: https://github.com/apache/ozone/pull/2756#discussion_r759172400



##########
File path: hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/balancer/FindSourceGreedy.java
##########
@@ -100,15 +124,19 @@ public void increaseSizeLeaving(DatanodeDetails dui, long size) {
    *
    * @return the nex candidate source data node.
    */
-  @Override
-  public DatanodeDetails getNextCandidateSourceDataNode() {
+  private DatanodeDetails getNextCandidateSourceDataNode() {
     if (potentialSources.isEmpty()) {
       LOG.info("no more candidate source data node");
       return null;
     }
     return potentialSources.poll().getDatanodeDetails();

Review comment:
       Unrelated to this PR. Since we are doing a poll here, the source datanode will not be considered again in the iteration?

##########
File path: hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/balancer/FindSourceStrategy.java
##########
@@ -30,19 +32,26 @@
 public interface FindSourceStrategy {
 
   /**
-   * get the next candidate source data node according to
-   * the strategy.
-   *
-   * @return the nex candidate source data node.
+   * set source datanode for move selection.
    */
-  DatanodeDetails getNextCandidateSourceDataNode();
+  void setSourceForMoveSelection(ContainerMoveSelection moveSelection);

Review comment:
       The earlier interface method seems more intuitive.

##########
File path: hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/balancer/FindSourceStrategy.java
##########
@@ -30,19 +32,26 @@
 public interface FindSourceStrategy {
 
   /**
-   * get the next candidate source data node according to
-   * the strategy.
-   *
-   * @return the nex candidate source data node.
+   * set source datanode for move selection.
    */
-  DatanodeDetails getNextCandidateSourceDataNode();
+  void setSourceForMoveSelection(ContainerMoveSelection moveSelection);

Review comment:
       Similarly for FindTargetGreedy. This seems like a setter.




-- 
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