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.
-
Field Summary
Fields inherited from class org.apache.flink.runtime.testutils.MiniClusterResource
log -
Constructor Summary
ConstructorsConstructorDescriptionMiniClusterWithClientResource(org.apache.flink.runtime.testutils.MiniClusterResourceConfiguration miniClusterResourceConfiguration) -
Method Summary
Methods inherited from class org.apache.flink.runtime.testutils.MiniClusterResource
cancelAllJobs, cancelAllJobsAndWaitUntilSlotsAreFreed, getClientConfiguration, getMiniCluster, getNumberSlots, getRestAddres, getRestAddressMethods inherited from class org.junit.rules.ExternalResource
apply
-
Constructor Details
-
MiniClusterWithClientResource
public MiniClusterWithClientResource(org.apache.flink.runtime.testutils.MiniClusterResourceConfiguration miniClusterResourceConfiguration)
-
-
Method Details
-
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
-
before
- Overrides:
beforein classorg.apache.flink.runtime.testutils.MiniClusterResource- Throws:
Exception
-
after
public void after()- Overrides:
afterin classorg.apache.flink.runtime.testutils.MiniClusterResource
-