NicoK commented on a change in pull request #13:
URL: https://github.com/apache/flink-training/pull/13#discussion_r475582832
##########
File path: long-ride-alerts/README.md
##########
@@ -69,6 +69,20 @@ You will want to use event time timers that fire two hours
after an incoming STA
collect START events to the output only if a matching END event hasn't yet
arrived.
</details>
+<details>
+<summary><strong>State and timers</strong></summary>
+
+There are many possible solutions for this exercise, but in general it is
enough to keep one
+`TaxiRide` in state (one `TaxiRide` for each key, or `rideId`). The approach
used in the reference solution is to
+store whichever event arrives first (the START or the END), and if it's a
START event,
+create a timer for two hours later. If and when the other event (for the same
rideId) arrives,
Review comment:
```suggestion
create a timer for two hours later. If and when the other event (for the
same `rideId`) arrives,
```
##########
File path: long-ride-alerts/README.md
##########
@@ -69,6 +69,20 @@ You will want to use event time timers that fire two hours
after an incoming STA
collect START events to the output only if a matching END event hasn't yet
arrived.
</details>
+<details>
+<summary><strong>State and timers</strong></summary>
+
+There are many possible solutions for this exercise, but in general it is
enough to keep one
+`TaxiRide` in state (one `TaxiRide` for each key, or `rideId`). The approach
used in the reference solution is to
+store whichever event arrives first (the START or the END), and if it's a
START event,
+create a timer for two hours later. If and when the other event (for the same
rideId) arrives,
+carefully clean things up.
+
+It's possible to arrange this so that if `onTimer()` is called, you are
guaranteed that
Review comment:
```suggestion
It is possible to arrange this so that if `onTimer()` is called, you are
guaranteed that
```
----------------------------------------------------------------
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]