Jungtaek Lim created STORM-1629:
-----------------------------------

             Summary: Files/move doesn't work properly with non-empty directory 
in Windows
                 Key: STORM-1629
                 URL: https://issues.apache.org/jira/browse/STORM-1629
             Project: Apache Storm
          Issue Type: Bug
          Components: storm-core
    Affects Versions: 1.0.0, 2.0.0
         Environment: Windows
            Reporter: Jungtaek Lim
            Assignee: Jungtaek Lim
            Priority: Blocker


Distributed version of download-storm-code uses Files#move().
It runs well on *Nix (including OSX) but fails on Windows.

Javadoc describes this behavior, please refer below link.
https://docs.oracle.com/javase/7/docs/api/java/nio/file/Files.html#move(java.nio.file.Path,%20java.nio.file.Path,%20java.nio.file.CopyOption...)

{quote}
When invoked to move a directory that is not empty then the directory is moved 
if it does not require moving the entries in the directory. For example, 
renaming a directory on the same FileStore will usually not require moving the 
entries in the directory. When moving a directory requires that its entries be 
moved then this method fails (by throwing an IOException). To move a file tree 
may involve copying rather than moving directories and this can be done using 
the copy method in conjunction with the Files.walkFileTree utility method.
{quote}

If directory is not empty, file system should treat "move directory" as 
"rename".
Unfortunately, file system on Windows 8 doesn't.

We should change the way to be compatible with both kinds of OS.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to