HBASE-14545 TestMasterFailover often times out

This commit is contained in:
stack 2015-10-03 13:31:43 -07:00
parent a545d71295
commit c5a9895ada
2 changed files with 5 additions and 3 deletions

View File

@ -145,7 +145,9 @@ public class LocalHBaseCluster {
// clash over default ports.
conf.set(HConstants.MASTER_PORT, "0");
conf.set(HConstants.REGIONSERVER_PORT, "0");
conf.set(HConstants.REGIONSERVER_INFO_PORT, "0");
if (conf.getInt(HConstants.REGIONSERVER_INFO_PORT, 0) != -1) {
conf.set(HConstants.REGIONSERVER_INFO_PORT, "0");
}
this.masterClass = (Class<? extends HMaster>)
conf.getClass(HConstants.MASTER_IMPL, masterClass);

View File

@ -161,10 +161,10 @@ public class RegionStates {
}
/**
* @return an unmodifiable the region assignment map
* @return a copy of the region assignment map
*/
public synchronized Map<HRegionInfo, ServerName> getRegionAssignments() {
return Collections.unmodifiableMap(regionAssignments);
return new TreeMap<HRegionInfo, ServerName>(regionAssignments);
}
/**