mcvsubbu commented on a change in pull request #4806: Refactor segments admin 
rest APIs
URL: https://github.com/apache/incubator-pinot/pull/4806#discussion_r347047503
 
 

 ##########
 File path: 
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java
 ##########
 @@ -1812,7 +1813,7 @@ private boolean updateExistedSegment(String 
tableNameWithType, SegmentZKMetadata
    * Returns a map from server instance to list of segments it serves for the 
given table.
    */
   public Map<String, List<String>> getServerToSegmentsMap(String 
tableNameWithType) {
-    Map<String, List<String>> serverToSegmentsMap = new HashMap<>();
+    Map<String, List<String>> serverToSegmentsMap = new TreeMap<>();
 
 Review comment:
   why change this to TreeMap? This method is also used by table size reader, 
and when servers have tens of thousands of segments, it will add significant 
overhead.
   If necessary, the API to get the server map can sort it (for disaplay 
purpose)

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to