@Override public void computeUnclosedBranchStack() { if (this.openBranches != null) { return; } // handle the data flow branching for the regular inputs addClosedBranches(getFirstPredecessorNode().closedBranchingNodes); addClosedBranches(getSecondPredecessorNode().closedBranchingNodes); List<UnclosedBranchDescriptor> result1 = getFirstPredecessorNode().getBranchesForParent(getFirstIncomingConnection()); List<UnclosedBranchDescriptor> result2 = getSecondPredecessorNode().getBranchesForParent(getSecondIncomingConnection()); ArrayList<UnclosedBranchDescriptor> inputsMerged = new ArrayList<UnclosedBranchDescriptor>(); mergeLists(result1, result2, inputsMerged, true); // handle the data flow branching for the broadcast inputs List<UnclosedBranchDescriptor> result = computeUnclosedBranchStackForBroadcastInputs(inputsMerged); this.openBranches = (result == null || result.isEmpty()) ? Collections.<UnclosedBranchDescriptor>emptyList() : result; }
final List<? extends PlanNode> subPlans1 = getFirstPredecessorNode().getAlternativePlans(estimator); final List<? extends PlanNode> subPlans2 = getSecondPredecessorNode().getAlternativePlans(estimator); List<DagConnection> broadcastConnections = getBroadcastConnections(); List<String> broadcastConnectionNames = getBroadcastConnectionNames(); for (OperatorDescriptorDual ods : getProperties()) { pairsGlob.addAll(ods.getPossibleGlobalProperties()); pairsLoc.addAll(ods.getPossibleLocalProperties()); final int parallelism = getParallelism(); final int inParallelism1 = getFirstPredecessorNode().getParallelism(); final int inParallelism2 = getSecondPredecessorNode().getParallelism(); if (!areBranchCompatible(child1, child2)) { continue; for (OperatorDescriptorDual desc : getProperties()) { if (desc.areCompatible(gpp.getProperties1(), gpp.getProperties2(), c1.getGlobalProperties(), c2.getGlobalProperties())) addLocalCandidates(c1Clone, c2, broadcastPlanChannels, igps1, igps2, outputPlans, allLocalPairs, estimator); break outer; prunePlanAlternatives(outputPlans); outputPlans.trimToSize();
@Override public void clearInterestingProperties() { super.clearInterestingProperties(); this.nextWorksetRootConnection.clearInterestingProperties(); this.solutionSetDeltaRootConnection.clearInterestingProperties(); this.nextWorkset.accept(InterestingPropertiesClearer.INSTANCE); this.solutionSetDelta.accept(InterestingPropertiesClearer.INSTANCE); }
@Override public void accept(Visitor<OptimizerNode> visitor) { if (visitor.preVisit(this)) { if (this.input1 == null || this.input2 == null) { throw new CompilerException(); } getFirstPredecessorNode().accept(visitor); getSecondPredecessorNode().accept(visitor); for (DagConnection connection : getBroadcastConnections()) { connection.getSource().accept(visitor); } visitor.postVisit(this); } } }
PlanNode bcSource = nc.getSource(); if (!(areBranchCompatible(bcSource, inputSource1) || areBranchCompatible(bcSource, inputSource2))) { validCombination = false; break; PlanNode otherBcSource = broadcastChannelsCombination.get(k).getSource(); if (!areBranchCompatible(bcSource, otherBcSource)) { validCombination = false; break; placePipelineBreakersIfNecessary(operator.getStrategy(), in1, in2); SemanticProperties semPropsGlobalPropFiltering = getSemanticPropertiesForGlobalPropertyFiltering(); GlobalProperties gp1 = in1.getGlobalProperties().clone() .filterBySemanticProperties(semPropsGlobalPropFiltering, 0); GlobalProperties combined = operator.computeGlobalProperties(gp1, gp2); SemanticProperties semPropsLocalPropFiltering = getSemanticPropertiesForLocalPropertyFiltering(); LocalProperties lp1 = in1.getLocalProperties().clone() .filterBySemanticProperties(semPropsLocalPropFiltering, 0); node.updatePropertiesWithUniqueSets(getUniqueFields()); target.add(node);
SingleInputNode joinInput = (SingleInputNode) joinNode.getSecondPredecessorNode(); assertFalse(mapNode.getIncomingConnection().isBreakingPipeline()); assertFalse(joinNode.getFirstIncomingConnection().isBreakingPipeline()); assertFalse(joinNode.getSecondIncomingConnection().isBreakingPipeline()); assertFalse(joinInput.getIncomingConnection().isBreakingPipeline()); assertEquals(mapNode, ((SingleInputNode) joinNode.getFirstPredecessorNode()).getPredecessorNode()); assertEquals(mapNode, sinkDirect.getPredecessorNode());
if (solutionDeltaTwoInput.getFirstPredecessorNode() == this.solutionSetNode || solutionDeltaTwoInput.getSecondPredecessorNode() == this.solutionSetNode)
@Override public void computeUnionOfInterestingPropertiesFromSuccessors() { super.computeUnionOfInterestingPropertiesFromSuccessors(); // clear all local properties, as they are destroyed anyways getInterestingProperties().getLocalProperties().clear(); }
PlanNode bcSource = nc.getSource(); if (!(areBranchCompatible(bcSource, inputSource1) || areBranchCompatible(bcSource, inputSource2))) { validCombination = false; break; PlanNode otherBcSource = broadcastChannelsCombination.get(k).getSource(); if (!areBranchCompatible(bcSource, otherBcSource)) { validCombination = false; break; placePipelineBreakersIfNecessary(operator.getStrategy(), in1, in2); SemanticProperties semPropsGlobalPropFiltering = getSemanticPropertiesForGlobalPropertyFiltering(); GlobalProperties gp1 = in1.getGlobalProperties().clone() .filterBySemanticProperties(semPropsGlobalPropFiltering, 0); GlobalProperties combined = operator.computeGlobalProperties(gp1, gp2); SemanticProperties semPropsLocalPropFiltering = getSemanticPropertiesForLocalPropertyFiltering(); LocalProperties lp1 = in1.getLocalProperties().clone() .filterBySemanticProperties(semPropsLocalPropFiltering, 0); node.updatePropertiesWithUniqueSets(getUniqueFields()); target.add(node);
@Override public void accept(Visitor<OptimizerNode> visitor) { if (visitor.preVisit(this)) { if (this.input1 == null || this.input2 == null) { throw new CompilerException(); } getFirstPredecessorNode().accept(visitor); getSecondPredecessorNode().accept(visitor); for (DagConnection connection : getBroadcastConnections()) { connection.getSource().accept(visitor); } visitor.postVisit(this); } } }
SingleInputNode filterNode = (SingleInputNode) joinNode.getSecondPredecessorNode(); SingleInputNode otherReduceNode = (SingleInputNode) coGroupNode.getSecondPredecessorNode(); assertEquals(reduceNode, joinNode.getFirstPredecessorNode()); assertEquals(mapNode, filterNode.getPredecessorNode()); assertEquals(joinNode, coGroupNode.getFirstPredecessorNode()); assertEquals(filterNode, otherReduceNode.getPredecessorNode()); assertFalse(joinNode.getFirstIncomingConnection().isBreakingPipeline()); assertFalse(coGroupNode.getFirstIncomingConnection().isBreakingPipeline()); assertFalse(coGroupNode.getSecondIncomingConnection().isBreakingPipeline()); assertTrue(filterNode.getIncomingConnection().isBreakingPipeline()); assertTrue(otherReduceNode.getIncomingConnection().isBreakingPipeline()); assertTrue(joinNode.getSecondIncomingConnection().isBreakingPipeline());
if (solutionDeltaTwoInput.getFirstPredecessorNode() == this.solutionSetNode || solutionDeltaTwoInput.getSecondPredecessorNode() == this.solutionSetNode)
@Override public void computeUnionOfInterestingPropertiesFromSuccessors() { super.computeUnionOfInterestingPropertiesFromSuccessors(); // clear all local properties, as they are destroyed anyways getInterestingProperties().getLocalProperties().clear(); }
final List<? extends PlanNode> subPlans1 = getFirstPredecessorNode().getAlternativePlans(estimator); final List<? extends PlanNode> subPlans2 = getSecondPredecessorNode().getAlternativePlans(estimator); List<DagConnection> broadcastConnections = getBroadcastConnections(); List<String> broadcastConnectionNames = getBroadcastConnectionNames(); for (OperatorDescriptorDual ods : getProperties()) { pairsGlob.addAll(ods.getPossibleGlobalProperties()); pairsLoc.addAll(ods.getPossibleLocalProperties()); final int parallelism = getParallelism(); final int inParallelism1 = getFirstPredecessorNode().getParallelism(); final int inParallelism2 = getSecondPredecessorNode().getParallelism(); if (!areBranchCompatible(child1, child2)) { continue; for (OperatorDescriptorDual desc : getProperties()) { if (desc.areCompatible(gpp.getProperties1(), gpp.getProperties2(), c1.getGlobalProperties(), c2.getGlobalProperties())) addLocalCandidates(c1Clone, c2, broadcastPlanChannels, igps1, igps2, outputPlans, allLocalPairs, estimator); break outer; prunePlanAlternatives(outputPlans); outputPlans.trimToSize();
@Override public void computeUnclosedBranchStack() { if (this.openBranches != null) { return; } // handle the data flow branching for the regular inputs addClosedBranches(getFirstPredecessorNode().closedBranchingNodes); addClosedBranches(getSecondPredecessorNode().closedBranchingNodes); List<UnclosedBranchDescriptor> result1 = getFirstPredecessorNode().getBranchesForParent(getFirstIncomingConnection()); List<UnclosedBranchDescriptor> result2 = getSecondPredecessorNode().getBranchesForParent(getSecondIncomingConnection()); ArrayList<UnclosedBranchDescriptor> inputsMerged = new ArrayList<UnclosedBranchDescriptor>(); mergeLists(result1, result2, inputsMerged, true); // handle the data flow branching for the broadcast inputs List<UnclosedBranchDescriptor> result = computeUnclosedBranchStackForBroadcastInputs(inputsMerged); this.openBranches = (result == null || result.isEmpty()) ? Collections.<UnclosedBranchDescriptor>emptyList() : result; }
PlanNode bcSource = nc.getSource(); if (!(areBranchCompatible(bcSource, inputSource1) || areBranchCompatible(bcSource, inputSource2))) { validCombination = false; break; PlanNode otherBcSource = broadcastChannelsCombination.get(k).getSource(); if (!areBranchCompatible(bcSource, otherBcSource)) { validCombination = false; break; placePipelineBreakersIfNecessary(operator.getStrategy(), in1, in2); SemanticProperties semPropsGlobalPropFiltering = getSemanticPropertiesForGlobalPropertyFiltering(); GlobalProperties gp1 = in1.getGlobalProperties().clone() .filterBySemanticProperties(semPropsGlobalPropFiltering, 0); GlobalProperties combined = operator.computeGlobalProperties(gp1, gp2); SemanticProperties semPropsLocalPropFiltering = getSemanticPropertiesForLocalPropertyFiltering(); LocalProperties lp1 = in1.getLocalProperties().clone() .filterBySemanticProperties(semPropsLocalPropFiltering, 0); node.updatePropertiesWithUniqueSets(getUniqueFields()); target.add(node);
@Override public void accept(Visitor<OptimizerNode> visitor) { if (visitor.preVisit(this)) { if (this.input1 == null || this.input2 == null) { throw new CompilerException(); } getFirstPredecessorNode().accept(visitor); getSecondPredecessorNode().accept(visitor); for (DagConnection connection : getBroadcastConnections()) { connection.getSource().accept(visitor); } visitor.postVisit(this); } } }
if (solutionDeltaTwoInput.getFirstPredecessorNode() == this.solutionSetNode || solutionDeltaTwoInput.getSecondPredecessorNode() == this.solutionSetNode)
@Override public void clearInterestingProperties() { super.clearInterestingProperties(); this.nextWorksetRootConnection.clearInterestingProperties(); this.solutionSetDeltaRootConnection.clearInterestingProperties(); this.nextWorkset.accept(InterestingPropertiesClearer.INSTANCE); this.solutionSetDelta.accept(InterestingPropertiesClearer.INSTANCE); }
@Override public void computeUnionOfInterestingPropertiesFromSuccessors() { super.computeUnionOfInterestingPropertiesFromSuccessors(); // clear all local properties, as they are destroyed anyways getInterestingProperties().getLocalProperties().clear(); }