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

Function HandleNSClientRecoverTable

src/cmd/fedb.cc:1113–1132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1111}
1112
1113void HandleNSClientRecoverTable(const std::vector<std::string>& parts,
1114 ::fedb::client::NsClient* client) {
1115 if (parts.size() < 4) {
1116 std::cout << "Bad format" << std::endl;
1117 return;
1118 }
1119 try {
1120 uint32_t pid = boost::lexical_cast<uint32_t>(parts[2]);
1121 std::string msg;
1122 bool ok = client->RecoverTable(parts[1], pid, parts[3], msg);
1123 if (!ok) {
1124 std::cout << "Fail to recover table. error msg:" << msg
1125 << std::endl;
1126 return;
1127 }
1128 std::cout << "recover table ok" << std::endl;
1129 } catch (std::exception const& e) {
1130 std::cout << "Invalid args. pid should be uint32_t" << std::endl;
1131 }
1132}
1133
1134void HandleNSClientConnectZK(const std::vector<std::string> parts,
1135 ::fedb::client::NsClient* client) {

Callers 1

StartNsClientFunction · 0.85

Calls 2

sizeMethod · 0.45
RecoverTableMethod · 0.45

Tested by

no test coverage detected