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-9483) winutils support fo readlink command
Date Wed, 17 Apr 2013 17:51:16 GMT

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

Chris Nauroth commented on HADOOP-9483:
---------------------------------------

Ivan and Chuan, thank you for the feedback.  A couple of follow-up questions:

First, regarding {{DeviceIoControl}} vs. {{GetFinalPathNameByHandle}}, I have not been able
to determine from reading documentation if the "final" path name would also get canonicalized/made
absolute.  The behavior of Unix readlink is that it does not make the returned value absolute/canonicalized,
so a relative path in a symlink would be preserved as is.  For example:

{code}
chris@Chriss-MacBook-Pro:ttys000] ~                                                      
                                                                                         
   
> pwd
/Users/chris
[chris@Chriss-MacBook-Pro:ttys000] ~                                                     
                                                                                         
    
> mkdir testlink
[chris@Chriss-MacBook-Pro:ttys000] ~                                                     
                                                                                         
    
> cd testlink
[chris@Chriss-MacBook-Pro:ttys000] testlink                                              
                                                                                         
    
> ln -sfn .././hello
[chris@Chriss-MacBook-Pro:ttys000] testlink                                              
                                                                                         
    
> ll
total 8
lrwxr-xr-x  1 chris  staff    10B Apr 17 10:45 hello@ -> .././hello
[chris@Chriss-MacBook-Pro:ttys000] testlink                                              
                                                                                         
    
> readlink hello 
.././hello
{code}

Link to docs on {{GetFinalPathNameByHandle}}: http://msdn.microsoft.com/en-us/library/windows/desktop/aa364962(v=vs.85).aspx

If you're not sure of the answer, then I'll experiment with the 2 functions to determine the
behavior.

Second, when we say that we should not support junction points, does that mean that winutils
readlink should fail fast and return an error if it's being called on a junction point?

                
> 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

Mime
View raw message