The goal of the “Long Ride Alerts” exercise is to indicate whenever a taxi ride started two hours ago, and is still ongoing.
The input data of this exercise is a
DataStream of taxi ride events. You will want to use a
TaxiRideSource, as described in the page about the Taxi Data Stream.
You can filter the events to only include rides within New York City (as is done in the Taxi Ride Cleansing exercise), but it’s not essential.
The result of the exercise should be a
DataStream<TaxiRide> that only contains START events of taxi rides which have no matching END event within the first two hours of the ride.
The resulting stream should be printed to standard out.
Here are the rideIds and start times of the first few rides that go on for more than two hours, but you might want to print other info as well:
934753,2013-01-01 01:03:00 950600,2013-01-01 01:14:00 952469,2013-01-01 01:53:00 946984,2013-01-01 02:21:00 958062,2013-01-01 02:26:00 1029600,2013-01-01 10:51:00 ...
Reference solutions are available at GitHub: