beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aljoscha Krettek (JIRA)" <>
Subject [jira] [Assigned] (BEAM-1394) Use Flink InternalTimerService for TimerInternals
Date Sun, 05 Feb 2017 10:30:41 GMT


Aljoscha Krettek reassigned BEAM-1394:

    Assignee:     (was: Aljoscha Krettek)

> Use Flink InternalTimerService for TimerInternals
> -------------------------------------------------
>                 Key: BEAM-1394
>                 URL:
>             Project: Beam
>          Issue Type: Improvement
>          Components: runner-flink
>            Reporter: Aljoscha Krettek
> When updating our Flink version to 1.2 we can use the new internal timer API for both
the windowing and for wiring in the Beam user-facing Timer API.
> By using the internal timer API we make operators rescalable, that is, we can change
the parallelism of a running Beam on Flink job by performing a savepoint and then restarting
with a different parallelism.
> An {{InternalTimerService}} can be retrieved by a Flink operator (mostly in {{open()}}
> {code}
> /**
>  * Returns a {@link InternalTimerService} that can be used to query current processing
>  * and event time and to set timers. An operator can have several timer services, where
>  * each has its own namespace serializer. Timer services are differentiated by the string
>  * key that is given when requesting them, if you call this method with the same key
>  * multiple times you will get the same timer service instance in subsequent requests.
>  *
>  * <p>Timers are always scoped to a key, the currently active key of a keyed stream
>  * When a timer fires, this key will also be set as the currently active key.
>  *
>  * <p>Each timer has attached metadata, the namespace. Different timer services
>  * can have a different namespace type. If you don't need namespace differentiation you
>  * can use {@link VoidNamespaceSerializer} as the namespace serializer.
>  *
>  * @param name The name of the requested timer service. If no service exists under the
>  *             name a new one will be created and returned.
>  * @param namespaceSerializer {@code TypeSerializer} for the timer namespace.
>  * @param triggerable The {@link Triggerable} that should be invoked when timers fire
>  *
>  * @param <N> The type of the timer namespace.
>  */
> public <N> InternalTimerService<N> getInternalTimerService(
>         String name,
>         TypeSerializer<N> namespaceSerializer,
>         Triggerable<?, N> triggerable);
> {code}

This message was sent by Atlassian JIRA

View raw message