Repository: hbase Updated Branches: refs/heads/master 4421fdf98 -> 01684c341
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/01684c34 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/01684c34 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/01684c34 Branch: refs/heads/master Commit: 01684c3417861350a0c82cd2faba039f65ca7a79 Parents: 4421fdf Author: stack <[email protected]> Authored: Mon Jun 20 08:28:39 2016 +0100 Committer: stack <[email protected]> Committed: Mon Jun 20 08:34:32 2016 +0100 ---------------------------------------------------------------------- .../hbase/ipc/FifoWithFastPathBalancedQueueRpcExecutor.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/01684c34/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 +}
