HBASE-19942 Fix flaky TestSimpleRpcScheduler

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

Branch: refs/heads/HBASE-19064
Commit: a5b86dd77ad2866b0ab3c1774738ecb15e8719c7
Parents: 380083e
Author: Guanghao Zhang <zg...@apache.org>
Authored: Tue Feb 6 17:52:05 2018 +0800
Committer: Guanghao Zhang <zg...@apache.org>
Committed: Wed Feb 7 07:54:39 2018 +0800

----------------------------------------------------------------------
 .../src/main/java/org/apache/hadoop/hbase/ipc/RpcExecutor.java | 6 +++---
 .../org/apache/hadoop/hbase/ipc/TestSimpleRpcScheduler.java    | 2 ++
 2 files changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/a5b86dd7/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcExecutor.java
----------------------------------------------------------------------
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcExecutor.java 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcExecutor.java
index 5572725..e49f576 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcExecutor.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcExecutor.java
@@ -145,9 +145,9 @@ public abstract class RpcExecutor {
       queueClass = LinkedBlockingQueue.class;
     }
 
-    LOG.info("RpcExecutor " + name + " using " + callQueueType
-        + " as call queue; numCallQueues=" + numCallQueues + "; 
maxQueueLength=" + maxQueueLength
-        + "; handlerCount=" + handlerCount);
+    LOG.info("RpcExecutor " + this.name + " using " + this.queueClass
+        + " as call queue; numCallQueues=" + this.numCallQueues + "; 
maxQueueLength="
+        + maxQueueLength + "; handlerCount=" + this.handlerCount);
   }
 
   protected int computeNumCallQueues(final int handlerCount, final float 
callQueuesHandlersFactor) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/a5b86dd7/hbase-server/src/test/java/org/apache/hadoop/hbase/ipc/TestSimpleRpcScheduler.java
----------------------------------------------------------------------
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/ipc/TestSimpleRpcScheduler.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/ipc/TestSimpleRpcScheduler.java
index 875223d..3fab7fb 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/ipc/TestSimpleRpcScheduler.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/ipc/TestSimpleRpcScheduler.java
@@ -428,6 +428,8 @@ public class TestSimpleRpcScheduler {
 
     schedConf.setInt(HConstants.REGION_SERVER_HANDLER_COUNT, 0);
     schedConf.setInt("hbase.ipc.server.max.callqueue.length", 5);
+    schedConf.set(RpcExecutor.CALL_QUEUE_TYPE_CONF_KEY,
+      RpcExecutor.CALL_QUEUE_TYPE_DEADLINE_CONF_VALUE);
 
     PriorityFunction priority = mock(PriorityFunction.class);
     when(priority.getPriority(any(), any(), 
any())).thenReturn(HConstants.NORMAL_QOS);

Reply via email to