You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@impala.apache.org by "Mostafa Mokhtar (JIRA)" <ji...@apache.org> on 2017/12/27 19:17:00 UTC

[jira] [Created] (IMPALA-6354) Consider using Guava LoadingCache to cache metadata objects opposed to a ConcurrentHashMap

Mostafa Mokhtar created IMPALA-6354:
---------------------------------------

             Summary: Consider using Guava LoadingCache to cache metadata objects opposed to a ConcurrentHashMap
                 Key: IMPALA-6354
                 URL: https://issues.apache.org/jira/browse/IMPALA-6354
             Project: IMPALA
          Issue Type: Improvement
            Reporter: Mostafa Mokhtar
            Priority: Critical


Look into replacing the ConcurrentHashMap(s) used in the Catalog service to cache metadata with [LoadingCache|https://google.github.io/guava/releases/19.0/api/docs/com/google/common/cache/LoadingCache.html].

Caching metadata using a LoadingCache will allow:
* Better coherency by adding expireAfter and refreshAfter clause to the cache
* Weak reference eviction to respond to garbage collection
* Putting a cap on maximum number of caches entires
* Assigning different weights for each entry (For more efficient eviction)

https://github.com/google/guava/wiki/CachesExplained
https://google.github.io/guava/releases/19.0/api/docs/com/google/common/cache/CacheBuilder.html
https://google.github.io/guava/releases/19.0/api/docs/com/google/common/cache/LoadingCache.html



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)