Interface SegmentZkMetadataFetchListener

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      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 the SegmentPreSelector).
      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 the SegmentPreSelector).
      void refreshSegment​(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 the SegmentPreSelector). 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 the SegmentPreSelector).
      • 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).