From caf235d34ddf78839a529f02e4abc3f8aae6b2c5 Mon Sep 17 00:00:00 2001 From: Michael Stack Date: Sun, 19 Dec 2010 05:25:53 +0000 Subject: [PATCH] Missing piece of HBASE-3368 Split message can come in before region opened message; results in 'Region has been PENDING_CLOSE for too long' cycle git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1050760 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/hadoop/hbase/master/CatalogJanitor.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/apache/hadoop/hbase/master/CatalogJanitor.java b/src/main/java/org/apache/hadoop/hbase/master/CatalogJanitor.java index 3ec27310f98..da4e1b8ae4e 100644 --- a/src/main/java/org/apache/hadoop/hbase/master/CatalogJanitor.java +++ b/src/main/java/org/apache/hadoop/hbase/master/CatalogJanitor.java @@ -162,7 +162,11 @@ class CatalogJanitor extends Chore { " because daughter splits no longer hold references"); // This latter regionOffline should not be necessary but is done for now // until we let go of regionserver to master heartbeats. See HBASE-3368. - this.services.getAssignmentManager().regionOffline(parent); + if (this.services.getAssignmentManager() != null) { + // The mock used in testing catalogjanitor returns null for getAssignmnetManager. + // Allow for null result out of getAssignmentManager. + this.services.getAssignmentManager().regionOffline(parent); + } FileSystem fs = this.services.getMasterFileSystem().getFileSystem(); Path rootdir = this.services.getMasterFileSystem().getRootDir(); HRegion.deleteRegion(fs, rootdir, parent);