public class ReduceDriver<K1,V1,K2,V2> extends ReduceDriverBase<K1,V1,K2,V2,ReduceDriver<K1,V1,K2,V2>>
ReduceDriverBase.ValueClassInstanceReuseList<T>| Modifier and Type | Field and Description |
|---|---|
static org.apache.commons.logging.Log |
LOG |
inputKey, inputs, mockOutputCreatorcounterWrapper, expectedEnumCounters, expectedMultipleOutputs, expectedOutputs, expectedPathOutputs, expectedStringCounters, mos| Constructor and Description |
|---|
ReduceDriver() |
ReduceDriver(org.apache.hadoop.mapred.Reducer<K1,V1,K2,V2> r) |
| Modifier and Type | Method and Description |
|---|---|
org.apache.hadoop.mapred.Counters |
getCounters() |
org.apache.hadoop.mapred.Reducer<K1,V1,K2,V2> |
getReducer() |
static <K1,V1,K2,V2> |
newReduceDriver()
Returns a new ReduceDriver without having to specify the generic types on
the right hand side of the object create statement.
|
static <K1,V1,K2,V2> |
newReduceDriver(org.apache.hadoop.mapred.Reducer<K1,V1,K2,V2> reducer)
Returns a new ReduceDriver without having to specify the generic types on
the right hand side of the object create statement.
|
List<Pair<K2,V2>> |
run()
Runs the test but returns the result set instead of validating it (ignores
any addOutput(), etc calls made before this)
|
void |
setCounters(org.apache.hadoop.mapred.Counters ctrs)
Sets the counters object to use for this test.
|
void |
setReducer(org.apache.hadoop.mapred.Reducer<K1,V1,K2,V2> r)
Sets the reducer object to use for this test
|
String |
toString() |
ReduceDriver<K1,V1,K2,V2> |
withCounters(org.apache.hadoop.mapred.Counters ctrs)
Sets the counters to use and returns self for fluent style
|
ReduceDriver<K1,V1,K2,V2> |
withOutputFormat(Class<? extends org.apache.hadoop.mapred.OutputFormat> outputFormatClass,
Class<? extends org.apache.hadoop.mapred.InputFormat> inputFormatClass)
Configure
Reducer to output with a real OutputFormat. |
ReduceDriver<K1,V1,K2,V2> |
withReducer(org.apache.hadoop.mapred.Reducer<K1,V1,K2,V2> r)
Identical to setReducer(), but with fluent programming style
|
addAll, addInput, addInput, addInputValue, addInputValues, clearInput, getInputValues, getInputValues, preRunChecks, printPreTestDebugLog, setInput, setInputFromString, setInputKey, setInputValues, withAll, withInput, withInput, withInputFromString, withInputKey, withInputValue, withInputValuesaddAllOutput, 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, 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 org.apache.hadoop.mapred.Counters getCounters()
public void setCounters(org.apache.hadoop.mapred.Counters ctrs)
ctrs - The counters object to use.public ReduceDriver<K1,V1,K2,V2> withCounters(org.apache.hadoop.mapred.Counters ctrs)
public void setReducer(org.apache.hadoop.mapred.Reducer<K1,V1,K2,V2> r)
r - The reducer object to usepublic ReduceDriver<K1,V1,K2,V2> withReducer(org.apache.hadoop.mapred.Reducer<K1,V1,K2,V2> r)
r - The Reducer to usepublic ReduceDriver<K1,V1,K2,V2> withOutputFormat(Class<? extends org.apache.hadoop.mapred.OutputFormat> outputFormatClass, Class<? extends org.apache.hadoop.mapred.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<K2,V2>> run() throws IOException
TestDriverrun in class ReduceDriverBase<K1,V1,K2,V2,ReduceDriver<K1,V1,K2,V2>>IOExceptionpublic static <K1,V1,K2,V2> ReduceDriver<K1,V1,K2,V2> newReduceDriver()
public static <K1,V1,K2,V2> ReduceDriver<K1,V1,K2,V2> newReduceDriver(org.apache.hadoop.mapred.Reducer<K1,V1,K2,V2> reducer)
reducer - passed to ReduceDriver constructorCopyright © 2014 The Apache Software Foundation. All Rights Reserved.