public class LocalStandaloneFlinkResource extends Object implements FlinkResource
Modifier and Type | Method and Description |
---|---|
void |
afterTestFailure() |
void |
afterTestSuccess() |
void |
before() |
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
get, get
apply
public void before() throws Exception
before
in interface ExternalResource
Exception
public void afterTestSuccess()
afterTestSuccess
in interface ExternalResource
public void afterTestFailure()
afterTestFailure
in interface ExternalResource
public ClusterController startCluster(int numTaskManagers) throws IOException
FlinkResource
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)
.
startCluster
in interface FlinkResource
numTaskManagers
- number of task managersIOException
public java.util.stream.Stream<String> searchAllLogs(Pattern pattern, java.util.function.Function<Matcher,String> matchProcessor) throws IOException
FlinkResource
Matcher.matches()
returned true.searchAllLogs
in interface FlinkResource
pattern
- pattern to search formatchProcessor
- match processorIOException
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.