apache/hadoop · error · IllegalArgumentException

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

Error message

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

What it means

Error "Fail to create raw erasure encoder with given codec: {}" thrown in apache/hadoop.

Source

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

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

  private static RawErasureDecoder createRawDecoderWithFallback(
      Configuration conf, String codecName, ErasureCoderOptions coderOptions) {
    boolean nativeDecoderEnabled = conf.getBoolean(IO_ERASURECODE_CODEC_NATIVE_ENABLED_KEY,
        IO_ERASURECODE_CODEC_NATIVE_ENABLED_DEFAULT);
    String[] coders = getRawCoderNames(conf, codecName);
    for (String rawCoderName : coders) {
      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);

View on GitHub (pinned to 2add963021)

Solutions

  1. Check that the named erasure codec (e.g. rs, xor) is spelled correctly and its coder factory classes are on the classpath.
  2. For native codecs, verify the native Hadoop library (libhadoop) is built with ISA-L support and is loadable; otherwise fall back to the Java coder.

When it happens

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

Common situations: Occurs when the configured erasure codec cannot create a raw encoder, typically because the codec or its native library is unavailable. Verify the codec name and that required native libraries are installed.


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