<%@ page contentType="text/html;charset=UTF-8" import="java.util.*" import="java.io.IOException" import="org.apache.hadoop.io.Text" import="org.apache.hadoop.hbase.regionserver.HRegionServer" import="org.apache.hadoop.hbase.regionserver.HRegion" import="org.apache.hadoop.hbase.regionserver.metrics.RegionServerMetrics" import="org.apache.hadoop.hbase.util.Bytes" import="org.apache.hadoop.hbase.HConstants" import="org.apache.hadoop.hbase.HServerInfo" import="org.apache.hadoop.hbase.HServerLoad" import="org.apache.hadoop.hbase.HRegionInfo" %><% HRegionServer regionServer = (HRegionServer)getServletContext().getAttribute(HRegionServer.REGIONSERVER); HServerInfo serverInfo = null; try { serverInfo = regionServer.getHServerInfo(); } catch (IOException e) { e.printStackTrace(); } RegionServerMetrics metrics = regionServer.getMetrics(); Collection onlineRegions = regionServer.getSortedOnlineRegionInfos(); int interval = regionServer.getConfiguration().getInt("hbase.regionserver.msginterval", 3000)/1000; %> HBase Region Server: <%= serverInfo.getServerAddress().getHostname() %>:<%= serverInfo.getServerAddress().getPort() %>

Region Server: <%= serverInfo.getServerAddress().getHostname() %>:<%= serverInfo.getServerAddress().getPort() %>


Region Server Attributes

Attribute NameValueDescription
HBase Version<%= org.apache.hadoop.hbase.util.VersionInfo.getVersion() %>, r<%= org.apache.hadoop.hbase.util.VersionInfo.getRevision() %>HBase version and svn revision
HBase Compiled<%= org.apache.hadoop.hbase.util.VersionInfo.getDate() %>, <%= org.apache.hadoop.hbase.util.VersionInfo.getUser() %>When HBase version was compiled and by whom
Metrics<%= metrics.toString() %>RegionServer Metrics; file and heap sizes are in megabytes
Zookeeper Quorum<%= regionServer.getZooKeeperWrapper().getQuorumServers() %>Addresses of all registered ZK servers

Online Regions

<% if (onlineRegions != null && onlineRegions.size() > 0) { %> <% for (HRegionInfo r: onlineRegions) { HServerLoad.RegionLoad load = regionServer.createRegionLoad(r.getRegionName()); %> <% } %>
Region NameEncoded NameStart KeyEnd KeyMetrics
<%= r.getRegionNameAsString() %><%= r.getEncodedName() %> <%= Bytes.toStringBinary(r.getStartKey()) %><%= Bytes.toStringBinary(r.getEndKey()) %> <%= load.toString() %>

Region names are made of the containing table's name, a comma, the start key, a comma, and a randomly generated region id. To illustrate, the region named domains,apache.org,5464829424211263407 is party to the table domains, has an id of 5464829424211263407 and the first key in the region is apache.org. The -ROOT- and .META. 'tables' are internal sytem tables (or 'catalog' tables in db-speak). The -ROOT- keeps a list of all regions in the .META. table. The .META. table keeps a list of all regions in the system. The empty key is used to denote table start and table end. A region with an empty start key is the first region in a table. If region has both an empty start and an empty end key, its the only region in the table. See HBase Home for further explication.

<% } else { %>

Not serving regions

<% } %>