MCPcopy Create free account
hub / github.com/catboost/catboost / TGlobalUserContext

Method TGlobalUserContext

library/cpp/par/par_master.cpp:22–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20
21 public:
22 TGlobalUserContext(TRemoteQueryProcessor* queryProc, TContextDistributor* contextMaster, int envId)
23 : QueryProc(queryProc)
24 , ContextMaster(contextMaster)
25 , HostIdCount(-1)
26 {
27 CHROMIUM_TRACE_FUNCTION();
28 ContextMaster->GetVersions(envId, &HostIdCount, &EnvId2Version);
29
30 // everywhere is for remote ops only, so master should not report that it has data in this case
31 if (envId != ENVID_EVERYWHERE) {
32 ContextData.resize(HostIdCount);
33 for (int hostId = 0; hostId < HostIdCount; ++hostId) {
34 if (!ContextMaster->GetContextState(hostId, EnvId2Version, &ContextData[hostId])) {
35 ContextData.clear();
36 break;
37 }
38 }
39 }
40 }
41 void Run(TJobDescription* descr, IMRCommandCompleteNotify* completeNotify) override;
42 const THashMap<int, int>& GetEnvId2Version() const override {
43 return EnvId2Version;

Callers

nothing calls this directly

Calls 4

GetVersionsMethod · 0.80
resizeMethod · 0.45
GetContextStateMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected