MCPcopy Create free account
hub / github.com/baidu/tera / FindOverlappedTablets

Method FindOverlappedTablets

src/master/tablet_manager.cc:1418–1430  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1416}
1417
1418bool Table::FindOverlappedTablets(const std::string& key_start, const std::string& key_end,
1419 std::vector<TabletPtr>* tablets) {
1420 MutexLock lock(&mutex_);
1421 TabletList::iterator it2 = tablets_list_.upper_bound(key_start);
1422 CHECK(it2 != tablets_list_.begin());
1423 --it2;
1424 while (it2 != tablets_list_.end() &&
1425 (key_end.empty() || it2->second->meta_.key_range().key_start() < key_end)) {
1426 tablets->push_back(it2->second);
1427 ++it2;
1428 }
1429 return !tablets->empty();
1430}
1431
1432bool TabletManager::SearchTablet(const std::string& table_name, const std::string& key,
1433 TabletPtr* tablet, StatusCode* ret_status) {

Callers 1

Calls 2

push_backMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected