hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r480280 - in /lucene/hadoop/trunk: CHANGES.txt src/webapps/job/jobfailures.jsp src/webapps/job/taskdetails.jsp
Date Tue, 28 Nov 2006 23:31:39 GMT
Author: cutting
Date: Tue Nov 28 15:31:38 2006
New Revision: 480280

URL: http://svn.apache.org/viewvc?view=rev&rev=480280
Log:
HADOOP-749.  Fix a NullPointerException in jobfailures.jsp.

Modified:
    lucene/hadoop/trunk/CHANGES.txt
    lucene/hadoop/trunk/src/webapps/job/jobfailures.jsp
    lucene/hadoop/trunk/src/webapps/job/taskdetails.jsp

Modified: lucene/hadoop/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/CHANGES.txt?view=diff&rev=480280&r1=480279&r2=480280
==============================================================================
--- lucene/hadoop/trunk/CHANGES.txt (original)
+++ lucene/hadoop/trunk/CHANGES.txt Tue Nov 28 15:31:38 2006
@@ -128,6 +128,9 @@
 37. HADOOP-739.  Fix TestIPC to use different port number, making it
     more reliable.  (Nigel Daley via cutting)
 
+38. HADOOP-749.  Fix a NullPointerException in jobfailures.jsp.
+    (omalley via cutting)
+
 
 Release 0.8.0 - 2006-11-03
 

Modified: lucene/hadoop/trunk/src/webapps/job/jobfailures.jsp
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/webapps/job/jobfailures.jsp?view=diff&rev=480280&r1=480279&r2=480280
==============================================================================
--- lucene/hadoop/trunk/src/webapps/job/jobfailures.jsp (original)
+++ lucene/hadoop/trunk/src/webapps/job/jobfailures.jsp Tue Nov 28 15:31:38 2006
@@ -49,15 +49,20 @@
         }
         out.print("</pre></td>");
         
-        String taskLogUrl = "http://" + taskTracker.getHost() + ":" +
-        	taskTracker.getHttpPort() + "/tasklog.jsp?taskid=" + statuses[i].getTaskId();
-        String tailFourKBUrl = taskLogUrl + "&tail=true&tailsize=4096";
-        String tailEightKBUrl = taskLogUrl + "&tail=true&tailsize=8192";
-        String entireLogUrl = taskLogUrl + "&all=true";
         out.print("<td>");
-        out.print("<a href=\"" + tailFourKBUrl + "\">Last 4KB</a><br/>");
-        out.print("<a href=\"" + tailEightKBUrl + "\">Last 8KB</a><br/>");
-        out.print("<a href=\"" + entireLogUrl + "\">All</a><br/>");
+        if (taskTracker != null) {
+          String taskLogUrl = "http://" + taskTracker.getHost() + ":" +
+          	taskTracker.getHttpPort() + "/tasklog.jsp?taskid=" + 
+          	statuses[i].getTaskId();
+          String tailFourKBUrl = taskLogUrl + "&tail=true&tailsize=4096";
+          String tailEightKBUrl = taskLogUrl + "&tail=true&tailsize=8192";
+          String entireLogUrl = taskLogUrl + "&all=true";
+          out.print("<a href=\"" + tailFourKBUrl + "\">Last 4KB</a><br/>");
+          out.print("<a href=\"" + tailEightKBUrl + "\">Last 8KB</a><br/>");
+          out.print("<a href=\"" + entireLogUrl + "\">All</a><br/>");
+        } else { 
+          out.print("n/a"); // task tracker was lost
+        }
         out.print("</td>");
         
         out.print("</tr>\n");

Modified: lucene/hadoop/trunk/src/webapps/job/taskdetails.jsp
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/webapps/job/taskdetails.jsp?view=diff&rev=480280&r1=480279&r2=480280
==============================================================================
--- lucene/hadoop/trunk/src/webapps/job/taskdetails.jsp (original)
+++ lucene/hadoop/trunk/src/webapps/job/taskdetails.jsp Tue Nov 28 15:31:38 2006
@@ -88,21 +88,20 @@
         }
       }
       out.print("</pre></td>");
+      out.print("<td>");
       if (taskAttemptTracker == null) {
-        out.print("&nbsp;");
+        out.print("n/a");
       } else {
         String taskLogUrl = taskAttemptTracker + "/tasklog.jsp?taskid=" + 
                               status.getTaskId();
         String tailFourKBUrl = taskLogUrl + "&tail=true&tailsize=4096";
         String tailEightKBUrl = taskLogUrl + "&tail=true&tailsize=8192";
         String entireLogUrl = taskLogUrl + "&all=true";
-        out.print("<td>");
         out.print("<a href=\"" + tailFourKBUrl + "\">Last 4KB</a><br/>");
         out.print("<a href=\"" + tailEightKBUrl + "\">Last 8KB</a><br/>");
         out.print("<a href=\"" + entireLogUrl + "\">All</a><br/>");
-        out.print("</td>");
       }
-      out.println("</tr>\n");
+      out.println("</td></tr>\n");
     }
   }
   %>



Mime
View raw message