public class NettyMasterCoordinator<MASTER_RESULT extends Bytable,WORKER_RESULT extends Bytable> extends AbstractMasterCoordinator<MASTER_RESULT,WORKER_RESULT>
Master still updates results to ZooKeeper znodes for fail-over. While workers sends results to master through Netty server connection.
Worker results are persisted into MemoryDiskList, the reason is that for big model, limited memory may not be
enough to store all worker results in memory.
AbstractMasterCoordinator.FailOverCommand, AbstractMasterCoordinator.MasterElectionCommandBasicCoordinator.BasicCoordinatorCommand, BasicCoordinator.CoordinatorCommand, BasicCoordinator.GetSplitBytes, BasicCoordinator.RetryCoordinatorCommand, BasicCoordinator.SaveResultToZookeeperWAIT_SLOT_MILLS| Constructor and Description |
|---|
NettyMasterCoordinator() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
initialize(Properties props)
Coordinator initialization.
|
void |
postApplication(MasterContext<MASTER_RESULT,WORKER_RESULT> context)
Wait for unregister message for all workers and then clean all znodes existing for this job.
|
void |
postIteration(MasterContext<MASTER_RESULT,WORKER_RESULT> context)
Update master computable result to master znode.
|
void |
preApplication(MasterContext<MASTER_RESULT,WORKER_RESULT> context)
Do initialization and fail-over checking before all iterations.
|
void |
preIteration(MasterContext<MASTER_RESULT,WORKER_RESULT> context)
Wait for all workers done in current iteration.
|
getMyBid, isAllWorkersHalt, setMasterResult, setMyBid, setWorkerResults, updateMasterHaltStatuscheckAndSetZooKeeper, close, getAppNode, getBaseMasterElectionNode, getBytesFromZNode, getCurrentMasterNode, getCurrentMasterSplitNode, getCurrentWorkerNode, getCurrentWorkerSplitNode, getLastMasterNode, getLastWorkerNode, getMasterBaseNode, getMasterElectionNode, getMasterNode, getMasterSerializer, getRootNode, getSleepTime, getWorkerBaseNode, getWorkerBaseNode, getWorkerNode, getWorkerSerializer, getZkConnLatch, getZooKeeper, isFixedTime, process, setBytesToZNode, setFixedTime, setMasterSerializer, setSleepTime, setWorkerSerializer, setZooKeeper, startHeartbeat, stopHeartBeatprotected void initialize(Properties props)
BasicCoordinatorinitialize in class BasicCoordinator<MASTER_RESULT extends Bytable,WORKER_RESULT extends Bytable>public void preApplication(MasterContext<MASTER_RESULT,WORKER_RESULT> context)
context - the master context instance which includes worker results and other useful parameters.public void preIteration(MasterContext<MASTER_RESULT,WORKER_RESULT> context)
context - the master context instance which includes worker results and other useful parameters.public void postIteration(MasterContext<MASTER_RESULT,WORKER_RESULT> context)
postIteration in interface MasterInterceptor<MASTER_RESULT extends Bytable,WORKER_RESULT extends Bytable>postIteration in class AbstractMasterCoordinator<MASTER_RESULT extends Bytable,WORKER_RESULT extends Bytable>context - the master context instance which includes worker results and other useful parameters.public void postApplication(MasterContext<MASTER_RESULT,WORKER_RESULT> context)
postApplication in interface MasterInterceptor<MASTER_RESULT extends Bytable,WORKER_RESULT extends Bytable>postApplication in class AbstractMasterCoordinator<MASTER_RESULT extends Bytable,WORKER_RESULT extends Bytable>context - the master context instance which includes worker results and other useful parameters.Copyright © 2015. All Rights Reserved.