diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/RegionMover.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/RegionMover.java index fdd079e1348..0107196e5d7 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/RegionMover.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/RegionMover.java @@ -421,6 +421,12 @@ public class RegionMover extends AbstractHBaseTool implements Closeable { .keySet()); // Remove the host Region server from target Region Servers list ServerName server = stripServer(regionServers, hostname, port); + if (server == null) { + LOG.info("Could not find server '{}:{}' in the set of region servers. giving up.", + hostname, port); + LOG.debug("List of region servers: {}", regionServers); + return false; + } // Remove RS present in the exclude file stripExcludes(regionServers); stripMaster(regionServers);