You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "yardenbm (via GitHub)" <gi...@apache.org> on 2023/12/19 07:16:06 UTC
[I] [Bug]: OnTimer("loopingTimer") not triggered on 2.52.0 [beam]
yardenbm opened a new issue, #29816:
URL: https://github.com/apache/beam/issues/29816
### What happened?
Since upgrading to 2.52.0, looks like the `@OnTimer("loopingTimer")` is not working properly for me.
Was tested and working on 2.51
no logs were printed from `@OnTimer("loopingTimer")`
The logic in my code is pretty much identical to: https://beam.apache.org/blog/looping-timers/ , Option 3:
```
@ProcessElement public void process(ProcessContext c, @StateId("key") ValueState<String> key,
@StateId("loopingTimerTime") ValueState<Long> loopingTimerTime,
@TimerId("loopingTimer") Timer loopingTimer) {
Long currentTimerValue = loopingTimerTime.read();
Instant nextTimerTimeBasedOnCurrentElement = c.timestamp().plus(Duration.standardMinutes(1));
if (currentTimerValue == null || currentTimerValue >
nextTimerTimeBasedOnCurrentElement.getMillis()) {
loopingTimer.set(nextTimerTimeBasedOnCurrentElement);
loopingTimerTime.write(nextTimerTimeBasedOnCurrentElement.getMillis());
}
if (key.read() == null) {
key.write(c.element().getKey());
}
c.output(c.element());
}
@OnTimer("loopingTimer")
public void onTimer(
OnTimerContext c,
@StateId("key") ValueState<String> key,
@TimerId("loopingTimer") Timer loopingTimer) {
LOG.info("Timer @ {} fired", c.timestamp());
c.output(KV.of(key.read(), 0));
Instant nextTimer = c.timestamp().plus(Duration.standardMinutes(1));
if (nextTimer.isBefore(stopTimerTime)) {
loopingTimer.set(nextTimer);
} else {
LOG.info(
"Timer not being set as exceeded Stop Timer value {} ",
stopTimerTime);
}
}
}
```
using FlinkRunner
### Issue Priority
Priority: 2 (default / most bugs should be filed as P2)
### Issue Components
- [ ] Component: Python SDK
- [X] Component: Java SDK
- [ ] Component: Go SDK
- [ ] Component: Typescript SDK
- [ ] Component: IO connector
- [ ] Component: Beam YAML
- [ ] Component: Beam examples
- [ ] Component: Beam playground
- [ ] Component: Beam katas
- [ ] Component: Website
- [ ] Component: Spark Runner
- [ ] Component: Flink Runner
- [ ] Component: Samza Runner
- [ ] Component: Twister2 Runner
- [ ] Component: Hazelcast Jet Runner
- [ ] Component: Google Cloud Dataflow Runner
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug]: OnTimer("loopingTimer") not triggered on 2.52.0 [beam]
Posted by "je-ik (via GitHub)" <gi...@apache.org>.
je-ik closed issue #29816: [Bug]: OnTimer("loopingTimer") not triggered on 2.52.0
URL: https://github.com/apache/beam/issues/29816
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug]: OnTimer("loopingTimer") not triggered on 2.52.0 [beam]
Posted by "je-ik (via GitHub)" <gi...@apache.org>.
je-ik commented on issue #29816:
URL: https://github.com/apache/beam/issues/29816#issuecomment-2055607132
I don't think this is related. #28614 is related to batch execution. I'll investigate this and report results here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug]: OnTimer("loopingTimer") not triggered on 2.52.0 [beam]
Posted by "sigalite (via GitHub)" <gi...@apache.org>.
sigalite commented on issue #29816:
URL: https://github.com/apache/beam/issues/29816#issuecomment-1910234538
hi, any updates on this issue? we see that same behaviour in beam 2.53 so we are not able to upgrade to latest versions.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug]: OnTimer("loopingTimer") not triggered on 2.52.0 [beam]
Posted by "Abacn (via GitHub)" <gi...@apache.org>.
Abacn commented on issue #29816:
URL: https://github.com/apache/beam/issues/29816#issuecomment-2052061681
A major Flink runner change from Beam 2.51.0 -> 2.52.0 was #28614. Could this be related to #29902 ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug]: OnTimer("loopingTimer") not triggered on 2.52.0 [beam]
Posted by "je-ik (via GitHub)" <gi...@apache.org>.
je-ik commented on issue #29816:
URL: https://github.com/apache/beam/issues/29816#issuecomment-2022147820
Hi, what is the source?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug]: OnTimer("loopingTimer") not triggered on 2.52.0 [beam]
Posted by "je-ik (via GitHub)" <gi...@apache.org>.
je-ik commented on issue #29816:
URL: https://github.com/apache/beam/issues/29816#issuecomment-2049956358
I see similar issues with 2.55.0 using Kafka and `--experiments=use_deprecated_read`. This seems to work if `experiments=beam_fn_api` is used, but this works only for classical (non-portable) runner. I will investigate this and report the results.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org