public class TestEnvironment extends ExecutionEnvironment
ExecutionEnvironment
implementation which executes its jobs on a MiniCluster
.lastJobExecutionResult, LOG
Constructor and Description |
---|
TestEnvironment(MiniCluster executor,
int parallelism,
boolean isObjectReuseEnabled) |
TestEnvironment(MiniCluster miniCluster,
int parallelism,
boolean isObjectReuseEnabled,
Collection<Path> jarFiles,
Collection<URL> classPaths) |
Modifier and Type | Method and Description |
---|---|
JobExecutionResult |
getLastJobExecutionResult()
Returns the
JobExecutionResult of the last executed job. |
void |
setAsContext() |
static void |
setAsContext(MiniCluster miniCluster,
int parallelism)
Sets the current
ExecutionEnvironment to be a TestEnvironment . |
static void |
setAsContext(MiniCluster miniCluster,
int parallelism,
Collection<Path> jarFiles,
Collection<URL> classPaths)
Sets the current
ExecutionEnvironment to be a TestEnvironment . |
static void |
unsetAsContext() |
addDefaultKryoSerializer, addDefaultKryoSerializer, areExplicitEnvironmentsAllowed, clearJobListeners, configure, createCollectionsEnvironment, createInput, createInput, createLocalEnvironment, createLocalEnvironment, createLocalEnvironment, createLocalEnvironmentWithWebUI, createProgramPlan, createProgramPlan, createProgramPlan, createRemoteEnvironment, createRemoteEnvironment, createRemoteEnvironment, execute, execute, executeAsync, executeAsync, fromCollection, fromCollection, fromCollection, fromCollection, fromElements, fromElements, fromParallelCollection, fromParallelCollection, generateSequence, getConfig, getConfiguration, getDefaultLocalParallelism, getExecutionEnvironment, getExecutionPlan, getExecutorServiceLoader, getJobListeners, getNumberOfExecutionRetries, getParallelism, getRestartStrategy, getUserCodeClassLoader, initializeContextEnvironment, readCsvFile, readFile, readFileOfPrimitives, readFileOfPrimitives, readTextFile, readTextFile, readTextFileWithValue, readTextFileWithValue, registerCachedFile, registerCachedFile, registerJobListener, registerType, registerTypeWithKryoSerializer, registerTypeWithKryoSerializer, resetContextEnvironment, setDefaultLocalParallelism, setNumberOfExecutionRetries, setParallelism, setRestartStrategy
public TestEnvironment(MiniCluster miniCluster, int parallelism, boolean isObjectReuseEnabled, Collection<Path> jarFiles, Collection<URL> classPaths)
public TestEnvironment(MiniCluster executor, int parallelism, boolean isObjectReuseEnabled)
public JobExecutionResult getLastJobExecutionResult()
ExecutionEnvironment
JobExecutionResult
of the last executed job.getLastJobExecutionResult
in class ExecutionEnvironment
public void setAsContext()
public static void setAsContext(MiniCluster miniCluster, int parallelism, Collection<Path> jarFiles, Collection<URL> classPaths)
ExecutionEnvironment
to be a TestEnvironment
. The test
environment executes the given jobs on a Flink mini cluster with the given default
parallelism and the additional jar files and class paths.miniCluster
- The MiniCluster to execute jobs on.parallelism
- The default parallelismjarFiles
- Additional jar files to execute the job withclassPaths
- Additional class paths to execute the job withpublic static void setAsContext(MiniCluster miniCluster, int parallelism)
ExecutionEnvironment
to be a TestEnvironment
. The test
environment executes the given jobs on a Flink mini cluster with the given default
parallelism and the additional jar files and class paths.miniCluster
- The MiniCluster to execute jobs on.parallelism
- The default parallelismpublic static void unsetAsContext()
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.