beam-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frank Wilson <frank.wil...@memberoo.net>
Subject Re: Are DoFn combinators a good idea?
Date Tue, 14 Jun 2016 10:30:15 GMT
Hi Lukasz,

Thanks for your reply. That really helped me see the big picture.

It seems that for simple functions I should probably make more use of
SerializableFunction than I am currently.

If I need access to windowing, etc I will also experiment with
DoFnWithContext.

Thanks again,

Frank

On 13 June 2016 at 17:34, Lukasz Cwik <lcwik@google.com> wrote:

> Currently we have three ways to create a "DoFn":
> SerializableFunction (minimal boilerplate but no access to things like
> side inputs, requires Java 8)
> DoFnWithContext (runtime based reflection is used to call your method and
> fill in only the parameters your interested in)
> DoFn (access to everything all the time, most boilerplate)
>
> SerializableFunction is your best bet for having the minimal amount of
> boilerplate and not coming up with another way to wrap all the things
> followed by DoFnWithContext.
> DoFnWithContext is meant to be the way in which by using annotations you
> only specify what you need and will be a better approach then creating your
> own wrapper.
>
>

Mime
View raw message