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 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,
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 TupleFactory tf
protected boolean errorInMap
public void setMapPlan(PhysicalPlan plan)
plan
- the map planpublic void cleanup(org.apache.hadoop.mapreduce.Mapper.Context context) throws IOException, InterruptedException
cleanup
in class org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.Text,Tuple,PigNullableWritable,org.apache.hadoop.io.Writable>
IOException
InterruptedException
public void setup(org.apache.hadoop.mapreduce.Mapper.Context context) throws IOException, InterruptedException
setup
in class org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.Text,Tuple,PigNullableWritable,org.apache.hadoop.io.Writable>
IOException
InterruptedException
protected void map(org.apache.hadoop.io.Text key, Tuple inpTuple, org.apache.hadoop.mapreduce.Mapper.Context context) throws IOException, InterruptedException
map
in class org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.Text,Tuple,PigNullableWritable,org.apache.hadoop.io.Writable>
IOException
InterruptedException
protected void runPipeline(PhysicalOperator leaf) throws IOException, InterruptedException
IOException
InterruptedException
public abstract void collect(org.apache.hadoop.mapreduce.Mapper.Context oc, Tuple tuple) throws InterruptedException, IOException
InterruptedException
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, List<Pair<PigNullableWritable,org.apache.hadoop.io.Writable>> output, org.apache.hadoop.mapreduce.InputSplit split) throws IOException, InterruptedException
IOException
InterruptedException
Copyright © 2007-2017 The Apache Software Foundation