{"record":{"id":"1b1985d3898c0e64","repo":"apache/hadoop","slug":"fail-to-create-raw-erasure-encoder-with-given-code","errorCode":null,"errorMessage":"Fail to create raw erasure encoder with given codec: {}","messagePattern":"Fail to create raw erasure encoder with given codec: (.+?)","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/CodecUtil.java","lineNumber":200,"sourceCode":"      if (!nativeEncoderEnabled && rawCoderName.contains(\"native\")) {\n        LOG.debug(\"Disable the encoder with ISA-L.\");\n        continue;\n      }\n      try {\n        if (rawCoderName != null) {\n          RawErasureCoderFactory fact = createRawCoderFactory(\n              rawCoderName, codecName);\n          return fact.createEncoder(coderOptions);\n        }\n      } catch (LinkageError | Exception e) {\n        // Fallback to next coder if possible\n        if (LOG.isDebugEnabled()) {\n          LOG.debug(\"Failed to create raw erasure encoder \" + rawCoderName +\n              \", fallback to next codec if possible\", e);\n        }\n      }\n    }\n    throw new IllegalArgumentException(\"Fail to create raw erasure \" +\n       \"encoder with given codec: \" + codecName);\n  }\n\n  private static RawErasureDecoder createRawDecoderWithFallback(\n      Configuration conf, String codecName, ErasureCoderOptions coderOptions) {\n    boolean nativeDecoderEnabled = conf.getBoolean(IO_ERASURECODE_CODEC_NATIVE_ENABLED_KEY,\n        IO_ERASURECODE_CODEC_NATIVE_ENABLED_DEFAULT);\n    String[] coders = getRawCoderNames(conf, codecName);\n    for (String rawCoderName : coders) {\n      if (!nativeDecoderEnabled && rawCoderName.contains(\"native\")) {\n        LOG.debug(\"Disable the decoder with ISA-L.\");\n        continue;\n      }\n      try {\n        if (rawCoderName != null) {\n          RawErasureCoderFactory fact = createRawCoderFactory(\n              rawCoderName, codecName);\n          return fact.createDecoder(coderOptions);","sourceCodeStart":182,"sourceCodeEnd":218,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/CodecUtil.java#L182-L218","documentation":"Terminal failure from CodecUtil.createRawEncoderWithFallback after every configured raw encoder factory for the codec failed to instantiate (each caught as LinkageError/Exception and skipped). The fallback chain was exhausted, so no raw erasure encoder could be created for this codec.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Check that the named erasure codec (e.g. rs, xor) is spelled correctly and its coder factory classes are on the classpath.","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."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}