apache/hadoop · error · UnsupportedOperationException
byte[] arrays are not supported for DirectDecompressor
Error message
byte[] arrays are not supported for DirectDecompressor
What it means
Error "byte[] arrays are not supported for DirectDecompressor" thrown in apache/hadoop.
Source
Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/zstd/ZStandardDecompressor.java:316
super.reset();
endOfInput = true;
}
private boolean endOfInput;
@Override
public void decompress(ByteBuffer src, ByteBuffer dst)
throws IOException {
assert dst.isDirect() : "dst.isDirect()";
assert src.isDirect() : "src.isDirect()";
assert dst.remaining() > 0 : "dst.remaining() > 0";
this.inflateDirect(src, dst);
endOfInput = !src.hasRemaining();
}
@Override
public void setDictionary(byte[] b, int off, int len) {
throw new UnsupportedOperationException(
"byte[] arrays are not supported for DirectDecompressor");
}
@Override
public int decompress(byte[] b, int off, int len) {
throw new UnsupportedOperationException(
"byte[] arrays are not supported for DirectDecompressor");
}
}
}
View on GitHub (pinned to 2add963021)
Solutions
- Use direct ByteBuffers with the direct decompressor, or use a heap-buffer-capable ZStandardDecompressor instance for byte[] input.
When it happens
Trigger: Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/zstd/ZStandardDecompressor.java:316 when the library encounters an invalid state.
Common situations: Occurs when a direct ZStandardDecompressor is asked to decompress from a byte[] array. Pass a direct ByteBuffer to direct decompressors, or use the array-based decompressor variant.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/d3895370408f3811.
Report an issue: GitHub.