tree: 6201f3a8b9d81da8e3582c3a635529d4d001de75 [path history] [tgz]
  1. img/
  2. src/
  3. pom.xml
  4. README.md
hbase-hbtop/README.md

hbtop

Overview

hbtop is a real-time monitoring tool for HBase like Unix's top command. It can display summary information as well as metrics per Region/Namespace/Table/RegionServer. In this tool, you can see the metrics sorted by a selected field and filter the metrics to see only metrics you really want to see. Also, with the drill-down feature, you can find hot regions easily in a top-down manner.

Usage

You can run hbtop with the following command:

$ hbase hbtop

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 hbtop -Dhbase.client.zookeeper.quorum=<zookeeper quorum> -Dzookeeper.znode.parent=<znode parent>

Top screen

The top screen consists of a summary part and of a metrics part. In the summary part, you can see HBase Version, Cluster ID, The number of region servers, Region count, Average Cluster Load and Aggregated Request/s. In the metrics part, you can see metrics per Region/Namespace/Table/RegionServer depending on the selected mode. The top screen is refreshed in a certain period – 3 seconds by default.

Scrolling metric records

You can scroll the metric records in the metrics part.

Scrolling metric records

Command line arguments

ArgumentDescription
-d,--delay <arg>The refresh delay (in seconds); default is 3 seconds
-h,--helpPrint usage; for help while the tool is running press h key
-m,--mode <arg>The mode; n (Namespace)|t (Table)|r (Region)|s (RegionServer), default is r (Region)

Modes

There are the following 4 modes in hbtop:

ModeDescription
RegionShowing metric records per region
NamespaceShowing metric records per namespace
TableShowing metric records per table
RegionServerShowing metric records per region server

Region mode

In Region mode, the default sort field is #REQ/S.

The fields in this mode are as follows:

FieldDescriptionDisplayed by default
RNAMERegion Namefalse
NAMESPACENamespace Nametrue
TABLETable Nametrue
SCODEStart Codefalse
REPIDReplica IDfalse
REGIONEncoded Region Nametrue
RSShort Region Server Nametrue
LRSLong Region Server Namefalse
#REQ/SRequest Count per secondtrue
#READ/SRead Request Count per secondtrue
#FREAD/SFiltered Read Request Count per secondtrue
#WRITE/SWrite Request Count per secondtrue
SFStoreFile Sizetrue
USFUncompressed StoreFile Sizefalse
#SFNumber of StoreFilestrue
MEMSTOREMemStore Sizetrue
LOCALITYBlock Localitytrue
SKEYStart Keyfalse
#COMPingCELLCompacting Cell Countfalse
#COMPedCELLCompacted Cell Countfalse
%COMPCompaction Progressfalse
LASTMCOMPLast Major Compaction Timefalse

Namespace mode

In Namespace mode, the default sort field is #REQ/S.

The fields in this mode are as follows:

FieldDescriptionDisplayed by default
NAMESPACENamespace Nametrue
#REGIONRegion Counttrue
#REQ/SRequest Count per secondtrue
#READ/SRead Request Count per secondtrue
#FREAD/SFiltered Read Request Count per secondtrue
#WRITE/SWrite Request Count per secondtrue
SFStoreFile Sizetrue
USFUncompressed StoreFile Sizefalse
#SFNumber of StoreFilestrue
MEMSTOREMemStore Sizetrue

Table mode

In Table mode, the default sort field is #REQ/S.

The fields in this mode are as follows:

FieldDescriptionDisplayed by default
NAMESPACENamespace Nametrue
TABLETable Nametrue
#REGIONRegion Counttrue
#REQ/SRequest Count per secondtrue
#READ/SRead Request Count per secondtrue
#FREAD/SFiltered Read Request Count per secondtrue
#WRITE/SWrite Request Count per secondtrue
SFStoreFile Sizetrue
USFUncompressed StoreFile Sizefalse
#SFNumber of StoreFilestrue
MEMSTOREMemStore Sizetrue

RegionServer mode

In RegionServer mode, the default sort field is #REQ/S.

The fields in this mode are as follows:

FieldDescriptionDisplayed by default
RSShort Region Server Nametrue
LRSLong Region Server Namefalse
#REGIONRegion Counttrue
#REQ/SRequest Count per secondtrue
#READ/SRead Request Count per secondtrue
#FREAD/SFiltered Read Request Count per secondtrue
#WRITE/SWrite Request Count per secondtrue
SFStoreFile Sizetrue
USFUncompressed StoreFile Sizefalse
#SFNumber of StoreFilestrue
MEMSTOREMemStore Sizetrue
UHEAPUsed Heap Sizetrue
MHEAPMax Heap Sizetrue

Changing mode

You can change mode by pressing m key in the top screen.

Changing mode

Changing the refresh delay

You can change the refresh by pressing d key in the top screen.

Changing the refresh delay

Changing the displayed fields

You can move to the field screen by pressing f key in the top screen. In the fields screen, you can change the displayed fields by choosing a field and pressing d key or space key.

Changing the displayed fields

Changing the sort field

You can move to the fields screen by pressing f key in the top screen. In the field screen, you can change the sort field by choosing a field and pressing s. Also, you can change the sort order (ascending or descending) by pressing R key.

Changing the sort field

Changing the order of the fields

You can move to the fields screen by pressing f key in the top screen. In the field screen, you can change the order of the fields.

Changing the order of the fields

Filters

You can filter the metric records with the filter feature. We can add filters by pressing o key for ignoring case or O key for case sensitive.

Adding filters

The syntax is as follows:

<Field><Operator><Value>

For example, we can add filters like the following:

NAMESPACE==default
REQ/S>1000

The operators we can specify are as follows:

OperatorDescription
=Partial match
==Exact match
>Greater than
>=Greater than or equal to
<Less than
<=Less than and equal to

You can see the current filters by pressing ^o key and clear them by pressing = key.

Showing and clearing filters

Drilling down

You can drill down the metric record by choosing a metric record that you want to drill down and pressing i key in the top screen. With this feature, you can find hot regions easily in a top-down manner.

Drilling down

Help screen

You can see the help screen by pressing h key in the top screen.

Help screen

Others

How hbtop gets the metrics data

hbtop gets the metrics from ClusterMetrics which is returned as the result of a call to Admin#getClusterMetrics() on the current HMaster. To add metrics to hbtop, they will need to be exposed via ClusterMetrics.