Class KvStateLocationRegistry

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

public class KvStateLocationRegistry extends Object
Simple registry, which maps InternalKvState registration notifications to KvStateLocation instances.
  • 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

      public KvStateLocation getKvStateLocation(String registrationName)
      Returns the KvStateLocation for the registered KvState instance or null if 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 to
      keyGroupRange - Key group range the KvState instance belongs to
      registrationName - Name under which the KvState has been registered
      kvStateId - ID of the registered KvState instance
      kvStateServerAddress - Server address where to find the KvState instance
      Throws:
      IllegalArgumentException - If JobVertexID does not belong to job
      IllegalArgumentException - 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 to
      keyGroupRange - Key group index the KvState instance belongs to
      registrationName - Name under which the KvState has been registered
      Throws:
      IllegalArgumentException - If another operator registered the state instance
      IllegalArgumentException - If the registration name is not known