use of org.apache.flink.streaming.api.graph.GlobalStreamExchangeMode in project flink by apache.
the class StreamExchangeModeUtils method getBatchStreamExchangeMode.
public static StreamExchangeMode getBatchStreamExchangeMode(ReadableConfig config, StreamExchangeMode requiredExchangeMode) {
if (requiredExchangeMode == StreamExchangeMode.BATCH) {
return StreamExchangeMode.BATCH;
}
final GlobalStreamExchangeMode globalExchangeMode = getGlobalStreamExchangeMode(config).orElse(null);
if (globalExchangeMode == GlobalStreamExchangeMode.ALL_EDGES_BLOCKING) {
return StreamExchangeMode.BATCH;
}
final BatchShuffleMode shuffleMode = config.get(ExecutionOptions.BATCH_SHUFFLE_MODE);
if (shuffleMode == BatchShuffleMode.ALL_EXCHANGES_BLOCKING) {
return StreamExchangeMode.BATCH;
}
return StreamExchangeMode.UNDEFINED;
}
Aggregations