hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mberto...@apache.org
Subject [2/3] hbase git commit: HBASE-16815 Low scan ratio in RPC queue tuning triggers divide by zero exception
Date Sat, 22 Oct 2016 00:07:29 GMT
HBASE-16815 Low scan ratio in RPC queue tuning triggers divide by zero exception

Signed-off-by: Matteo Bertozzi <matteo.bertozzi@cloudera.com>


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/e395bf91
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/e395bf91
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/e395bf91

Branch: refs/heads/branch-1
Commit: e395bf91dbafc7d892966122972e70c5446f3a09
Parents: 9fda0dd
Author: Guanghao Zhang <zghaobac@gmail.com>
Authored: Fri Oct 14 18:29:25 2016 +0800
Committer: Matteo Bertozzi <matteo.bertozzi@cloudera.com>
Committed: Fri Oct 21 17:00:24 2016 -0700

----------------------------------------------------------------------
 .../apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java  | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/e395bf91/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java
index 68e7b65..7ca9196 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java
@@ -145,17 +145,16 @@ public class RWQueueRpcExecutor extends RpcExecutor {
     this.scanBalancer = numScanQueues > 0 ? getBalancer(numScanQueues) : null;
 
     queues = new ArrayList<BlockingQueue<CallRunner>>(numWriteQueues + numReadQueues
+ numScanQueues);
-    LOG.debug(name + " writeQueues=" + numWriteQueues + " writeHandlers=" + writeHandlersCount
+
-              " readQueues=" + numReadQueues + " readHandlers=" + readHandlersCount +
-              ((numScanQueues == 0) ? "" : " scanQueues=" + numScanQueues +
-                " scanHandlers=" + scanHandlersCount));
+    LOG.info(name + " writeQueues=" + numWriteQueues + " writeHandlers=" + writeHandlersCount
+        + " readQueues=" + numReadQueues + " readHandlers=" + readHandlersCount + " scanQueues="
+        + numScanQueues + " scanHandlers=" + scanHandlersCount);
+
     if (writeQueueInitArgs.length > 0) {
       currentQueueLimit = (int) writeQueueInitArgs[0];
       writeQueueInitArgs[0] = Math.max((int) writeQueueInitArgs[0],
         DEFAULT_CALL_QUEUE_SIZE_HARD_LIMIT);
     }
     for (int i = 0; i < numWriteQueues; ++i) {
-
       queues.add((BlockingQueue<CallRunner>)
         ReflectionUtils.newInstance(writeQueueClass, writeQueueInitArgs));
     }
@@ -175,8 +174,10 @@ public class RWQueueRpcExecutor extends RpcExecutor {
   protected void startHandlers(final int port) {
     startHandlers(".write", writeHandlersCount, queues, 0, numWriteQueues, port);
     startHandlers(".read", readHandlersCount, queues, numWriteQueues, numReadQueues, port);
-    startHandlers(".scan", scanHandlersCount, queues,
-                  numWriteQueues + numReadQueues, numScanQueues, port);
+    if (numScanQueues > 0) {
+      startHandlers(".scan", scanHandlersCount, queues, numWriteQueues + numReadQueues,
+        numScanQueues, port);
+    }
   }
 
   @Override


Mime
View raw message