beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (BEAM-196) Pipeline options must be available Context in DoFn.startBundle
Date Wed, 08 Jun 2016 10:44:21 GMT

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

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

GitHub user mxm opened a pull request:

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

    [BEAM-196] Additional fix to ensure the PipelineOptions are available in DoFns.

    Fixes a NullPointException if `PipelineOptions` are acceessed inside a DoFn and backs
it up with a test.

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

    $ git pull https://github.com/mxm/incubator-beam BEAM-196

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

    https://github.com/apache/incubator-beam/pull/432.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 #432
    
----
commit 05287c4ddcc38378e4e8cd921b6f6394e43eed75
Author: Maximilian Michels <mxm@apache.org>
Date:   2016-06-07T11:57:33Z

    [BEAM-196] fix NPE in ParDoWrapper

commit 595146d5759a6f631f057050cdbe71f9849035f9
Author: Maximilian Michels <mxm@apache.org>
Date:   2016-06-08T10:40:50Z

    [flink] improve lifecycle of ParDoBoundWrapper

----


> Pipeline options must be available Context in DoFn.startBundle
> --------------------------------------------------------------
>
>                 Key: BEAM-196
>                 URL: https://issues.apache.org/jira/browse/BEAM-196
>             Project: Beam
>          Issue Type: Bug
>          Components: runner-flink
>            Reporter: Mark Shields
>            Assignee: Maximilian Michels
>             Fix For: 0.1.0-incubating
>
>
> Our (not yet merged) Java Pubsub implementation has code like this in a DoFn:
>     @Override
>     public void startBundle(Context c) throws Exception {
>       Preconditions.checkState(pubsubClient == null);
>       pubsubClient = PubsubClient.newClient(transportType,
>           timestampLabel, idLabel, c.getPipelineOptions().as(PubsubOptions.class));
>       super.startBundle(c);
>     }
> This fails with NPE since the pipeline options are not conveyed via the context.



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

Mime
View raw message