Flink 系例 之 CountWindow
countWindow数量窗口(滑动窗口【滑动窗口与滚动窗口的区别,在于滑动窗口会有数据元素重叠可能,而滚动窗口不存在元素重叠】) 示例环境 java .version : 1 .8 .x flink .version : 1 .11 .1 示例数据源 (项目码云下载) Flink 系例 之 搭建开发环境与数据 CountWindow.java import com.flink.examples.DataSource; import org.apache.flink.api.common.functions.MapFunction; import org.apache.flink.api.common.typeinfo.Types; import org.apache.flink.api.java.functions.KeySelector; import org.apache.flink.api.java.tuple.Tuple2; import org.apache.flink.api.java.tuple.Tuple3; import org.apache.flink.streaming.api.datastream.DataStream; import org.apache.flink.streaming.api.environment