GatherUdf<K, VV, EV, M> gatherUdf = new GatherUdf<>(gather, innerType); SumUdf<K, VV, EV, M> sumUdf = new SumUdf<>(sum, innerType); ApplyUdf<K, VV, EV, M> applyUdf = new ApplyUdf<>(apply, outputType);
@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(); }
GatherUdf<K, VV, EV, M> gatherUdf = new GatherUdf<>(gather, innerType); SumUdf<K, VV, EV, M> sumUdf = new SumUdf<>(sum, innerType); ApplyUdf<K, VV, EV, M> applyUdf = new ApplyUdf<>(apply, outputType);
GatherUdf<K, VV, EV, M> gatherUdf = new GatherUdf<>(gather, innerType); SumUdf<K, VV, EV, M> sumUdf = new SumUdf<>(sum, innerType); ApplyUdf<K, VV, EV, M> applyUdf = new ApplyUdf<>(apply, outputType);
GatherUdf<K, VV, EV, M> gatherUdf = new GatherUdf<>(gather, innerType); SumUdf<K, VV, EV, M> sumUdf = new SumUdf<>(sum, innerType); ApplyUdf<K, VV, EV, M> applyUdf = new ApplyUdf<>(apply, outputType);
@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.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.gatherFunction.setNumberOfVertices(numberOfVertices.iterator().next().getValue()); } if (getIterationRuntimeContext().getSuperstepNumber() == 1) { this.gatherFunction.init(getIterationRuntimeContext()); } this.gatherFunction.preSuperstep(); }