Search in sources :

Example 1 with BatchShuffleMode

use of org.apache.flink.api.common.BatchShuffleMode 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;
}
Also used : BatchShuffleMode(org.apache.flink.api.common.BatchShuffleMode) GlobalStreamExchangeMode(org.apache.flink.streaming.api.graph.GlobalStreamExchangeMode)

Aggregations

BatchShuffleMode (org.apache.flink.api.common.BatchShuffleMode)1 GlobalStreamExchangeMode (org.apache.flink.streaming.api.graph.GlobalStreamExchangeMode)1