goiri commented on a change in pull request #1974:
URL: https://github.com/apache/hadoop/pull/1974#discussion_r415103835
##########
File path:
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetworkTopology.java
##########
@@ -196,10 +196,8 @@ protected Node getNodeForNetworkLocation(Node node) {
loc = loc.substring(1);
}
InnerNode rack = (InnerNode) clusterMap.getLoc(loc);
- if (rack == null) {
- return null;
- }
- return new ArrayList<Node>(rack.getChildren());
+ return (rack == null) ? Collections.emptyList()
Review comment:
Why can we use unmodifiable here?
----------------------------------------------------------------
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]