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:
parent
5895631634
commit
c833473619
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue