public interface FlinkResource extends ExternalResource
Modifier and Type | Method and Description |
---|---|
static FlinkResource |
get()
Returns the configured FlinkResource implementation, or a
LocalStandaloneFlinkResource if none is configured. |
static FlinkResource |
get(FlinkResourceSetup setup)
Returns the configured FlinkResource implementation, or a
LocalStandaloneFlinkResource if none is configured. |
java.util.stream.Stream<String> |
searchAllLogs(Pattern pattern,
java.util.function.Function<Matcher,String> matchProcessor)
Searches the logs of all processes for the given pattern, and applies the given processor for
every line for which
Matcher.matches() returned true. |
ClusterController |
startCluster(int numTaskManagers)
Starts a cluster.
|
afterTestFailure, afterTestSuccess, apply, before
ClusterController startCluster(int numTaskManagers) throws IOException
The exact constellation of the cluster is undefined.
In the case of per-job clusters this method may not start any Flink processes, deferring
this to ClusterController.submitJob(JobSubmission, Duration)
.
numTaskManagers
- number of task managersIOException
java.util.stream.Stream<String> searchAllLogs(Pattern pattern, java.util.function.Function<Matcher,String> matchProcessor) throws IOException
Matcher.matches()
returned true.pattern
- pattern to search formatchProcessor
- match processorIOException
static FlinkResource get()
LocalStandaloneFlinkResource
if none is configured.LocalStandaloneFlinkResource
is none is
configuredstatic FlinkResource get(FlinkResourceSetup setup)
LocalStandaloneFlinkResource
if none is configured.setup
- setup instructions for the FlinkResourceLocalStandaloneFlinkResource
is none is
configuredCopyright © 2014–2023 The Apache Software Foundation. All rights reserved.