Source
负责数据的采集
如果某个source算子,是直接实现SourceFunction是,那么并行度为1。因为SourceFunction是非并行的。
如果source实现ParallelSourceFunction接口或者继承了RichParallelSourceFunction,就是并行的。
非并行的算子常用来做本地测试
比如:fromElement和fromCollection底层都是实现的SourceFunction,所以他们都是非并行的。
Transformation
负责对数据进行转换操作,调用Transformation后会生成一个新的DataStream
Sink
负责最终数据的输出