From c3a8f6c9ba4e73d87e8bf5e2b3e43b233244e5e4 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 --- .../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 ef1aec8437f..9feef2549f3 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 @@ -350,12 +350,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 347b23189a4..940f1c22762 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 @@ -291,7 +291,7 @@ public class TestSimpleRpcScheduler { CallRunner scanCallTask = mock(CallRunner.class); RpcServer.Call scanCall = mock(RpcServer.Call.class); - scanCall.param = ScanRequest.newBuilder().setScannerId(1).build(); + scanCall.param = ScanRequest.newBuilder().build(); RequestHeader scanHead = RequestHeader.newBuilder().setMethodName("scan").build(); when(scanCallTask.getCall()).thenReturn(scanCall); when(scanCall.getHeader()).thenReturn(scanHead);