|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectml.shifu.guagua.master.GuaguaMasterService<MASTER_RESULT,WORKER_RESULT>
MASTER_RESULT - master computation result in each iteration.WORKER_RESULT - worker computation result in each iteration.public class GuaguaMasterService<MASTER_RESULT extends Bytable,WORKER_RESULT extends Bytable>
GuaguaMasterService is the basic implementation as a master for whole guagua application process.
All the properties used to create computable instance, interceptor instances are set in props.
After masterComputable, masterInterceptors are constructed, they will be used in start(),
run(Progressable), stop() to do the whole iteration logic.
GuaguaMasterService is only a skeleton and all implementations are in the interceptors and computable classes
defined by user.
The execution order of preXXXX is different with postXXXX. For preXXX, the order is FIFO, but for postXXX, the order is FILO.
| 构造方法摘要 | |
|---|---|
GuaguaMasterService()
|
|
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 构造方法详细信息 |
|---|
public GuaguaMasterService()
| 方法详细信息 |
|---|
public void start()
GuaguaService 复制的描述
GuaguaService 中的 startpublic void run(Progressable progress)
MasterComputable.compute(MasterContext), and set hook point before and after each iteration.
GuaguaService 中的 run
protected MASTER_RESULT iterate(MasterContext<MASTER_RESULT,WORKER_RESULT> context,
int iteration,
Progressable progress)
public void stop()
GuaguaService 中的 stoppublic void init(Properties props)
GuaguaService 中的 initprops - which contains different properties for master and workers to use.public void setSplits(List<GuaguaFileSplit> splits)
GuaguaService 复制的描述
GuaguaService 中的 setSplitspublic String getAppId()
public void setAppId(String appId)
GuaguaService 复制的描述
GuaguaService 中的 setAppIdpublic String getContainerId()
public void setContainerId(String containerId)
GuaguaService 复制的描述
GuaguaService 中的 setContainerIdpublic MasterContext<MASTER_RESULT,WORKER_RESULT> getContext()
public MasterComputable<MASTER_RESULT,WORKER_RESULT> getMasterComputable()
public void setMasterComputable(MasterComputable<MASTER_RESULT,WORKER_RESULT> masterComputable)
public List<MasterInterceptor<MASTER_RESULT,WORKER_RESULT>> getMasterInterceptors()
public void setMasterInterceptors(List<MasterInterceptor<MASTER_RESULT,WORKER_RESULT>> masterInterceptors)
public void addMasterInterceptors(MasterInterceptor<MASTER_RESULT,WORKER_RESULT> masterInterceptor)
public int getTotalIteration()
public void setTotalIteration(int totalIteration)
public int getWorkers()
public void setWorkers(int workers)
public Properties getProps()
public void setProps(Properties props)
public String getMasterResultClassName()
public void setMasterResultClassName(String masterResultClassName)
public String getWorkerResultClassName()
public void setWorkerResultClassName(String workerResultClassName)
public double getMinWorkersRatio()
public long getMinWorkersTimeOut()
public void setMinWorkersRatio(double minWorkersRatio)
public void setMinWorkersTimeOut(long minWorkersTimeOut)
public InMemoryCoordinator<MASTER_RESULT,WORKER_RESULT> getCoordinator()
public void setCoordinator(InMemoryCoordinator<MASTER_RESULT,WORKER_RESULT> coordinator)
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||