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

java.lang.Object
  extended by org.apache.hadoop.mapred.MapReduceBase
      extended by org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMapBase
          extended by org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMapReduce.MapWithComparator
All Implemented Interfaces:
Closeable, org.apache.hadoop.mapred.JobConfigurable, org.apache.hadoop.mapred.Mapper<org.apache.hadoop.io.Text,Tuple,PigNullableWritable,org.apache.hadoop.io.Writable>
Enclosing class:
PigMapReduce

public static class PigMapReduce.MapWithComparator
extends PigMapBase
implements org.apache.hadoop.mapred.Mapper<org.apache.hadoop.io.Text,Tuple,PigNullableWritable,org.apache.hadoop.io.Writable>

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)


Field Summary
 
Fields inherited from class org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMapBase
errorInMap, keyType, mp, stores, tf
 
Constructor Summary
PigMapReduce.MapWithComparator()
           
 
Method Summary
 void collect(org.apache.hadoop.mapred.OutputCollector<PigNullableWritable,org.apache.hadoop.io.Writable> oc, Tuple tuple)
           
 
Methods inherited from class org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMapBase
close, configure, getKeyType, map, runPipeline, setKeyType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.hadoop.mapred.Mapper
map
 
Methods inherited from interface org.apache.hadoop.mapred.JobConfigurable
configure
 
Methods inherited from interface java.io.Closeable
close
 

Constructor Detail

PigMapReduce.MapWithComparator

public PigMapReduce.MapWithComparator()
Method Detail

collect

public void collect(org.apache.hadoop.mapred.OutputCollector<PigNullableWritable,org.apache.hadoop.io.Writable> oc,
                    Tuple tuple)
             throws ExecException,
                    IOException
Specified by:
collect in class PigMapBase
Throws:
ExecException
IOException


Copyright © ${year} The Apache Software Foundation