{"record":{"id":"cd3b7ef7155e5436","repo":"apache/hadoop","slug":"error-reading-indexfile","errorCode":null,"errorMessage":"Error Reading IndexFile","messagePattern":"Error Reading IndexFile","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/IndexCache.java","lineNumber":123,"sourceCode":"        while (isUnderConstruction(info)) {\n          try {\n            info.wait();\n          } catch (InterruptedException e) {\n            throw new IOException(\"Interrupted waiting for construction\", e);\n          }\n        }\n      }\n      LOG.debug(\"IndexCache HIT: MapId \" + mapId + \" found\");\n      return info;\n    }\n    LOG.debug(\"IndexCache MISS: MapId \" + mapId + \" not found\") ;\n    SpillRecord tmp = null;\n    try { \n      tmp = new SpillRecord(indexFileName, conf, expectedIndexOwner);\n    } catch (Throwable e) { \n      tmp = new SpillRecord(0);\n      cache.remove(mapId);\n      throw new IOException(\"Error Reading IndexFile\", e);\n    } finally { \n      synchronized (newInd) { \n        newInd.mapSpillRecord = tmp;\n        newInd.notifyAll();\n      } \n    } \n    queue.add(mapId);\n    \n    if (totalMemoryUsed.addAndGet(newInd.getSize()) > totalMemoryAllowed) {\n      freeIndexInformation();\n    }\n    return newInd;\n  }\n\n  /**\n   * This method removes the map from the cache if index information for this\n   * map is loaded(size>0), index information entry in cache will not be \n   * removed if it is in the loading phrase(size=0), this prevents corruption  ","sourceCodeStart":105,"sourceCodeEnd":141,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/IndexCache.java#L105-L141","documentation":"Error \"Error Reading IndexFile\" thrown in apache/hadoop.","triggerScenarios":"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.","commonSituations":"See trigger scenarios.","solutions":["The intermediate index file could not be read; rerun the map task to regenerate it and check local disk errors on the node."],"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"}