public interface JobLeaderService
Modifier and Type | Method and Description |
---|---|
void |
addJob(JobID jobId,
String defaultTargetAddress)
Add the given job to be monitored.
|
boolean |
containsJob(JobID jobId)
Check whether the service monitors the given job.
|
void |
reconnect(JobID jobId)
Triggers reconnection to the last known leader of the given job.
|
void |
removeJob(JobID jobId)
Remove the given job from being monitored by the job leader service.
|
void |
start(String initialOwnerAddress,
RpcService initialRpcService,
HighAvailabilityServices initialHighAvailabilityServices,
JobLeaderListener initialJobLeaderListener)
Start the job leader service with the given services.
|
void |
stop()
Stop the job leader services.
|
void start(String initialOwnerAddress, RpcService initialRpcService, HighAvailabilityServices initialHighAvailabilityServices, JobLeaderListener initialJobLeaderListener)
initialOwnerAddress
- to be used for establishing connections (source address)initialRpcService
- to be used to create rpc connectionsinitialHighAvailabilityServices
- to create leader retrieval services for the different
jobsinitialJobLeaderListener
- listening for job leader changesvoid stop() throws Exception
Exception
- if an error occurs while stopping the servicevoid removeJob(JobID jobId)
jobId
- identifying the job to remove from monitoringvoid addJob(JobID jobId, String defaultTargetAddress) throws Exception
jobId
- identifying the job to monitordefaultTargetAddress
- of the job leaderException
- if an error occurs while starting the leader retrieval servicevoid reconnect(JobID jobId)
jobId
- specifying the job for which to trigger reconnectionboolean containsJob(JobID jobId)
jobId
- identifying the jobCopyright © 2014–2022 The Apache Software Foundation. All rights reserved.