[jira] [Commented] (HADOOP-9061) Java6+Windows does not work well with symlinks

2012-12-04 Thread Ivan Mitic (JIRA)

[ 
https://issues.apache.org/jira/browse/HADOOP-9061?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13510085#comment-13510085
 ] 

Ivan Mitic commented on HADOOP-9061:


bq. One way to handle this would be to disable symlinks on Windows unless JDK7 
is present. Another way would be a symlink-aware implementation of operations 
like File#renameTo on JDK6 and earlier. This would have to be JNI, I think, and 
could be done in libhadoop.so.
Thanks Colin for the comment! We started with a similar approach initially (by 
exposing a JNI for symlink target length extraction), however, even with this, 
we still have problems in case apps directly use File to access the symlink.

I believe the attached patch somewhat aligns with what you had in mind. Let me 
know what you think.


 Java6+Windows does not work well with symlinks
 --

 Key: HADOOP-9061
 URL: https://issues.apache.org/jira/browse/HADOOP-9061
 Project: Hadoop Common
  Issue Type: Bug
Affects Versions: 1-win
Reporter: Ivan Mitic
Assignee: Ivan Mitic
 Attachments: HADOOP-9061.branch-1-win.symlinks.patch


 We’ve seen multiple problems with file operations on symbolic links on Java6 
 on Windows. Specifically:
  - File#length returns zero on symbolic links
  - File#renameTo renames the target, not the symlink
 Problematic scenarios are mainly related to symlinks created for dist cache.
 Java7 does not have above problems.

--
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


[jira] [Commented] (HADOOP-9061) Java6+Windows does not work well with symlinks

2012-11-19 Thread Colin Patrick McCabe (JIRA)

[ 
https://issues.apache.org/jira/browse/HADOOP-9061?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13500453#comment-13500453
 ] 

Colin Patrick McCabe commented on HADOOP-9061:
--

One way to handle this would be to disable symlinks on Windows unless JDK7 is 
present.  Another way would be a symlink-aware implementation of operations 
like {{File#renameTo}} on JDK6 and earlier.  This would have to be JNI, I 
think, and could be done in {{libhadoop.so}}.

 Java6+Windows does not work well with symlinks
 --

 Key: HADOOP-9061
 URL: https://issues.apache.org/jira/browse/HADOOP-9061
 Project: Hadoop Common
  Issue Type: Bug
Affects Versions: 1-win
Reporter: Ivan Mitic
Assignee: Ivan Mitic

 We’ve seen multiple problems with file operations on symbolic links on Java6 
 on Windows. Specifically:
  - File#length returns zero on symbolic links
  - File#renameTo renames the target, not the symlink
 Problematic scenarios are mainly related to symlinks created for dist cache.
 Java7 does not have above problems.

--
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