Java Code Examples for org.apache.flink.optimizer.operators.OperatorDescriptorDual#getPossibleLocalProperties()
The following examples show how to use
org.apache.flink.optimizer.operators.OperatorDescriptorDual#getPossibleLocalProperties() .
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: TwoInputNode.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
@Override public void computeInterestingPropertiesForInputs(CostEstimator estimator) { // get what we inherit and what is preserved by our user code final InterestingProperties props1 = getInterestingProperties().filterByCodeAnnotations(this, 0); final InterestingProperties props2 = getInterestingProperties().filterByCodeAnnotations(this, 1); // add all properties relevant to this node for (OperatorDescriptorDual dpd : getProperties()) { for (GlobalPropertiesPair gp : dpd.getPossibleGlobalProperties()) { // input 1 props1.addGlobalProperties(gp.getProperties1()); // input 2 props2.addGlobalProperties(gp.getProperties2()); } for (LocalPropertiesPair lp : dpd.getPossibleLocalProperties()) { // input 1 props1.addLocalProperties(lp.getProperties1()); // input 2 props2.addLocalProperties(lp.getProperties2()); } } this.input1.setInterestingProperties(props1); this.input2.setInterestingProperties(props2); for (DagConnection conn : getBroadcastConnections()) { conn.setInterestingProperties(new InterestingProperties()); } }
Example 2
Source File: TwoInputNode.java From flink with Apache License 2.0 | 5 votes |
@Override public void computeInterestingPropertiesForInputs(CostEstimator estimator) { // get what we inherit and what is preserved by our user code final InterestingProperties props1 = getInterestingProperties().filterByCodeAnnotations(this, 0); final InterestingProperties props2 = getInterestingProperties().filterByCodeAnnotations(this, 1); // add all properties relevant to this node for (OperatorDescriptorDual dpd : getProperties()) { for (GlobalPropertiesPair gp : dpd.getPossibleGlobalProperties()) { // input 1 props1.addGlobalProperties(gp.getProperties1()); // input 2 props2.addGlobalProperties(gp.getProperties2()); } for (LocalPropertiesPair lp : dpd.getPossibleLocalProperties()) { // input 1 props1.addLocalProperties(lp.getProperties1()); // input 2 props2.addLocalProperties(lp.getProperties2()); } } this.input1.setInterestingProperties(props1); this.input2.setInterestingProperties(props2); for (DagConnection conn : getBroadcastConnections()) { conn.setInterestingProperties(new InterestingProperties()); } }
Example 3
Source File: TwoInputNode.java From flink with Apache License 2.0 | 5 votes |
@Override public void computeInterestingPropertiesForInputs(CostEstimator estimator) { // get what we inherit and what is preserved by our user code final InterestingProperties props1 = getInterestingProperties().filterByCodeAnnotations(this, 0); final InterestingProperties props2 = getInterestingProperties().filterByCodeAnnotations(this, 1); // add all properties relevant to this node for (OperatorDescriptorDual dpd : getProperties()) { for (GlobalPropertiesPair gp : dpd.getPossibleGlobalProperties()) { // input 1 props1.addGlobalProperties(gp.getProperties1()); // input 2 props2.addGlobalProperties(gp.getProperties2()); } for (LocalPropertiesPair lp : dpd.getPossibleLocalProperties()) { // input 1 props1.addLocalProperties(lp.getProperties1()); // input 2 props2.addLocalProperties(lp.getProperties2()); } } this.input1.setInterestingProperties(props1); this.input2.setInterestingProperties(props2); for (DagConnection conn : getBroadcastConnections()) { conn.setInterestingProperties(new InterestingProperties()); } }
Example 4
Source File: TwoInputNode.java From Flink-CEPplus with Apache License 2.0 | 4 votes |
protected void addLocalCandidates(Channel template1, Channel template2, List<Set<? extends NamedChannel>> broadcastPlanChannels, RequestedGlobalProperties rgps1, RequestedGlobalProperties rgps2, List<PlanNode> target, LocalPropertiesPair[] validLocalCombinations, CostEstimator estimator) { for (RequestedLocalProperties ilp1 : this.input1.getInterestingProperties().getLocalProperties()) { final Channel in1 = template1.clone(); ilp1.parameterizeChannel(in1); for (RequestedLocalProperties ilp2 : this.input2.getInterestingProperties().getLocalProperties()) { final Channel in2 = template2.clone(); ilp2.parameterizeChannel(in2); for (OperatorDescriptorDual dps: getProperties()) { for (LocalPropertiesPair lpp : dps.getPossibleLocalProperties()) { if (lpp.getProperties1().isMetBy(in1.getLocalProperties()) && lpp.getProperties2().isMetBy(in2.getLocalProperties()) ) { // valid combination // for non trivial local properties, we need to check that they are co compatible // (such as when some sort order is requested, that both are the same sort order if (dps.areCoFulfilled(lpp.getProperties1(), lpp.getProperties2(), in1.getLocalProperties(), in2.getLocalProperties())) { // copy, because setting required properties and instantiation may // change the channels and should not affect prior candidates Channel in1Copy = in1.clone(); in1Copy.setRequiredLocalProps(lpp.getProperties1()); Channel in2Copy = in2.clone(); in2Copy.setRequiredLocalProps(lpp.getProperties2()); // all right, co compatible instantiate(dps, in1Copy, in2Copy, broadcastPlanChannels, target, estimator, rgps1, rgps2, ilp1, ilp2); break; } // else cannot use this pair, fall through the loop and try the next one } } } } } }
Example 5
Source File: TwoInputNode.java From flink with Apache License 2.0 | 4 votes |
protected void addLocalCandidates(Channel template1, Channel template2, List<Set<? extends NamedChannel>> broadcastPlanChannels, RequestedGlobalProperties rgps1, RequestedGlobalProperties rgps2, List<PlanNode> target, LocalPropertiesPair[] validLocalCombinations, CostEstimator estimator) { for (RequestedLocalProperties ilp1 : this.input1.getInterestingProperties().getLocalProperties()) { final Channel in1 = template1.clone(); ilp1.parameterizeChannel(in1); for (RequestedLocalProperties ilp2 : this.input2.getInterestingProperties().getLocalProperties()) { final Channel in2 = template2.clone(); ilp2.parameterizeChannel(in2); for (OperatorDescriptorDual dps: getProperties()) { for (LocalPropertiesPair lpp : dps.getPossibleLocalProperties()) { if (lpp.getProperties1().isMetBy(in1.getLocalProperties()) && lpp.getProperties2().isMetBy(in2.getLocalProperties()) ) { // valid combination // for non trivial local properties, we need to check that they are co compatible // (such as when some sort order is requested, that both are the same sort order if (dps.areCoFulfilled(lpp.getProperties1(), lpp.getProperties2(), in1.getLocalProperties(), in2.getLocalProperties())) { // copy, because setting required properties and instantiation may // change the channels and should not affect prior candidates Channel in1Copy = in1.clone(); in1Copy.setRequiredLocalProps(lpp.getProperties1()); Channel in2Copy = in2.clone(); in2Copy.setRequiredLocalProps(lpp.getProperties2()); // all right, co compatible instantiate(dps, in1Copy, in2Copy, broadcastPlanChannels, target, estimator, rgps1, rgps2, ilp1, ilp2); break; } // else cannot use this pair, fall through the loop and try the next one } } } } } }
Example 6
Source File: TwoInputNode.java From flink with Apache License 2.0 | 4 votes |
protected void addLocalCandidates(Channel template1, Channel template2, List<Set<? extends NamedChannel>> broadcastPlanChannels, RequestedGlobalProperties rgps1, RequestedGlobalProperties rgps2, List<PlanNode> target, LocalPropertiesPair[] validLocalCombinations, CostEstimator estimator) { for (RequestedLocalProperties ilp1 : this.input1.getInterestingProperties().getLocalProperties()) { final Channel in1 = template1.clone(); ilp1.parameterizeChannel(in1); for (RequestedLocalProperties ilp2 : this.input2.getInterestingProperties().getLocalProperties()) { final Channel in2 = template2.clone(); ilp2.parameterizeChannel(in2); for (OperatorDescriptorDual dps: getProperties()) { for (LocalPropertiesPair lpp : dps.getPossibleLocalProperties()) { if (lpp.getProperties1().isMetBy(in1.getLocalProperties()) && lpp.getProperties2().isMetBy(in2.getLocalProperties()) ) { // valid combination // for non trivial local properties, we need to check that they are co compatible // (such as when some sort order is requested, that both are the same sort order if (dps.areCoFulfilled(lpp.getProperties1(), lpp.getProperties2(), in1.getLocalProperties(), in2.getLocalProperties())) { // copy, because setting required properties and instantiation may // change the channels and should not affect prior candidates Channel in1Copy = in1.clone(); in1Copy.setRequiredLocalProps(lpp.getProperties1()); Channel in2Copy = in2.clone(); in2Copy.setRequiredLocalProps(lpp.getProperties2()); // all right, co compatible instantiate(dps, in1Copy, in2Copy, broadcastPlanChannels, target, estimator, rgps1, rgps2, ilp1, ilp2); break; } // else cannot use this pair, fall through the loop and try the next one } } } } } }