{"record":{"id":"32b9f8da5d3e73a9","repo":"apache/hadoop","slug":"inputs-not-fully-corresponding-to-erasedindexes-in","errorCode":null,"errorMessage":"Inputs not fully corresponding to erasedIndexes in null places","messagePattern":"Inputs not fully corresponding to erasedIndexes in null places","errorType":"exception","errorClass":"HadoopIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/RSLegacyRawDecoder.java","lineNumber":147,"sourceCode":"\n    // Use the caller passed buffers in erasedIndexes positions\n    for (int outputIdx = 0, i = 0;\n         i < decodingState.erasedIndexes.length; i++) {\n      boolean found = false;\n      for (int j = 0; j < erasedOrNotToReadIndexes.length; j++) {\n        // If this index is one requested by the caller via erasedIndexes, then\n        // we use the passed output buffer to avoid copying data thereafter.\n        if (decodingState.erasedIndexes[i] == erasedOrNotToReadIndexes[j]) {\n          found = true;\n          adjustedByteArrayOutputsParameter[j] = CoderUtil.resetBuffer(\n              decodingState.outputs[outputIdx],\n              decodingState.outputOffsets[outputIdx], dataLen);\n          adjustedOutputOffsets[j] = decodingState.outputOffsets[outputIdx];\n          outputIdx++;\n        }\n      }\n      if (!found) {\n        throw new HadoopIllegalArgumentException(\n            \"Inputs not fully corresponding to erasedIndexes in null places\");\n      }\n    }\n    // Use shared buffers for other positions (not set yet)\n    for (int bufferIdx = 0, i = 0; i < erasedOrNotToReadIndexes.length; i++) {\n      if (adjustedByteArrayOutputsParameter[i] == null) {\n        adjustedByteArrayOutputsParameter[i] = CoderUtil.resetBuffer(\n            checkGetBytesArrayBuffer(bytesArrayBuffers, bufferIdx, dataLen),\n            0, dataLen);\n        adjustedOutputOffsets[i] = 0; // Always 0 for such temp output\n        bufferIdx++;\n      }\n    }\n\n    doDecodeImpl(decodingState.inputs, decodingState.inputOffsets,\n        dataLen, erasedOrNotToReadIndexes,\n        adjustedByteArrayOutputsParameter, adjustedOutputOffsets);\n  }","sourceCodeStart":129,"sourceCodeEnd":165,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/RSLegacyRawDecoder.java#L129-L165","documentation":"Error \"Inputs not fully corresponding to erasedIndexes in null places\" thrown in apache/hadoop.","triggerScenarios":"Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/RSLegacyRawDecoder.java:147 when the library encounters an invalid state.","commonSituations":"Occurs when null placeholders in the inputs array do not line up with erasedIndexes. Null out exactly the positions listed in erasedIndexes before decoding.","solutions":["Place nulls in the inputs array exactly at erasedIndexes positions and valid buffers everywhere else."],"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-23T01:17:44.959Z"}