HADOOP-2074 Simple switch to enable DEBUG level-logging in hbase
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@592603 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
656cee4138
commit
5c869d23e9
|
@ -32,6 +32,7 @@ Trunk (unreleased changes)
|
|||
IMPROVEMENTS
|
||||
HADOOP-2401 Add convenience put method that takes writable
|
||||
(Johan Oskarsson via Stack)
|
||||
HADOOP-2074 Simple switch to enable DEBUG level-logging in hbase
|
||||
HADOOP-2088 Make hbase runnable in $HADOOP_HOME/build(/contrib/hbase)
|
||||
HADOOP-2126 Use Bob Jenkins' hash for bloom filters
|
||||
HADOOP-2157 Make Scanners implement Iterable
|
||||
|
|
|
@ -52,9 +52,9 @@ public final class hql_jsp extends org.apache.jasper.runtime.HttpJspBase
|
|||
query = "";
|
||||
}
|
||||
|
||||
out.write("\n<form action=\"/hql.jsp\" method=\"get\">\n <p>\n <label for=\"query\">Query: </label>\n <input type=\"text\" name=\"q\" id=\"q\" size=\"40\" value=\"");
|
||||
out.write("\n<form action=\"/hql.jsp\" method=\"get\">\n <p>\n <label for=\"query\">Query: </label>\n <input type=\"text\" name=\"q\" id=\"q\" size=\"60\" value=\"");
|
||||
out.print( query );
|
||||
out.write("\" />\n <input type=\"submit\" value=\"submit\" />\n </p>\n </form>\n <p>Enter 'help;' -- thats 'help' plus a semi-colon -- for a list of <em>HQL</em> commands.\n Data Definition, SHELL, INSERTS, DELETES, and UPDATE commands are disabled in this interface\n </p>\n \n ");
|
||||
out.write("\" />\n <input type=\"submit\" value=\"submit\" />\n </p>\n </form>\n <p>Enter 'help;' -- thats 'help' plus a semi-colon -- for the list of <em>HQL</em> commands.\n Data Definition, SHELL, INSERTS, DELETES, and UPDATE commands are disabled in this interface\n </p>\n \n ");
|
||||
|
||||
if (query.length() > 0) {
|
||||
|
||||
|
|
|
@ -63,16 +63,17 @@ public final class master_jsp extends org.apache.jasper.runtime.HttpJspBase
|
|||
Map<Text, MetaRegion> onlineRegions = master.getOnlineMetaRegions();
|
||||
Map<String, HServerInfo> serverToServerInfos =
|
||||
master.getServersToServerInfo();
|
||||
int interval = conf.getInt("hbase.regionserver.msginterval", 6000)/1000;
|
||||
|
||||
out.write("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \n \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"> \n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head><meta http-equiv=\"Content-Type\" content=\"text/html;charset=UTF-8\"/>\n<title>Hbase Master: ");
|
||||
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></p>\n<hr id=\"head_rule\" />\n\n<h2>Master Attributes</h2>\n<table>\n<tr><th>Attribute Name</th><th>Value</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>Filesystem</td><td>");
|
||||
out.print( conf.get("fs.default.name") );
|
||||
out.write("</td></tr>\n<tr><td>Hbase Root Directory</td><td>");
|
||||
out.write("</td><td>Filesystem hbase is running on</td></tr>\n<tr><td>Hbase Root Directory</td><td>");
|
||||
out.print( master.getRootDir().toString() );
|
||||
out.write("</td></tr>\n</table>\n\n<h2>Online META Regions</h2>\n");
|
||||
out.write("</td><td>Location of hbase home directory</td></tr>\n</table>\n\n<h2>Online META Regions</h2>\n");
|
||||
if (rootLocation != null) {
|
||||
out.write("\n<table>\n<tr><th>Name</th><th>Server</th></tr>\n<tr><td>");
|
||||
out.print( HConstants.ROOT_TABLE_NAME.toString() );
|
||||
|
@ -102,7 +103,7 @@ public final class master_jsp extends org.apache.jasper.runtime.HttpJspBase
|
|||
out.print(msg );
|
||||
out.write("</p>\n\n<h2>Region Servers</h2>\n");
|
||||
if (serverToServerInfos != null && serverToServerInfos.size() > 0) {
|
||||
out.write("\n<table>\n<tr><th>Address</th><th>Start Code</th><th>Load</th></tr>\n");
|
||||
out.write("\n<table>\n<tr><th>Address</th><th>Start Code</th><th>Load</th></tr>\n\n");
|
||||
for (Map.Entry<String, HServerInfo> e: serverToServerInfos.entrySet()) {
|
||||
HServerInfo hsi = e.getValue();
|
||||
String url = "http://" +
|
||||
|
@ -123,7 +124,9 @@ public final class master_jsp extends org.apache.jasper.runtime.HttpJspBase
|
|||
out.print( load );
|
||||
out.write("</tr>\n");
|
||||
}
|
||||
out.write("\n</table>\n");
|
||||
out.write("\n</table>\n<p>Load is requests per <em>hbase.regionsserver.msginterval</em> (");
|
||||
out.print(interval);
|
||||
out.write(" second(s)) and count of regions loaded</p>\n");
|
||||
}
|
||||
out.write("\n</body>\n</html>\n");
|
||||
} catch (Throwable t) {
|
||||
|
|
|
@ -55,9 +55,9 @@ public final class regionserver_jsp extends org.apache.jasper.runtime.HttpJspBas
|
|||
out.print( serverInfo.getServerAddress().toString() );
|
||||
out.write("</title>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"/static/hbase.css\" />\n</head>\n\n<body>\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\">Region Server: ");
|
||||
out.print( serverInfo.getServerAddress().toString() );
|
||||
out.write("</h1>\n<p id=\"links_menu\"><a href=\"/logs/\">Local logs</a>, <a href=\"/stacks\">Thread Dump</a></p>\n<hr id=\"head_rule\" />\n\n<h2>Region Server Attributes</h2>\n<table>\n<tr><th>Attribute Name</th><th>Value</th></tr>\n<tr><td>Load</td><td>");
|
||||
out.write("</h1>\n<p id=\"links_menu\"><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>Region Server Attributes</h2>\n<table>\n<tr><th>Attribute Name</th><th>Value</th><th>Description</th></tr>\n<tr><td>Load</td><td>");
|
||||
out.print( serverInfo.getLoad().toString() );
|
||||
out.write("</td></tr>\n</table>\n\n<h2>Online Regions</h2>\n");
|
||||
out.write("</td><td>Requests/<em>hbase.regionserver.msginterval</em> + count of loaded regions</td></tr>\n</table>\n\n<h2>Online Regions</h2>\n");
|
||||
if (onlineRegions != null && onlineRegions.size() > 0) {
|
||||
out.write("\n<table>\n<tr><th>Region Name</th><th>Start Key</th><th>End Key</th></tr>\n");
|
||||
for (HRegion r: onlineRegions.values()) {
|
||||
|
|
|
@ -99,6 +99,7 @@ public class InfoServer {
|
|||
this.webAppContext =
|
||||
this.webServer.addWebApplication("/", webappDir);
|
||||
addServlet("stacks", "/stacks", StatusHttpServer.StackServlet.class);
|
||||
addServlet("logLevel", "/logLevel", org.apache.hadoop.log.LogLevel.Servlet.class);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -226,4 +227,4 @@ public class InfoServer {
|
|||
public void stop() throws InterruptedException {
|
||||
this.webServer.stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
Map<Text, MetaRegion> onlineRegions = master.getOnlineMetaRegions();
|
||||
Map<String, HServerInfo> serverToServerInfos =
|
||||
master.getServersToServerInfo();
|
||||
int interval = conf.getInt("hbase.regionserver.msginterval", 6000)/1000;
|
||||
%><?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
@ -35,14 +36,14 @@
|
|||
|
||||
<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>
|
||||
<h1 id="page_title">Master: <%=master.getMasterAddress()%></h1>
|
||||
<p id="links_menu"><a href="/hql.jsp">HQL</a>, <a href="/logs/">Local logs</a>, <a href="/stacks">Thread Dump</a></p>
|
||||
<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>
|
||||
<hr id="head_rule" />
|
||||
|
||||
<h2>Master Attributes</h2>
|
||||
<table>
|
||||
<tr><th>Attribute Name</th><th>Value</th></tr>
|
||||
<tr><td>Filesystem</td><td><%= conf.get("fs.default.name") %></td></tr>
|
||||
<tr><td>Hbase Root Directory</td><td><%= master.getRootDir().toString() %></td></tr>
|
||||
<tr><th>Attribute Name</th><th>Value</th><th>Description</th></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>
|
||||
|
||||
<h2>Online META Regions</h2>
|
||||
|
@ -69,6 +70,7 @@
|
|||
<% if (serverToServerInfos != null && serverToServerInfos.size() > 0) { %>
|
||||
<table>
|
||||
<tr><th>Address</th><th>Start Code</th><th>Load</th></tr>
|
||||
|
||||
<% for (Map.Entry<String, HServerInfo> e: serverToServerInfos.entrySet()) {
|
||||
HServerInfo hsi = e.getValue();
|
||||
String url = "http://" +
|
||||
|
@ -81,6 +83,7 @@
|
|||
<tr><td><a href="<%= url %>"><%= address %></a></td><td><%= startCode %></td><td><%= load %></tr>
|
||||
<% } %>
|
||||
</table>
|
||||
<p>Load is requests per <em>hbase.regionsserver.msginterval</em> (<%=interval%> second(s)) and count of regions loaded</p>
|
||||
<% } %>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -21,13 +21,13 @@
|
|||
<body>
|
||||
<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>
|
||||
<h1 id="page_title">Region Server: <%= serverInfo.getServerAddress().toString() %></h1>
|
||||
<p id="links_menu"><a href="/logs/">Local logs</a>, <a href="/stacks">Thread Dump</a></p>
|
||||
<p id="links_menu"><a href="/logs/">Local logs</a>, <a href="/stacks">Thread Dump</a>, <a href="/logLevel">Log Level</a></p>
|
||||
<hr id="head_rule" />
|
||||
|
||||
<h2>Region Server Attributes</h2>
|
||||
<table>
|
||||
<tr><th>Attribute Name</th><th>Value</th></tr>
|
||||
<tr><td>Load</td><td><%= serverInfo.getLoad().toString() %></td></tr>
|
||||
<tr><th>Attribute Name</th><th>Value</th><th>Description</th></tr>
|
||||
<tr><td>Load</td><td><%= serverInfo.getLoad().toString() %></td><td>Requests/<em>hbase.regionserver.msginterval</em> + count of loaded regions</td></tr>
|
||||
</table>
|
||||
|
||||
<h2>Online Regions</h2>
|
||||
|
|
Loading…
Reference in New Issue