apache/hadoop · error · IllegalArgumentException

Fail to create raw erasure decoder with given codec

Error message

Fail to create raw erasure decoder with given codec: {}

What it means

Terminal failure from CodecUtil.createRawDecoderWithFallback after all raw decoder factories for the codec threw LinkageError or Exception during creation. No usable decoder remained after the fallback sequence.

Solutions

  1. Verify the codec name and that the matching raw decoder factory is available on the classpath.
  2. If a native decoder was requested, confirm the native library is built and loadable, or configure the Java fallback coder.
Defensive patterns

Strategy: fallback

When it happens

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

Common situations: Occurs when the configured erasure codec cannot create a raw decoder, typically because the codec or native library is unavailable. Verify codec configuration and native library availability.


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

Appendix: source

Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/CodecUtil.java:228

      if (!nativeDecoderEnabled && rawCoderName.contains("native")) {
        LOG.debug("Disable the decoder with ISA-L.");
        continue;
      }
      try {
        if (rawCoderName != null) {
          RawErasureCoderFactory fact = createRawCoderFactory(
              rawCoderName, codecName);
          return fact.createDecoder(coderOptions);
        }
      } catch (LinkageError | Exception e) {
        // Fallback to next coder if possible
        if (LOG.isDebugEnabled()) {
          LOG.debug("Failed to create raw erasure decoder " + rawCoderName +
                  ", fallback to next codec if possible", e);
        }
      }
    }
    throw new IllegalArgumentException("Fail to create raw erasure " +
        "decoder with given codec: " + codecName);
  }

  private static ErasureCodec createCodec(Configuration conf,
      String codecClassName, ErasureCodecOptions options) {
    ErasureCodec codec = null;
    try {
      Class<? extends ErasureCodec> codecClass =
              conf.getClassByName(codecClassName)
              .asSubclass(ErasureCodec.class);
      Constructor<? extends ErasureCodec> constructor
          = codecClass.getConstructor(Configuration.class,
          ErasureCodecOptions.class);
      codec = constructor.newInstance(conf, options);
    } catch (ClassNotFoundException | InstantiationException |
            IllegalAccessException | NoSuchMethodException |
            InvocationTargetException e) {
      throw new RuntimeException("Failed to create erasure codec", e);

View on GitHub (pinned to 2add963021)