mayankshriv commented on a change in pull request #3583: Add segment selector
for merged segments
URL: https://github.com/apache/incubator-pinot/pull/3583#discussion_r238775457
##########
File path:
pinot-broker/src/main/java/com/linkedin/pinot/broker/routing/builder/BaseRoutingTableBuilder.java
##########
@@ -123,16 +124,16 @@ public void computeOnExternalViewChange(String
tableName, ExternalView externalV
}
}
- @Override
- public Map<String, List<String>> getRoutingTable(RoutingTableLookupRequest
request) {
+ public Map<String, List<String>> getRoutingTable(RoutingTableLookupRequest
request, SegmentSelector segmentSelector) {
if (_enableDynamicComputing) {
// Copy the pointer for snapshot since the pointer for segment to
servers map can change at anytime
Map<String, List<String>> segmentToServersMap = _segmentToServersMap;
- // Get all existing segments
+ // Selecting segments only required for processing a query
Set<String> segmentsToQuery = segmentToServersMap.keySet();
-
- // TODO: add the selection logic here
+ if (segmentSelector != null) {
+ segmentsToQuery = segmentSelector.selectSegments(request,
segmentsToQuery);
Review comment:
Does it make sense to merge the concepts of segment selector and pruner?
----------------------------------------------------------------
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]