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

Brandon Li commented on HDFS-5256:
----------------------------------

Thanks Haohui for adding unit test. More ideas for better unit tests of the new 
cache:
1. add n clients to the cache, check the cache size is n, remove some client, 
and make sure the cache size changes correspondingly
2. do cache.get() for the same user, make sure the cache doesn't add new entry 
for the same user
3. make sure the evicted client is closed (which you are already trying to test 
with current patch)
4. give the cache a short expiration time to verify the client can be evicted 
and closed after expiration time
                
> Use guava LoadingCache to implement DFSClientCache
> --------------------------------------------------
>
>                 Key: HDFS-5256
>                 URL: https://issues.apache.org/jira/browse/HDFS-5256
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: nfs
>            Reporter: Haohui Mai
>            Assignee: Haohui Mai
>         Attachments: HDFS-5256.000.patch, HDFS-5256.001.patch, 
> HDFS-5256.002.patch
>
>
> Google Guava provides an implementation of LoadingCache. Use the LoadingCache 
> to implement DFSClientCache in NFS. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to