code: public static 
    TaskAttemptID downgrade(org.apache.hadoop.mapreduce.TaskAttemptID old) {
      if (old instanceof TaskAttemptID) {
        return (TaskAttemptID) old;
      } else {
        return new TaskAttemptID(TaskID.downgrade(old.getTaskID()), old.getId());
      }
    }
docs: Downgrade a new TaskAttemptID to an old one
  @param old the new id
  @return either old or a new TaskAttemptID constructed to match old