org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators
Class Packager
java.lang.Object
org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.Packager
- All Implemented Interfaces:
- Serializable, Cloneable, Illustrable
- Direct Known Subclasses:
- CombinerPackager, JoinPackager, LitePackager, MultiQueryPackager
public class Packager
- extends Object
- implements Illustrable, Serializable, Cloneable
- See Also:
- Serialized Form
Method Summary |
void |
attachInput(Object key,
DataBag[] bags,
boolean[] readOnce)
|
void |
checkBagType()
|
Packager |
clone()
|
void |
detachInput()
|
DataBag |
getBag()
|
Illustrator |
getIllustrator()
|
boolean[] |
getInner()
|
Object |
getKey()
|
Object |
getKey(PigNullableWritable key)
|
Tuple |
getKeyAsTuple()
|
Map<Integer,Pair<Boolean,Map<Integer,Integer>>> |
getKeyInfo()
|
boolean |
getKeyTuple()
|
byte |
getKeyType()
|
Result |
getNext()
|
int |
getNumInputs()
|
int |
getNumInputs(byte index)
|
Packager.PackageType |
getPackageType()
|
Tuple |
getValueTuple(PigNullableWritable keyWritable,
NullableTuple ntup,
int index)
|
Tuple |
illustratorMarkup(Object in,
Object out,
int eqClassIndex)
input tuple mark up to be illustrate-able |
protected Tuple |
illustratorMarkup2(Object in,
Object out)
|
boolean |
isDistinct()
|
String |
name()
|
int |
numberOfEquivalenceClasses()
|
void |
setDistinct(boolean distinct)
|
void |
setIllustrator(Illustrator illustrator)
|
void |
setInner(boolean[] inner)
|
void |
setKeyCompound(boolean keyCompound)
|
void |
setKeyInfo(Map<Integer,Pair<Boolean,Map<Integer,Integer>>> keyInfo)
|
void |
setKeyTuple(boolean keyTuple)
|
void |
setKeyType(byte keyType)
|
void |
setNumInputs(int numInputs)
|
void |
setPackageType(Packager.PackageType type)
|
void |
setParent(POPackage pack)
|
void |
setUseSecondaryKey(boolean useSecondaryKey)
|
protected Tuple |
starMarkup(Tuple key,
Tuple val,
Tuple out)
|
readOnce
protected boolean[] readOnce
bags
protected DataBag[] bags
illustrator
protected transient Illustrator illustrator
isKeyTuple
protected boolean isKeyTuple
isKeyCompound
protected boolean isKeyCompound
distinct
protected boolean distinct
keyInfo
protected Map<Integer,Pair<Boolean,Map<Integer,Integer>>> keyInfo
parent
protected POPackage parent
mBagFactory
protected static final BagFactory mBagFactory
mTupleFactory
protected static final TupleFactory mTupleFactory
Packager
public Packager()
getKey
public Object getKey(PigNullableWritable key)
throws ExecException
- Throws:
ExecException
attachInput
public void attachInput(Object key,
DataBag[] bags,
boolean[] readOnce)
throws ExecException
- Throws:
ExecException
getNext
public Result getNext()
throws ExecException
- Throws:
ExecException
detachInput
public void detachInput()
illustratorMarkup2
protected Tuple illustratorMarkup2(Object in,
Object out)
starMarkup
protected Tuple starMarkup(Tuple key,
Tuple val,
Tuple out)
getValueTuple
public Tuple getValueTuple(PigNullableWritable keyWritable,
NullableTuple ntup,
int index)
throws ExecException
- Throws:
ExecException
getKeyType
public byte getKeyType()
setKeyType
public void setKeyType(byte keyType)
getKeyTuple
public boolean getKeyTuple()
- Returns:
- the isKeyTuple
getKeyAsTuple
public Tuple getKeyAsTuple()
- Returns:
- the keyAsTuple
getKey
public Object getKey()
- Returns:
- the key
getInner
public boolean[] getInner()
setInner
public void setInner(boolean[] inner)
setKeyInfo
public void setKeyInfo(Map<Integer,Pair<Boolean,Map<Integer,Integer>>> keyInfo)
- Parameters:
keyInfo
- the keyInfo to set
setKeyTuple
public void setKeyTuple(boolean keyTuple)
- Parameters:
keyTuple
- the keyTuple to set
setKeyCompound
public void setKeyCompound(boolean keyCompound)
- Parameters:
keyCompound
- the keyCompound to set
getKeyInfo
public Map<Integer,Pair<Boolean,Map<Integer,Integer>>> getKeyInfo()
- Returns:
- the keyInfo
getIllustrator
public Illustrator getIllustrator()
setIllustrator
public void setIllustrator(Illustrator illustrator)
- Specified by:
setIllustrator
in interface Illustrable
isDistinct
public boolean isDistinct()
- Returns:
- the distinct
setDistinct
public void setDistinct(boolean distinct)
- Parameters:
distinct
- the distinct to set
setUseSecondaryKey
public void setUseSecondaryKey(boolean useSecondaryKey)
setPackageType
public void setPackageType(Packager.PackageType type)
getPackageType
public Packager.PackageType getPackageType()
getNumInputs
public int getNumInputs(byte index)
getNumInputs
public int getNumInputs()
setNumInputs
public void setNumInputs(int numInputs)
clone
public Packager clone()
throws CloneNotSupportedException
- Overrides:
clone
in class Object
- Throws:
CloneNotSupportedException
name
public String name()
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
- Parameters:
in
- input tupleout
- output tuple before wrapped in ExampleTupleeqClassIndex
- index into equivalence classes in illustrator
- Returns:
- tuple
setParent
public void setParent(POPackage pack)
numberOfEquivalenceClasses
public int numberOfEquivalenceClasses()
checkBagType
public void checkBagType()
getBag
public DataBag getBag()
Copyright © 2007-2012 The Apache Software Foundation