use of org.apache.flink.test.util.TestEnvironment in project flink by apache.
the class CassandraConnectorITCase method initializeExecutionEnvironment.
// ------------------------------------------------------------------------
// Test preparation & cleanup
// ------------------------------------------------------------------------
@Before
public void initializeExecutionEnvironment() {
TestStreamEnvironment.setAsContext(flinkCluster, 4);
new TestEnvironment(flinkCluster, 4, false).setAsContext();
}
use of org.apache.flink.test.util.TestEnvironment in project flink by apache.
the class MiniClusterExtension method registerEnv.
// Implementation
private void registerEnv(InternalMiniClusterExtension internalMiniClusterExtension) {
TestEnvironment executionEnvironment = new TestEnvironment(internalMiniClusterExtension.getMiniCluster(), internalMiniClusterExtension.getNumberSlots(), false);
executionEnvironment.setAsContext();
TestStreamEnvironment.setAsContext(internalMiniClusterExtension.getMiniCluster(), internalMiniClusterExtension.getNumberSlots());
}
use of org.apache.flink.test.util.TestEnvironment in project flink by apache.
the class CustomDistributionITCase method prepare.
@Before
public void prepare() {
TestEnvironment clusterEnv = new TestEnvironment(cluster, 1);
clusterEnv.setAsContext();
}
use of org.apache.flink.test.util.TestEnvironment in project flink by apache.
the class BatchFineGrainedRecoveryITCase method createExecutionEnvironment.
private static ExecutionEnvironment createExecutionEnvironment() {
@SuppressWarnings("StaticVariableUsedBeforeInitialization") ExecutionEnvironment env = new TestEnvironment(miniCluster, 1, true);
env.setRestartStrategy(RestartStrategies.fixedDelayRestart(MAX_JOB_RESTART_ATTEMPTS, Time.milliseconds(10)));
env.getConfig().setExecutionMode(// forces all partitions to be blocking
ExecutionMode.BATCH_FORCED);
return env;
}
Aggregations