瀏覽代碼

HADOOP-1590. Use relative paths in jobtracker web ui. Contributed by Thomas Friol.

git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk@555418 13f79535-47bb-0310-9956-ffa450edef68
Doug Cutting 18 年之前
父節點
當前提交
bd03f6d464

+ 6 - 3
CHANGES.txt

@@ -318,9 +318,12 @@ Trunk (unreleased changes)
  98. HADOOP-1486.  Fix so that fatal exceptions in namenode cause it
      to exit.  (Dhruba Borthakur via cutting)
 
- 99. HADOOP-1470.  Factor checksum code out of ChecksumFileSystem so
-     that it can be reused by FileSystem's with built-in checksumming.
-     (Hairong Kuang via cutting)
+ 99. HADOOP-1470.  Factor checksum generation and validation out of
+     ChecksumFileSystem so that it can be reused by FileSystem's with
+     built-in checksumming.  (Hairong Kuang via cutting)
+
+100. HADOOP-1590.  Use relative urls in jobtracker jsp pages, so that
+     webapp can be used in non-root contexts.  (Thomas Friol via cutting)
 
 
 Release 0.13.0 - 2007-06-08

+ 2 - 2
src/webapps/job/jobblacklistedtrackers.jsp

@@ -46,7 +46,7 @@
 <html>
 <title>Hadoop <%=jobId%>'s black-listed tasktrackers</title>
 <body>
-<h1>Hadoop <a href="/jobdetails.jsp?jobid=<%=jobId%>"><%=jobId%></a> - 
+<h1>Hadoop <a href="jobdetails.jsp?jobid=<%=jobId%>"><%=jobId%></a> - 
 Black-listed task-trackers</h1>
 
 <% 
@@ -54,7 +54,7 @@ Black-listed task-trackers</h1>
 %>
 
 <hr>
-<a href="/jobdetails.jsp?jobid=><%=jobId%>">Go back to <%=jobId%></a><br>
+<a href="jobdetails.jsp?jobid=><%=jobId%>">Go back to <%=jobId%></a><br>
 <a href="http://lucene.apache.org/hadoop">Hadoop</a>, 2006.<br>
 </body>
 </html>

+ 8 - 8
src/webapps/job/jobdetails.jsp

@@ -44,7 +44,7 @@
       failedTaskAttempts += task.numTaskFailures();
       killedTaskAttempts += task.numKilledTasks();
     }
