|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
MASTER_RESULT - master result for computation in each iteration.WORKER_RESULT - worker result for computation in each iteration.public interface WorkerInterceptor<MASTER_RESULT extends Bytable,WORKER_RESULT extends Bytable>
WorkerInterceptor is a entry point for all services in worker implementation.
You can add your coordinator mechanism by using one WorkerInterceptor; you can also save each iteration
result by override WorkerIntercepter#postApplication(MasterContext).
For a list of intercepters, the order to call preXXX methods and postXXX methods is different. For example, a and b two intercepters. The order is a.preApplication->b.preApplication->a.preIteration->b.preIteration->computation->b.postIteration ->a.postIteration->b.postApplication->a.postApplication. This is like call stack to make sure each intercepter to intercept the whole other intercepters and computations.
| 方法摘要 | |
|---|---|
void |
postApplication(WorkerContext<MASTER_RESULT,WORKER_RESULT> context)
The hook point for each application or each mapreduce job which is after all iterations completed. |
void |
postIteration(WorkerContext<MASTER_RESULT,WORKER_RESULT> context)
The hook point for each iteration which is after WorkerComputable.compute(WorkerContext). |
void |
preApplication(WorkerContext<MASTER_RESULT,WORKER_RESULT> context)
The hook point for each application or each mapreduce job which is before all iterations started. |
void |
preIteration(WorkerContext<MASTER_RESULT,WORKER_RESULT> context)
The hook point for each iteration which is before WorkerComputable.compute(WorkerContext). |
| 方法详细信息 |
|---|
void preApplication(WorkerContext<MASTER_RESULT,WORKER_RESULT> context)
void preIteration(WorkerContext<MASTER_RESULT,WORKER_RESULT> context)
WorkerComputable.compute(WorkerContext).
void postIteration(WorkerContext<MASTER_RESULT,WORKER_RESULT> context)
WorkerComputable.compute(WorkerContext).
void postApplication(WorkerContext<MASTER_RESULT,WORKER_RESULT> context)
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||