diff --git a/internal/master/map_task_master.go b/internal/master/map_task_master.go index 9f6ccb3..b1d14f0 100644 --- a/internal/master/map_task_master.go +++ b/internal/master/map_task_master.go @@ -915,14 +915,14 @@ func (m *MapTaskMaster) PostFinish(jobInstanceId int64) *processor.ProcessResult workerProgressCounter.(*common.WorkerProgressCounter).IncrementTotal() workerProgressCounter.(*common.WorkerProgressCounter).IncrementRunning() - reduceResult, err := mpProcessor.Reduce(jobCtx) + result, err := mpProcessor.Reduce(jobCtx) if err != nil { - reduceResult = processor.NewProcessResult() - reduceResult.SetFailed() - reduceResult.SetResult("reduce exception: " + err.Error()) + result = processor.NewProcessResult() + result.SetFailed() + result.SetResult("reduce exception: " + err.Error()) } - if reduceResult.Status() == processor.InstanceStatusSucceed { + if result.Status() == processor.InstanceStatusSucceed { if val, ok := m.taskProgressMap.Load(reduceTaskName); ok { val.(*common.TaskProgressCounter).IncrementOneSuccess() } @@ -937,6 +937,7 @@ func (m *MapTaskMaster) PostFinish(jobInstanceId int64) *processor.ProcessResult val.(*common.WorkerProgressCounter).IncrementOneFailed() } } + return result } return reduceResult }