Skip to content

Commit 56f9db9

Browse files
chenxu14HorizonNet
authored andcommitted
HBASE-23374 ExclusiveMemHFileBlock’s allocator should not be hardcoded as ByteBuffAllocator.HEAP
Signed-off-by: stack <stack@apache.org> Signed-off-by: Jan Hentschel <janh@apache.org>
1 parent 1b049a2 commit 56f9db9

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/ExclusiveMemHFileBlock.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,9 @@ public class ExclusiveMemHFileBlock extends HFileBlock {
3939
ExclusiveMemHFileBlock(BlockType blockType, int onDiskSizeWithoutHeader,
4040
int uncompressedSizeWithoutHeader, long prevBlockOffset, ByteBuff buf, boolean fillHeader,
4141
long offset, int nextBlockOnDiskSize, int onDiskDataSizeWithHeader,
42-
HFileContext fileContext) {
42+
HFileContext fileContext, ByteBuffAllocator alloc) {
4343
super(blockType, onDiskSizeWithoutHeader, uncompressedSizeWithoutHeader, prevBlockOffset, buf,
44-
fillHeader, offset, nextBlockOnDiskSize, onDiskDataSizeWithHeader, fileContext,
45-
ByteBuffAllocator.HEAP);
44+
fillHeader, offset, nextBlockOnDiskSize, onDiskDataSizeWithHeader, fileContext, alloc);
4645
}
4746

4847
@Override

hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlockBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public HFileBlock build() {
108108
} else {
109109
return new ExclusiveMemHFileBlock(blockType, onDiskSizeWithoutHeader,
110110
uncompressedSizeWithoutHeader, prevBlockOffset, buf, fillHeader, offset,
111-
nextBlockOnDiskSize, onDiskDataSizeWithHeader, fileContext);
111+
nextBlockOnDiskSize, onDiskDataSizeWithHeader, fileContext, allocator);
112112
}
113113
}
114114
}

0 commit comments

Comments
 (0)