Interface JobLeaderListener
-
public interface JobLeaderListenerListener for theJobLeaderService. The listener is notified whenever a job manager gained leadership for a registered job and the service could establish a connection to it. Furthermore, the listener is notified when a job manager loses leadership for a job. In case of an error, thehandleError(Throwable)} is called.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidhandleError(Throwable throwable)Callback for errors which might occur in theJobLeaderService.voidjobManagerGainedLeadership(org.apache.flink.api.common.JobID jobId, JobMasterGateway jobManagerGateway, JMTMRegistrationSuccess registrationMessage)Callback if a job manager has gained leadership for the job identified by the job id and a connection could be established to this job manager.voidjobManagerLostLeadership(org.apache.flink.api.common.JobID jobId, JobMasterId jobMasterId)Callback if the job leader for the job with the given job id lost its leadership.voidjobManagerRejectedRegistration(org.apache.flink.api.common.JobID jobId, String targetAddress, JMTMRegistrationRejection rejection)Callback if a job manager rejected the connection attempts of a task manager.
-
-
-
Method Detail
-
jobManagerGainedLeadership
void jobManagerGainedLeadership(org.apache.flink.api.common.JobID jobId, JobMasterGateway jobManagerGateway, JMTMRegistrationSuccess registrationMessage)Callback if a job manager has gained leadership for the job identified by the job id and a connection could be established to this job manager.- Parameters:
jobId- identifying the job for which the job manager has gained leadershipjobManagerGateway- to the job leaderregistrationMessage- containing further registration information
-
jobManagerLostLeadership
void jobManagerLostLeadership(org.apache.flink.api.common.JobID jobId, JobMasterId jobMasterId)Callback if the job leader for the job with the given job id lost its leadership.- Parameters:
jobId- identifying the job whose leader has lost leadershipjobMasterId- old JobMasterId
-
handleError
void handleError(Throwable throwable)
Callback for errors which might occur in theJobLeaderService.- Parameters:
throwable- cause
-
jobManagerRejectedRegistration
void jobManagerRejectedRegistration(org.apache.flink.api.common.JobID jobId, String targetAddress, JMTMRegistrationRejection rejection)Callback if a job manager rejected the connection attempts of a task manager.- Parameters:
jobId- jobId identifying the job to connect totargetAddress- targetAddress of the responsible job managerrejection- rejection containing more information about the rejection
-
-