MCPcopy Create free account
hub / github.com/4paradigm/OpenMLDB / StartNameServer

Function StartNameServer

src/tablet/sql_cluster_availability_test.cc:76–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74}
75
76void StartNameServer(brpc::Server& server) { //NOLINT
77 NameServerImpl* nameserver = new NameServerImpl();
78 bool ok = nameserver->Init("");
79 ASSERT_TRUE(ok);
80 brpc::ServerOptions options;
81 if (server.AddService(nameserver, brpc::SERVER_OWNS_SERVICE) != 0) {
82 PDLOG(WARNING, "Fail to add service");
83 exit(1);
84 }
85 if (server.Start(FLAGS_endpoint.c_str(), &options) != 0) {
86 PDLOG(WARNING, "Fail to start server");
87 exit(1);
88 }
89 sleep(2);
90}
91
92void StartTablet(brpc::Server* server, ::fedb::tablet::TabletImpl* tablet) { //NOLINT
93 bool ok = tablet->Init("");

Callers 1

TEST_FFunction · 0.70

Calls 2

InitMethod · 0.45
StartMethod · 0.45

Tested by

no test coverage detected