[ 
https://issues.apache.org/jira/browse/FLINK-6055?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15925838#comment-15925838
 ] 

Aljoscha Krettek commented on FLINK-6055:
-----------------------------------------

I think setting timers only makes sense on a keyed stream or a parallelism-1 
stream. For a keyed stream, the timers are scoped to the same key as state so 
when a timer fires you have access to the same state that you had when the 
timer was set. For a parallelism-1 operator you also have access to the same 
state when the timer fires because there is only one parallel instance of the 
operator. For other cases timers don't make sense, IMHO, because you wouldn't 
necessarily have access to the same state on a timer firing after restoring.

In general, I don't like special treatment for parallelism-1 operations because 
they are inherently, well, non-parallelisable which makes them ill suited for a 
parallel processing system such as Flink. They can always be simulated by 
setting a dummy key and setting the parallelism to 1. I prefer this because it 
is a hint to the user that what they are doing might be problematic.

What do you think?

> Supported setting timers on a Non-Keyed Stream
> ----------------------------------------------
>
>                 Key: FLINK-6055
>                 URL: https://issues.apache.org/jira/browse/FLINK-6055
>             Project: Flink
>          Issue Type: New Feature
>          Components: DataStream API
>            Reporter: sunjincheng
>            Assignee: sunjincheng
>
> After [FLINK-4460] Allow ProcessFunction on non-keyed streams, I want 
> supported setting timers on a Non-Keyed Stream. What do you think? 
> [~aljoscha] 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to