MCPcopy Create free account
hub / github.com/apache/impala / CloseConnections

Method CloseConnections

be/src/runtime/client-cache.cc:186–206  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

184}
185
186void ClientCacheHelper::CloseConnections(const TNetworkAddress& address) {
187 PerHostCache* cache;
188 {
189 lock_guard<mutex> lock(cache_lock_);
190 PerHostCacheMap::iterator cache_it = per_host_caches_.find(address);
191 if (cache_it == per_host_caches_.end()) return;
192 cache = cache_it->second.get();
193 }
194
195 {
196 VLOG(2) << "Invalidating all " << cache->clients.size() << " clients for: "
197 << TNetworkAddressToString(address);
198 lock_guard<mutex> entry_lock(cache->lock);
199 lock_guard<mutex> map_lock(client_map_lock_);
200 for (ClientKey client_key: cache->clients) {
201 ClientMap::iterator client_map_entry = client_map_.find(client_key);
202 DCHECK(client_map_entry != client_map_.end());
203 client_map_entry->second->Close();
204 }
205 }
206}
207
208string ClientCacheHelper::DebugString() {
209 lock_guard<mutex> lock(cache_lock_);

Callers 1

UnregisterSubscriberMethod · 0.45

Calls 6

TNetworkAddressToStringFunction · 0.85
getMethod · 0.65
findMethod · 0.45
endMethod · 0.45
sizeMethod · 0.45
CloseMethod · 0.45

Tested by 1

UnregisterSubscriberMethod · 0.36