MASTER_RESULT - master result for computation in each iteration.WORKER_RESULT - worker result for computation in each iteration.public class LocalWorkerCoordinator<MASTER_RESULT extends Bytable,WORKER_RESULT extends Bytable> extends BasicWorkerInterceptor<MASTER_RESULT,WORKER_RESULT>
LocalWorkerCoordinator is local coordinator implementation in one jvm instance.
LocalWorkerCoordinator 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 |
|---|
LocalWorkerCoordinator() |
| Modifier and Type | Method and Description |
|---|---|
void |
postIteration(WorkerContext<MASTER_RESULT,WORKER_RESULT> context)
The hook point after computation of each iteration.
|
void |
preApplication(WorkerContext<MASTER_RESULT,WORKER_RESULT> context)
The hook point before any computation logic.
|
void |
preIteration(WorkerContext<MASTER_RESULT,WORKER_RESULT> context)
The hook point before computation of each iteration.
|
void |
setCoordinator(InMemoryCoordinator<MASTER_RESULT,WORKER_RESULT> coordinator) |
postApplicationpublic void preApplication(WorkerContext<MASTER_RESULT,WORKER_RESULT> context)
WorkerInterceptorpreApplication in interface WorkerInterceptor<MASTER_RESULT extends Bytable,WORKER_RESULT extends Bytable>preApplication in class BasicWorkerInterceptor<MASTER_RESULT extends Bytable,WORKER_RESULT extends Bytable>context - the worker context instance which includes master result and other useful parameters.public void preIteration(WorkerContext<MASTER_RESULT,WORKER_RESULT> context)
WorkerInterceptorpreIteration in interface WorkerInterceptor<MASTER_RESULT extends Bytable,WORKER_RESULT extends Bytable>preIteration in class BasicWorkerInterceptor<MASTER_RESULT extends Bytable,WORKER_RESULT extends Bytable>context - the worker context instance which includes master result and other useful parameters.public void postIteration(WorkerContext<MASTER_RESULT,WORKER_RESULT> context)
WorkerInterceptorpostIteration in interface WorkerInterceptor<MASTER_RESULT extends Bytable,WORKER_RESULT extends Bytable>postIteration in class BasicWorkerInterceptor<MASTER_RESULT extends Bytable,WORKER_RESULT extends Bytable>context - the worker context instance which includes master result and other useful parameters.public void setCoordinator(InMemoryCoordinator<MASTER_RESULT,WORKER_RESULT> coordinator)
Copyright © 2018. All Rights Reserved.