[
https://issues.apache.org/jira/browse/FLINK-3978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15302849#comment-15302849
]
ASF GitHub Bot commented on FLINK-3978:
---------------------------------------
GitHub user greghogan opened a pull request:
https://github.com/apache/flink/pull/2039
[FLINK-3978] [core] Add hasBroadcastVariable method to RuntimeContext
New method RuntimeContext.hasBroadcastVariable(String).
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/greghogan/flink
3978_add_hasbroadcastvariable_method_to_runtimecontext
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/2039.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #2039
----
commit 39391e07f075d5e1bd2f791da4c610d766968b94
Author: Greg Hogan <[email protected]>
Date: 2016-05-26T18:45:00Z
[FLINK-3978] [core] Add hasBroadcastVariable method to RuntimeContext
New method RuntimeContext.hasBroadcastVariable(String).
----
> Add hasBroadcastVariable method to RuntimeContext
> -------------------------------------------------
>
> Key: FLINK-3978
> URL: https://issues.apache.org/jira/browse/FLINK-3978
> Project: Flink
> Issue Type: Improvement
> Components: Core
> Affects Versions: 1.1.0
> Reporter: Greg Hogan
> Assignee: Greg Hogan
> Priority: Minor
>
> The javadocs for {{RuntimeContext}} state that {{getAccumulator}} "throws an
> exception if the accumulator does not exist or if the accumulator exists, but
> with different type", although {{AbstractRuntimeUDFContext}} does not throw
> an exception but will return null.
> The javadocs for {{getBroadcastVariable}} do not mention throwing an
> exception. Currently the only way to handle a broadcast variable that that
> may or may not exist is to catch and ignore the exception. Adding a
> {{containsBroadcastVariable}} method to {{RuntimeContext}} would make this
> explicit.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)