flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From greghogan <...@git.apache.org>
Subject [GitHub] flink pull request: [FLINK-3806] [gelly] Revert use of DataSet.cou...
Date Thu, 26 May 2016 09:44:41 GMT
Github user greghogan commented on a diff in the pull request:

    https://github.com/apache/flink/pull/2036#discussion_r64718337
  
    --- 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 --
    
    Could also add a hasBroadcastVariable method to RuntimeContext. I had first expected that
getBroadcastVariable would return an empty Collection.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message