You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2016/06/20 07:34:19 UTC
hbase git commit: HBASE-16023 Fastpath for the FIFO rpcscheduler
AMENDMENT
Repository: hbase
Updated Branches:
refs/heads/branch-1.3 995d9a408 -> 6c519f362
HBASE-16023 Fastpath for the FIFO rpcscheduler AMENDMENT
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/6c519f36
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/6c519f36
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/6c519f36
Branch: refs/heads/branch-1.3
Commit: 6c519f36210f9f917e8cf40c96223cac755bb272
Parents: 995d9a4
Author: stack <st...@apache.org>
Authored: Mon Jun 20 08:28:39 2016 +0100
Committer: stack <st...@apache.org>
Committed: Mon Jun 20 08:34:10 2016 +0100
----------------------------------------------------------------------
.../hbase/ipc/FifoWithFastPathBalancedQueueRpcExecutor.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/6c519f36/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/FifoWithFastPathBalancedQueueRpcExecutor.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/FifoWithFastPathBalancedQueueRpcExecutor.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/FifoWithFastPathBalancedQueueRpcExecutor.java
index 1951dd0..1a362bc 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/FifoWithFastPathBalancedQueueRpcExecutor.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/FifoWithFastPathBalancedQueueRpcExecutor.java
@@ -74,7 +74,7 @@ public class FifoWithFastPathBalancedQueueRpcExecutor extends BalancedQueueRpcEx
// if an empty queue of CallRunners so we are available for direct handoff when one comes in.
final Deque<FastPathHandler> fastPathHandlerStack;
// Semaphore to coordinate loading of fastpathed loadedTask and our running it.
- private Semaphore semaphore = new Semaphore(1);
+ private Semaphore semaphore = new Semaphore(0);
// The task we get when fast-pathing.
private CallRunner loadedCallRunner;
@@ -82,7 +82,6 @@ public class FifoWithFastPathBalancedQueueRpcExecutor extends BalancedQueueRpcEx
final Deque<FastPathHandler> fastPathHandlerStack) {
super(name, handlerFailureThreshhold, q);
this.fastPathHandlerStack = fastPathHandlerStack;
- this.semaphore.drainPermits();
}
protected CallRunner getCallRunner() throws InterruptedException {
@@ -95,6 +94,7 @@ public class FifoWithFastPathBalancedQueueRpcExecutor extends BalancedQueueRpcEx
this.fastPathHandlerStack.push(this);
this.semaphore.acquire();
cr = this.loadedCallRunner;
+ this.loadedCallRunner = null;
} else {
// No fastpath available. Block until a task comes available.
cr = super.getCallRunner();
@@ -113,4 +113,4 @@ public class FifoWithFastPathBalancedQueueRpcExecutor extends BalancedQueueRpcEx
return true;
}
}
-}
\ No newline at end of file
+}