cascading.pipe.joiner
Class JoinerClosure
java.lang.Object
cascading.pipe.joiner.JoinerClosure
- Direct Known Subclasses:
- MemoryCoGroupClosure
public abstract class JoinerClosure
- extends Object
Class JoinerClosure wraps all incoming tuple streams with iterator instances allowing for just join implementations.
This class is provided to a Joiner.getIterator(JoinerClosure)
implementation, or to a Buffer
via the BufferCall.getJoinerClosure()
method.
All iterators returned by getIterator(int)
may be retrieved more than once to restart them except for the left
most iterator at position 0
(zero).
This iterator may only be iterated across once. All other iterators are backed by memory and possibly disk.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
flowProcess
protected final FlowProcess flowProcess
joinFields
protected final Fields[] joinFields
valueFields
protected final Fields[] valueFields
JoinerClosure
public JoinerClosure(FlowProcess flowProcess,
Fields[] joinFields,
Fields[] valueFields)
getFlowProcess
public FlowProcess getFlowProcess()
getJoinFields
public Fields[] getJoinFields()
- Returns an array of
Fields
denoting the join fields or keys uses for each incoming pipe.
The most left handed pipe will be in array position 0.
- Returns:
- an array of Fields
getValueFields
public Fields[] getValueFields()
- Returns an array of all the incoming fields for each incoming pipe.
The most left handed pipe will be in array position 0;
- Returns:
- an array of Fields
isSelfJoin
public boolean isSelfJoin()
size
public abstract int size()
getIterator
public abstract Iterator<Tuple> getIterator(int pos)
- Returns a Tuple Iterator for the given pipe position. Position 0 is the most left handed pipe passed to the prior
CoGroup
.
To restart an Iterator over a given pipe, this method must be called again.
- Parameters:
pos
- of type int
- Returns:
- an Iterator of Tuple instances.
isEmpty
public abstract boolean isEmpty(int pos)
getGroupTuple
public abstract Tuple getGroupTuple(Tuple keysTuple)
Copyright © 2007-2013 Concurrent, Inc. All Rights Reserved.