From 6143b7694cc02e905b931de86462c6125ca8b3b6 Mon Sep 17 00:00:00 2001 From: anoopsjohn Date: Tue, 13 Oct 2015 07:57:53 +0530 Subject: [PATCH] HBASE-13819 Make RPC layer CellBlock buffer a DirectByteBuffer. --- .../org/apache/hadoop/hbase/io/BoundedByteBufferPool.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/io/BoundedByteBufferPool.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/io/BoundedByteBufferPool.java index c685a925001..aabbbc67932 100644 --- a/hbase-common/src/main/java/org/apache/hadoop/hbase/io/BoundedByteBufferPool.java +++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/io/BoundedByteBufferPool.java @@ -43,6 +43,8 @@ import com.google.common.annotations.VisibleForTesting; * achieve a particular 'run' size over time give or take a few extremes. Set TRACE level on this * class for a couple of seconds to get reporting on how it is running when deployed. * + *

This pool returns off heap ByteBuffers. + * *

This class is thread safe. */ @InterfaceAudience.Private @@ -94,7 +96,7 @@ public class BoundedByteBufferPool { // Clear sets limit == capacity. Postion == 0. bb.clear(); } else { - bb = ByteBuffer.allocate(this.runningAverage); + bb = ByteBuffer.allocateDirect(this.runningAverage); this.allocations.incrementAndGet(); } if (LOG.isTraceEnabled()) {