| 1111 | } |
| 1112 | |
| 1113 | void 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 | |
| 1134 | void HandleNSClientConnectZK(const std::vector<std::string> parts, |
| 1135 | ::fedb::client::NsClient* client) { |
no test coverage detected