apache/hadoop · error · IllegalArgumentException

TaskAttemptId string : ${str} is not properly formed

Error message

TaskAttemptId string : ${str} is not properly formed

What it means

Error "TaskAttemptId string : ${str} is not properly formed" thrown in apache/hadoop.

Source

Thrown at hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/TaskAttemptID.java:201

          if(t != null) {
            return new org.apache.hadoop.mapred.TaskAttemptID
            (parts[1],
             Integer.parseInt(parts[2]),
             t, Integer.parseInt(parts[4]), 
             Integer.parseInt(parts[5]));  
          } else
            exceptionMsg = "Bad TaskType identifier. TaskAttemptId string : "
                + str + " is not properly formed.";
        }
      }
    } catch (Exception ex) {
      //fall below
    }
    if (exceptionMsg == null) {
      exceptionMsg = "TaskAttemptId string : " + str
          + " is not properly formed";
    }
    throw new IllegalArgumentException(exceptionMsg);
  }

}

View on GitHub (pinned to 2add963021)

Solutions

  1. Provide a properly formed attempt ID string (e.g. attempt_<jtIdentifier>_<jobId>_<m|r>_<taskId>_<attempt>) to forName().

When it happens

Trigger: Thrown at hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/TaskAttemptID.java:201 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22). Data as JSON: /api/errors/bcbda81dea902dfc. Report an issue: GitHub.