org.apache.pig.data
Class SortedSpillBag

java.lang.Object
  extended by org.apache.pig.data.DefaultAbstractBag
      extended by org.apache.pig.data.SelfSpillBag
          extended by org.apache.pig.data.SortedSpillBag
All Implemented Interfaces:
Serializable, Comparable, Iterable<Tuple>, org.apache.hadoop.io.Writable, org.apache.hadoop.io.WritableComparable, DataBag, Spillable
Direct Known Subclasses:
InternalDistinctBag, InternalSortedBag

@InterfaceAudience.Private
@InterfaceStability.Evolving
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 org.apache.pig.data.SelfSpillBag
SelfSpillBag.MemoryLimits
 
Nested classes/interfaces inherited from class org.apache.pig.data.DefaultAbstractBag
DefaultAbstractBag.BagDelimiterTuple, DefaultAbstractBag.EndBag, DefaultAbstractBag.StartBag
 
Field Summary
 
Fields inherited from class org.apache.pig.data.SelfSpillBag
memLimit
 
Fields inherited from class org.apache.pig.data.DefaultAbstractBag
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 org.apache.pig.data.DefaultAbstractBag
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 org.apache.pig.data.DataBag
isDistinct, isSorted, iterator
 
Methods inherited from interface org.apache.pig.impl.util.Spillable
spill
 

Method Detail

proactive_spill

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

Parameters:
comp - Comparator to sort contents of mContents
Returns:
number of tuples spilled


Copyright © 2007-2012 The Apache Software Foundation