Search code examples
apache-flink

How can I start the Flink job manager web interface when running Flink from an IDE


I would like to access the Flink Web interface when starting it locally from the IDE.

I need this because I'd like to access the counters (accumulators) of Flink.


Solution

  • In Flink new versions ConfigConstants.LOCAL_START_WEBSERVER is deprecated, Instead you can use the following,

    StreamExecutionEnvironment env = StreamExecutionEnvironment.createLocalEnvironmentWithWebUI(new Configuration());
    

    Also don't forget to add the flink-runtime-web dependency.

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