code: public synchronized TaskStatus findFinishedMap(int mapId) {
      TaskInProgress tip = maps[mapId];
      if (tip.isComplete()) {
        TaskStatus[] statuses = tip.getTaskStatuses();
        for(int i=0; i < statuses.length; i++) {
          if (statuses[i].getRunState() == TaskStatus.State.SUCCEEDED) {
            return statuses[i];
          }
        }
      }
      return null;
    }
docs: Find the details of someplace where a map has finished
  @param mapId the id of the map
  @return the task status of the completed task