MCPcopy Create free account
hub / github.com/baidu/tera / Init

Method Init

src/observer/rowlocknode/rowlocknode_impl.cc:23–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21RowlockNodeImpl::~RowlockNodeImpl() {}
22
23bool RowlockNodeImpl::Init() {
24 std::string local_addr = tera::utils::GetLocalHostName() + ":" + FLAGS_rowlock_server_port;
25 if (FLAGS_tera_coord_type == "zk") {
26 zk_adapter_.reset(new RowlockNodeZkAdapter(this, local_addr));
27 } else if (FLAGS_tera_coord_type == "ins") {
28 zk_adapter_.reset(new InsRowlockNodeZkAdapter(this, local_addr));
29 } else {
30 zk_adapter_.reset(new FakeRowlockNodeZkAdapter(this, local_addr));
31 }
32
33 zk_adapter_->Init();
34
35 LOG(INFO) << "Rowlock node init finish";
36 return true;
37}
38
39bool RowlockNodeImpl::Exit() { return true; }
40

Callers 1

StartServerMethod · 0.45

Calls 2

GetLocalHostNameFunction · 0.85
resetMethod · 0.45

Tested by

no test coverage detected