diff --git a/bin/hbase b/bin/hbase index 5e2778c05d0..d33749b6b0a 100755 --- a/bin/hbase +++ b/bin/hbase @@ -256,7 +256,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 9ed2b919356..64a2d5103f8 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) {