diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ScannerCallable.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ScannerCallable.java index 3f25fcb91dc..3c6b36a40df 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ScannerCallable.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ScannerCallable.java @@ -146,6 +146,7 @@ public class ScannerCallable extends RegionServerCallable { /** * @see java.util.concurrent.Callable#call() */ + @SuppressWarnings("deprecation") public Result [] call() throws IOException { if (closed) { if (scannerId != -1) { @@ -199,7 +200,8 @@ public class ScannerCallable extends RegionServerCallable { updateResultsMetrics(rrs); } catch (IOException e) { if (logScannerActivity) { - LOG.info("Got exception making request " + TextFormat.shortDebugString(request), e); + LOG.info("Got exception making request " + TextFormat.shortDebugString(request) + + " to " + getLocation(), e); } IOException ioe = e; if (e instanceof RemoteException) { diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java index d746c79334c..8dd38276cc3 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java @@ -2707,8 +2707,7 @@ public class HRegionServer implements ClientProtos.ClientService.BlockingInterfa protected long addScanner(RegionScanner s) throws LeaseStillHeldException { long scannerId = -1; while (true) { - scannerId = rand.nextLong(); - if (scannerId == -1) continue; + scannerId = Math.abs(rand.nextLong() << 24) ^ startcode; String scannerName = String.valueOf(scannerId); RegionScannerHolder existing = scanners.putIfAbsent(scannerName, new RegionScannerHolder(s)); if (existing == null) {