| 436 | } |
| 437 | |
| 438 | bool TabletClient::SendSnapshot(uint32_t tid, uint32_t remote_tid, uint32_t pid, |
| 439 | const std::string& endpoint, |
| 440 | std::shared_ptr<TaskInfo> task_info) { |
| 441 | ::fedb::api::SendSnapshotRequest request; |
| 442 | request.set_tid(tid); |
| 443 | request.set_pid(pid); |
| 444 | request.set_endpoint(endpoint); |
| 445 | request.set_remote_tid(remote_tid); |
| 446 | if (task_info) { |
| 447 | request.mutable_task_info()->CopyFrom(*task_info); |
| 448 | } |
| 449 | ::fedb::api::GeneralResponse response; |
| 450 | bool ok = |
| 451 | client_.SendRequest(&::fedb::api::TabletServer_Stub::SendSnapshot, |
| 452 | &request, &response, FLAGS_request_timeout_ms, 1); |
| 453 | if (ok && response.code() == 0) { |
| 454 | return true; |
| 455 | } |
| 456 | return false; |
| 457 | } |
| 458 | |
| 459 | bool TabletClient::LoadTable(const std::string& name, uint32_t id, uint32_t pid, |
| 460 | uint64_t ttl, uint32_t seg_cnt) { |
no test coverage detected