chihsuan commented on code in PR #10633:
URL: https://github.com/apache/ozone/pull/10633#discussion_r3563533841


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeyRequest.java:
##########
@@ -215,11 +243,21 @@ protected List<OmKeyLocationInfo> allocateBlock(
     }
     for (AllocatedBlock allocatedBlock : allocatedBlocks) {
       BlockID blockID = new BlockID(allocatedBlock.getBlockID());
+      Pipeline pipeline = allocatedBlock.getPipeline();
+      if (sortedByPipeline != null) {
+        final List<DatanodeDetails> nodes = pipeline.getNodes();
+        final List<? extends DatanodeDetails> sorted = sortedByPipeline
+            .computeIfAbsent(pipeline.getId(),
+                id -> keyManager.sortDatanodesForWrite(nodes, 
omClientMachine));

Review Comment:
   Good call, done in  
https://github.com/apache/ozone/pull/10633/changes/59b6b3b0ba4e8317e074de6e16a318df99522e49



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

Reply via email to