Apache Flink 快速入门
程序员文章站
2024-03-23 14:58:52
...
本节我们快速实现一个Flink入门案例,借此了解Flink依赖配置及程序开发步骤。本节开发为java,开发工具使用IDEA,依赖管理为maven。
创建maven工程:
如图创建maven工程
配置Flink依赖:
<!-- Apache Flink dependencies -->
<!-- These dependencies are provided, because they should not be packaged into the JAR file. -->
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-java</artifactId>
<version>${flink.version}</version>
<!-- <scope>provided</scope>-->
</dependency>
获取执行环境:
//配置flink ExecutionEnvironment
final StreamExecutionEnvironment env = StreamExecutionEnvironment.get