Class CollectionTestEnvironment


  • public class CollectionTestEnvironment
    extends org.apache.flink.api.java.CollectionEnvironment
    A CollectionEnvironment to 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 by ExecutionEnvironment.getExecutionEnvironment(). This also allows retrieving the JobExecutionResult outside the actual program.
    • Field Summary

      • Fields inherited from class org.apache.flink.api.java.ExecutionEnvironment

        lastJobExecutionResult, LOG
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.apache.flink.api.common.JobExecutionResult execute​(String jobName)  
      org.apache.flink.api.common.JobExecutionResult getLastJobExecutionResult()  
      protected void setAsContext()  
      protected static void unsetAsContext()  
      • Methods inherited from class org.apache.flink.api.java.CollectionEnvironment

        getParallelism
      • 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
    • Constructor Detail

      • CollectionTestEnvironment

        public CollectionTestEnvironment()
    • Method Detail

      • getLastJobExecutionResult

        public org.apache.flink.api.common.JobExecutionResult getLastJobExecutionResult()
        Overrides:
        getLastJobExecutionResult in class org.apache.flink.api.java.ExecutionEnvironment
      • execute

        public org.apache.flink.api.common.JobExecutionResult execute​(String jobName)
                                                               throws Exception
        Overrides:
        execute in class org.apache.flink.api.java.CollectionEnvironment
        Throws:
        Exception
      • setAsContext

        protected void setAsContext()
      • unsetAsContext

        protected static void unsetAsContext()