public class DistinctDataBag extends DefaultAbstractBag
DefaultAbstractBag.BagDelimiterTuple, DefaultAbstractBag.EndBag, DefaultAbstractBag.StartBag
endBag, MAX_SPILL_FILES, mContents, mSize, mSpillFiles, startBag
Constructor and Description |
---|
DistinctDataBag() |
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.
|
java.util.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.
|
addAll, addAll, addAll, clear, compareTo, equals, getMemorySize, getSpillFile, hashCode, incSpillCount, incSpillCount, markSpillableIfNecessary, markStale, readFields, reportProgress, sampleContents, toString, warn, write
public boolean isSorted()
DataBag
public boolean isDistinct()
DataBag
public long size()
DefaultAbstractBag
size
in interface DataBag
size
in class DefaultAbstractBag
public java.util.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