public abstract static class PigGenericMapReduce.Reduce extends org.apache.hadoop.mapreduce.Reducer<PigNullableWritable,NullableTuple,PigNullableWritable,org.apache.hadoop.io.Writable>
Modifier and Type | Field and Description |
---|---|
protected boolean |
errorInReduce |
protected boolean |
initialized |
protected org.apache.commons.logging.Log |
log |
protected org.apache.hadoop.mapreduce.Reducer.Context |
outputCollector |
protected POPackage |
pack |
protected PhysicalPlan |
rp |
protected java.util.List<POStore> |
stores |
Constructor and Description |
---|
PigGenericMapReduce.Reduce() |
Modifier and Type | Method and Description |
---|---|
protected void |
cleanup(org.apache.hadoop.mapreduce.Reducer.Context context)
Will be called once all the intermediate keys and values are
processed.
|
abstract org.apache.hadoop.mapreduce.Reducer.Context |
getIllustratorContext(org.apache.hadoop.mapred.jobcontrol.Job job,
java.util.List<Pair<PigNullableWritable,org.apache.hadoop.io.Writable>> input,
POPackage pkg)
Get reducer's illustrator context
|
abstract POPackage |
getPack(org.apache.hadoop.mapreduce.Reducer.Context context) |
abstract boolean |
inIllustrator(org.apache.hadoop.mapreduce.Reducer.Context context) |
boolean |
processOnePackageOutput(org.apache.hadoop.mapreduce.Reducer.Context oc) |
protected void |
reduce(PigNullableWritable key,
java.lang.Iterable<NullableTuple> tupIter,
org.apache.hadoop.mapreduce.Reducer.Context context)
The reduce function which packages the key and List<Tuple>
into key, Bag<Tuple> after converting Hadoop type key into Pig type.
|
protected void |
runPipeline(PhysicalOperator leaf) |
void |
setReducePlan(PhysicalPlan plan)
Set the reduce plan: to be used by local runner for illustrator
|
protected void |
setup(org.apache.hadoop.mapreduce.Reducer.Context context)
Configures the Reduce plan, the POPackage operator
and the reporter thread
|
protected final org.apache.commons.logging.Log log
protected PhysicalPlan rp
protected java.util.List<POStore> stores
protected POPackage pack
protected org.apache.hadoop.mapreduce.Reducer.Context outputCollector
protected boolean errorInReduce
protected volatile boolean initialized
public void setReducePlan(PhysicalPlan plan)
plan
- Reduce planprotected void setup(org.apache.hadoop.mapreduce.Reducer.Context context) throws java.io.IOException, java.lang.InterruptedException
setup
in class org.apache.hadoop.mapreduce.Reducer<PigNullableWritable,NullableTuple,PigNullableWritable,org.apache.hadoop.io.Writable>
java.io.IOException
java.lang.InterruptedException
protected void reduce(PigNullableWritable key, java.lang.Iterable<NullableTuple> tupIter, org.apache.hadoop.mapreduce.Reducer.Context context) throws java.io.IOException, java.lang.InterruptedException
reduce
in class org.apache.hadoop.mapreduce.Reducer<PigNullableWritable,NullableTuple,PigNullableWritable,org.apache.hadoop.io.Writable>
java.io.IOException
java.lang.InterruptedException
public boolean processOnePackageOutput(org.apache.hadoop.mapreduce.Reducer.Context oc) throws java.io.IOException, java.lang.InterruptedException
java.io.IOException
java.lang.InterruptedException
protected void runPipeline(PhysicalOperator leaf) throws java.lang.InterruptedException, java.io.IOException
leaf
- java.lang.InterruptedException
java.io.IOException
protected void cleanup(org.apache.hadoop.mapreduce.Reducer.Context context) throws java.io.IOException, java.lang.InterruptedException
cleanup
in class org.apache.hadoop.mapreduce.Reducer<PigNullableWritable,NullableTuple,PigNullableWritable,org.apache.hadoop.io.Writable>
java.io.IOException
java.lang.InterruptedException
public abstract org.apache.hadoop.mapreduce.Reducer.Context getIllustratorContext(org.apache.hadoop.mapred.jobcontrol.Job job, java.util.List<Pair<PigNullableWritable,org.apache.hadoop.io.Writable>> input, POPackage pkg) throws java.io.IOException, java.lang.InterruptedException
input
- Input buffer as output by mapspkg
- packagejava.io.IOException
java.lang.InterruptedException
public abstract boolean inIllustrator(org.apache.hadoop.mapreduce.Reducer.Context context)
public abstract POPackage getPack(org.apache.hadoop.mapreduce.Reducer.Context context)
Copyright © 2007-2012 The Apache Software Foundation