<%@ page contentType="text/html;charset=UTF-8" import="java.util.*" import="org.apache.hadoop.io.Text" import="org.apache.hadoop.hbase.HMaster" import="org.apache.hadoop.hbase.HConstants" import="org.apache.hadoop.hbase.HMaster.MetaRegion" import="org.apache.hadoop.hbase.HBaseAdmin" import="org.apache.hadoop.hbase.HServerInfo" import="org.apache.hadoop.hbase.HServerAddress" import="org.apache.hadoop.hbase.HRegionInfo" import="org.apache.hadoop.hbase.HBaseConfiguration" import="org.apache.hadoop.hbase.hql.ShowCommand" import="org.apache.hadoop.hbase.hql.TableFormatter" import="org.apache.hadoop.hbase.hql.ReturnMsg" import="org.apache.hadoop.hbase.hql.formatter.HtmlTableFormatter" import="org.apache.hadoop.hbase.HTableDescriptor" %><% HMaster master = (HMaster)getServletContext().getAttribute(HMaster.MASTER); HBaseConfiguration conf = master.getConfiguration(); TableFormatter formatter = new HtmlTableFormatter(out); ShowCommand show = new ShowCommand(out, formatter, "tables"); HServerAddress rootLocation = master.getRootRegionLocation(); Map onlineRegions = master.getOnlineMetaRegions(); Map serverToServerInfos = master.getServersToServerInfo(); int interval = conf.getInt("hbase.regionserver.msginterval", 6000)/1000; %> HBase Master: <%= master.getMasterAddress()%>

Master: <%=master.getMasterAddress()%>


Master 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
Hadoop Version<%= org.apache.hadoop.util.VersionInfo.getVersion() %>, r<%= org.apache.hadoop.util.VersionInfo.getRevision() %>Hadoop version and svn revision
Hadoop Compiled<%= org.apache.hadoop.util.VersionInfo.getDate() %>, <%= org.apache.hadoop.util.VersionInfo.getUser() %>When Hadoop version was compiled and by whom
Filesystem<%= conf.get("fs.default.name") %>Filesystem HBase is running on
HBase Root Directory<%= master.getRootDir().toString() %>Location of HBase home directory

Online META Regions

<% if (rootLocation != null) { %> <% if (onlineRegions != null && onlineRegions.size() > 0) { %> <% for (Map.Entry e: onlineRegions.entrySet()) { MetaRegion meta = e.getValue(); %> <% } } %>
NameServer
<%= HConstants.ROOT_TABLE_NAME.toString() %><%= rootLocation.toString() %>
<%= meta.getRegionName().toString() %><%= meta.getServer().toString() %>
<% } %>

Tables

<% ReturnMsg msg = show.execute(conf); %>

<%=msg %>

Region Servers

<% if (serverToServerInfos != null && serverToServerInfos.size() > 0) { %> <% int totalRegions = 0; int totalRequests = 0; %> <% for (Map.Entry e: serverToServerInfos.entrySet()) { HServerInfo hsi = e.getValue(); String url = "http://" + hsi.getServerAddress().getBindAddress().toString() + ":" + hsi.getInfoPort() + "/"; String load = hsi.getLoad().toString(); totalRegions += hsi.getLoad().getNumberOfRegions(); totalRequests += hsi.getLoad().getNumberOfRequests(); long startCode = hsi.getStartCode(); String address = hsi.getServerAddress().toString(); %> <% } %>
>AddressStart CodeLoad
<%= address %><%= startCode %><%= load %>
Total: servers: <%= serverToServerInfos.size() %> requests: <%= totalRequests %> regions: <%= totalRegions %>

Load is requests per hbase.regionsserver.msginterval (<%=interval%> second(s)) and count of regions loaded

<% } %>