{"record":{"id":"c331703ad9f8f379","repo":"apache/hadoop","slug":"interrupted-waiting-for-construction","errorCode":null,"errorMessage":"Interrupted waiting for construction","messagePattern":"Interrupted waiting for construction","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":75,"sourceCode":"   * @param expectedIndexOwner The expected owner of the index file\n   * @return The Index Information\n   * @throws IOException\n   */\n  public IndexRecord getIndexInformation(String mapId, int reduce,\n                                         Path fileName, String expectedIndexOwner)\n    throws IOException {\n\n    IndexInformation info = cache.get(mapId);\n\n    if (info == null) {\n      info = readIndexFileToCache(fileName, mapId, expectedIndexOwner);\n    } else {\n      synchronized(info) {\n        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    }\n\n    if (info.mapSpillRecord.size() == 0 ||\n        info.mapSpillRecord.size() <= reduce) {\n      throw new IOException(\"Invalid request \" +\n        \" Map Id = \" + mapId + \" Reducer = \" + reduce +\n        \" Index Info Length = \" + info.mapSpillRecord.size());\n    }\n    return info.mapSpillRecord.getIndex(reduce);\n  }\n\n  private boolean isUnderConstruction(IndexInformation info) {\n    synchronized(info) {\n      return (null == info.mapSpillRecord);","sourceCodeStart":57,"sourceCodeEnd":93,"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#L57-L93","documentation":"Error \"Interrupted waiting for construction\" 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:75 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["The thread was interrupted while building the index cache entry; this is typically part of task shutdown, so retry the task and ensure interrupts are not sent spuriously."],"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"}