You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "sodonnel (via GitHub)" <gi...@apache.org> on 2023/05/24 17:21:37 UTC

[GitHub] [ozone] sodonnel commented on a diff in pull request #4767: HDDS-8682. EC: Avoid O(n) array.remove(element) when filtering pipelines in WritableECContainerProvider

sodonnel commented on code in PR #4767:
URL: https://github.com/apache/ozone/pull/4767#discussion_r1204537607


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/choose/algorithms/HealthyPipelineChoosePolicy.java:
##########
@@ -43,4 +43,13 @@ public Pipeline choosePipeline(List<Pipeline> pipelineList,
     }
     return fallback;
   }
+
+  @Override
+  public int choosePipelineIndex(List<Pipeline> pipelineList,
+      PipelineRequestInformation pri) {
+    // As this class modified the passed in list, returning an index
+    // doesn't really make sense here. Throwing an exception incase any future
+    // code attempts to use this implementation.
+    throw new UnsupportedOperationException();

Review Comment:
   I wonder why that test used the HealthyPolicy - I changed it to Random and the tests all pass now. The default is also to use Random on the cluster, so its not really clear why "Healthy" was used in this test class (even though it was me who put that line of code there, I do not remember!).



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