Class KvStateLocationRegistry

    • Constructor Detail

      • KvStateLocationRegistry

        public KvStateLocationRegistry​(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 Detail

      • 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,
                                            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