hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmhs...@apache.org
Subject [33/50] [abbrv] hbase git commit: HBASE-15070 DistributedHBaseCluster#restoreRegionServers() starts new RS process on master server (Samir Ahmic)
Date Thu, 14 Jan 2016 17:08:47 GMT
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/trunk
Commit: 3d3677932a4ec98c12121c879ac5e2ea71925ea5
Parents: 5266b07
Author: tedyu <yuzhihong@gmail.com>
Authored: Thu Jan 7 09:14:00 2016 -0800
Committer: tedyu <yuzhihong@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);
         }


Mime
View raw message