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

Giovanni Matteo Fumarola commented on HADOOP-15465:
---------------------------------------------------

Thanks [[email protected]] for the feedback.

FileAlreadyExists extends IOException. By removing the try-catch, the next one 
will catch this exception and throws an IOException.
I tried to run ln and WinUtils on the same file and the shell returns an error:

CreateSymbolicLink error (183): Cannot create a file when that file already 
exists.
{code:java}
*symlink.c*

if (!CreateSymbolicLinkW(longLinkName, longFileName, dwFlag))
{
  ReportErrorCode(L"CreateSymbolicLink", GetLastError());
  ret = FAILURE;
  goto SymlinkEnd;
}
{code}
>From the code, it seems WinUtils returns 1.

Should we keep the patch v3 as is?

 

> Deprecate WinUtils#Symlinks by using native java code
> -----------------------------------------------------
>
>                 Key: HADOOP-15465
>                 URL: https://issues.apache.org/jira/browse/HADOOP-15465
>             Project: Hadoop Common
>          Issue Type: Sub-task
>            Reporter: Íñigo Goiri
>            Assignee: Giovanni Matteo Fumarola
>            Priority: Major
>         Attachments: HADOOP-15465.v0.patch, HADOOP-15465.v0.proto.patch, 
> HADOOP-15465.v1.patch, HADOOP-15465.v2.patch, HADOOP-15465.v3.patch
>
>
> Hadoop uses the shell to create symbolic links. Now that Hadoop relies on 
> Java 7+, we can deprecate all the shell code and rely on the Java APIs.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to