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

Kengo Seki commented on HADOOP-9769:
------------------------------------

[~ajisakaa] thanks for your comment.

bq. I'm thinking we can remove Stat.isAvailable since Stat.getFileStatus is 
available from all platforms.

Probably, {{Files.readAttributes(Paths.get(path.toString()), 
PosixFileAttributes.class)}} raises {{UnsupportedOperationException}} on 
Windows. So isAvailable is still needed and getFileStatus is not platform 
independent yet.

bq. In addition, Stat can be removed and Stat.getFileStatus can be moved into 
RawLocalFileSystem.

I'd like to do so. And on HADOOP-11935, [~cmccabe] suggests as follows. I'll 
refer to it. I think these are very similar issues.

bq. +1 for using java.nio.file on Linux. On Windows we can use winutils like 
always. The nice thing is, we won't need multiple code paths. The native 
library is mandatory on Windows, and nio will always be available on Linux.

> Remove org.apache.hadoop.fs.Stat when JDK6 support is dropped
> -------------------------------------------------------------
>
>                 Key: HADOOP-9769
>                 URL: https://issues.apache.org/jira/browse/HADOOP-9769
>             Project: Hadoop Common
>          Issue Type: Improvement
>    Affects Versions: 3.0.0
>            Reporter: Andrew Wang
>            Assignee: Kengo Seki
>            Priority: Minor
>         Attachments: HADOOP-9769.001.patch
>
>
> HADOOP-9652 introduces a new class which shells out to stat(1) because of the 
> lack of lstat(2) in Java 6. Java 7 has support for reading symlink targets 
> via {{Files#readSymbolicLink}}.
> When Hadoop drops Java 6 support, let's use this more portable method instead.
> See:
> http://docs.oracle.com/javase/7/docs/api/java/nio/file/Files.html#readSymbolicLink(java.nio.file.Path)



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

Reply via email to