You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by se...@apache.org on 2013/07/12 05:23:03 UTC
svn commit: r1502415 - in /hbase/trunk:
hbase-it/src/test/java/org/apache/hadoop/hbase/DistributedHBaseCluster.java
hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
Author: sershe
Date: Fri Jul 12 03:23:02 2013
New Revision: 1502415
URL: http://svn.apache.org/r1502415
Log:
HBASE-7770 minor integration test framework fixes (Francis Liu)
Modified:
hbase/trunk/hbase-it/src/test/java/org/apache/hadoop/hbase/DistributedHBaseCluster.java
hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
Modified: hbase/trunk/hbase-it/src/test/java/org/apache/hadoop/hbase/DistributedHBaseCluster.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-it/src/test/java/org/apache/hadoop/hbase/DistributedHBaseCluster.java?rev=1502415&r1=1502414&r2=1502415&view=diff
==============================================================================
--- hbase/trunk/hbase-it/src/test/java/org/apache/hadoop/hbase/DistributedHBaseCluster.java (original)
+++ hbase/trunk/hbase-it/src/test/java/org/apache/hadoop/hbase/DistributedHBaseCluster.java Fri Jul 12 03:23:02 2013
@@ -255,7 +255,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
@@ -270,11 +272,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));
+ }
}
}
@@ -290,11 +296,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/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java?rev=1502415&r1=1502414&r2=1502415&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java (original)
+++ hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java Fri Jul 12 03:23:02 2013
@@ -1532,7 +1532,7 @@ public class HBaseTestingUtility extends
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();
conn.clearRegionCache();