code: private void listEvents(JobID jobId, int fromEventId, int numEvents)
      throws IOException {
      TaskCompletionEvent[] events =
        jobSubmitClient.getTaskCompletionEvents(jobId, fromEventId, numEvents);
      System.out.println("Task completion events for " + jobId);
      System.out.println("Number of events (from " + fromEventId +
                         ") are: " + events.length);
      for(TaskCompletionEvent event: events) {
        System.out.println(event.getTaskStatus() + " " + event.getTaskAttemptId() + " " +
                           getTaskLogURL(event.getTaskAttemptId(),
                                         event.getTaskTrackerHttp()));
      }
    }
docs: List the events for the given job
  @param jobId the job id for the job's events to list
  @throws IOException