You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@beam.apache.org by "周亮(周亮)" <zh...@taobao.com> on 2017/01/12 03:23:43 UTC
why SimpleDoFnRunner can not support setup
hi.
I can not find setup in SimpleDoFnRunner, why? startBundle instead of setup?
Re: why SimpleDoFnRunner can not support setup
Posted by Kenneth Knowles <kl...@google.com.INVALID>.
Yes, anything that processes bundles of elements could implement that
interface, while a DoFn actually has many more capabilities (side inputs,
state, setup, teardown).
If you want to discuss less generally, another way to explain this in terms
of DoFn is that @Setup should happen before the DoFn is wrapped into a
DoFnRunner and @Teardown should happen after the DoFnRunner will not be
used anymore.
Kenn
On Tue, Jan 17, 2017 at 8:31 PM, Manu Zhang <ow...@gmail.com> wrote:
> Hi,
>
> As commented here
> <https://github.com/apache/beam/pull/1232#issuecomment-264243776> by Kenn(
> +klk@google.com), the name DoFnRunner is misleading and could have nothing
> to do with DoFn.
> It's used for bundle processing(startBundle, processElement, stopBundle) so
> there are no setup and teardown methods (which are intended for DoFn,
> please check DoFnInvoker).
>
> Manu
>
>
> On Thu, Jan 12, 2017 at 4:32 PM 周亮(周亮) <zh...@taobao.com> wrote:
>
> > hi.
> > I can not find setup in SimpleDoFnRunner, why? startBundle instead of
> > setup?
>
Re: why SimpleDoFnRunner can not support setup
Posted by Manu Zhang <ow...@gmail.com>.
Hi,
As commented here
<https://github.com/apache/beam/pull/1232#issuecomment-264243776> by Kenn(
+klk@google.com), the name DoFnRunner is misleading and could have nothing
to do with DoFn.
It's used for bundle processing(startBundle, processElement, stopBundle) so
there are no setup and teardown methods (which are intended for DoFn,
please check DoFnInvoker).
Manu
On Thu, Jan 12, 2017 at 4:32 PM 周亮(周亮) <zh...@taobao.com> wrote:
> hi.
> I can not find setup in SimpleDoFnRunner, why? startBundle instead of
> setup?