hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benoy Antony (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-11402) Use guava cache to implement negative user-to-group cache
Date Fri, 26 Dec 2014 18:08:13 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-11402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14259167#comment-14259167

Benoy Antony commented on HADOOP-11402:

Since the negativeCacheTimeout is already specified while building the cache, there is no
benefit in storing expirationTime in each cache entry.
Instead, is it possible to keep it as a Set ?

An untested code snippet is below
                  Set<String> negativeCache;
		 Cache<String, Boolean> negativeCacheMap = CacheBuilder.newBuilder()
				         .expireAfterWrite(negativeCacheTimeout, TimeUnit.MILLISECONDS)
				         .ticker(new TimerToTickerAdapter(timer))
		 negativeCache = Collections.newSetFromMap(negativeCache.asMap());

> Use guava cache to implement negative user-to-group cache
> ---------------------------------------------------------
>                 Key: HADOOP-11402
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11402
>             Project: Hadoop Common
>          Issue Type: Improvement
>    Affects Versions: 2.6.0
>            Reporter: Colin Patrick McCabe
>            Assignee: Varun Saxena
>         Attachments: HADOOP-11402.001.patch, HADOOP-11402.002.patch
> Negative user-to-group cache entries are never cleared for never-again-accessed users.
 Use guava cache so that expired entries can be deleted automatically

This message was sent by Atlassian JIRA

View raw message