public class AccumulativeBag extends java.lang.Object implements DataBag
| Constructor and Description |
|---|
AccumulativeBag(AccumulativeTupleBuffer buffer,
int index) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Tuple t)
Add a tuple to the bag.
|
void |
addAll(DataBag b)
Add contents of a bag to the bag.
|
void |
clear()
Clear out the contents of the bag, both on disk and in memory.
|
int |
compareTo(java.lang.Object other) |
boolean |
equals(java.lang.Object other) |
long |
getMemorySize()
Requests that an object return an estimate of its in memory size.
|
AccumulativeTupleBuffer |
getTuplebuffer() |
int |
hashCode()
Returns the hash code value for 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.
|
void |
markStale(boolean stale)
This is used by FuncEvalSpec.FakeDataBag.
|
void |
readFields(java.io.DataInput datainput) |
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.
|
void |
write(java.io.DataOutput dataoutput) |
public AccumulativeBag(AccumulativeTupleBuffer buffer, int index)
public void addAll(DataBag b)
DataBagpublic void clear()
DataBagpublic boolean isDistinct()
DataBagisDistinct in interface DataBagpublic boolean isSorted()
DataBagpublic AccumulativeTupleBuffer getTuplebuffer()
public java.util.Iterator<Tuple> iterator()
DataBagpublic void markStale(boolean stale)
DataBagpublic long size()
DataBagpublic long getMemorySize()
SpillablegetMemorySize in interface Spillablepublic long spill()
Spillablepublic void readFields(java.io.DataInput datainput)
throws java.io.IOException
readFields in interface org.apache.hadoop.io.Writablejava.io.IOExceptionpublic void write(java.io.DataOutput dataoutput)
throws java.io.IOException
write in interface org.apache.hadoop.io.Writablejava.io.IOExceptionpublic int compareTo(java.lang.Object other)
compareTo in interface java.lang.Comparablepublic boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic int hashCode()
DataBagCopyright © 2007-2025 The Apache Software Foundation