apache/hadoop · error · IOException
Error Reading IndexFile
Error message
Error Reading IndexFile
What it means
Fires in IndexCache.readIndexFileToCache when constructing a SpillRecord from the map task's index file fails with any Throwable — typically because the index file is missing, truncated, or corrupted (e.g. map output removed mid-shuffle or disk errors). The cache entry is evicted (cache.remove(mapId)) and the underlying failure is rethrown wrapped as an IOException so the fetcher can treat the map output as unreadable.
Solutions
- The intermediate index file could not be read; rerun the map task to regenerate it and check local disk errors on the node.
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/IndexCache.java:123 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/cd3b7ef7155e5436.
Report an issue: GitHub.
Appendix: source
Thrown at hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/IndexCache.java:123
while (isUnderConstruction(info)) {
try {
info.wait();
} catch (InterruptedException e) {
throw new IOException("Interrupted waiting for construction", e);
}
}
}
LOG.debug("IndexCache HIT: MapId " + mapId + " found");
return info;
}
LOG.debug("IndexCache MISS: MapId " + mapId + " not found") ;
SpillRecord tmp = null;
try {
tmp = new SpillRecord(indexFileName, conf, expectedIndexOwner);
} catch (Throwable e) {
tmp = new SpillRecord(0);
cache.remove(mapId);
throw new IOException("Error Reading IndexFile", e);
} finally {
synchronized (newInd) {
newInd.mapSpillRecord = tmp;
newInd.notifyAll();
}
}
queue.add(mapId);
if (totalMemoryUsed.addAndGet(newInd.getSize()) > totalMemoryAllowed) {
freeIndexInformation();
}
return newInd;
}
/**
* This method removes the map from the cache if index information for this
* map is loaded(size>0), index information entry in cache will not be
* removed if it is in the loading phrase(size=0), this prevents corruption View on GitHub (pinned to 2add963021)