Hi, Sofya

The MiniClusterWithClientResource does not provide UI by default.
But you can enable it by adding flink-runtime-web dependency to do some
debug.


Add this dependency to your pom.xml. And flink will load the web ui
automatically.

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


Best,
Weihua


On Thu, Mar 30, 2023 at 5:47 AM Sofya T. Irwin <sof...@gmail.com> wrote:

> Hi,
>
> I'm experimenting with the MiniClusterWithClientResource, below, and when
> I print out the URL I'm not able to access a UI. Is
> the MiniClusterWithClientResource expected to provide a UI?
>
> Thanks
> -Sofya
>
>
> https://nightlies.apache.org/flink/flink-docs-release-1.17/docs/dev/datastream/testing/#junit-rule-miniclusterwithclientresource
>
>
>     public static MiniClusterWithClientResource flinkCluster =
>         new MiniClusterWithClientResource(
>              new MiniClusterResourceConfiguration.Builder()
>                  .setNumberSlotsPerTaskManager(2)
>                  .setNumberTaskManagers(1)
>                  .build());
>
>         ClusterClient<?> clusterClient = flinkCluster.getClusterClient();
>         RestClusterClient<?> restClusterClient =
> flinkCluster.getRestClusterClient();
>         String URL = clusterClient.getWebInterfaceURL();
>         String URL2 = restClusterClient.getWebInterfaceURL();
>         System.out.println("URL " + URL); // Provided URL is not accessible
>
>
>
>
>

Reply via email to