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

Method LoadAllDeadNodeTablets

src/master/master_impl.cc:2269–2287  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2267}
2268
2269void MasterImpl::LoadAllDeadNodeTablets() {
2270 std::vector<TabletPtr> all_tablet_list;
2271 tablet_manager_->ShowTable(NULL, &all_tablet_list);
2272
2273 std::vector<TabletPtr>::iterator it;
2274 for (it = all_tablet_list.begin(); it != all_tablet_list.end(); ++it) {
2275 TabletPtr tablet = *it;
2276 if (tablet->GetStatus() != TabletMeta::kTabletOffline) {
2277 continue;
2278 }
2279 TabletNodePtr node;
2280 if (tabletnode_manager_->FindTabletNode(tablet->GetServerAddr(), &node) &&
2281 node->GetState() == kReady) {
2282 continue;
2283 }
2284 LOG(INFO) << "try load tablets in dead node, " << tablet;
2285 TryLoadTablet(tablet);
2286 }
2287}
2288
2289bool MasterImpl::TryKickTabletNode(TabletNodePtr node) {
2290 // concurrently kicking is not allowed

Callers

nothing calls this directly

Calls 5

ShowTableMethod · 0.80
FindTabletNodeMethod · 0.80
GetServerAddrMethod · 0.80
GetStatusMethod · 0.45
GetStateMethod · 0.45

Tested by

no test coverage detected