T - Type of data in the stream.public class DataStream<T> extends Stream<DataStream<T>,T>
This class defines all the streaming operations.
| Constructor and Description |
|---|
DataStream(DataStream<R> input,
StreamOperator streamOperator) |
DataStream(DataStream<R> input,
StreamOperator streamOperator,
Partition<T> partition) |
DataStream(PythonDataStream referencedStream)
Create a java stream that reference passed python stream.
|
DataStream(StreamingContext streamingContext,
StreamOperator streamOperator) |
DataStream(StreamingContext streamingContext,
StreamOperator streamOperator,
Partition<T> partition) |
| Modifier and Type | Method and Description |
|---|---|
PythonDataStream |
asPythonStream()
Convert this stream as a python stream.
|
DataStream<T> |
broadcast()
Apply broadcast to this stream.
|
DataStream<T> |
filter(FilterFunction<T> filterFunction) |
<R> DataStream<R> |
flatMap(FlatMapFunction<T,R> flatMapFunction)
Apply a flat-map function to this stream.
|
Language |
getLanguage() |
<O,R> JoinStream<T,O,R> |
join(DataStream<O> other)
Apply a join transformation to this stream, with another stream.
|
<K> KeyDataStream<K,T> |
keyBy(KeyFunction<T,K> keyFunction)
Apply a key-by function to this stream.
|
<R> DataStream<R> |
map(MapFunction<T,R> mapFunction)
Apply a map function to this stream.
|
DataStream<T> |
partitionBy(Partition<T> partition)
Apply a partition to this stream.
|
<R> DataStream<R> |
process() |
DataStreamSink<T> |
sink(SinkFunction<T> sinkFunction)
Apply a sink function and get a StreamSink.
|
DataStream<T> |
union(DataStream<T> stream,
DataStream<T>... others)
Apply union transformations to this stream by merging
DataStream outputs of the same
type with each other. |
DataStream<T> |
union(List<DataStream<T>> streams)
Apply union transformations to this stream by merging
DataStream outputs of the same
type with each other. |
disableChain, forward, getConfig, getId, getInputStream, getOperator, getOriginalStream, getParallelism, getPartition, getStreamingContext, isProxyStream, setParallelism, setPartition, withChainStrategy, withConfig, withConfigpublic DataStream(StreamingContext streamingContext, StreamOperator streamOperator)
public DataStream(StreamingContext streamingContext, StreamOperator streamOperator, Partition<T> partition)
public DataStream(DataStream<R> input, StreamOperator streamOperator)
public DataStream(DataStream<R> input, StreamOperator streamOperator, Partition<T> partition)
public DataStream(PythonDataStream referencedStream)
public <R> DataStream<R> map(MapFunction<T,R> mapFunction)
R - Type of data returned by the map function.mapFunction - The map function.public <R> DataStream<R> flatMap(FlatMapFunction<T,R> flatMapFunction)
R - Type of data returned by the flatmap function.flatMapFunction - The FlatMapFunctionpublic DataStream<T> filter(FilterFunction<T> filterFunction)
@SafeVarargs public final DataStream<T> union(DataStream<T> stream, DataStream<T>... others)
DataStream outputs of the same
type with each other.stream - The DataStream to union output with.others - The other DataStreams to union output with.public final DataStream<T> union(List<DataStream<T>> streams)
DataStream outputs of the same
type with each other.streams - The DataStreams to union output with.public <O,R> JoinStream<T,O,R> join(DataStream<O> other)
O - The type of the other stream data.R - The type of the data in the joined stream.other - Another stream.public <R> DataStream<R> process()
public DataStreamSink<T> sink(SinkFunction<T> sinkFunction)
sinkFunction - The sink function.public <K> KeyDataStream<K,T> keyBy(KeyFunction<T,K> keyFunction)
K - The type of the key.keyFunction - the key function.public DataStream<T> broadcast()
public DataStream<T> partitionBy(Partition<T> partition)
partition - The partitioning strategy.public PythonDataStream asPythonStream()
public Language getLanguage()
getLanguage in class Stream<DataStream<T>,T>Copyright © 2020. All rights reserved.