How can I launch the Flink Task Manager web interface when starting Flink from the IDE

I want to access the Flink web interface when it runs locally from the IDE.

I need this because I would like to access Flink counters.

+7
apache-flink
source share
2 answers

To start the web interface when running Flink locally, we must enable the web interface in FlinkMiniCluster . FlinkMiniCluster is a class that controls the launch of all Flink services locally.

Enable Dependency:

 <dependency> <groupId>org.apache.flink</groupId> <artifactId>flink-runtime-web_${scala.binary.version}</artifactId> <version>${flink.version}</version> </dependency> 

The following snippet will enable the web interface for StreamExecutionEnvironment :

 // set up the execution environment Configuration conf = new Configuration(); conf.setBoolean(ConfigConstants.LOCAL_START_WEBSERVER, true); final StreamExecutionEnvironment env = StreamExecutionEnvironment.createLocalEnvironment(8, conf); 

You can also use RestOptions to configure the server:

 conf.setInteger(RestOptions.PORT, 8082); 
+12
source share

In addition to the code in the answer above, the following dependency is also required in the pom file.

  <dependency> <groupId>org.apache.flink</groupId> <artifactId>flink-runtime-web_${scala.binary.version}</artifactId> <version>${flink.version}</version> </dependency> 
+1
source share

All Articles