public interface IWorkerController
Modifier and Type | Method and Description |
---|---|
java.util.List<JobMasterAPI.WorkerInfo> |
getAllWorkers()
get all workers in the job.
|
default CheckpointingClient |
getCheckpointingClient() |
default IWorkerFailureListener |
getFailureListener()
Get the failure listener
|
java.util.List<JobMasterAPI.WorkerInfo> |
getJoinedWorkers()
get all joined workers in this job, including the ones finished execution
if there are some workers that have not joined yet, they may not be included in this list.
|
int |
getNumberOfWorkers()
return the number of all workers in this job,
including non-started ones and finished ones
|
JobMasterAPI.WorkerInfo |
getWorkerInfo()
return the WorkerInfo object for this worker
|
JobMasterAPI.WorkerInfo |
getWorkerInfoForID(int id)
return the WorkerInfo object for the given ID
|
void |
waitOnBarrier()
wait for all workers in the job to arrive at this barrier
After waiting for the timeout specified in ControllerContext.maxWaitTimeOnBarrier
if some workers still could not arrive at the barrier, throw an exception
|
void |
waitOnBarrier(long timeLimit)
wait for all workers in the job to arrive at this barrier
After waiting for the timeLimit,
if some workers still could not arrive at the barrier, throw an exception
|
void |
waitOnInitBarrier()
this barrier is used when initializing the workers.
|
int |
workerRestartCount()
get worker restartCount
zero means starting for the first time
|
JobMasterAPI.WorkerInfo getWorkerInfo()
JobMasterAPI.WorkerInfo getWorkerInfoForID(int id)
int getNumberOfWorkers()
int workerRestartCount()
java.util.List<JobMasterAPI.WorkerInfo> getJoinedWorkers()
java.util.List<JobMasterAPI.WorkerInfo> getAllWorkers() throws TimeoutException
return all workers in the job including the ones that have already left, if any
TimeoutException
void waitOnBarrier() throws TimeoutException, JobFaultyException
TimeoutException
JobFaultyException
void waitOnBarrier(long timeLimit) throws TimeoutException, JobFaultyException
TimeoutException
JobFaultyException
void waitOnInitBarrier() throws TimeoutException
TimeoutException
default IWorkerFailureListener getFailureListener()
default CheckpointingClient getCheckpointingClient()