You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by sy...@apache.org on 2015/12/15 18:43:16 UTC
[02/26] hbase git commit: HBASE-14942 Allow turning off
BoundedByteBufferPool
HBASE-14942 Allow turning off BoundedByteBufferPool
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/ba3aa9a9
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/ba3aa9a9
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/ba3aa9a9
Branch: refs/heads/hbase-12439
Commit: ba3aa9a9b187322bfdb64e676778872ad69552aa
Parents: 0e147a9
Author: Elliott Clark <ec...@apache.org>
Authored: Mon Dec 7 11:01:51 2015 -0800
Committer: Elliott Clark <ec...@apache.org>
Committed: Wed Dec 9 15:29:25 2015 -0800
----------------------------------------------------------------------
.../org/apache/hadoop/hbase/ipc/RpcServer.java | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/ba3aa9a9/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java
index 402bca0..0db7383 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java
@@ -2004,13 +2004,17 @@ public class RpcServer implements RpcServerInterface, ConfigurationObserver {
final InetSocketAddress bindAddress, Configuration conf,
RpcScheduler scheduler)
throws IOException {
- this.reservoir = new BoundedByteBufferPool(
- conf.getInt("hbase.ipc.server.reservoir.max.buffer.size", 1024 * 1024),
- conf.getInt("hbase.ipc.server.reservoir.initial.buffer.size", 16 * 1024),
- // Make the max twice the number of handlers to be safe.
- conf.getInt("hbase.ipc.server.reservoir.initial.max",
- conf.getInt(HConstants.REGION_SERVER_HANDLER_COUNT,
- HConstants.DEFAULT_REGION_SERVER_HANDLER_COUNT) * 2));
+ if (conf.getBoolean("hbase.ipc.server.reservoir.enabled", true)) {
+ this.reservoir = new BoundedByteBufferPool(
+ conf.getInt("hbase.ipc.server.reservoir.max.buffer.size", 1024 * 1024),
+ conf.getInt("hbase.ipc.server.reservoir.initial.buffer.size", 16 * 1024),
+ // Make the max twice the number of handlers to be safe.
+ conf.getInt("hbase.ipc.server.reservoir.initial.max",
+ conf.getInt(HConstants.REGION_SERVER_HANDLER_COUNT,
+ HConstants.DEFAULT_REGION_SERVER_HANDLER_COUNT) * 2));
+ } else {
+ reservoir = null;
+ }
this.server = server;
this.services = services;
this.bindAddress = bindAddress;