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

Chris Nauroth commented on HDFS-5096:
-------------------------------------

+1 for the patch, pending resolution of feedback from Andrew too.  Thanks very 
much, Colin!

I've had a chance to take this patch for a manual test run too in a 
pseudo-distributed deployment.  I created some files in a directory, and then 
applied a cache directive on that directory.  All of the existing files got 
cached relatively quickly due to {{CacheReplicationMonitor#kick}}.  Next, I 
added some new files in the same directory.  After the 
{{dfs.namenode.path.based.cache.refresh.interval.ms}} elapsed, 
{{CacheReplicationMonitor}} scanned again and cached the new files.  I ran pmap 
to confirm that the block files were memory-mapped into the datanode process.  
I also put my namenode through a restart to confirm that we had fixed the 
hanging problem I reported in HDFS-5313.  I'll close that issue now.

It all looks good!


> Automatically cache new data added to a cached path
> ---------------------------------------------------
>
>                 Key: HDFS-5096
>                 URL: https://issues.apache.org/jira/browse/HDFS-5096
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: datanode, namenode
>            Reporter: Andrew Wang
>            Assignee: Colin Patrick McCabe
>         Attachments: HDFS-5096-caching.005.patch, 
> HDFS-5096-caching.006.patch, HDFS-5096-caching.009.patch, 
> HDFS-5096-caching.010.patch, HDFS-5096-caching.011.patch, 
> HDFS-5096-caching.012.patch
>
>
> For some applications, it's convenient to specify a path to cache, and have 
> HDFS automatically cache new data added to the path without sending a new 
> caching request or a manual refresh command.
> One example is new data appended to a cached file. It would be nice to 
> re-cache a block at the new appended length, and cache new blocks added to 
> the file.
> Another example is a cached Hive partition directory, where a user can drop 
> new files directly into the partition. It would be nice if these new files 
> were cached.
> In both cases, this automatic caching would happen after the file is closed, 
> i.e. block replica is finalized.



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

Reply via email to