Package org.apache.flink.runtime.query
Class KvStateLocationRegistry
java.lang.Object
org.apache.flink.runtime.query.KvStateLocationRegistry
Simple registry, which maps
InternalKvState registration notifications to KvStateLocation instances.-
Constructor Summary
ConstructorsConstructorDescriptionKvStateLocationRegistry(org.apache.flink.api.common.JobID jobId, Map<JobVertexID, ExecutionJobVertex> jobVertices) Creates the registry for the job. -
Method Summary
Modifier and TypeMethodDescriptiongetKvStateLocation(String registrationName) Returns theKvStateLocationfor the registered KvState instance ornullif no location information is available.voidnotifyKvStateRegistered(JobVertexID jobVertexId, KeyGroupRange keyGroupRange, String registrationName, org.apache.flink.queryablestate.KvStateID kvStateId, InetSocketAddress kvStateServerAddress) Notifies the registry about a registered KvState instance.voidnotifyKvStateUnregistered(JobVertexID jobVertexId, KeyGroupRange keyGroupRange, String registrationName) Notifies the registry about an unregistered KvState instance.
-
Constructor Details
-
KvStateLocationRegistry
public KvStateLocationRegistry(org.apache.flink.api.common.JobID jobId, Map<JobVertexID, ExecutionJobVertex> jobVertices) Creates the registry for the job.- Parameters:
jobId- JobID this coordinator belongs to.jobVertices- Job vertices map of all vertices of this job.
-
-
Method Details
-
getKvStateLocation
Returns theKvStateLocationfor the registered KvState instance ornullif no location information is available.- Parameters:
registrationName- Name under which the KvState instance is registered.- Returns:
- Location information or
null.
-
notifyKvStateRegistered
public void notifyKvStateRegistered(JobVertexID jobVertexId, KeyGroupRange keyGroupRange, String registrationName, org.apache.flink.queryablestate.KvStateID kvStateId, InetSocketAddress kvStateServerAddress) Notifies the registry about a registered KvState instance.- Parameters:
jobVertexId- JobVertexID the KvState instance belongs tokeyGroupRange- Key group range the KvState instance belongs toregistrationName- Name under which the KvState has been registeredkvStateId- ID of the registered KvState instancekvStateServerAddress- Server address where to find the KvState instance- Throws:
IllegalArgumentException- If JobVertexID does not belong to jobIllegalArgumentException- If state has been registered with same name by another operator.IndexOutOfBoundsException- If key group index is out of bounds.
-
notifyKvStateUnregistered
public void notifyKvStateUnregistered(JobVertexID jobVertexId, KeyGroupRange keyGroupRange, String registrationName) Notifies the registry about an unregistered KvState instance.- Parameters:
jobVertexId- JobVertexID the KvState instance belongs tokeyGroupRange- Key group index the KvState instance belongs toregistrationName- Name under which the KvState has been registered- Throws:
IllegalArgumentException- If another operator registered the state instanceIllegalArgumentException- If the registration name is not known
-