diff --git a/hbase-hbtop/README.md b/hbase-hbtop/README.md index 1c2327e3b156..bb4eae55d2e3 100644 --- a/hbase-hbtop/README.md +++ b/hbase-hbtop/README.md @@ -31,13 +31,15 @@ Also, with the drill-down feature, you can find hot regions easily in a top-down You can run hbtop with the following command: ``` -$ hbase top +$ hbase hbtop ``` -Also, you can specify your own zookeeper quorum and znode parent as follows: +In this case, the values of `hbase.client.zookeeper.quorum` and `zookeeper.znode.parent` in `hbase-site.xml` in the classpath or the default values of them are used to connect. + +Or, you can specify your own zookeeper quorum and znode parent as follows: ``` -$ hbase top -Dhbase.client.zookeeper.quorum= -Dzookeeper.znode.parent= +$ hbase hbtop -Dhbase.client.zookeeper.quorum= -Dzookeeper.znode.parent= ``` ![Top screen](img/top_screen.gif "Top screen") diff --git a/hbase-hbtop/img/top_screen.gif b/hbase-hbtop/img/top_screen.gif index 784ef471bbbb..0eca8de20006 100644 Binary files a/hbase-hbtop/img/top_screen.gif and b/hbase-hbtop/img/top_screen.gif differ diff --git a/hbase-hbtop/src/main/java/org/apache/hadoop/hbase/hbtop/HBTop.java b/hbase-hbtop/src/main/java/org/apache/hadoop/hbase/hbtop/HBTop.java index ca1f1f13b213..548c7d6b7416 100644 --- a/hbase-hbtop/src/main/java/org/apache/hadoop/hbase/hbtop/HBTop.java +++ b/hbase-hbtop/src/main/java/org/apache/hadoop/hbase/hbtop/HBTop.java @@ -125,7 +125,13 @@ public int run(String[] args) throws Exception { } private void printUsage(Options opts) { - new HelpFormatter().printHelp("hbase top", opts); + new HelpFormatter().printHelp("hbase hbtop [opts] [-D]*", opts); + System.out.println(""); + System.out.println(" Note: -D properties will be applied to the conf used."); + System.out.println(" For example:"); + System.out.println(" -Dhbase.client.zookeeper.quorum="); + System.out.println(" -Dzookeeper.znode.parent="); + System.out.println(""); } public static void main(String[] args) throws Exception { diff --git a/hbase-hbtop/src/main/java/org/apache/hadoop/hbase/hbtop/screen/top/TopScreenView.java b/hbase-hbtop/src/main/java/org/apache/hadoop/hbase/hbtop/screen/top/TopScreenView.java index eff3ce8b51d2..0f52b3782028 100644 --- a/hbase-hbtop/src/main/java/org/apache/hadoop/hbase/hbtop/screen/top/TopScreenView.java +++ b/hbase-hbtop/src/main/java/org/apache/hadoop/hbase/hbtop/screen/top/TopScreenView.java @@ -214,7 +214,7 @@ public void showTopScreen(Summary summary, List
headers, List re private void showSummary(Summary summary) { TerminalPrinter printer = getTerminalPrinter(SUMMARY_START_ROW); - printer.print(String.format("HBase top - %s", summary.getCurrentTime())).endOfLine(); + printer.print(String.format("HBase hbtop - %s", summary.getCurrentTime())).endOfLine(); printer.print(String.format("Version: %s", summary.getVersion())).endOfLine(); printer.print(String.format("Cluster ID: %s", summary.getClusterId())).endOfLine(); printer.print("RegionServer(s): ")