source: proiecte/HadoopJUnit/hadoop-0.20.1/src/webapps/job/jobconf.jsp @ 120

Last change on this file since 120 was 120, checked in by (none), 14 years ago

Added the mail files for the Hadoop JUNit Project

  • Property svn:executable set to *
File size: 1.2 KB
Line 
1<%@ page
2  contentType="text/html; charset=UTF-8"
3  import="javax.servlet.*"
4  import="javax.servlet.http.*"
5  import="java.io.*"
6  import="java.net.URL"
7  import="org.apache.hadoop.mapred.*"
8  import="org.apache.hadoop.util.*"
9%>
10
11
12<%
13  JobTracker tracker = (JobTracker) application.getAttribute("job.tracker");
14  String jobId = request.getParameter("jobid");
15  if (jobId == null) {
16    out.println("<h2>Missing 'jobid' for fetching job configuration!</h2>");
17        return;
18  }
19%>
20 
21<html>
22
23<title>Job Configuration: JobId - <%= jobId %></title>
24
25<body>
26<h2>Job Configuration: JobId - <%= jobId %></h2><br>
27
28<%
29  String jobFilePath = JobTracker.getLocalJobFilePath(JobID.forName(jobId));
30  FileInputStream jobFile = null;
31  try {
32    jobFile = new FileInputStream(jobFilePath);
33    JobConf jobConf = new JobConf(jobFilePath);
34    XMLUtils.transform(
35        jobConf.getConfResourceAsInputStream("webapps/static/jobconf.xsl"),
36        jobFile, out);
37  } catch (Exception e) {
38    out.println("Failed to retreive job configuration for job '" + jobId + "!");
39    out.println(e);
40  } finally {
41    if (jobFile != null) {
42      try { 
43        jobFile.close(); 
44      } catch (IOException e) {}
45    }
46  }
47%>
48
49<br>
50<%
51out.println(ServletUtil.htmlFooter());
52%>
Note: See TracBrowser for help on using the repository browser.