The HBase processes exposes a web-based user interface (in short UI), which you can use to gain insight into the cluster's state, as well as the tables it hosts. The majority of the functionality is read-only, but there are a few selected operation you can trigger through the UI.
HBase also starts a web-based user interface (UI) listing vital attributes. By default it is deployed on the master host at port 60010, while region servers use 60030. If the master is running on a host named master.foo.com
on the default port, to see the master's homepage you can point your browser at http://master.foo.com:60010
.
The ports used by the servers can be set in the hbase-site.xml
configuration file. The properties keys to change are:
hbase.master.info.port hbase.regionserver.info.port
The first page you will see when opening the master's web UI is shown in Figure 6.2, “The HBase Master user interface”. It consists of multiple sections that give you insight into the cluster status itself, the tables it serves, what the region servers are, and so on.
Figure 6.2. The HBase Master user interface
The details can be broken up into the following groups:
You will find cluster-wide details in a table at the top of the page. It has information about the version of HBase, and Hadoop, you are using, where the root directory is located [82], the overall load average, and the ZooKeeper quorum used.
There is also a link in the description for the ZooKeeper quorum allowing you to see the information for your current HBase cluster stored in ZooKeeper. the section called “ZooKeeper Page” discusses its content.
The next group of details on the master's main page is the list of currently running tasks. Every internal operation performed by the master is listed here while it is running, and for another minute after its completion. Entries with a white background are currently running, a green background indicates successful completion of the task, and a yellow background means the task was aborted. The latter can happen when an operation failed due to an inconsistent state. Figure 6.3, “The list of currently running tasks on the master” shows a completed, a running, and a failed tasks.
Figure 6.3. The list of currently running tasks on the master
This section list the two catalog tables, .META.
and -ROOT-
. You can click on the name of the table to see more details on the table regions, for example, on what server they are currently hosted.
Here you will see the list of all tables known to your HBase cluster. These are the ones you - or your users - have created using the API, or the HBase shell. The description column in the list gives you a print out of the current table descriptor, including all column descriptors, seethe section called “Schema Definition” for an explanation on how to read them.
The table names are links to another page with details on the selected table. See the section called “User Table Page” for the explanation of the contained information.
The next section lists the actual region servers the master knows about. The table lists the<address>
, which you can click on to see more details. It also states the server <start code>
, a timestamp representing an ID for each server, and finally the load of the server. For information on the values listed refer to the section called “Cluster Status Information”, and especially the HServerLoad
class.
As regions are managed by the master and region server to, for example, balance the load across servers, they go through short phases of transition. This applies to opening, closing, and splitting a region. Before the operation is performed the region is added to the list, and once the operation is complete is removed. the section called “The Region Life Cycle”describes the possible states a region can be in. Figure 6.4, “The Regions in Transitions table provided by the master web UI” shows a region that is currently split.
Figure 6.4. The Regions in Transitions table provided by the master web UI
When you click on the name of a user table in the master's web-based user interface, you have access to the information pertaining to the selected table. Figure 6.5, “The User Table page with details about the selected table” shows an abbreviated version of a user table page (it has a shortened list of regions for the sake of space).
Figure 6.5. The User Table page with details about the selected table
The following groups of information are available in the user table page:
Here you can find details about the table itself. As of this writing it only lists the table status, i.e., if it is enabled or not. See the section called “Table Operations”, and the disableTable()
call especially.
The boolean value states if the table is enabled, so when you see a true
in the Value column this is the case. On the other hand, a value of false
would mean the table is currently disabled.
This list can be rather large and shows all regions of a table. The Name column has the region name itself, the Region Server column has a link to the server hosting the region. Clicking on the link takes you to the the section called “Region Server UI”.
Sometimes you may see the text not deployed, where the server name should be. This happens when a user table region is not currently served by any region server. Figure 6.6, “Sometimes a region may not be assigned to a server and is listed as not deployed” shows an example of this situation.
Figure 6.6. Sometimes a region may not be assigned to a server and is listed as not deployed
The Start Key and End Key columns show the regions start and end key as expected. Finally, the Requests column shows the total number of request, including all read (for example gets, or scans) and write (for instance puts or deletes) operations, since the region was deployed to the server.
The last group on the user table page is listing which region server is hosting how many regions of the selected table. This number is usually distributed evenly across all available servers. If not, you can use the HBase Shell or administrative API to initiate the balancer, or use the move
command to manually balance the table regions (see the section called “Cluster Operations”).
The user table page also offers a form that can be used to trigger administrative operations on a specific region, or the entire table. See the section called “Cluster Operations” again for details, andthe section called “Optimize Splits and Compactions” for information on when you want to use them. The available operations are:
This triggers the compact
functionality, which is asynchronously running in the background. Specify the optional name of a region to run the operation more selectively. The name of the region can be taken from the table above, i.e., the entries in the Name column of the Table Regions table.
Make sure to copy the entire region name as-is. This includes the trailing "."
(the dot)!
If you do not specify a region name then the operation is performed on all regions of the table instead.
Similar to the compact action, the split form action triggers the split
command, operating on a table or region scope. Not all regions might be splittable, for example those that contain no, or very few, cells, or one that has already been split, but which has not been compacted to complete the process.
Split request accepted. Reload.
tUse the Back button of your web browser to go back to the previous page, showing the user table details.
There is also a link in the description column that lets you dump the content of all the nodes stored in ZooKeeper by HBase. This is useful when trying to solve problems with the cluster setup (seethe section called “Troubleshooting”).
The page shows the same information as invoking the zk_dump command of the HBase shell. It shows you the root directory HBase is using inside the configured file system. You also can see the currently assigned master, which region server is hosting the -ROOT-
catalog table, the list of region servers that have registered with the master, as well as ZooKeeper internal details. Figure 6.7, “The ZooKeeper page, listing HBase and ZooKeeper details, is useful when debugging HBase installations” shows an exemplary output available on the ZooKeeper page.
Figure 6.7. The ZooKeeper page, listing HBase and ZooKeeper details, is useful when debugging HBase installations
The region servers have their own web-based UI, which you usually access through the master UI, by clicking on the server name links provided. You can access the page directly by entering
http://<region-server-address>
:60030
into your browser (while making sure to use the configured port, here using the default of 60030
).
The main page of the region servers has details about the server, the tasks, and regions it is hosting. Figure 6.8, “The Region Server main page” shows an abbreviated example of this page (the list of tasks and regions is shortened for the sake of space).
Figure 6.8. The Region Server main page
The page can be broken up into the following groups of distinct information:
This group of information contains the version of HBase you are running, when it was compiled, a print-out of the server metrics, and the ZooKeeper quorum used.
The metrics are explained in the section called “Region Server Metrics”.
The table lists all currently running tasks, using a white background for running tasks, a yellow one for failed tasks, and a green one for completed tasks. Failed or completed tasks are eventually removed after one minute.
Here you can see all the regions hosted by the currently selected region server. The table has the region name, the start and end keys, as well as the region metrics
.
On the top of the master, region server, and table page there are also a few generic links that lead to subsequent pages, displaying or controlling additional details of your setup:
A quick way to access the log files without requiring access to the server itself is provided by this link. It firsts list the contents of the log
directory where you can select the log file you want to see. Click on a log to reveal its content. the section called “Analyzing the Logs” helps making sense of what you may see. Figure 6.9, “The Local Logs page” shows an example page.
Figure 6.9. The Local Logs page
For debugging purposes you can use this link to dump the Java stack traces of the running HBase processes. You can find more details in the section called “Troubleshooting”.Figure 6.10, “The Thread Dump page” shows an example output.
Figure 6.10. The Thread Dump page
This link leads you to a small form that allows you to retrieve and set the logging levels used by the HBase processes. More on this in the section called “Change Logging Levels”.Figure 6.11, “The Log Level page” shows the form when it is loaded afresh.
Figure 6.11. The Log Level page
When you enter for example org.apache.hadoop.hbase
into the first input field, and click on the Get Log Level button, you should see a similar result, as shown in Figure 6.12, “The Log Level result page”.
Figure 6.12. The Log Level result page
If you want your users to create, delete and display their own tables, then you will need an additional layer on top of HBase, possibly using Thrift or REST as the gateway server, to offer this functionality to end usersYou can use the UI to trigger selected administrative operations, therefore it might not be advisable to give everyone access to it: similar to the shell it should be used by the operators and administrators of the cluster.
Ref: http://ofps.oreilly.com/titles/9781449396107/clients.html#clientsweb