Constructor and Description |
---|
DefaultDriver() |
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
|
java.util.Map<java.lang.Integer,java.lang.String> |
getMessages()
get the messages sent by workers to this driver
|
DriverJobState |
getState()
returns the current state of the driver
|
void |
workerMessageReceived(Any anyMessage,
int senderWorkerID)
received a protocol buffer message from a worker
|
public void execute(Config config, IScaler scaler, IDriverMessenger messenger)
IDriver
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
public void workerMessageReceived(Any anyMessage, int senderWorkerID)
IDriver
workerMessageReceived
in interface IDriver
anyMessage
- received message from the workerpublic void allWorkersJoined(java.util.List<JobMasterAPI.WorkerInfo> workerList)
IDriver
allWorkersJoined
in interface IDriver
public DriverJobState getState()
IDriver
public java.util.Map<java.lang.Integer,java.lang.String> getMessages()
IDriver
getMessages
in interface IDriver