Package org.apache.flink.api.java
Class CollectionEnvironment
- java.lang.Object
-
- org.apache.flink.api.java.ExecutionEnvironment
-
- org.apache.flink.api.java.CollectionEnvironment
-
@Deprecated @PublicEvolving public class CollectionEnvironment extends ExecutionEnvironment
Deprecated.All Flink DataSet APIs are deprecated since Flink 1.18 and will be removed in a future Flink major version. You can still build your application in DataSet, but you should move to either the DataStream and/or Table API.Version ofExecutionEnvironmentthat allows serial, local, collection-based executions of Flink programs.
-
-
Field Summary
-
Fields inherited from class org.apache.flink.api.java.ExecutionEnvironment
lastJobExecutionResult, LOG
-
-
Constructor Summary
Constructors Constructor Description CollectionEnvironment()Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description org.apache.flink.api.common.JobExecutionResultexecute(String jobName)Deprecated.Triggers the program execution.intgetParallelism()Deprecated.Gets the parallelism with which operation are executed by default.-
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, getLastJobExecutionResult, 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
-
execute
public org.apache.flink.api.common.JobExecutionResult execute(String jobName) throws Exception
Deprecated.Description copied from class:ExecutionEnvironmentTriggers the program execution. The environment will execute all parts of the program that have resulted in a "sink" operation. Sink operations are for example printing results (DataSet.print(), writing results (e.g.DataSet.writeAsText(String),DataSet.write(org.apache.flink.api.common.io.FileOutputFormat, String), or other generic data sinks created withDataSet.output(org.apache.flink.api.common.io.OutputFormat).The program execution will be logged and displayed with the given job name.
- Overrides:
executein classExecutionEnvironment- Returns:
- The result of the job execution, containing elapsed time and accumulators.
- Throws:
Exception- Thrown, if the program executions fails.
-
getParallelism
public int getParallelism()
Deprecated.Description copied from class:ExecutionEnvironmentGets the parallelism with which operation are executed by default. Operations can individually override this value to use a specific parallelism viaOperator.setParallelism(int). Other operations may need to run with a different parallelism - for example callingDataSet.reduce(org.apache.flink.api.common.functions.ReduceFunction)over the entire set will insert eventually an operation that runs non-parallel (parallelism of one).- Overrides:
getParallelismin classExecutionEnvironment- Returns:
- The parallelism used by operations, unless they override that value. This method
returns
ExecutionConfig.PARALLELISM_DEFAULT, if the environment's default parallelism should be used.
-
-