From c651271f5759f39f282099999a50ab88a62d86b7 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 575dcdfde1d..b428d98d358 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 @@ -370,6 +370,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() %>