Interface SegmentSelector
-
- All Known Implementing Classes:
OfflineSegmentSelector,RealtimeSegmentSelector
public interface SegmentSelectorThe segment selector selects the segments for the query. The segments selected should cover the whole dataset (table) without overlap.Segment selector examples:
- For real-time table, when HLC and LLC segments coexist (during LLC migration), select only HLC segments or LLC segments
- For HLC real-time table, select segments in one group
- For table with segment merge/rollup enabled, select the merged segments over the original segments with the same data
-
-
Method Summary
Modifier and Type Method Description voidinit(org.apache.helix.model.IdealState idealState, org.apache.helix.model.ExternalView externalView, Set<String> onlineSegments)Initializes the segment selector 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)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>select(org.apache.pinot.common.request.BrokerRequest brokerRequest)Selects the segments queried by the given broker request.
-
-
-
Method Detail
-
init
void init(org.apache.helix.model.IdealState idealState, org.apache.helix.model.ExternalView externalView, Set<String> onlineSegments)Initializes the segment selector 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.
-
onAssignmentChange
void onAssignmentChange(org.apache.helix.model.IdealState idealState, org.apache.helix.model.ExternalView externalView, Set<String> onlineSegments)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).
-
-