org.apache.pig.data
Class BagFactory

java.lang.Object
  extended by org.apache.pig.data.BagFactory

public class BagFactory
extends Object

A bag factory. Can be used to generate different types of bags depending on what is needed.


Method Summary
static BagFactory getInstance()
          Get a reference to the singleton factory.
 DataBag newDefaultBag()
          Get a default (unordered, not distinct) data bag.
 DataBag newDistinctBag()
          Get a distinct data bag.
 DataBag newSortedBag(EvalSpec spec)
          Get a sorted data bag.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static BagFactory getInstance()
Get a reference to the singleton factory.


newDefaultBag

public DataBag newDefaultBag()
Get a default (unordered, not distinct) data bag.


newSortedBag

public DataBag newSortedBag(EvalSpec spec)
Get a sorted data bag.

Parameters:
spec - EvalSpec that controls how the data is sorted. If null, default comparator will be used.

newDistinctBag

public DataBag newDistinctBag()
Get a distinct data bag.



Copyright © ${year} The Apache Software Foundation