Repository: hbase
Updated Branches:
  refs/heads/branch-2 79e4c9d92 -> 96d63fee1


HBASE-20224 Web UI is broken in standalone mode

Changes for HBASE-20027 seem to cause UI not showing up on default port in 
standalone mode. For concurrent
unit test execution, individual tests can set 
hbase.localcluster.assign.random.ports to true or modify
test/resources/hbase-site.xml.


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/96d63fee
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/96d63fee
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/96d63fee

Branch: refs/heads/branch-2
Commit: 96d63fee1172d00de94d6470fcc0e14b8401d19d
Parents: 79e4c9d
Author: Umesh Agashe <[email protected]>
Authored: Wed Mar 21 12:48:18 2018 -0700
Committer: Michael Stack <[email protected]>
Committed: Thu Mar 22 20:28:08 2018 -0700

----------------------------------------------------------------------
 hbase-client/src/test/resources/hbase-site.xml  |  7 ++++
 .../src/test/resources/hbase-site.xml           |  7 ++++
 .../src/test/resources/hbase-site.xml           |  7 ++++
 hbase-rest/src/test/resources/hbase-site.xml    |  7 ++++
 .../apache/hadoop/hbase/LocalHBaseCluster.java  |  2 +-
 .../apache/hadoop/hbase/MiniHBaseCluster.java   |  2 +-
 hbase-server/src/test/resources/hbase-site.xml  |  7 ++++
 hbase-shell/src/test/resources/hbase-site.xml   | 39 ++++++++++++++++++++
 hbase-thrift/src/test/resources/hbase-site.xml  |  7 ++++
 9 files changed, 83 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/96d63fee/hbase-client/src/test/resources/hbase-site.xml
----------------------------------------------------------------------
diff --git a/hbase-client/src/test/resources/hbase-site.xml 
b/hbase-client/src/test/resources/hbase-site.xml
index 99d2ab8..858d428 100644
--- a/hbase-client/src/test/resources/hbase-site.xml
+++ b/hbase-client/src/test/resources/hbase-site.xml
@@ -29,4 +29,11 @@
     <name>hbase.hconnection.threads.keepalivetime</name>
     <value>3</value>
   </property>
+  <property>
+    <name>hbase.localcluster.assign.random.ports</name>
+    <value>true</value>
+    <description>
+      Assign random ports to master and RS info server (UI).
+    </description>
+  </property>
 </configuration>

http://git-wip-us.apache.org/repos/asf/hbase/blob/96d63fee/hbase-mapreduce/src/test/resources/hbase-site.xml
----------------------------------------------------------------------
diff --git a/hbase-mapreduce/src/test/resources/hbase-site.xml 
b/hbase-mapreduce/src/test/resources/hbase-site.xml
index 64a1964..34802d0 100644
--- a/hbase-mapreduce/src/test/resources/hbase-site.xml
+++ b/hbase-mapreduce/src/test/resources/hbase-site.xml
@@ -158,4 +158,11 @@
     <name>hbase.hconnection.threads.keepalivetime</name>
     <value>3</value>
   </property>
+  <property>
+    <name>hbase.localcluster.assign.random.ports</name>
+    <value>true</value>
+    <description>
+      Assign random ports to master and RS info server (UI).
+    </description>
+  </property>
 </configuration>

http://git-wip-us.apache.org/repos/asf/hbase/blob/96d63fee/hbase-procedure/src/test/resources/hbase-site.xml
----------------------------------------------------------------------
diff --git a/hbase-procedure/src/test/resources/hbase-site.xml 
b/hbase-procedure/src/test/resources/hbase-site.xml
index 114ee8a..a1cc27e 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!
     </description>
   </property>
+  <property>
+    <name>hbase.localcluster.assign.random.ports</name>
+    <value>true</value>
+    <description>
+      Assign random ports to master and RS info server (UI).
+    </description>
+  </property>
 </configuration>

http://git-wip-us.apache.org/repos/asf/hbase/blob/96d63fee/hbase-rest/src/test/resources/hbase-site.xml
----------------------------------------------------------------------
diff --git a/hbase-rest/src/test/resources/hbase-site.xml 
b/hbase-rest/src/test/resources/hbase-site.xml
index 2bd3ee4..be7b492 100644
--- a/hbase-rest/src/test/resources/hbase-site.xml
+++ b/hbase-rest/src/test/resources/hbase-site.xml
@@ -139,4 +139,11 @@
     <description>Skip sanity checks in tests
     </description>
   </property>
+  <property>
+    <name>hbase.localcluster.assign.random.ports</name>
+    <value>true</value>
+    <description>
+      Assign random ports to master and RS info server (UI).
+    </description>
+  </property>
 </configuration>

http://git-wip-us.apache.org/repos/asf/hbase/blob/96d63fee/hbase-server/src/main/java/org/apache/hadoop/hbase/LocalHBaseCluster.java
----------------------------------------------------------------------
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 e19e53b..5c8ddd9 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) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/96d63fee/hbase-server/src/test/java/org/apache/hadoop/hbase/MiniHBaseCluster.java
----------------------------------------------------------------------
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 a652284..7b65371 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");

http://git-wip-us.apache.org/repos/asf/hbase/blob/96d63fee/hbase-server/src/test/resources/hbase-site.xml
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/resources/hbase-site.xml 
b/hbase-server/src/test/resources/hbase-site.xml
index 64a1964..34802d0 100644
--- a/hbase-server/src/test/resources/hbase-site.xml
+++ b/hbase-server/src/test/resources/hbase-site.xml
@@ -158,4 +158,11 @@
     <name>hbase.hconnection.threads.keepalivetime</name>
     <value>3</value>
   </property>
+  <property>
+    <name>hbase.localcluster.assign.random.ports</name>
+    <value>true</value>
+    <description>
+      Assign random ports to master and RS info server (UI).
+    </description>
+  </property>
 </configuration>

http://git-wip-us.apache.org/repos/asf/hbase/blob/96d63fee/hbase-shell/src/test/resources/hbase-site.xml
----------------------------------------------------------------------
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 0000000..858d428
--- /dev/null
+++ b/hbase-shell/src/test/resources/hbase-site.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+<!--
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+-->
+<configuration>
+  <property>
+    <name>hbase.defaults.for.version.skip</name>
+    <value>true</value>
+  </property>
+  <property>
+    <name>hbase.hconnection.threads.keepalivetime</name>
+    <value>3</value>
+  </property>
+  <property>
+    <name>hbase.localcluster.assign.random.ports</name>
+    <value>true</value>
+    <description>
+      Assign random ports to master and RS info server (UI).
+    </description>
+  </property>
+</configuration>

http://git-wip-us.apache.org/repos/asf/hbase/blob/96d63fee/hbase-thrift/src/test/resources/hbase-site.xml
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/test/resources/hbase-site.xml 
b/hbase-thrift/src/test/resources/hbase-site.xml
index b3fb0d9..b354a2b 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.
     </description>
   </property>
+  <property>
+    <name>hbase.localcluster.assign.random.ports</name>
+    <value>true</value>
+    <description>
+      Assign random ports to master and RS info server (UI).
+    </description>
+  </property>
 </configuration>

Reply via email to