{"record":{"id":"783ecef8dcb93052","repo":"apache/hadoop","slug":"dictionary-support-is-not-enabled","errorCode":null,"errorMessage":"Dictionary support is not enabled","messagePattern":"Dictionary support is not enabled","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/zstd/ZStandardCompressor.java","lineNumber":158,"sourceCode":"    uncompressedDirectBufOff = 0;\n    setInputFromSavedData();\n\n    compressedDirectBuf.limit(directBufferSize);\n    compressedDirectBuf.position(directBufferSize);\n  }\n\n  //copy enough data from userBuf to uncompressedDirectBuf\n  private void setInputFromSavedData() {\n    int len = Math.min(userBufLen, uncompressedDirectBuf.remaining());\n    uncompressedDirectBuf.put(userBuf, userBufOff, len);\n    userBufLen -= len;\n    userBufOff += len;\n    uncompressedDirectBufLen = uncompressedDirectBuf.position();\n  }\n\n  @Override\n  public void setDictionary(byte[] b, int off, int len) {\n    throw new UnsupportedOperationException(\n        \"Dictionary support is not enabled\");\n  }\n\n  @Override\n  public boolean needsInput() {\n    // Consume remaining compressed data?\n    if (compressedDirectBuf.remaining() > 0) {\n      return false;\n    }\n\n    // have we consumed all input\n    if (keepUncompressedBuf && uncompressedDirectBufLen - uncompressedDirectBufOff > 0) {\n      return false;\n    }\n\n    if (uncompressedDirectBuf.remaining() > 0) {\n      // Check if we have consumed all user-input\n      if (userBufLen <= 0) {","sourceCodeStart":140,"sourceCodeEnd":176,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/zstd/ZStandardCompressor.java#L140-L176","documentation":"Error \"Dictionary support is not enabled\" thrown in apache/hadoop.","triggerScenarios":"Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/zstd/ZStandardCompressor.java:158 when the library encounters an invalid state.","commonSituations":"Occurs when setDictionary is called on a ZStandardCompressor built without dictionary support. Enable dictionary support when constructing the compressor before calling setDictionary.","solutions":["Build Hadoop with zstd dictionary support enabled, or avoid setting a compression dictionary in the codec configuration."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}