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

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

public class LitePackager
extends Packager

This package operator is a specialization of POPackage operator used for the specific case of the order by query. See JIRA 802 for more details.

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
LitePackager()
           
 
Method Summary
 LitePackager clone()
          Make a deep copy of this operator.
 boolean[] getInner()
           
 Result getNext()
          Similar to POPackage.getNext except that only one input is expected with index 0 and ReadOnceBag is used instead of DefaultDataBag.
 Tuple getValueTuple(PigNullableWritable keyWritable, NullableTuple ntup, int index)
          Makes use of the superclass method, but this requires an additional parameter key passed by ReadOnceBag.
 Tuple illustratorMarkup(Object in, Object out, int eqClassIndex)
          input tuple mark up to be illustrate-able
 boolean isDistinct()
           
 void setDistinct(boolean distinct)
           
 void setInner(boolean[] inner)
           
 
Methods inherited from class org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.Packager
attachInput, checkBagType, detachInput, getBag, getIllustrator, getKey, getKey, getKeyAsTuple, getKeyInfo, getKeyTuple, getKeyType, getNumInputs, getNumInputs, getPackageType, illustratorMarkup2, name, numberOfEquivalenceClasses, setIllustrator, setKeyCompound, setKeyInfo, 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

LitePackager

public LitePackager()
Method Detail

getInner

public boolean[] getInner()
Overrides:
getInner in class Packager

setInner

public void setInner(boolean[] inner)
Overrides:
setInner in class Packager

clone

public LitePackager clone()
                   throws CloneNotSupportedException
Make a deep copy of this operator.

Overrides:
clone in class Packager
Throws:
CloneNotSupportedException

isDistinct

public boolean isDistinct()
Overrides:
isDistinct in class Packager
Returns:
the distinct

setDistinct

public void setDistinct(boolean distinct)
Overrides:
setDistinct in class Packager
Parameters:
distinct - the distinct to set

getNext

public Result getNext()
               throws ExecException
Similar to POPackage.getNext except that only one input is expected with index 0 and ReadOnceBag is used instead of DefaultDataBag.

Overrides:
getNext in class Packager
Throws:
ExecException

getValueTuple

public Tuple getValueTuple(PigNullableWritable keyWritable,
                           NullableTuple ntup,
                           int index)
                    throws ExecException
Makes use of the superclass method, but this requires an additional parameter key passed by ReadOnceBag. key of this instance will be set to null in detachInput call, but an instance of ReadOnceBag may have the original key that it uses. Therefore this extra argument is taken to temporarily set it before the call to the superclass method and then restore it.

Overrides:
getValueTuple in class Packager
Throws:
ExecException

illustratorMarkup

public Tuple illustratorMarkup(Object in,
                               Object out,
                               int eqClassIndex)
Description copied from interface: Illustrable
input tuple mark up to be illustrate-able

Specified by:
illustratorMarkup in interface Illustrable
Overrides:
illustratorMarkup in class Packager
Parameters:
in - input tuple
out - output tuple before wrapped in ExampleTuple
eqClassIndex - index into equivalence classes in illustrator
Returns:
tuple


Copyright © 2007-2012 The Apache Software Foundation