diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java index 78294a08fe0..de4edbbea1b 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java @@ -3220,12 +3220,16 @@ public class AssignmentManager extends ZooKeeperListener { // maybe because it crashed. PairOfSameType p = MetaTableAccessor.getMergeRegions(result); if (p.getFirst() != null && p.getSecond() != null) { - int numReplicas = server.getTableDescriptors().get(p.getFirst(). - getTable()).getRegionReplication(); - for (HRegionInfo merge : p) { - for (int i = 1; i < numReplicas; i++) { - replicasToClose.add(RegionReplicaUtil.getRegionInfoForReplica(merge, i)); + HTableDescriptor desc = server.getTableDescriptors().get(p.getFirst().getTable()); + if (desc != null) { + int numReplicas = desc.getRegionReplication(); + for (HRegionInfo merge : p) { + for (int i = 1; i < numReplicas; i++) { + replicasToClose.add(RegionReplicaUtil.getRegionInfoForReplica(merge, i)); + } } + } else { + LOG.warn("Found no table descriptor on filesystem for " + p.getFirst().getTable()); } } RegionLocations rl = MetaTableAccessor.getRegionLocations(result);