public class CollectionEnvironment extends ExecutionEnvironment
Constructor and Description |
---|
CollectionEnvironment() |
Modifier and Type | Method and Description |
---|---|
JobExecutionResult |
execute(String jobName)
Triggers the program execution.
|
int |
getDegreeOfParallelism()
Gets the degree of parallelism with which operation are executed by default.
|
String |
getExecutionPlan()
Creates the plan with which the system will execute the program, and returns it as
a String using a JSON representation of the execution data flow graph.
|
createHadoopInput, createHadoopInput, createInput, createInput, createLocalEnvironment, createLocalEnvironment, createProgramPlan, createProgramPlan, createProgramPlan, createRemoteEnvironment, createRemoteEnvironment, enableLocalExecution, execute, fromCollection, fromCollection, fromCollection, fromCollection, fromElements, fromParallelCollection, fromParallelCollection, generateSequence, getConfig, getExecutionEnvironment, getId, getIdString, getNumberOfExecutionRetries, initializeContextEnvironment, isContextEnvironmentSet, localExecutionIsAllowed, readCsvFile, readFile, readFileOfPrimitives, readFileOfPrimitives, readHadoopFile, readHadoopFile, readHadoopFile, readHadoopFile, readTextFile, readTextFile, readTextFileWithValue, readTextFileWithValue, registerCachedFile, registerCachedFile, registerCachedFilesWithPlan, setConfig, setDefaultLocalParallelism, setDegreeOfParallelism, setNumberOfExecutionRetries
public JobExecutionResult execute(String jobName) throws Exception
ExecutionEnvironment
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 with DataSet.output(org.apache.flink.api.common.io.OutputFormat)
.
The program execution will be logged and displayed with the given job name.
execute
in class ExecutionEnvironment
Exception
- Thrown, if the program executions fails.public int getDegreeOfParallelism()
ExecutionEnvironment
Operator.setParallelism(int)
. Other operations may need to run with a different
degree of parallelism - for example calling
DataSet.reduce(org.apache.flink.api.common.functions.ReduceFunction)
over the entire
set will insert eventually an operation that runs non-parallel (degree of parallelism of one).getDegreeOfParallelism
in class ExecutionEnvironment
-1
, if the environments default parallelism should be used.public String getExecutionPlan() throws Exception
ExecutionEnvironment
getExecutionPlan
in class ExecutionEnvironment
Exception
- Thrown, if the compiler could not be instantiated, or the master could not
be contacted to retrieve information relevant to the execution planning.Copyright © 2015 The Apache Software Foundation. All rights reserved.