public abstract class PigGenericMapBase extends org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.Text,Tuple,PigNullableWritable,org.apache.hadoop.io.Writable>
Modifier and Type | Field and Description |
---|---|
protected boolean |
errorInMap |
protected byte |
keyType |
protected PhysicalPlan |
mp |
protected java.util.List<POStore> |
stores |
protected TupleFactory |
tf |
Constructor and Description |
---|
PigGenericMapBase() |
Modifier and Type | Method and Description |
---|---|
void |
cleanup(org.apache.hadoop.mapreduce.Mapper.Context context)
Will be called when all the tuples in the input
are done.
|
abstract void |
collect(org.apache.hadoop.mapreduce.Mapper.Context oc,
Tuple tuple) |
abstract org.apache.hadoop.mapreduce.Mapper.Context |
getIllustratorContext(org.apache.hadoop.conf.Configuration conf,
DataBag input,
java.util.List<Pair<PigNullableWritable,org.apache.hadoop.io.Writable>> output,
org.apache.hadoop.mapreduce.InputSplit split) |
byte |
getKeyType() |
abstract boolean |
inIllustrator(org.apache.hadoop.mapreduce.Mapper.Context context) |
protected void |
map(org.apache.hadoop.io.Text key,
Tuple inpTuple,
org.apache.hadoop.mapreduce.Mapper.Context context)
The map function that attaches the inpTuple appropriately
and executes the map plan if its not empty.
|
protected void |
runPipeline(PhysicalOperator leaf) |
void |
setKeyType(byte keyType) |
void |
setMapPlan(PhysicalPlan plan)
for local map/reduce simulation
|
void |
setup(org.apache.hadoop.mapreduce.Mapper.Context context)
Configures the mapper with the map plan and the
reproter thread
|
protected byte keyType
protected PhysicalPlan mp
protected java.util.List<POStore> stores
protected TupleFactory tf
protected boolean errorInMap
public void setMapPlan(PhysicalPlan plan)
plan
- the map planpublic void cleanup(org.apache.hadoop.mapreduce.Mapper.Context context) throws java.io.IOException, java.lang.InterruptedException
cleanup
in class org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.Text,Tuple,PigNullableWritable,org.apache.hadoop.io.Writable>
java.io.IOException
java.lang.InterruptedException
public void setup(org.apache.hadoop.mapreduce.Mapper.Context context) throws java.io.IOException, java.lang.InterruptedException
setup
in class org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.Text,Tuple,PigNullableWritable,org.apache.hadoop.io.Writable>
java.io.IOException
java.lang.InterruptedException
protected void map(org.apache.hadoop.io.Text key, Tuple inpTuple, org.apache.hadoop.mapreduce.Mapper.Context context) throws java.io.IOException, java.lang.InterruptedException
map
in class org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.Text,Tuple,PigNullableWritable,org.apache.hadoop.io.Writable>
java.io.IOException
java.lang.InterruptedException
protected void runPipeline(PhysicalOperator leaf) throws java.io.IOException, java.lang.InterruptedException
java.io.IOException
java.lang.InterruptedException
public abstract void collect(org.apache.hadoop.mapreduce.Mapper.Context oc, Tuple tuple) throws java.lang.InterruptedException, java.io.IOException
java.lang.InterruptedException
java.io.IOException
public abstract boolean inIllustrator(org.apache.hadoop.mapreduce.Mapper.Context context)
public byte getKeyType()
public void setKeyType(byte keyType)
keyType
- the keyType to setpublic abstract org.apache.hadoop.mapreduce.Mapper.Context getIllustratorContext(org.apache.hadoop.conf.Configuration conf, DataBag input, java.util.List<Pair<PigNullableWritable,org.apache.hadoop.io.Writable>> output, org.apache.hadoop.mapreduce.InputSplit split) throws java.io.IOException, java.lang.InterruptedException
java.io.IOException
java.lang.InterruptedException
Copyright © 2007-2012 The Apache Software Foundation