MASTER_RESULT - master result for computation in each iteration.WORKER_RESULT - worker result for computation in each iteration.public class LocalMasterCoordinator<MASTER_RESULT extends Bytable,WORKER_RESULT extends Bytable> extends BasicMasterInterceptor<MASTER_RESULT,WORKER_RESULT>
LocalMasterCoordinator is local coordinator implementation in one jvm instance.
LocalMasterCoordinator is a proxy and coordinator has the real logic to coordinate master and
workers. coordinator should be set by using the same instance with InternalWorkerCoordinator.
| Constructor and Description |
|---|
LocalMasterCoordinator() |
| Modifier and Type | Method and Description |
|---|---|
void |
postIteration(MasterContext<MASTER_RESULT,WORKER_RESULT> context)
The hook point after computation of each iteration.
|
void |
preApplication(MasterContext<MASTER_RESULT,WORKER_RESULT> context)
The hook point before any computation logic.
|
void |
preIteration(MasterContext<MASTER_RESULT,WORKER_RESULT> context)
The hook point before computation of each iteration.
|
void |
setCoordinator(InMemoryCoordinator<MASTER_RESULT,WORKER_RESULT> coordinator) |
postApplicationpublic void preApplication(MasterContext<MASTER_RESULT,WORKER_RESULT> context)
MasterInterceptorpreApplication in interface MasterInterceptor<MASTER_RESULT extends Bytable,WORKER_RESULT extends Bytable>preApplication in class BasicMasterInterceptor<MASTER_RESULT extends Bytable,WORKER_RESULT extends Bytable>context - the master context instance which includes worker results and other useful parameters.public void preIteration(MasterContext<MASTER_RESULT,WORKER_RESULT> context)
MasterInterceptorpreIteration in interface MasterInterceptor<MASTER_RESULT extends Bytable,WORKER_RESULT extends Bytable>preIteration in class BasicMasterInterceptor<MASTER_RESULT extends Bytable,WORKER_RESULT extends Bytable>context - the master context instance which includes worker results and other useful parameters.public void postIteration(MasterContext<MASTER_RESULT,WORKER_RESULT> context)
MasterInterceptorpostIteration in interface MasterInterceptor<MASTER_RESULT extends Bytable,WORKER_RESULT extends Bytable>postIteration in class BasicMasterInterceptor<MASTER_RESULT extends Bytable,WORKER_RESULT extends Bytable>context - the master context instance which includes worker results and other useful parameters.public void setCoordinator(InMemoryCoordinator<MASTER_RESULT,WORKER_RESULT> coordinator)
Copyright © 2019. All Rights Reserved.