public abstract class StreamingTSetImpl<T> extends BaseTSetWithSchema<T> implements StreamingTSet<T>
BaseTSet.StateType
Constructor and Description |
---|
StreamingTSetImpl(StreamingEnvironment tSetEnv,
java.lang.String name,
int parallelism,
Schema inputSchema) |
Modifier and Type | Method and Description |
---|---|
SAllGatherTLink<T> |
allGather()
Same as gather, but all the target TSet instances would receive the gathered result in the
runtime.
|
SAllReduceTLink<T> |
allReduce(ReduceFunc<T> reduceFn)
Similar to reduce, but all instances of the target
TSet would receive the reduced
result. |
SDirectTLink<T> |
direct()
Returns a Direct
TLink that corresponds to the communication operation where the data
will be transferred to another TSet directly. |
SGatherTLink<T> |
gather()
Returns a Gather
TLink that would gather data to the target TSet instance with index
0 (in the runtime). |
StreamingEnvironment |
getTSetEnv()
tset env
|
<K,V> SKeyedTSet<K,V> |
mapToTuple(MapFunc<Tuple<K,V>,T> mapToTupleFn)
|
SPartitionTLink<T> |
partition(PartitionFunc<T> partitionFn)
Same as above, but the parallelism will be preserved in the target
TSet . |
SPartitionTLink<T> |
partition(PartitionFunc<T> partitionFn,
int targetParallelism)
Returns a Partition
TLink that would partition data according based on a function
provided. |
SReduceTLink<T> |
reduce(ReduceFunc<T> reduceFn)
Returns a Reduce
TLink that reduce data on to the target TSet instance (in the runtime)
with index 0. |
SReplicateTLink<T> |
replicate(int replications)
|
SComputeTSet<T,T> |
union(java.util.Collection<TSet<T>> tSets)
Same as above, but accepts a
Collection of TSet s. |
SComputeTSet<T,T> |
union(TSet<T> other)
|
StreamingTSetImpl<T> |
withSchema(Schema schema)
Sets the data type of the
TSet output. |
getInputSchema, getOutputSchema, setOutputSchema
addChildToGraph, addChildToGraph, equals, getId, getInputs, getName, getParallelism, getStateType, hashCode, isMutable, rename, setMutable, setStateType, setTSetEnv, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
setName
build, getINode
generateID, getTBaseGraph
public StreamingTSetImpl(StreamingEnvironment tSetEnv, java.lang.String name, int parallelism, Schema inputSchema)
public StreamingEnvironment getTSetEnv()
Buildable
getTSetEnv
in interface Buildable
getTSetEnv
in class BaseTSet<T>
public SDirectTLink<T> direct()
TSet
TLink
that corresponds to the communication operation where the data
will be transferred to another TSet directly.public SReduceTLink<T> reduce(ReduceFunc<T> reduceFn)
TSet
TLink
that reduce data on to the target TSet instance (in the runtime)
with index 0.public SPartitionTLink<T> partition(PartitionFunc<T> partitionFn, int targetParallelism)
TSet
public SPartitionTLink<T> partition(PartitionFunc<T> partitionFn)
TSet
TSet
.public SGatherTLink<T> gather()
TSet
TLink
that would gather data to the target TSet instance with index
0 (in the runtime).public SAllReduceTLink<T> allReduce(ReduceFunc<T> reduceFn)
TSet
TSet
would receive the reduced
result.public SAllGatherTLink<T> allGather()
TSet
public SComputeTSet<T,T> union(java.util.Collection<TSet<T>> tSets)
TSet
Collection
of TSet
s.public <K,V> SKeyedTSet<K,V> mapToTuple(MapFunc<Tuple<K,V>,T> mapToTupleFn)
TSet
TupleTSet
based on the MapFunc
provided. This will an entry point
to keyed communication operations from a non-keyed TSet
.mapToTuple
in interface StreamingTSet<T>
mapToTuple
in interface TSet<T>
K
- type of keyV
- type of valuemapToTupleFn
- Map functionpublic SReplicateTLink<T> replicate(int replications)
TSet
public StreamingTSetImpl<T> withSchema(Schema schema)
TSet
TSet
output. This will be used in the packers for efficient
SER-DE operations in the following TLink
swithSchema
in interface TSet<T>
schema
- data type as a MessageType
TSet