hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ser...@apache.org
Subject svn commit: r1502417 - in /hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase: DistributedHBaseCluster.java HBaseTestingUtility.java
Date Fri, 12 Jul 2013 03:25:07 GMT
Author: sershe
Date: Fri Jul 12 03:25:07 2013
New Revision: 1502417

URL: http://svn.apache.org/r1502417
Log:
HBASE-7770 minor integration test framework fixes (Francis Liu)

Modified:
    hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/DistributedHBaseCluster.java
    hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java

Modified: hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/DistributedHBaseCluster.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/DistributedHBaseCluster.java?rev=1502417&r1=1502416&r2=1502417&view=diff
==============================================================================
--- hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/DistributedHBaseCluster.java
(original)
+++ hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/DistributedHBaseCluster.java
Fri Jul 12 03:25:07 2013
@@ -225,7 +225,9 @@ public class DistributedHBaseCluster ext
       //start backup masters
       for (ServerName backup : initial.getBackupMasters()) {
         //these are not started in backup mode, but we should already have an active master
-        startMaster(backup.getHostname());
+        if(!clusterManager.isRunning(ServiceType.HBASE_MASTER, backup.getHostname())) {
+          startMaster(backup.getHostname());
+        }
       }
     } else {
       //current master has not changed, match up backup masters
@@ -240,11 +242,15 @@ public class DistributedHBaseCluster ext
       }
 
       for (String hostname : Sets.difference(initialBackups.keySet(), currentBackups.keySet()))
{
-        startMaster(hostname);
+        if(!clusterManager.isRunning(ServiceType.HBASE_MASTER, hostname)) {
+          startMaster(hostname);
+        }
       }
 
       for (String hostname : Sets.difference(currentBackups.keySet(), initialBackups.keySet()))
{
-        stopMaster(currentBackups.get(hostname));
+        if(clusterManager.isRunning(ServiceType.HBASE_MASTER, hostname)) {
+          stopMaster(currentBackups.get(hostname));
+        }
       }
     }
 
@@ -260,11 +266,15 @@ public class DistributedHBaseCluster ext
     }
 
     for (String hostname : Sets.difference(initialServers.keySet(), currentServers.keySet()))
{
-      startRegionServer(hostname);
+      if(!clusterManager.isRunning(ServiceType.HBASE_REGIONSERVER, hostname)) {
+        startRegionServer(hostname);
+      }
     }
 
     for (String hostname : Sets.difference(currentServers.keySet(), initialServers.keySet()))
{
-      stopRegionServer(currentServers.get(hostname));
+      if(clusterManager.isRunning(ServiceType.HBASE_REGIONSERVER, hostname)) {
+        stopRegionServer(currentServers.get(hostname));
+      }
     }
   }
 }

Modified: hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java?rev=1502417&r1=1502416&r2=1502417&view=diff
==============================================================================
--- hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java (original)
+++ hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java Fri
Jul 12 03:25:07 2013
@@ -1266,7 +1266,7 @@ public class HBaseTestingUtility {
       Path tableDir = new Path(getDefaultRootDirPath().toString()
           + System.getProperty("file.separator") + htd.getNameAsString()
           + System.getProperty("file.separator") + regionToDeleteInFS);
-      getDFSCluster().getFileSystem().delete(tableDir);
+      FileSystem.get(c).delete(tableDir);
     }
     // flush cache of regions
     HConnection conn = table.getConnection();



Mime
View raw message