public class KvStateLocationRegistry extends Object
InternalKvState
registration notifications to KvStateLocation
instances.Constructor and Description |
---|
KvStateLocationRegistry(JobID jobId,
Map<JobVertexID,ExecutionJobVertex> jobVertices)
Creates the registry for the job.
|
Modifier and Type | Method and Description |
---|---|
KvStateLocation |
getKvStateLocation(String registrationName)
Returns the
KvStateLocation for the registered KvState instance or null
if no location information is available. |
void |
notifyKvStateRegistered(JobVertexID jobVertexId,
KeyGroupRange keyGroupRange,
String registrationName,
KvStateID kvStateId,
InetSocketAddress kvStateServerAddress)
Notifies the registry about a registered KvState instance.
|
void |
notifyKvStateUnregistered(JobVertexID jobVertexId,
KeyGroupRange keyGroupRange,
String registrationName)
Notifies the registry about an unregistered KvState instance.
|
public KvStateLocationRegistry(JobID jobId, Map<JobVertexID,ExecutionJobVertex> jobVertices)
jobId
- JobID this coordinator belongs to.jobVertices
- Job vertices map of all vertices of this job.public KvStateLocation getKvStateLocation(String registrationName)
KvStateLocation
for the registered KvState instance or null
if no location information is available.registrationName
- Name under which the KvState instance is registered.null
.public void notifyKvStateRegistered(JobVertexID jobVertexId, KeyGroupRange keyGroupRange, String registrationName, KvStateID kvStateId, InetSocketAddress kvStateServerAddress)
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 instanceIllegalArgumentException
- 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.public void notifyKvStateUnregistered(JobVertexID jobVertexId, KeyGroupRange keyGroupRange, String registrationName)
jobVertexId
- JobVertexID the KvState instance belongs tokeyGroupRange
- Key group index the KvState instance belongs toregistrationName
- Name under which the KvState has been registeredIllegalArgumentException
- If another operator registered the state instanceIllegalArgumentException
- If the registration name is not knownCopyright © 2014–2024 The Apache Software Foundation. All rights reserved.