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 ffa3785d0e
commit 9bf5bc1986
1 changed files with 1 additions and 1 deletions

View File

@ -2808,10 +2808,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);
}