org.apache.pig.data
Class DefaultBagFactory

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

public class DefaultBagFactory
extends BagFactory

Default implementation of BagFactory.


Method Summary
 DataBag newDefaultBag()
          Get a default (unordered, not distinct) data bag.
 DataBag newDefaultBag(List<Tuple> listOfTuples)
          Get a default (unordered, not distinct) data bag from an existing list of tuples.
 DataBag newDistinctBag()
          Get a distinct data bag.
 DataBag newSortedBag(Comparator<Tuple> comp)
          Get a sorted data bag.
 
Methods inherited from class org.apache.pig.data.BagFactory
getInstance, registerBag, resetSelf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

newDefaultBag

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

Specified by:
newDefaultBag in class BagFactory

newDefaultBag

public DataBag newDefaultBag(List<Tuple> listOfTuples)
Get a default (unordered, not distinct) data bag from an existing list of tuples. Note that the bag does NOT copy the tuples but uses the provided list as its backing store. So it takes ownership of the list.

Specified by:
newDefaultBag in class BagFactory

newSortedBag

public DataBag newSortedBag(Comparator<Tuple> comp)
Get a sorted data bag.

Specified by:
newSortedBag in class BagFactory
Parameters:
comp - Comparator that controls how the data is sorted. If null, default comparator will be used.

newDistinctBag

public DataBag newDistinctBag()
Get a distinct data bag.

Specified by:
newDistinctBag in class BagFactory


Copyright © ${year} The Apache Software Foundation