Package org.apache.flink.test.util
Class MiniClusterWithClientResource
- java.lang.Object
-
- org.junit.rules.ExternalResource
-
- org.apache.flink.runtime.testutils.MiniClusterResource
-
- org.apache.flink.test.util.MiniClusterWithClientResource
-
- All Implemented Interfaces:
org.junit.rules.TestRule
public class MiniClusterWithClientResource extends org.apache.flink.runtime.testutils.MiniClusterResourceStarts a Flink mini cluster as a resource and registers the StreamExecutionEnvironment.
-
-
Constructor Summary
Constructors Constructor Description MiniClusterWithClientResource(org.apache.flink.runtime.testutils.MiniClusterResourceConfiguration miniClusterResourceConfiguration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafter()voidbefore()org.apache.flink.client.program.ClusterClient<?>getClusterClient()org.apache.flink.client.program.rest.RestClusterClient<?>getRestClusterClient()Returns aRestClusterClientthat can be used to communicate with this mini cluster.TestStreamEnvironmentgetTestStreamEnvironment()
-
-
-
Method Detail
-
getClusterClient
public org.apache.flink.client.program.ClusterClient<?> getClusterClient()
-
getRestClusterClient
public org.apache.flink.client.program.rest.RestClusterClient<?> getRestClusterClient() throws ExceptionReturns aRestClusterClientthat can be used to communicate with this mini cluster. Only use this if the client returned viagetClusterClient()does not fulfill your needs.- Throws:
Exception
-
getTestStreamEnvironment
public TestStreamEnvironment getTestStreamEnvironment()
-
before
public void before() throws Exception- Overrides:
beforein classorg.apache.flink.runtime.testutils.MiniClusterResource- Throws:
Exception
-
after
public void after()
- Overrides:
afterin classorg.apache.flink.runtime.testutils.MiniClusterResource
-
-