harnoor
06/16/2022, 12:48 PMnumSegmentsQueried=21380, numSegmentsProcessed=90
Hi, we haven’t set any bloom filters and don’t use any partitioning. The query has a time range filter.
I just wanted to confirm that in the above example, time-based pruning of segments happened at the broker level and after the broker layer, only 90 segments were queried in the server, right?
And if we set bloom filters, are the segments pruned at the server or broker?Luis Fernandez
06/16/2022, 2:16 PMNeha Pawar
show JSON format
in the result, you should see
"numSegmentsPrunedByBroker": 0,
"numSegmentsPrunedByServer": 6,
to confirmLuis Fernandez
06/16/2022, 8:39 PM0.10.0
and i don’t see thatPrashant Pandey
06/17/2022, 8:13 AMharnoor
06/17/2022, 11:34 AM"routing": {
"segmentPrunerTypes": ["time"]
}
Neha Pawar
Neha Pawar
public static List<SegmentPruner> getSegmentPruners(TableConfig tableConfig,
ZkHelixPropertyStore<ZNRecord> propertyStore) {
List<SegmentPruner> segmentPruners = new ArrayList<>();
boolean needsEmptySegment = TableConfigUtils.needsEmptySegmentPruner(tableConfig);
if (needsEmptySegment) {
// Add EmptySegmentPruner if needed
segmentPruners.add(new EmptySegmentPruner(tableConfig, propertyStore));
}
RoutingConfig routingConfig = tableConfig.getRoutingConfig();
if (routingConfig != null) {
List<String> segmentPrunerTypes = routingConfig.getSegmentPrunerTypes();
if (segmentPrunerTypes != null) {
But the server side SegmentPruner will always kick in .Neha Pawar
Luis Fernandez
06/17/2022, 8:34 PMLuis Fernandez
06/17/2022, 8:35 PMNeha Pawar
Luis Fernandez
06/17/2022, 9:03 PMNeha Pawar
/**
* The {@code TimeSegmentPruner} prunes segments based on their time column start & end time metadata stored in ZK.
* The pruner
* supports queries with filter (or nested filter) of EQUALITY and RANGE predicates.
*/
public class TimeSegmentPruner implements SegmentPruner {
you dont need to have setup any partition column or partitioning config for this oneharnoor
06/20/2022, 7:15 AMLuis Fernandez
08/17/2022, 9:37 PMNeha Pawar
Luis Fernandez
08/18/2022, 3:52 PMNeha Pawar
Luis Fernandez
08/18/2022, 3:55 PMLuis Fernandez
08/18/2022, 3:55 PMNeha Pawar
Luis Fernandez
08/18/2022, 7:04 PMLuis Fernandez
08/18/2022, 7:04 PM"routing": {
"segmentPrunerTypes": [
"partition"
]
},
this is our current configLuis Fernandez
08/18/2022, 7:05 PMLuis Fernandez
08/18/2022, 7:05 PMNeha Pawar
@PUT
@Produces(MediaType.TEXT_PLAIN)
@Path("/routing/{tableName}")
@ApiOperation(value = "Build/rebuild the routing for a table", notes = "Build/rebuild the routing for a table")
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Success"),
@ApiResponse(code = 500, message = "Internal server error")
})
Neha Pawar
does that mean that only partition pruning is happening but not time (?)