Class TimeBoundaryManager
- java.lang.Object
-
- org.apache.pinot.broker.routing.timeboundary.TimeBoundaryManager
-
public class TimeBoundaryManager extends Object
TheTimeBoundaryManagerclass manages the time boundary information for a table.TODO: Support SDF (simple date format) time column
-
-
Constructor Summary
Constructors Constructor Description TimeBoundaryManager(org.apache.pinot.spi.config.table.TableConfig tableConfig, org.apache.helix.store.zk.ZkHelixPropertyStore<org.apache.helix.zookeeper.datamodel.ZNRecord> propertyStore, org.apache.pinot.common.metrics.BrokerMetrics brokerMetrics)
-
Method Summary
Modifier and Type Method Description TimeBoundaryInfogetTimeBoundaryInfo()voidinit(org.apache.helix.model.IdealState idealState, org.apache.helix.model.ExternalView externalView, Set<String> onlineSegments)Initializes the time boundary manager 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).voidrefreshSegment(String segment)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, Set<String> onlineSegments)Initializes the time boundary manager 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.NOTE:
idealStateandexternalVieware unused, but intentionally passed in in case they are needed in the future.
-
onAssignmentChange
public 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).NOTE: We don't update all the segment ZK metadata for every external view change, but only the new added/removed ones. The refreshed segment ZK metadata change won't be picked up.
NOTE:
idealStateis unused, but intentionally passed in in case it is needed in the future.
-
refreshSegment
public void refreshSegment(String segment)
Refreshes the metadata for the given segment (called when segment is getting refreshed).
-
getTimeBoundaryInfo
@Nullable public TimeBoundaryInfo getTimeBoundaryInfo()
-
-