alpinegizmo commented on a change in pull request #13:
URL: https://github.com/apache/flink-training/pull/13#discussion_r473075894
##########
File path: long-ride-alerts/README.md
##########
@@ -62,13 +62,11 @@ The resulting stream should be printed to standard out.
<details>
<summary><strong>Overall approach</strong></summary>
-This exercise revolves around using a `ProcessFunction` to manage some keyed
state and event time timers, and doing so in a way that works even when the END
event for a given `rideId` arrives before the START (which will happen). The
challenge is figuring out what state to keep, and when to set and clear that
state.
-</details>
-
-<details>
-<summary><strong>Timers and State</strong></summary>
-
-You will want to use event time timers that fire two hours after the incoming
events, and in the `onTimer()` method, collect START events to the output only
if a matching END event hasn't yet arrived. As for what state to keep, it is
enough to remember the "last" event for each `rideId`, where "last" is based on
event time and ride type (START vs END — yes, there are rides where the
START and END have the same timestamp), rather than the order in which the
events are processed. The `TaxiRide` class implements `Comparable`; feel free
to take advantage of that, and be sure to eventually clear any state you create.
Review comment:
That hint was somewhat wrong-headed. I've written a new hint that points
(rather strongly) toward the new solution.
----------------------------------------------------------------
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]