[ 
https://issues.apache.org/jira/browse/BEAM-724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15552974#comment-15552974
 ] 

ASF GitHub Bot commented on BEAM-724:
-------------------------------------

GitHub user sumitchawla opened a pull request:

    https://github.com/apache/incubator-beam/pull/1061

    BEAM-724 - Null pointer fix

    This seems like a timing Issue. Its reproducible in case where Kafka topic 
does not exist yet. The UDF operator run is not called yet, but other thread 
calls snapshot before that:
    
    ```
    java.lang.RuntimeException: Error while triggering checkpoint for Source: 
Read(UnboundedKafkaSource) -> ParDo(KafkaRecordToCTuple) -> 
ParDo(NetFlowToFlowContentTransformation) -> 
ParDo(FlowContentToRelationsTransformation) -> ParDo(GraphToJsonTransformation) 
-> AnonymousParDo -> ParDo(KafkaWriter) (1/1)
        at org.apache.flink.runtime.taskmanager.Task$2.run(Task.java:949)
        at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
    Caused by: java.lang.Exception: Failed to draw state snapshot from 
function: null
        at 
org.apache.flink.streaming.api.operators.AbstractUdfStreamOperator.snapshotOperatorState(AbstractUdfStreamOperator.java:132)
        at 
org.apache.flink.streaming.runtime.tasks.StreamTask.performCheckpoint(StreamTask.java:598)
        at 
org.apache.flink.streaming.runtime.tasks.StreamTask.triggerCheckpoint(StreamTask.java:565)
        at org.apache.flink.runtime.taskmanager.Task$2.run(Task.java:941)
        ... 5 more
    Caused by: java.lang.NullPointerException
        at 
org.apache.beam.runners.flink.translation.wrappers.streaming.io.UnboundedSourceWrapper.snapshotState(UnboundedSourceWrapper.java:340)
        at 
org.apache.beam.runners.flink.translation.wrappers.streaming.io.UnboundedSourceWrapper.snapshotState(UnboundedSourceWrapper.java:54)
        at 
org.apache.flink.streaming.api.operators.AbstractUdfStreamOperator.snapshotOperatorState(AbstractUdfStreamOperator.java:129)
        ... 8 more
    ```

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/sumitchawla/incubator-beam beam_724_fix

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-beam/pull/1061.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 #1061
    
----
commit 5da04d6a1c79e2daf17da435030dffad07a1d175
Author: Sumit Chawla <[email protected]>
Date:   2016-10-06T19:42:20Z

    BEAM-724 - Null pointer fix

----


> NullPointerException in Snapshot State
> --------------------------------------
>
>                 Key: BEAM-724
>                 URL: https://issues.apache.org/jira/browse/BEAM-724
>             Project: Beam
>          Issue Type: Bug
>          Components: runner-flink
>            Reporter: Sumit Chawla
>            Assignee: Sumit Chawla
>
> This seems like a timing Issue.  Its reproducible in case where Kafka topic 
> does not exist yet.  The UDF operator run is not called yet, but other thread 
> calls snapshot before that:
> {code}
> java.lang.RuntimeException: Error while triggering checkpoint for Source: 
> Read(UnboundedKafkaSource) -> ParDo(KafkaRecordToCTuple) -> 
> ParDo(NetFlowToFlowContentTransformation) -> 
> ParDo(FlowContentToRelationsTransformation) -> 
> ParDo(GraphToJsonTransformation) -> AnonymousParDo -> ParDo(KafkaWriter) (1/1)
>       at org.apache.flink.runtime.taskmanager.Task$2.run(Task.java:949)
>       at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>       at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>       at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>       at java.lang.Thread.run(Thread.java:745)
> Caused by: java.lang.Exception: Failed to draw state snapshot from function: 
> null
>       at 
> org.apache.flink.streaming.api.operators.AbstractUdfStreamOperator.snapshotOperatorState(AbstractUdfStreamOperator.java:132)
>       at 
> org.apache.flink.streaming.runtime.tasks.StreamTask.performCheckpoint(StreamTask.java:598)
>       at 
> org.apache.flink.streaming.runtime.tasks.StreamTask.triggerCheckpoint(StreamTask.java:565)
>       at org.apache.flink.runtime.taskmanager.Task$2.run(Task.java:941)
>       ... 5 more
> Caused by: java.lang.NullPointerException
>       at 
> org.apache.beam.runners.flink.translation.wrappers.streaming.io.UnboundedSourceWrapper.snapshotState(UnboundedSourceWrapper.java:340)
>       at 
> org.apache.beam.runners.flink.translation.wrappers.streaming.io.UnboundedSourceWrapper.snapshotState(UnboundedSourceWrapper.java:54)
>       at 
> org.apache.flink.streaming.api.operators.AbstractUdfStreamOperator.snapshotOperatorState(AbstractUdfStreamOperator.java:129)
>       ... 8 more
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to