You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Thomas Weise (JIRA)" <ji...@apache.org> on 2018/12/14 16:44:00 UTC

[jira] [Resolved] (BEAM-6227) FlinkRunner errors if GroupByKey contains null values (streaming mode only)

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

Thomas Weise resolved BEAM-6227.
--------------------------------
    Resolution: Fixed

> FlinkRunner errors if GroupByKey contains null values (streaming mode only)
> ---------------------------------------------------------------------------
>
>                 Key: BEAM-6227
>                 URL: https://issues.apache.org/jira/browse/BEAM-6227
>             Project: Beam
>          Issue Type: Bug
>          Components: runner-flink
>    Affects Versions: 2.9.0
>            Reporter: Maximilian Michels
>            Assignee: Maximilian Michels
>            Priority: Major
>             Fix For: 2.10.0
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Apparently this passed ValidatesRunner in streaming mode although this is a quite common operation:
> {noformat}
>     FlinkPipelineOptions options = PipelineOptionsFactory.as(FlinkPipelineOptions.class);
>     options.setRunner(FlinkRunner.class);
>     // force streaming mode
>     options.setStreaming(true);
>     Pipeline pipeline = Pipeline.create(options);
>     pipeline
>         .apply(GenerateSequence.from(0).to(100))
>         .apply(Window.into(FixedWindows.of(Duration.millis(10))))
>         .apply(ParDo.of(
>             new DoFn<Long, KV<String, Void>>() {
>               @ProcessElement
>               public void processElement(ProcessContext pc) {
>                 pc.output(KV.of("hello", null));
>               }
>             }
>         ))
>         .apply(GroupByKey.create());
>     pipeline.run();
> {noformat}
> Throws:
> {noformat}
> Caused by: java.lang.RuntimeException: Error adding to bag state.
> 	at org.apache.beam.runners.flink.translation.wrappers.streaming.state.FlinkStateInternals$FlinkBagState.add(FlinkStateInternals.java:299)
> 	at org.apache.beam.runners.core.SystemReduceFn.processValue(SystemReduceFn.java:115)
> 	at org.apache.beam.runners.core.ReduceFnRunner.processElement(ReduceFnRunner.java:608)
> 	at org.apache.beam.runners.core.ReduceFnRunner.processElements(ReduceFnRunner.java:349)
> 	at org.apache.beam.runners.core.GroupAlsoByWindowViaWindowSetNewDoFn.processElement(GroupAlsoByWindowViaWindowSetNewDoFn.java:136)
> Caused by: java.lang.NullPointerException: You cannot add null to a ListState.
> 	at org.apache.flink.util.Preconditions.checkNotNull(Preconditions.java:75)
> 	at org.apache.flink.runtime.state.heap.HeapListState.add(HeapListState.java:89)
> 	at org.apache.beam.runners.flink.translation.wrappers.streaming.state.FlinkStateInternals$FlinkBagState.add(FlinkStateInternals.java:297)
> 	at org.apache.beam.runners.core.SystemReduceFn.processValue(SystemReduceFn.java:115)
> 	at org.apache.beam.runners.core.ReduceFnRunner.processElement(ReduceFnRunner.java:608)
> 	at org.apache.beam.runners.core.ReduceFnRunner.processElements(ReduceFnRunner.java:349)
> 	at org.apache.beam.runners.core.GroupAlsoByWindowViaWindowSetNewDoFn.processElement(GroupAlsoByWindowViaWindowSetNewDoFn.java:136)
> 	at org.apache.beam.runners.core.GroupAlsoByWindowViaWindowSetNewDoFn$DoFnInvoker.invokeProcessElement(Unknown Source)
> 	at org.apache.beam.runners.core.SimpleDoFnRunner.invokeProcessElement(SimpleDoFnRunner.java:275)
> 	at org.apache.beam.runners.core.SimpleDoFnRunner.processElement(SimpleDoFnRunner.java:240)
> 	at org.apache.beam.runners.core.LateDataDroppingDoFnRunner.processElement(LateDataDroppingDoFnRunner.java:80)
> 	at org.apache.beam.runners.flink.metrics.DoFnRunnerWithMetricsUpdate.processElement(DoFnRunnerWithMetricsUpdate.java:63)
> 	at org.apache.beam.runners.flink.translation.wrappers.streaming.DoFnOperator.processElement(DoFnOperator.java:460)
> 	at org.apache.flink.streaming.runtime.io.StreamInputProcessor.processInput(StreamInputProcessor.java:202)
> 	at org.apache.flink.streaming.runtime.tasks.OneInputStreamTask.run(OneInputStreamTask.java:104)
> 	at org.apache.flink.streaming.runtime.tasks.StreamTask.invoke(StreamTask.java:306)
> 	at org.apache.flink.runtime.taskmanager.Task.run(Task.java:712)
> 	at java.lang.Thread.run(Thread.java:745)
> {noformat}
> Will do a follow-up for running ValidatesRunner in streaming mode.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)