apache/hadoop · error · UnsupportedOperationException

Dictionary support is not enabled

Error message

Dictionary support is not enabled

What it means

Error "Dictionary support is not enabled" thrown in apache/hadoop.

Source

Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/zstd/ZStandardDecompressor.java:112

    compressedDirectBuf.clear();
    compressedDirectBuf.put(
        userBuf, userBufOff, bytesInCompressedBuffer);

    // Set the finished to false when compressedDirectBuf still
    // contains some bytes.
    if (compressedDirectBuf.position() > 0 && finished) {
      finished = false;
    }

    userBufOff += bytesInCompressedBuffer;
    userBufferBytesToConsume -= bytesInCompressedBuffer;
  }

  // dictionary is not supported
  @Override
  public void setDictionary(byte[] b, int off, int len) {
    throw new UnsupportedOperationException(
        "Dictionary support is not enabled");
  }

  @Override
  public boolean needsInput() {
    // Consume remaining compressed data?
    if (uncompressedDirectBuf.remaining() > 0) {
      return false;
    }

    // Check if we have consumed all input
    if (bytesInCompressedBuffer - compressedDirectBufOff <= 0) {
      // Check if we have consumed all user-input
      if (userBufferBytesToConsume <= 0) {
        return true;
      } else {
        setInputFromSavedData();
      }

View on GitHub (pinned to 2add963021)

Solutions

  1. Build Hadoop with zstd dictionary support enabled, or disable dictionary use in the decompressor configuration.

When it happens

Trigger: Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/zstd/ZStandardDecompressor.java:112 when the library encounters an invalid state.

Common situations: Occurs when setDictionary is called on a ZStandardDecompressor built without dictionary support. Enable dictionary support at construction time before calling setDictionary.


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