Class QueryableStateClient
- java.lang.Object
-
- org.apache.flink.queryablestate.client.QueryableStateClient
-
@PublicEvolving @Deprecated public class QueryableStateClient extends Object
Deprecated.The Queryable State feature is deprecated since Flink 1.18, and will be removed in a future Flink major version.Client for querying Flink's managed state.You can mark state as queryable via
StateDescriptor.setQueryable(String). The state instance created from this descriptor will be published for queries when it's created on the Task Managers and the location will be reported to the Job Manager.The client connects to a
Client Proxyrunning on a given Task Manager. The proxy is the entry point of the client to the Flink cluster. It forwards the requests of the client to the Job Manager and the required Task Manager, and forwards the final response back the client.The proxy, initially resolves the location of the requested KvState via the JobManager. Resolved locations are cached. When the server address of the requested KvState instance is determined, the client sends out a request to the server. The returned final answer is then forwarded to the Client.
-
-
Constructor Summary
Constructors Constructor Description QueryableStateClient(String remoteHostname, int remotePort)Deprecated.Create the Queryable State Client.QueryableStateClient(InetAddress remoteAddress, int remotePort)Deprecated.Create the Queryable State Client.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description org.apache.flink.api.common.ExecutionConfiggetExecutionConfig()Deprecated.Gets theExecutionConfig.<K,S extends org.apache.flink.api.common.state.State,V>
CompletableFuture<S>getKvState(org.apache.flink.api.common.JobID jobId, String queryableStateName, K key, org.apache.flink.api.common.typeinfo.TypeHint<K> keyTypeHint, org.apache.flink.api.common.state.StateDescriptor<S,V> stateDescriptor)Deprecated.Returns a future holding the request result.<K,S extends org.apache.flink.api.common.state.State,V>
CompletableFuture<S>getKvState(org.apache.flink.api.common.JobID jobId, String queryableStateName, K key, org.apache.flink.api.common.typeinfo.TypeInformation<K> keyTypeInfo, org.apache.flink.api.common.state.StateDescriptor<S,V> stateDescriptor)Deprecated.Returns a future holding the request result.org.apache.flink.api.common.ExecutionConfigsetExecutionConfig(org.apache.flink.api.common.ExecutionConfig config)Deprecated.Replaces the existingExecutionConfig(possiblynull), with the provided one.ClassLoadersetUserClassLoader(ClassLoader userClassLoader)Deprecated.* Replaces the existingClassLoader(possiblynull), with the provided one.CompletableFuture<?>shutdownAndHandle()Deprecated.Shuts down the client and returns aCompletableFuturethat will be completed when the shutdown process is completed.voidshutdownAndWait()Deprecated.Shuts down the client and waits until shutdown is completed.
-
-
-
Constructor Detail
-
QueryableStateClient
public QueryableStateClient(String remoteHostname, int remotePort) throws UnknownHostException
Deprecated.Create the Queryable State Client.- Parameters:
remoteHostname- the hostname of theClient Proxyto connect to.remotePort- the port of the proxy to connect to.- Throws:
UnknownHostException
-
QueryableStateClient
public QueryableStateClient(InetAddress remoteAddress, int remotePort)
Deprecated.Create the Queryable State Client.- Parameters:
remoteAddress- theaddressof theClient Proxyto connect to.remotePort- the port of the proxy to connect to.
-
-
Method Detail
-
shutdownAndHandle
public CompletableFuture<?> shutdownAndHandle()
Deprecated.Shuts down the client and returns aCompletableFuturethat will be completed when the shutdown process is completed.If an exception is thrown for any reason, then the returned future will be completed exceptionally with that exception.
- Returns:
- A
CompletableFuturefor further handling of the shutdown result.
-
shutdownAndWait
public void shutdownAndWait()
Deprecated.Shuts down the client and waits until shutdown is completed.If an exception is thrown, a warning is logged containing the exception message.
-
getExecutionConfig
public org.apache.flink.api.common.ExecutionConfig getExecutionConfig()
Deprecated.Gets theExecutionConfig.
-
setExecutionConfig
public org.apache.flink.api.common.ExecutionConfig setExecutionConfig(org.apache.flink.api.common.ExecutionConfig config)
Deprecated.Replaces the existingExecutionConfig(possiblynull), with the provided one.- Parameters:
config- The newconfiguration.- Returns:
- The old configuration, or
nullif none was specified.
-
setUserClassLoader
public ClassLoader setUserClassLoader(ClassLoader userClassLoader)
Deprecated.* Replaces the existingClassLoader(possiblynull), with the provided one.- Parameters:
userClassLoader- The newuserClassLoader.- Returns:
- The old classloader, or
nullif none was specified.
-
getKvState
@PublicEvolving public <K,S extends org.apache.flink.api.common.state.State,V> CompletableFuture<S> getKvState(org.apache.flink.api.common.JobID jobId, String queryableStateName, K key, org.apache.flink.api.common.typeinfo.TypeHint<K> keyTypeHint, org.apache.flink.api.common.state.StateDescriptor<S,V> stateDescriptor)
Deprecated.Returns a future holding the request result.- Parameters:
jobId- JobID of the job the queryable state belongs to.queryableStateName- Name under which the state is queryable.key- The key we are interested in.keyTypeHint- ATypeHintused to extract the type of the key.stateDescriptor- TheStateDescriptorof the state we want to query.- Returns:
- Future holding the immutable
Stateobject containing the result.
-
getKvState
@PublicEvolving public <K,S extends org.apache.flink.api.common.state.State,V> CompletableFuture<S> getKvState(org.apache.flink.api.common.JobID jobId, String queryableStateName, K key, org.apache.flink.api.common.typeinfo.TypeInformation<K> keyTypeInfo, org.apache.flink.api.common.state.StateDescriptor<S,V> stateDescriptor)
Deprecated.Returns a future holding the request result.- Parameters:
jobId- JobID of the job the queryable state belongs to.queryableStateName- Name under which the state is queryable.key- The key we are interested in.keyTypeInfo- TheTypeInformationof the key.stateDescriptor- TheStateDescriptorof the state we want to query.- Returns:
- Future holding the immutable
Stateobject containing the result.
-
-