From 60e19f60a9767db6b145cf9884d2295412baffe0 Mon Sep 17 00:00:00 2001 From: Apekshit Date: Tue, 10 May 2016 19:11:51 -0700 Subject: [PATCH] HBASE-13532 Make UnknownScannerException less scary by giving more information in the exception string. (Apekshit) Signed-off-by: Matteo Bertozzi --- .../apache/hadoop/hbase/regionserver/RSRpcServices.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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 589c4ed4e74..95ab36dfec0 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 @@ -2542,9 +2542,14 @@ public class RSRpcServices implements HBaseRPCErrorHandler, if (request.hasScannerId()) { rsh = scanners.get(scannerName); if (rsh == null) { - LOG.info("Client tried to access missing scanner " + scannerName); + LOG.warn("Client tried to access missing scanner " + scannerName); throw new UnknownScannerException( - "Name: " + scannerName + ", already closed?"); + "Unknown scanner '" + scannerName + "'. This can happen due to any of the following " + + "reasons: a) Scanner id given is wrong, b) Scanner lease expired because of " + + "long wait between consecutive client checkins, c) Server may be closing down, " + + "d) RegionServer restart during upgrade.\nIf the issue is due to reason (b), a " + + "possible fix would be increasing the value of" + + "'hbase.client.scanner.timeout.period' configuration."); } scanner = rsh.s; HRegionInfo hri = scanner.getRegionInfo();