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

Method TRootEnvironment

library/cpp/par/par_host.cpp:34–53  ·  view source on GitHub ↗

/////////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

32
33 //////////////////////////////////////////////////////////////////////////
34 TRootEnvironment::TRootEnvironment(const char* hostsFileName, int defaultSlavePort, int masterPort, int debugPort) {
35 Y_UNUSED(debugPort);
36 TVector<TNetworkAddress> baseSearcherAddrs;
37 {
38 TFileInput queryFile(hostsFileName);
39 TString host;
40 while (queryFile.ReadLine(host)) {
41 if (host.empty())
42 continue;
43 baseSearcherAddrs.push_back(CreateAddress(host, defaultSlavePort));
44 }
45 }
46
47 QueryProc = new TRemoteQueryProcessor();
48 WriteBuffer = new TWriteBufferHandler(QueryProc.Get());
49 QueryProc->RunMaster(baseSearcherAddrs, masterPort);
50
51 ContextMaster = new TContextDistributor(QueryProc.Get(), WriteBuffer->GetWriteBuffer());
52 Master = new TMaster(QueryProc.Get(), ContextMaster.Get());
53 }
54
55 TRootEnvironment::TRootEnvironment(TLocal) {
56 WriteBuffer = new TWriteBufferHandler(nullptr);

Callers

nothing calls this directly

Calls 8

Y_UNUSEDFunction · 0.85
RunMasterMethod · 0.80
CreateAddressFunction · 0.70
ReadLineMethod · 0.45
emptyMethod · 0.45
push_backMethod · 0.45
GetMethod · 0.45
GetWriteBufferMethod · 0.45

Tested by

no test coverage detected