public abstract class KeyedStoredTSet<K,V> extends BatchTupleTSetImpl<K,V> implements StorableTBase<Tuple<K,V>>
BaseTSet.StateType
Modifier and Type | Field and Description |
---|---|
protected KeyedSourceTSet<K,V> |
storedSource |
Modifier and Type | Method and Description |
---|---|
java.util.List<Tuple<K,V>> |
getData()
retrieve data saved in the TSet as a
List |
INode |
getINode() |
KeyedSchema |
getInputSchema() |
KeyedSourceTSet<K,V> |
getStoredSourceTSet()
retrieve data saved in the TSet
|
<VR> JoinTLink<K,V,VR> |
join(BatchTupleTSet<K,VR> rightTSet,
CommunicationContext.JoinType type,
java.util.Comparator<K> keyComparator)
Joins with another
BatchTupleTSet . |
<VR> JoinTLink<K,V,VR> |
join(BatchTupleTSet<K,VR> rightTSet,
CommunicationContext.JoinType type,
java.util.Comparator<K> keyComparator,
TaskPartitioner<K> partitioner)
Joins with another
BatchTupleTSet . |
KeyedDirectTLink<K,V> |
keyedDirect()
Direct/pipe communication
|
KeyedGatherTLink<K,V> |
keyedGather()
Gathers data by key for
BatchTupleTSet s |
KeyedGatherTLink<K,V> |
keyedGather(PartitionFunc<K> partitionFn)
Gathers data by key for
BatchTupleTSet s |
KeyedGatherTLink<K,V> |
keyedGather(PartitionFunc<K> partitionFn,
java.util.Comparator<K> comparator)
Gathers data by key for
BatchTupleTSet s |
KeyedGatherUngroupedTLink<K,V> |
keyedGatherUngrouped()
Gathers data by key for
BatchTupleTSet s without grouping data by keys |
KeyedGatherUngroupedTLink<K,V> |
keyedGatherUngrouped(PartitionFunc<K> partitionFn)
Gathers data by key for
BatchTupleTSet s without grouping data by keys |
KeyedGatherUngroupedTLink<K,V> |
keyedGatherUngrouped(PartitionFunc<K> partitionFn,
java.util.Comparator<K> comparator)
Gathers data by key for
BatchTupleTSet s without grouping data by keys |
KeyedPartitionTLink<K,V> |
keyedPartition(PartitionFunc<K> partitionFn)
Partitions data using a
PartitionFunc based on keys |
KeyedPipeTLink<K,V> |
keyedPipe()
Pipe implementation
|
KeyedReduceTLink<K,V> |
keyedReduce(ReduceFunc<V> reduceFn)
Reduces data by key for
BatchTupleTSet s |
addInput, cache, getOutputSchema, getTSetEnv, lazyCache, lazyPersist, persist, setName, withSchema
setOutputSchema
addChildToGraph, addChildToGraph, equals, getId, getInputs, getName, getParallelism, getStateType, hashCode, isMutable, rename, setMutable, setStateType, setTSetEnv, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getDataObject
build
generateID, getTBaseGraph
protected KeyedSourceTSet<K,V> storedSource
public KeyedDirectTLink<K,V> keyedDirect()
BatchTupleTSet
keyedDirect
in interface BatchTupleTSet<K,V>
keyedDirect
in interface TupleTSet<K,V>
keyedDirect
in class BatchTupleTSetImpl<K,V>
public KeyedPartitionTLink<K,V> keyedPartition(PartitionFunc<K> partitionFn)
BatchTupleTSet
PartitionFunc
based on keyskeyedPartition
in interface BatchTupleTSet<K,V>
keyedPartition
in interface TupleTSet<K,V>
keyedPartition
in class BatchTupleTSetImpl<K,V>
partitionFn
- partition functionpublic KeyedPipeTLink<K,V> keyedPipe()
BatchTupleTSet
keyedPipe
in interface BatchTupleTSet<K,V>
keyedPipe
in class BatchTupleTSetImpl<K,V>
public KeyedReduceTLink<K,V> keyedReduce(ReduceFunc<V> reduceFn)
BatchTupleTSet
BatchTupleTSet
skeyedReduce
in interface BatchTupleTSet<K,V>
keyedReduce
in class BatchTupleTSetImpl<K,V>
reduceFn
- the reduce functionpublic KeyedGatherTLink<K,V> keyedGather()
BatchTupleTSet
BatchTupleTSet
skeyedGather
in interface BatchTupleTSet<K,V>
keyedGather
in class BatchTupleTSetImpl<K,V>
public KeyedGatherTLink<K,V> keyedGather(PartitionFunc<K> partitionFn)
BatchTupleTSet
BatchTupleTSet
skeyedGather
in interface BatchTupleTSet<K,V>
keyedGather
in class BatchTupleTSetImpl<K,V>
partitionFn
- partition function to partition data based on keypublic KeyedGatherTLink<K,V> keyedGather(PartitionFunc<K> partitionFn, java.util.Comparator<K> comparator)
BatchTupleTSet
BatchTupleTSet
skeyedGather
in interface BatchTupleTSet<K,V>
keyedGather
in class BatchTupleTSetImpl<K,V>
partitionFn
- partition function to partition data based on keycomparator
- custom key comparatorpublic KeyedGatherUngroupedTLink<K,V> keyedGatherUngrouped()
BatchTupleTSet
BatchTupleTSet
s without grouping data by keyskeyedGatherUngrouped
in interface BatchTupleTSet<K,V>
keyedGatherUngrouped
in class BatchTupleTSetImpl<K,V>
public KeyedGatherUngroupedTLink<K,V> keyedGatherUngrouped(PartitionFunc<K> partitionFn)
BatchTupleTSet
BatchTupleTSet
s without grouping data by keyskeyedGatherUngrouped
in interface BatchTupleTSet<K,V>
keyedGatherUngrouped
in class BatchTupleTSetImpl<K,V>
partitionFn
- partition function to partition data based on keypublic KeyedGatherUngroupedTLink<K,V> keyedGatherUngrouped(PartitionFunc<K> partitionFn, java.util.Comparator<K> comparator)
BatchTupleTSet
BatchTupleTSet
s without grouping data by keyskeyedGatherUngrouped
in interface BatchTupleTSet<K,V>
keyedGatherUngrouped
in class BatchTupleTSetImpl<K,V>
partitionFn
- partition function to partition data based on keycomparator
- custom key comparatorpublic <VR> JoinTLink<K,V,VR> join(BatchTupleTSet<K,VR> rightTSet, CommunicationContext.JoinType type, java.util.Comparator<K> keyComparator, TaskPartitioner<K> partitioner)
BatchTupleTSet
BatchTupleTSet
. Note that this TSet will be considered the left
TSetjoin
in interface BatchTupleTSet<K,V>
join
in class BatchTupleTSetImpl<K,V>
VR
- value type of the right tsetrightTSet
- right tsettype
- CommunicationContext.JoinType
keyComparator
- key comparatorpartitioner
- partitioner for keyspublic <VR> JoinTLink<K,V,VR> join(BatchTupleTSet<K,VR> rightTSet, CommunicationContext.JoinType type, java.util.Comparator<K> keyComparator)
BatchTupleTSet
BatchTupleTSet
. Note that this TSet will be considered the left
TSetjoin
in interface BatchTupleTSet<K,V>
join
in class BatchTupleTSetImpl<K,V>
VR
- value type of the right tsetrightTSet
- right tsettype
- CommunicationContext.JoinType
keyComparator
- key comparatorpublic KeyedSourceTSet<K,V> getStoredSourceTSet()
StorableTBase
getStoredSourceTSet
in interface StorableTBase<Tuple<K,V>>
public java.util.List<Tuple<K,V>> getData()
StorableTBase
List
NOTE: use this method only when you need to pull the data from the tset. Otherwise this would unnecessarily loads data to the memory.
getData
in interface StorableTBase<Tuple<K,V>>
public INode getINode()
getINode
in interface BuildableTSet
public KeyedSchema getInputSchema()
getInputSchema
in class BaseTSetWithSchema<V>