[
https://issues.apache.org/jira/browse/FLINK-35289?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17846700#comment-17846700
]
Kanthi Vaidya edited comment on FLINK-35289 at 5/15/24 4:21 PM:
----------------------------------------------------------------
When running in Batch Mode If we do:
ctx.timerService().registerEventTimeTimer(Long.MAX_VALUE);
and
@Override
public void onTimer(long timestamp, OnTimerContext ctx, Collector<Integer> out)
throws Exception
{ out.collect(111); }
This is a new record being emitted and has no existing timestamp.
Then collected value has timestamp Long.MAX_VALUE. The timestamp registered on
the collected element seems to be timestamp when the timer was registered to be
fired, which is Long.MAX_VALUE
was (Author: JIRAUSER302517):
When running in Batch Mode If we do:
ctx.timerService().registerEventTimeTimer(Long.MAX_VALUE);
and
@Override
public void onTimer(long timestamp, OnTimerContext ctx, Collector<Integer> out)
throws Exception {
out.collect(111);
}
Then collected value has timestamp Long.MAX_VALUE. The timestamp registered on
the collected element seems to be timestamp when the timer was registered to be
fired, which is Long.MAX_VALUE
> Incorrect timestamp of stream elements collected from onTimer in batch mode
> ---------------------------------------------------------------------------
>
> Key: FLINK-35289
> URL: https://issues.apache.org/jira/browse/FLINK-35289
> Project: Flink
> Issue Type: Bug
> Components: API / Core
> Affects Versions: 1.18.1
> Reporter: Kanthi Vaidya
> Priority: Major
>
> In batch mode all registered timers will fire at the _end of time. Given
> this, if a user registers a timer for Long.MAX_VALUE, the timestamp assigned
> to the elements that are collected from the onTimer context ends up being
> Long.MAX_VALUE. Ideally this should be the time when the batch actually
> executed the onTimer function._
--
This message was sent by Atlassian Jira
(v8.20.10#820010)