|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectml.shifu.guagua.unit.GuaguaUnitDriver<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 GuaguaUnitDriver<MASTER_RESULT extends Bytable,WORKER_RESULT extends Bytable>
GuaguaUnitDriver is a helper class to run master, worker and intercepters in one jvm instance.
One should provide all the properties by using GuaguaUnitDriver(Properties).
| 构造方法摘要 | |
|---|---|
GuaguaUnitDriver(Properties props)
Constructor with props setting. |
|
| 方法摘要 | |
|---|---|
protected void |
doRun()
Real running logic |
abstract List<GuaguaFileSplit[]> |
generateWorkerSplits(String inputs)
Generate file splits according to inputs. |
void |
run()
To run master-workers iteration. |
protected void |
setUp()
|
protected void |
tearDown()
|
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 构造方法详细信息 |
|---|
public GuaguaUnitDriver(Properties props)
props setting.
To make it work, please make sure you set parameters in below:
props.setProperty(GuaguaConstants.MASTER_COMPUTABLE_CLASS, SumMaster.class.getName()); props.setProperty(GuaguaConstants.WORKER_COMPUTABLE_CLASS, SumWorker.class.getName()); props.setProperty(GuaguaConstants.GUAGUA_ITERATION_COUNT, "10"); props.setProperty(GuaguaConstants.GUAGUA_WORKER_NUMBER, "3"); props.setProperty(GuaguaConstants.GUAGUA_MASTER_RESULT_CLASS, LongWritable.class.getName()); props.setProperty(GuaguaConstants.GUAGUA_WORKER_RESULT_CLASS, LongWritable.class.getName()); props.setProperty(GuaguaConstants.GUAGUA_WORKER_RESULT_CLASS, LongWritable.class.getName());
| 方法详细信息 |
|---|
public abstract List<GuaguaFileSplit[]> generateWorkerSplits(String inputs)
throws IOException
IOExceptionprotected void setUp()
public void run()
protected void doRun()
protected void tearDown()
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||