Pārlūkot izejas kodu

commit 86ad5488507bec0f0d9dcdadcf88204f38adb6cb
Author: Greg Roelofs <roelofs@yahoo-inc.com>
Date: Wed Feb 9 20:06:01 2011 -0800

. Fix 2 of 4 unit-test failures: TestBadRecords (NPE due to
rearranged MapTask code in ) and TestTaskTrackerMemoryManager
(need hostname in output-string pattern). (roelofs, ramach)

+++ b/YAHOO-CHANGES.txt
+ . Fix 2 of 4 unit-test failures: TestBadRecords (NPE due to
+ rearranged MapTask code in ) and TestTaskTrackerMemoryManager
+ (need hostname in output-string pattern). (roelofs, ramach)
+
+ . New counters for FileInputFormat (BYTES_READ) and
+ . Change DiskErrorException to IOException (boryas)


git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20-security-patches@1077789 13f79535-47bb-0310-9956-ffa450edef68

Owen O'Malley 14 gadi atpakaļ
vecāks
revīzija
bf0726b4ae

+ 5 - 5
src/mapred/org/apache/hadoop/mapred/MapTask.java

@@ -280,13 +280,13 @@ class MapTask extends Task {
     private Counters.Counter skipRecCounter;
     private long recIndex = -1;
     
-    SkippingRecordReader(TaskUmbilicalProtocol umbilical, TaskReporter reporter)
-        throws IOException {
-      super(null, conf, reporter);
+    SkippingRecordReader(InputSplit split, TaskUmbilicalProtocol umbilical,
+                         TaskReporter reporter) throws IOException {
+      super(split, conf, reporter);
       this.umbilical = umbilical;
       this.skipRecCounter = reporter.getCounter(Counter.MAP_SKIPPED_RECORDS);
       this.toWriteSkipRecs = toWriteSkipRecs() &&  
-        SkipBadRecords.getSkipOutputPath(conf)!=null;
+          SkipBadRecords.getSkipOutputPath(conf)!=null;
       skipIt = getSkipRanges().skipRangeIterator();
     }
     
@@ -415,7 +415,7 @@ class MapTask extends Task {
     reporter.setInputSplit(inputSplit);
 
     RecordReader<INKEY,INVALUE> in = isSkipping() ? 
-        new SkippingRecordReader<INKEY,INVALUE>(umbilical, reporter) :
+        new SkippingRecordReader<INKEY,INVALUE>(inputSplit, umbilical, reporter) :
         new TrackedRecordReader<INKEY,INVALUE>(inputSplit, job, reporter);
     job.setBoolean("mapred.skip.on", isSkipping());
 

+ 6 - 7
src/test/org/apache/hadoop/mapred/TestTaskTrackerMemoryManager.java

@@ -339,15 +339,14 @@ public class TestTaskTrackerMemoryManager extends TestCase {
 
     startCluster(fConf);
 
-    Pattern taskOverLimitPattern =
-      Pattern.compile(String.format(taskOverLimitPatternString, String
-          .valueOf(PER_TASK_LIMIT)));
+    Pattern taskOverLimitPattern = Pattern.compile(
+        String.format(taskOverLimitPatternString, String.valueOf(PER_TASK_LIMIT)));
 
     Pattern trackerOverLimitPattern =
-      Pattern
-          .compile("Killing one of the least progress tasks - .*, as "
-              + "the cumulative memory usage of all the tasks on the TaskTracker"
-              + " exceeds virtual memory limit " + TASK_TRACKER_LIMIT + ".");
+        Pattern.compile("Killing one of the least progress tasks - .*, as "
+        + "the cumulative memory usage of all the tasks on the TaskTracker"
+        + " host0.foo.com exceeds virtual memory limit " + TASK_TRACKER_LIMIT
+        + ".");
     Matcher mat = null;
 
     // Set up job.