public abstract class SpillableTupleList extends Object implements 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 | 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(Collection<? extends Tuple> tuples) |
void |
clear() |
boolean |
contains(Object object) |
boolean |
containsAll(Collection<?> objects) |
protected abstract TupleInputStream |
createTupleInputStream(File file) |
protected abstract TupleOutputStream |
createTupleOutputStream(File file) |
protected static Class |
getCodecClass(FlowProcess flowProcess,
String defaultCodecs,
Class subClass) |
Tuple |
getGrouping() |
static int |
getThreshold(FlowProcess flowProcess,
int defaultValue) |
boolean |
isEmpty() |
Iterator<Tuple> |
iterator() |
boolean |
remove(Object object) |
boolean |
removeAll(Collection<?> objects) |
boolean |
retainAll(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.
|
Object[] |
toArray() |
<T> T[] |
toArray(T[] ts) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
equals, hashCode
protected SpillableTupleList(int threshold)
protected SpillableTupleList(Spillable.SpillStrategy spillStrategy)
public static int getThreshold(FlowProcess flowProcess, int defaultValue)
protected static Class getCodecClass(FlowProcess flowProcess, String defaultCodecs, 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 Collection<Tuple>
tuple
- of type Tuplepublic int size()
size
in interface Collection<Tuple>
public boolean isEmpty()
isEmpty
in interface Collection<Tuple>
protected abstract TupleOutputStream createTupleOutputStream(File file)
protected abstract TupleInputStream createTupleInputStream(File file)
public void clear()
clear
in interface Collection<Tuple>
public boolean contains(Object object)
contains
in interface Collection<Tuple>
public Object[] toArray()
toArray
in interface Collection<Tuple>
public <T> T[] toArray(T[] ts)
toArray
in interface Collection<Tuple>
public boolean remove(Object object)
remove
in interface Collection<Tuple>
public boolean containsAll(Collection<?> objects)
containsAll
in interface Collection<Tuple>
public boolean addAll(Collection<? extends Tuple> tuples)
addAll
in interface Collection<Tuple>
public boolean removeAll(Collection<?> objects)
removeAll
in interface Collection<Tuple>
public boolean retainAll(Collection<?> objects)
retainAll
in interface Collection<Tuple>
Copyright © 2007-2015 Concurrent, Inc. All Rights Reserved.