/** * Helper method which sets up an iteration with the given vertex value(either simple or with degrees). * * @param iteration */ private void setUpIteration(DeltaIteration<?, ?> iteration) { // set up the iteration operator if (this.configuration != null) { iteration.name(this.configuration.getName("Scatter-gather iteration (" + gatherFunction + " | " + scatterFunction + ")")); iteration.parallelism(this.configuration.getParallelism()); iteration.setSolutionSetUnManaged(this.configuration.isSolutionSetUnmanagedMemory()); // register all aggregators for (Map.Entry<String, Aggregator<?>> entry : this.configuration.getAggregators().entrySet()) { iteration.registerAggregator(entry.getKey(), entry.getValue()); } } else { // no configuration provided; set default name iteration.name("Scatter-gather iteration (" + gatherFunction + " | " + scatterFunction + ")"); } }
if (this.configuration != null && this.configuration.isOptNumVertices()) { try { numberOfVertices = GraphUtils.count(this.initialVertices); scatterFunction.setDirection(this.configuration.getDirection()); } else { scatterFunction.setDirection(EdgeDirection.OUT); if (this.configuration != null && this.configuration.isOptDegrees()) { return createResultVerticesWithDegrees(graph, messagingDirection, messageTypeInfo, numberOfVertices); } else {
private <VVWithDegree> void configureUpdateFunction(CoGroupOperator<?, ?, Vertex<K, VVWithDegree>> updates) { // configure coGroup update function with name and broadcast variables updates = updates.name("Vertex State Updates"); if (this.configuration != null) { for (Tuple2<String, DataSet<?>> e : this.configuration.getGatherBcastVars()) { updates = updates.withBroadcastSet(e.f1, e.f0); } } // let the operator know that we preserve the key field updates.withForwardedFieldsFirst("0").withForwardedFieldsSecond("0"); } }
for (Tuple2<String, DataSet<?>> e : this.configuration.getScatterBcastVars()) { messages = messages.withBroadcastSet(e.f1, e.f0); if (this.configuration.isOptNumVertices()) { messages = messages.withBroadcastSet(numberOfVertices, "number of vertices");
this.gatherFunction.setOptDegrees(this.configuration.isOptDegrees()); messages.coGroup(iteration.getSolutionSet()).where(0).equalTo(0).with(updateUdf); if (this.configuration != null && this.configuration.isOptNumVertices()) { updates = updates.withBroadcastSet(numberOfVertices, "number of vertices");
messages.coGroup(iteration.getSolutionSet()).where(0).equalTo(0).with(updateUdf); if (this.configuration != null && this.configuration.isOptNumVertices()) { updates = updates.withBroadcastSet(numberOfVertices, "number of vertices");
for (Tuple2<String, DataSet<?>> e : this.configuration.getScatterBcastVars()) { messages = messages.withBroadcastSet(e.f1, e.f0); if (this.configuration.isOptNumVertices()) { messages = messages.withBroadcastSet(numberOfVertices, "number of vertices");
this.gatherFunction.setOptDegrees(this.configuration.isOptDegrees()); messages.coGroup(iteration.getSolutionSet()).where(0).equalTo(0).with(updateUdf); if (this.configuration != null && this.configuration.isOptNumVertices()) { updates = updates.withBroadcastSet(numberOfVertices, "number of vertices");
messages.coGroup(iteration.getSolutionSet()).where(0).equalTo(0).with(updateUdf); if (this.configuration != null && this.configuration.isOptNumVertices()) { updates = updates.withBroadcastSet(numberOfVertices, "number of vertices");
/** * Helper method which sets up an iteration with the given vertex value(either simple or with degrees). * * @param iteration */ private void setUpIteration(DeltaIteration<?, ?> iteration) { // set up the iteration operator if (this.configuration != null) { iteration.name(this.configuration.getName("Scatter-gather iteration (" + gatherFunction + " | " + scatterFunction + ")")); iteration.parallelism(this.configuration.getParallelism()); iteration.setSolutionSetUnManaged(this.configuration.isSolutionSetUnmanagedMemory()); // register all aggregators for (Map.Entry<String, Aggregator<?>> entry : this.configuration.getAggregators().entrySet()) { iteration.registerAggregator(entry.getKey(), entry.getValue()); } } else { // no configuration provided; set default name iteration.name("Scatter-gather iteration (" + gatherFunction + " | " + scatterFunction + ")"); } }
if (this.configuration != null && this.configuration.isOptNumVertices()) { try { numberOfVertices = GraphUtils.count(this.initialVertices); scatterFunction.setDirection(this.configuration.getDirection()); } else { scatterFunction.setDirection(EdgeDirection.OUT); if (this.configuration != null && this.configuration.isOptDegrees()) { return createResultVerticesWithDegrees(graph, messagingDirection, messageTypeInfo, numberOfVertices); } else {
for (Tuple2<String, DataSet<?>> e : this.configuration.getScatterBcastVars()) { messages = messages.withBroadcastSet(e.f1, e.f0); if (this.configuration.isOptNumVertices()) { messages = messages.withBroadcastSet(numberOfVertices, "number of vertices");
this.gatherFunction.setOptDegrees(this.configuration.isOptDegrees()); messages.coGroup(iteration.getSolutionSet()).where(0).equalTo(0).with(updateUdf); if (this.configuration != null && this.configuration.isOptNumVertices()) { updates = updates.withBroadcastSet(numberOfVertices, "number of vertices");
private <VVWithDegree> void configureUpdateFunction(CoGroupOperator<?, ?, Vertex<K, VVWithDegree>> updates) { // configure coGroup update function with name and broadcast variables updates = updates.name("Vertex State Updates"); if (this.configuration != null) { for (Tuple2<String, DataSet<?>> e : this.configuration.getGatherBcastVars()) { updates = updates.withBroadcastSet(e.f1, e.f0); } } // let the operator know that we preserve the key field updates.withForwardedFieldsFirst("0").withForwardedFieldsSecond("0"); } }
messages.coGroup(iteration.getSolutionSet()).where(0).equalTo(0).with(updateUdf); if (this.configuration != null && this.configuration.isOptNumVertices()) { updates = updates.withBroadcastSet(numberOfVertices, "number of vertices");
/** * Helper method which sets up an iteration with the given vertex value(either simple or with degrees). * * @param iteration */ private void setUpIteration(DeltaIteration<?, ?> iteration) { // set up the iteration operator if (this.configuration != null) { iteration.name(this.configuration.getName("Scatter-gather iteration (" + gatherFunction + " | " + scatterFunction + ")")); iteration.parallelism(this.configuration.getParallelism()); iteration.setSolutionSetUnManaged(this.configuration.isSolutionSetUnmanagedMemory()); // register all aggregators for (Map.Entry<String, Aggregator<?>> entry : this.configuration.getAggregators().entrySet()) { iteration.registerAggregator(entry.getKey(), entry.getValue()); } } else { // no configuration provided; set default name iteration.name("Scatter-gather iteration (" + gatherFunction + " | " + scatterFunction + ")"); } }
if (this.configuration != null && this.configuration.isOptNumVertices()) { try { numberOfVertices = GraphUtils.count(this.initialVertices); scatterFunction.setDirection(this.configuration.getDirection()); } else { scatterFunction.setDirection(EdgeDirection.OUT); if(this.configuration != null && this.configuration.isOptDegrees()) { return createResultVerticesWithDegrees(graph, messagingDirection, messageTypeInfo, numberOfVertices); } else {
for (Tuple2<String, DataSet<?>> e : this.configuration.getScatterBcastVars()) { messages = messages.withBroadcastSet(e.f1, e.f0); if (this.configuration.isOptNumVertices()) { messages = messages.withBroadcastSet(numberOfVertices, "number of vertices");
this.gatherFunction.setOptDegrees(this.configuration.isOptDegrees()); messages.coGroup(iteration.getSolutionSet()).where(0).equalTo(0).with(updateUdf); if (this.configuration != null && this.configuration.isOptNumVertices()) { updates = updates.withBroadcastSet(numberOfVertices, "number of vertices");
private <VVWithDegree> void configureUpdateFunction(CoGroupOperator<?, ?, Vertex<K, VVWithDegree>> updates) { // configure coGroup update function with name and broadcast variables updates = updates.name("Vertex State Updates"); if (this.configuration != null) { for (Tuple2<String, DataSet<?>> e : this.configuration.getGatherBcastVars()) { updates = updates.withBroadcastSet(e.f1, e.f0); } } // let the operator know that we preserve the key field updates.withForwardedFieldsFirst("0").withForwardedFieldsSecond("0"); } }