hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject [2/2] hbase git commit: HBASE-16023 Fastpath for the FIFO rpcscheduler AMENDMENT
Date Mon, 20 Jun 2016 07:33:38 GMT
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/d34e6532
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/d34e6532
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/d34e6532

Branch: refs/heads/branch-1
Commit: d34e65327e77338d24ace159b0756836fd91406d
Parents: 86242e1
Author: stack <stack@apache.org>
Authored: Mon Jun 20 08:28:39 2016 +0100
Committer: stack <stack@apache.org>
Committed: Mon Jun 20 08:28:43 2016 +0100

----------------------------------------------------------------------
 .../hbase/ipc/FifoWithFastPathBalancedQueueRpcExecutor.java    | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/d34e6532/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
+}


Mime
View raw message