You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@beam.apache.org by Derek Hao Hu <ph...@gmail.com> on 2017/10/10 20:37:20 UTC
Is there a way to access PipelineOptions in DoFn.Setup?
Hi,
I'm trying to find a way to access PipelineOptions in [DoFn.Setup](
https://beam.apache.org/documentation/sdks/javadoc/2.1.0/org/apache/beam/sdk/transforms/DoFn.Setup.html).
Is there an easy way to do so? It seems we don't have things similar to
StartBundleContext, ProcessContext or FinishBundleContext in Setup.
Thanks,
--
Derek Hao Hu
Software Engineer | Snapchat
Snap Inc.
Re: Is there a way to access PipelineOptions in DoFn.Setup?
Posted by Thomas Groh <tg...@google.com>.
It is desired but unimplemented. See
https://issues.apache.org/jira/browse/BEAM-950
On Tue, Oct 10, 2017 at 1:45 PM, Eugene Kirpichov <ki...@google.com>
wrote:
> I don't think there is a way to do this, and I agree that this is an
> oversight. Feel free to file a JIRA.
> Depending on what you're doing, using a ValueProvider may be sufficient -
> their run-time values will be accessible in Setup.
>
> On Tue, Oct 10, 2017 at 1:37 PM Derek Hao Hu <ph...@gmail.com>
> wrote:
>
>> Hi,
>>
>> I'm trying to find a way to access PipelineOptions in [DoFn.Setup](
>> https://beam.apache.org/documentation/sdks/javadoc/2.1.0/org/apache/beam/
>> sdk/transforms/DoFn.Setup.html). Is there an easy way to do so? It seems
>> we don't have things similar to StartBundleContext, ProcessContext or
>> FinishBundleContext in Setup.
>>
>> Thanks,
>> --
>> Derek Hao Hu
>>
>> Software Engineer | Snapchat
>> Snap Inc.
>>
>
Re: Is there a way to access PipelineOptions in DoFn.Setup?
Posted by Eugene Kirpichov <ki...@google.com>.
I don't think there is a way to do this, and I agree that this is an
oversight. Feel free to file a JIRA.
Depending on what you're doing, using a ValueProvider may be sufficient -
their run-time values will be accessible in Setup.
On Tue, Oct 10, 2017 at 1:37 PM Derek Hao Hu <ph...@gmail.com> wrote:
> Hi,
>
> I'm trying to find a way to access PipelineOptions in [DoFn.Setup](
> https://beam.apache.org/documentation/sdks/javadoc/2.1.0/org/apache/beam/sdk/transforms/DoFn.Setup.html).
> Is there an easy way to do so? It seems we don't have things similar to
> StartBundleContext, ProcessContext or FinishBundleContext in Setup.
>
> Thanks,
> --
> Derek Hao Hu
>
> Software Engineer | Snapchat
> Snap Inc.
>