You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by zg...@apache.org on 2020/09/19 06:34:49 UTC
[hbase] branch master updated: HBASE-24857:Fix several problems
when starting webUI (#2245)
This is an automated email from the ASF dual-hosted git repository.
zghao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/master by this push:
new 16831ec HBASE-24857:Fix several problems when starting webUI (#2245)
16831ec is described below
commit 16831ec51591c1a8d254ba65dcb4c19ccc28b28a
Author: GeorryHuang <21...@qq.com>
AuthorDate: Sat Sep 19 14:34:30 2020 +0800
HBASE-24857:Fix several problems when starting webUI (#2245)
Signed-off-by: Viraj Jasani <vj...@apache.org>
Signed-off-by: Duo Zhang <zh...@apache.org>
---
bin/hbase | 2 +-
.../src/main/java/org/apache/hadoop/hbase/tool/CanaryTool.java | 8 +++++---
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/bin/hbase b/bin/hbase
index 127fa3c..dd6cfee 100755
--- a/bin/hbase
+++ b/bin/hbase
@@ -258,7 +258,7 @@ if [ "${INTERNAL_CLASSPATH}" != "true" ]; then
# If command needs our shaded mapreduce, use it
# N.B "mapredcp" is not included here because in the shaded case it skips our built classpath
- declare -a commands_in_mr_jar=("hbck" "snapshot" "canary" "regionsplitter" "pre-upgrade")
+ declare -a commands_in_mr_jar=("hbck" "snapshot" "regionsplitter" "pre-upgrade")
for c in "${commands_in_mr_jar[@]}"; do
if [ "${COMMAND}" = "${c}" ]; then
# If we didn't find a jar above, this will just be blank and the
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/CanaryTool.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/CanaryTool.java
index d42e629..59e0e6c 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/CanaryTool.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/CanaryTool.java
@@ -140,7 +140,7 @@ public class CanaryTool implements Tool, Canary {
try {
InfoServer infoServer = new InfoServer("canary", addr, port, false, conf);
infoServer.addUnprivilegedServlet("canary", "/canary-status", CanaryStatusServlet.class);
- infoServer.setAttribute("sink", this.sink);
+ infoServer.setAttribute("sink", getSink(conf, RegionStdOutSink.class));
infoServer.start();
LOG.info("Bind Canary http info server to {}:{} ", addr, port);
} catch (BindException e) {
@@ -979,8 +979,10 @@ public class CanaryTool implements Tool, Canary {
monitorTargets = new String[length];
System.arraycopy(args, index, monitorTargets, 0, length);
}
-
- putUpWebUI();
+ if (interval > 0) {
+ //Only show the web page in daemon mode
+ putUpWebUI();
+ }
if (zookeeperMode) {
return checkZooKeeper();
} else if (regionServerMode) {