HBASE-15824 LocalHBaseCluster gets bind exception in master info port - ADDENDUM

This commit is contained in:
Enis Soztutar 2016-05-18 11:36:10 -07:00
parent 0078522549
commit 49359a4ee3
2 changed files with 4 additions and 4 deletions

View File

@ -143,9 +143,6 @@ public class LocalHBaseCluster {
// Always have masters and regionservers come up on port '0' so we don't
// clash over default ports.
conf.set(HConstants.MASTER_PORT, "0");
if (conf.getInt(HConstants.MASTER_INFO_PORT, 0) != -1) {
conf.set(HConstants.MASTER_INFO_PORT, "0");
}
conf.set(HConstants.REGIONSERVER_PORT, "0");
if (conf.getInt(HConstants.REGIONSERVER_INFO_PORT, 0) != -1) {
conf.set(HConstants.REGIONSERVER_INFO_PORT, "0");
@ -447,4 +444,4 @@ public class LocalHBaseCluster {
}
cluster.shutdown();
}
}
}

View File

@ -86,6 +86,9 @@ public class MiniHBaseCluster extends HBaseCluster {
throws IOException, InterruptedException {
super(conf);
conf.set(HConstants.MASTER_PORT, "0");
if (conf.getInt(HConstants.MASTER_INFO_PORT, 0) != -1) {
conf.set(HConstants.MASTER_INFO_PORT, "0");
}
// Hadoop 2
CompatibilityFactory.getInstance(MetricsAssertHelper.class).init();