Class MultiPartitionColumnsSegmentPruner
- java.lang.Object
-
- org.apache.pinot.broker.routing.segmentpruner.MultiPartitionColumnsSegmentPruner
-
- All Implemented Interfaces:
SegmentZkMetadataFetchListener,SegmentPruner
public class MultiPartitionColumnsSegmentPruner extends Object implements SegmentPruner
TheMultiPartitionColumnsSegmentPrunerprunes segments based on their partition metadata stored in ZK. The pruner supports queries with filter (or nested filter) of EQUALITY and IN predicates.
-
-
Constructor Summary
Constructors Constructor Description MultiPartitionColumnsSegmentPruner(String tableNameWithType, Set<String> partitionColumns)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<String>getPartitionColumns()voidinit(org.apache.helix.model.IdealState idealState, org.apache.helix.model.ExternalView externalView, List<String> onlineSegments, List<org.apache.helix.zookeeper.datamodel.ZNRecord> znRecords)Initializes the segment pruner with the ideal state, external view and online segments (segments with ONLINE/CONSUMING instances in the ideal state and pre-selected by theSegmentPreSelector).voidonAssignmentChange(org.apache.helix.model.IdealState idealState, org.apache.helix.model.ExternalView externalView, Set<String> onlineSegments, List<String> pulledSegments, List<org.apache.helix.zookeeper.datamodel.ZNRecord> znRecords)Processes the segment assignment (ideal state or external view) change based on the given online segments (segments with ONLINE/CONSUMING instances in the ideal state and pre-selected by theSegmentPreSelector).Set<String>prune(org.apache.pinot.common.request.BrokerRequest brokerRequest, Set<String> segments)Prunes the segments queried by the given broker request, returns the selected segments to be queried.voidrefreshSegment(String segment, org.apache.helix.zookeeper.datamodel.ZNRecord znRecord)Refreshes the metadata for the given segment (called when segment is getting refreshed).
-
-
-
Method Detail
-
init
public void init(org.apache.helix.model.IdealState idealState, org.apache.helix.model.ExternalView externalView, List<String> onlineSegments, List<org.apache.helix.zookeeper.datamodel.ZNRecord> znRecords)Description copied from interface:SegmentZkMetadataFetchListenerInitializes the segment pruner with the ideal state, external view and online segments (segments with ONLINE/CONSUMING instances in the ideal state and pre-selected by theSegmentPreSelector). Should be called only once before calling other methods.- Specified by:
initin interfaceSegmentZkMetadataFetchListener
-
onAssignmentChange
public void onAssignmentChange(org.apache.helix.model.IdealState idealState, org.apache.helix.model.ExternalView externalView, Set<String> onlineSegments, List<String> pulledSegments, List<org.apache.helix.zookeeper.datamodel.ZNRecord> znRecords)Description copied from interface:SegmentZkMetadataFetchListenerProcesses the segment assignment (ideal state or external view) change based on the given online segments (segments with ONLINE/CONSUMING instances in the ideal state and pre-selected by theSegmentPreSelector).- Specified by:
onAssignmentChangein interfaceSegmentZkMetadataFetchListener
-
refreshSegment
public void refreshSegment(String segment, @Nullable org.apache.helix.zookeeper.datamodel.ZNRecord znRecord)
Description copied from interface:SegmentZkMetadataFetchListenerRefreshes the metadata for the given segment (called when segment is getting refreshed).- Specified by:
refreshSegmentin interfaceSegmentZkMetadataFetchListener
-
prune
public Set<String> prune(org.apache.pinot.common.request.BrokerRequest brokerRequest, Set<String> segments)
Description copied from interface:SegmentPrunerPrunes the segments queried by the given broker request, returns the selected segments to be queried.- Specified by:
prunein interfaceSegmentPruner
-
-