Package org.apache.flink.runtime.query
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 Summary
Constructors Constructor Description QueryableStateUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static KvStateClientProxy
createKvStateClientProxy(String address, Iterator<Integer> ports, int eventLoopThreads, int queryThreads, org.apache.flink.queryablestate.network.stats.KvStateRequestStats stats)
Initializes theclient proxy
responsible for receiving requests from the external (to the cluster) client and forwarding them internally.static KvStateServer
createKvStateServer(String address, Iterator<Integer> ports, int eventLoopThreads, int queryThreads, KvStateRegistry kvStateRegistry, org.apache.flink.queryablestate.network.stats.KvStateRequestStats stats)
Initializes theserver
responsible for sending the requested internal state to theclient proxy
.
-
-
-
Method Detail
-
createKvStateClientProxy
public static KvStateClientProxy createKvStateClientProxy(String address, Iterator<Integer> ports, int eventLoopThreads, int queryThreads, org.apache.flink.queryablestate.network.stats.KvStateRequestStats stats)
Initializes theclient 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 (seeQueryableStateOptions.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 theserver
responsible for sending the requested internal state to theclient proxy
.- Parameters:
address
- the address to bind to.ports
- the range of ports the state server will attempt to listen to (seeQueryableStateOptions.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
.
-
-