You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ja...@apache.org on 2019/12/25 20:38:15 UTC

[hbase] branch master updated: HBASE-23374 ExclusiveMemHFileBlock’s allocator should not be hardcoded as ByteBuffAllocator.HEAP

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

janh 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 56f9db9  HBASE-23374 ExclusiveMemHFileBlock’s allocator should not be hardcoded as ByteBuffAllocator.HEAP
56f9db9 is described below

commit 56f9db98d12be4206a13040608736cfb78e2ef4b
Author: chenxu14 <47...@users.noreply.github.com>
AuthorDate: Thu Dec 26 04:38:02 2019 +0800

    HBASE-23374 ExclusiveMemHFileBlock’s allocator should not be hardcoded as ByteBuffAllocator.HEAP
    
    Signed-off-by: stack <st...@apache.org>
    Signed-off-by: Jan Hentschel <ja...@apache.org>
---
 .../org/apache/hadoop/hbase/io/hfile/ExclusiveMemHFileBlock.java     | 5 ++---
 .../java/org/apache/hadoop/hbase/io/hfile/HFileBlockBuilder.java     | 2 +-
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/ExclusiveMemHFileBlock.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/ExclusiveMemHFileBlock.java
index 73c0db4..7f7cc3e 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/ExclusiveMemHFileBlock.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/ExclusiveMemHFileBlock.java
@@ -39,10 +39,9 @@ public class ExclusiveMemHFileBlock extends HFileBlock {
   ExclusiveMemHFileBlock(BlockType blockType, int onDiskSizeWithoutHeader,
       int uncompressedSizeWithoutHeader, long prevBlockOffset, ByteBuff buf, boolean fillHeader,
       long offset, int nextBlockOnDiskSize, int onDiskDataSizeWithHeader,
-      HFileContext fileContext) {
+      HFileContext fileContext, ByteBuffAllocator alloc) {
     super(blockType, onDiskSizeWithoutHeader, uncompressedSizeWithoutHeader, prevBlockOffset, buf,
-        fillHeader, offset, nextBlockOnDiskSize, onDiskDataSizeWithHeader, fileContext,
-        ByteBuffAllocator.HEAP);
+        fillHeader, offset, nextBlockOnDiskSize, onDiskDataSizeWithHeader, fileContext, alloc);
   }
 
   @Override
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlockBuilder.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlockBuilder.java
index 4ed50e1..dc37a92 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlockBuilder.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlockBuilder.java
@@ -108,7 +108,7 @@ public class HFileBlockBuilder {
     } else {
       return new ExclusiveMemHFileBlock(blockType, onDiskSizeWithoutHeader,
           uncompressedSizeWithoutHeader, prevBlockOffset, buf, fillHeader, offset,
-          nextBlockOnDiskSize, onDiskDataSizeWithHeader, fileContext);
+          nextBlockOnDiskSize, onDiskDataSizeWithHeader, fileContext, allocator);
     }
   }
 }