-    out.print("<tr><th><a href=\"/jobtasks.jsp?jobid=" + jobId + 
+    out.print("<tr><th><a href=\"jobtasks.jsp?jobid=" + jobId + 
               "&type="+ kind + "&pagenum=1\">" + kind + 
               "</a></th><td align=\"right\">" + 
               StringUtils.formatPercent(completePercent, 2) +
@@ -60,14 +60,14 @@
               killedTasks +
               "</td><td align=\"right\">" + 
               ((failedTaskAttempts > 0) ? 
-                  ("<a href=\"/jobfailures.jsp?jobid=" + jobId + 
+                  ("<a href=\"jobfailures.jsp?jobid=" + jobId + 
                    "&kind=" + kind + "&cause=failed\">" + failedTaskAttempts + 
                    "</a>") : 
                   "0"
                   ) + 
               " / " +
               ((killedTaskAttempts > 0) ? 
-                  ("<a href=\"/jobfailures.jsp?jobid=" + jobId + 
+                  ("<a href=\"jobfailures.jsp?jobid=" + jobId + 
                    "&kind=" + kind + "&cause=killed\">" + killedTaskAttempts + 
                    "</a>") : 
                   "0"
@@ -126,7 +126,7 @@
 <title>Hadoop <%=jobId%> on <%=trackerName%></title>
 </head>
 <body>
-<h1>Hadoop <%=jobId%> on <a href="/jobtracker.jsp"><%=trackerName%></a></h1>
+<h1>Hadoop <%=jobId%> on <a href="jobtracker.jsp"><%=trackerName%></a></h1>
 
 <% 
     if (job == null) {
@@ -140,7 +140,7 @@
     out.print("<b>User:</b> " + profile.getUser() + "<br>\n");
     out.print("<b>Job Name:</b> " + profile.getJobName() + "<br>\n");
     if (runState == JobStatus.RUNNING) {
-      out.print("<b>Job File:</b> <a href=\"/jobconf.jsp?jobid=" + jobId + "\">" + 
+      out.print("<b>Job File:</b> <a href=\"jobconf.jsp?jobid=" + jobId + "\">" + 
           profile.getJobFile() + "</a><br>\n");
     } else {
       out.print("<b>Job File:</b> " + profile.getJobFile() + "<br>\n");
@@ -169,7 +169,7 @@
     }
     if (flakyTaskTrackers > 0) {
       out.print("<b>Black-listed TaskTrackers:</b> " + 
-          "<a href=\"/jobblacklistedtrackers.jsp?jobid=" + jobId + "\">" +
+          "<a href=\"jobblacklistedtrackers.jsp?jobid=" + jobId + "\">" +
           flakyTaskTrackers + "</a><br>\n");
     }
     out.print("<hr>\n");
@@ -177,7 +177,7 @@
     out.print("<tr><th>Kind</th><th>% Complete</th><th>Num Tasks</th>" +
               "<th>Pending</th><th>Running</th><th>Complete</th>" +
               "<th>Killed</th>" +
-              "<th><a href=\"/jobfailures.jsp?jobid=" + jobId + 
+              "<th><a href=\"jobfailures.jsp?jobid=" + jobId + 
               "\">Failed/Killed<br>Task Attempts</a></th></tr>\n");
     printTaskSummary(out, jobId, "map", status.mapProgress(), 
                      job.getMapTasks());
@@ -239,7 +239,7 @@
 	<hr><a href="jobdetails.jsp?action=confirm&jobid=<%=jobId%>"> Kill this job </a>
 <% } %>
 <hr>
-<a href="/jobtracker.jsp">Go back to JobTracker</a><br>
+<a href="jobtracker.jsp">Go back to JobTracker</a><br>
 <a href="http://lucene.apache.org/hadoop">Hadoop</a>, 2006.<br>
 </body>
 </html>

+ 4 - 4
src/webapps/job/jobfailures.jsp

@@ -26,7 +26,7 @@
         String taskTrackerName = statuses[i].getTaskTracker();
         TaskTrackerStatus taskTracker = tracker.getTaskTracker(taskTrackerName);
         out.print("<tr><td>" + statuses[i].getTaskId() +
-                  "</td><td><a href=\"/taskdetails.jsp?jobid="+ jobId + 
+                  "</td><td><a href=\"taskdetails.jsp?jobid="+ jobId + 
                   "&tipid=" + tipId + "\">" + tipId +
                   "</a></td>");
         if (taskTracker == null) {
@@ -144,15 +144,15 @@
 <html>
 <title>Hadoop <%=jobId%> failures on <%=trackerName%></title>
 <body>
-<h1>Hadoop <a href="/jobdetails.jsp?jobid=<%=jobId%>"><%=jobId%></a>
-failures on <a href="/jobtracker.jsp"><%=trackerName%></a></h1>
+<h1>Hadoop <a href="jobdetails.jsp?jobid=<%=jobId%>"><%=jobId%></a>
+failures on <a href="jobtracker.jsp"><%=trackerName%></a></h1>
 
 <% 
     printFailures(out, jobId, kind, cause); 
 %>
 
 <hr>
-<a href="/jobtracker.jsp">Go back to JobTracker</a><br>
+<a href="jobtracker.jsp">Go back to JobTracker</a><br>
 <a href="http://lucene.apache.org/hadoop">Hadoop</a>, 2006.<br>
 </body>
 </html>

+ 6 - 6
src/webapps/job/jobtasks.jsp

@@ -41,8 +41,8 @@
   </head>
 <body>
 <h1>Hadoop <%=type%> task list for 
-<a href="/jobdetails.jsp?jobid=<%=jobid%>"><%=jobid%></a> on 
-<a href="/jobtracker.jsp"><%=trackerLabel%></a></h1>
+<a href="jobdetails.jsp?jobid=<%=jobid%>"><%=jobid%></a> on 
+<a href="jobtracker.jsp"><%=trackerLabel%></a></h1>
 <%
   if (job == null) {
     out.print("<b>Job " + jobid + " not found.</b><br>\n");
@@ -80,7 +80,7 @@
          }
          out.println("</pre><br/></td>");
          out.println("<td>" + 
-             "<a href=\"/taskstats.jsp?jobid=" + jobid + 
+             "<a href=\"taskstats.jsp?jobid=" + jobid + 
              "&tipid=" + report.getTaskId() +
              "\">" + report.getCounters().size() +
              "</a></td></tr>");
@@ -90,19 +90,19 @@
   }
   if (end_index < report_len) {
     out.print("<div style=\"text-align:right\">" + 
-              "<a href=\"/jobtasks.jsp?jobid="+ jobid + "&type=" + type +
+              "<a href=\"jobtasks.jsp?jobid="+ jobid + "&type=" + type +
               "&pagenum=" + next_page +
               "\">" + "Next" + "</a></div>");
   }
   if (start_index != 0) {
       out.print("<div style=\"text-align:right\">" + 
-                "<a href=\"/jobtasks.jsp?jobid="+ jobid + "&type=" + type +
+                "<a href=\"jobtasks.jsp?jobid="+ jobid + "&type=" + type +
                 "&pagenum=" + (pnum -1) + "\">" + "Prev" + "</a></div>");
   }
 %>
 
 <hr>
-<a href="/jobtracker.jsp">Go back to JobTracker</a><br>
+<a href="jobtracker.jsp">Go back to JobTracker</a><br>
 <a href="http://lucene.apache.org/hadoop">Hadoop</a>, 2006.<br>
 </body>
 </html>

+ 2 - 2
src/webapps/job/jobtracker.jsp

@@ -69,7 +69,7 @@
     out.print("<tr><td>" + status.getMapTasks() + "</td><td>" +
               status.getReduceTasks() + "</td><td>" + 
               status.getMaxTasks() + "</td><td>" +
-              tracker.getTotalSubmissions() + "</td><td><a href=\"/machines.jsp\">" +
+              tracker.getTotalSubmissions() + "</td><td><a href=\"machines.jsp\">" +
               status.getTaskTrackers() + "</a></td></tr></table>\n");
   }
 %>
@@ -117,7 +117,7 @@
 <hr>
 
 <h2>Local logs</h2>
-<a href="/logs/">Log</a> directory, <a href="jobhistory.jsp?historyFile=JobHistory.log&reload=true">
+<a href="logs/">Log</a> directory, <a href="jobhistory.jsp?historyFile=JobHistory.log&reload=true">
 Job Tracker History</a>
 
 <hr>

+ 1 - 1
src/webapps/job/machines.jsp

@@ -66,7 +66,7 @@
 <title><%=trackerLabel%> Hadoop Machine List</title>
 
 <body>
-<h1><a href="/jobtracker.jsp"><%=trackerLabel%></a> Hadoop Machine List</h1>
+<h1><a href="jobtracker.jsp"><%=trackerLabel%></a> Hadoop Machine List</h1>
 
 <h2>Task Trackers</h2>
 <%

+ 2 - 2
src/webapps/job/taskdetails.jsp

@@ -113,8 +113,8 @@
 </center>
 
 <hr>
-<a href="/jobdetails.jsp?jobid=<%=jobid%>">Go back to the job</a><br>
-<a href="/jobtracker.jsp">Go back to JobTracker</a><br>
+<a href="jobdetails.jsp?jobid=<%=jobid%>">Go back to the job</a><br>
+<a href="jobtracker.jsp">Go back to JobTracker</a><br>
 <a href="http://lucene.apache.org/hadoop">Hadoop</a>, 2006.<br>
 </body>
 </html>

+ 2 - 2
src/webapps/job/taskstats.jsp

@@ -74,8 +74,8 @@
 %>
 
 <hr>
-<a href="/jobdetails.jsp?jobid=<%=jobid%>">Go back to the job</a><br>
-<a href="/jobtracker.jsp">Go back to JobTracker</a><br>
+<a href="jobdetails.jsp?jobid=<%=jobid%>">Go back to the job</a><br>
+<a href="jobtracker.jsp">Go back to JobTracker</a><br>
 <a href="http://lucene.apache.org/hadoop">Hadoop</a>, 2006.<br>
 </body>
 </html>