From 9446b2cc7eee9f140bdf919179fe9738c535f1a5 Mon Sep 17 00:00:00 2001 From: Nick Dimiduk Date: Tue, 24 Feb 2015 19:03:20 -0800 Subject: [PATCH] HBASE-13086 Show ZK root node on Master WebUI --- .../apache/hadoop/hbase/zookeeper/ZooKeeperWatcher.java | 7 +++++++ .../apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWatcher.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWatcher.java index d47dc3e23a1..64e6e24f705 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWatcher.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWatcher.java @@ -383,6 +383,13 @@ public class ZooKeeperWatcher implements Watcher, Abortable, Closeable { return quorum; } + /** + * @return the base znode of this zookeeper connection instance. + */ + public String getBaseZNode() { + return baseZNode; + } + /** * Method called from ZooKeeper for events and connection status. *

diff --git a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon index c83f2952287..ceda8435164 100644 --- a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon +++ b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon @@ -254,6 +254,11 @@ AssignmentManager assignmentManager = master.getAssignmentManager(); <% formatZKString() %> Addresses of all registered ZK servers. For more, see zk dump. + + Zookeeper Base Path + <% master.getZooKeeper().getBaseZNode() %> + Root node of this cluster in ZK. + HBase Root Directory <% FSUtils.getRootDir(master.getConfiguration()).toString() %>