hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chia7...@apache.org
Subject hbase git commit: HBASE-18772 (Addendum) we pass the wrong arguments to AdaptiveLifoCoDelCallQueue
Date Fri, 15 Sep 2017 02:33:41 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-2 9cccf3125 -> 848e9d5ab


HBASE-18772 (Addendum) we pass the wrong arguments to AdaptiveLifoCoDelCallQueue

Signed-off-by: Chia-Ping Tsai <chia7712@gmail.com>


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

Branch: refs/heads/branch-2
Commit: 848e9d5abc9974a01bf1e7b3cc2697aa74f6440d
Parents: 9cccf31
Author: Yechao Chen <chenyechao@gmail.com>
Authored: Thu Sep 14 16:53:35 2017 +0800
Committer: Chia-Ping Tsai <chia7712@gmail.com>
Committed: Fri Sep 15 10:32:32 2017 +0800

----------------------------------------------------------------------
 .../java/org/apache/hadoop/hbase/ipc/RpcExecutor.java     | 10 +++++-----
 .../apache/hadoop/hbase/ipc/TestSimpleRpcScheduler.java   |  2 --
 2 files changed, 5 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/848e9d5a/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 3971fb3..5c017305 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
@@ -26,7 +26,7 @@ import java.util.concurrent.BlockingQueue;
 import java.util.concurrent.LinkedBlockingQueue;
 import java.util.concurrent.ThreadLocalRandom;
 import java.util.concurrent.atomic.AtomicInteger;
-import java.util.concurrent.atomic.AtomicLong;
+import java.util.concurrent.atomic.LongAdder;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -76,8 +76,8 @@ public abstract class RpcExecutor {
   public static final int CALL_QUEUE_CODEL_DEFAULT_INTERVAL = 100;
   public static final double CALL_QUEUE_CODEL_DEFAULT_LIFO_THRESHOLD = 0.8;
 
-  private AtomicLong numGeneralCallsDropped = new AtomicLong();
-  private AtomicLong numLifoModeSwitches = new AtomicLong();
+  private LongAdder numGeneralCallsDropped = new LongAdder();
+  private LongAdder numLifoModeSwitches = new LongAdder();
 
   protected final int numCallQueues;
   protected final List<BlockingQueue<CallRunner>> queues;
@@ -385,11 +385,11 @@ public abstract class RpcExecutor {
   }
 
   public long getNumGeneralCallsDropped() {
-    return numGeneralCallsDropped.get();
+    return numGeneralCallsDropped.longValue();
   }
 
   public long getNumLifoModeSwitches() {
-    return numLifoModeSwitches.get();
+    return numLifoModeSwitches.longValue();
   }
 
   public int getActiveHandlerCount() {

http://git-wip-us.apache.org/repos/asf/hbase/blob/848e9d5a/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 90d5772..b4f93c5 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
@@ -67,7 +67,6 @@ import org.apache.hadoop.hbase.util.EnvironmentEdge;
 import org.apache.hadoop.hbase.util.EnvironmentEdgeManager;
 import org.apache.hadoop.hbase.util.Threads;
 import org.junit.Before;
-import org.junit.Ignore;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
@@ -431,7 +430,6 @@ public class TestSimpleRpcScheduler {
   // fastpath thread to: new FastPathBalancedQueueRpcExecutor("CodelFPBQ.default", handlerCount,
numCallQueues...
   // Codel is hard to test. This test is going to be flakey given it all timer-based. Disabling
for now till chat
   // with authors.
-  @Ignore
   @Test
   public void testCoDelScheduling() throws Exception {
     CoDelEnvironmentEdge envEdge = new CoDelEnvironmentEdge();


Mime
View raw message