From c833473619d5a2ff9437d62f2ea14ac772288304 Mon Sep 17 00:00:00 2001 From: Andrew Purtell Date: Thu, 11 May 2017 14:34:04 -0700 Subject: [PATCH] Amend HBASE-18000 Make sure we always return the scanner id with ScanResponse (Karan Mehta and Duo Zhang) Move getRegionScanner() call below builder.setScannerId() to handle a corner case. --- .../org/apache/hadoop/hbase/regionserver/RSRpcServices.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java index 34401f23264..95408b7f2b9 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java @@ -3058,10 +3058,10 @@ public class RSRpcServices implements HBaseRPCErrorHandler, ScanResponse.Builder builder = ScanResponse.newBuilder(); try { if (request.hasScannerId()) { - rsh = getRegionScanner(request); // The downstream projects such as AsyncHBase in OpenTSDB need this value. See HBASE-18000 // for more details. builder.setScannerId(request.getScannerId()); + rsh = getRegionScanner(request); } else { rsh = newRegionScanner(request, builder); }