Class QueryableStateUtils

java.lang.Object
org.apache.flink.runtime.query.QueryableStateUtils

public final class QueryableStateUtils extends Object
Utility class to initialize entities used in queryable state.
  • Constructor Details

    • QueryableStateUtils

      public QueryableStateUtils()
  • Method Details

    • createKvStateClientProxy

      public static KvStateClientProxy createKvStateClientProxy(String address, Iterator<Integer> ports, int eventLoopThreads, int queryThreads, org.apache.flink.queryablestate.network.stats.KvStateRequestStats stats)
      Initializes the client proxy responsible for receiving requests from the external (to the cluster) client and forwarding them internally.
      Parameters:
      address - the address to bind to.
      ports - the range of ports the proxy will attempt to listen to (see QueryableStateOptions.PROXY_PORT_RANGE).
      eventLoopThreads - the number of threads to be used to process incoming requests.
      queryThreads - the number of threads to be used to send the actual state.
      stats - statistics to be gathered about the incoming requests.
      Returns:
      the client proxy.
    • createKvStateServer

      public static KvStateServer createKvStateServer(String address, Iterator<Integer> ports, int eventLoopThreads, int queryThreads, KvStateRegistry kvStateRegistry, org.apache.flink.queryablestate.network.stats.KvStateRequestStats stats)
      Initializes the server responsible for sending the requested internal state to the client proxy.
      Parameters:
      address - the address to bind to.
      ports - the range of ports the state server will attempt to listen to (see QueryableStateOptions.SERVER_PORT_RANGE).
      eventLoopThreads - the number of threads to be used to process incoming requests.
      queryThreads - the number of threads to be used to send the actual state.
      kvStateRegistry - the registry with the queryable state.
      stats - statistics to be gathered about the incoming requests.
      Returns:
      the state server.