接口 ml.shifu.guagua.worker.WorkerInterceptor
的使用

使用 WorkerInterceptor 的软件包
ml.shifu.guagua This package contains some common classes for both master and worker. 
ml.shifu.guagua.worker This package contains guagua worker implementation. 
 

ml.shifu.guaguaWorkerInterceptor 的使用
 

返回 WorkerInterceptorml.shifu.guagua 中的方法
 WorkerInterceptor<MASTER_RESULT,WORKER_RESULT> SyncCoordinatorFactory.createWorkerCoordinator()
           
 WorkerInterceptor<MASTER_RESULT,WORKER_RESULT> CoordinatorFactory.createWorkerCoordinator()
          Create coordinator instance for worker.
 WorkerInterceptor<MASTER_RESULT,WORKER_RESULT> AsyncCoordinatorFactory.createWorkerCoordinator()
           
 

ml.shifu.guagua.workerWorkerInterceptor 的使用
 

实现 WorkerInterceptorml.shifu.guagua.worker 中的类
 class AbstractWorkerCoordinator<MASTER_RESULT extends Bytable,WORKER_RESULT extends Bytable>
          AbstractWorkerCoordinator has some common implementation for both async and sync worker coordinator.
 class AsyncWorkerCoordinator<MASTER_RESULT extends Bytable,WORKER_RESULT extends Bytable>
          AsyncWorkerCoordinator is used to as a worker barrier for each iteration.
 class BasicWorkerInterceptor<MASTER_RESULT extends Bytable,WORKER_RESULT extends Bytable>
          Empty WorkerInterceptor implementation for user to choose which function should be override.
 class LocalWorkerCoordinator<MASTER_RESULT extends Bytable,WORKER_RESULT extends Bytable>
          LocalWorkerCoordinator is local coordinator implementation in one jvm instance.
 class MemoryStatsWorkerInterceptor<MASTER_RESULT extends Bytable,WORKER_RESULT extends Bytable>
          MemoryStatsWorkerInterceptor is used to print memory usage for each worker checkpoint.
 class NettyWorkerCoordinator<MASTER_RESULT extends Bytable,WORKER_RESULT extends Bytable>
          Worker coordinator coordinates master with Netty client channel.
 class SyncWorkerCoordinator<MASTER_RESULT extends Bytable,WORKER_RESULT extends Bytable>
          SyncWorkerCoordinator is used to as a worker barrier for each iteration.
 class TraceWorkerInterceptor<MASTER_RESULT extends Bytable,WORKER_RESULT extends Bytable>
          TraceWorkerInterceptor is used to trace whole application process.
 class WorkerComputableTimer<MASTER_RESULT extends Bytable,WORKER_RESULT extends Bytable>
          WorkerComputableTimer is used to print execution time for master computation function.
 class WorkerTimer<MASTER_RESULT extends Bytable,WORKER_RESULT extends Bytable>
          WorkerTimer is used to log execution time of preXXXX of interceptors, worker computation and postXXXX of interceptors.
 

返回变量类型为 WorkerInterceptor 的类型的 ml.shifu.guagua.worker 中的方法
 List<WorkerInterceptor<MASTER_RESULT,WORKER_RESULT>> GuaguaWorkerService.getWorkerInterceptors()
           
 

类型变量类型为 WorkerInterceptorml.shifu.guagua.worker 中的方法参数
 void GuaguaWorkerService.setWorkerInterceptors(List<WorkerInterceptor<MASTER_RESULT,WORKER_RESULT>> workerInterceptors)
           
 



Copyright © 2015. All Rights Reserved.