public interface JobLeaderIdService
getLeaderId(JobID). The future will only be completed with an exception in case the service
will be stopped.| Modifier and Type | Method and Description |
|---|---|
void |
addJob(org.apache.flink.api.common.JobID jobId)
Add a job to be monitored to retrieve the job leader id.
|
void |
clear()
Stop and clear the currently registered job leader id listeners.
|
boolean |
containsJob(org.apache.flink.api.common.JobID jobId)
Check whether the given job is being monitored or not.
|
CompletableFuture<JobMasterId> |
getLeaderId(org.apache.flink.api.common.JobID jobId)
Get the leader's
JobMasterId future for the given job. |
boolean |
isValidTimeout(org.apache.flink.api.common.JobID jobId,
UUID timeoutId)
Checks whether the given timeoutId for the given jobId is valid or not.
|
void |
removeJob(org.apache.flink.api.common.JobID jobId)
Remove the given job from being monitored by the service.
|
void |
start(JobLeaderIdActions initialJobLeaderIdActions)
Start the service with the given job leader actions.
|
void |
stop()
Stop the service.
|
void start(JobLeaderIdActions initialJobLeaderIdActions) throws Exception
initialJobLeaderIdActions - to use for job leader id actionsException - which is thrown when clearing up old statevoid stop() throws Exception
Exception - which is thrown in case a retrieval service cannot be stopped properlyvoid clear()
throws Exception
Exception - which is thrown in case a retrieval service cannot be stopped properlyvoid addJob(org.apache.flink.api.common.JobID jobId)
throws Exception
jobId - identifying the job to monitorException - if the job could not be added to the servicevoid removeJob(org.apache.flink.api.common.JobID jobId)
throws Exception
jobId - identifying the job to remove from monitorException - if removing the job failsboolean containsJob(org.apache.flink.api.common.JobID jobId)
jobId - identifying the jobCompletableFuture<JobMasterId> getLeaderId(org.apache.flink.api.common.JobID jobId) throws Exception
JobMasterId future for the given job.jobId - jobId specifying for which job to retrieve the JobMasterIdJobMasterIdException - if retrieving the JobMasterId cannot be startedboolean isValidTimeout(org.apache.flink.api.common.JobID jobId,
UUID timeoutId)
jobId - jobId identifying the job for which the timeout should be checkedtimeoutId - timeoutId specifying the timeout which should be checked for its validitytrue if the timeout is valid; otherwise falseCopyright © 2014–2024 The Apache Software Foundation. All rights reserved.