[ https://issues.apache.org/jira/browse/FLINK-5289?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15732605#comment-15732605 ]
ASF GitHub Bot commented on FLINK-5289: --------------------------------------- GitHub user StefanRRichter opened a pull request: https://github.com/apache/flink/pull/2969 [FLINK-5289] Meaningful exception when using value state on non-keyed… This PR fixes [FLINK-5289] and introduces a meaningful exception when registering a keyed state on non-keyed stream. You can merge this pull request into a Git repository by running: $ git pull https://github.com/StefanRRichter/flink register-state-NPE Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/2969.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 #2969 ---- commit fba7f61ee6ff7155ee166ec01134f81f0b7f4457 Author: Stefan Richter <s.rich...@data-artisans.com> Date: 2016-12-08T14:07:58Z [FLINK-5289] Meaningful exception when using value state on non-keyed stream ---- > NPE when using value state on non-keyed stream > ---------------------------------------------- > > Key: FLINK-5289 > URL: https://issues.apache.org/jira/browse/FLINK-5289 > Project: Flink > Issue Type: Bug > Components: Streaming > Reporter: Timo Walther > Assignee: Stefan Richter > > Using a {{ValueStateDescriptor}} and > {{getRuntimeContext().getState(descriptor)}} on a non-keyed stream leads to > {{NullPointerException}} which is not very helpful for users: > {code} > java.lang.NullPointerException > at > org.apache.flink.streaming.api.operators.StreamingRuntimeContext.getState(StreamingRuntimeContext.java:109) > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)