ml.shifu.guagua.worker
类 AbstractWorkerCoordinator<MASTER_RESULT extends Bytable,WORKER_RESULT extends Bytable>

java.lang.Object
  继承者 ml.shifu.guagua.BasicCoordinator<MASTER_RESULT,WORKER_RESULT>
      继承者 ml.shifu.guagua.worker.AbstractWorkerCoordinator<MASTER_RESULT,WORKER_RESULT>
类型参数:
MASTER_RESULT - master result for computation in each iteration.
WORKER_RESULT - worker result for computation in each iteration.
所有已实现的接口:
WorkerInterceptor<MASTER_RESULT,WORKER_RESULT>, org.apache.zookeeper.Watcher
直接已知子类:
AsyncWorkerCoordinator, NettyWorkerCoordinator, SyncWorkerCoordinator

public abstract class AbstractWorkerCoordinator<MASTER_RESULT extends Bytable,WORKER_RESULT extends Bytable>
extends BasicCoordinator<MASTER_RESULT,WORKER_RESULT>
implements WorkerInterceptor<MASTER_RESULT,WORKER_RESULT>

AbstractWorkerCoordinator has some common implementation for both async and sync worker coordinator.

Common functions include: znodes cleaning up, fail-over support and others.


嵌套类摘要
protected  class AbstractWorkerCoordinator.FailOverCoordinatorCommand
           
 
从类 ml.shifu.guagua.BasicCoordinator 继承的嵌套类/接口
BasicCoordinator.BasicCoordinatorCommand, BasicCoordinator.CoordinatorCommand, BasicCoordinator.RetryCoordinatorCommand
 
从接口 org.apache.zookeeper.Watcher 继承的嵌套类/接口
org.apache.zookeeper.Watcher.Event
 
字段摘要
 
从类 ml.shifu.guagua.BasicCoordinator 继承的字段
WAIT_SLOT_MILLS
 
构造方法摘要
AbstractWorkerCoordinator()
           
 
方法摘要
 void postApplication(WorkerContext<MASTER_RESULT,WORKER_RESULT> context)
          The hook point after any computation logic.
 void preIteration(WorkerContext<MASTER_RESULT,WORKER_RESULT> context)
          The hook point before computation of each iteration.
protected  void setMasterResult(WorkerContext<MASTER_RESULT,WORKER_RESULT> context, String appMasterNode, String appMasterSplitNode)
           
 
从类 ml.shifu.guagua.BasicCoordinator 继承的方法
checkAndSetZooKeeper, closeZooKeeper, getAppNode, getBaseMasterElectionNode, getBytesFromZNode, getCurrentMasterNode, getCurrentMasterSplitNode, getCurrentWorkerNode, getCurrentWorkerSplitNode, getLastMasterNode, getLastWorkerNode, getMasterBaseNode, getMasterElectionNode, getMasterNode, getMasterSerializer, getRootNode, getSleepTime, getWorkerBaseNode, getWorkerBaseNode, getWorkerNode, getWorkerSerializer, getZkConnLatch, getZooKeeper, initialize, isFixedTime, process, setBytesToZNode, setFixedTime, setMasterSerializer, setSleepTime, setWorkerSerializer, setZooKeeper, startHeartbeat, stopHeartBeat
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
从接口 ml.shifu.guagua.worker.WorkerInterceptor 继承的方法
postIteration, preApplication
 

构造方法详细信息

AbstractWorkerCoordinator

public AbstractWorkerCoordinator()
方法详细信息

preIteration

public void preIteration(WorkerContext<MASTER_RESULT,WORKER_RESULT> context)
从接口 WorkerInterceptor 复制的描述
The hook point before computation of each iteration.

指定者:
接口 WorkerInterceptor<MASTER_RESULT extends Bytable,WORKER_RESULT extends Bytable> 中的 preIteration
参数:
context - the worker context instance which includes master result and other useful parameters.

postApplication

public void postApplication(WorkerContext<MASTER_RESULT,WORKER_RESULT> context)
从接口 WorkerInterceptor 复制的描述
The hook point after any computation logic.

指定者:
接口 WorkerInterceptor<MASTER_RESULT extends Bytable,WORKER_RESULT extends Bytable> 中的 postApplication
参数:
context - the worker context instance which includes master result and other useful parameters.

setMasterResult

protected void setMasterResult(WorkerContext<MASTER_RESULT,WORKER_RESULT> context,
                               String appMasterNode,
                               String appMasterSplitNode)
                        throws org.apache.zookeeper.KeeperException,
                               InterruptedException
抛出:
org.apache.zookeeper.KeeperException
InterruptedException


Copyright © 2015. All Rights Reserved.