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

Signed-off-by: Chia-Ping Tsai <chia7712@gmail.com>
This commit is contained in:
Yechao Chen 2017-09-14 16:53:35 +08:00 committed by Chia-Ping Tsai
parent fb3c8bf608
commit 5c07dba43a
2 changed files with 5 additions and 7 deletions

View File

@ -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() {

View File

@ -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();