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

Function HandleClientDropTable

src/cmd/fedb.cc:3548–3566  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3546}
3547
3548void 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
3568void HandleClientAddReplica(const std::vector<std::string> parts,
3569 ::fedb::client::TabletClient* client) {

Callers 1

StartClientFunction · 0.85

Calls 2

sizeMethod · 0.45
DropTableMethod · 0.45

Tested by

no test coverage detected