You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Greg Hogan (JIRA)" <ji...@apache.org> on 2016/05/26 14:17:12 UTC

[jira] [Updated] (FLINK-3978) Add contains methods to RuntimeContext

     [ https://issues.apache.org/jira/browse/FLINK-3978?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Greg Hogan updated FLINK-3978:
------------------------------
    Description: 
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.

  was:
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. Likewise, `containsAccumulator`.


> Add contains methods 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)