You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by te...@apache.org on 2016/01/07 18:14:08 UTC
hbase git commit: HBASE-15070
DistributedHBaseCluster#restoreRegionServers() starts new RS process on
master server (Samir Ahmic)
Repository: hbase
Updated Branches:
refs/heads/master 5266b0770 -> 3d3677932
HBASE-15070 DistributedHBaseCluster#restoreRegionServers() starts new RS process on master server (Samir Ahmic)
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/3d367793
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/3d367793
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/3d367793
Branch: refs/heads/master
Commit: 3d3677932a4ec98c12121c879ac5e2ea71925ea5
Parents: 5266b07
Author: tedyu <yu...@gmail.com>
Authored: Thu Jan 7 09:14:00 2016 -0800
Committer: tedyu <yu...@gmail.com>
Committed: Thu Jan 7 09:14:00 2016 -0800
----------------------------------------------------------------------
.../org/apache/hadoop/hbase/DistributedHBaseCluster.java | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/3d367793/hbase-it/src/test/java/org/apache/hadoop/hbase/DistributedHBaseCluster.java
----------------------------------------------------------------------
diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/DistributedHBaseCluster.java b/hbase-it/src/test/java/org/apache/hadoop/hbase/DistributedHBaseCluster.java
index 62f5c66..6f3baa0 100644
--- a/hbase-it/src/test/java/org/apache/hadoop/hbase/DistributedHBaseCluster.java
+++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/DistributedHBaseCluster.java
@@ -433,6 +433,8 @@ public class DistributedHBaseCluster extends HBaseCluster {
Set<ServerName> toKill = new TreeSet<ServerName>(new ServerNameIgnoreStartCodeComparator());
toStart.addAll(initial.getServers());
toKill.addAll(current.getServers());
+
+ ServerName master = initial.getMaster();
for (ServerName server : current.getServers()) {
toStart.remove(server);
@@ -447,7 +449,8 @@ public class DistributedHBaseCluster extends HBaseCluster {
try {
if (!clusterManager.isRunning(ServiceType.HBASE_REGIONSERVER,
sn.getHostname(),
- sn.getPort())) {
+ sn.getPort())
+ && master.getPort() != sn.getPort()) {
LOG.info("Restoring cluster - starting initial region server: " + sn.getHostAndPort());
startRegionServer(sn.getHostname(), sn.getPort());
}
@@ -460,7 +463,8 @@ public class DistributedHBaseCluster extends HBaseCluster {
try {
if (clusterManager.isRunning(ServiceType.HBASE_REGIONSERVER,
sn.getHostname(),
- sn.getPort())) {
+ sn.getPort())
+ && master.getPort() != sn.getPort()){
LOG.info("Restoring cluster - stopping initial region server: " + sn.getHostAndPort());
stopRegionServer(sn);
}