[
https://issues.apache.org/jira/browse/BEAM-10887?focusedWorklogId=485943&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-485943
]
ASF GitHub Bot logged work on BEAM-10887:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 17/Sep/20 20:27
Start Date: 17/Sep/20 20:27
Worklog Time Spent: 10m
Work Description: boyuanzz commented on a change in pull request #12836:
URL: https://github.com/apache/beam/pull/12836#discussion_r490541733
##########
File path:
runners/direct-java/src/main/java/org/apache/beam/runners/direct/WatermarkManager.java
##########
@@ -1624,7 +1630,15 @@ public TimerUpdateBuilder setTimer(TimerData setTimer) {
*/
public TimerUpdateBuilder deletedTimer(TimerData deletedTimer) {
deletedTimers.add(deletedTimer);
- setTimers.remove(deletedTimer);
+ TimerData timerToDelete = null;
+ for (TimerData timer : setTimers) {
+ if (timer.getDomain().equals(deletedTimer.getDomain())
+ && timer.getNamespace().equals(deletedTimer.getNamespace())
+ && timer.getTimerId().equals(deletedTimer.getTimerId())) {
+ timerToDelete = timer;
+ }
+ }
+ setTimers.remove(timerToDelete);
Review comment:
Clearing an unset timer seems to be like a no-op to me.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 485943)
Time Spent: 1.5h (was: 1h 20m)
> FnApiTimer should expose clear() API
> ------------------------------------
>
> Key: BEAM-10887
> URL: https://issues.apache.org/jira/browse/BEAM-10887
> Project: Beam
> Issue Type: New Feature
> Components: sdk-java-core
> Reporter: Boyuan Zhang
> Priority: P2
> Time Spent: 1.5h
> Remaining Estimate: 0h
>
> Similar to python
> OutputTimer.clear():https://github.com/apache/beam/blob/master/sdks/python/apache_beam/runners/worker/bundle_processor.py#L661,
> Java FnApiTimer should also expose clear() API.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)