public class TestEnvironment
extends org.apache.flink.api.java.ExecutionEnvironment
ExecutionEnvironment implementation which executes its jobs on a MiniCluster.| Constructor and Description |
|---|
TestEnvironment(org.apache.flink.runtime.minicluster.MiniCluster executor,
int parallelism,
boolean isObjectReuseEnabled) |
TestEnvironment(org.apache.flink.runtime.minicluster.MiniCluster miniCluster,
int parallelism,
boolean isObjectReuseEnabled,
Collection<org.apache.flink.core.fs.Path> jarFiles,
Collection<URL> classPaths) |
| Modifier and Type | Method and Description |
|---|---|
org.apache.flink.api.common.JobExecutionResult |
getLastJobExecutionResult() |
void |
setAsContext() |
static void |
setAsContext(org.apache.flink.runtime.minicluster.MiniCluster miniCluster,
int parallelism)
Sets the current
ExecutionEnvironment to be a TestEnvironment. |
static void |
setAsContext(org.apache.flink.runtime.minicluster.MiniCluster miniCluster,
int parallelism,
Collection<org.apache.flink.core.fs.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, setRestartStrategypublic TestEnvironment(org.apache.flink.runtime.minicluster.MiniCluster miniCluster,
int parallelism,
boolean isObjectReuseEnabled,
Collection<org.apache.flink.core.fs.Path> jarFiles,
Collection<URL> classPaths)
public TestEnvironment(org.apache.flink.runtime.minicluster.MiniCluster executor,
int parallelism,
boolean isObjectReuseEnabled)
public org.apache.flink.api.common.JobExecutionResult getLastJobExecutionResult()
getLastJobExecutionResult in class org.apache.flink.api.java.ExecutionEnvironmentpublic void setAsContext()
public static void setAsContext(org.apache.flink.runtime.minicluster.MiniCluster miniCluster,
int parallelism,
Collection<org.apache.flink.core.fs.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(org.apache.flink.runtime.minicluster.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–2023 The Apache Software Foundation. All rights reserved.