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 2020/12/01 11:04:24 UTC

[GitHub] [ozone] adoroszlai commented on a change in pull request #1610: HDDS-4473. Reduce number of sortDatanodes RPC calls

adoroszlai commented on a change in pull request #1610:
URL: https://github.com/apache/ozone/pull/1610#discussion_r533323808



##########
File path: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java
##########
@@ -2322,21 +2322,22 @@ void sortDatanodes(String clientMachine, OmKeyInfo... keyInfos) {
         }
         for (OmKeyLocationInfo k : key.getLocationList()) {
           Pipeline pipeline = k.getPipeline();
-          PipelineID pipelineId = pipeline.getId();
-          List<DatanodeDetails> sortedNodes = sortedPipelines.get(pipelineId);
+          List<DatanodeDetails> nodes = pipeline.getNodes();
+          List<String> uuidList = toNodeUuid(nodes);
+          Set<String> uuidSet = new HashSet<>(uuidList);

Review comment:
       I tried that first.  The problem is we'd need to return a sorted set (for setting up reproducible expectations in unit tests), which somewhat goes against the goal of optimization.




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

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