public final class WorkerRuntime
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static boolean |
addAllJoinedListener(IAllJoinedListener allJoinedListener)
Add IAllJoinedListener
It may return false, if a listener already added
|
static boolean |
addJMFailureListener(IJobMasterFailureListener jobMasterListener)
add a IJobMasterFailureListener
Currently failure notification is only implemented with ZKWorkerController
A listener can be only added when ZKWorkerController is used.
|
static boolean |
addReceiverFromDriver(IReceiverFromDriver receiverFromDriver)
Add IReceiverFromDriver
It may return false, if a listener already added or
if there is no Driver in the job
|
static boolean |
addScalerListener(IScalerListener scalerListener)
Add IScalerListener
It may return false, if a listener already added or
if there is no Driver in the job
|
static boolean |
addWorkerFailureListener(IWorkerFailureListener workerFailureListener)
add a IWorkerFailureListener
Currently failure notification is only implemented with ZKWorkerController
A listener can be only added when ZKWorkerController is used.
|
static void |
close() |
static IWorkerFailureListener |
getFailureListener()
Get the failure listener
|
static ISenderToDriver |
getSenderToDriver()
ISenderToDriver may be null, if there is no Driver in the job
|
static IWorkerController |
getWorkerController()
get IWorkerController
|
static IWorkerStatusUpdater |
getWorkerStatusUpdater()
get IWorkerStatusUpdater
|
static boolean |
init(Config cnfg,
JobAPI.Job jb,
WorkerInfo wInfo,
int restartCount)
Initialize connections to Job Master or ZooKeeper
|
static boolean |
init(Config cnfg,
MPIWorkerController wc)
Initialize WorkerRuntime with MPIWorkerController
|
public static boolean init(Config cnfg, MPIWorkerController wc)
public static boolean init(Config cnfg, JobAPI.Job jb, WorkerInfo wInfo, int restartCount)
public static IWorkerController getWorkerController()
public static IWorkerStatusUpdater getWorkerStatusUpdater()
public static ISenderToDriver getSenderToDriver()
public static boolean addWorkerFailureListener(IWorkerFailureListener workerFailureListener)
public static IWorkerFailureListener getFailureListener()
public static boolean addAllJoinedListener(IAllJoinedListener allJoinedListener)
public static boolean addReceiverFromDriver(IReceiverFromDriver receiverFromDriver)
public static boolean addScalerListener(IScalerListener scalerListener)
public static boolean addJMFailureListener(IJobMasterFailureListener jobMasterListener)
public static void close()