Browse Source

HADOOP-436. Fix an error-handling bug in the web ui.

git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk@431693 13f79535-47bb-0310-9956-ffa450edef68
Doug Cutting 19 years ago
parent
commit
bea2aa2516
2 changed files with 9 additions and 2 deletions
  1. 3 0
      CHANGES.txt
  2. 6 2
      src/webapps/task/getMapOutput.jsp

+ 3 - 0
CHANGES.txt

@@ -34,6 +34,9 @@ Trunk (unreleased changes)
     must now define.  Also, the values returned by TextInputFormat are
     must now define.  Also, the values returned by TextInputFormat are
     no longer of class UTF8, but now of class Text.
     no longer of class UTF8, but now of class Text.
 
 
+ 8. HADOOP-436.  Fix an error-handling bug in the web ui.
+    (Devaraj Das via cutting)
+
 
 
 Release 0.5.0 - 2006-08-04
 Release 0.5.0 - 2006-08-04
 
 

+ 6 - 2
src/webapps/task/getMapOutput.jsp

@@ -29,7 +29,11 @@
     inStream = fileSys.open(filename);
     inStream = fileSys.open(filename);
     int len = inStream.read(buffer);
     int len = inStream.read(buffer);
     while (len > 0) {
     while (len > 0) {
-      outStream.write(buffer, 0, len);
+      try {
+        outStream.write(buffer, 0, len);
+      } catch (Exception e) {
+        break;
+      }
       len = inStream.read(buffer);
       len = inStream.read(buffer);
     }
     }
   } catch (IOException ie) {
   } catch (IOException ie) {
@@ -48,4 +52,4 @@
       outStream.close();
       outStream.close();
     }
     }
   }
   }
-%>
+%>