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

Method DestroyClient

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

Source from the content-addressed store, hash-verified

163}
164
165void ClientCacheHelper::DestroyClient(ClientKey* client_key) {
166 DCHECK(*client_key != NULL) << "Trying to destroy NULL client";
167 shared_ptr<ThriftClientImpl> client_impl;
168 ClientMap::iterator client;
169 {
170 lock_guard<mutex> lock(client_map_lock_);
171 client = client_map_.find(*client_key);
172 DCHECK(client != client_map_.end());
173 client_impl = client->second;
174 }
175 VLOG(1) << "Broken Connection, destroy client for " <<
176 TNetworkAddressToString(client_impl->address());
177
178 client_impl->Close();
179 if (metrics_enabled_) total_clients_metric_->Increment(-1);
180 if (metrics_enabled_) clients_in_use_metric_->Increment(-1);
181 lock_guard<mutex> lock(client_map_lock_);
182 client_map_.erase(client);
183 *client_key = NULL;
184}
185
186void ClientCacheHelper::CloseConnections(const TNetworkAddress& address) {
187 PerHostCache* cache;

Callers

nothing calls this directly

Calls 6

TNetworkAddressToStringFunction · 0.85
eraseMethod · 0.80
findMethod · 0.45
endMethod · 0.45
CloseMethod · 0.45
IncrementMethod · 0.45

Tested by

no test coverage detected