diff --git a/hbase-client/src/test/resources/hbase-site.xml b/hbase-client/src/test/resources/hbase-site.xml
index 99d2ab8d1fb..858d4285cf0 100644
--- a/hbase-client/src/test/resources/hbase-site.xml
+++ b/hbase-client/src/test/resources/hbase-site.xml
@@ -29,4 +29,11 @@
hbase.hconnection.threads.keepalivetime
3
+
+ hbase.localcluster.assign.random.ports
+ true
+
+ Assign random ports to master and RS info server (UI).
+
+
diff --git a/hbase-mapreduce/src/test/resources/hbase-site.xml b/hbase-mapreduce/src/test/resources/hbase-site.xml
index 64a19644358..34802d0e9c1 100644
--- a/hbase-mapreduce/src/test/resources/hbase-site.xml
+++ b/hbase-mapreduce/src/test/resources/hbase-site.xml
@@ -158,4 +158,11 @@
hbase.hconnection.threads.keepalivetime
3
+
+ hbase.localcluster.assign.random.ports
+ true
+
+ Assign random ports to master and RS info server (UI).
+
+
diff --git a/hbase-procedure/src/test/resources/hbase-site.xml b/hbase-procedure/src/test/resources/hbase-site.xml
index 114ee8a23c1..a1cc27ebf16 100644
--- a/hbase-procedure/src/test/resources/hbase-site.xml
+++ b/hbase-procedure/src/test/resources/hbase-site.xml
@@ -41,4 +41,11 @@
WARNING: Doing so may expose you to additional risk of data loss!
+
+ hbase.localcluster.assign.random.ports
+ true
+
+ Assign random ports to master and RS info server (UI).
+
+
diff --git a/hbase-rest/src/test/resources/hbase-site.xml b/hbase-rest/src/test/resources/hbase-site.xml
index 2bd3ee45a42..be7b49243a4 100644
--- a/hbase-rest/src/test/resources/hbase-site.xml
+++ b/hbase-rest/src/test/resources/hbase-site.xml
@@ -139,4 +139,11 @@
Skip sanity checks in tests
+
+ hbase.localcluster.assign.random.ports
+ true
+
+ Assign random ports to master and RS info server (UI).
+
+
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 e19e53bfc51..5c8ddd9ba64 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
@@ -141,7 +141,7 @@ public class LocalHBaseCluster {
// Always have masters and regionservers come up on port '0' so we don't
// clash over default ports.
- if (conf.getBoolean(ASSIGN_RANDOM_PORTS, true)) {
+ if (conf.getBoolean(ASSIGN_RANDOM_PORTS, false)) {
conf.set(HConstants.MASTER_PORT, "0");
conf.set(HConstants.REGIONSERVER_PORT, "0");
if (conf.getInt(HConstants.REGIONSERVER_INFO_PORT, 0) != -1) {
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/MiniHBaseCluster.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/MiniHBaseCluster.java
index a6522847276..7b65371fce0 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/MiniHBaseCluster.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/MiniHBaseCluster.java
@@ -108,7 +108,7 @@ public class MiniHBaseCluster extends HBaseCluster {
Class extends MiniHBaseCluster.MiniHBaseClusterRegionServer> regionserverClass)
throws IOException, InterruptedException {
super(conf);
- if (conf.getBoolean(LocalHBaseCluster.ASSIGN_RANDOM_PORTS, true)) {
+ if (conf.getBoolean(LocalHBaseCluster.ASSIGN_RANDOM_PORTS, false)) {
conf.set(HConstants.MASTER_PORT, "0");
if (conf.getInt(HConstants.MASTER_INFO_PORT, 0) != -1) {
conf.set(HConstants.MASTER_INFO_PORT, "0");
diff --git a/hbase-server/src/test/resources/hbase-site.xml b/hbase-server/src/test/resources/hbase-site.xml
index 64a19644358..34802d0e9c1 100644
--- a/hbase-server/src/test/resources/hbase-site.xml
+++ b/hbase-server/src/test/resources/hbase-site.xml
@@ -158,4 +158,11 @@
hbase.hconnection.threads.keepalivetime
3
+
+ hbase.localcluster.assign.random.ports
+ true
+
+ Assign random ports to master and RS info server (UI).
+
+
diff --git a/hbase-shell/src/test/resources/hbase-site.xml b/hbase-shell/src/test/resources/hbase-site.xml
new file mode 100644
index 00000000000..858d4285cf0
--- /dev/null
+++ b/hbase-shell/src/test/resources/hbase-site.xml
@@ -0,0 +1,39 @@
+
+
+
+
+
+ hbase.defaults.for.version.skip
+ true
+
+
+ hbase.hconnection.threads.keepalivetime
+ 3
+
+
+ hbase.localcluster.assign.random.ports
+ true
+
+ Assign random ports to master and RS info server (UI).
+
+
+
diff --git a/hbase-thrift/src/test/resources/hbase-site.xml b/hbase-thrift/src/test/resources/hbase-site.xml
index b3fb0d90c50..b354a2b3867 100644
--- a/hbase-thrift/src/test/resources/hbase-site.xml
+++ b/hbase-thrift/src/test/resources/hbase-site.xml
@@ -154,4 +154,11 @@
Enable replay sanity checks on procedure tests.
+
+ hbase.localcluster.assign.random.ports
+ true
+
+ Assign random ports to master and RS info server (UI).
+
+