Last change
on this file 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.4 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.fs.*" |
---|
9 | import="org.apache.hadoop.util.*" |
---|
10 | %> |
---|
11 | |
---|
12 | |
---|
13 | <% |
---|
14 | JobTracker tracker = (JobTracker) application.getAttribute("job.tracker"); |
---|
15 | String jobId = request.getParameter("jobid"); |
---|
16 | if (jobId == null) { |
---|
17 | out.println("<h2>Missing 'jobid' for fetching job configuration!</h2>"); |
---|
18 | return; |
---|
19 | } |
---|
20 | %> |
---|
21 | |
---|
22 | <html> |
---|
23 | |
---|
24 | <title>Job Configuration: JobId - <%= jobId %></title> |
---|
25 | |
---|
26 | <body> |
---|
27 | <h2>Job Configuration: JobId - <%= jobId %></h2><br> |
---|
28 | |
---|
29 | <% |
---|
30 | Path logDir = new Path(request.getParameter("jobLogDir")); |
---|
31 | Path jobFilePath = new Path(logDir, |
---|
32 | request.getParameter("jobUniqueString") + "_conf.xml"); |
---|
33 | FileSystem fs = (FileSystem)request.getSession().getAttribute("fs"); |
---|
34 | FSDataInputStream jobFile = null; |
---|
35 | try { |
---|
36 | jobFile = fs.open(jobFilePath); |
---|
37 | JobConf jobConf = new JobConf(jobFilePath); |
---|
38 | XMLUtils.transform( |
---|
39 | jobConf.getConfResourceAsInputStream("webapps/static/jobconf.xsl"), |
---|
40 | jobFile, out); |
---|
41 | } catch (Exception e) { |
---|
42 | out.println("Failed to retreive job configuration for job '" + jobId + "!"); |
---|
43 | out.println(e); |
---|
44 | } finally { |
---|
45 | if (jobFile != null) { |
---|
46 | try { |
---|
47 | jobFile.close(); |
---|
48 | } catch (IOException e) {} |
---|
49 | } |
---|
50 | } |
---|
51 | %> |
---|
52 | |
---|
53 | <br> |
---|
54 | <% |
---|
55 | out.println(ServletUtil.htmlFooter()); |
---|
56 | %> |
---|
Note: See
TracBrowser
for help on using the repository browser.