HBASE-14545 TestMasterFailover often times out

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

View File

@ -144,7 +144,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

@ -167,10 +167,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);
}
/**