Index: src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java =================================================================== --- src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java (revision 1138630) +++ src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java (working copy) @@ -1611,7 +1611,8 @@ @Override @QosPriority(priority=HIGH_QOS) public HRegionInfo getRegionInfo(final byte[] regionName) - throws NotServingRegionException { + throws NotServingRegionException, IOException { + checkOpen(); requestCount.incrementAndGet(); return getRegion(regionName).getRegionInfo(); } @@ -1927,9 +1928,9 @@ public int delete(final byte[] regionName, final List deletes) throws IOException { + checkOpen(); // Count of Deletes processed. int i = 0; - checkOpen(); HRegion region = null; try { boolean writeToWAL = true; @@ -2050,6 +2051,7 @@ @Override public void bulkLoadHFile(String hfilePath, byte[] regionName, byte[] familyName) throws IOException { + checkOpen(); HRegion region = getRegion(regionName); region.bulkLoadHFile(hfilePath, familyName); } @@ -2165,6 +2167,7 @@ @QosPriority(priority=HIGH_QOS) public void flushRegion(HRegionInfo regionInfo) throws NotServingRegionException, IOException { + checkOpen(); LOG.info("Flushing " + regionInfo.getRegionNameAsString()); HRegion region = getRegion(regionInfo.getRegionName()); region.flushcache(); @@ -2180,6 +2183,7 @@ @Override public void splitRegion(HRegionInfo regionInfo, byte[] splitPoint) throws NotServingRegionException, IOException { + checkOpen(); HRegion region = getRegion(regionInfo.getRegionName()); region.flushcache(); region.forceSplit(splitPoint); @@ -2194,6 +2198,7 @@ @QosPriority(priority=HIGH_QOS) public void compactRegion(HRegionInfo regionInfo, boolean major) throws NotServingRegionException, IOException { + checkOpen(); HRegion region = getRegion(regionInfo.getRegionName()); compactSplitThread.requestCompaction(region, major, "User-triggered " + (major ? "major " : "") + "compaction", @@ -2496,13 +2501,14 @@ @Override @QosPriority(priority=HIGH_QOS) public HServerInfo getHServerInfo() throws IOException { + checkOpen(); return serverInfo; } @SuppressWarnings("unchecked") @Override public MultiResponse multi(MultiAction multi) throws IOException { - + checkOpen(); MultiResponse response = new MultiResponse(); for (Map.Entry> e : multi.actions.entrySet()) { @@ -2597,6 +2603,7 @@ */ @Override public MultiPutResponse multiPut(MultiPut puts) throws IOException { + checkOpen(); MultiPutResponse resp = new MultiPutResponse(); // do each region as it's own. @@ -2698,6 +2705,7 @@ @Override public void replicateLogEntries(final HLog.Entry[] entries) throws IOException { + checkOpen(); if (this.replicationHandler == null) return; this.replicationHandler.replicateLogEntries(entries); }