<% /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ %> <%@ page contentType="text/html;charset=UTF-8" import="java.util.*" import="java.net.URLEncoder" import="org.apache.hadoop.io.Text" import="org.apache.hadoop.hbase.util.Bytes" import="org.apache.hadoop.hbase.util.JvmVersion" import="org.apache.hadoop.hbase.master.HMaster" import="org.apache.hadoop.hbase.HConstants" import="org.apache.hadoop.hbase.master.MetaRegion" import="org.apache.hadoop.hbase.client.HBaseAdmin" import="org.apache.hadoop.hbase.io.ImmutableBytesWritable" import="org.apache.hadoop.hbase.HServerInfo" import="org.apache.hadoop.hbase.HServerAddress" import="org.apache.hadoop.hbase.HBaseConfiguration" import="org.apache.hadoop.hbase.HColumnDescriptor" import="org.apache.hadoop.hbase.HTableDescriptor" %><% HMaster master = (HMaster)getServletContext().getAttribute(HMaster.MASTER); HBaseConfiguration conf = master.getConfiguration(); HServerAddress rootLocation = master.getRootRegionLocation(); Map onlineRegions = master.getOnlineMetaRegions(); Map serverToServerInfos = master.getServersToServerInfo(); int interval = conf.getInt("hbase.regionserver.msginterval", 1000)/1000; if (interval == 0) { interval = 1; } %> HBase Master: <%= master.getMasterAddress().getHostname()%>:<%= master.getMasterAddress().getPort() %>

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

<% if (JvmVersion.isBadJvmVersion()) { %>
Your current JVM version <%= System.getProperty("java.version") %> is known to be unstable with HBase. Please see the HBase wiki for details.
<% } %>

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
HBase Root Directory<%= master.getRootDir().toString() %>Location of HBase home directory
Load average<%= master.getAverageLoad() %>Average number of regions per regionserver. Naive computation.
Regions On FS<%= master.countRegionsOnFS() %>Number of regions on FileSystem. Rough count.
Zookeeper Quorum<%= master.getZooKeeperWrapper().getQuorumServers() %>Addresses of all registered ZK servers. For more, see zk dump.

Catalog Tables

<% if (rootLocation != null) { %> <% if (onlineRegions != null && onlineRegions.size() > 0) { %> <% } %>
TableDescription
<%= Bytes.toString(HConstants.ROOT_TABLE_NAME) %>The -ROOT- table holds references to all .META. regions.
<%= Bytes.toString(HConstants.META_TABLE_NAME) %>The .META. table holds references to all User Table regions
<%} %>

User Tables

<% HTableDescriptor[] tables = new HBaseAdmin(conf).listTables(); if(tables != null && tables.length > 0) { %> <% for(HTableDescriptor htDesc : tables ) { %> <% } %>

<%= tables.length %> table(s) in set.

TableDescription
><%= htDesc.getNameAsString() %> <%= htDesc.toString() %>
<% } %>

Region Servers

<% if (serverToServerInfos != null && serverToServerInfos.size() > 0) { %> <% int totalRegions = 0; int totalRequests = 0; %> <% String[] serverNames = serverToServerInfos.keySet().toArray(new String[serverToServerInfos.size()]); Arrays.sort(serverNames); for (String serverName: serverNames) { HServerInfo hsi = serverToServerInfos.get(serverName); String hostname = hsi.getServerAddress().getHostname() + ":" + hsi.getInfoPort(); String url = "http://" + hostname + "/"; totalRegions += hsi.getLoad().getNumberOfRegions(); totalRequests += hsi.getLoad().getNumberOfRequests() / interval; long startCode = hsi.getStartCode(); %> <% } %>
AddressStart CodeLoad
<%= hostname %><%= startCode %><%= hsi.getLoad().toString(interval) %>
Total: servers: <%= serverToServerInfos.size() %> requests=<%= totalRequests %>, regions=<%= totalRegions %>

Load is requests per second and count of regions loaded

<% } %>