jihoonson commented on a change in pull request #6094: Introduce SystemSchema 
tables (#5989)
URL: https://github.com/apache/incubator-druid/pull/6094#discussion_r221371431
 
 

 ##########
 File path: server/src/main/java/org/apache/druid/client/BrokerServerView.java
 ##########
 @@ -322,4 +322,10 @@ private void runTimelineCallbacks(final 
Function<TimelineCallback, CallbackActio
       );
     }
   }
+
+  @Override
+  public Map<String, QueryableDruidServer> getClients()
+  {
+    return clients;
 
 Review comment:
   The caller needs only `DruidServer`, not entire map or 
`QueryableDruidServer`. Also, it's much better to not return mutable objects. 
Please change this to like below:
   
   ```java
   return clients.values().stream()
              .map(queryableDruidServer -> 
queryableDruidServer.getServer().toImmutableDruidServer())
              .collect(Collectors.toList());
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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