{"record":{"id":"c2cf0ffb3709bab0","repo":"apache/hadoop","slug":"jobid-cannot-be-null","errorCode":null,"errorMessage":"jobId cannot be null","messagePattern":"jobId cannot be null","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":85,"sourceCode":"  static {\n    idFormat.setGroupingUsed(false);\n    idFormat.setMinimumIntegerDigits(6);\n  }\n  \n  private JobID jobId;\n  private TaskType type;\n  \n  /**\n   * Constructs a TaskID object from given {@link JobID}.\n   *\n   * @param jobId JobID that this tip belongs to \n   * @param type the {@link TaskType} of the task \n   * @param id the tip number\n   */\n  public TaskID(JobID jobId, TaskType type, int id) {\n    super(id);\n    if(jobId == null) {\n      throw new IllegalArgumentException(\"jobId cannot be null\");\n    }\n    this.jobId = jobId;\n    this.type = type;\n  }\n  \n  /**\n   * Constructs a TaskInProgressId object from given parts.\n   *\n   * @param jtIdentifier jobTracker identifier\n   * @param jobId job number \n   * @param type the TaskType \n   * @param id the tip number\n   */\n  public TaskID(String jtIdentifier, int jobId, TaskType type, int id) {\n    this(new JobID(jtIdentifier, jobId), type, id);\n  }\n\n  /**","sourceCodeStart":67,"sourceCodeEnd":103,"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#L67-L103","documentation":"Error \"jobId cannot be null\" 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:85 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a non-null JobID when constructing the TaskID."],"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"}