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 b1abb77..0759383 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 @@ -48,6 +48,7 @@ import org.apache.hadoop.hbase.Server; import org.apache.hadoop.hbase.conf.ConfigurationObserver; import org.apache.hadoop.hbase.exceptions.RequestTooBigException; import org.apache.hadoop.hbase.io.ByteBufferPool; +import org.apache.hadoop.hbase.master.MasterServices; import org.apache.hadoop.hbase.monitoring.MonitoredRPCHandler; import org.apache.hadoop.hbase.monitoring.TaskMonitor; import org.apache.hadoop.hbase.nio.ByteBuff; @@ -87,6 +88,9 @@ import org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.ConnectionHea @InterfaceStability.Evolving public abstract class RpcServer implements RpcServerInterface, ConfigurationObserver { + private static final String HM_RESERVOIR_ENABLED_KEY = + "hbase.master.ipc.server.reservoir.enabled"; + private static final String RESERVOIR_ENABLED_KEY = "hbase.ipc.server.reservoir.enabled"; // LOG is being used in CallRunner and the log level is being changed in tests public static final Log LOG = LogFactory.getLog(RpcServer.class); protected static final CallQueueTooBigException CALL_QUEUE_TOO_BIG_EXCEPTION @@ -261,7 +265,14 @@ public abstract class RpcServer implements RpcServerInterface, final InetSocketAddress bindAddress, Configuration conf, RpcScheduler scheduler) throws IOException { - if (conf.getBoolean("hbase.ipc.server.reservoir.enabled", true)) { + boolean reservoirEnabled; + if (server instanceof MasterServices) { + // At HM side, lets turn OFF the ByteBufferPool by default. + reservoirEnabled = conf.getBoolean(HM_RESERVOIR_ENABLED_KEY, false); + } else { + reservoirEnabled = conf.getBoolean(RESERVOIR_ENABLED_KEY, true); + } + if (reservoirEnabled) { int poolBufSize = conf.getInt(ByteBufferPool.BUFFER_SIZE_KEY, ByteBufferPool.DEFAULT_BUFFER_SIZE); // The max number of buffers to be pooled in the ByteBufferPool. The default value been