[
https://issues.apache.org/jira/browse/HADOOP-9483?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13634228#comment-13634228
]
Chris Nauroth commented on HADOOP-9483:
---------------------------------------
Feedback on the above proposal from Ivan:
Thanks Chris for the writeup on readLink! The approach overall looks good. I
have a few comments that should help with further progress:
1. There is no need to support junction points. Let's only focus on symlinks.
We've seen problems with junction points on Windows for paths longer than 126
chars (IIRC) and finally decided to stay out of supporting them.
2. In winutils we already have SymbolicLinkCheck function which checks if the
given path is a symlink. See if you can reconcile this with the new code.
3. DeviceIoControl is one way to retrieve the symlink target path.
GetFinalPathNameByHandle provides the similar functionality and might be easier
to use. See which one suits you better. (it is fine to assume that we’re
running on Vista or later Windows OS).
Feedback on the above proposal from Chuan:
On the readlink implementation I agree with the general approach Chris has
described.
Some logic is already implemented in libwinutils as Ivan mentioned.
I also think GetFinalPathNameByHandle() may be easier to use than the
DeviceIoControl().
> winutils support fo readlink command
> ------------------------------------
>
> Key: HADOOP-9483
> URL: https://issues.apache.org/jira/browse/HADOOP-9483
> Project: Hadoop Common
> Issue Type: Improvement
> Components: util
> Affects Versions: 3.0.0
> Reporter: Chris Nauroth
>
> The current codebase relies on the Unix readlink command to determine the
> target of a symlink on the local file system. winutils currently does not
> support this functionality on Windows. Adding the command to winutils will
> prevent the need to use GnuWin32 or Cygwin for readlink support.
--
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