You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ap...@apache.org on 2022/04/30 16:11:41 UTC

[hbase] branch master updated: HBASE-26992 Brotli compressor has unexpected behavior during reinitialization (#4389)

This is an automated email from the ASF dual-hosted git repository.

apurtell pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/master by this push:
     new 152ecad53a4 HBASE-26992 Brotli compressor has unexpected behavior during reinitialization (#4389)
152ecad53a4 is described below

commit 152ecad53a4679b496188212df47d99383528b9f
Author: Andrew Purtell <ap...@apache.org>
AuthorDate: Sat Apr 30 09:11:33 2022 -0700

    HBASE-26992 Brotli compressor has unexpected behavior during reinitialization (#4389)
    
    Signed-off-by: Duo Zhang <zh...@apache.org>
---
 .../org/apache/hadoop/hbase/io/compress/brotli/BrotliCompressor.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hbase-compression/hbase-compression-brotli/src/main/java/org/apache/hadoop/hbase/io/compress/brotli/BrotliCompressor.java b/hbase-compression/hbase-compression-brotli/src/main/java/org/apache/hadoop/hbase/io/compress/brotli/BrotliCompressor.java
index c45eb0d1401..f6989064b76 100644
--- a/hbase-compression/hbase-compression-brotli/src/main/java/org/apache/hadoop/hbase/io/compress/brotli/BrotliCompressor.java
+++ b/hbase-compression/hbase-compression-brotli/src/main/java/org/apache/hadoop/hbase/io/compress/brotli/BrotliCompressor.java
@@ -162,8 +162,8 @@ public class BrotliCompressor implements CanReinit, Compressor {
       int newBufferSize = BrotliCodec.getBufferSize(conf);
       if (bufferSize != newBufferSize) {
         bufferSize = newBufferSize;
-        this.inBuf = ByteBuffer.allocateDirect(bufferSize);
-        this.outBuf = ByteBuffer.allocateDirect(bufferSize);
+        this.inBuf = ByteBuffer.allocate(bufferSize);
+        this.outBuf = ByteBuffer.allocate(bufferSize);
       }
     }
     reset();