ml.shifu.guagua.worker
接口 WorkerComputable<MASTER_RESULT extends Bytable,WORKER_RESULT extends Bytable>

类型参数:
MASTER_RESULT - master result for computation in each iteration.
WORKER_RESULT - worker result for computation in each iteration.
所有已知实现类:
AbstractWorkerComputable

public interface WorkerComputable<MASTER_RESULT extends Bytable,WORKER_RESULT extends Bytable>

Worker computation interface for an application.

The absolute flexibility for customers to use with only compute(WorkerContext) function.

If you'd like to load data then computation, you can implement such logic in compute(WorkerContext) to leave some template functions. We do it in guagua-mapreduce project.


方法摘要
 WORKER_RESULT compute(WorkerContext<MASTER_RESULT,WORKER_RESULT> context)
          Computation for each iteration.
 

方法详细信息

compute

WORKER_RESULT compute(WorkerContext<MASTER_RESULT,WORKER_RESULT> context)
                                      throws IOException
Computation for each iteration.

参数:
context - worker context instance which includes worker info for each iteration.
抛出:
IOException - If any io exception in computation, for example, IOException in reading data.


Copyright © 2014. All Rights Reserved.