Flink简介
批处理
package com.wc; import org.apache.flink.api.common.functions.FlatMapFunction; import org.apache.flink.api.java.DataSet; import org.apache.flink.api.java.ExecutionEnvironment; import org.apache.flink.api.java.operators.AggregateOperator; import org.apache.flink.api.java.operators.DataSource; import org.apache.flink.api.java.tuple.Tuple2; import org.apache.flink.util.Collector; public class WordCount { public static void main(String[] args) throws Exception{ //创建执行环境 ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment(); String inputPath = "/Users/xuzhiyuan/IdeaProjects/aop-programming/flinkTutorial/src/main/resources/hello.txt"; DataSource<String> inputDataSet = env.readTextFile(inputPath); //
剩余60%内容,订阅专栏后可继续查看/也可单篇购买
大数据 文章被收录于专栏
大数据工具