public class TestStreamEnvironment extends StreamExecutionEnvironment
StreamExecutionEnvironment
that executes its jobs on MiniCluster
.cacheFile, DEFAULT_JOB_NAME, isChainingEnabled, transformations
Constructor and Description |
---|
TestStreamEnvironment(JobExecutor jobExecutor,
int parallelism) |
TestStreamEnvironment(JobExecutor jobExecutor,
int parallelism,
Collection<Path> jarFiles,
Collection<URL> classPaths) |
Modifier and Type | Method and Description |
---|---|
JobExecutionResult |
execute(StreamGraph streamGraph)
Triggers the program execution.
|
static void |
setAsContext(JobExecutor jobExecutor,
int parallelism)
Sets the streaming context environment to a TestStreamEnvironment that runs its programs on
the given cluster with the given default parallelism.
|
static void |
setAsContext(JobExecutor jobExecutor,
int parallelism,
Collection<Path> jarFiles,
Collection<URL> classpaths)
Sets the streaming context environment to a TestStreamEnvironment that runs its programs on
the given cluster with the given default parallelism and the specified jar files and class
paths.
|
static void |
unsetAsContext()
Resets the streaming context environment to null.
|
addDefaultKryoSerializer, addDefaultKryoSerializer, addOperator, addSource, addSource, addSource, addSource, clean, clearJobListeners, configure, createInput, createInput, createLocalEnvironment, createLocalEnvironment, createLocalEnvironment, createLocalEnvironmentWithWebUI, createRemoteEnvironment, createRemoteEnvironment, createRemoteEnvironment, disableOperatorChaining, enableCheckpointing, enableCheckpointing, enableCheckpointing, enableCheckpointing, execute, execute, executeAsync, executeAsync, executeAsync, fromCollection, fromCollection, fromCollection, fromCollection, fromElements, fromElements, fromParallelCollection, fromParallelCollection, generateSequence, getBufferTimeout, getCachedFiles, getCheckpointConfig, getCheckpointingMode, getCheckpointInterval, getConfig, getConfiguration, getDefaultLocalParallelism, getExecutionEnvironment, getExecutionPlan, getJobListeners, getMaxParallelism, getNumberOfExecutionRetries, getParallelism, getRestartStrategy, getStateBackend, getStreamGraph, getStreamGraph, getStreamGraph, getStreamTimeCharacteristic, initializeContextEnvironment, isChainingEnabled, isForceCheckpointing, readFile, readFile, readFile, readFile, readFileStream, readTextFile, readTextFile, registerCachedFile, registerCachedFile, registerJobListener, registerType, registerTypeWithKryoSerializer, registerTypeWithKryoSerializer, resetContextEnvironment, setBufferTimeout, setDefaultLocalParallelism, setMaxParallelism, setNumberOfExecutionRetries, setParallelism, setRestartStrategy, setStateBackend, setStateBackend, setStreamTimeCharacteristic, socketTextStream, socketTextStream, socketTextStream, socketTextStream, socketTextStream
public TestStreamEnvironment(JobExecutor jobExecutor, int parallelism, Collection<Path> jarFiles, Collection<URL> classPaths)
public TestStreamEnvironment(JobExecutor jobExecutor, int parallelism)
public JobExecutionResult execute(StreamGraph streamGraph) throws Exception
StreamExecutionEnvironment
execute
in class StreamExecutionEnvironment
streamGraph
- the stream graph representing the transformationsException
- which occurs during job execution.public static void setAsContext(JobExecutor jobExecutor, int parallelism, Collection<Path> jarFiles, Collection<URL> classpaths)
jobExecutor
- The executor to execute the jobs onparallelism
- The default parallelism for the test programs.jarFiles
- Additional jar files to execute the job withclasspaths
- Additional class paths to execute the job withpublic static void setAsContext(JobExecutor jobExecutor, int parallelism)
jobExecutor
- The executor to execute the jobs onparallelism
- The default parallelism for the test programs.public static void unsetAsContext()
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.