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.
This commit is contained in:
Andrew Purtell 2017-05-11 14:34:04 -07:00
parent 5895631634
commit c833473619
1 changed files with 1 additions and 1 deletions

View File

@ -3058,10 +3058,10 @@ public class RSRpcServices implements HBaseRPCErrorHandler,
ScanResponse.Builder builder = ScanResponse.newBuilder(); ScanResponse.Builder builder = ScanResponse.newBuilder();
try { try {
if (request.hasScannerId()) { if (request.hasScannerId()) {
rsh = getRegionScanner(request);
// The downstream projects such as AsyncHBase in OpenTSDB need this value. See HBASE-18000 // The downstream projects such as AsyncHBase in OpenTSDB need this value. See HBASE-18000
// for more details. // for more details.
builder.setScannerId(request.getScannerId()); builder.setScannerId(request.getScannerId());
rsh = getRegionScanner(request);
} else { } else {
rsh = newRegionScanner(request, builder); rsh = newRegionScanner(request, builder);
} }