Github user StephanEwen commented on a diff in the pull request:
https://github.com/apache/flink/pull/2036#discussion_r64721168
--- Diff:
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/gsa/GatherSumApplyIteration.java
---
@@ -289,6 +300,11 @@ private GatherUdf(GatherFunction<VV, EV, M>
gatherFunction, TypeInformation<Tupl
@Override
public void open(Configuration parameters) throws Exception {
+ try {
+ Collection<LongValue> numberOfVertices =
getRuntimeContext().getBroadcastVariable("number of vertices");
+
this.gatherFunction.setNumberOfVertices(numberOfVertices.iterator().next().getValue());
+ } catch (Exception e) {
+ }
--- End diff --
The BatchAPI usually throws exceptions when people build a seemingly
incorrect program, for example by using a broadcast variable that does not
exist. It seemed to help people to catch bugs faster.
The exception makes it obvious that something is wrong, the empty set would
make various programs run but return a wrong result. That is much harder to
recognize and debug.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---