diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/LocalHBaseCluster.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/LocalHBaseCluster.java index 7da8e6859c9..da3877592f0 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/LocalHBaseCluster.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/LocalHBaseCluster.java @@ -143,6 +143,9 @@ 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"); @@ -195,6 +198,7 @@ public class LocalHBaseCluster { throws IOException, InterruptedException { return user.runAs( new PrivilegedExceptionAction() { + @Override public JVMClusterUtil.RegionServerThread run() throws Exception { return addRegionServer(config, index); } @@ -227,6 +231,7 @@ public class LocalHBaseCluster { throws IOException, InterruptedException { return user.runAs( new PrivilegedExceptionAction() { + @Override public JVMClusterUtil.MasterThread run() throws Exception { return addMaster(c, index); }