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

Function HandleClientAddReplica

src/cmd/fedb.cc:3568–3586  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3566}
3567
3568void HandleClientAddReplica(const std::vector<std::string> parts,
3569 ::fedb::client::TabletClient* client) {
3570 if (parts.size() < 4) {
3571 std::cout << "Bad addreplica format" << std::endl;
3572 return;
3573 }
3574 try {
3575 bool ok = client->AddReplica(boost::lexical_cast<uint32_t>(parts[1]),
3576 boost::lexical_cast<uint32_t>(parts[2]),
3577 parts[3]);
3578 if (ok) {
3579 std::cout << "AddReplica ok" << std::endl;
3580 } else {
3581 std::cout << "Fail to Add Replica" << std::endl;
3582 }
3583 } catch (boost::bad_lexical_cast& e) {
3584 std::cout << "Bad addreplica format" << std::endl;
3585 }
3586}
3587
3588void HandleClientDelReplica(const std::vector<std::string> parts,
3589 ::fedb::client::TabletClient* client) {

Callers 1

StartClientFunction · 0.85

Calls 2

sizeMethod · 0.45
AddReplicaMethod · 0.45

Tested by

no test coverage detected