public class AccumulativeBag extends 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(Object other) |
boolean |
equals(Object other) |
long |
getMemorySize()
Requests that an object return an estimate of its in memory size.
|
AccumulativeTupleBuffer |
getTuplebuffer() |
int |
hashCode() |
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.
|
void |
markStale(boolean stale)
This is used by FuncEvalSpec.FakeDataBag.
|
void |
readFields(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(DataOutput dataoutput) |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public AccumulativeBag(AccumulativeTupleBuffer buffer, int index)
public void addAll(DataBag b)
DataBag
public void clear()
DataBag
public boolean isDistinct()
DataBag
isDistinct
in interface DataBag
public boolean isSorted()
DataBag
public AccumulativeTupleBuffer getTuplebuffer()
public Iterator<Tuple> iterator()
DataBag
public void markStale(boolean stale)
DataBag
public long size()
DataBag
public long getMemorySize()
Spillable
getMemorySize
in interface Spillable
public long spill()
Spillable
public void readFields(DataInput datainput) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
IOException
public void write(DataOutput dataoutput) throws IOException
write
in interface org.apache.hadoop.io.Writable
IOException
public int compareTo(Object other)
compareTo
in interface Comparable
Copyright © 2007-2017 The Apache Software Foundation