sodonnel commented on a change in pull request #1610:
URL: https://github.com/apache/ozone/pull/1610#discussion_r533310687
##########
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:
Do you think it would be better to return a Set<String> directly in
toNodeUuid(...), rather than return a list and then create a set from it? Its a
tiny optimisation but I don't think we really need the intermediate list - its
just used in the log message later and we can probably just use "nodes" rather
than nodeList in the log as it was before.
----------------------------------------------------------------
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]