%
/*
* 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.
*/
%>
<%@ page
contentType="text/html; charset=UTF-8"
import="javax.servlet.*"
import="javax.servlet.http.*"
import="java.io.*"
import="java.util.*"
import="java.text.DecimalFormat"
import="org.apache.hadoop.http.HtmlQuoting"
import="org.apache.hadoop.mapred.*"
import="org.apache.hadoop.util.*"
%>
<%! private static final long serialVersionUID = 1L;
%>
<%
TaskTracker tracker = (TaskTracker) application.getAttribute("task.tracker");
String trackerName = tracker.getName();
%>
<%= trackerName %> Task Tracker Status
<%= trackerName %> Task Tracker Status
Version: <%= VersionInfo.getVersion()%>,
<%= VersionInfo.getRevision()%>
Compiled: <%= VersionInfo.getDate()%> by
<%= VersionInfo.getUser()%> from
<%= VersionInfo.getBranch()%>
Running tasks
Task Attempts | Status |
Progress | Errors |
<%
Iterator itr = tracker.getRunningTaskStatuses().iterator();
while (itr.hasNext()) {
TaskStatus status = (TaskStatus) itr.next();
out.print("" + status.getTaskID());
out.print(" | " + status.getRunState());
out.print(" | " +
StringUtils.formatPercent(status.getProgress(), 2));
out.print(" | " +
HtmlQuoting.quoteHtmlChars(status.getDiagnosticInfo()) +
" | ");
out.print("
\n");
}
%>
Non-Running Tasks
Task Attempts | Status |
<%
for(TaskStatus status: tracker.getNonRunningTasks()) {
out.print("
" + status.getTaskID() + " | ");
out.print("" + status.getRunState() + " |
\n");
}
%>
Tasks from Running Jobs
Task Attempts | Status |
Progress | Errors |
<%
itr = tracker.getTasksFromRunningJobs().iterator();
while (itr.hasNext()) {
TaskStatus status = (TaskStatus) itr.next();
out.print("" + status.getTaskID());
out.print(" | " + status.getRunState());
out.print(" | " +
StringUtils.formatPercent(status.getProgress(), 2));
out.print(" | " +
HtmlQuoting.quoteHtmlChars(status.getDiagnosticInfo()) +
" | ");
out.print("
\n");
}
%>
Local Logs
Log directory
<%
out.println(ServletUtil.htmlFooter());
%>