Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
|
Public Attributes | |
boost::mutex | lock |
Protects clients. More... | |
std::list< ClientKey > | clients |
List of client keys for this entry's host. More... | |
There are three lock categories - the cache-wide lock (cache_lock_), the locks for a specific cache (PerHostCache::lock) and the lock for the set of all clients (client_map_lock_). They do not have to be taken concurrently (and should not be, in general), but if they are they must be taken in this order: cache_lock_->PerHostCache::lock->client_map_lock_. A PerHostCache is a list of available client keys for a single host, plus a lock that protects that list. Only one PerHostCache will ever be created for a given host, so when a PerHostCache is retrieved from the PerHostCacheMap containing it there is no need to hold on to the container's lock. Only clients that are not currently in use are tracked in their host's PerHostCache. When a client is returned to the cache via ReleaseClient(), it is reinserted into its corresponding PerHostCache list. Clients returned by GetClient() are considered to be immediately in use, and so don't exist in their PerHostCache until they are released for the first time.
Definition at line 131 of file client-cache.h.
std::list<ClientKey> impala::ClientCacheHelper::PerHostCache::clients |
List of client keys for this entry's host.
Definition at line 136 of file client-cache.h.
Referenced by impala::ClientCacheHelper::CloseConnections().
boost::mutex impala::ClientCacheHelper::PerHostCache::lock |
Protects clients.
Definition at line 133 of file client-cache.h.
Referenced by impala::ClientCacheHelper::CloseConnections().