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