org.apache.pig.backend.hadoop.executionengine.mapReduceLayer
Class PigMapReduceCounter.PigMapCounter

java.lang.Object
  extended by org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.Text,Tuple,PigNullableWritable,org.apache.hadoop.io.Writable>
      extended by org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigGenericMapBase
          extended by org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMapBase
              extended by org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMapReduceCounter.PigMapCounter
Enclosing class:
PigMapReduceCounter

public static class PigMapReduceCounter.PigMapCounter
extends org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMapBase

This class is the used only for simple RANK operation, namely row number mode.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMapBase
org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMapBase.IllustratorContext
 
Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.Mapper
org.apache.hadoop.mapreduce.Mapper.Context
 
Field Summary
static org.apache.hadoop.mapreduce.Mapper.Context context
           
static String taskID
           
 
Fields inherited from class org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigGenericMapBase
errorInMap, keyType, mp, stores, tf
 
Constructor Summary
PigMapReduceCounter.PigMapCounter()
           
 
Method Summary
 void collect(org.apache.hadoop.mapreduce.Mapper.Context context, Tuple tuple)
          While tuples are collected, they are counted one by one by a global counter per task.
 void setup(org.apache.hadoop.mapreduce.Mapper.Context context)
          Here is set up the task id, in order to be attached to each tuple
 
Methods inherited from class org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMapBase
getIllustratorContext, inIllustrator
 
Methods inherited from class org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigGenericMapBase
cleanup, getKeyType, map, runPipeline, setKeyType, setMapPlan
 
Methods inherited from class org.apache.hadoop.mapreduce.Mapper
run
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

taskID

public static String taskID

context

public static org.apache.hadoop.mapreduce.Mapper.Context context
Constructor Detail

PigMapReduceCounter.PigMapCounter

public PigMapReduceCounter.PigMapCounter()
Method Detail

setup

public void setup(org.apache.hadoop.mapreduce.Mapper.Context context)
           throws IOException,
                  InterruptedException
Here is set up the task id, in order to be attached to each tuple

Overrides:
setup in class PigGenericMapBase
Throws:
IOException
InterruptedException

collect

public void collect(org.apache.hadoop.mapreduce.Mapper.Context context,
                    Tuple tuple)
             throws InterruptedException,
                    IOException
While tuples are collected, they are counted one by one by a global counter per task.

Specified by:
collect in class PigGenericMapBase
Throws:
InterruptedException
IOException


Copyright © 2007-2012 The Apache Software Foundation