Java Code Examples for org.apache.flink.runtime.operators.shipping.ShipStrategyType#NONE
The following examples show how to use
org.apache.flink.runtime.operators.shipping.ShipStrategyType#NONE .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DagConnection.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
/** * Constructor to create a result from an operator that is not * consumed by another operator. * * @param source * The source node. * @param exchangeMode * The data exchange mode (pipelined / batch / batch only for shuffles / ... ) */ public DagConnection(OptimizerNode source, ExecutionMode exchangeMode) { if (source == null) { throw new NullPointerException("Source must not be null."); } this.source = source; this.target = null; this.shipStrategy = ShipStrategyType.NONE; this.dataExchangeMode = exchangeMode; }
Example 2
Source File: Channel.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
public void adjustGlobalPropertiesForFullParallelismChange() { if (this.shipStrategy == null || this.shipStrategy == ShipStrategyType.NONE) { throw new IllegalStateException("Cannot adjust channel for parallelism " + "change before the ship strategy is set."); } // make sure the properties are acquired if (this.globalProps == null) { getGlobalProperties(); } // some strategies globally reestablish properties switch (this.shipStrategy) { case FORWARD: throw new CompilerException("Cannot use FORWARD strategy between operations " + "with different number of parallel instances."); case NONE: // excluded by sanity check. left here for verification check completion case BROADCAST: case PARTITION_HASH: case PARTITION_RANGE: case PARTITION_RANDOM: case PARTITION_FORCED_REBALANCE: case PARTITION_CUSTOM: return; } throw new CompilerException("Unrecognized Ship Strategy Type: " + this.shipStrategy); }
Example 3
Source File: DagConnection.java From flink with Apache License 2.0 | 5 votes |
/** * Constructor to create a result from an operator that is not * consumed by another operator. * * @param source * The source node. * @param exchangeMode * The data exchange mode (pipelined / batch / batch only for shuffles / ... ) */ public DagConnection(OptimizerNode source, ExecutionMode exchangeMode) { if (source == null) { throw new NullPointerException("Source must not be null."); } this.source = source; this.target = null; this.shipStrategy = ShipStrategyType.NONE; this.dataExchangeMode = exchangeMode; }
Example 4
Source File: Channel.java From flink with Apache License 2.0 | 5 votes |
public void adjustGlobalPropertiesForFullParallelismChange() { if (this.shipStrategy == null || this.shipStrategy == ShipStrategyType.NONE) { throw new IllegalStateException("Cannot adjust channel for parallelism " + "change before the ship strategy is set."); } // make sure the properties are acquired if (this.globalProps == null) { getGlobalProperties(); } // some strategies globally reestablish properties switch (this.shipStrategy) { case FORWARD: throw new CompilerException("Cannot use FORWARD strategy between operations " + "with different number of parallel instances."); case NONE: // excluded by sanity check. left here for verification check completion case BROADCAST: case PARTITION_HASH: case PARTITION_RANGE: case PARTITION_RANDOM: case PARTITION_FORCED_REBALANCE: case PARTITION_CUSTOM: return; } throw new CompilerException("Unrecognized Ship Strategy Type: " + this.shipStrategy); }
Example 5
Source File: DagConnection.java From flink with Apache License 2.0 | 5 votes |
/** * Constructor to create a result from an operator that is not * consumed by another operator. * * @param source * The source node. * @param exchangeMode * The data exchange mode (pipelined / batch / batch only for shuffles / ... ) */ public DagConnection(OptimizerNode source, ExecutionMode exchangeMode) { if (source == null) { throw new NullPointerException("Source must not be null."); } this.source = source; this.target = null; this.shipStrategy = ShipStrategyType.NONE; this.dataExchangeMode = exchangeMode; }
Example 6
Source File: Channel.java From flink with Apache License 2.0 | 5 votes |
public void adjustGlobalPropertiesForFullParallelismChange() { if (this.shipStrategy == null || this.shipStrategy == ShipStrategyType.NONE) { throw new IllegalStateException("Cannot adjust channel for parallelism " + "change before the ship strategy is set."); } // make sure the properties are acquired if (this.globalProps == null) { getGlobalProperties(); } // some strategies globally reestablish properties switch (this.shipStrategy) { case FORWARD: throw new CompilerException("Cannot use FORWARD strategy between operations " + "with different number of parallel instances."); case NONE: // excluded by sanity check. left here for verification check completion case BROADCAST: case PARTITION_HASH: case PARTITION_RANGE: case PARTITION_RANDOM: case PARTITION_FORCED_REBALANCE: case PARTITION_CUSTOM: return; } throw new CompilerException("Unrecognized Ship Strategy Type: " + this.shipStrategy); }
Example 7
Source File: PlanNode.java From Flink-CEPplus with Apache License 2.0 | 4 votes |
public FeedbackPropertiesMeetRequirementsReport checkPartialSolutionPropertiesMet(PlanNode partialSolution, GlobalProperties feedbackGlobal, LocalProperties feedbackLocal) { if (this == partialSolution) { return FeedbackPropertiesMeetRequirementsReport.PENDING; } boolean found = false; boolean allMet = true; boolean allLocallyMet = true; for (Channel input : getInputs()) { FeedbackPropertiesMeetRequirementsReport inputState = input.getSource().checkPartialSolutionPropertiesMet(partialSolution, feedbackGlobal, feedbackLocal); if (inputState == FeedbackPropertiesMeetRequirementsReport.NO_PARTIAL_SOLUTION) { continue; } else if (inputState == FeedbackPropertiesMeetRequirementsReport.MET) { found = true; continue; } else if (inputState == FeedbackPropertiesMeetRequirementsReport.NOT_MET) { return FeedbackPropertiesMeetRequirementsReport.NOT_MET; } else { found = true; // the partial solution was on the path here. check whether the channel requires // certain properties that are met, or whether the channel introduces new properties // if the plan introduces new global properties, then we can stop looking whether // the feedback properties are sufficient to meet the requirements if (input.getShipStrategy() != ShipStrategyType.FORWARD && input.getShipStrategy() != ShipStrategyType.NONE) { continue; } // first check whether this channel requires something that is not met if (input.getRequiredGlobalProps() != null && !input.getRequiredGlobalProps().isMetBy(feedbackGlobal)) { return FeedbackPropertiesMeetRequirementsReport.NOT_MET; } // in general, not everything is met here already allMet = false; // if the plan introduces new local properties, we can stop checking for matching local properties if (inputState != FeedbackPropertiesMeetRequirementsReport.PENDING_LOCAL_MET) { if (input.getLocalStrategy() == LocalStrategy.NONE) { if (input.getRequiredLocalProps() != null && !input.getRequiredLocalProps().isMetBy(feedbackLocal)) { return FeedbackPropertiesMeetRequirementsReport.NOT_MET; } allLocallyMet = false; } } } } if (!found) { return FeedbackPropertiesMeetRequirementsReport.NO_PARTIAL_SOLUTION; } else if (allMet) { return FeedbackPropertiesMeetRequirementsReport.MET; } else if (allLocallyMet) { return FeedbackPropertiesMeetRequirementsReport.PENDING_LOCAL_MET; } else { return FeedbackPropertiesMeetRequirementsReport.PENDING; } }
Example 8
Source File: PlanNode.java From flink with Apache License 2.0 | 4 votes |
public FeedbackPropertiesMeetRequirementsReport checkPartialSolutionPropertiesMet(PlanNode partialSolution, GlobalProperties feedbackGlobal, LocalProperties feedbackLocal) { if (this == partialSolution) { return FeedbackPropertiesMeetRequirementsReport.PENDING; } boolean found = false; boolean allMet = true; boolean allLocallyMet = true; for (Channel input : getInputs()) { FeedbackPropertiesMeetRequirementsReport inputState = input.getSource().checkPartialSolutionPropertiesMet(partialSolution, feedbackGlobal, feedbackLocal); if (inputState == FeedbackPropertiesMeetRequirementsReport.NO_PARTIAL_SOLUTION) { continue; } else if (inputState == FeedbackPropertiesMeetRequirementsReport.MET) { found = true; continue; } else if (inputState == FeedbackPropertiesMeetRequirementsReport.NOT_MET) { return FeedbackPropertiesMeetRequirementsReport.NOT_MET; } else { found = true; // the partial solution was on the path here. check whether the channel requires // certain properties that are met, or whether the channel introduces new properties // if the plan introduces new global properties, then we can stop looking whether // the feedback properties are sufficient to meet the requirements if (input.getShipStrategy() != ShipStrategyType.FORWARD && input.getShipStrategy() != ShipStrategyType.NONE) { continue; } // first check whether this channel requires something that is not met if (input.getRequiredGlobalProps() != null && !input.getRequiredGlobalProps().isMetBy(feedbackGlobal)) { return FeedbackPropertiesMeetRequirementsReport.NOT_MET; } // in general, not everything is met here already allMet = false; // if the plan introduces new local properties, we can stop checking for matching local properties if (inputState != FeedbackPropertiesMeetRequirementsReport.PENDING_LOCAL_MET) { if (input.getLocalStrategy() == LocalStrategy.NONE) { if (input.getRequiredLocalProps() != null && !input.getRequiredLocalProps().isMetBy(feedbackLocal)) { return FeedbackPropertiesMeetRequirementsReport.NOT_MET; } allLocallyMet = false; } } } } if (!found) { return FeedbackPropertiesMeetRequirementsReport.NO_PARTIAL_SOLUTION; } else if (allMet) { return FeedbackPropertiesMeetRequirementsReport.MET; } else if (allLocallyMet) { return FeedbackPropertiesMeetRequirementsReport.PENDING_LOCAL_MET; } else { return FeedbackPropertiesMeetRequirementsReport.PENDING; } }
Example 9
Source File: PlanNode.java From flink with Apache License 2.0 | 4 votes |
public FeedbackPropertiesMeetRequirementsReport checkPartialSolutionPropertiesMet(PlanNode partialSolution, GlobalProperties feedbackGlobal, LocalProperties feedbackLocal) { if (this == partialSolution) { return FeedbackPropertiesMeetRequirementsReport.PENDING; } boolean found = false; boolean allMet = true; boolean allLocallyMet = true; for (Channel input : getInputs()) { FeedbackPropertiesMeetRequirementsReport inputState = input.getSource().checkPartialSolutionPropertiesMet(partialSolution, feedbackGlobal, feedbackLocal); if (inputState == FeedbackPropertiesMeetRequirementsReport.NO_PARTIAL_SOLUTION) { continue; } else if (inputState == FeedbackPropertiesMeetRequirementsReport.MET) { found = true; continue; } else if (inputState == FeedbackPropertiesMeetRequirementsReport.NOT_MET) { return FeedbackPropertiesMeetRequirementsReport.NOT_MET; } else { found = true; // the partial solution was on the path here. check whether the channel requires // certain properties that are met, or whether the channel introduces new properties // if the plan introduces new global properties, then we can stop looking whether // the feedback properties are sufficient to meet the requirements if (input.getShipStrategy() != ShipStrategyType.FORWARD && input.getShipStrategy() != ShipStrategyType.NONE) { continue; } // first check whether this channel requires something that is not met if (input.getRequiredGlobalProps() != null && !input.getRequiredGlobalProps().isMetBy(feedbackGlobal)) { return FeedbackPropertiesMeetRequirementsReport.NOT_MET; } // in general, not everything is met here already allMet = false; // if the plan introduces new local properties, we can stop checking for matching local properties if (inputState != FeedbackPropertiesMeetRequirementsReport.PENDING_LOCAL_MET) { if (input.getLocalStrategy() == LocalStrategy.NONE) { if (input.getRequiredLocalProps() != null && !input.getRequiredLocalProps().isMetBy(feedbackLocal)) { return FeedbackPropertiesMeetRequirementsReport.NOT_MET; } allLocallyMet = false; } } } } if (!found) { return FeedbackPropertiesMeetRequirementsReport.NO_PARTIAL_SOLUTION; } else if (allMet) { return FeedbackPropertiesMeetRequirementsReport.MET; } else if (allLocallyMet) { return FeedbackPropertiesMeetRequirementsReport.PENDING_LOCAL_MET; } else { return FeedbackPropertiesMeetRequirementsReport.PENDING; } }