| 754 | } |
| 755 | |
| 756 | bool 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 | |
| 775 | bool NsClient::UpdateTableAliveStatus(const std::string& endpoint, |
| 776 | std::string& name, uint32_t pid, |
no test coverage detected