Flink 本地 idea 调试开启 WebUI
- Maven 引用相关的包
- 配置端口
- 使用本地带UI环境启动
java
// maven 导入
<!-- flink运行时的webUI -->
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-runtime-web</artifactId>
<version>${flink-version}</version>
<scope>compile</scope>
</dependency>
// 配置和启动
import org.apache.flink.configuration.Configuration;
import org.apache.flink.configuration.RestOptions;
Configuration configuration = new Configuration();
configuration.setString(RestOptions.BIND_PORT,"8081");
StreamExecutionEnvironment env = StreamExecutionEnvironment.createLocalEnvironmentWithWebUI(configuration);
// 任务启动起来,访问localhost 8081 即可