| 691 | } |
| 692 | } |
| 693 | void LaunchBlockRequest(int startIdx, int blockLen) { |
| 694 | TIntrusivePtr<TJobRequest> jr = new TJobRequest; |
| 695 | TVector<int> resultMap; |
| 696 | ProjectJob(&jr->Descr, startIdx, blockLen, &resultMap, &ResultHasData, JobRequest->Descr); |
| 697 | jr->EnvId2Version = JobRequest->EnvId2Version; |
| 698 | jr->IsLowPriority = JobRequest->IsLowPriority; |
| 699 | |
| 700 | // get new distribution state, start next block in new conditions |
| 701 | TIntrusivePtr<TBlockCallback> bc(new TBlockCallback(this, &resultMap)); |
| 702 | for (;;) { |
| 703 | IUserContext::EDataDistrState ds = UserContext->UpdateDataDistrState(&jr->HostId2Computer); |
| 704 | if (ds == IUserContext::DATA_UNAVAILABLE) { |
| 705 | Cancel(); |
| 706 | return; |
| 707 | } |
| 708 | |
| 709 | if (IsCanceledFlag) |
| 710 | return; |
| 711 | |
| 712 | if (LaunchJobRequest(jr.Get(), QueryProc.Get(), UserContext.Get(), bc.Get())) |
| 713 | return; |
| 714 | |
| 715 | // can not execute have to wait somehow |
| 716 | ThreadYield(); |
| 717 | } |
| 718 | } |
| 719 | TSplitMRExec(TJobRequest* jobRequest, |
| 720 | TRemoteQueryProcessor* queryProc, IMRCommandCompleteNotify* mrNotify, |
| 721 | IUserContext* userContext) |
nothing calls this directly
no test coverage detected