| 473 | return MasterGuid; |
| 474 | } |
| 475 | void LocalExec(int id) override { |
| 476 | // do map task locally |
| 477 | const TJobParams& params = JobRequest->Descr.ExecList[id]; |
| 478 | if (NeedResult() && AtomicGet(MapResult) == nullptr) { |
| 479 | int partId = MapJob2PartId[id]; |
| 480 | if (partId == -1 || !PartCompleted[partId]) { |
| 481 | TVector<char>& dataBuf = LocalMapBuf.ResultData[id]; |
| 482 | JobRequest->Descr.GetParam(params.ParamId, &dataBuf); |
| 483 | Cmds.Cmds[params.CmdId]->ExecAsync(LocalUserContext.Get(), params.HostId, &dataBuf, this, id); |
| 484 | } else |
| 485 | DoneLocalMapTask(); |
| 486 | } |
| 487 | } |
| 488 | void StartReduce() { |
| 489 | auto* const mapResult = AtomicGet(MapResult); |
| 490 | TReduceExec::Launch(JobRequest.Get(), CompleteNotify.Get(), &mapResult->ResultData, &mapResult->ResultHasData); |