/** * Gets the number of the superstep, starting at <tt>1</tt>. * * @return The number of the current superstep. */ public int getSuperstepNumber() { return this.runtimeContext.getSuperstepNumber(); }
/** * Gets the number of the superstep, starting at <tt>1</tt>. * * @return The number of the current superstep. */ public final int getSuperstepNumber() { return this.runtimeContext.getSuperstepNumber(); }
/** * Gets the number of the superstep, starting at <tt>1</tt>. * * @return The number of the current superstep. */ public int getSuperstepNumber() { return this.runtimeContext.getSuperstepNumber(); }
/** * Gets the number of the superstep, starting at <tt>1</tt>. * * @return The number of the current superstep. */ public int getSuperstepNumber() { return this.runtimeContext.getSuperstepNumber(); }
/** * Gets the number of the superstep, starting at <tt>1</tt>. * * @return The number of the current superstep. */ public int getSuperstepNumber() { return this.runtimeContext.getSuperstepNumber(); }
/** * Gets the number of the superstep, starting at <tt>1</tt>. * * @return The number of the current superstep. */ public int getSuperstepNumber() { return this.runtimeContext.getSuperstepNumber(); }
@Override public int getSuperstepNumber() { return iterationRuntimeContext.getSuperstepNumber(); }
@Override public void open(Configuration parameters) throws Exception { super.open(parameters); isInitialSuperstep = (getIterationRuntimeContext().getSuperstepNumber() == 1); changeInScores = (isInitialSuperstep) ? -1.0 : 0.0; }
@Override public Integer map(Integer value) { int superstep = getIterationRuntimeContext().getSuperstepNumber(); return value + superstep; } }
@Override public void open(Configuration conf) { superstep = getIterationRuntimeContext().getSuperstepNumber(); }
@Override public void open(Configuration parameters) throws Exception { if (getIterationRuntimeContext().getSuperstepNumber() == 1) { this.computeFunction.init(getIterationRuntimeContext()); } this.computeFunction.preSuperstep(); }
@Override public void open(Configuration parameters) throws Exception { if (getRuntimeContext().hasBroadcastVariable("number of vertices")) { Collection<LongValue> numberOfVertices = getRuntimeContext().getBroadcastVariable("number of vertices"); this.sumFunction.setNumberOfVertices(numberOfVertices.iterator().next().getValue()); } if (getIterationRuntimeContext().getSuperstepNumber() == 1) { this.sumFunction.init(getIterationRuntimeContext()); } this.sumFunction.preSuperstep(); }
@Override public void open(Configuration parameters) throws Exception { if (getRuntimeContext().hasBroadcastVariable("number of vertices")) { Collection<LongValue> numberOfVertices = getRuntimeContext().getBroadcastVariable("number of vertices"); this.gatherFunction.setNumberOfVertices(numberOfVertices.iterator().next().getValue()); } if (getIterationRuntimeContext().getSuperstepNumber() == 1) { this.gatherFunction.init(getIterationRuntimeContext()); } this.gatherFunction.preSuperstep(); }
@Override public void open(Configuration parameters) throws Exception { if (getRuntimeContext().hasBroadcastVariable("number of vertices")) { Collection<LongValue> numberOfVertices = getRuntimeContext().getBroadcastVariable("number of vertices"); this.applyFunction.setNumberOfVertices(numberOfVertices.iterator().next().getValue()); } if (getIterationRuntimeContext().getSuperstepNumber() == 1) { this.applyFunction.init(getIterationRuntimeContext()); } this.applyFunction.preSuperstep(); }
@Override public void open(Configuration parameters) throws Exception { if (getRuntimeContext().hasBroadcastVariable("number of vertices")) { Collection<LongValue> numberOfVertices = getRuntimeContext().getBroadcastVariable("number of vertices"); this.scatterFunction.setNumberOfVertices(numberOfVertices.iterator().next().getValue()); } if (getIterationRuntimeContext().getSuperstepNumber() == 1) { this.scatterFunction.init(getIterationRuntimeContext()); } this.scatterFunction.preSuperstep(); }
@Override public void open(Configuration parameters) throws Exception { if (getRuntimeContext().hasBroadcastVariable("number of vertices")) { Collection<LongValue> numberOfVertices = getRuntimeContext().getBroadcastVariable("number of vertices"); this.gatherFunction.setNumberOfVertices(numberOfVertices.iterator().next().getValue()); } if (getIterationRuntimeContext().getSuperstepNumber() == 1) { this.gatherFunction.init(getIterationRuntimeContext()); } this.gatherFunction.preSuperstep(); }
@Override public void open(Configuration parameters) throws Exception { int currentIteration = getIterationRuntimeContext().getSuperstepNumber(); aggregator = getIterationRuntimeContext().getIterationAggregator(AGGREGATOR_NAME); if (currentIteration == 1) { danglingRankFactor = BETA * (double) numDanglingVertices / ((double) numVertices * (double) numVertices); } else { PageRankStats previousAggregate = getIterationRuntimeContext() .getPreviousIterationAggregate(AGGREGATOR_NAME); danglingRankFactor = BETA * previousAggregate.danglingRank() / (double) numVertices; } }
@Override public void open(Configuration conf) { aggr = getIterationRuntimeContext().getIterationAggregator(NEGATIVE_ELEMENTS_AGGR); superstep = getIterationRuntimeContext().getSuperstepNumber(); if (superstep > 1) { previousAggr = getIterationRuntimeContext().getPreviousIterationAggregate(NEGATIVE_ELEMENTS_AGGR); // check previous aggregator value Assert.assertEquals(superstep - 1, previousAggr.getValue()); } }
@Override public void open(Configuration conf) { aggr = getIterationRuntimeContext().getIterationAggregator(NEGATIVE_ELEMENTS_AGGR); superstep = getIterationRuntimeContext().getSuperstepNumber(); if (superstep > 1) { previousAggr = getIterationRuntimeContext().getPreviousIterationAggregate(NEGATIVE_ELEMENTS_AGGR); // check previous aggregator value Assert.assertEquals(superstep - 1, previousAggr.getValue()); } }
@Override public void open(Configuration conf) { final int superstep = getIterationRuntimeContext().getSuperstepNumber(); aggr = getIterationRuntimeContext().getIterationAggregator(aggName); if (superstep > 1 && getIterationRuntimeContext().getIndexOfThisSubtask() == 0) { LongValue val = getIterationRuntimeContext().getPreviousIterationAggregate(aggName); aggr_value[superstep - 2] = val.getValue(); } }