accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From keith-turner <>
Subject [GitHub] accumulo pull request: ACCUMULO-4229 BatchWriter Locator cache out...
Date Thu, 28 Apr 2016 20:38:10 GMT
Github user keith-turner commented on the pull request:
    > The original reason why the locators cache is cleared every hour is to remove TabletLocators
that refer to tablets that don't exist or are rarely accessed, ya?
    The clearing was added to clean tablet location cache memory populated while processing
bulk imports. If tablet servers were not processing bulk imports, then only metadata table
tablet locations would be cached.
    >A WeakHashMap wouldn't work because it uses weak references for the keys
    oh yeah, I was thinking it was based on values... but its not.
    > What do you think of switching locators to a Guava cache with a 1 hour timeout on
entries since their last access?
    May be good.  Wouldn't we still need to prevent the guava cache from removing tablet locators
that are referenced outside the cache?  I looked at the Gauva cache javadoc and saw it supports
weakValues() and softValues() based caches.  Based on past experience (that I just remembered)
I am thinking weak references may be bad, it seems like weak references are collected aggressively
(when only referenced by the cache).  Clearing the cache too aggressively would not be good
for performance  SoftReferences would not suffer from the aggressive collection problem, but
soft refs have their own problems.

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message