HBASE-7770 minor integration test framework fixes (Francis Liu)
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1502415 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3b433ec264
commit
b5459be95d
|
@ -255,7 +255,9 @@ public class DistributedHBaseCluster extends HBaseCluster {
|
|||
//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 extends HBaseCluster {
|
|||
}
|
||||
|
||||
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 extends HBaseCluster {
|
|||
}
|
||||
|
||||
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));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1532,7 +1532,7 @@ public class HBaseTestingUtility extends HBaseCommonTestingUtility {
|
|||
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();
|
||||
|
|
Loading…
Reference in New Issue