T
- Type of objects in Avro arraypublic final class AvroBagWrapper<T> extends java.lang.Object implements DataBag
Constructor and Description |
---|
AvroBagWrapper(org.apache.avro.generic.GenericArray<T> a)
Create new AvroBagWrapper instance.
|
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 o) |
long |
getMemorySize()
Requests that an object return an estimate of its in memory size.
|
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 d) |
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 d) |
public AvroBagWrapper(org.apache.avro.generic.GenericArray<T> a)
a
- Avro array to wrap in bagpublic long spill()
Spillable
public long getMemorySize()
Spillable
getMemorySize
in interface Spillable
public void readFields(java.io.DataInput d) throws java.io.IOException
readFields
in interface org.apache.hadoop.io.Writable
java.io.IOException
public void write(java.io.DataOutput d) throws java.io.IOException
write
in interface org.apache.hadoop.io.Writable
java.io.IOException
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
public long size()
DataBag
public boolean isSorted()
DataBag
public boolean isDistinct()
DataBag
isDistinct
in interface DataBag
public java.util.Iterator<Tuple> iterator()
DataBag
public void addAll(DataBag b)
DataBag
public void clear()
DataBag
Copyright © 2007-2012 The Apache Software Foundation