HBASE-13819 Make RPC layer CellBlock buffer a DirectByteBuffer.
This commit is contained in:
parent
ac82a86320
commit
6143b7694c
@ -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
|
* 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.
|
* class for a couple of seconds to get reporting on how it is running when deployed.
|
||||||
*
|
*
|
||||||
|
* <p>This pool returns off heap ByteBuffers.
|
||||||
|
*
|
||||||
* <p>This class is thread safe.
|
* <p>This class is thread safe.
|
||||||
*/
|
*/
|
||||||
@InterfaceAudience.Private
|
@InterfaceAudience.Private
|
||||||
@ -94,7 +96,7 @@ public class BoundedByteBufferPool {
|
|||||||
// Clear sets limit == capacity. Postion == 0.
|
// Clear sets limit == capacity. Postion == 0.
|
||||||
bb.clear();
|
bb.clear();
|
||||||
} else {
|
} else {
|
||||||
bb = ByteBuffer.allocate(this.runningAverage);
|
bb = ByteBuffer.allocateDirect(this.runningAverage);
|
||||||
this.allocations.incrementAndGet();
|
this.allocations.incrementAndGet();
|
||||||
}
|
}
|
||||||
if (LOG.isTraceEnabled()) {
|
if (LOG.isTraceEnabled()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user