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

Chris Nauroth updated HADOOP-12045:
-----------------------------------
    Assignee: Kazuho Fujii

Hello [~fjk].  Thank you for the patch.  This looks good overall, and I've 
verified that it's fine on Windows.

Before we commit this, I'd like to make sure that symlinks are handled 
correctly.  In {{java.nio.file}}, symlinks are followed by default, unless the 
caller passes {{LinkOption#NOFOLLOW_LINKS}}.  I haven't been able to find 
documentation that clearly states the contractual behavior for {{java.io.File}}.

I think the important thing for Hadoop is to remain backwards-compatible with 
current behavior.  That means that we'd need to make sure mtime is populated 
the same way before and after this change when symlinks are present.  For 
atime, the logic should be equivalent.

A few specific cases I can think of:
# The client calls {{RawLocalFileSystem#getFileLinkStatus}}, indicating that 
they want information on the link itself instead of its target.
# The argument is a symlink pointing to a directory.
# The argument is a symlink pointing to a file.
# The argument is a dangling symlink (target does not exist).

It would be great if we could have test cases for each of these, then apply the 
{{RawLocalFileSystem}} changes, and then verify that thoses tests continue to 
pass.

> Enable LocalFileSystem#setTimes to change atime
> -----------------------------------------------
>
>                 Key: HADOOP-12045
>                 URL: https://issues.apache.org/jira/browse/HADOOP-12045
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: fs
>            Reporter: Kazuho Fujii
>            Assignee: Kazuho Fujii
>            Priority: Minor
>         Attachments: HADOOP-12045.001.patch, HADOOP-12045.002.patch, 
> HADOOP-12045.003.patch
>
>
> LocalFileSystem#setTimes method can not change the last access time currently.
> With java.nio.file package in Java 7, we can implement the function easily.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to