mcvsubbu commented on a change in pull request #6250:
URL: https://github.com/apache/incubator-pinot/pull/6250#discussion_r520911431
##########
File path:
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseBrokerRequestHandler.java
##########
@@ -436,6 +449,17 @@ public BrokerResponse handleRequest(JsonNode request,
@Nullable RequesterIdentit
return brokerResponse;
}
+ private void validateNumSegments(Map<ServerInstance, List<String>>
offlineRoutingTable,
+ Map<ServerInstance, List<String>> realtimeRoutingTable, int
querySegmentLimit) {
+ int numOffline = offlineRoutingTable == null ? 0 :
offlineRoutingTable.values().stream().mapToInt(List::size).sum();
Review comment:
> Avoid using stream api for performance concern
Agreed. Used to be that we had a class instead of a `Map<ServerInstance,
List<String>>` for routing table? When the routing table is constructed, we can
count the segments and keep it in the class (if we resurrect it), but I go back
to my previous question about limiting the segments
----------------------------------------------------------------
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]