You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Jonathan Kelly <jo...@gmail.com> on 2018/02/02 17:21:37 UTC

Moving directories

Hi, Ignite community,

I came across a comment in IgniteFileSystem that surprised me. The #rename
method's JavaDocs
<https://github.com/apache/ignite/blob/2.3.0/modules/core/src/main/java/org/apache/ignite/IgniteFileSystem.java#L445-L464>
mention that moving a directory between different parent directories is
disallowed. This seems rather odd, since such an operation is  usually
allowed by Hadoop FileSystems. (I realize IgniteFileSystem itself is not a
Hadoop FileSystem, but I understand that it's the server-side component
corresponding to the IgniteHadoopFileSystem client-side code.)

I tested it out for myself though, and I found that IGFS seems to allow
directory moves without any problem. So, I was wondering, is this comment
just stale?

Thanks,
Jonathan

Re: Moving directories

Posted by Jonathan Kelly <jo...@gmail.com>.
Val,

Yes, that definitely makes sense regarding not being able to move a
directory into one of its descendants.

However, it's not just that the example is wrong but also these sentences:

You are free to rename/move data files as you wish, but directories can be
only renamed.
You cannot move the directory between different parent directories.

Thanks,
Jonathan

On Fri, Feb 2, 2018 at 11:52 AM vkulichenko <va...@gmail.com>
wrote:

> Hi Jonathan,
>
> You can't rename/move a directory if destination is a subdirectory of
> source. For example, you can't do this:
>
> /A/B -> /A/B/C
>
> Looks like JavaDoc has incorrect example, I will check this and fix.
>
> -Val
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>

Re: Moving directories

Posted by vkulichenko <va...@gmail.com>.
Hi Jonathan,

You can't rename/move a directory if destination is a subdirectory of
source. For example, you can't do this:

/A/B -> /A/B/C

Looks like JavaDoc has incorrect example, I will check this and fix.

-Val



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/