Hbase Web Based UI

来源:互联网 发布:ubuntu 163源 编辑:程序博客网 时间:2024/05/02 00:36

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.

Region Server UI

Master 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.

Main PageNote

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.porthbase.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 HBase Master user interface


The details can be broken up into the following groups:


Master Attributes

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.

Running Tasks

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

The list of currently running tasks on the master

Catalog Tables

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.

User Tables

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.

Region Servers

The next section lists the actual region servers the master knows about. The table lists the, which you can click on to see more details. It also states the server , 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.

Regions in Transition

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

The Regions in Transitions table provided by the master web UI

User Table Page

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 User Table page with details about the selected table

The following groups of information are available in the user table page:

Table Attributes

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.

Table Regions

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

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.

Regions by Region 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:


Once you trigger one of the operation you will receive a confirmation page, for example, for a split invocation you will see:
Compact

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.

Note

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.

Split

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.

ZooKeeper Page

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 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).


Main Page

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 Region Server main page

The page can be broken up into the following groups of distinct information:

Region Server Attributes

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”.

Running Tasks

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.

Online Regions

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
.

Shared Pages

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:


The web-based UI provided by the HBase servers is a good way to quickly gain insight into the cluster, the hosted tables, the status of regions and tables, and so on. The majority of the information can also be accessed using the HBase Shell, but that requires a console access to the cluster.
Local Logs

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

The Local Logs page

Thread Dumps

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

The Thread Dump page

Log Level

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

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

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

原创粉丝点击