public class TestStreamEnvironment extends StreamExecutionEnvironment
DEFAULT_JOB_NAME, isChainingEnabled, transformations
Constructor and Description |
---|
TestStreamEnvironment(ForkableFlinkMiniCluster executor,
int parallelism) |
Modifier and Type | Method and Description |
---|---|
JobExecutionResult |
execute(String jobName)
Triggers the program execution.
|
static void |
setAsContext(ForkableFlinkMiniCluster cluster,
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 |
unsetAsContext()
Resets the streaming context environment to null.
|
addDefaultKryoSerializer, addDefaultKryoSerializer, addOperator, addSource, addSource, addSource, addSource, clean, createInput, createInput, createLocalEnvironment, createLocalEnvironment, createLocalEnvironment, createRemoteEnvironment, createRemoteEnvironment, createRemoteEnvironment, disableOperatorChaining, enableCheckpointing, enableCheckpointing, enableCheckpointing, enableCheckpointing, execute, fromCollection, fromCollection, fromCollection, fromCollection, fromElements, fromElements, fromParallelCollection, fromParallelCollection, generateSequence, getBufferTimeout, getCheckpointConfig, getCheckpointingMode, getCheckpointInterval, getConfig, getExecutionEnvironment, getExecutionPlan, getNumberOfExecutionRetries, getParallelism, getRestartStrategy, getStateBackend, getStreamGraph, getStreamTimeCharacteristic, initializeContextEnvironment, isChainingEnabled, isForceCheckpointing, readFile, readFile, readFile, readFileStream, readTextFile, readTextFile, registerType, registerTypeWithKryoSerializer, registerTypeWithKryoSerializer, resetContextEnvironment, setBufferTimeout, setDefaultLocalParallelism, setNumberOfExecutionRetries, setParallelism, setRestartStrategy, setStateBackend, setStreamTimeCharacteristic, socketTextStream, socketTextStream, socketTextStream, socketTextStream, socketTextStream
public TestStreamEnvironment(ForkableFlinkMiniCluster executor, int parallelism)
public JobExecutionResult execute(String jobName) throws Exception
StreamExecutionEnvironment
The program execution will be logged and displayed with the provided name
execute
in class StreamExecutionEnvironment
jobName
- Desired name of the jobException
- which occurs during job execution.public static void setAsContext(ForkableFlinkMiniCluster cluster, int parallelism)
cluster
- The test cluster to run the test program on.parallelism
- The default parallelism for the test programs.public static void unsetAsContext()
Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.