[
https://issues.apache.org/jira/browse/HADOOP-9043?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Chris Nauroth updated HADOOP-9043:
----------------------------------
Attachment: HADOOP-9043.trunk.3.patch
I'm attaching a new trunk patch that gets us a little closer to the end goal.
I clicked Cancel Patch, because there are still a lot of things in flux on this
jira, and the patch isn't final. I also didn't provide a branch-1-win version
of the patch, because I think it will be easier to do a mass backport after
finalizing the trunk patch.
The changes since Arpit's prior patch are:
# Use {{assumeTrue(!WINDOWS)}} to skip tests related to dangling symlinks,
which don't work on Windows with local file system.
# Change symlink.c so that the new validation check for forward slashes also
prints an error message.
# Change {{RawLocalFs#getPathWithoutSchemeAndAuthority}} to pass through
{{java.io.File}} before attempting symlink creation. The symlink API operates
on {{Path}} objects, which are inherently forward-slashed regardless of OS.
This meant that the new validation check was rejecting the calls (as we want).
Passing through {{File}} converts to backslash on Windows. This is the same
approach that we took in the YARN nodemanager, which heavily relies on symlinks
during container launch to reference localized resources.
> winutils can create unusable symlinks
> -------------------------------------
>
> Key: HADOOP-9043
> URL: https://issues.apache.org/jira/browse/HADOOP-9043
> Project: Hadoop Common
> Issue Type: Bug
> Components: util
> Affects Versions: 3.0.0, 1-win
> Reporter: Chris Nauroth
> Assignee: Arpit Agarwal
> Fix For: 3.0.0, 1-win
>
> Attachments: HADOOP-9043.branch-1.2.patch,
> HADOOP-9043.branch-1-win.patch, HADOOP-9043.trunk.2.patch,
> HADOOP-9043.trunk.3.patch, HADOOP-9043.trunk.patch
>
>
> In general, the winutils symlink command rejects attempts to create symlinks
> targeting a destination file that does not exist. However, if given a
> symlink destination with forward slashes pointing at a file that does exist,
> then it creates the symlink with the forward slashes, and then attempts to
> open the file through the symlink will fail.
--
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