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] [Comment Edited] (HADOOP-11402) Use guava cache to implement negative user-to-group cache
Date Wed, 31 Dec 2014 15:04:13 GMT

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

Benoy Antony edited comment on HADOOP-11402 at 12/31/14 3:03 PM:
-----------------------------------------------------------------

Thanks [~varun_saxena]. 

The code looks clean. Few comments on the test code:

1. Fix the comment 
{code}
 // Ensure that Negative Cache deletion thread deletes stale entries
// from negative cache every 500 ms.
{code}
to 

{code}
    // Ensure that stale entries are removed from negative cache  every 2 seconds.
{code}

2. Simplify statements

change from 
{code}
assertNotEquals(false, groups.getNegativeCache().contains("user1"));
{code}
to 
{code}
assertTrue(groups.getNegativeCache().contains("user1"));
{code}

Similarly, change from
{code}
assertEquals(false, groups.getNegativeCache().contains("user1"));
{code}
to 
{code}
assertFalse(groups.getNegativeCache().contains("user1"));
{code}



was (Author: benoyantony):
Thanks [~varun_saxena]. 

The code looks clean. Few comments on the test code:

1. Fix the comment 
{code}
+    // Ensure that Negative Cache deletion thread deletes stale entries
+    // from negative cache every 500 ms.
{code}
to 

{code}
    // Ensure that stale entries are removed from negative cache  every 2 seconds.
{code}

2. Simplify statements

change from 
{code}
assertNotEquals(false, groups.getNegativeCache().contains("user1"));
{code}
to 
{code}
assertTrue(groups.getNegativeCache().contains("user1"));
{code}

Similarly, change from
{code}
assertEquals(false, groups.getNegativeCache().contains("user1"));
{code}
to 
{code}
assertFalse(groups.getNegativeCache().contains("user1"));
{code}


> 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, HADOOP-11402.003.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
(v6.3.4#6332)

Mime
View raw message