apache/hadoop · error · HadoopIllegalArgumentException

erasedIndexes and outputs mismatch in length

Error message

erasedIndexes and outputs mismatch in length

What it means

Error "erasedIndexes and outputs mismatch in length" thrown in apache/hadoop.

Source

Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/DecodingState.java:46

  RawErasureDecoder decoder;
  int decodeLength;

  /**
   * Check and validate decoding parameters, throw exception accordingly. The
   * checking assumes it's a MDS code. Other code  can override this.
   * @param inputs input buffers to check
   * @param erasedIndexes indexes of erased units in the inputs array
   * @param outputs output buffers to check
   */
  <T> void checkParameters(T[] inputs, int[] erasedIndexes,
                           T[] outputs) {
    if (inputs.length != decoder.getNumParityUnits() +
        decoder.getNumDataUnits()) {
      throw new IllegalArgumentException("Invalid inputs length");
    }

    if (erasedIndexes.length != outputs.length) {
      throw new HadoopIllegalArgumentException(
          "erasedIndexes and outputs mismatch in length");
    }

    if (erasedIndexes.length > decoder.getNumParityUnits()) {
      throw new HadoopIllegalArgumentException(
          "Too many erased, not recoverable");
    }
  }
}

View on GitHub (pinned to 2add963021)

Solutions

  1. Provide one output buffer per erased index; outputs.length must equal erasedIndexes.length.

When it happens

Trigger: Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/DecodingState.java:46 when the library encounters an invalid state.

Common situations: Occurs when erasedIndexes and outputs arrays have different lengths in a decode call. Provide one output buffer per erased index.


AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22). Data as JSON: /api/errors/7d7f5fb2bde925ae. Report an issue: GitHub.