cascading.flow.stream
Class MemorySpliceGate
java.lang.Object
cascading.flow.stream.Duct<Incoming,Outgoing>
cascading.flow.stream.Gate<TupleEntry,Grouping<TupleEntry,TupleEntryIterator>>
cascading.flow.stream.SpliceGate
cascading.flow.stream.MemorySpliceGate
- All Implemented Interfaces:
- Collapsing, ElementDuct
- Direct Known Subclasses:
- LocalGroupByGate, MemoryCoGroupGate, MemoryHashJoinGate
public abstract class MemorySpliceGate
- extends SpliceGate
Fields inherited from class cascading.flow.stream.SpliceGate |
flowProcess, grouping, incomingScopes, keyEntry, keyFields, orderedPrevious, outgoingScopes, role, sortFields, splice, tupleEntryIterator, valuesFields |
Fields inherited from class cascading.flow.stream.Duct |
next |
Methods inherited from class cascading.flow.stream.SpliceGate |
addIncomingScope, addOutgoingScope, cleanup, equals, getBranchNames, getFlowElement, getIncomingScopes, getOutgoingScopes, handleException, handleReThrowableException, hashCode, hasTrapHandler, makePosMap, orderDucts, setBranchNames, setTrapHandler, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
posMap
protected final java.util.Map<Duct,java.lang.Integer> posMap
groupComparators
protected java.util.Comparator<Tuple>[] groupComparators
valueComparators
protected java.util.Comparator<Tuple>[] valueComparators
groupHasher
protected TupleHasher groupHasher
keys
protected java.util.Set<Tuple> keys
keyValues
protected java.util.Map<Tuple,java.util.Collection<Tuple>>[] keyValues
closure
protected MemoryCoGroupClosure closure
numIncomingPaths
protected int numIncomingPaths
count
protected final java.util.concurrent.atomic.AtomicInteger count
MemorySpliceGate
public MemorySpliceGate(FlowProcess flowProcess,
Splice splice)
bind
public void bind(StreamGraph streamGraph)
- Overrides:
bind
in class Gate<TupleEntry,Grouping<TupleEntry,TupleEntryIterator>>
initialize
public void initialize()
- Description copied from class:
Duct
- Called immediately after bind
- Overrides:
initialize
in class SpliceGate
prepare
public void prepare()
- Overrides:
prepare
in class Duct<TupleEntry,Grouping<TupleEntry,TupleEntryIterator>>
getKeyComparator
protected java.util.Comparator getKeyComparator()
createKeySet
protected java.util.Set<Tuple> createKeySet()
createKeyValuesArray
protected java.util.Map<Tuple,java.util.Collection<Tuple>>[] createKeyValuesArray()
- This lets us just replace an old map and let the gc cleanup, vs clearing each map
- Returns:
createTupleMap
protected java.util.Map<Tuple,java.util.Collection<Tuple>> createTupleMap()
getDelegatedTuple
protected final Tuple getDelegatedTuple(Tuple object)
- This allows the tuple to honor the hasher and comparators, if any
- Parameters:
object
- the tuple to wrap
- Returns:
- a DelegatedTuple instance
isBlockingStreamed
protected abstract boolean isBlockingStreamed()
Copyright © 2007-2011 Concurrent, Inc. All Rights Reserved.