You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Isa Hekmatizadeh (Jira)" <ji...@apache.org> on 2020/03/24 19:38:00 UTC

[jira] [Created] (HDDS-3267) Replace ContainerCache in BlockUtils by LoadingCache

Isa Hekmatizadeh created HDDS-3267:
--------------------------------------

             Summary: Replace ContainerCache in BlockUtils by LoadingCache
                 Key: HDDS-3267
                 URL: https://issues.apache.org/jira/browse/HDDS-3267
             Project: Hadoop Distributed Data Store
          Issue Type: Improvement
            Reporter: Isa Hekmatizadeh


As discussed in [here|https://github.com/apache/hadoop-ozone/pull/705] current version of ContainerCache is just used by BlockUtils and has several architectural issues. for example:
 * It uses a ReentrantLock which could be replaced by synchronized methods
 * It should maintain a referenceCount for each DBHandler
 * It extends LRUMap while it would be better to hide it by the composition and not expose LRUMap related methods.

As [~pifta] suggests, we could replace all ContainerCache functionality by using Guava LoadingCache.

This new LoadingCache could be configured to evict by size, by this configuration the functionality would be slightly different as it may evict DBHandlers while they are in use (referenceCount>0) but we can configure it to use reference base eviction based on CacheBuilder.weakValues() 

I want to open this discussion here instead of Github so I created this ticket.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org