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 TSets. |
SComputeTSet<T,T> |
union(TSet<T> other)
|
StreamingTSetImpl<T> |
withSchema(Schema schema)
Sets the data type of the
TSet output. |
getInputSchema, getOutputSchema, setOutputSchemaaddChildToGraph, addChildToGraph, equals, getId, getInputs, getName, getParallelism, getStateType, hashCode, isMutable, rename, setMutable, setStateType, setTSetEnv, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitsetNamebuild, getINodegenerateID, getTBaseGraphpublic StreamingTSetImpl(StreamingEnvironment tSetEnv, java.lang.String name, int parallelism, Schema inputSchema)
public StreamingEnvironment getTSetEnv()
BuildablegetTSetEnv in interface BuildablegetTSetEnv in class BaseTSet<T>public SDirectTLink<T> direct()
TSetTLink that corresponds to the communication operation where the data
will be transferred to another TSet directly.public SReduceTLink<T> reduce(ReduceFunc<T> reduceFn)
TSetTLink that reduce data on to the target TSet instance (in the runtime)
with index 0.public SPartitionTLink<T> partition(PartitionFunc<T> partitionFn, int targetParallelism)
TSetpublic SPartitionTLink<T> partition(PartitionFunc<T> partitionFn)
TSetTSet.public SGatherTLink<T> gather()
TSetTLink that would gather data to the target TSet instance with index
0 (in the runtime).public SAllReduceTLink<T> allReduce(ReduceFunc<T> reduceFn)
TSetTSet would receive the reduced
result.public SAllGatherTLink<T> allGather()
TSetpublic SComputeTSet<T,T> union(java.util.Collection<TSet<T>> tSets)
TSetCollection of TSets.public <K,V> SKeyedTSet<K,V> mapToTuple(MapFunc<Tuple<K,V>,T> mapToTupleFn)
TSetTupleTSet 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)
TSetpublic StreamingTSetImpl<T> withSchema(Schema schema)
TSetTSet output. This will be used in the packers for efficient
SER-DE operations in the following TLinkswithSchema in interface TSet<T>schema - data type as a MessageTypeTSet