From 22211d2b27fdd7df0c5be25466a85c09ade6c49e Mon Sep 17 00:00:00 2001 From: Andrew Purtell Date: Sat, 30 Apr 2022 09:11:33 -0700 Subject: [PATCH] HBASE-26992 Brotli compressor has unexpected behavior during reinitialization (#4389) Signed-off-by: Duo Zhang --- .../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();