Enum DataExchangeMode
- java.lang.Object
-
- java.lang.Enum<DataExchangeMode>
-
- org.apache.flink.runtime.io.network.DataExchangeMode
-
- All Implemented Interfaces:
Serializable,Comparable<DataExchangeMode>
public enum DataExchangeMode extends Enum<DataExchangeMode>
Defines how the data exchange between two specific operators happens.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BATCHThe data exchange is decoupled.PIPELINE_WITH_BATCH_FALLBACKPIPELINEDThe data exchange is streamed, sender and receiver are online at the same time, and the receiver back-pressures the sender.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DataExchangeModegetForForwardExchange(org.apache.flink.api.common.ExecutionMode mode)static DataExchangeModegetForShuffleOrBroadcast(org.apache.flink.api.common.ExecutionMode mode)static DataExchangeModegetPipelineBreakingExchange(org.apache.flink.api.common.ExecutionMode mode)static DataExchangeModeselect(org.apache.flink.api.common.ExecutionMode executionMode, ShipStrategyType shipStrategy, boolean breakPipeline)Computes the mode of data exchange to be used for a given execution mode and ship strategy.static DataExchangeModevalueOf(String name)Returns the enum constant of this type with the specified name.static DataExchangeMode[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
PIPELINED
public static final DataExchangeMode PIPELINED
The data exchange is streamed, sender and receiver are online at the same time, and the receiver back-pressures the sender.
-
BATCH
public static final DataExchangeMode BATCH
The data exchange is decoupled. The sender first produces its entire result and finishes. After that, the receiver is started and may consume the data.
-
PIPELINE_WITH_BATCH_FALLBACK
public static final DataExchangeMode PIPELINE_WITH_BATCH_FALLBACK
-
-
Method Detail
-
values
public static DataExchangeMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (DataExchangeMode c : DataExchangeMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DataExchangeMode valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getForForwardExchange
public static DataExchangeMode getForForwardExchange(org.apache.flink.api.common.ExecutionMode mode)
-
getForShuffleOrBroadcast
public static DataExchangeMode getForShuffleOrBroadcast(org.apache.flink.api.common.ExecutionMode mode)
-
getPipelineBreakingExchange
public static DataExchangeMode getPipelineBreakingExchange(org.apache.flink.api.common.ExecutionMode mode)
-
select
public static DataExchangeMode select(org.apache.flink.api.common.ExecutionMode executionMode, ShipStrategyType shipStrategy, boolean breakPipeline)
Computes the mode of data exchange to be used for a given execution mode and ship strategy. The type of the data exchange depends also on whether this connection has been identified to require pipeline breaking for deadlock avoidance.- If the connection is set to be pipeline breaking, this returns the pipeline breaking
variant of the execution mode
getPipelineBreakingExchange(org.apache.flink.api.common.ExecutionMode). - If the data exchange is a simple FORWARD (one-to-one communication), this returns
getForForwardExchange(org.apache.flink.api.common.ExecutionMode). - If otherwise, this returns
getForShuffleOrBroadcast(org.apache.flink.api.common.ExecutionMode).
- Parameters:
shipStrategy- The ship strategy (FORWARD, PARTITION, BROADCAST, ...) of the runtime data exchange.- Returns:
- The data exchange mode for the connection, given the concrete ship strategy.
- If the connection is set to be pipeline breaking, this returns the pipeline breaking
variant of the execution mode
-
-