public interface IDriver
Modifier and Type | Method and Description |
---|---|
void |
allWorkersJoined(java.util.List<JobMasterAPI.WorkerInfo> workerList)
this method is invoked when all workers joined the job initially
and also, after each scale up operation,
|
void |
execute(Config config,
IScaler scaler,
IDriverMessenger messenger)
After the job is submitted,
an instance of this method will be executed in the Job Master
|
default java.util.Map<java.lang.Integer,java.lang.String> |
getMessages()
get the messages sent by workers to this driver
|
default DriverJobState |
getState()
returns the current state of the driver
|
void |
workerMessageReceived(Any anyMessage,
int senderWorkerID)
received a protocol buffer message from a worker
|
void execute(Config config, IScaler scaler, IDriverMessenger messenger)
Implementing Driver program can communicate with the workers through provided IDriverMessenger and it can scale up/down the number of workers in the job by using IScaler
void workerMessageReceived(Any anyMessage, int senderWorkerID)
anyMessage
- received message from the workervoid allWorkersJoined(java.util.List<JobMasterAPI.WorkerInfo> workerList)
default DriverJobState getState()
default java.util.Map<java.lang.Integer,java.lang.String> getMessages()