apache/hadoop · error · IllegalArgumentException
jobId cannot be null
Error message
jobId cannot be null
What it means
Null-check in the TaskID(JobID, TaskType, int) constructor: a task id must reference a parent job; a null jobId is rejected with IllegalArgumentException at construction time so the composite string form ('task_<jobid>_...') can never be built from incomplete parts. Validation of the jobId constructor argument.
Solutions
- Pass a non-null JobID when constructing the TaskID.
Defensive patterns
Strategy: validation
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:85 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/c2cf0ffb3709bab0.
Report an issue: GitHub.
Appendix: source
Thrown at hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/TaskID.java:85
static {
idFormat.setGroupingUsed(false);
idFormat.setMinimumIntegerDigits(6);
}
private JobID jobId;
private TaskType type;
/**
* Constructs a TaskID object from given {@link JobID}.
*
* @param jobId JobID that this tip belongs to
* @param type the {@link TaskType} of the task
* @param id the tip number
*/
public TaskID(JobID jobId, TaskType type, int id) {
super(id);
if(jobId == null) {
throw new IllegalArgumentException("jobId cannot be null");
}
this.jobId = jobId;
this.type = type;
}
/**
* Constructs a TaskInProgressId object from given parts.
*
* @param jtIdentifier jobTracker identifier
* @param jobId job number
* @param type the TaskType
* @param id the tip number
*/
public TaskID(String jtIdentifier, int jobId, TaskType type, int id) {
this(new JobID(jtIdentifier, jobId), type, id);
}
/**View on GitHub (pinned to 2add963021)