瀏覽代碼

commit bc235e1a213907a77641ffbb10df414f3ae9b406
Author: Arun C Murthy <acmurthy@apache.org>
Date: Mon Sep 28 13:54:07 2009 -0700

MAPREDUCE-1028. Fixed number of slots occupied by cleanup tasks to one irrespective of slot size for the job. Contributed by Ravi Gummadi.

from: http://issues.apache.org/jira/secure/attachment/12420581/yhadoop-0.20-MR1028.patch

+++ b/YAHOO-CHANGES.txt
+58. MAPREDUCE-1028. Fixed number of slots occupied by cleanup tasks to one
+ irrespective of slot size for the job. Contributed by Ravi Gummadi.
+


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

Owen O'Malley 14 年之前
父節點
當前提交
6e8d2d0673
共有 1 個文件被更改,包括 4 次插入2 次删除
  1. 4 2
      src/mapred/org/apache/hadoop/mapred/TaskInProgress.java

+ 4 - 2
src/mapred/org/apache/hadoop/mapred/TaskInProgress.java

@@ -921,6 +921,8 @@ class TaskInProgress {
   public Task addRunningTask(TaskAttemptID taskid, 
                              String taskTracker,
                              boolean taskCleanup) {
+    // 1 slot is enough for taskCleanup task
+    int numSlotsNeeded = taskCleanup ? 1 : numSlotsRequired;
     // create the task
     Task t = null;
     if (isMapTask()) {
@@ -935,10 +937,10 @@ class TaskInProgress {
         split = new BytesWritable();
       }
       t = new MapTask(jobFile, taskid, partition, splitClass, split, 
-                      numSlotsRequired, job.getUser());
+                      numSlotsNeeded, job.getUser());
     } else {
       t = new ReduceTask(jobFile, taskid, partition, numMaps, 
-                         numSlotsRequired, job.getUser());
+                         numSlotsNeeded, job.getUser());
     }
     if (jobCleanup) {
       t.setJobCleanupTask();