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.JobExecutor executor,
int parallelism,
boolean isObjectReuseEnabled) |
TestEnvironment(org.apache.flink.runtime.minicluster.JobExecutor jobExecutor,
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 |
execute(String jobName) |
org.apache.flink.api.common.JobExecutionResult |
getLastJobExecutionResult() |
void |
setAsContext() |
static void |
setAsContext(org.apache.flink.runtime.minicluster.JobExecutor jobExecutor,
int parallelism)
Sets the current
ExecutionEnvironment to be a TestEnvironment. |
static void |
setAsContext(org.apache.flink.runtime.minicluster.JobExecutor jobExecutor,
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, 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.JobExecutor jobExecutor,
int parallelism,
boolean isObjectReuseEnabled,
Collection<org.apache.flink.core.fs.Path> jarFiles,
Collection<URL> classPaths)
public TestEnvironment(org.apache.flink.runtime.minicluster.JobExecutor executor,
int parallelism,
boolean isObjectReuseEnabled)
public org.apache.flink.api.common.JobExecutionResult getLastJobExecutionResult()
getLastJobExecutionResult in class org.apache.flink.api.java.ExecutionEnvironmentpublic org.apache.flink.api.common.JobExecutionResult execute(String jobName) throws Exception
execute in class org.apache.flink.api.java.ExecutionEnvironmentExceptionpublic void setAsContext()
public static void setAsContext(org.apache.flink.runtime.minicluster.JobExecutor jobExecutor,
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.jobExecutor - The executor to run the jobs onparallelism - 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.JobExecutor jobExecutor,
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.jobExecutor - The executor to run the jobs onparallelism - The default parallelismpublic static void unsetAsContext()
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.