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