org.apache.pig.backend.hadoop.executionengine.mapReduceLayer
Class PigGenericMapReduce.MapWithComparator

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.PigGenericMapReduce.MapWithComparator
Enclosing class:
PigGenericMapReduce

public static class PigGenericMapReduce.MapWithComparator
extends org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMapBase

This "specialized" map class is ONLY to be used in pig queries with order by a udf. A UDF used for comparison in the order by expects to be handed tuples. Hence this map class ensures that the "key" used in the order by is wrapped into a tuple (if it isn't already a tuple)


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
 
Fields inherited from class org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigGenericMapBase
errorInMap, keyType, mp, stores, tf
 
Constructor Summary
PigGenericMapReduce.MapWithComparator()
           
 
Method Summary
 void collect(org.apache.hadoop.mapreduce.Mapper.Context oc, Tuple 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, setup
 
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
 

Constructor Detail

PigGenericMapReduce.MapWithComparator

public PigGenericMapReduce.MapWithComparator()
Method Detail

collect

public void collect(org.apache.hadoop.mapreduce.Mapper.Context oc,
                    Tuple tuple)
             throws InterruptedException,
                    IOException
Specified by:
collect in class PigGenericMapBase
Throws:
InterruptedException
IOException


Copyright © 2007-2012 The Apache Software Foundation