From 7aa3a2d890359f41af773815ccd11b6b3640138b Mon Sep 17 00:00:00 2001 From: Jimmy Xiang Date: Wed, 8 Oct 2014 09:26:13 -0700 Subject: [PATCH] HBASE-12206 NPE in RSRpcServices --- .../hadoop/hbase/regionserver/RSRpcServices.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 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 18aa8aab1d6..804ff182b1b 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 @@ -1953,11 +1953,14 @@ public class RSRpcServices implements HBaseRPCErrorHandler, // If checkOpen failed, server not running or filesystem gone, // cancel this lease; filesystem is gone or we're closing or something. if (scannerName != null) { - try { - regionServer.leases.cancelLease(scannerName); - } catch (LeaseException le) { - LOG.info("Server shutting down and client tried to access missing scanner " + - scannerName); + LOG.debug("Server shutting down and client tried to access missing scanner " + + scannerName); + if (regionServer.leases != null) { + try { + regionServer.leases.cancelLease(scannerName); + } catch (LeaseException le) { + // No problem, ignore + } } } throw e;