apache/hadoop · error · IllegalArgumentException
TaskId string : ${str} is not properly formed Reason: ${m}
Error message
TaskId string : ${str} is not properly formed
Reason: ${m} What it means
Error "TaskId string : ${str} is not properly formed Reason: ${m}" thrown in apache/hadoop.
Source
Thrown at hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/TaskID.java:253
*
* @param str the target string
* @return constructed TaskID object or null if the given String is null
* @throws IllegalArgumentException if the given string is malformed
*/
public static TaskID forName(String str)
throws IllegalArgumentException {
if(str == null)
return null;
Matcher m = taskIdPattern.matcher(str);
if (m.matches()) {
return new org.apache.hadoop.mapred.TaskID(m.group(1),
Integer.parseInt(m.group(2)),
CharTaskTypeMaps.getTaskType(m.group(3).charAt(0)),
Integer.parseInt(m.group(4)));
}
String exceptionMsg = "TaskId string : " + str + " is not properly formed" +
"\nReason: " + m.toString();
throw new IllegalArgumentException(exceptionMsg);
}
/**
* Gets the character representing the {@link TaskType}.
*
* @param type the TaskType
* @return the character
*/
public static char getRepresentingCharacter(TaskType type) {
return CharTaskTypeMaps.getRepresentingCharacter(type);
}
/**
* Gets the {@link TaskType} corresponding to the character.
*
* @param c the character
* @return the TaskType
*/
public static TaskType getTaskType(char c) {
return CharTaskTypeMaps.getTaskType(c);View on GitHub (pinned to 2add963021)
Solutions
- Provide a properly formed task ID string to forName(); the message includes the parse reason.
When it happens
Trigger: Thrown at hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/TaskID.java:253 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/55c3c830a9ef7b0a.
Report an issue: GitHub.