1.读取文件中的内容
//创建环境
ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
DataSet<String> text = env.readTextFile("文件路径");
//读取文件,对文件中的单词进行计数
DataSet<Tuple2<String, Integer>> counts =
text.flatMap(new Tokenizer())
// group by the tuple field "0" and sum up tuple field "1"
.groupBy(