package org.apache.hadoop.mapred; import javax.servlet.*; import javax.servlet.http.*; import javax.servlet.jsp.*; import javax.servlet.*; import javax.servlet.http.*; import java.io.*; import java.lang.String; import java.text.*; import java.util.*; import org.apache.hadoop.mapred.*; import org.apache.hadoop.util.*; import java.text.SimpleDateFormat; public final class taskstats_jsp extends org.apache.jasper.runtime.HttpJspBase implements org.apache.jasper.runtime.JspSourceDependent { private static java.util.List _jspx_dependants; public Object getDependants() { return _jspx_dependants; } public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException { JspFactory _jspxFactory = null; PageContext pageContext = null; HttpSession session = null; ServletContext application = null; ServletConfig config = null; JspWriter out = null; Object page = this; JspWriter _jspx_out = null; PageContext _jspx_page_context = null; try { _jspxFactory = JspFactory.getDefaultFactory(); response.setContentType("text/html; charset=UTF-8"); pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true); _jspx_page_context = pageContext; application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; out.write('\n'); JobTracker tracker = (JobTracker) application.getAttribute("job.tracker"); String trackerName = StringUtils.simpleHostname(tracker.getJobTrackerMachine()); String jobid = request.getParameter("jobid"); String tipid = request.getParameter("tipid"); String taskid = request.getParameter("taskid"); JobID jobidObj = JobID.forName(jobid); TaskID tipidObj = TaskID.forName(tipid); TaskAttemptID taskidObj = TaskAttemptID.forName(taskid); JobInProgress job = (JobInProgress) tracker.getJob(jobidObj); Format decimal = new DecimalFormat(); Counters counters; if (taskid == null) { counters = tracker.getTipCounters(tipidObj); taskid = tipid; // for page title etc } else { TaskStatus taskStatus = tracker.getTaskStatus(taskidObj); counters = taskStatus.getCounters(); } out.write("\n\n\n \n Counters for "); out.print(taskid); out.write("\n \n\n

Counters for "); out.print(taskid); out.write("

\n\n
\n\n"); if ( counters == null ) { out.write("\n

No counter information found for this task

\n"); } else { out.write("\n \n"); for (String groupName : counters.getGroupNames()) { Counters.Group group = counters.getGroup(groupName); String displayGroupName = group.getDisplayName(); out.write("\n \n \n \n"); for (Counters.Counter counter : group) { String displayCounterName = counter.getDisplayName(); long value = counter.getCounter(); out.write("\n \n \n \n \n \n"); } } out.write("\n

"); out.print(displayGroupName); out.write("
"); out.print(displayCounterName); out.write(""); out.print(decimal.format(value)); out.write("
\n"); } out.write("\n\n
\nGo back to the job
\nGo back to JobTracker
\n"); out.println(ServletUtil.htmlFooter()); out.write('\n'); } catch (Throwable t) { if (!(t instanceof SkipPageException)){ out = _jspx_out; if (out != null && out.getBufferSize() != 0) out.clearBuffer(); if (_jspx_page_context != null) _jspx_page_context.handlePageException(t); } } finally { if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context); } } }