beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Etienne Chauchot (JIRA)" <>
Subject [jira] [Commented] (BEAM-135) Utilities for "batching" elements in a DoFn
Date Wed, 29 Mar 2017 11:24:41 GMT


Etienne Chauchot commented on BEAM-135:

The orientation of this feature is to provide exact batching (
to allow use cases such as abuse detection in an auction system: raise an alert when a user
has made 10 auctions in the last hour. The state API allows to count to 10 even if a bundle
is smaller than 10 elements. There are still corner cases in which, the exact batching cannot
be obtained: if the window contains 15 elements, then there will be a batch of 10 elements
and a batch of 5 elements because we need to output the batched elements in the same window
as the input.

> Utilities for "batching" elements in a DoFn
> -------------------------------------------
>                 Key: BEAM-135
>                 URL:
>             Project: Beam
>          Issue Type: New Feature
>          Components: sdk-java-core
>            Reporter: Ben Chambers
>            Assignee: Etienne Chauchot
> We regularly receive questions about how to write a {{DoFn}} that operates on batches
of elements. Example answers include:
> Possible APIs could be to wrap a {{DoFn}} and include a batch size, or to create a utility
like {{Filter}}, {{Partition}}, etc. that takes a {{SerializableFunction}} or a {{SimpleFunction}}.

This message was sent by Atlassian JIRA

View raw message