HADOOP-2450 Show version (and svn revision) in hbase web ui

git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@610087 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2008-01-08 18:11:45 +00:00
parent 5a804bf5f3
commit f5bfeea892
3 changed files with 17 additions and 1 deletions

View File

@ -156,6 +156,7 @@ Trunk (unreleased changes)
(Tom White via Stack)
HADOOP-2502 Insert/Select timestamp, Timestamp data type in HQL
(Edward Yoon via Stack)
HADOOP-2450 Show version (and svn revision) in hbase web ui

View File

@ -5,6 +5,7 @@ import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.util.*;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.util.VersionInfo;
import org.apache.hadoop.hbase.HMaster;
import org.apache.hadoop.hbase.HConstants;
import org.apache.hadoop.hbase.HMaster.MetaRegion;
@ -69,7 +70,18 @@ public final class master_jsp extends org.apache.jasper.runtime.HttpJspBase
out.print( master.getMasterAddress());
out.write("</title>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"/static/hbase.css\" />\n</head>\n\n<body>\n\n<a id=\"logo\" href=\"http://wiki.apache.org/lucene-hadoop/Hbase\"><img src=\"/static/hbase_logo_med.gif\" alt=\"Hbase Logo\" title=\"Hbase Logo\" /></a>\n<h1 id=\"page_title\">Master: ");
out.print(master.getMasterAddress());
out.write("</h1>\n<p id=\"links_menu\"><a href=\"/hql.jsp\">HQL</a>, <a href=\"/logs/\">Local logs</a>, <a href=\"/stacks\">Thread Dump</a>, <a href=\"/logLevel\">Log Level</a></p>\n<hr id=\"head_rule\" />\n\n<h2>Master Attributes</h2>\n<table>\n<tr><th>Attribute Name</th><th>Value</th><th>Description</th></tr>\n<tr><td>Filesystem</td><td>");
out.write("</h1>\n<p id=\"links_menu\"><a href=\"/hql.jsp\">HQL</a>, <a href=\"/logs/\">Local logs</a>, <a href=\"/stacks\">Thread Dump</a>, <a href=\"/logLevel\">Log Level</a></p>\n<hr id=\"head_rule\" />\n\n<h2>Master Attributes</h2>\n<table>\n<tr><th>Attribute Name</th><th>Value</th><th>Description</th></tr>\n<tr><td>Version</td><td>");
out.print( VersionInfo.getVersion() );
out.write(',');
out.write(' ');
out.write('r');
out.print( VersionInfo.getRevision() );
out.write("</td><td>Hbase version and svn revision</td></tr>\n<tr><td>Compiled</td><td>");
out.print( VersionInfo.getDate() );
out.write(',');
out.write(' ');
out.print( VersionInfo.getUser() );
out.write("</td><td>When this version was compiled and by whom</td></tr>\n<tr><td>Filesystem</td><td>");
out.print( conf.get("fs.default.name") );
out.write("</td><td>Filesystem hbase is running on</td></tr>\n<tr><td>Hbase Root Directory</td><td>");
out.print( master.getRootDir().toString() );

View File

@ -1,6 +1,7 @@
<%@ page contentType="text/html;charset=UTF-8"
import="java.util.*"
import="org.apache.hadoop.io.Text"
import="org.apache.hadoop.util.VersionInfo"
import="org.apache.hadoop.hbase.HMaster"
import="org.apache.hadoop.hbase.HConstants"
import="org.apache.hadoop.hbase.HMaster.MetaRegion"
@ -42,6 +43,8 @@
<h2>Master Attributes</h2>
<table>
<tr><th>Attribute Name</th><th>Value</th><th>Description</th></tr>
<tr><td>Version</td><td><%= VersionInfo.getVersion() %>, r<%= VersionInfo.getRevision() %></td><td>Hbase version and svn revision</td></tr>
<tr><td>Compiled</td><td><%= VersionInfo.getDate() %>, <%= VersionInfo.getUser() %></td><td>When this version was compiled and by whom</td></tr>
<tr><td>Filesystem</td><td><%= conf.get("fs.default.name") %></td><td>Filesystem hbase is running on</td></tr>
<tr><td>Hbase Root Directory</td><td><%= master.getRootDir().toString() %></td><td>Location of hbase home directory</td></tr>
</table>