navinko commented on code in PR #11132:
URL: https://github.com/apache/ozone/pull/11132#discussion_r3886642049


##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/HddsServerUtil.java:
##########
@@ -926,12 +924,11 @@ public static Collection<HostAndPort> 
getSCMAddressForDatanodes(ConfigurationSou
    * Null if there is any wrongly configured SCM address. Note that the 
returned collection
    * might not be ordered the same way as the requested SCM node IDs
    */
-  public static Collection<Pair<String, HostAndPort>> 
getSCMAddressForDatanodes(
+  public static Collection<ScmNodeAddress> getSCMAddressForDatanodes(
       ConfigurationSource conf, String scmServiceId, Set<String> scmNodeIds) {
-    Collection<Pair<String, HostAndPort>> scmNodeAddress = new 
HashSet<>(scmNodeIds.size());
+    Collection<ScmNodeAddress> scmNodeAddresses = new 
HashSet<>(scmNodeIds.size());

Review Comment:
   Done — since scmNodeIds is already a Set, there are no duplicates to dedupe 
(so ArrayList is enough) and the result is only iterated, never 
hashed/compared, so equals/hashCode also aren't needed either.



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