public class MapReduceDriver<K1,V1,K2,V2,K3,V3> extends MapReduceDriverBase<K1,V1,K2,V2,K3,V3,MapReduceDriver<K1,V1,K2,V2,K3,V3>>
| Modifier and Type | Field and Description |
|---|---|
static org.apache.commons.logging.Log |
LOG |
inputList, keyGroupComparator, keyValueOrderComparator, mapInputPathcounterWrapper, expectedEnumCounters, expectedMultipleOutputs, expectedOutputs, expectedPathOutputs, expectedStringCounters, mos| Constructor and Description |
|---|
MapReduceDriver() |
MapReduceDriver(org.apache.hadoop.mapreduce.Mapper<K1,V1,K2,V2> m,
org.apache.hadoop.mapreduce.Reducer<K2,V2,K3,V3> r) |
MapReduceDriver(org.apache.hadoop.mapreduce.Mapper<K1,V1,K2,V2> m,
org.apache.hadoop.mapreduce.Reducer<K2,V2,K3,V3> r,
org.apache.hadoop.mapreduce.Reducer<K2,V2,K2,V2> c) |
| Modifier and Type | Method and Description |
|---|---|
org.apache.hadoop.mapreduce.Reducer<K2,V2,K2,V2> |
getCombiner() |
org.apache.hadoop.mapreduce.Counters |
getCounters() |
org.apache.hadoop.mapreduce.Mapper<K1,V1,K2,V2> |
getMapper() |
org.apache.hadoop.mapreduce.Reducer<K2,V2,K3,V3> |
getReducer() |
static <K1,V1,K2,V2,K3,V3> |
newMapReduceDriver()
Returns a new MapReduceDriver without having to specify the generic types
on the right hand side of the object create statement.
|
static <K1,V1,K2,V2,K3,V3> |
newMapReduceDriver(org.apache.hadoop.mapreduce.Mapper<K1,V1,K2,V2> mapper,
org.apache.hadoop.mapreduce.Reducer<K2,V2,K3,V3> reducer)
Returns a new MapReduceDriver without having to specify the generic types
on the right hand side of the object create statement.
|
static <K1,V1,K2,V2,K3,V3> |
newMapReduceDriver(org.apache.hadoop.mapreduce.Mapper<K1,V1,K2,V2> mapper,
org.apache.hadoop.mapreduce.Reducer<K2,V2,K3,V3> reducer,
org.apache.hadoop.mapreduce.Reducer<K2,V2,K2,V2> combiner)
Returns a new MapReduceDriver without having to specify the generic types
on the right hand side of the object create statement.
|
List<Pair<K3,V3>> |
run()
Runs the test but returns the result set instead of validating it (ignores
any addOutput(), etc calls made before this)
|
void |
setCombiner(org.apache.hadoop.mapreduce.Reducer<K2,V2,K2,V2> c)
Sets the reducer object to use as a combiner for this test
|
void |
setCounters(org.apache.hadoop.mapreduce.Counters ctrs)
Sets the counters object to use for this test.
|
void |
setMapper(org.apache.hadoop.mapreduce.Mapper<K1,V1,K2,V2> m)
Set the Mapper instance to use with this test driver
|
void |
setReducer(org.apache.hadoop.mapreduce.Reducer<K2,V2,K3,V3> r)
Sets the reducer object to use for this test
|
protected List<KeyValueReuseList<K2,V2>> |
sortAndGroup(List<Pair<K2,V2>> mapOutputs) |
String |
toString() |
MapReduceDriver<K1,V1,K2,V2,K3,V3> |
withCombiner(org.apache.hadoop.mapreduce.Reducer<K2,V2,K2,V2> c)
Identical to setCombiner(), but with fluent programming style
|
MapReduceDriver<K1,V1,K2,V2,K3,V3> |
withCounters(org.apache.hadoop.mapreduce.Counters ctrs)
Sets the counters to use and returns self for fluent style
|
MapReduceDriver<K1,V1,K2,V2,K3,V3> |
withMapper(org.apache.hadoop.mapreduce.Mapper<K1,V1,K2,V2> m)
Sets the Mapper instance to use and returns self for fluent style
|
MapReduceDriver<K1,V1,K2,V2,K3,V3> |
withOutputFormat(Class<? extends org.apache.hadoop.mapreduce.OutputFormat> outputFormatClass,
Class<? extends org.apache.hadoop.mapreduce.InputFormat> inputFormatClass)
Configure
Reducer to output with a real OutputFormat. |
MapReduceDriver<K1,V1,K2,V2,K3,V3> |
withReducer(org.apache.hadoop.mapreduce.Reducer<K2,V2,K3,V3> r)
Identical to setReducer(), but with fluent programming style
|
addAll, addInput, addInput, addInputFromString, getMapInputPath, preRunChecks, setKeyGroupingComparator, setKeyOrderComparator, setMapInputPath, withAll, withInput, withInput, withInputFromString, withKeyGroupingComparator, withKeyOrderComparator, withMapInputPathaddAllOutput, addCacheArchive, addCacheArchive, addCacheFile, addCacheFile, addMultiOutput, addMultiOutput, addOutput, addOutput, addOutputFromString, cleanupDistributedCache, copy, copyPair, driverReused, formatPairList, formatValueList, getConfiguration, getExpectedEnumCounters, getExpectedOutputs, getExpectedStringCounters, getKeyComparator, getOutputSerializationConfiguration, getValueComparator, initDistributedCache, parseCommaDelimitedList, parseTabbedPair, printPreTestDebugLog, resetExpectedCounters, resetOutput, run, runTest, runTest, setCacheArchives, setCacheFiles, setConfiguration, setKeyComparator, setOutputSerializationConfiguration, setUsedOnceStatus, setValueComparator, thisAsTestDriver, validate, validate, validate, validateOutputList, withAllOutput, withCacheArchive, withCacheArchive, withCacheFile, withCacheFile, withConfiguration, withCounter, withCounter, withMultiOutput, withMultiOutput, withOutput, withOutput, withOutputFromString, withOutputSerializationConfiguration, withPathOutput, withPathOutput, withStrictCounterCheckingpublic MapReduceDriver(org.apache.hadoop.mapreduce.Mapper<K1,V1,K2,V2> m, org.apache.hadoop.mapreduce.Reducer<K2,V2,K3,V3> r)
public MapReduceDriver(org.apache.hadoop.mapreduce.Mapper<K1,V1,K2,V2> m, org.apache.hadoop.mapreduce.Reducer<K2,V2,K3,V3> r, org.apache.hadoop.mapreduce.Reducer<K2,V2,K2,V2> c)
public MapReduceDriver()
public void setMapper(org.apache.hadoop.mapreduce.Mapper<K1,V1,K2,V2> m)
m - the Mapper instance to usepublic MapReduceDriver<K1,V1,K2,V2,K3,V3> withMapper(org.apache.hadoop.mapreduce.Mapper<K1,V1,K2,V2> m)
public org.apache.hadoop.mapreduce.Mapper<K1,V1,K2,V2> getMapper()
public void setReducer(org.apache.hadoop.mapreduce.Reducer<K2,V2,K3,V3> r)
r - The reducer object to usepublic MapReduceDriver<K1,V1,K2,V2,K3,V3> withReducer(org.apache.hadoop.mapreduce.Reducer<K2,V2,K3,V3> r)
r - The Reducer to usepublic org.apache.hadoop.mapreduce.Reducer<K2,V2,K3,V3> getReducer()
public void setCombiner(org.apache.hadoop.mapreduce.Reducer<K2,V2,K2,V2> c)
c - The combiner object to usepublic MapReduceDriver<K1,V1,K2,V2,K3,V3> withCombiner(org.apache.hadoop.mapreduce.Reducer<K2,V2,K2,V2> c)
c - The Combiner to usepublic org.apache.hadoop.mapreduce.Reducer<K2,V2,K2,V2> getCombiner()
public org.apache.hadoop.mapreduce.Counters getCounters()
public void setCounters(org.apache.hadoop.mapreduce.Counters ctrs)
ctrs - The counters object to use.public MapReduceDriver<K1,V1,K2,V2,K3,V3> withCounters(org.apache.hadoop.mapreduce.Counters ctrs)
public MapReduceDriver<K1,V1,K2,V2,K3,V3> withOutputFormat(Class<? extends org.apache.hadoop.mapreduce.OutputFormat> outputFormatClass, Class<? extends org.apache.hadoop.mapreduce.InputFormat> inputFormatClass)
Reducer to output with a real OutputFormat. Set
InputFormat to read output back in for use with run* methodsoutputFormatClass - inputFormatClass - public List<Pair<K3,V3>> run() throws IOException
TestDriverpublic static <K1,V1,K2,V2,K3,V3> MapReduceDriver<K1,V1,K2,V2,K3,V3> newMapReduceDriver()
public static <K1,V1,K2,V2,K3,V3> MapReduceDriver<K1,V1,K2,V2,K3,V3> newMapReduceDriver(org.apache.hadoop.mapreduce.Mapper<K1,V1,K2,V2> mapper, org.apache.hadoop.mapreduce.Reducer<K2,V2,K3,V3> reducer)
mapper - passed to MapReduceDriver constructorreducer - passed to MapReduceDriver constructorpublic static <K1,V1,K2,V2,K3,V3> MapReduceDriver<K1,V1,K2,V2,K3,V3> newMapReduceDriver(org.apache.hadoop.mapreduce.Mapper<K1,V1,K2,V2> mapper, org.apache.hadoop.mapreduce.Reducer<K2,V2,K3,V3> reducer, org.apache.hadoop.mapreduce.Reducer<K2,V2,K2,V2> combiner)
mapper - passed to MapReduceDriver constructorreducer - passed to MapReduceDriver constructorcombiner - passed to MapReduceDriver constructorCopyright © 2014 The Apache Software Foundation. All Rights Reserved.