Interface KvStateClientProxy

  • All Superinterfaces:
    KvStateServer
    All Known Implementing Classes:
    KvStateClientProxyImpl

    public interface KvStateClientProxy
    extends KvStateServer
    An interface for the Queryable State Client Proxy running on each Task Manager in the cluster.

    This proxy is where the Queryable State Client (potentially running outside your Flink cluster) connects to, and his responsibility is to forward the client's requests to the rest of the entities participating in fetching the requested state, and running within the cluster.

    These are:

    1. the Job Manager, which is responsible for sending the Task Manager storing the requested state, and
    2. the Task Manager having the state itself.
    • Method Detail

      • updateKvStateLocationOracle

        void updateKvStateLocationOracle​(JobID jobId,
                                         @Nullable
                                         KvStateLocationOracle kvStateLocationOracle)
        Updates the active Job Manager in case of change.

        This is useful in settings where high-availability is enabled and a failed Job Manager is replaced by a new one.

        IMPORTANT: this method may be called by a different thread than the getKvStateLocationOracle(JobID).

        Parameters:
        jobId - identifying the job for which to update the key-value state location oracle
        kvStateLocationOracle - the key-value state location oracle for the given JobID, or null if there is no oracle anymore
      • getKvStateLocationOracle

        @Nullable
        KvStateLocationOracle getKvStateLocationOracle​(JobID jobId)
        Retrieves a future containing the currently leading key-value state location oracle.

        IMPORTANT: this method may be called by a different thread than the updateKvStateLocationOracle(JobID, KvStateLocationOracle).

        Parameters:
        jobId - identifying the job for which to request the key-value state location oracle
        Returns:
        The key-value state location oracle for the given JobID or null if none.