use of org.apache.flink.runtime.io.network.api.writer.AvailabilityTestResultPartitionWriter in project flink by apache.
the class StreamTaskTest method setupEnvironment.
private MockEnvironment setupEnvironment(boolean... outputAvailabilities) {
final Configuration configuration = new Configuration();
new MockStreamConfig(configuration, outputAvailabilities.length);
final List<ResultPartitionWriter> writers = new ArrayList<>(outputAvailabilities.length);
for (int i = 0; i < outputAvailabilities.length; i++) {
writers.add(new AvailabilityTestResultPartitionWriter(outputAvailabilities[i]));
}
final MockEnvironment environment = new MockEnvironmentBuilder().setTaskConfiguration(configuration).build();
environment.addOutputs(writers);
return environment;
}
Aggregations