public class WorkerManager extends java.lang.Object implements IWorkerFailureListener, IJobMasterFailureListener
Constructor and Description |
---|
WorkerManager(Config config,
JobAPI.Job job,
IWorkerController workerController,
IPersistentVolume persistentVolume,
IVolatileVolume volatileVolume,
IWorker worker) |
Modifier and Type | Method and Description |
---|---|
boolean |
execute()
Execute IWorker
return false if IWorker fails fully after retries
return true if execution successful
throw an exception if execution fails and the worker needs to be restarted from jvm
|
void |
failed(int wID)
let the listener know that a worker failed
|
void |
jmFailed()
informs when the job master fails.
|
void |
jmRestarted(java.lang.String jobMasterAddress)
informs when the job master rejoins after failure
|
void |
restarted(JobMasterAPI.WorkerInfo workerInfo)
let the listener know that previously failed worker rejoined the job
|
public WorkerManager(Config config, JobAPI.Job job, IWorkerController workerController, IPersistentVolume persistentVolume, IVolatileVolume volatileVolume, IWorker worker)
public boolean execute()
public void failed(int wID)
IWorkerFailureListener
failed
in interface IWorkerFailureListener
public void restarted(JobMasterAPI.WorkerInfo workerInfo)
IWorkerFailureListener
restarted
in interface IWorkerFailureListener
public void jmFailed()
IJobMasterFailureListener
jmFailed
in interface IJobMasterFailureListener
public void jmRestarted(java.lang.String jobMasterAddress)
IJobMasterFailureListener
jmRestarted
in interface IJobMasterFailureListener