Class OfflineSegmentSelector
- java.lang.Object
-
- org.apache.pinot.broker.routing.segmentselector.OfflineSegmentSelector
-
- All Implemented Interfaces:
SegmentSelector
public class OfflineSegmentSelector extends Object implements SegmentSelector
Segment selector for offline table.
-
-
Constructor Summary
Constructors Constructor Description OfflineSegmentSelector()
-
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
public void init(org.apache.helix.model.IdealState idealState, org.apache.helix.model.ExternalView externalView, Set<String> onlineSegments)Description copied from interface:SegmentSelectorInitializes 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.- Specified by:
initin interfaceSegmentSelector
-
onAssignmentChange
public void onAssignmentChange(org.apache.helix.model.IdealState idealState, org.apache.helix.model.ExternalView externalView, Set<String> onlineSegments)Description copied from interface:SegmentSelectorProcesses 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 interfaceSegmentSelector
-
select
public Set<String> select(org.apache.pinot.common.request.BrokerRequest brokerRequest)
Description copied from interface:SegmentSelectorSelects the segments queried by the given broker request. The segments selected should cover the whole dataset (table) without overlap.- Specified by:
selectin interfaceSegmentSelector
-
-