@Override public Object call() throws Exception { igfsPrimary.rename(FILE_RMT, FILE); return null; } }, IgfsInvalidPathException.class, "Cannot move file to a path with different eviction exclude setting " +
@Override public Object call() throws Exception { igfsPrimary.rename(FILE, FILE_RMT); return null; } }, IgfsInvalidPathException.class, "Cannot move file to a path with different eviction exclude setting " +
@Override public Object call() throws Exception { igfs.rename(SUBDIR, SUBDIR_NEW); return null; } }, IgfsException.class, null);
@Override public Boolean call() throws Exception { U.awaitQuiet(barrier); try { igfs.rename(SUBDIR, SUBDIR_NEW); return true; } catch (IgniteException ignored) { return false; } } });
@Override public Boolean call() throws Exception { U.awaitQuiet(barrier); try { igfs.rename(SUBDIR, SUBDIR_NEW); return true; } catch (IgniteException ignored) { return false; } } });
@Override public Boolean call() throws Exception { U.awaitQuiet(barrier); try { igfs.rename(SUBDIR, SUBDIR_NEW); return true; } catch (IgniteException ignored) { return false; } } });
@Override public Boolean call() throws Exception { U.awaitQuiet(barrier); try { igfs.rename(SUBDIR_NEW, SUBDIR); return true; } catch (IgniteException ignored) { return false; } } });
@Override public Boolean call() throws Exception { U.awaitQuiet(barrier); try { igfs.rename(SUBDIR, SUBDIR_NEW); return true; } catch (IgniteException ignored) { return false; } } });
@Override public Boolean call() throws Exception { U.awaitQuiet(barrier); try { igfs.rename(SUBDIR, SUBDIR_NEW); return true; } catch (IgniteException ignored) { return false; } } });
@Override public Boolean call() throws Exception { U.awaitQuiet(barrier); try { igfs.rename(SUBDIR, SUBDIR_NEW); return true; } catch (IgniteException ignored) { return false; } } });
@Override public Boolean call() throws Exception { U.awaitQuiet(barrier); try { igfs.rename(SUBDIR_NEW, SUBDIR); return true; } catch (IgniteException ignored) { return false; } } });
/** * Test rename in case both local and remote file systems have the same folder structure and the path being renamed * is a directory. * * @throws Exception If failed. */ @Test public void testRenameDirectory() throws Exception { create(igfs, paths(DIR, SUBDIR), null); igfs.rename(SUBDIR, SUBDIR2); checkExist(igfs, igfsSecondary, SUBDIR2); checkNotExist(igfs, igfsSecondary, SUBDIR); }
/** * Test move and rename in case both local and remote file systems have the same folder structure and the path * being renamed is a directory. * * @throws Exception If failed. */ @Test public void testMoveRenameDirectory() throws Exception { create(igfs, paths(DIR, SUBDIR, SUBSUBDIR, DIR_NEW, SUBDIR_NEW), null); igfs.rename(SUBSUBDIR, SUBSUBDIR_NEW); checkExist(igfs, igfsSecondary, SUBSUBDIR_NEW); checkNotExist(igfs, igfsSecondary, SUBSUBDIR); }
/** * Test move and rename in case both local and remote file systems have the same folder structure and the path being * renamed is a file. * * @throws Exception If failed. */ @Test public void testMoveRenameFile() throws Exception { create(igfs, paths(DIR, SUBDIR, DIR_NEW, SUBDIR_NEW), paths(FILE)); igfs.rename(FILE, FILE_NEW); checkExist(igfs, igfsSecondary, FILE_NEW); checkNotExist(igfs, igfsSecondary, FILE); }
/** * Test directory move when destination is the root. * * @throws Exception If failed. */ @Test public void testMoveDirectoryDestinationRoot() throws Exception { create(igfs, paths(DIR, SUBDIR, SUBSUBDIR), null); igfs.rename(SUBSUBDIR, IgfsPath.ROOT); checkExist(igfs, igfsSecondary, new IgfsPath("/" + SUBSUBDIR.name())); checkNotExist(igfs, igfsSecondary, SUBSUBDIR); }
/** * Test move in case both local and remote file systems have the same folder structure and the path being renamed is * a directory. * * @throws Exception If failed. */ @Test public void testMoveDirectory() throws Exception { create(igfs, paths(DIR, SUBDIR, SUBSUBDIR, DIR_NEW, SUBDIR_NEW), null); igfs.rename(SUBSUBDIR, SUBDIR_NEW); checkExist(igfs, igfsSecondary, new IgfsPath(SUBDIR_NEW, SUBSUBDIR.name())); checkNotExist(igfs, igfsSecondary, SUBSUBDIR); }
/** * Test directory move and rename when destination is the root. * * @throws Exception If failed. */ @Test public void testMoveRenameDirectoryDestinationRoot() throws Exception { IgfsPath dir = new IgfsPath("/" + SUBSUBDIR.name()); create(igfs, paths(DIR, SUBDIR, SUBSUBDIR), null); igfs.rename(SUBSUBDIR, dir); checkExist(igfs, igfsSecondary, dir); checkNotExist(igfs, igfsSecondary, SUBSUBDIR); }
/** * Test directory move and rename when source parent is the root. * * @throws Exception If failed. */ @Test public void testMoveRenameDirectorySourceParentRoot() throws Exception { IgfsPath dir = new IgfsPath("/" + SUBSUBDIR_NEW.name()); create(igfs, paths(DIR_NEW, SUBDIR_NEW, dir), null); igfs.rename(dir, SUBSUBDIR_NEW); checkExist(igfs, igfsSecondary, SUBSUBDIR_NEW); checkNotExist(igfs, igfsSecondary, dir); }
/** * Test file move when destination is the root. * * @throws Exception If failed. */ @Test public void testMoveFileDestinationRoot() throws Exception { create(igfs, paths(DIR, SUBDIR), paths(FILE)); igfs.rename(FILE, IgfsPath.ROOT); checkExist(igfs, igfsSecondary, new IgfsPath("/" + FILE.name())); checkNotExist(igfs, igfsSecondary, FILE); }
/** * Test file move and rename when destination is the root. * * @throws Exception If failed. */ @Test public void testMoveRenameFileDestinationRoot() throws Exception { IgfsPath file = new IgfsPath("/" + FILE.name()); create(igfs, paths(DIR, SUBDIR), paths(FILE)); igfs.rename(FILE, file); checkExist(igfs, igfsSecondary, file); checkNotExist(igfs, igfsSecondary, FILE); }