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

Ivan Mitic commented on HADOOP-9527:
------------------------------------

Thanks Arpit for the patch and the patience! Sorry for not reviewing this 
earlier, I was not near my computer for a week.

1. Interestingly, you are going the similar route I initially took in 
branch-1-win :) (see HADOOP-8872) Unfortunately, I don't think this will work 
in all cases. See my comments from HADOOP-9061 for the reasons why. Quoting the 
branch-1-win approach below:
{quote}
 - If on Java6, do file copy instead of symlink. We've seen many problems with 
symlinks on files on Java6 and it is simply impossible to make all of them 
work. Recent examples include apps (like Oozie) built on top of MR that 
directly access symlinks using the Java File object (not thru RLFS), in which 
case things just don’t work.
 - If on Java7, symlinks work as expected.
{quote}
It took a few iterations to get symlink behavior to work properly across the 
Hadoop ecosystem with JDK6 on Windows, hence I’d stick with the approach. 

The downside would be that the readlink functionality would not work with the 
LFS on JDK6. Not sure if there are legit Hadoop scenarios that rely on this 
functionality, (I don’t know of any other than in tests). If not, I would be 
fine with just throwing the NOT_IMPL exception if readLink is invoked on JDK6 
on Windows. Things are moving toward JDK7, so I don’t see this a big gap.

I am interested in hearing your thoughts on this direction.

2. FileUtil#readLink: My preference would be to expose a single {{File 
readLink(File)}} public API instead of FileUtil APIs that accept Paths or 
Strings. This makes the contract explicit such that the input path must be a 
valid cross-platform local file system path.

3. RawLocalFs#createSymlink: IMO this method should delegate to 
FileUtil#symlink(). Currently we have two inconsistent implementation for 
symlinks in FileUtil and RawLocalFs. 


                
> TestLocalFSFileContextSymlink is broken on Windows
> --------------------------------------------------
>
>                 Key: HADOOP-9527
>                 URL: https://issues.apache.org/jira/browse/HADOOP-9527
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: test
>    Affects Versions: 3.0.0
>            Reporter: Arpit Agarwal
>            Assignee: Arpit Agarwal
>             Fix For: 3.0.0
>
>         Attachments: HADOOP-9527.001.patch, HADOOP-9527.002.patch, 
> HADOOP-9527.003.patch, HADOOP-9527.004.patch, HADOOP-9527.005.patch, 
> HADOOP-9527.006.patch, HADOOP-9527.007.patch, RenameLink.java
>
>
> Multiple test cases are broken. I didn't look at each failure in detail.
> The main cause of the failures appears to be that RawLocalFS.readLink() does 
> not work on Windows. We need "winutils readlink" to fix the test.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to