Class KvStateClientProxyImpl

  • All Implemented Interfaces:
    org.apache.flink.runtime.query.KvStateClientProxy, org.apache.flink.runtime.query.KvStateServer

    @Internal
    public class KvStateClientProxyImpl
    extends org.apache.flink.queryablestate.network.AbstractServerBase<org.apache.flink.queryablestate.messages.KvStateRequest,​org.apache.flink.queryablestate.messages.KvStateResponse>
    implements org.apache.flink.runtime.query.KvStateClientProxy
    The default implementation of the KvStateClientProxy.
    • Constructor Detail

      • KvStateClientProxyImpl

        public KvStateClientProxyImpl​(String bindAddress,
                                      Iterator<Integer> bindPortIterator,
                                      Integer numEventLoopThreads,
                                      Integer numQueryThreads,
                                      org.apache.flink.queryablestate.network.stats.KvStateRequestStats stats)
        Creates the Queryable State Client Proxy.

        The server is instantiated using reflection by the QueryableStateUtils.createKvStateClientProxy(InetAddress, Iterator, int, int, KvStateRequestStats).

        The server needs to be started via start() in order to bind to the configured bind address.

        Parameters:
        bindAddress - the address to listen to.
        bindPortIterator - the port range to try to bind to.
        numEventLoopThreads - number of event loop threads.
        numQueryThreads - number of query threads.
        stats - the statistics collector.
    • Method Detail

      • getServerAddress

        public InetSocketAddress getServerAddress()
        Specified by:
        getServerAddress in interface org.apache.flink.runtime.query.KvStateServer
        Overrides:
        getServerAddress in class org.apache.flink.queryablestate.network.AbstractServerBase<org.apache.flink.queryablestate.messages.KvStateRequest,​org.apache.flink.queryablestate.messages.KvStateResponse>
      • start

        public void start()
                   throws Throwable
        Specified by:
        start in interface org.apache.flink.runtime.query.KvStateServer
        Overrides:
        start in class org.apache.flink.queryablestate.network.AbstractServerBase<org.apache.flink.queryablestate.messages.KvStateRequest,​org.apache.flink.queryablestate.messages.KvStateResponse>
        Throws:
        Throwable
      • shutdown

        public void shutdown()
        Specified by:
        shutdown in interface org.apache.flink.runtime.query.KvStateServer
      • updateKvStateLocationOracle

        public void updateKvStateLocationOracle​(org.apache.flink.api.common.JobID jobId,
                                                @Nullable
                                                org.apache.flink.runtime.jobmaster.KvStateLocationOracle kvStateLocationOracle)
        Specified by:
        updateKvStateLocationOracle in interface org.apache.flink.runtime.query.KvStateClientProxy
      • getKvStateLocationOracle

        @Nullable
        public org.apache.flink.runtime.jobmaster.KvStateLocationOracle getKvStateLocationOracle​(org.apache.flink.api.common.JobID jobId)
        Specified by:
        getKvStateLocationOracle in interface org.apache.flink.runtime.query.KvStateClientProxy
      • initializeHandler

        public org.apache.flink.queryablestate.network.AbstractServerHandler<org.apache.flink.queryablestate.messages.KvStateRequest,​org.apache.flink.queryablestate.messages.KvStateResponse> initializeHandler()
        Specified by:
        initializeHandler in class org.apache.flink.queryablestate.network.AbstractServerBase<org.apache.flink.queryablestate.messages.KvStateRequest,​org.apache.flink.queryablestate.messages.KvStateResponse>