HBASE-4418 Show all the hbase configuration in the web ui

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1185859 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Nicolas Spiegelberg 2011-10-18 21:05:14 +00:00
parent a1a1b1b781
commit dcb718d0c5
5 changed files with 28 additions and 3 deletions

View File

@ -16,6 +16,7 @@ Release 0.93.0 - Unreleased
CacheConf class (jgray)
HBASE-4102 atomicAppend: A put that appends to the latest version of a cell (Lars H)
HBASE-4469 Avoid top row seek by looking up bloomfilter (liyin via jgray)
HBASE-4418 Show all the hbase configuration in the web ui
BUG FIXES
HBASE-4488 Store could miss rows during flush (Lars H via jgray)

View File

@ -42,6 +42,7 @@ org.apache.hadoop.hbase.ServerName;
org.apache.hadoop.hbase.client.HBaseAdmin;
org.apache.hadoop.hbase.client.HConnectionManager;
org.apache.hadoop.hbase.HTableDescriptor;
org.apache.hadoop.hbase.HBaseConfiguration;
</%import>
<%if format.equals("json") %>
<& ../common/TaskMonitorTmpl; filter = filter; format = "json" &>
@ -62,7 +63,10 @@ org.apache.hadoop.hbase.HTableDescriptor;
<a href="/logs/">Local logs</a>,
<a href="/stacks">Thread Dump</a>,
<a href="/logLevel">Log Level</a>,
<a href="/dump">Debug dump</a>
<a href="/dump">Debug dump</a>,
<%if HBaseConfiguration.isShowConfInServlet()%>
<a href="/conf">HBase Configuration</a>
</%if>
</p>
<!-- Various warnings that cluster admins should be aware of -->

View File

@ -34,6 +34,7 @@ org.apache.hadoop.hbase.HConstants;
org.apache.hadoop.hbase.HServerInfo;
org.apache.hadoop.hbase.HServerLoad;
org.apache.hadoop.hbase.HRegionInfo;
org.apache.hadoop.hbase.HBaseConfiguration;
</%import>
<%if format.equals("json") %>
<& ../common/TaskMonitorTmpl; filter = filter; format = "json" &>
@ -66,7 +67,10 @@ org.apache.hadoop.hbase.HRegionInfo;
<a href="/logs/">Local logs</a>,
<a href="/stacks">Thread Dump</a>,
<a href="/logLevel">Log Level</a>,
<a href="/dump">Debug dump</a>
<a href="/dump">Debug dump</a>,
<%if HBaseConfiguration.isShowConfInServlet() %>
<a href="/conf">HBase Configuration</a>
</%if>
</p>
<hr id="head_rule" />

View File

@ -122,4 +122,20 @@ public class HBaseConfiguration extends Configuration {
destConf.set(e.getKey(), e.getValue());
}
}
/**
*
* @return whether to show HBase Configuration in servlet
*/
public static boolean isShowConfInServlet() {
boolean isShowConf = false;
try {
if (Class.forName("org.apache.hadoop.conf.ConfServlet") != null) {
isShowConf = true;
}
} catch (Exception e) {
}
return isShowConf;
}
}

View File

@ -57,7 +57,7 @@ public class InfoServer extends HttpServer {
public InfoServer(String name, String bindAddress, int port, boolean findPort,
final Configuration c)
throws IOException {
super(name, bindAddress, port, findPort, HBaseConfiguration.create());
super(name, bindAddress, port, findPort, c);
this.config = c;
fixupLogsServletLocation();
}