@Override public boolean preVisit(PlanNode visitable) { if (this.seenBefore.add(visitable)) { if (visitable instanceof IterationPlanNode) { ((IterationPlanNode) visitable).acceptForStepFunction(this); } return true; } else { return false; } }
@Override public void postVisit(PlanNode node) { if(node instanceof IterationPlanNode) { IterationPlanNode iNode = (IterationPlanNode)node; if(!visitedIterationNodes.contains(iNode)) { visitedIterationNodes.add(iNode); iNode.acceptForStepFunction(this); } } final Iterable<Channel> inputChannels = node.getInputs(); for (Channel channel : inputChannels) { ShipStrategyType shipStrategy = channel.getShipStrategy(); // Make sure we only optimize the DAG for range partition, and do not optimize multi times. if (shipStrategy == ShipStrategyType.PARTITION_RANGE) { if(channel.getDataDistribution() == null) { if (node.isOnDynamicPath()) { throw new InvalidProgramException("Range Partitioning not supported within iterations if users do not supply the data distribution."); } PlanNode channelSource = channel.getSource(); List<Channel> newSourceOutputChannels = rewriteRangePartitionChannel(channel); channelSource.getOutgoingChannels().remove(channel); channelSource.getOutgoingChannels().addAll(newSourceOutputChannels); } } } }
((IterationPlanNode) visitable).acceptForStepFunction(this);
this.currentIteration.acceptForStepFunction(this);
@Override public boolean preVisit(PlanNode visitable) { if (this.seenBefore.add(visitable)) { if (visitable instanceof IterationPlanNode) { ((IterationPlanNode) visitable).acceptForStepFunction(this); } return true; } else { return false; } }
@Override public boolean preVisit(PlanNode visitable) { if (this.seenBefore.add(visitable)) { if (visitable instanceof IterationPlanNode) { ((IterationPlanNode) visitable).acceptForStepFunction(this); } return true; } else { return false; } }
@Override public boolean preVisit(PlanNode visitable) { if (this.seenBefore.add(visitable)) { if (visitable instanceof IterationPlanNode) { ((IterationPlanNode) visitable).acceptForStepFunction(this); } return true; } else { return false; } }
@Override public boolean preVisit(PlanNode visitable) { if (this.seenBefore.add(visitable)) { if (visitable instanceof IterationPlanNode) { ((IterationPlanNode) visitable).acceptForStepFunction(this); } return true; } else { return false; } }
@Override public void postVisit(PlanNode node) { if(node instanceof IterationPlanNode) { IterationPlanNode iNode = (IterationPlanNode)node; if(!visitedIterationNodes.contains(iNode)) { visitedIterationNodes.add(iNode); iNode.acceptForStepFunction(this); } } final Iterable<Channel> inputChannels = node.getInputs(); for (Channel channel : inputChannels) { ShipStrategyType shipStrategy = channel.getShipStrategy(); // Make sure we only optimize the DAG for range partition, and do not optimize multi times. if (shipStrategy == ShipStrategyType.PARTITION_RANGE) { if(channel.getDataDistribution() == null) { if (node.isOnDynamicPath()) { throw new InvalidProgramException("Range Partitioning not supported within iterations if users do not supply the data distribution."); } PlanNode channelSource = channel.getSource(); List<Channel> newSourceOutputChannels = rewriteRangePartitionChannel(channel); channelSource.getOutgoingChannels().remove(channel); channelSource.getOutgoingChannels().addAll(newSourceOutputChannels); } } } }
@Override public void postVisit(PlanNode node) { if(node instanceof IterationPlanNode) { IterationPlanNode iNode = (IterationPlanNode)node; if(!visitedIterationNodes.contains(iNode)) { visitedIterationNodes.add(iNode); iNode.acceptForStepFunction(this); } } final Iterable<Channel> inputChannels = node.getInputs(); for (Channel channel : inputChannels) { ShipStrategyType shipStrategy = channel.getShipStrategy(); // Make sure we only optimize the DAG for range partition, and do not optimize multi times. if (shipStrategy == ShipStrategyType.PARTITION_RANGE) { if(channel.getDataDistribution() == null) { if (node.isOnDynamicPath()) { throw new InvalidProgramException("Range Partitioning not supported within iterations if users do not supply the data distribution."); } PlanNode channelSource = channel.getSource(); List<Channel> newSourceOutputChannels = rewriteRangePartitionChannel(channel); channelSource.getOutgoingChannels().remove(channel); channelSource.getOutgoingChannels().addAll(newSourceOutputChannels); } } } }
@Override public void postVisit(PlanNode node) { if(node instanceof IterationPlanNode) { IterationPlanNode iNode = (IterationPlanNode)node; if(!visitedIterationNodes.contains(iNode)) { visitedIterationNodes.add(iNode); iNode.acceptForStepFunction(this); } } final Iterable<Channel> inputChannels = node.getInputs(); for (Channel channel : inputChannels) { ShipStrategyType shipStrategy = channel.getShipStrategy(); // Make sure we only optimize the DAG for range partition, and do not optimize multi times. if (shipStrategy == ShipStrategyType.PARTITION_RANGE) { if(channel.getDataDistribution() == null) { if (node.isOnDynamicPath()) { throw new InvalidProgramException("Range Partitioning not supported within iterations if users do not supply the data distribution."); } PlanNode channelSource = channel.getSource(); List<Channel> newSourceOutputChannels = rewriteRangePartitionChannel(channel); channelSource.getOutgoingChannels().remove(channel); channelSource.getOutgoingChannels().addAll(newSourceOutputChannels); } } } }
@Override public void postVisit(PlanNode node) { if(node instanceof IterationPlanNode) { IterationPlanNode iNode = (IterationPlanNode)node; if(!visitedIterationNodes.contains(iNode)) { visitedIterationNodes.add(iNode); iNode.acceptForStepFunction(this); } } final Iterable<Channel> inputChannels = node.getInputs(); for (Channel channel : inputChannels) { ShipStrategyType shipStrategy = channel.getShipStrategy(); // Make sure we only optimize the DAG for range partition, and do not optimize multi times. if (shipStrategy == ShipStrategyType.PARTITION_RANGE) { if(channel.getDataDistribution() == null) { if (node.isOnDynamicPath()) { throw new InvalidProgramException("Range Partitioning not supported within iterations if users do not supply the data distribution."); } PlanNode channelSource = channel.getSource(); List<Channel> newSourceOutputChannels = rewriteRangePartitionChannel(channel); channelSource.getOutgoingChannels().remove(channel); channelSource.getOutgoingChannels().addAll(newSourceOutputChannels); } } } }
((IterationPlanNode) visitable).acceptForStepFunction(this);
((IterationPlanNode) visitable).acceptForStepFunction(this);
((IterationPlanNode) visitable).acceptForStepFunction(this);
((IterationPlanNode) visitable).acceptForStepFunction(this);
this.currentIteration.acceptForStepFunction(this);
this.currentIteration.acceptForStepFunction(this);
this.currentIteration.acceptForStepFunction(this);
this.currentIteration.acceptForStepFunction(this);