org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators
Class CombinerPackager

java.lang.Object
  extended by org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.Packager
      extended by org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.CombinerPackager
All Implemented Interfaces:
Serializable, Cloneable, Illustrable

public class CombinerPackager
extends Packager

The package operator that packages the globally rearranged tuples into output format after the combiner stage. It differs from POPackage in that it does not use the index in the NullableTuple to find the bag to put a tuple in. Instead, the inputs are put in a bag corresponding to their offset in the tuple.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.Packager
Packager.PackageType
 
Field Summary
 
Fields inherited from class org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.Packager
bags, distinct, illustrator, isKeyCompound, isKeyTuple, keyInfo, mBagFactory, mTupleFactory, parent, readOnce
 
Constructor Summary
CombinerPackager(Packager pkg, boolean[] bags)
          A new POPostCombinePackage will be constructed as a near clone of the provided POPackage.
 
Method Summary
 Result getNext()
           
 Tuple getValueTuple(PigNullableWritable keyWritable, NullableTuple ntup, int index)
           
 void setKeyInfo(Map<Integer,Pair<Boolean,Map<Integer,Integer>>> keyInfo)
           
 
Methods inherited from class org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.Packager
attachInput, checkBagType, clone, detachInput, getBag, getIllustrator, getInner, getKey, getKey, getKeyAsTuple, getKeyInfo, getKeyTuple, getKeyType, getNumInputs, getNumInputs, getPackageType, illustratorMarkup, illustratorMarkup2, isDistinct, name, numberOfEquivalenceClasses, setDistinct, setIllustrator, setInner, setKeyCompound, setKeyTuple, setKeyType, setNumInputs, setPackageType, setParent, setUseSecondaryKey, starMarkup
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CombinerPackager

public CombinerPackager(Packager pkg,
                        boolean[] bags)
A new POPostCombinePackage will be constructed as a near clone of the provided POPackage.

Parameters:
pkg - POPackage to clone.
bags - for each field, indicates whether it should be a bag (true) or a simple field (false).
Method Detail

setKeyInfo

public void setKeyInfo(Map<Integer,Pair<Boolean,Map<Integer,Integer>>> keyInfo)
Overrides:
setKeyInfo in class Packager
Parameters:
keyInfo - the keyInfo to set

getNext

public Result getNext()
               throws ExecException
Overrides:
getNext in class Packager
Throws:
ExecException

getValueTuple

public Tuple getValueTuple(PigNullableWritable keyWritable,
                           NullableTuple ntup,
                           int index)
                    throws ExecException
Overrides:
getValueTuple in class Packager
Throws:
ExecException


Copyright © 2007-2012 The Apache Software Foundation