[ 
https://issues.apache.org/jira/browse/HDFS-5430?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrew Wang updated HDFS-5430:
------------------------------

    Attachment: hdfs-5430-1.patch

Patch attached, I tried making a binary one this time for the edits stored test.

This adds a new {{expiryTime}} field to {{CacheDirective}} and {{Info}}. Adding 
and removing via CacheAdmin uses relative times for ease of use, but else it's 
just an {{expiryTime}} timestamp. Once expired, directives are no longer 
cached, but are not automatically removed. The user needs to go in and clean 
them up, or modify them so they are valid again.

I tested manually a bit by adding directives with expirations and watched them 
time out and be uncached. Also included is a unit test.

One further idea for an improvement is putting a max TTL on a CachePool; this 
way, all directives added to the pool eventually expire.

> Support TTL on CacheBasedPathDirectives
> ---------------------------------------
>
>                 Key: HDFS-5430
>                 URL: https://issues.apache.org/jira/browse/HDFS-5430
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: datanode, namenode
>            Reporter: Colin Patrick McCabe
>            Assignee: Andrew Wang
>            Priority: Minor
>         Attachments: hdfs-5430-1.patch
>
>
> It would be nice if CacheBasedPathDirectives would support an expiration 
> time, after which they would be automatically removed by the NameNode.  This 
> time would probably be in wall-block time for the convenience of system 
> administrators.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to