[
https://issues.apache.org/jira/browse/HADOOP-8411?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13280528#comment-13280528
]
Daryn Sharp commented on HADOOP-8411:
-------------------------------------
I don't think {{import org.apache.tools.ant.util.FileUtils}} is needed?
{{File tmpTargetFile = new File(target.getParentFile(), "original.tmp");}} will
cause collisions if files are concurrently renamed in the same directory. I'd
do something more like {{new File(target+".tmp")}}.
Is {{renameAtomicWithOverride}} intended to handle the issue later commented
"Files that are currently in use cannot be deleted on Windows"? If so, won't
the delete of the renamed target always fail?
I'm a bit leery of adding windows-specific behavior because those of us not
running on windows may unknowingly break it. Would it be possible to commonize
the behavior by trying to do the rename, if that fails, try to do the double
rename? I'd also tag the renamed target with {{File#deleteOnExit()}} just in
case an exception happens.
Is the windows conditional in {{TestStorageDirectoryFailure}} needed? It seems
like it should work for all platforms?
Have you tested that the ugi username changes in {{TestWebHdfsUrl}} won't break
non-windows platforms?
> TestStorageDirecotyFailure, TestTaskLogsTruncater, TestWebHdfsUrl and
> TestSecurityUtil fail on Windows
> ------------------------------------------------------------------------------------------------------
>
> Key: HADOOP-8411
> URL: https://issues.apache.org/jira/browse/HADOOP-8411
> Project: Hadoop Common
> Issue Type: Bug
> Components: util
> Affects Versions: 1.1.0
> Reporter: Ivan Mitic
> Assignee: Ivan Mitic
> Attachments: HADOOP-8411-branch-1-win.patch,
> HADOOP-8411-branch-1-win.patch
>
> Original Estimate: 48h
> Remaining Estimate: 48h
>
> Jira tracking failures from the summary.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira