Class KvStateServerImpl

java.lang.Object
org.apache.flink.queryablestate.network.AbstractServerBase<KvStateInternalRequest,org.apache.flink.queryablestate.messages.KvStateResponse>
org.apache.flink.queryablestate.server.KvStateServerImpl
All Implemented Interfaces:
org.apache.flink.runtime.query.KvStateServer

@Internal public class KvStateServerImpl extends org.apache.flink.queryablestate.network.AbstractServerBase<KvStateInternalRequest,org.apache.flink.queryablestate.messages.KvStateResponse> implements org.apache.flink.runtime.query.KvStateServer
The default implementation of the KvStateServer.
  • Field Summary

    Fields inherited from class org.apache.flink.queryablestate.network.AbstractServerBase

    log
  • Constructor Summary

    Constructors
    Constructor
    Description
    KvStateServerImpl(String bindAddress, Iterator<Integer> bindPortIterator, Integer numEventLoopThreads, Integer numQueryThreads, org.apache.flink.runtime.query.KvStateRegistry kvStateRegistry, org.apache.flink.queryablestate.network.stats.KvStateRequestStats stats)
    Creates the state server.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.flink.queryablestate.network.messages.MessageSerializer<KvStateInternalRequest,org.apache.flink.queryablestate.messages.KvStateResponse>
     
     
    org.apache.flink.queryablestate.network.AbstractServerHandler<KvStateInternalRequest,org.apache.flink.queryablestate.messages.KvStateResponse>
     
    void
     
    void
     

    Methods inherited from class org.apache.flink.queryablestate.network.AbstractServerBase

    getQueryExecutor, getServerName, isEventGroupShutdown, shutdownServer

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • KvStateServerImpl

      public KvStateServerImpl(String bindAddress, Iterator<Integer> bindPortIterator, Integer numEventLoopThreads, Integer numQueryThreads, org.apache.flink.runtime.query.KvStateRegistry kvStateRegistry, org.apache.flink.queryablestate.network.stats.KvStateRequestStats stats)
      Creates the state server.

      The server is instantiated using reflection by the QueryableStateUtils.createKvStateServer(InetAddress, Iterator, int, int, KvStateRegistry, 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.
      kvStateRegistry - KvStateRegistry to query for state instances.
      stats - the statistics collector.
  • Method Details

    • initializeHandler

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

      public org.apache.flink.queryablestate.network.messages.MessageSerializer<KvStateInternalRequest,org.apache.flink.queryablestate.messages.KvStateResponse> getSerializer()
    • 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<KvStateInternalRequest,org.apache.flink.queryablestate.messages.KvStateResponse>
      Throws:
      Throwable
    • 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<KvStateInternalRequest,org.apache.flink.queryablestate.messages.KvStateResponse>
    • shutdown

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