Interface SegmentPruner

    • Method Summary

      Modifier and Type Method Description
      void init​(org.apache.helix.model.IdealState idealState, org.apache.helix.model.ExternalView externalView, Set<String> onlineSegments)
      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)
      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).
      Set<String> prune​(org.apache.pinot.common.request.BrokerRequest brokerRequest, Set<String> segments)
      Prunes the segments queried by the given broker request, returns the selected segments to be queried.
      void refreshSegment​(String segment)
      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,
                  Set<String> onlineSegments)
        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)
        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)
        Refreshes the metadata for the given segment (called when segment is getting refreshed).
      • prune

        Set<String> prune​(org.apache.pinot.common.request.BrokerRequest brokerRequest,
                          Set<String> segments)
        Prunes the segments queried by the given broker request, returns the selected segments to be queried.