Class SortedSpillBag

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

public abstract class SortedSpillBag
extends SelfSpillBag

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
Nested classes/interfaces inherited from class
DefaultAbstractBag.BagDelimiterTuple, DefaultAbstractBag.EndBag, DefaultAbstractBag.StartBag
Field Summary
Fields inherited from class
Fields inherited from class
endBag, MAX_SPILL_FILES, mContents, mSize, mSpillFiles, startBag
Method Summary
 long proactive_spill(Comparator<Tuple> comp)
          Sort contents of mContents and write them to disk
Methods inherited from class
add, addAll, addAll, addAll, clear, compareTo, equals, getMemorySize, getSpillFile, hashCode, incSpillCount, incSpillCount, markSpillableIfNecessary, markStale, readFields, reportProgress, sampleContents, 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

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 © 2007-2012 The Apache Software Foundation