一、项目环境搭建
项目环境搭建我这里不做过多的赘述,直接参考我之前的博客里面的环境搭建完成搭建就可以了。
地址:https://blog.csdn.net/junR_980218/article/details/125366210
二、项目编写
1、编写StreamWordCount
类,并添加如下内容
package com.atguigu.wc;
import org.apache.flink.api.common.typeinfo.Types;
import org.apache.flink.api.java.tuple.Tuple2;
import org.apache.flink.api.java.utils.ParameterTool;
import org.apache.flink.streaming.api.datastream.DataStreamSource;
import org.apache.flink.streaming.api.datastream.KeyedStream;
import org.apache.flink.streaming.api.datastream.SingleOutputStreamOperator;
import org.apache.<