code: public static TaskAttemptID forName(String str
                                        ) throws IllegalArgumentException {
      if(str == null)
        return null;
      try {
        String[] parts = str.split(Character.toString(SEPARATOR));
        if(parts.length == 6) {
          if(parts[0].equals(ATTEMPT)) {
            boolean isMap = false;
            if(parts[3].equals("m")) isMap = true;
            else if(parts[3].equals("r")) isMap = false;
            else throw new Exception();
            return new org.apache.hadoop.mapred.TaskAttemptID
                         (parts[1],
                          Integer.parseInt(parts[2]),
                          isMap, Integer.parseInt(parts[4]), 
                          Integer.parseInt(parts[5]));
          }
        }
      } catch (Exception ex) {
        //fall below
      }
      throw new IllegalArgumentException("TaskAttemptId string : " + str 
          + " is not properly formed");
    }
docs: Construct a TaskAttemptID object from given string
  @return constructed TaskAttemptID object or null if the given String is null
  @throws IllegalArgumentException if the given string is malformed