Interface CollectionCommandContext

  • All Known Implementing Classes:
    DistributedCollectionCommandContext, OcmhCollectionCommandContext

    public interface CollectionCommandContext
    Data passed to Collection API command execution, to allow calls from either the OverseerCollectionMessageHandler when commands are executed on the Overseer, or - in a future change - allow Collection API commands to be executed in a distributed way, unrelated to and not depending upon Overseer abstractions (including overseer collection message handling).
    • Method Detail

      • isDistributedCollectionAPI

        boolean isDistributedCollectionAPI()
        When this method returns true, Overseer specific actions do not make sense and commands should not be doing them.
      • getAdminPath

        default String getAdminPath()
        admin path passed to Overseer is a constant, including in tests.
      • offerStateUpdate

        default void offerStateUpdate​(byte[] data)
                               throws org.apache.zookeeper.KeeperException,
                                      InterruptedException
        This method enables the commands to enqueue to the overseer cluster state update. This should only be used when the cluster state update is running in the Overseer (and will throw an exception if called when Collection API is distributed given that distributed Collection API implies distributed Cluster State Update)
        Throws:
        org.apache.zookeeper.KeeperException
        InterruptedException
      • getOverseerId

        default String getOverseerId()
      • getOverseerStats

        default Stats getOverseerStats()
        Command delegating to Overseer to retrieve cluster state update stats from a Collection API call. This does not make sense when cluster state updates are distributed given Overseer does not see them and can't collect stats.
      • submitIntraProcessMessage

        default void submitIntraProcessMessage​(Overseer.Message message)
        Method used by Per Replica States implementation to force the cluster state updater to immediately reload a collection from Zookeeper. This method is not used when cluster state updates are distributed.