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 3bd9220f0c
commit c1ada0a373
2 changed files with 4 additions and 4 deletions

View File

@ -144,9 +144,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");
@ -450,4 +447,4 @@ public class LocalHBaseCluster {
connection.close();
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();