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.MiniClusterResource
Starts 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 void
after()
void
before()
org.apache.flink.client.program.ClusterClient<?>
getClusterClient()
org.apache.flink.client.program.rest.RestClusterClient<?>
getRestClusterClient()
Returns aRestClusterClient
that can be used to communicate with this mini cluster.TestStreamEnvironment
getTestStreamEnvironment()
-
-
-
Method Detail
-
getClusterClient
public org.apache.flink.client.program.ClusterClient<?> getClusterClient()
-
getRestClusterClient
public org.apache.flink.client.program.rest.RestClusterClient<?> getRestClusterClient() throws Exception
Returns aRestClusterClient
that 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:
before
in classorg.apache.flink.runtime.testutils.MiniClusterResource
- Throws:
Exception
-
after
public void after()
- Overrides:
after
in classorg.apache.flink.runtime.testutils.MiniClusterResource
-
-