apache/hadoop · error · IllegalArgumentException

Invalid inputs length

Error message

Invalid inputs length

What it means

Error "Invalid inputs length" thrown in apache/hadoop.

Source

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

 * A utility class that maintains decoding state during a decode call.
 */
@InterfaceAudience.Private
class DecodingState {
  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. Pass inputs length equal to numDataUnits + numParityUnits as required by the decoding state.
  2. Verify the schema's unit counts match the arrays supplied by the caller.

When it happens

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

Common situations: Occurs when the inputs array length does not match numDataUnits + numParityUnits for a decoding call. Construct input arrays of exactly the expected length.


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