|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectml.shifu.guagua.BasicCoordinator<MASTER_RESULT,WORKER_RESULT>
ml.shifu.guagua.master.AbstractMasterCoordinator<MASTER_RESULT,WORKER_RESULT>
MASTER_RESULT - master result for computation in each iteration.WORKER_RESULT - worker result for computation in each iteration.public abstract class AbstractMasterCoordinator<MASTER_RESULT extends Bytable,WORKER_RESULT extends Bytable>
AbstractMasterCoordinator has some common implementation for both async and sync worker coordinator.
Common functions include: znodes cleaning up, fail-over support and others.
| 嵌套类摘要 | |
|---|---|
protected class |
AbstractMasterCoordinator.FailOverCommand
AbstractMasterCoordinator.FailOverCommand is used to read last iteration before task failed. |
protected class |
AbstractMasterCoordinator.MasterElectionCommand
Elect master from several backup masters. |
| 从类 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 |
| 构造方法摘要 | |
|---|---|
AbstractMasterCoordinator()
|
|
| 方法摘要 | |
|---|---|
String |
getMyBid()
|
protected boolean |
isAllWorkersHalt(Iterable<WORKER_RESULT> workerResults)
Check whether all workers are halted. |
void |
postApplication(MasterContext<MASTER_RESULT,WORKER_RESULT> context)
The hook point after any computation logic. |
void |
postIteration(MasterContext<MASTER_RESULT,WORKER_RESULT> context)
The hook point after computation of each iteration. |
void |
setMyBid(String myBid)
|
protected void |
setWorkerResults(MasterContext<MASTER_RESULT,WORKER_RESULT> context,
String appCurrentWorkersNode,
String appId,
int iteration)
Set worker results from znodes. |
protected void |
updateMasterHaltStatus(MasterContext<MASTER_RESULT,WORKER_RESULT> context)
Check whether GuaguaConstants.GUAGUA_WORKER_HALT_ENABLE) is enabled, if yes, check whether all workers are halted and update master status. |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 从接口 ml.shifu.guagua.master.MasterInterceptor 继承的方法 |
|---|
preApplication, preIteration |
| 构造方法详细信息 |
|---|
public AbstractMasterCoordinator()
| 方法详细信息 |
|---|
public void postIteration(MasterContext<MASTER_RESULT,WORKER_RESULT> context)
MasterInterceptor 复制的描述
MasterInterceptor<MASTER_RESULT extends Bytable,WORKER_RESULT extends Bytable> 中的 postIterationcontext - the master context instance which includes worker results and other useful parameters.public void postApplication(MasterContext<MASTER_RESULT,WORKER_RESULT> context)
MasterInterceptor 复制的描述
MasterInterceptor<MASTER_RESULT extends Bytable,WORKER_RESULT extends Bytable> 中的 postApplicationcontext - the master context instance which includes worker results and other useful parameters.
protected void setWorkerResults(MasterContext<MASTER_RESULT,WORKER_RESULT> context,
String appCurrentWorkersNode,
String appId,
int iteration)
throws org.apache.zookeeper.KeeperException,
InterruptedException
org.apache.zookeeper.KeeperException
InterruptedExceptionprotected void updateMasterHaltStatus(MasterContext<MASTER_RESULT,WORKER_RESULT> context)
protected boolean isAllWorkersHalt(Iterable<WORKER_RESULT> workerResults)
public String getMyBid()
public void setMyBid(String myBid)
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||