HBASE-3839 Add monitoring of currently running tasks to the master and RS web UIs

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1099202 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Todd Lipcon 2011-05-03 19:09:20 +00:00
parent 7d5d1fe752
commit 214f63b6c8
5 changed files with 74 additions and 0 deletions

View File

@ -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

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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;
}