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

Method GetTablePartition

src/client/ns_client.cc:756–773  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

754}
755
756bool NsClient::GetTablePartition(
757 const std::string& name, uint32_t pid,
758 ::fedb::nameserver::TablePartition& table_partition, std::string& msg) {
759 ::fedb::nameserver::GetTablePartitionRequest request;
760 ::fedb::nameserver::GetTablePartitionResponse response;
761 request.set_name(name);
762 request.set_pid(pid);
763 request.set_db(GetDb());
764 bool ok = client_.SendRequest(
765 &::fedb::nameserver::NameServer_Stub::GetTablePartition, &request,
766 &response, FLAGS_request_timeout_ms, 1);
767 msg = response.msg();
768 if (ok && response.code() == 0) {
769 table_partition.CopyFrom(response.table_partition());
770 return true;
771 }
772 return false;
773}
774
775bool NsClient::UpdateTableAliveStatus(const std::string& endpoint,
776 std::string& name, uint32_t pid,

Callers 1

Calls 3

SendRequestMethod · 0.80
msgMethod · 0.80
codeMethod · 0.80

Tested by

no test coverage detected