Package org.apache.flink.test.util
Class CollectionTestEnvironment
- java.lang.Object
-
- org.apache.flink.api.java.ExecutionEnvironment
-
- org.apache.flink.api.java.CollectionEnvironment
-
- org.apache.flink.test.util.CollectionTestEnvironment
-
public class CollectionTestEnvironment extends org.apache.flink.api.java.CollectionEnvironmentACollectionEnvironmentto be used in tests. The predominant feature of this class is that it allows setting it as a context environment, causing it to be returned byExecutionEnvironment.getExecutionEnvironment(). This also allows retrieving theJobExecutionResultoutside the actual program.
-
-
Constructor Summary
Constructors Constructor Description CollectionTestEnvironment()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.flink.api.common.JobExecutionResultexecute(String jobName)org.apache.flink.api.common.JobExecutionResultgetLastJobExecutionResult()protected voidsetAsContext()protected static voidunsetAsContext()-
Methods inherited from class org.apache.flink.api.java.ExecutionEnvironment
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, getRestartStrategy, getUserCodeClassLoader, initializeContextEnvironment, readCsvFile, readFile, readFileOfPrimitives, readFileOfPrimitives, readTextFile, readTextFile, readTextFileWithValue, readTextFileWithValue, registerCachedFile, registerCachedFile, registerJobListener, registerType, registerTypeWithKryoSerializer, registerTypeWithKryoSerializer, resetContextEnvironment, setDefaultLocalParallelism, setNumberOfExecutionRetries, setParallelism, setRestartStrategy
-
-
-
-
Method Detail
-
getLastJobExecutionResult
public org.apache.flink.api.common.JobExecutionResult getLastJobExecutionResult()
- Overrides:
getLastJobExecutionResultin classorg.apache.flink.api.java.ExecutionEnvironment
-
execute
public org.apache.flink.api.common.JobExecutionResult execute(String jobName) throws Exception
- Overrides:
executein classorg.apache.flink.api.java.CollectionEnvironment- Throws:
Exception
-
setAsContext
protected void setAsContext()
-
unsetAsContext
protected static void unsetAsContext()
-
-