hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Nauroth (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-12045) Enable LocalFileSystem#setTimes to change atime
Date Mon, 29 Jun 2015 23:34:06 GMT

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

Chris Nauroth commented on HADOOP-12045:
----------------------------------------

[~fjk], thank you for the update.

Unfortunately, the new symlink tests do not pass on Windows.  This is a consequence of the
way symlink integration works on Windows right now.  On Windows, a call to {{RawLocalFileSystem#getFileLinkStatus}}
returns a {{FileStatus}} populated with the symlink as the path, but the other attributes
are populated from the symlink target.  This breaks the assertions that calling {{setTimes}}
on the link doesn't alter the times reported by subsequent {{getFileLinkStatus}} calls.

This is a known limitation unrelated to the current patch, and we already have comments marking
TODO's around native stat support for Windows.  I think it's appropriate to skip these tests
on Windows for now.  You can do that by adding overrides in {{TestSymlinkLocalFS}} for each
of the new test methods added to {{SymlinkBaseTest}}.  The override just checks if it's running
on Windows, and then delegates up to the superclass to run the test.  Here is an existing
example:

{code}
  @Override
  public void testCreateDanglingLink() throws IOException {
    // Dangling symlinks are not supported on Windows local file system.
    assumeTrue(!Path.WINDOWS);
    super.testCreateDanglingLink();
  }
{code}

After that's done, I suspect it will be the final version of the patch.  Thanks for sticking
with this!

> 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,
HADOOP-12045.004-1.patch, HADOOP-12045.004-2.patch, HADOOP-12045.005-1.patch, HADOOP-12045.005-2.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)

Mime
View raw message