You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@beam.apache.org by ma...@seznam.cz on 2019/08/12 14:54:29 UTC
Can not test Timer with processing time domain
Hi,
I bumped into the same issue as in BEAM-5265 [1], where I can't test Timer
with TimeDomain.PROCESSING_TIME.
Jozef tried to fix it, but the PR [2] got forgotten. Are there any concerns
how it would behave on different runners or it just only waited for reviewer
feedback?
Just in case here is my minimal example to reproduce [3]:
- set element timestamp 1970-01-01T00:00:01.000Z
- set timer.offset(TEN_SECONDS).setRelative();
- advanceProcessingTime for 20 seconds
- onTimer method is called where: OnTimerContextcontext.timestamp()=-290308-
12-21T19:59:05.225Z
I would expect context.timestamp() to be around 1970-01-01T00:00:11.000Z
[1] https://issues.apache.org/jira/browse/BEAM-5265
[2] https://github.com/apache/beam/pull/6305
[3] https://github.com/seznam/beam/commit/79de4a72e35274e4d92c726eb196d
662080e5020
Re: Can not test Timer with processing time domain
Posted by Jan Lukavský <je...@seznam.cz>.
Hi,
if I understand it correctly, the issue there was, that the
OnTimerContext.timestamp() is currently used for two things:
a) it tell the caller what timestamp it actually is
b) it is used as event element timestamp when element is output from
OnTimer method
That implies, that it cannot be easily changed to processing time,
because the timestamp of elements output from such method would have
wrong timestamp. Mayabe it would be better to add
OnTimerContext.processingTimestamp() instead?
Jan
On 8/12/19 4:54 PM, marek-simunek@seznam.cz wrote:
> Hi,
> I bumped into the same issue as in BEAM-5265 [1], where I can't test
> Timer with TimeDomain.PROCESSING_TIME.
> Jozef tried to fix it, but the PR [2] got forgotten. Are there any
> concerns how it would behave on different runners or it just only
> waited for reviewer feedback?
>
> Just in case here is my minimal example to reproduce [3]:
> - set element timestamp 1970-01-01T00:00:01.000Z
> - set timer.offset(TEN_SECONDS).setRelative();
> - advanceProcessingTime for 20 seconds
> - onTimer method is called where:
> |OnTimerContext||context.timestamp()=|-290308-12-21T19:59:05.225Z
> I would expect |context.timestamp() |to be around
> 1970-01-01T00:00:11.000Z
> [1] https://issues.apache.org/jira/browse/BEAM-5265
> [2] https://github.com/apache/beam/pull/6305
> [3]
> https://github.com/seznam/beam/commit/79de4a72e35274e4d92c726eb196d662080e5020