public abstract class SpillableTupleList extends java.lang.Object implements java.util.Collection<Tuple>, Spillable
threshold
is met.
Using a threshold
of -1 will disable the spill, all values will remain in memory.
CoGroup
pipe, to set properties specific to a given
CoGroup instance, see the Pipe.getConfigDef()
method.
Use the SpillableProps
fluent helper class to set properties.HadoopSpillableTupleList
Spillable.SpillListener, Spillable.SpillStrategy
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SPILL_CODECS
Deprecated.
|
static java.lang.String |
SPILL_COMPRESS
Deprecated.
|
static java.lang.String |
SPILL_THRESHOLD
Deprecated.
|
Modifier | Constructor and Description |
---|---|
protected |
SpillableTupleList(int threshold) |
protected |
SpillableTupleList(Spillable.SpillStrategy spillStrategy) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(Tuple tuple)
Method add will add the given
Tuple to this list. |
boolean |
addAll(java.util.Collection<? extends Tuple> tuples) |
void |
clear() |
boolean |
contains(java.lang.Object object) |
boolean |
containsAll(java.util.Collection<?> objects) |
protected abstract TupleInputStream |
createTupleInputStream(java.io.File file) |
protected abstract TupleOutputStream |
createTupleOutputStream(java.io.File file) |
protected static java.lang.Class |
getCodecClass(FlowProcess flowProcess,
java.lang.String defaultCodecs,
java.lang.Class subClass) |
Tuple |
getGrouping() |
static int |
getThreshold(FlowProcess flowProcess,
int defaultValue) |
boolean |
isEmpty() |
java.util.Iterator<Tuple> |
iterator() |
boolean |
remove(java.lang.Object object) |
boolean |
removeAll(java.util.Collection<?> objects) |
boolean |
retainAll(java.util.Collection<?> objects) |
void |
setGrouping(Tuple group) |
void |
setSpillListener(Spillable.SpillListener spillListener) |
void |
setSpillStrategy(Spillable.SpillStrategy spillStrategy) |
int |
size() |
int |
spillCount()
The number of times this container has spilled data to disk.
|
java.lang.Object[] |
toArray() |
<T> T[] |
toArray(T[] ts) |
@Deprecated public static final java.lang.String SPILL_THRESHOLD
@Deprecated public static final java.lang.String SPILL_COMPRESS
Boolean.parseBoolean(String)
,
Constant Field Values@Deprecated public static final java.lang.String SPILL_CODECS
protected SpillableTupleList(int threshold)
protected SpillableTupleList(Spillable.SpillStrategy spillStrategy)
public static int getThreshold(FlowProcess flowProcess, int defaultValue)
protected static java.lang.Class getCodecClass(FlowProcess flowProcess, java.lang.String defaultCodecs, java.lang.Class subClass)
public void setGrouping(Tuple group)
setGrouping
in interface Spillable
public Tuple getGrouping()
getGrouping
in interface Spillable
public void setSpillStrategy(Spillable.SpillStrategy spillStrategy)
setSpillStrategy
in interface Spillable
public void setSpillListener(Spillable.SpillListener spillListener)
setSpillListener
in interface Spillable
public int spillCount()
Spillable
spillCount
in interface Spillable
public boolean add(Tuple tuple)
Tuple
to this list.add
in interface java.util.Collection<Tuple>
tuple
- of type Tuplepublic int size()
size
in interface java.util.Collection<Tuple>
public boolean isEmpty()
isEmpty
in interface java.util.Collection<Tuple>
protected abstract TupleOutputStream createTupleOutputStream(java.io.File file)
protected abstract TupleInputStream createTupleInputStream(java.io.File file)
public void clear()
clear
in interface java.util.Collection<Tuple>
public java.util.Iterator<Tuple> iterator()
public boolean contains(java.lang.Object object)
contains
in interface java.util.Collection<Tuple>
public java.lang.Object[] toArray()
toArray
in interface java.util.Collection<Tuple>
public <T> T[] toArray(T[] ts)
toArray
in interface java.util.Collection<Tuple>
public boolean remove(java.lang.Object object)
remove
in interface java.util.Collection<Tuple>
public boolean containsAll(java.util.Collection<?> objects)
containsAll
in interface java.util.Collection<Tuple>
public boolean addAll(java.util.Collection<? extends Tuple> tuples)
addAll
in interface java.util.Collection<Tuple>
public boolean removeAll(java.util.Collection<?> objects)
removeAll
in interface java.util.Collection<Tuple>
public boolean retainAll(java.util.Collection<?> objects)
retainAll
in interface java.util.Collection<Tuple>