hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nspiegelb...@apache.org
Subject svn commit: r1182036 - in /hbase/branches/0.89/src/main: java/org/apache/hadoop/hbase/master/ java/org/apache/hadoop/hbase/regionserver/ java/org/apache/hadoop/hbase/util/ resources/hbase-webapps/master/ resources/hbase-webapps/regionserver/
Date Tue, 11 Oct 2011 19:13:15 GMT
Author: nspiegelberg
Date: Tue Oct 11 19:13:15 2011
New Revision: 1182036

URL: http://svn.apache.org/viewvc?rev=1182036&view=rev
Log:
Show non-default hadoop/hbase configuration in /conf servelet

Summary:
1) Port the change HADOOP-6408 to our hadoop branch.

It will help us to dump hbase configuration as well (HBASE-4418/D317290)

Also It put a link in the name node web UI.
There is a link: HDFS Configuration link there
http://localhost:50070/dfshealth.jsp
http://localhost:50070/conf

Also it can show as xml and json format:
http://localhost:50070/conf?format=xml
http://localhost:50070/conf?format=json

2) Implement HBASE-4418 here.
There will be a "HBase Configuration" link in master and region server web UI:
http://localhost:60010/master.jsp
http://localhost:60030/regionserver.jsp

It will show all the configuration as xml or json format as well.

http://localhost:60030/conf?format=xml
http://localhost:60030/conf?format=json

3) I have created a follow up jira, HADOOP-7702,  to support to show default
configuration value in the /conf servlet.  So HBase can get it free.

Test Plan: Tested in dev cluster.

Reviewers: hkuang, dhruba, kannan, pritam, nspiegelberg, mbautin, kranganathan

Reviewed By: kannan

CC: hbase-hdfs@lists, hbase@lists, hbase-eng@lists, lshepard, mattwkelly,
liyintang, kannan

Differential Revision: 335949

Modified:
    hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
    hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
    hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/util/InfoServer.java
    hbase/branches/0.89/src/main/resources/hbase-webapps/master/master.jsp
    hbase/branches/0.89/src/main/resources/hbase-webapps/regionserver/regionserver.jsp

Modified: hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/master/HMaster.java?rev=1182036&r1=1182035&r2=1182036&view=diff
==============================================================================
--- hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/master/HMaster.java (original)
+++ hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/master/HMaster.java Tue Oct
11 19:13:15 2011
@@ -885,7 +885,7 @@ public class HMaster extends Thread impl
       int port = this.conf.getInt("hbase.master.info.port", 60010);
       if (port >= 0) {
         String a = this.conf.get("hbase.master.info.bindAddress", "0.0.0.0");
-        this.infoServer = new InfoServer(MASTER, a, port, false);
+        this.infoServer = new InfoServer(MASTER, a, port, false, conf);
         this.infoServer.setAttribute(MASTER, this);
         this.infoServer.start();
       }

Modified: hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java?rev=1182036&r1=1182035&r2=1182036&view=diff
==============================================================================
--- hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
(original)
+++ hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
Tue Oct 11 19:13:15 2011
@@ -1221,7 +1221,8 @@ public class HRegionServer implements HR
           false);
       while (true) {
         try {
-          this.infoServer = new InfoServer("regionserver", addr, port, false);
+          this.infoServer = new InfoServer("regionserver", addr, port, false,
+              conf);
           this.infoServer.setAttribute("regionserver", this);
           this.infoServer.start();
           break;

Modified: hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/util/InfoServer.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/util/InfoServer.java?rev=1182036&r1=1182035&r2=1182036&view=diff
==============================================================================
--- hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/util/InfoServer.java (original)
+++ hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/util/InfoServer.java Tue Oct
11 19:13:15 2011
@@ -20,6 +20,7 @@
 
 package org.apache.hadoop.hbase.util;
 
+import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.http.HttpServer;
 import org.mortbay.jetty.handler.ContextHandlerCollection;
 import org.mortbay.jetty.servlet.Context;
@@ -49,9 +50,9 @@ public class InfoServer extends HttpServ
    * increment by 1 until it finds a free port.
    * @throws IOException e
    */
-  public InfoServer(String name, String bindAddress, int port, boolean findPort)
-  throws IOException {
-    super(name, bindAddress, port, findPort);
+  public InfoServer(String name, String bindAddress, int port,
+      boolean findPort, Configuration conf) throws IOException {
+    super(name, bindAddress, port, findPort, conf);
     webServer.addHandler(new ContextHandlerCollection());
   }
 

Modified: hbase/branches/0.89/src/main/resources/hbase-webapps/master/master.jsp
URL: http://svn.apache.org/viewvc/hbase/branches/0.89/src/main/resources/hbase-webapps/master/master.jsp?rev=1182036&r1=1182035&r2=1182036&view=diff
==============================================================================
--- hbase/branches/0.89/src/main/resources/hbase-webapps/master/master.jsp (original)
+++ hbase/branches/0.89/src/main/resources/hbase-webapps/master/master.jsp Tue Oct 11 19:13:15
2011
@@ -38,7 +38,7 @@
 <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">Master: <%=master.getMasterAddress().getHostname()%>:<%=master.getMasterAddress().getPort()%></h1>
-<p id="links_menu"><a href="/logs/">Local logs</a>, <a href="/stacks">Thread
Dump</a>, <a href="/logLevel">Log Level</a>, <a href="/taskmonitor">Task
Monitor</a></p>
+<p id="links_menu"><a href="/logs/">Local logs</a>, <a href="/stacks">Thread
Dump</a>, <a href="/logLevel">Log Level</a>, <a href="/taskmonitor">Task
Monitor</a>, <a href="/conf">HBase Configuration</a></p>
 
 <!-- Various warnings that cluster admins should be aware of -->
 <% if (JvmVersion.isBadJvmVersion()) { %>

Modified: hbase/branches/0.89/src/main/resources/hbase-webapps/regionserver/regionserver.jsp
URL: http://svn.apache.org/viewvc/hbase/branches/0.89/src/main/resources/hbase-webapps/regionserver/regionserver.jsp?rev=1182036&r1=1182035&r2=1182036&view=diff
==============================================================================
--- hbase/branches/0.89/src/main/resources/hbase-webapps/regionserver/regionserver.jsp (original)
+++ hbase/branches/0.89/src/main/resources/hbase-webapps/regionserver/regionserver.jsp Tue
Oct 11 19:13:15 2011
@@ -33,7 +33,7 @@
 <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().getHostname()
%>:<%= serverInfo.getServerAddress().getPort() %></h1>
-<p id="links_menu"><a href="/logs/">Local logs</a>, <a href="/stacks">Thread
Dump</a>, <a href="/logLevel">Log Level</a>, <a href="/taskmonitor">Task
Monitor</a></p>
+<p id="links_menu"><a href="/logs/">Local logs</a>, <a href="/stacks">Thread
Dump</a>, <a href="/logLevel">Log Level</a>, <a href="/taskmonitor">Task
Monitor</a>, <a href="/conf">HBase Configuration</a></p>
 <hr id="head_rule" />
 
 <h2>Region Server Attributes</h2>



Mime
View raw message