{"record":{"id":"d3895370408f3811","repo":"apache/hadoop","slug":"byte-arrays-are-not-supported-for-directdecompre-d38953","errorCode":null,"errorMessage":"byte[] arrays are not supported for DirectDecompressor","messagePattern":"byte\\[\\] arrays are not supported for DirectDecompressor","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/zstd/ZStandardDecompressor.java","lineNumber":316,"sourceCode":"      super.reset();\n      endOfInput = true;\n    }\n\n    private boolean endOfInput;\n\n    @Override\n    public void decompress(ByteBuffer src, ByteBuffer dst)\n        throws IOException {\n      assert dst.isDirect() : \"dst.isDirect()\";\n      assert src.isDirect() : \"src.isDirect()\";\n      assert dst.remaining() > 0 : \"dst.remaining() > 0\";\n      this.inflateDirect(src, dst);\n      endOfInput = !src.hasRemaining();\n    }\n\n    @Override\n    public void setDictionary(byte[] b, int off, int len) {\n      throw new UnsupportedOperationException(\n          \"byte[] arrays are not supported for DirectDecompressor\");\n    }\n\n    @Override\n    public int decompress(byte[] b, int off, int len) {\n      throw new UnsupportedOperationException(\n          \"byte[] arrays are not supported for DirectDecompressor\");\n    }\n  }\n}\n","sourceCodeStart":298,"sourceCodeEnd":327,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/zstd/ZStandardDecompressor.java#L298-L327","documentation":"Error \"byte[] arrays are not supported for DirectDecompressor\" thrown in apache/hadoop.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Use direct ByteBuffers with the direct decompressor, or use a heap-buffer-capable ZStandardDecompressor instance for byte[] input."],"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-23T01:17:44.959Z"}