From 92f415976e2fb65002b793d44fcb48db8cdd4265 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 dc31298b5cc..4b4a378187f 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 @@ -2423,9 +2423,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();