@Override public Iterable<DumpableConnection<PlanNode>> getDumpableInputs() { List<DumpableConnection<PlanNode>> allInputs = new ArrayList<DumpableConnection<PlanNode>>(); for (Channel c : getInputs()) { allInputs.add(c); } for (NamedChannel c : getBroadcastInputs()) { allInputs.add(c); } return allInputs; }
@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); } } } }
for (Channel c : node.getInputs()) { if (c.getLocalStrategy().dams()) { final double relativeMem = 1.0 / this.memoryConsumerWeights;
@Override public boolean preVisit(PlanNode visitable) { if (visitable instanceof SingleInputPlanNode && visitable.getProgramOperator() instanceof GroupReduceOperatorBase) { for (Channel inConn : visitable.getInputs()) { Assert.assertTrue("Reduce should just forward the input if it is already partitioned", inConn.getShipStrategy() == ShipStrategyType.FORWARD); } //just check latest ReduceNode return false; } return true; }
for (Channel in : inputPlanNode.getInputs()) { if (input.getDataExchangeMode().equals(DataExchangeMode.BATCH)) { in.setDataExchangeMode(DataExchangeMode.BATCH); allInChannels = (iterationNode.getInput().getSource()).getInputs().iterator(); } else { allInChannels = Collections.singletonList(iterationNode.getInput()).iterator(); allInChannels = (iterationNode.getInput2().getSource()).getInputs().iterator(); } else { allInChannels = Collections.singletonList(iterationNode.getInput2()).iterator();
if ((chainedTask = this.chainedTasks.get(node)) != null) { final Iterator<Channel> inConns = node.getInputs().iterator(); if (!inConns.hasNext()) { throw new CompilerException("Bug: Found chained task with no input."); targetVertexConfig.setIterationHeadSolutionSetInputIndex(1); } else { inConns = node.getInputs().iterator();
for (Iterator<Channel> inputs = visitable.getInputs().iterator(); inputs.hasNext(); numberInputs++) { final Channel inConn = inputs.next(); PlanNode inNode = inConn.getSource();
boolean allLocallyMet = true; for (Channel input : getInputs()) { FeedbackPropertiesMeetRequirementsReport inputState = input.getSource().checkPartialSolutionPropertiesMet(partialSolution, feedbackGlobal, feedbackLocal);
@Override public boolean preVisit(PlanNode visitable) { if (visitable instanceof WorksetIterationPlanNode) { PlanNode deltaNode = ((WorksetIterationPlanNode) visitable).getSolutionSetDeltaPlanNode(); //get the CoGroup DualInputPlanNode dpn = (DualInputPlanNode) deltaNode.getInputs().iterator().next().getSource(); Channel in1 = dpn.getInput1(); Channel in2 = dpn.getInput2(); Assert.assertTrue(in1.getLocalProperties().getOrdering() == null); Assert.assertTrue(in2.getLocalProperties().getOrdering() != null); Assert.assertTrue(in2.getLocalProperties().getOrdering().getInvolvedIndexes().contains(0)); Assert.assertTrue(in1.getShipStrategy() == ShipStrategyType.FORWARD); Assert.assertTrue(in2.getShipStrategy() == ShipStrategyType.PARTITION_HASH); return false; } return true; }
for (Channel c : bipn.getRootOfStepFunction().getInputs()) { assertEquals(ShipStrategyType.PARTITION_HASH, c.getShipStrategy());
String input2name = null; int num = 0; for (Channel c : node.getInputs()) { if (num == 0) { input1name = c.getSource().getNodeName();
for (Channel c : bipn.getRootOfStepFunction().getInputs()) { assertEquals(ShipStrategyType.PARTITION_HASH, c.getShipStrategy());
@Override public boolean preVisit(PlanNode visitable) { if (visitable instanceof SingleInputPlanNode && visitable.getProgramOperator() instanceof ReduceOperatorBase) { for (Channel input: visitable.getInputs()) { GlobalProperties gprops = visitable.getGlobalProperties(); LocalProperties lprops = visitable.getLocalProperties(); for (Channel input: visitable.getInputs()) { GlobalProperties gprops = visitable.getGlobalProperties(); LocalProperties lprops = visitable.getLocalProperties();
for (Channel channel : node.getInputs()) { traverseChannel(channel);
@Override public Iterable<DumpableConnection<PlanNode>> getDumpableInputs() { List<DumpableConnection<PlanNode>> allInputs = new ArrayList<DumpableConnection<PlanNode>>(); for (Channel c : getInputs()) { allInputs.add(c); } for (NamedChannel c : getBroadcastInputs()) { allInputs.add(c); } return allInputs; }
@Override public Iterable<DumpableConnection<PlanNode>> getDumpableInputs() { List<DumpableConnection<PlanNode>> allInputs = new ArrayList<DumpableConnection<PlanNode>>(); for (Channel c : getInputs()) { allInputs.add(c); } for (NamedChannel c : getBroadcastInputs()) { allInputs.add(c); } return allInputs; }
@Override public Iterable<DumpableConnection<PlanNode>> getDumpableInputs() { List<DumpableConnection<PlanNode>> allInputs = new ArrayList<DumpableConnection<PlanNode>>(); for (Channel c : getInputs()) { allInputs.add(c); } for (NamedChannel c : getBroadcastInputs()) { allInputs.add(c); } return allInputs; }
@Override public Iterable<DumpableConnection<PlanNode>> getDumpableInputs() { List<DumpableConnection<PlanNode>> allInputs = new ArrayList<DumpableConnection<PlanNode>>(); for (Channel c : getInputs()) { allInputs.add(c); } for (NamedChannel c : getBroadcastInputs()) { allInputs.add(c); } return allInputs; }