{"record":{"id":"55c3c830a9ef7b0a","repo":"apache/hadoop","slug":"taskid-string-str-is-not-properly-formed-reas","errorCode":null,"errorMessage":"TaskId string : ${str} is not properly formed\nReason: ${m}","messagePattern":"TaskId string : (.+?) is not properly formed\nReason: (.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/TaskID.java","lineNumber":253,"sourceCode":"   *\n   * @param str the target string\n   * @return constructed TaskID object or null if the given String is null\n   * @throws IllegalArgumentException if the given string is malformed\n   */\n  public static TaskID forName(String str) \n    throws IllegalArgumentException {\n    if(str == null)\n      return null;\n    Matcher m = taskIdPattern.matcher(str);\n    if (m.matches()) {\n      return new org.apache.hadoop.mapred.TaskID(m.group(1),\n          Integer.parseInt(m.group(2)),\n          CharTaskTypeMaps.getTaskType(m.group(3).charAt(0)),\n          Integer.parseInt(m.group(4)));\n    }\n    String exceptionMsg = \"TaskId string : \" + str + \" is not properly formed\" +\n        \"\\nReason: \" + m.toString();\n    throw new IllegalArgumentException(exceptionMsg);\n  }\n  /**\n   * Gets the character representing the {@link TaskType}.\n   *\n   * @param type the TaskType\n   * @return the character\n   */\n  public static char getRepresentingCharacter(TaskType type) {\n    return CharTaskTypeMaps.getRepresentingCharacter(type);\n  }\n  /**\n   * Gets the {@link TaskType} corresponding to the character.\n   *\n   * @param c the character\n   * @return the TaskType\n   */\n  public static TaskType getTaskType(char c) {\n    return CharTaskTypeMaps.getTaskType(c);","sourceCodeStart":235,"sourceCodeEnd":271,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/TaskID.java#L235-L271","documentation":"Error \"TaskId string : ${str} is not properly formed\nReason: ${m}\" thrown in apache/hadoop.","triggerScenarios":"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.","commonSituations":"See trigger scenarios.","solutions":["Provide a properly formed task ID string to forName(); the message includes the parse reason."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}