Interface SegmentZkMetadataFetchListener
-
- All Known Subinterfaces:
SegmentPruner
- All Known Implementing Classes:
EmptySegmentPruner,MultiPartitionColumnsSegmentPruner,SegmentPartitionMetadataManager,SinglePartitionColumnSegmentPruner,TimeSegmentPruner
public interface SegmentZkMetadataFetchListenerInterface to register withSegmentZkMetadataFetcher.When registered, SegmentZKMetadataFetcher will fetch
ZNRecordfor associatedonlineSegmentslist or refreshedsegment. Thus batch up all ZK access for segment metadata.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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).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
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)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). 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, 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).
-
refreshSegment
void refreshSegment(String segment, @Nullable org.apache.helix.zookeeper.datamodel.ZNRecord znRecord)
Refreshes the metadata for the given segment (called when segment is getting refreshed).
-
-