org.apache.pig.data
Class SortedSpillBag
java.lang.Object
org.apache.pig.data.DefaultAbstractBag
org.apache.pig.data.SelfSpillBag
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
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 interface org.apache.pig.impl.util.Spillable |
spill |
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