| 3546 | } |
| 3547 | |
| 3548 | void HandleClientDropTable(const std::vector<std::string>& parts, |
| 3549 | ::fedb::client::TabletClient* client) { |
| 3550 | if (parts.size() < 3) { |
| 3551 | std::cout << "Bad drop command, you should input like 'drop tid pid' " |
| 3552 | << std::endl; |
| 3553 | return; |
| 3554 | } |
| 3555 | try { |
| 3556 | bool ok = client->DropTable(boost::lexical_cast<uint32_t>(parts[1]), |
| 3557 | boost::lexical_cast<uint32_t>(parts[2])); |
| 3558 | if (ok) { |
| 3559 | std::cout << "Drop table ok" << std::endl; |
| 3560 | } else { |
| 3561 | std::cout << "Fail to drop table" << std::endl; |
| 3562 | } |
| 3563 | } catch (boost::bad_lexical_cast& e) { |
| 3564 | std::cout << "Bad drop format" << std::endl; |
| 3565 | } |
| 3566 | } |
| 3567 | |
| 3568 | void HandleClientAddReplica(const std::vector<std::string> parts, |
| 3569 | ::fedb::client::TabletClient* client) { |
no test coverage detected