org.apache.pig.backend.hadoop.executionengine.mapReduceLayer
Class PigCombiner.Combine

java.lang.Object
  extended by org.apache.hadoop.mapreduce.Reducer<PigNullableWritable,NullableTuple,PigNullableWritable,org.apache.hadoop.io.Writable>
      extended by org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigCombiner.Combine
Enclosing class:
PigCombiner

public static class PigCombiner.Combine
extends org.apache.hadoop.mapreduce.Reducer<PigNullableWritable,NullableTuple,PigNullableWritable,org.apache.hadoop.io.Writable>


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.Reducer
org.apache.hadoop.mapreduce.Reducer.Context
 
Constructor Summary
PigCombiner.Combine()
           
 
Method Summary
protected  void cleanup(org.apache.hadoop.mapreduce.Reducer.Context context)
          Will be called once all the intermediate keys and values are processed.
 byte getKeyType()
           
 boolean processOnePackageOutput(org.apache.hadoop.mapreduce.Reducer.Context oc)
           
protected  void reduce(PigNullableWritable key, 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.
 void setKeyType(byte keyType)
           
protected  void setup(org.apache.hadoop.mapreduce.Reducer.Context context)
          Configures the Reduce plan, the POPackage operator and the reporter thread
 
Methods inherited from class org.apache.hadoop.mapreduce.Reducer
run
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PigCombiner.Combine

public PigCombiner.Combine()
Method Detail

setup

protected void setup(org.apache.hadoop.mapreduce.Reducer.Context context)
              throws IOException,
                     InterruptedException
Configures the Reduce plan, the POPackage operator and the reporter thread

Overrides:
setup in class org.apache.hadoop.mapreduce.Reducer<PigNullableWritable,NullableTuple,PigNullableWritable,org.apache.hadoop.io.Writable>
Throws:
IOException
InterruptedException

reduce

protected void reduce(PigNullableWritable key,
                      Iterable<NullableTuple> tupIter,
                      org.apache.hadoop.mapreduce.Reducer.Context context)
               throws IOException,
                      InterruptedException
The reduce function which packages the key and List <Tuple> into key, Bag<Tuple> after converting Hadoop type key into Pig type. The package result is either collected as is, if the reduce plan is empty or after passing through the reduce plan.

Overrides:
reduce in class org.apache.hadoop.mapreduce.Reducer<PigNullableWritable,NullableTuple,PigNullableWritable,org.apache.hadoop.io.Writable>
Throws:
IOException
InterruptedException

processOnePackageOutput

public boolean processOnePackageOutput(org.apache.hadoop.mapreduce.Reducer.Context oc)
                                throws IOException,
                                       InterruptedException
Throws:
IOException
InterruptedException

cleanup

protected void cleanup(org.apache.hadoop.mapreduce.Reducer.Context context)
                throws IOException,
                       InterruptedException
Will be called once all the intermediate keys and values are processed. cleanup references to the PhysicalPlan

Overrides:
cleanup in class org.apache.hadoop.mapreduce.Reducer<PigNullableWritable,NullableTuple,PigNullableWritable,org.apache.hadoop.io.Writable>
Throws:
IOException
InterruptedException

getKeyType

public byte getKeyType()
Returns:
the keyType

setKeyType

public void setKeyType(byte keyType)
Parameters:
keyType - the keyType to set


Copyright © 2007-2012 The Apache Software Foundation