apache/hadoop · error · IllegalArgumentException
JobStory not available for job {}
Error message
JobStory not available for job {} What it means
Statistics.generateJobStats(job, jobdesc) computes the gridmix job sequence id from the job configuration and throws IllegalArgumentException if seq >= 0 but the JobStory (job descriptor from the trace) is null. It is an internal invariant: every submitted gridmix job with a valid sequence number must carry its original trace job. The sole caller is JobSubmitter's statistics thread, so the exception surfaces from the submitter after job submission.
Source
Thrown at hadoop-tools/hadoop-gridmix/src/main/java/org/apache/hadoop/mapred/gridmix/Statistics.java:109
public JobClient run() throws IOException {
return new JobClient(new JobConf(conf));
}
});
this.jtPollingInterval = pollingInterval;
maxJobCompletedInInterval = conf.getInt(
MAX_JOBS_COMPLETED_IN_POLL_INTERVAL_KEY, 1);
this.startFlag = startFlag;
}
/**
* Generates a job stats.
*/
public static JobStats generateJobStats(Job job, JobStory jobdesc) {
int seq = GridmixJob.getJobSeqId(job);
// bail out if job description is missing for a job to be simulated
if (seq >= 0 && jobdesc == null) {
throw new IllegalArgumentException("JobStory not available for job "
+ job.getJobID());
}
int maps = -1;
int reds = -1;
if (jobdesc != null) {
// Note that the ZombieJob will return a >= 0 value
maps = jobdesc.getNumberMaps();
reds = jobdesc.getNumberReduces();
}
return new JobStats(maps, reds, job);
}
private static void addToNumMapsSubmitted(int numMaps) {
numMapsSubmitted += numMaps;
}
private static void addToNumReducesSubmitted(int numReduces) {View on GitHub (pinned to 2add963021)
Solutions
- Ensure your JobFactory/GridmixJob supplies a non-null JobStory for every job that carries a gridmix sequence id
- If the job legitimately has no trace descriptor, clear/omit the job sequence id so seq < 0 (stats are then recorded with maps/reds = -1)
- Regenerate the job trace from a clean job history so no submitted job maps to a null descriptor
Defensive patterns
Strategy: validation
Validate before calling
// before recording stats for a submitted gridmix job
JobStory desc = job.getJobDesc();
if (desc == null && GridmixJob.getJobSeqId(job.getJob()) >= 0) {
// invariant violated upstream; fix the job factory instead of calling generateJobStats
} Try / catch
try {
JobStats stats = Statistics.generateJobStats(job, jobdesc);
} catch (IllegalArgumentException e) {
// job carried a gridmix seq id but no JobStory; repair the factory/trace wiring
} Prevention
- In custom gridmix job factories, always pass the trace JobStory into the submitted job
- Validate traces for per-job descriptors before replay
When it happens
Trigger: A custom GridmixJob or JobFactory submits a job whose configuration carries the job-seq-id property but whose JobStory argument is null; replaying a trace where a submitted job has no corresponding trace job record (null desc from the factory).
Common situations: Extending gridmix (custom job factories/mappers) and not wiring the JobStory through; truncated or malformed trace files yielding null descriptions; version mismatches in gridmix extensions after upgrading Hadoop. Not triggerable by ordinary CLI configuration.
Related errors
- Failed to rename %s to %s, file already exists or not empty!
- Truncate is not supported by BaiduBosFileSystem
- user accessKey and secretAccessKey should not be null
- NoSuchUpload
- Key '" + key + "' does not exist in BOS
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/77ce118e888019cb.
Report an issue: GitHub.