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

Colin Patrick McCabe commented on HDFS-5431:
--------------------------------------------

I think we should make checking against the cache pool limit optional in 
addDirective and modifyDirective.  Basically have a parameter like checkLimit.  
If checkLimit = false, we allow the addition/modification to happen without 
respect to the limit.  If it is true, then we throw an exception if the 
proposed change would exceed the cache pool limits.

One detail: we should update the bytesNeeded and filesAffected after 
addDirective/modifyDirective, so that multiple calls in a row have the expected 
semantics.  It would also be good to ensure that an add plus a list delivered 
the correct result.  A condition variable could be used to do this I think.  As 
a bonus, this would avoid the need to kick the CRM thread after every 
add/modify/etc.  We probably still want to kick it after deletes and cache pool 
add/mod/dels, though.

> support cachepool-based limit management in path-based caching
> --------------------------------------------------------------
>
>                 Key: HDFS-5431
>                 URL: https://issues.apache.org/jira/browse/HDFS-5431
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: datanode, namenode
>    Affects Versions: 3.0.0
>            Reporter: Colin Patrick McCabe
>            Assignee: Andrew Wang
>         Attachments: hdfs-5431-1.patch, hdfs-5431-2.patch
>
>
> We should support cachepool-based quota management in path-based caching.



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)

Reply via email to