|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pig.data.BagFactory
public abstract class BagFactory
Factory for constructing different types of bags. This class is abstract so that users can override the bag factory if they desire to provide their own that returns their implementation of a bag. If the property pig.data.bag.factory.name is set to a class name and pig.data.bag.factory.jar is set to a URL pointing to a jar that contains the above named class, then getInstance() will create a a instance of the named class using the indicatd jar. Otherwise, it will create an instance of DefaultBagFactory.
Constructor Summary | |
---|---|
protected |
BagFactory()
|
Method Summary | |
---|---|
static BagFactory |
getInstance()
Get a reference to the singleton factory. |
abstract DataBag |
newDefaultBag()
Get a default (unordered, not distinct) data bag. |
abstract DataBag |
newDefaultBag(List<Tuple> listOfTuples)
Get a default (unordered, not distinct) data bag from an existing list of tuples. |
abstract DataBag |
newDistinctBag()
Get a distinct data bag. |
abstract DataBag |
newSortedBag(Comparator<Tuple> comp)
Get a sorted data bag. |
protected void |
registerBag(DataBag b)
|
static void |
resetSelf()
Provided for testing purposes only. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected BagFactory()
Method Detail |
---|
public static BagFactory getInstance()
public abstract DataBag newDefaultBag()
public abstract DataBag newDefaultBag(List<Tuple> listOfTuples)
public abstract DataBag newSortedBag(Comparator<Tuple> comp)
comp
- Comparator that controls how the data is sorted.
If null, default comparator will be used.public abstract DataBag newDistinctBag()
protected void registerBag(DataBag b)
public static void resetSelf()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |