Flink(二)快速上手之wordCount(java)
2021-01-13 17:32
标签:接受 oca throws oal data sele local pre 处理 -- 测试 Flink(二)快速上手之wordCount(java) 标签:接受 oca throws oal data sele local pre 处理 原文地址:https://www.cnblogs.com/xinjitu-001/p/12945437.html
package com.sgg.bigdata;
import org.apache.flink.api.common.functions.FilterFunction;
import org.apache.flink.api.common.functions.FlatMapFunction;
import org.apache.flink.api.java.functions.KeySelector;
import org.apache.flink.api.java.tuple.Tuple2;
import org.apache.flink.streaming.api.datastream.DataStreamSource;
import org.apache.flink.streaming.api.datastream.SingleOutputStreamOperator;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
import org.apache.flink.util.Collector;
/**
* 流式处理WordCount
* Created by huqian on 2020/5/23 22:24
*/
public class StreamWordCount {
public static void main(String[] args) throws Exception {
//创建一个流处理的执行环境
StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
//接受socket数据流
DataStreamSource
上一篇:R语言基础绘图示例
文章标题:Flink(二)快速上手之wordCount(java)
文章链接:http://soscw.com/index.php/essay/41462.html