() Input taxicabs GPS data after cleaning |
() Using transformation, the format of raw taxicabs GPS records is |
converted to (plate number, (date and time; marked region; status bit)) |
() Using groupByKey transformation, all the taxicabs GPS data of the same |
plate number are gathered. |
() if (Using transformation, we inspect and detect if there are |
real-time taxicabs in Wander Status) |
|
() Using transformation, we calculate the distance between |
these real-time taxicabs and . Then, (corresponding distance, |
plate number) are exported. |
() Ascending order of corresponding distance can be obtained by |
(true) transformation. |
() Using take(1) operation, we obtain and recommend the nearest |
taxicab in Wander Status to the passenger . |
|
() else |
|
() Using transformation, we inspect and detect if there are |
real-time taxicabs in Occupied Status. |
() Using transformation, GPS data for each taxicab are |
arranged in reverse chronological order. Then, we output plate |
number and the corresponding last manned trajectory, namely, |
several continuous GPS records in which the status bit is 1. |
|