Class MiniClusterWithClientResource

  • All Implemented Interfaces:
    org.junit.rules.TestRule

    public class MiniClusterWithClientResource
    extends org.apache.flink.runtime.testutils.MiniClusterResource
    Starts a Flink mini cluster as a resource and registers the StreamExecutionEnvironment.
    • Constructor Detail

      • MiniClusterWithClientResource

        public MiniClusterWithClientResource​(org.apache.flink.runtime.testutils.MiniClusterResourceConfiguration miniClusterResourceConfiguration)
    • Method Detail

      • getClusterClient

        public org.apache.flink.client.program.ClusterClient<?> getClusterClient()
      • getRestClusterClient

        public org.apache.flink.client.program.rest.RestClusterClient<?> getRestClusterClient()
                                                                                       throws Exception
        Returns a RestClusterClient that can be used to communicate with this mini cluster. Only use this if the client returned via getClusterClient() does not fulfill your needs.
        Throws:
        Exception
      • before

        public void before()
                    throws Exception
        Overrides:
        before in class org.apache.flink.runtime.testutils.MiniClusterResource
        Throws:
        Exception
      • after

        public void after()
        Overrides:
        after in class org.apache.flink.runtime.testutils.MiniClusterResource