code: private synchronized void buildMaps() {
      if (loggedTaskMap == null) {
        loggedTaskMap = new HashMap<TaskID, LoggedTask>();
        loggedTaskAttemptMap = new HashMap<TaskAttemptID, LoggedTaskAttempt>();
        
        for (LoggedTask map : job.getMapTasks()) {
          map = sanitizeLoggedTask(map);
          if (map != null) {
            loggedTaskMap.put(maskTaskID(TaskID.forName(map.taskID)), map);
  
            for (LoggedTaskAttempt mapAttempt : map.getAttempts()) {
              mapAttempt = sanitizeLoggedTaskAttempt(mapAttempt);
              if (mapAttempt != null) {
                TaskAttemptID id = TaskAttemptID.forName(mapAttempt
                    .getAttemptID());
                loggedTaskAttemptMap.put(maskAttemptID(id), mapAttempt);
              }
            }
          }
        }
        for (LoggedTask reduce : job.getReduceTasks()) {
          reduce = sanitizeLoggedTask(reduce);
          if (reduce != null) {
            loggedTaskMap.put(maskTaskID(TaskID.forName(reduce.taskID)), reduce);
  
            for (LoggedTaskAttempt reduceAttempt : reduce.getAttempts()) {
              reduceAttempt = sanitizeLoggedTaskAttempt(reduceAttempt);
              if (reduceAttempt != null) {
                TaskAttemptID id = TaskAttemptID.forName(reduceAttempt
                    .getAttemptID());
                loggedTaskAttemptMap.put(maskAttemptID(id), reduceAttempt);
              }
            }
          }
        }
  
        // TODO: do not care about "other" tasks, "setup" or "clean"
      }
    }
docs: Build task mapping and task attempt mapping, to be later used to find
  information of a particular {@link TaskID} or {@link TaskAttemptID}.