| 29 | ECurrentCommand State; |
| 30 | |
| 31 | void MRCommandComplete(bool isCanceled, TVector<TVector<char>>* res) override { |
| 32 | CHROMIUM_TRACE_FUNCTION(); |
| 33 | if (isCanceled) { |
| 34 | DCNotify->DistrCmdComplete(ReqId, nullptr); |
| 35 | return; |
| 36 | } |
| 37 | if (State == FIRST_MAP) { |
| 38 | TJobDescription fmJob; |
| 39 | fmJob.SetCurrentOperation(FinalMapSerialized); |
| 40 | for (int i = 0; i < res->ysize(); ++i) |
| 41 | fmJob.AddQuery(-1, &(*res)[i]); |
| 42 | if (Op == RR_MAPREDUCE) |
| 43 | fmJob.MergeResults(); |
| 44 | |
| 45 | State = REMOTE_MAP; |
| 46 | Ctx->Run(&fmJob, this); |
| 47 | |
| 48 | } else if (State == REMOTE_MAP) { |
| 49 | TVector<char> dcRes; |
| 50 | if (Op == RR_MAP) { |
| 51 | SerializeToMem(&dcRes, *res); |
| 52 | } else { |
| 53 | Y_ASSERT(res->ysize() == 1); |
| 54 | dcRes.swap((*res)[0]); |
| 55 | } |
| 56 | DCNotify->DistrCmdComplete(ReqId, &dcRes); |
| 57 | } else |
| 58 | Y_ASSERT(0); |
| 59 | } |
| 60 | TGUID GetMasterQueryId() override { |
| 61 | return DCNotify->GetDistrCmdMasterQueryId(); |
| 62 | } |
nothing calls this directly
no test coverage detected