Author: todd
Date: Tue May 3 19:09:20 2011
New Revision: 1099202
URL: http://svn.apache.org/viewvc?rev=1099202&view=rev
Log:
HBASE-3839 Add monitoring of currently running tasks to the master and RS web
UIs
Added:
hbase/trunk/src/main/jamon/org/apache/hbase/tmpl/common/
hbase/trunk/src/main/jamon/org/apache/hbase/tmpl/common/TaskMonitorTmpl.jamon
Modified:
hbase/trunk/CHANGES.txt
hbase/trunk/src/main/jamon/org/apache/hbase/tmpl/master/MasterStatusTmpl.jamon
hbase/trunk/src/main/jamon/org/apache/hbase/tmpl/regionserver/RSStatusTmpl.jamon
hbase/trunk/src/main/resources/hbase-webapps/static/hbase.css
Modified: hbase/trunk/CHANGES.txt
URL:
http://svn.apache.org/viewvc/hbase/trunk/CHANGES.txt?rev=1099202&r1=1099201&r2=1099202&view=diff
==============================================================================
--- hbase/trunk/CHANGES.txt (original)
+++ hbase/trunk/CHANGES.txt Tue May 3 19:09:20 2011
@@ -237,6 +237,8 @@ Release 0.91.0 - Unreleased
HBASE-3836 Add facility to track currently progressing actions and
workflows. (todd)
HBASE-3837 Show regions in transition on the master web page (todd)
+ HBASE-3839 Add monitoring of currently running tasks to the master and
+ RS web UIs
Release 0.90.3 - Unreleased
Added:
hbase/trunk/src/main/jamon/org/apache/hbase/tmpl/common/TaskMonitorTmpl.jamon
URL:
http://svn.apache.org/viewvc/hbase/trunk/src/main/jamon/org/apache/hbase/tmpl/common/TaskMonitorTmpl.jamon?rev=1099202&view=auto
==============================================================================
---
hbase/trunk/src/main/jamon/org/apache/hbase/tmpl/common/TaskMonitorTmpl.jamon
(added)
+++
hbase/trunk/src/main/jamon/org/apache/hbase/tmpl/common/TaskMonitorTmpl.jamon
Tue May 3 19:09:20 2011
@@ -0,0 +1,59 @@
+<%doc>
+Copyright 2011 The Apache Software Foundation
+
+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.
+</%doc>
+<%import>
+java.util.*;
+org.apache.hadoop.hbase.monitoring.*;
+</%import>
+<%args>
+TaskMonitor taskMonitor = TaskMonitor.get();
+</%args>
+<%java>
+long now = System.currentTimeMillis();
+List<MonitoredTask> tasks = taskMonitor.getTasks();
+Collections.reverse(tasks);
+
+</%java>
+<h2>Currently running tasks</h2>
+
+<%if tasks.isEmpty()%>
+No tasks currently running on this node.
+<%else>
+
+<table>
+<tr>
+ <th>Description</th>
+ <th>Status</th>
+ <th>Age</th>
+</tr>
+<%for MonitoredTask task : tasks %>
+<tr class="task-monitor-<% task.getState() %>">
+ <td><% task.getDescription() %></td>
+ </td>
+ <td><% task.getStatus() %></td>
+ <td><% (int)((now - task.getStartTime())/1000) %>s
+ <%if task.getCompletionTimestamp() != -1%>
+ (Completed <% (now - task.getCompletionTimestamp())/1000 %>s ago)
+ </%if>
+ </td>
+</tr>
+</%for>
+</table>
+
+</%if>
\ No newline at end of file
Modified:
hbase/trunk/src/main/jamon/org/apache/hbase/tmpl/master/MasterStatusTmpl.jamon
URL:
http://svn.apache.org/viewvc/hbase/trunk/src/main/jamon/org/apache/hbase/tmpl/master/MasterStatusTmpl.jamon?rev=1099202&r1=1099201&r2=1099202&view=diff
==============================================================================
---
hbase/trunk/src/main/jamon/org/apache/hbase/tmpl/master/MasterStatusTmpl.jamon
(original)
+++
hbase/trunk/src/main/jamon/org/apache/hbase/tmpl/master/MasterStatusTmpl.jamon
Tue May 3 19:09:20 2011
@@ -88,6 +88,9 @@ org.apache.hadoop.hbase.HTableDescriptor
</%if>
<tr><td>Zookeeper Quorum</td><td><% master.getZooKeeperWatcher().getQuorum()
%></td><td>Addresses of all registered ZK servers. For more, see <a
href="/zk.jsp">zk dump</a>.</td></tr>
</table>
+
+<& ../common/TaskMonitorTmpl &>
+
<%if (rootLocation != null) %>
<& catalogTables &>
</%if>
Modified:
hbase/trunk/src/main/jamon/org/apache/hbase/tmpl/regionserver/RSStatusTmpl.jamon
URL:
http://svn.apache.org/viewvc/hbase/trunk/src/main/jamon/org/apache/hbase/tmpl/regionserver/RSStatusTmpl.jamon?rev=1099202&r1=1099201&r2=1099202&view=diff
==============================================================================
---
hbase/trunk/src/main/jamon/org/apache/hbase/tmpl/regionserver/RSStatusTmpl.jamon
(original)
+++
hbase/trunk/src/main/jamon/org/apache/hbase/tmpl/regionserver/RSStatusTmpl.jamon
Tue May 3 19:09:20 2011
@@ -68,6 +68,8 @@ org.apache.hadoop.hbase.HRegionInfo;
<tr><td>Zookeeper Quorum</td><td><% regionServer.getZooKeeper().getQuorum()
%></td><td>Addresses of all registered ZK servers</td></tr>
</table>
+<& ../common/TaskMonitorTmpl &>
+
<h2>Online Regions</h2>
<%if (onlineRegions != null && onlineRegions.size() > 0) %>
<table>
Modified: hbase/trunk/src/main/resources/hbase-webapps/static/hbase.css
URL:
http://svn.apache.org/viewvc/hbase/trunk/src/main/resources/hbase-webapps/static/hbase.css?rev=1099202&r1=1099201&r2=1099202&view=diff
==============================================================================
--- hbase/trunk/src/main/resources/hbase-webapps/static/hbase.css (original)
+++ hbase/trunk/src/main/resources/hbase-webapps/static/hbase.css Tue May 3
19:09:20 2011
@@ -17,3 +17,11 @@ div.warning {
td.undeployed-region {
background-color: #faa;
}
+
+tr.task-monitor-COMPLETE td {
+ background-color: #afa;
+}
+
+tr.task-monitor-ABORTED td {
+ background-color: #ffa;
+}