| 43 | return ctx->Data; |
| 44 | } |
| 45 | bool HasHostIds(const THashMap<int, bool>& hostIdSet) override { |
| 46 | if (ContextData.empty() || hostIdSet.empty()) |
| 47 | return true; |
| 48 | // all contexts should have same hostid set so we can pick any |
| 49 | TContextDataHolder* ctx = ContextData.begin()->second.Get(); |
| 50 | for (TContextHash::const_iterator z = ContextData.begin(); z != ContextData.end(); ++z) { |
| 51 | Y_ASSERT(z->second.Get()->Computer2HostId == ctx->Computer2HostId); |
| 52 | } |
| 53 | int thisCompId = QueryProc->GetCompId(); |
| 54 | int thisHostId = ctx->Computer2HostId[thisCompId]; |
| 55 | if (hostIdSet.size() == 1 && hostIdSet.find(thisHostId) != hostIdSet.end()) |
| 56 | return true; |
| 57 | return false; |
| 58 | } |
| 59 | int GetHostIdCount() override { |
| 60 | return AllJobs->HostId2Computer.ysize(); |
| 61 | } |