use of org.apache.flink.api.java.ExecutionEnvironmentFactory in project flink by apache.
the class PreviewPlanEnvironment method setAsContext.
public void setAsContext() {
ExecutionEnvironmentFactory factory = new ExecutionEnvironmentFactory() {
@Override
public ExecutionEnvironment createExecutionEnvironment() {
return PreviewPlanEnvironment.this;
}
};
initializeContextEnvironment(factory);
}
use of org.apache.flink.api.java.ExecutionEnvironmentFactory in project flink by apache.
the class ContextEnvironment method setAsContext.
// --------------------------------------------------------------------------------------------
public static void setAsContext(final PipelineExecutorServiceLoader executorServiceLoader, final Configuration configuration, final ClassLoader userCodeClassLoader, final boolean enforceSingleJobExecution, final boolean suppressSysout) {
ExecutionEnvironmentFactory factory = () -> new ContextEnvironment(executorServiceLoader, configuration, userCodeClassLoader, enforceSingleJobExecution, suppressSysout);
initializeContextEnvironment(factory);
}
use of org.apache.flink.api.java.ExecutionEnvironmentFactory in project flink by apache.
the class OptimizerPlanEnvironment method setAsContext.
public void setAsContext() {
ExecutionEnvironmentFactory factory = () -> this;
initializeContextEnvironment(factory);
}
use of org.apache.flink.api.java.ExecutionEnvironmentFactory in project flink by apache.
the class CollectionTestEnvironment method setAsContext.
protected void setAsContext() {
ExecutionEnvironmentFactory factory = new ExecutionEnvironmentFactory() {
@Override
public ExecutionEnvironment createExecutionEnvironment() {
lastEnv = new CollectionTestEnvironment();
return lastEnv;
}
};
initializeContextEnvironment(factory);
}
use of org.apache.flink.api.java.ExecutionEnvironmentFactory in project flink by apache.
the class TestEnvironment method setAsContext.
// ---------------------------------------------------------------------------------------------
/**
* Sets the current {@link ExecutionEnvironment} to be a {@link 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.
*
* @param miniCluster The MiniCluster to execute jobs on.
* @param parallelism The default parallelism
* @param jarFiles Additional jar files to execute the job with
* @param classPaths Additional class paths to execute the job with
*/
public static void setAsContext(final MiniCluster miniCluster, final int parallelism, final Collection<Path> jarFiles, final Collection<URL> classPaths) {
ExecutionEnvironmentFactory factory = () -> new TestEnvironment(miniCluster, parallelism, false, jarFiles, classPaths);
initializeContextEnvironment(factory);
}
Aggregations