From d88ee0447ad755695a740016ad862bbe444c3462 Mon Sep 17 00:00:00 2001 From: Jeongdae Kim Date: Fri, 19 Jul 2019 16:51:34 +0900 Subject: [PATCH] HBASE-22715 All scan requests should be handled by scan handler threads in RWQueueRpcExecutor (#393) Signed-off-by: Andrew Purtell Conflicts: hbase-server/src/test/java/org/apache/hadoop/hbase/ipc/TestSimpleRpcScheduler.java --- .../org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java | 7 +------ .../apache/hadoop/hbase/ipc/TestSimpleRpcScheduler.java | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java index 7187a711953..3ce5f0e1c01 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java @@ -229,12 +229,7 @@ public class RWQueueRpcExecutor extends RpcExecutor { } private boolean isScanRequest(final RequestHeader header, final Message param) { - if (param instanceof ScanRequest) { - // The first scan request will be executed as a "short read" - ScanRequest request = (ScanRequest)param; - return request.hasScannerId(); - } - return false; + return param instanceof ScanRequest; } /* 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 a0b3b5407e1..6b6a99548eb 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 @@ -362,7 +362,7 @@ public class TestSimpleRpcScheduler { CallRunner scanCallTask = mock(CallRunner.class); ServerCall scanCall = mock(ServerCall.class); - scanCall.param = ScanRequest.newBuilder().setScannerId(1).build(); + scanCall.param = ScanRequest.newBuilder().build(); RequestHeader scanHead = RequestHeader.newBuilder().setMethodName("scan").build(); when(scanCallTask.getRpcCall()).thenReturn(scanCall); when(scanCall.getHeader()).thenReturn(scanHead);