Class SortedSpillBag

  extended by
      extended by
All Implemented Interfaces:
Serializable, Comparable, Iterable<Tuple>,,, DataBag, Spillable
Direct Known Subclasses:
InternalDistinctBag, InternalSortedBag

public abstract class SortedSpillBag
extends DefaultAbstractBag

Common functionality for proactively spilling bags that need to keep the data sorted.

See Also:
Serialized Form

Nested Class Summary
Nested classes/interfaces inherited from class
DefaultAbstractBag.BagDelimiterTuple, DefaultAbstractBag.EndBag, DefaultAbstractBag.StartBag
Field Summary
Fields inherited from class
endBag, MAX_SPILL_FILES, mContents, mLastContentsSize, mMemSize, mSize, mSpillFiles, startBag
Constructor Summary
Method Summary
 long proactive_spill(Comparator<Tuple> comp)
          Sort contents of mContents and write them to disk
Methods inherited from class
add, addAll, addAll, clear, compareTo, equals, getMemorySize, getSpillFile, hashCode, incSpillCount, incSpillCount, markStale, readFields, reportProgress, size, toString, warn, write
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface
isDistinct, isSorted, iterator
Methods inherited from interface org.apache.pig.impl.util.Spillable

Constructor Detail


public SortedSpillBag()
Method Detail


public long proactive_spill(Comparator<Tuple> comp)
Sort contents of mContents and write them to disk

comp - Comparator to sort contents of mContents
number of tuples spilled

Copyright © ${year} The Apache Software Foundation