if (vertexEvent.getType().equals(VertexEventType.V_ROUTE_EVENT)) {
VertexEventRouteEvent evt = (VertexEventRouteEvent) vertexEvent;
vertex.pendingRouteEvents.addAll(evt.getEvents());
} else if (vertexEvent.getType().equals(
VertexEventType.V_SOURCE_TASK_ATTEMPT_COMPLETED)) {
VertexEventSourceTaskAttemptCompleted evt =
(VertexEventSourceTaskAttemptCompleted) vertexEvent;
vertex.pendingReportedSrcCompletions.add(
evt.getCompletionEvent().getTaskAttemptId());
} else if (vertexEvent.getType().equals(
VertexEventType.V_SOURCE_VERTEX_STARTED)) {
VertexEventSourceVertexStarted startEvent =
(VertexEventSourceVertexStarted) vertexEvent;
int distanceFromRoot = startEvent.getSourceDistanceFromRoot() + 1;