You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by om...@apache.org on 2011/03/04 04:24:34 UTC
svn commit: r1076943 -
/hadoop/common/branches/branch-0.20-security-patches/src/webapps/job/machines.jsp
Author: omalley
Date: Fri Mar 4 03:24:33 2011
New Revision: 1076943
URL: http://svn.apache.org/viewvc?rev=1076943&view=rev
Log:
commit 91fa98011ec90265fd44f8b6c0dbd9d855249edd
Author: Lee Tucker <lt...@yahoo-inc.com>
Date: Thu Jul 30 17:40:27 2009 -0700
Applying patch 2790481.5643.patch
Modified:
hadoop/common/branches/branch-0.20-security-patches/src/webapps/job/machines.jsp
Modified: hadoop/common/branches/branch-0.20-security-patches/src/webapps/job/machines.jsp
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-patches/src/webapps/job/machines.jsp?rev=1076943&r1=1076942&r2=1076943&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security-patches/src/webapps/job/machines.jsp (original)
+++ hadoop/common/branches/branch-0.20-security-patches/src/webapps/job/machines.jsp Fri Mar 4 03:24:33 2011
@@ -20,10 +20,13 @@
JobTracker tracker) throws IOException {
Collection c;
if (("blacklisted").equals(type)) {
+ out.println("<h2>Blacklisted Task Trackers</h2>");
c = tracker.blacklistedTaskTrackers();
} else if (("active").equals(type)) {
+ out.println("<h2>Active Task Trackers</h2>");
c = tracker.activeTaskTrackers();
} else {
+ out.println("<h2>Task Trackers</h2>");
c = tracker.taskTrackers();
}
if (c.size() == 0) {
@@ -74,6 +77,26 @@
}
}
+ public void generateTableForExcludedNodes(JspWriter out, JobTracker tracker)
+ throws IOException {
+ // excluded nodes
+ out.println("<h2>Excluded Nodes</h2>");
+ Collection<String> d = tracker.getExcludedNodes();
+ if (d.size() == 0) {
+ out.print("There are currently no excluded hosts.");
+ } else {
+ out.print("<center>\n");
+ out.print("<table border=\"2\" cellpadding=\"5\" cellspacing=\"2\">\n");
+ out.print("<tr>");
+ out.print("<td><b>Host Name</b></td></tr>\n");
+ for (Iterator it = d.iterator(); it.hasNext(); ) {
+ String dt = (String)it.next();
+ out.print("<td>" + dt + "</td></tr>\n");
+ }
+ out.print("</table>\n");
+ out.print("</center>\n");
+ }
+ }
%>
<html>
@@ -83,9 +106,12 @@
<body>
<h1><a href="jobtracker.jsp"><%=trackerName%></a> Hadoop Machine List</h1>
-<h2>Task Trackers</h2>
<%
- generateTaskTrackerTable(out, type, tracker);
+ if (("excluded").equals(type)) {
+ generateTableForExcludedNodes(out, tracker);
+ } else {
+ generateTaskTrackerTable(out, type, tracker);
+ }
%>
<%