@InterfaceAudience.Private @InterfaceStability.Evolving public class InternalCachedBag extends SelfSpillBag
SelfSpillBag.MemoryLimits
DefaultAbstractBag.BagDelimiterTuple, DefaultAbstractBag.EndBag, DefaultAbstractBag.StartBag
memLimit
endBag, MAX_SPILL_FILES, mContents, mSize, mSpillFiles, startBag
Constructor and Description |
---|
InternalCachedBag() |
InternalCachedBag(int bagCount) |
InternalCachedBag(int bagCount,
float percent) |
Modifier and Type | Method and Description |
---|---|
void |
add(Tuple t)
Add a tuple to the bag.
|
void |
clear()
Clear out the contents of the bag, both on disk and in memory.
|
boolean |
isDistinct()
Find out if the bag is distinct.
|
boolean |
isSorted()
Find out if the bag is sorted.
|
java.util.Iterator<Tuple> |
iterator()
Get an iterator to the bag.
|
long |
spill()
Instructs an object to spill whatever it can to disk and release
references to any data structures it spills.
|
addAll, addAll, addAll, compareTo, equals, getMemorySize, getSpillFile, hashCode, incSpillCount, incSpillCount, markSpillableIfNecessary, markStale, readFields, reportProgress, sampleContents, size, toString, warn, write
public InternalCachedBag()
public InternalCachedBag(int bagCount)
public InternalCachedBag(int bagCount, float percent)
public void add(Tuple t)
DefaultAbstractBag
add
in interface DataBag
add
in class DefaultAbstractBag
t
- tuple to add.public void clear()
DefaultAbstractBag
clear
in interface DataBag
clear
in class DefaultAbstractBag
public boolean isDistinct()
DataBag
public boolean isSorted()
DataBag
public java.util.Iterator<Tuple> iterator()
DataBag
public long spill()
Spillable
Copyright © 2007-2012 The Apache Software Foundation