Skip to content

Commit

Permalink
HBASE-11062 hbtop
Browse files Browse the repository at this point in the history
Some modifications to change "hbase top" to "hbase hbtop"
Some modifications for the command line help
  • Loading branch information
brfrn169 committed Sep 2, 2019
1 parent 1bbcfb7 commit 452ba66
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
8 changes: 5 additions & 3 deletions hbase-hbtop/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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=<zookeeper quorum> -Dzookeeper.znode.parent=<znode parent>
$ hbase hbtop -Dhbase.client.zookeeper.quorum=<zookeeper quorum> -Dzookeeper.znode.parent=<znode parent>
```

![Top screen](img/top_screen.gif "Top screen")
Expand Down
Binary file modified hbase-hbtop/img/top_screen.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -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<property=value>]*", 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=<zookeeper quorum>");
System.out.println(" -Dzookeeper.znode.parent=<znode parent>");
System.out.println("");
}

public static void main(String[] args) throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ public void showTopScreen(Summary summary, List<Header> headers, List<Record> 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): ")
Expand Down

0 comments on commit 452ba66

Please sign in to comment.