| 3235 | } |
| 3236 | |
| 3237 | void HandleClientDeleteIndex(const std::vector<std::string>& parts, |
| 3238 | ::fedb::client::TabletClient* client) { |
| 3239 | ::fedb::nameserver::GeneralResponse response; |
| 3240 | if (parts.size() < 4) { |
| 3241 | std::cout << "Bad format" << std::endl; |
| 3242 | std::cout << "usage: deleteindex tid pid index_name" << std::endl; |
| 3243 | return; |
| 3244 | } |
| 3245 | try { |
| 3246 | std::string msg; |
| 3247 | if (!client->DeleteIndex(boost::lexical_cast<uint32_t>(parts[1]), |
| 3248 | boost::lexical_cast<uint32_t>(parts[2]), |
| 3249 | parts[3], &msg)) { |
| 3250 | std::cout << "Fail to delete index. error msg: " << msg |
| 3251 | << std::endl; |
| 3252 | return; |
| 3253 | } |
| 3254 | } catch (std::exception const& e) { |
| 3255 | std::cout << "Invalid args tid and pid should be uint32_t" << std::endl; |
| 3256 | } |
| 3257 | std::cout << "delete index ok" << std::endl; |
| 3258 | } |
| 3259 | |
| 3260 | void HandleClientSetTTL(const std::vector<std::string>& parts, |
| 3261 | ::fedb::client::TabletClient* client) { |
no test coverage detected