{"record":{"id":"47208bd64e55778b","repo":"apache/hadoop","slug":"uninitialized-inputsplit-47208b","errorCode":null,"errorMessage":"Uninitialized InputSplit","messagePattern":"Uninitialized InputSplit","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/mapreduce/lib/join/CompositeInputSplit.java","lineNumber":64,"sourceCode":"  private int fill = 0;\n  private long totsize = 0L;\n  private InputSplit[] splits;\n  private Configuration conf = new Configuration();\n\n  public CompositeInputSplit() { }\n\n  public CompositeInputSplit(int capacity) {\n    splits = new InputSplit[capacity];\n  }\n\n  /**\n   * Add an InputSplit to this collection.\n   * @throws IOException If capacity was not specified during construction\n   *                     or if capacity has been reached.\n   */\n  public void add(InputSplit s) throws IOException, InterruptedException {\n    if (null == splits) {\n      throw new IOException(\"Uninitialized InputSplit\");\n    }\n    if (fill == splits.length) {\n      throw new IOException(\"Too many splits\");\n    }\n    splits[fill++] = s;\n    totsize += s.getLength();\n  }\n\n  /**\n   * Get ith child InputSplit.\n   */\n  public InputSplit get(int i) {\n    return splits[i];\n  }\n\n  /**\n   * Return the aggregate length of all child InputSplits currently added.\n   */","sourceCodeStart":46,"sourceCodeEnd":82,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/join/CompositeInputSplit.java#L46-L82","documentation":"Error \"Uninitialized InputSplit\" thrown in apache/hadoop.","triggerScenarios":"Thrown by CompositeInputSplit.getLocation()/getLocations() when they are called before the split has been initialized with its child splits and locations (i.e. before readFields/add). Always populate the split via readFields() before querying locations.","commonSituations":"Manually constructing CompositeInputSplit without calling set(); deserializing a split whose readFields() was skipped.","solutions":["Ensure CompositeInputSplit.set() is called to populate the child splits before the split is read or used.","Check that the job used CompositeInputFormat to generate the splits so each CompositeInputSplit is fully initialized."],"exampleFix":"CompositeInputSplit split = new CompositeInputSplit(children.length);\nsplit.set(children); // must be called before use","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"}