ml.shifu.guagua.mapreduce
类 GuaguaMRUnitDriver<MASTER_RESULT extends ml.shifu.guagua.io.Bytable,WORKER_RESULT extends ml.shifu.guagua.io.Bytable>

java.lang.Object
  继承者 ml.shifu.guagua.unit.GuaguaUnitDriver<MASTER_RESULT,WORKER_RESULT>
      继承者 ml.shifu.guagua.mapreduce.GuaguaMRUnitDriver<MASTER_RESULT,WORKER_RESULT>
类型参数:
MASTER_RESULT - master result for computation in each iteration.
WORKER_RESULT - worker result for computation in each iteration.

public class GuaguaMRUnitDriver<MASTER_RESULT extends ml.shifu.guagua.io.Bytable,WORKER_RESULT extends ml.shifu.guagua.io.Bytable>
extends ml.shifu.guagua.unit.GuaguaUnitDriver<MASTER_RESULT,WORKER_RESULT>

GuaguaMRUnitDriver is used to run in-memory guagua application by using hadoop MapReduce splits.

另请参见:
in guagua-mapreduce-examples project.

构造方法摘要
GuaguaMRUnitDriver(Properties props)
          A only constructor here for local in-memory guagua job.
 
方法摘要
 List<ml.shifu.guagua.io.GuaguaFileSplit[]> generateWorkerSplits(String inputs)
           
protected  List<org.apache.hadoop.fs.FileStatus> listStatus(org.apache.hadoop.conf.Configuration conf, String input)
          List input directories.
 
从类 ml.shifu.guagua.unit.GuaguaUnitDriver 继承的方法
doRun, run, setUp, tearDown
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

GuaguaMRUnitDriver

public GuaguaMRUnitDriver(Properties props)
A only constructor here for local in-memory guagua job.

参数:
props - set all the configurations like input, output and ..
另请参见:
in guagua-mapreduce-examples project.
方法详细信息

generateWorkerSplits

public List<ml.shifu.guagua.io.GuaguaFileSplit[]> generateWorkerSplits(String inputs)
                                                                throws IOException
指定者:
ml.shifu.guagua.unit.GuaguaUnitDriver<MASTER_RESULT extends ml.shifu.guagua.io.Bytable,WORKER_RESULT extends ml.shifu.guagua.io.Bytable> 中的 generateWorkerSplits
抛出:
IOException

listStatus

protected List<org.apache.hadoop.fs.FileStatus> listStatus(org.apache.hadoop.conf.Configuration conf,
                                                           String input)
                                                    throws IOException
List input directories. Subclasses may override to, e.g., select only files matching a regular expression.

参数:
job - the job to list input paths for
返回:
array of FileStatus objects
抛出:
IOException - if zero items.
org.apache.hadoop.mapreduce.lib.input.InvalidInputException - If any IOException for input files.


Copyright © 2014. All Rights Reserved.