parakhnr commented on PR #2452:
URL: https://github.com/apache/helix/pull/2452#issuecomment-1513920300

   > Would that be possible to make it configurable. I would like to keep the 
current behavior that as I am not sure how many people use this class. But I 
dont think that would be much as this should be only used for testing. If you 
dont have a better way to make it configurable, let's keep it.
   
   Hmmm.. we aren't changing the current behavior at all. We are just getting 
rid of the redundant calls. 
   * 1st call to `NetworkUtil.getLocalHostNames()` is used for logging.
   * 2nd call to `NetworkUtil.getLocalHostNames()` is used to search for 
`localhost` in the list of hostnames which will always be present cause we 
explicitly add it to the list over 
[here](https://github.com/apache/helix/blob/386a77d566f1dc0b480c3bcbdb4a2880a8b8a4a9/zookeeper-api/src/main/java/org/apache/helix/zookeeper/zkclient/NetworkUtil.java#L43).
   
   I feel both of these calls are something we can avoid.
   


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