You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2014/12/05 09:44:37 UTC
[10/38] incubator-ignite git commit: # Renaming
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f3d93762/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsDualAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsDualAbstractSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsDualAbstractSelfTest.java
index 221cea0..2cc67ec 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsDualAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsDualAbstractSelfTest.java
@@ -42,13 +42,13 @@ public abstract class GridGgfsDualAbstractSelfTest extends GridGgfsAbstractSelfT
* @throws Exception If failed.
*/
public void testDefaultDirectories() throws Exception {
- GridGgfsPath gg = new GridGgfsPath("/gridgain");
- GridGgfsPath[] paths = paths(
- gg, new GridGgfsPath(gg, "sync"), new GridGgfsPath(gg, "async"), new GridGgfsPath(gg, "primary"));
+ IgniteFsPath gg = new IgniteFsPath("/gridgain");
+ IgniteFsPath[] paths = paths(
+ gg, new IgniteFsPath(gg, "sync"), new IgniteFsPath(gg, "async"), new IgniteFsPath(gg, "primary"));
create(ggfs, paths, null);
- for (GridGgfsPath p : paths)
+ for (IgniteFsPath p : paths)
assert ggfs.exists(p);
assert ggfs.listFiles(gg).size() == 3;
@@ -142,8 +142,8 @@ public abstract class GridGgfsDualAbstractSelfTest extends GridGgfsAbstractSelfT
* @throws Exception If failed.
*/
public void testRenameFileParentRootSourceMissing() throws Exception {
- GridGgfsPath file1 = new GridGgfsPath("/file1");
- GridGgfsPath file2 = new GridGgfsPath("/file2");
+ IgniteFsPath file1 = new IgniteFsPath("/file1");
+ IgniteFsPath file2 = new IgniteFsPath("/file2");
create(ggfsSecondary, null, paths(file1));
create(ggfs, null, null);
@@ -191,8 +191,8 @@ public abstract class GridGgfsDualAbstractSelfTest extends GridGgfsAbstractSelfT
* @throws Exception If failed.
*/
public void testRenameDirectoryParentRootSourceMissing() throws Exception {
- GridGgfsPath dir1 = new GridGgfsPath("/dir1");
- GridGgfsPath dir2 = new GridGgfsPath("/dir2");
+ IgniteFsPath dir1 = new IgniteFsPath("/dir1");
+ IgniteFsPath dir2 = new IgniteFsPath("/dir2");
create(ggfsSecondary, paths(dir1), null);
create(ggfs, null, null);
@@ -215,7 +215,7 @@ public abstract class GridGgfsDualAbstractSelfTest extends GridGgfsAbstractSelfT
ggfs.rename(FILE, SUBDIR_NEW);
checkExist(ggfs, SUBDIR);
- checkExist(ggfs, ggfsSecondary, new GridGgfsPath(SUBDIR_NEW, FILE.name()));
+ checkExist(ggfs, ggfsSecondary, new IgniteFsPath(SUBDIR_NEW, FILE.name()));
checkNotExist(ggfs, ggfsSecondary, FILE);
}
@@ -231,7 +231,7 @@ public abstract class GridGgfsDualAbstractSelfTest extends GridGgfsAbstractSelfT
ggfs.rename(FILE, SUBDIR_NEW);
checkExist(ggfs, DIR, SUBDIR);
- checkExist(ggfs, ggfsSecondary, new GridGgfsPath(SUBDIR_NEW, FILE.name()));
+ checkExist(ggfs, ggfsSecondary, new IgniteFsPath(SUBDIR_NEW, FILE.name()));
checkNotExist(ggfs, ggfsSecondary, FILE);
}
@@ -247,7 +247,7 @@ public abstract class GridGgfsDualAbstractSelfTest extends GridGgfsAbstractSelfT
ggfs.rename(FILE, SUBDIR_NEW);
checkExist(ggfs, SUBDIR_NEW);
- checkExist(ggfs, ggfsSecondary, new GridGgfsPath(SUBDIR_NEW, FILE.name()));
+ checkExist(ggfs, ggfsSecondary, new IgniteFsPath(SUBDIR_NEW, FILE.name()));
checkNotExist(ggfs, ggfsSecondary, FILE);
}
@@ -263,7 +263,7 @@ public abstract class GridGgfsDualAbstractSelfTest extends GridGgfsAbstractSelfT
ggfs.rename(FILE, SUBDIR_NEW);
checkExist(ggfs, DIR_NEW, SUBDIR_NEW);
- checkExist(ggfs, ggfsSecondary, new GridGgfsPath(SUBDIR_NEW, FILE.name()));
+ checkExist(ggfs, ggfsSecondary, new IgniteFsPath(SUBDIR_NEW, FILE.name()));
checkNotExist(ggfs, ggfsSecondary, FILE);
}
@@ -279,7 +279,7 @@ public abstract class GridGgfsDualAbstractSelfTest extends GridGgfsAbstractSelfT
ggfs.rename(FILE, SUBDIR_NEW);
checkExist(ggfs, SUBDIR, SUBDIR_NEW);
- checkExist(ggfs, ggfsSecondary, new GridGgfsPath(SUBDIR_NEW, FILE.name()));
+ checkExist(ggfs, ggfsSecondary, new IgniteFsPath(SUBDIR_NEW, FILE.name()));
checkNotExist(ggfs, ggfsSecondary, FILE);
}
@@ -295,7 +295,7 @@ public abstract class GridGgfsDualAbstractSelfTest extends GridGgfsAbstractSelfT
ggfs.rename(FILE, SUBDIR_NEW);
checkExist(ggfs, DIR, SUBDIR, DIR_NEW, SUBDIR_NEW);
- checkExist(ggfs, ggfsSecondary, new GridGgfsPath(SUBDIR_NEW, FILE.name()));
+ checkExist(ggfs, ggfsSecondary, new IgniteFsPath(SUBDIR_NEW, FILE.name()));
checkNotExist(ggfs, ggfsSecondary, FILE);
}
@@ -308,10 +308,10 @@ public abstract class GridGgfsDualAbstractSelfTest extends GridGgfsAbstractSelfT
create(ggfsSecondary, paths(DIR, SUBDIR), paths(FILE));
create(ggfs, paths(DIR), null);
- ggfs.rename(FILE, new GridGgfsPath());
+ ggfs.rename(FILE, new IgniteFsPath());
checkExist(ggfs, SUBDIR);
- checkExist(ggfs, ggfsSecondary, new GridGgfsPath("/" + FILE.name()));
+ checkExist(ggfs, ggfsSecondary, new IgniteFsPath("/" + FILE.name()));
checkNotExist(ggfs, ggfsSecondary, FILE);
}
@@ -324,10 +324,10 @@ public abstract class GridGgfsDualAbstractSelfTest extends GridGgfsAbstractSelfT
create(ggfsSecondary, paths(DIR, SUBDIR), paths(FILE));
create(ggfs, null, null);
- ggfs.rename(FILE, new GridGgfsPath());
+ ggfs.rename(FILE, new IgniteFsPath());
checkExist(ggfs, DIR, SUBDIR);
- checkExist(ggfs, ggfsSecondary, new GridGgfsPath("/" + FILE.name()));
+ checkExist(ggfs, ggfsSecondary, new IgniteFsPath("/" + FILE.name()));
checkNotExist(ggfs, ggfsSecondary, FILE);
}
@@ -337,14 +337,14 @@ public abstract class GridGgfsDualAbstractSelfTest extends GridGgfsAbstractSelfT
* @throws Exception If failed.
*/
public void testMoveFileSourceParentRootSourceMissing() throws Exception {
- GridGgfsPath file = new GridGgfsPath("/" + FILE.name());
+ IgniteFsPath file = new IgniteFsPath("/" + FILE.name());
create(ggfsSecondary, paths(DIR_NEW, SUBDIR_NEW), paths(file));
create(ggfs, paths(DIR_NEW, SUBDIR_NEW), null);
ggfs.rename(file, SUBDIR_NEW);
- checkExist(ggfs, ggfsSecondary, new GridGgfsPath(SUBDIR_NEW, FILE.name()));
+ checkExist(ggfs, ggfsSecondary, new IgniteFsPath(SUBDIR_NEW, FILE.name()));
checkNotExist(ggfs, ggfsSecondary, file);
}
@@ -354,7 +354,7 @@ public abstract class GridGgfsDualAbstractSelfTest extends GridGgfsAbstractSelfT
* @throws Exception If failed.
*/
public void testMoveFileSourceParentRootDestinationMissingPartially() throws Exception {
- GridGgfsPath file = new GridGgfsPath("/" + FILE.name());
+ IgniteFsPath file = new IgniteFsPath("/" + FILE.name());
create(ggfsSecondary, paths(DIR_NEW, SUBDIR_NEW), paths(file));
create(ggfs, paths(DIR_NEW), null);
@@ -362,7 +362,7 @@ public abstract class GridGgfsDualAbstractSelfTest extends GridGgfsAbstractSelfT
ggfs.rename(file, SUBDIR_NEW);
checkExist(ggfs, SUBDIR_NEW);
- checkExist(ggfs, ggfsSecondary, new GridGgfsPath(SUBDIR_NEW, FILE.name()));
+ checkExist(ggfs, ggfsSecondary, new IgniteFsPath(SUBDIR_NEW, FILE.name()));
checkNotExist(ggfs, ggfsSecondary, file);
}
@@ -372,7 +372,7 @@ public abstract class GridGgfsDualAbstractSelfTest extends GridGgfsAbstractSelfT
* @throws Exception If failed.
*/
public void testMoveFileSourceParentRootDestinationMissing() throws Exception {
- GridGgfsPath file = new GridGgfsPath("/" + FILE.name());
+ IgniteFsPath file = new IgniteFsPath("/" + FILE.name());
create(ggfsSecondary, paths(DIR_NEW, SUBDIR_NEW), paths(file));
create(ggfs, null, null);
@@ -380,7 +380,7 @@ public abstract class GridGgfsDualAbstractSelfTest extends GridGgfsAbstractSelfT
ggfs.rename(file, SUBDIR_NEW);
checkExist(ggfs, DIR_NEW, SUBDIR_NEW);
- checkExist(ggfs, ggfsSecondary, new GridGgfsPath(SUBDIR_NEW, FILE.name()));
+ checkExist(ggfs, ggfsSecondary, new IgniteFsPath(SUBDIR_NEW, FILE.name()));
checkNotExist(ggfs, ggfsSecondary, file);
}
@@ -486,7 +486,7 @@ public abstract class GridGgfsDualAbstractSelfTest extends GridGgfsAbstractSelfT
* @throws Exception If failed.
*/
public void testMoveRenameFileDestinationRootSourceMissingPartially() throws Exception {
- GridGgfsPath file = new GridGgfsPath("/" + FILE.name());
+ IgniteFsPath file = new IgniteFsPath("/" + FILE.name());
create(ggfsSecondary, paths(DIR, SUBDIR), paths(FILE));
create(ggfs, paths(DIR), null);
@@ -504,7 +504,7 @@ public abstract class GridGgfsDualAbstractSelfTest extends GridGgfsAbstractSelfT
* @throws Exception If failed.
*/
public void testMoveRenameFileDestinationRootSourceMissing() throws Exception {
- GridGgfsPath file = new GridGgfsPath("/" + FILE.name());
+ IgniteFsPath file = new IgniteFsPath("/" + FILE.name());
create(ggfsSecondary, paths(DIR, SUBDIR), paths(FILE));
create(ggfs, null, null);
@@ -522,7 +522,7 @@ public abstract class GridGgfsDualAbstractSelfTest extends GridGgfsAbstractSelfT
* @throws Exception If failed.
*/
public void testMoveRenameFileSourceParentRootSourceMissing() throws Exception {
- GridGgfsPath file = new GridGgfsPath("/" + FILE_NEW.name());
+ IgniteFsPath file = new IgniteFsPath("/" + FILE_NEW.name());
create(ggfsSecondary, paths(DIR_NEW, SUBDIR_NEW), paths(file));
create(ggfs, paths(DIR_NEW, SUBDIR_NEW), null);
@@ -539,7 +539,7 @@ public abstract class GridGgfsDualAbstractSelfTest extends GridGgfsAbstractSelfT
* @throws Exception If failed.
*/
public void testMoveRenameFileSourceParentRootDestinationMissingPartially() throws Exception {
- GridGgfsPath file = new GridGgfsPath("/" + FILE_NEW.name());
+ IgniteFsPath file = new IgniteFsPath("/" + FILE_NEW.name());
create(ggfsSecondary, paths(DIR_NEW, SUBDIR_NEW), paths(file));
create(ggfs, paths(DIR_NEW), null);
@@ -557,7 +557,7 @@ public abstract class GridGgfsDualAbstractSelfTest extends GridGgfsAbstractSelfT
* @throws Exception If failed.
*/
public void testMoveRenameFileSourceParentRootDestinationMissing() throws Exception {
- GridGgfsPath file = new GridGgfsPath("/" + FILE_NEW.name());
+ IgniteFsPath file = new IgniteFsPath("/" + FILE_NEW.name());
create(ggfsSecondary, paths(DIR_NEW, SUBDIR_NEW), paths(file));
create(ggfs, null, null);
@@ -581,7 +581,7 @@ public abstract class GridGgfsDualAbstractSelfTest extends GridGgfsAbstractSelfT
ggfs.rename(SUBSUBDIR, SUBDIR_NEW);
checkExist(ggfs, SUBDIR);
- checkExist(ggfs, ggfsSecondary, new GridGgfsPath(SUBDIR_NEW, SUBSUBDIR.name()));
+ checkExist(ggfs, ggfsSecondary, new IgniteFsPath(SUBDIR_NEW, SUBSUBDIR.name()));
checkNotExist(ggfs, ggfsSecondary, SUBSUBDIR);
}
@@ -598,7 +598,7 @@ public abstract class GridGgfsDualAbstractSelfTest extends GridGgfsAbstractSelfT
checkExist(ggfs, DIR);
checkExist(ggfs, SUBDIR);
- checkExist(ggfs, ggfsSecondary, new GridGgfsPath(SUBDIR_NEW, SUBSUBDIR.name()));
+ checkExist(ggfs, ggfsSecondary, new IgniteFsPath(SUBDIR_NEW, SUBSUBDIR.name()));
checkNotExist(ggfs, ggfsSecondary, SUBSUBDIR);
}
@@ -614,7 +614,7 @@ public abstract class GridGgfsDualAbstractSelfTest extends GridGgfsAbstractSelfT
ggfs.rename(SUBSUBDIR, SUBDIR_NEW);
checkExist(ggfs, SUBDIR_NEW);
- checkExist(ggfs, ggfsSecondary, new GridGgfsPath(SUBDIR_NEW, SUBSUBDIR.name()));
+ checkExist(ggfs, ggfsSecondary, new IgniteFsPath(SUBDIR_NEW, SUBSUBDIR.name()));
checkNotExist(ggfs, ggfsSecondary, SUBSUBDIR);
}
@@ -630,7 +630,7 @@ public abstract class GridGgfsDualAbstractSelfTest extends GridGgfsAbstractSelfT
ggfs.rename(SUBSUBDIR, SUBDIR_NEW);
checkExist(ggfs, DIR_NEW, SUBDIR_NEW);
- checkExist(ggfs, ggfsSecondary, new GridGgfsPath(SUBDIR_NEW, SUBSUBDIR.name()));
+ checkExist(ggfs, ggfsSecondary, new IgniteFsPath(SUBDIR_NEW, SUBSUBDIR.name()));
checkNotExist(ggfs, ggfsSecondary, SUBSUBDIR);
}
@@ -646,7 +646,7 @@ public abstract class GridGgfsDualAbstractSelfTest extends GridGgfsAbstractSelfT
ggfs.rename(SUBSUBDIR, SUBDIR_NEW);
checkExist(ggfs, SUBDIR, SUBDIR_NEW);
- checkExist(ggfs, ggfsSecondary, new GridGgfsPath(SUBDIR_NEW, SUBSUBDIR.name()));
+ checkExist(ggfs, ggfsSecondary, new IgniteFsPath(SUBDIR_NEW, SUBSUBDIR.name()));
checkNotExist(ggfs, ggfsSecondary, SUBSUBDIR);
}
@@ -662,7 +662,7 @@ public abstract class GridGgfsDualAbstractSelfTest extends GridGgfsAbstractSelfT
ggfs.rename(SUBSUBDIR, SUBDIR_NEW);
checkExist(ggfs, DIR, SUBDIR, DIR_NEW, SUBDIR_NEW);
- checkExist(ggfs, ggfsSecondary, new GridGgfsPath(SUBDIR_NEW, SUBSUBDIR.name()));
+ checkExist(ggfs, ggfsSecondary, new IgniteFsPath(SUBDIR_NEW, SUBSUBDIR.name()));
checkNotExist(ggfs, ggfsSecondary, SUBSUBDIR);
}
@@ -675,10 +675,10 @@ public abstract class GridGgfsDualAbstractSelfTest extends GridGgfsAbstractSelfT
create(ggfsSecondary, paths(DIR, SUBDIR, SUBSUBDIR), null);
create(ggfs, paths(DIR), null);
- ggfs.rename(SUBSUBDIR, new GridGgfsPath());
+ ggfs.rename(SUBSUBDIR, new IgniteFsPath());
checkExist(ggfs, SUBDIR);
- checkExist(ggfs, ggfsSecondary, new GridGgfsPath("/" + SUBSUBDIR.name()));
+ checkExist(ggfs, ggfsSecondary, new IgniteFsPath("/" + SUBSUBDIR.name()));
checkNotExist(ggfs, ggfsSecondary, SUBSUBDIR);
}
@@ -691,10 +691,10 @@ public abstract class GridGgfsDualAbstractSelfTest extends GridGgfsAbstractSelfT
create(ggfsSecondary, paths(DIR, SUBDIR, SUBSUBDIR), null);
create(ggfs, null, null);
- ggfs.rename(SUBSUBDIR, new GridGgfsPath());
+ ggfs.rename(SUBSUBDIR, new IgniteFsPath());
checkExist(ggfs, DIR, SUBDIR);
- checkExist(ggfs, ggfsSecondary, new GridGgfsPath("/" + SUBSUBDIR.name()));
+ checkExist(ggfs, ggfsSecondary, new IgniteFsPath("/" + SUBSUBDIR.name()));
checkNotExist(ggfs, ggfsSecondary, SUBSUBDIR);
}
@@ -704,14 +704,14 @@ public abstract class GridGgfsDualAbstractSelfTest extends GridGgfsAbstractSelfT
* @throws Exception If failed.
*/
public void testMoveDirectorySourceParentRootSourceMissing() throws Exception {
- GridGgfsPath dir = new GridGgfsPath("/" + SUBSUBDIR.name());
+ IgniteFsPath dir = new IgniteFsPath("/" + SUBSUBDIR.name());
create(ggfsSecondary, paths(DIR_NEW, SUBDIR_NEW, dir), null);
create(ggfs, paths(DIR_NEW, SUBDIR_NEW), null);
ggfs.rename(dir, SUBDIR_NEW);
- checkExist(ggfs, ggfsSecondary, new GridGgfsPath(SUBDIR_NEW, SUBSUBDIR.name()));
+ checkExist(ggfs, ggfsSecondary, new IgniteFsPath(SUBDIR_NEW, SUBSUBDIR.name()));
checkNotExist(ggfs, ggfsSecondary, dir);
}
@@ -721,7 +721,7 @@ public abstract class GridGgfsDualAbstractSelfTest extends GridGgfsAbstractSelfT
* @throws Exception If failed.
*/
public void testMoveDirectorySourceParentRootDestinationMissingPartially() throws Exception {
- GridGgfsPath dir = new GridGgfsPath("/" + SUBSUBDIR.name());
+ IgniteFsPath dir = new IgniteFsPath("/" + SUBSUBDIR.name());
create(ggfsSecondary, paths(DIR_NEW, SUBDIR_NEW, dir), null);
create(ggfs, paths(DIR_NEW), null);
@@ -729,7 +729,7 @@ public abstract class GridGgfsDualAbstractSelfTest extends GridGgfsAbstractSelfT
ggfs.rename(dir, SUBDIR_NEW);
checkExist(ggfs, SUBDIR_NEW);
- checkExist(ggfs, ggfsSecondary, new GridGgfsPath(SUBDIR_NEW, SUBSUBDIR.name()));
+ checkExist(ggfs, ggfsSecondary, new IgniteFsPath(SUBDIR_NEW, SUBSUBDIR.name()));
checkNotExist(ggfs, ggfsSecondary, dir);
}
@@ -739,7 +739,7 @@ public abstract class GridGgfsDualAbstractSelfTest extends GridGgfsAbstractSelfT
* @throws Exception If failed.
*/
public void testMoveDirectorySourceParentRootDestinationMissing() throws Exception {
- GridGgfsPath dir = new GridGgfsPath("/" + SUBSUBDIR.name());
+ IgniteFsPath dir = new IgniteFsPath("/" + SUBSUBDIR.name());
create(ggfsSecondary, paths(DIR_NEW, SUBDIR_NEW, dir), null);
create(ggfs, null, null);
@@ -747,7 +747,7 @@ public abstract class GridGgfsDualAbstractSelfTest extends GridGgfsAbstractSelfT
ggfs.rename(dir, SUBDIR_NEW);
checkExist(ggfs, DIR_NEW, SUBDIR_NEW);
- checkExist(ggfs, ggfsSecondary, new GridGgfsPath(SUBDIR_NEW, SUBSUBDIR.name()));
+ checkExist(ggfs, ggfsSecondary, new IgniteFsPath(SUBDIR_NEW, SUBSUBDIR.name()));
checkNotExist(ggfs, ggfsSecondary, dir);
}
@@ -854,7 +854,7 @@ public abstract class GridGgfsDualAbstractSelfTest extends GridGgfsAbstractSelfT
* @throws Exception If failed.
*/
public void testMoveRenameDirectoryDestinationRootSourceMissingPartially() throws Exception {
- GridGgfsPath dir = new GridGgfsPath("/" + SUBSUBDIR.name());
+ IgniteFsPath dir = new IgniteFsPath("/" + SUBSUBDIR.name());
create(ggfsSecondary, paths(DIR, SUBDIR, SUBSUBDIR), null);
create(ggfs, paths(DIR), null);
@@ -872,7 +872,7 @@ public abstract class GridGgfsDualAbstractSelfTest extends GridGgfsAbstractSelfT
* @throws Exception If failed.
*/
public void testMoveRenameDirectoryDestinationRootSourceMissing() throws Exception {
- GridGgfsPath dir = new GridGgfsPath("/" + SUBSUBDIR.name());
+ IgniteFsPath dir = new IgniteFsPath("/" + SUBSUBDIR.name());
create(ggfsSecondary, paths(DIR, SUBDIR, SUBSUBDIR), null);
create(ggfs, null, null);
@@ -890,7 +890,7 @@ public abstract class GridGgfsDualAbstractSelfTest extends GridGgfsAbstractSelfT
* @throws Exception If failed.
*/
public void testMoveRenameDirectorySourceParentRootSourceMissing() throws Exception {
- GridGgfsPath dir = new GridGgfsPath("/" + SUBSUBDIR_NEW.name());
+ IgniteFsPath dir = new IgniteFsPath("/" + SUBSUBDIR_NEW.name());
create(ggfsSecondary, paths(DIR_NEW, SUBDIR_NEW, dir), null);
create(ggfs, paths(DIR_NEW, SUBDIR_NEW), null);
@@ -907,7 +907,7 @@ public abstract class GridGgfsDualAbstractSelfTest extends GridGgfsAbstractSelfT
* @throws Exception If failed.
*/
public void testMoveRenameDirectorySourceParentRootDestinationMissingPartially() throws Exception {
- GridGgfsPath dir = new GridGgfsPath("/" + SUBSUBDIR_NEW.name());
+ IgniteFsPath dir = new IgniteFsPath("/" + SUBSUBDIR_NEW.name());
create(ggfsSecondary, paths(DIR_NEW, SUBDIR_NEW, dir), null);
create(ggfs, paths(DIR_NEW), null);
@@ -925,7 +925,7 @@ public abstract class GridGgfsDualAbstractSelfTest extends GridGgfsAbstractSelfT
* @throws Exception If failed.
*/
public void testMoveRenameDirectorySourceParentRootDestinationMissing() throws Exception {
- GridGgfsPath dir = new GridGgfsPath("/" + SUBSUBDIR_NEW.name());
+ IgniteFsPath dir = new IgniteFsPath("/" + SUBSUBDIR_NEW.name());
create(ggfsSecondary, paths(DIR_NEW, SUBDIR_NEW, dir), null);
create(ggfs, null, null);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f3d93762/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsMetaManagerSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsMetaManagerSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsMetaManagerSelfTest.java
index d62709a..2b73c07 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsMetaManagerSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsMetaManagerSelfTest.java
@@ -175,8 +175,8 @@ public class GridGgfsMetaManagerSelfTest extends GridGgfsCommonAbstractTest {
assertNull(mgr.updateProperties(ROOT_ID, fileId, "not_exists", F.<String, String>asMap(key2, null)));
}
- mgr.removeIfEmpty(ROOT_ID, "dir", dir.id(), new GridGgfsPath("/dir"), true);
- mgr.removeIfEmpty(ROOT_ID, "file", file.id(), new GridGgfsPath("/file"), true);
+ mgr.removeIfEmpty(ROOT_ID, "dir", dir.id(), new IgniteFsPath("/dir"), true);
+ mgr.removeIfEmpty(ROOT_ID, "file", file.id(), new IgniteFsPath("/file"), true);
assertNull(mgr.updateProperties(ROOT_ID, dir.id(), "dir", F.asMap("p", "7")));
assertNull(mgr.updateProperties(ROOT_ID, file.id(), "file", F.asMap("q", "8")));
@@ -230,15 +230,15 @@ public class GridGgfsMetaManagerSelfTest extends GridGgfsCommonAbstractTest {
}
// Validate 'file ID' operations.
- assertEquals(ROOT_ID, mgr.fileId(new GridGgfsPath("/")));
- assertEquals(a.id(), mgr.fileId(new GridGgfsPath("/a")));
- assertEquals(b.id(), mgr.fileId(new GridGgfsPath("/a/b")));
- assertEquals(f1.id(), mgr.fileId(new GridGgfsPath("/f1")));
- assertEquals(f2.id(), mgr.fileId(new GridGgfsPath("/a/f2")));
- assertEquals(f3.id(), mgr.fileId(new GridGgfsPath("/a/b/f3")));
- assertNull(mgr.fileId(new GridGgfsPath("/f4")));
- assertNull(mgr.fileId(new GridGgfsPath("/a/f5")));
- assertNull(mgr.fileId(new GridGgfsPath("/a/b/f6")));
+ assertEquals(ROOT_ID, mgr.fileId(new IgniteFsPath("/")));
+ assertEquals(a.id(), mgr.fileId(new IgniteFsPath("/a")));
+ assertEquals(b.id(), mgr.fileId(new IgniteFsPath("/a/b")));
+ assertEquals(f1.id(), mgr.fileId(new IgniteFsPath("/f1")));
+ assertEquals(f2.id(), mgr.fileId(new IgniteFsPath("/a/f2")));
+ assertEquals(f3.id(), mgr.fileId(new IgniteFsPath("/a/b/f3")));
+ assertNull(mgr.fileId(new IgniteFsPath("/f4")));
+ assertNull(mgr.fileId(new IgniteFsPath("/a/f5")));
+ assertNull(mgr.fileId(new IgniteFsPath("/a/b/f6")));
assertEquals(a.id(), mgr.fileId(ROOT_ID, "a"));
assertEquals(b.id(), mgr.fileId(a.id(), "b"));
@@ -249,16 +249,16 @@ public class GridGgfsMetaManagerSelfTest extends GridGgfsCommonAbstractTest {
assertNull(mgr.fileId(a.id(), "f5"));
assertNull(mgr.fileId(b.id(), "f6"));
- assertEquals(Arrays.asList(ROOT_ID), mgr.fileIds(new GridGgfsPath("/")));
- assertEquals(Arrays.asList(ROOT_ID, a.id()), mgr.fileIds(new GridGgfsPath("/a")));
- assertEquals(Arrays.asList(ROOT_ID, a.id(), b.id()), mgr.fileIds(new GridGgfsPath("/a/b")));
- assertEquals(Arrays.asList(ROOT_ID, f1.id()), mgr.fileIds(new GridGgfsPath("/f1")));
- assertEquals(Arrays.asList(ROOT_ID, a.id(), f2.id()), mgr.fileIds(new GridGgfsPath("/a/f2")));
- assertEquals(Arrays.asList(ROOT_ID, a.id(), b.id(), f3.id()), mgr.fileIds(new GridGgfsPath("/a/b/f3")));
- assertEquals(Arrays.asList(ROOT_ID, null), mgr.fileIds(new GridGgfsPath("/f4")));
- assertEquals(Arrays.asList(ROOT_ID, a.id(), null), mgr.fileIds(new GridGgfsPath("/a/f5")));
- assertEquals(Arrays.asList(ROOT_ID, a.id(), b.id(), null), mgr.fileIds(new GridGgfsPath("/a/b/f6")));
- assertEquals(Arrays.asList(ROOT_ID, null, null, null, null), mgr.fileIds(new GridGgfsPath("/f7/a/b/f6")));
+ assertEquals(Arrays.asList(ROOT_ID), mgr.fileIds(new IgniteFsPath("/")));
+ assertEquals(Arrays.asList(ROOT_ID, a.id()), mgr.fileIds(new IgniteFsPath("/a")));
+ assertEquals(Arrays.asList(ROOT_ID, a.id(), b.id()), mgr.fileIds(new IgniteFsPath("/a/b")));
+ assertEquals(Arrays.asList(ROOT_ID, f1.id()), mgr.fileIds(new IgniteFsPath("/f1")));
+ assertEquals(Arrays.asList(ROOT_ID, a.id(), f2.id()), mgr.fileIds(new IgniteFsPath("/a/f2")));
+ assertEquals(Arrays.asList(ROOT_ID, a.id(), b.id(), f3.id()), mgr.fileIds(new IgniteFsPath("/a/b/f3")));
+ assertEquals(Arrays.asList(ROOT_ID, null), mgr.fileIds(new IgniteFsPath("/f4")));
+ assertEquals(Arrays.asList(ROOT_ID, a.id(), null), mgr.fileIds(new IgniteFsPath("/a/f5")));
+ assertEquals(Arrays.asList(ROOT_ID, a.id(), b.id(), null), mgr.fileIds(new IgniteFsPath("/a/b/f6")));
+ assertEquals(Arrays.asList(ROOT_ID, null, null, null, null), mgr.fileIds(new IgniteFsPath("/f7/a/b/f6")));
// Validate 'rename' operation.
final IgniteUuid rndId = IgniteUuid.randomUuid();
@@ -309,19 +309,19 @@ public class GridGgfsMetaManagerSelfTest extends GridGgfsCommonAbstractTest {
// Validate 'remove' operation.
for (int i = 0; i < 100; i++) {
// One of participants doesn't exist.
- assertNull(mgr.removeIfEmpty(ROOT_ID, "a", IgniteUuid.randomUuid(), new GridGgfsPath("/a"), true));
+ assertNull(mgr.removeIfEmpty(ROOT_ID, "a", IgniteUuid.randomUuid(), new IgniteFsPath("/a"), true));
assertNull(mgr.removeIfEmpty(IgniteUuid.randomUuid(), "a", IgniteUuid.randomUuid(),
- new GridGgfsPath("/" + IgniteUuid.randomUuid() + "/a"), true));
+ new IgniteFsPath("/" + IgniteUuid.randomUuid() + "/a"), true));
}
- expectsRemoveFail(ROOT_ID, "a", a.id(), new GridGgfsPath("/a"),
+ expectsRemoveFail(ROOT_ID, "a", a.id(), new IgniteFsPath("/a"),
"Failed to remove file (directory is not empty)");
- expectsRemoveFail(a.id(), "b", b.id(), new GridGgfsPath("/a/b"),
+ expectsRemoveFail(a.id(), "b", b.id(), new IgniteFsPath("/a/b"),
"Failed to remove file (directory is not empty)");
- assertNull(mgr.removeIfEmpty(ROOT_ID, "a", f1.id(), new GridGgfsPath("/a"), true));
- assertNull(mgr.removeIfEmpty(a.id(), "b", f1.id(), new GridGgfsPath("/a/b"), true));
+ assertNull(mgr.removeIfEmpty(ROOT_ID, "a", f1.id(), new IgniteFsPath("/a"), true));
+ assertNull(mgr.removeIfEmpty(a.id(), "b", f1.id(), new IgniteFsPath("/a/b"), true));
- assertEquals(f3, mgr.removeIfEmpty(b.id(), "f3", f3.id(), new GridGgfsPath("/a/b/f3"), true));
+ assertEquals(f3, mgr.removeIfEmpty(b.id(), "f3", f3.id(), new IgniteFsPath("/a/b/f3"), true));
assertEquals(F.asMap("a", new GridGgfsListingEntry(a), "f1", new GridGgfsListingEntry(f1)),
mgr.directoryListing(ROOT_ID));
@@ -331,7 +331,7 @@ public class GridGgfsMetaManagerSelfTest extends GridGgfsCommonAbstractTest {
assertEmpty(mgr.directoryListing(b.id()));
- assertEquals(b, mgr.removeIfEmpty(a.id(), "b", b.id(), new GridGgfsPath("/a/b"), true));
+ assertEquals(b, mgr.removeIfEmpty(a.id(), "b", b.id(), new IgniteFsPath("/a/b"), true));
assertEquals(F.asMap("a", new GridGgfsListingEntry(a), "f1", new GridGgfsListingEntry(f1)),
mgr.directoryListing(ROOT_ID));
@@ -351,7 +351,7 @@ public class GridGgfsMetaManagerSelfTest extends GridGgfsCommonAbstractTest {
assertEquals(f2.id(), newF2.id());
assertNotSame(f2, newF2);
- assertEquals(newF2, mgr.removeIfEmpty(a.id(), "f2", f2.id(), new GridGgfsPath("/a/f2"), true));
+ assertEquals(newF2, mgr.removeIfEmpty(a.id(), "f2", f2.id(), new IgniteFsPath("/a/f2"), true));
assertEquals(F.asMap("a", new GridGgfsListingEntry(a), "f1", new GridGgfsListingEntry(f1)),
mgr.directoryListing(ROOT_ID));
@@ -359,14 +359,14 @@ public class GridGgfsMetaManagerSelfTest extends GridGgfsCommonAbstractTest {
assertEmpty(mgr.directoryListing(a.id()));
assertEmpty(mgr.directoryListing(b.id()));
- assertEquals(f1, mgr.removeIfEmpty(ROOT_ID, "f1", f1.id(), new GridGgfsPath("/f1"), true));
+ assertEquals(f1, mgr.removeIfEmpty(ROOT_ID, "f1", f1.id(), new IgniteFsPath("/f1"), true));
assertEquals(F.asMap("a", new GridGgfsListingEntry(a)), mgr.directoryListing(ROOT_ID));
assertEmpty(mgr.directoryListing(a.id()));
assertEmpty(mgr.directoryListing(b.id()));
- assertEquals(a, mgr.removeIfEmpty(ROOT_ID, "a", a.id(), new GridGgfsPath("/a"), true));
+ assertEquals(a, mgr.removeIfEmpty(ROOT_ID, "a", a.id(), new IgniteFsPath("/a"), true));
assertEmpty(mgr.directoryListing(ROOT_ID));
assertEmpty(mgr.directoryListing(a.id()));
@@ -446,7 +446,7 @@ public class GridGgfsMetaManagerSelfTest extends GridGgfsCommonAbstractTest {
* @param msg Failure message if expected exception was not thrown.
*/
private void expectsRemoveFail(final IgniteUuid parentId, final String fileName, final IgniteUuid fileId,
- final GridGgfsPath path, @Nullable String msg) {
+ final IgniteFsPath path, @Nullable String msg) {
assertThrows(log, new Callable() {
@Nullable @Override public Object call() throws Exception {
mgr.removeIfEmpty(parentId, fileName, fileId, path, true);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f3d93762/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsMetricsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsMetricsSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsMetricsSelfTest.java
index b8fbbee..1dcca80 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsMetricsSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsMetricsSelfTest.java
@@ -211,7 +211,7 @@ public class GridGgfsMetricsSelfTest extends GridGgfsCommonAbstractTest {
assertEquals(0, m.filesOpenedForRead());
assertEquals(0, m.filesOpenedForWrite());
- fs.mkdirs(new GridGgfsPath("/dir1"));
+ fs.mkdirs(new IgniteFsPath("/dir1"));
m = fs.metrics();
@@ -221,8 +221,8 @@ public class GridGgfsMetricsSelfTest extends GridGgfsCommonAbstractTest {
assertEquals(0, m.filesOpenedForRead());
assertEquals(0, m.filesOpenedForWrite());
- fs.mkdirs(new GridGgfsPath("/dir1/dir2/dir3"));
- fs.mkdirs(new GridGgfsPath("/dir4"));
+ fs.mkdirs(new IgniteFsPath("/dir1/dir2/dir3"));
+ fs.mkdirs(new IgniteFsPath("/dir4"));
m = fs.metrics();
@@ -232,9 +232,9 @@ public class GridGgfsMetricsSelfTest extends GridGgfsCommonAbstractTest {
assertEquals(0, m.filesOpenedForRead());
assertEquals(0, m.filesOpenedForWrite());
- GridGgfsOutputStream out1 = fs.create(new GridGgfsPath("/dir1/file1"), false);
- GridGgfsOutputStream out2 = fs.create(new GridGgfsPath("/dir1/file2"), false);
- GridGgfsOutputStream out3 = fs.create(new GridGgfsPath("/dir1/dir2/file"), false);
+ GridGgfsOutputStream out1 = fs.create(new IgniteFsPath("/dir1/file1"), false);
+ GridGgfsOutputStream out2 = fs.create(new IgniteFsPath("/dir1/file2"), false);
+ GridGgfsOutputStream out3 = fs.create(new IgniteFsPath("/dir1/dir2/file"), false);
m = fs.metrics();
@@ -269,7 +269,7 @@ public class GridGgfsMetricsSelfTest extends GridGgfsCommonAbstractTest {
assertEquals(0, m.filesOpenedForRead());
assertEquals(0, m.filesOpenedForWrite());
- GridGgfsOutputStream out = fs.append(new GridGgfsPath("/dir1/file1"), false);
+ GridGgfsOutputStream out = fs.append(new IgniteFsPath("/dir1/file1"), false);
out.write(new byte[20]);
@@ -293,8 +293,8 @@ public class GridGgfsMetricsSelfTest extends GridGgfsCommonAbstractTest {
assertEquals(0, m.filesOpenedForRead());
assertEquals(0, m.filesOpenedForWrite());
- GridGgfsInputStream in1 = fs.open(new GridGgfsPath("/dir1/file1"));
- GridGgfsInputStream in2 = fs.open(new GridGgfsPath("/dir1/file2"));
+ GridGgfsInputStream in1 = fs.open(new IgniteFsPath("/dir1/file1"));
+ GridGgfsInputStream in2 = fs.open(new IgniteFsPath("/dir1/file2"));
m = fs.metrics();
@@ -315,8 +315,8 @@ public class GridGgfsMetricsSelfTest extends GridGgfsCommonAbstractTest {
assertEquals(0, m.filesOpenedForRead());
assertEquals(0, m.filesOpenedForWrite());
- fs.delete(new GridGgfsPath("/dir1/file1"), false);
- fs.delete(new GridGgfsPath("/dir1/dir2"), true);
+ fs.delete(new IgniteFsPath("/dir1/file1"), false);
+ fs.delete(new IgniteFsPath("/dir1/dir2"), true);
m = fs.metrics();
@@ -326,7 +326,7 @@ public class GridGgfsMetricsSelfTest extends GridGgfsCommonAbstractTest {
assertEquals(0, m.filesOpenedForRead());
assertEquals(0, m.filesOpenedForWrite());
- fs.delete(new GridGgfsPath("/"), true);
+ fs.delete(new IgniteFsPath("/"), true);
m = fs.metrics();
@@ -341,12 +341,12 @@ public class GridGgfsMetricsSelfTest extends GridGgfsCommonAbstractTest {
public void testMultipleClose() throws Exception {
IgniteFs fs = ggfsPrimary[0];
- GridGgfsOutputStream out = fs.create(new GridGgfsPath("/file"), false);
+ GridGgfsOutputStream out = fs.create(new IgniteFsPath("/file"), false);
out.close();
out.close();
- GridGgfsInputStream in = fs.open(new GridGgfsPath("/file"));
+ GridGgfsInputStream in = fs.open(new IgniteFsPath("/file"));
in.close();
in.close();
@@ -365,9 +365,9 @@ public class GridGgfsMetricsSelfTest extends GridGgfsCommonAbstractTest {
public void testBlockMetrics() throws Exception {
GridGgfsEx ggfs = (GridGgfsEx)ggfsPrimary[0];
- GridGgfsPath fileRemote = new GridGgfsPath("/fileRemote");
- GridGgfsPath file1 = new GridGgfsPath("/file1");
- GridGgfsPath file2 = new GridGgfsPath("/file2");
+ IgniteFsPath fileRemote = new IgniteFsPath("/fileRemote");
+ IgniteFsPath file1 = new IgniteFsPath("/file1");
+ IgniteFsPath file2 = new IgniteFsPath("/file2");
// Create remote file and write some data to it.
GridGgfsOutputStream out = ggfsSecondary.create(fileRemote, 256, true, null, 1, 256, null);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f3d93762/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsModeResolverSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsModeResolverSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsModeResolverSelfTest.java
index e6c8910..3c397de 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsModeResolverSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsModeResolverSelfTest.java
@@ -27,22 +27,22 @@ public class GridGgfsModeResolverSelfTest extends TestCase {
/** {@inheritDoc} */
@Override protected void setUp() throws Exception {
resolver = new GridGgfsModeResolver(DUAL_SYNC, Arrays.asList(
- new T2<>(new GridGgfsPath("/a/b/"), PRIMARY),
- new T2<>(new GridGgfsPath("/a/b/c/d"), PROXY)));
+ new T2<>(new IgniteFsPath("/a/b/"), PRIMARY),
+ new T2<>(new IgniteFsPath("/a/b/c/d"), PROXY)));
}
/**
* @throws Exception If failed.
*/
public void testResolve() throws Exception {
- assertEquals(DUAL_SYNC, resolver.resolveMode(new GridGgfsPath("/")));
- assertEquals(DUAL_SYNC, resolver.resolveMode(new GridGgfsPath("/a")));
- assertEquals(DUAL_SYNC, resolver.resolveMode(new GridGgfsPath("/a/1")));
- assertEquals(PRIMARY, resolver.resolveMode(new GridGgfsPath("/a/b")));
- assertEquals(PRIMARY, resolver.resolveMode(new GridGgfsPath("/a/b/c")));
- assertEquals(PRIMARY, resolver.resolveMode(new GridGgfsPath("/a/b/c/2")));
- assertEquals(PROXY, resolver.resolveMode(new GridGgfsPath("/a/b/c/d")));
- assertEquals(PROXY, resolver.resolveMode(new GridGgfsPath("/a/b/c/d/e")));
+ assertEquals(DUAL_SYNC, resolver.resolveMode(new IgniteFsPath("/")));
+ assertEquals(DUAL_SYNC, resolver.resolveMode(new IgniteFsPath("/a")));
+ assertEquals(DUAL_SYNC, resolver.resolveMode(new IgniteFsPath("/a/1")));
+ assertEquals(PRIMARY, resolver.resolveMode(new IgniteFsPath("/a/b")));
+ assertEquals(PRIMARY, resolver.resolveMode(new IgniteFsPath("/a/b/c")));
+ assertEquals(PRIMARY, resolver.resolveMode(new IgniteFsPath("/a/b/c/2")));
+ assertEquals(PROXY, resolver.resolveMode(new IgniteFsPath("/a/b/c/d")));
+ assertEquals(PROXY, resolver.resolveMode(new IgniteFsPath("/a/b/c/d/e")));
}
/**
@@ -50,20 +50,20 @@ public class GridGgfsModeResolverSelfTest extends TestCase {
*/
public void testResolveChildren() throws Exception {
assertEquals(new HashSet<GridGgfsMode>(){{add(DUAL_SYNC); add(PRIMARY); add(PROXY);}},
- resolver.resolveChildrenModes(new GridGgfsPath("/")));
+ resolver.resolveChildrenModes(new IgniteFsPath("/")));
assertEquals(new HashSet<GridGgfsMode>(){{add(DUAL_SYNC); add(PRIMARY); add(PROXY);}},
- resolver.resolveChildrenModes(new GridGgfsPath("/a")));
+ resolver.resolveChildrenModes(new IgniteFsPath("/a")));
assertEquals(new HashSet<GridGgfsMode>(){{add(DUAL_SYNC);}},
- resolver.resolveChildrenModes(new GridGgfsPath("/a/1")));
+ resolver.resolveChildrenModes(new IgniteFsPath("/a/1")));
assertEquals(new HashSet<GridGgfsMode>(){{add(PRIMARY); add(PROXY);}},
- resolver.resolveChildrenModes(new GridGgfsPath("/a/b")));
+ resolver.resolveChildrenModes(new IgniteFsPath("/a/b")));
assertEquals(new HashSet<GridGgfsMode>(){{add(PRIMARY); add(PROXY);}},
- resolver.resolveChildrenModes(new GridGgfsPath("/a/b/c")));
+ resolver.resolveChildrenModes(new IgniteFsPath("/a/b/c")));
assertEquals(new HashSet<GridGgfsMode>(){{add(PRIMARY);}},
- resolver.resolveChildrenModes(new GridGgfsPath("/a/b/c/2")));
+ resolver.resolveChildrenModes(new IgniteFsPath("/a/b/c/2")));
assertEquals(new HashSet<GridGgfsMode>(){{add(PROXY);}},
- resolver.resolveChildrenModes(new GridGgfsPath("/a/b/c/d")));
+ resolver.resolveChildrenModes(new IgniteFsPath("/a/b/c/d")));
assertEquals(new HashSet<GridGgfsMode>(){{add(PROXY);}},
- resolver.resolveChildrenModes(new GridGgfsPath("/a/b/c/d/e")));
+ resolver.resolveChildrenModes(new IgniteFsPath("/a/b/c/d/e")));
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f3d93762/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsModesSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsModesSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsModesSelfTest.java
index 962fd1c..ebf6b8d 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsModesSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsModesSelfTest.java
@@ -480,7 +480,7 @@ public class GridGgfsModesSelfTest extends GridGgfsCommonAbstractTest {
private void checkMode(String pathStr, GridGgfsMode expMode) throws Exception {
assert ggfs != null;
- GridGgfsPath path = new GridGgfsPath(pathStr);
+ IgniteFsPath path = new IgniteFsPath(pathStr);
GridGgfsModeResolver rslvr = ggfs.modeResolver();
@@ -508,8 +508,8 @@ public class GridGgfsModesSelfTest extends GridGgfsCommonAbstractTest {
boolean primaryNotUsed = mode == PROXY;
boolean secondaryUsed = mode != PRIMARY;
- GridGgfsPath dir = new GridGgfsPath("/dir");
- GridGgfsPath file = new GridGgfsPath("/dir/file");
+ IgniteFsPath dir = new IgniteFsPath("/dir");
+ IgniteFsPath file = new IgniteFsPath("/dir/file");
// Create new directory.
ggfs.mkdirs(dir);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f3d93762/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsProcessorSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsProcessorSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsProcessorSelfTest.java
index 762242f..575e955 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsProcessorSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsProcessorSelfTest.java
@@ -160,7 +160,7 @@ public class GridGgfsProcessorSelfTest extends GridGgfsCommonAbstractTest {
* @throws Exception If failed.
*/
public void testUpdateProperties() throws Exception {
- GridGgfsPath p = path("/tmp/my");
+ IgniteFsPath p = path("/tmp/my");
ggfs.mkdirs(p);
@@ -193,7 +193,7 @@ public class GridGgfsProcessorSelfTest extends GridGgfsCommonAbstractTest {
/** @throws Exception If failed. */
public void testCreate() throws Exception {
- GridGgfsPath path = path("/file");
+ IgniteFsPath path = path("/file");
try (GridGgfsOutputStream os = ggfs.create(path, false)) {
assert os != null;
@@ -350,7 +350,7 @@ public class GridGgfsProcessorSelfTest extends GridGgfsCommonAbstractTest {
assert ggfs.exists(path("/A/B1/C1"));
// List items.
- Collection<GridGgfsPath> paths = ggfs.listPaths(path("/"));
+ Collection<IgniteFsPath> paths = ggfs.listPaths(path("/"));
assert paths.size() == 3 : "Unexpected paths: " + paths;
@@ -380,12 +380,12 @@ public class GridGgfsProcessorSelfTest extends GridGgfsCommonAbstractTest {
ggfs.delete(path("/A1/B1/C3"), false);
assertNull(ggfs.info(path("/A1/B1/C3")));
- assertEquals(Collections.<GridGgfsPath>emptyList(), ggfs.listPaths(path("/A1/B1")));
+ assertEquals(Collections.<IgniteFsPath>emptyList(), ggfs.listPaths(path("/A1/B1")));
ggfs.delete(path("/A2/B2"), true);
assertNull(ggfs.info(path("/A2/B2")));
- assertEquals(Collections.<GridGgfsPath>emptyList(), ggfs.listPaths(path("/A2")));
+ assertEquals(Collections.<IgniteFsPath>emptyList(), ggfs.listPaths(path("/A2")));
assertEquals(Arrays.asList(path("/A"), path("/A1"), path("/A2")), sorted(ggfs.listPaths(path("/"))));
@@ -399,10 +399,10 @@ public class GridGgfsProcessorSelfTest extends GridGgfsCommonAbstractTest {
assertEquals(Arrays.asList(path("/A"), path("/A1"), path("/A2")), sorted(ggfs.listPaths(path("/"))));
ggfs.delete(path("/"), true);
- assertEquals(Collections.<GridGgfsPath>emptyList(), ggfs.listPaths(path("/")));
+ assertEquals(Collections.<IgniteFsPath>emptyList(), ggfs.listPaths(path("/")));
ggfs.delete(path("/"), false);
- assertEquals(Collections.<GridGgfsPath>emptyList(), ggfs.listPaths(path("/")));
+ assertEquals(Collections.<IgniteFsPath>emptyList(), ggfs.listPaths(path("/")));
for (GridCacheEntry<Object, Object> e : metaCache)
info("Entry in cache [key=" + e.getKey() + ", val=" + e.getValue() + ']');
@@ -414,13 +414,13 @@ public class GridGgfsProcessorSelfTest extends GridGgfsCommonAbstractTest {
* @throws Exception If failed.
*/
public void testSize() throws Exception {
- GridGgfsPath dir1 = path("/dir1");
- GridGgfsPath subDir1 = path("/dir1/subdir1");
- GridGgfsPath dir2 = path("/dir2");
+ IgniteFsPath dir1 = path("/dir1");
+ IgniteFsPath subDir1 = path("/dir1/subdir1");
+ IgniteFsPath dir2 = path("/dir2");
- GridGgfsPath fileDir1 = path("/dir1/file");
- GridGgfsPath fileSubdir1 = path("/dir1/subdir1/file");
- GridGgfsPath fileDir2 = path("/dir2/file");
+ IgniteFsPath fileDir1 = path("/dir1/file");
+ IgniteFsPath fileSubdir1 = path("/dir1/subdir1/file");
+ IgniteFsPath fileDir2 = path("/dir2/file");
GridGgfsOutputStream os = ggfs.create(fileDir1, false);
os.write(new byte[1000]);
@@ -512,11 +512,11 @@ public class GridGgfsProcessorSelfTest extends GridGgfsCommonAbstractTest {
F.t("/C1", "/A/B1")
);
- final GridGgfsPath root = path("/");
+ final IgniteFsPath root = path("/");
for (IgniteBiTuple<String, String> e : chain) {
- final GridGgfsPath p1 = path(e.get1());
- final GridGgfsPath p2 = path(e.get2());
+ final IgniteFsPath p1 = path(e.get1());
+ final IgniteFsPath p2 = path(e.get2());
assertTrue("Entry: " + e, ggfs.exists(p1));
ggfs.rename(p1, p2);
@@ -583,24 +583,24 @@ public class GridGgfsProcessorSelfTest extends GridGgfsCommonAbstractTest {
// Cleanup.
ggfs.delete(root, true);
- assertEquals(Collections.<GridGgfsPath>emptyList(), ggfs.listPaths(root));
+ assertEquals(Collections.<IgniteFsPath>emptyList(), ggfs.listPaths(root));
}
/**
* @param path Path.
* @return GGFS path.
*/
- private GridGgfsPath path(String path) {
+ private IgniteFsPath path(String path) {
assert path != null;
- return new GridGgfsPath(path);
+ return new IgniteFsPath(path);
}
/**
* @param i Path index.
* @return GGFS path.
*/
- private GridGgfsPath path(long i) {
+ private IgniteFsPath path(long i) {
//return path(String.format("/%d", i));
return path(String.format("/%d/q/%d/%d", i % 10, (i / 10) % 10, i));
}
@@ -667,7 +667,7 @@ public class GridGgfsProcessorSelfTest extends GridGgfsCommonAbstractTest {
/** @throws Exception If failed. */
@SuppressWarnings("BusyWait")
public void testDeleteCacheConsistency() throws Exception {
- GridGgfsPath path = new GridGgfsPath("/someFile");
+ IgniteFsPath path = new IgniteFsPath("/someFile");
try (GridGgfsOutputStream out = ggfs.create(path, true)) {
out.write(new byte[10 * 1024 * 1024]);
@@ -779,7 +779,7 @@ public class GridGgfsProcessorSelfTest extends GridGgfsCommonAbstractTest {
* @throws Exception If failed.
*/
private void checkCreateAppendLongData(int chunkSize, int bufSize, int cnt) throws Exception {
- GridGgfsPath path = new GridGgfsPath("/someFile");
+ IgniteFsPath path = new IgniteFsPath("/someFile");
byte[] buf = new byte[chunkSize];
@@ -887,7 +887,7 @@ public class GridGgfsProcessorSelfTest extends GridGgfsCommonAbstractTest {
* @param props File properties to set.
* @param msg Failure message if expected exception was not thrown.
*/
- private void assertUpdatePropertiesFails(@Nullable final GridGgfsPath path,
+ private void assertUpdatePropertiesFails(@Nullable final IgniteFsPath path,
@Nullable final Map<String, String> props,
Class<? extends Throwable> cls, @Nullable String msg) {
GridTestUtils.assertThrows(log, new Callable() {
@@ -955,7 +955,7 @@ public class GridGgfsProcessorSelfTest extends GridGgfsCommonAbstractTest {
* @throws GridException If failed.
*/
private void assertListDir(String path, String... item) throws GridException {
- Collection<GridGgfsFile> files = ggfs.listFiles(new GridGgfsPath(path));
+ Collection<GridGgfsFile> files = ggfs.listFiles(new IgniteFsPath(path));
List<String> names = new ArrayList<>(item.length);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f3d93762/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsSizeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsSizeSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsSizeSelfTest.java
index 7975403..cac49b9 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsSizeSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsSizeSelfTest.java
@@ -418,7 +418,7 @@ public class GridGgfsSizeSelfTest extends GridGgfsCommonAbstractTest {
startUp();
- final GridGgfsPath path = new GridGgfsPath("/file");
+ final IgniteFsPath path = new IgniteFsPath("/file");
// This write is expected to be successful.
GridGgfsOutputStream os = ggfs(0).create(path, false);
@@ -472,8 +472,8 @@ public class GridGgfsSizeSelfTest extends GridGgfsCommonAbstractTest {
GridGgfsImpl ggfs = ggfs(0);
- final GridGgfsPath path = new GridGgfsPath("/file");
- final GridGgfsPath otherPath = new GridGgfsPath("/fileOther");
+ final IgniteFsPath path = new IgniteFsPath("/file");
+ final IgniteFsPath otherPath = new IgniteFsPath("/fileOther");
// Fill cache with data up to it's limit.
GridGgfsOutputStream os = ggfs.create(path, false);
@@ -664,7 +664,7 @@ public class GridGgfsSizeSelfTest extends GridGgfsCommonAbstractTest {
* @return Block key.
* @throws Exception If failed.
*/
- private GridGgfsBlockKey blockKey(GridGgfsPath path, long blockId) throws Exception {
+ private GridGgfsBlockKey blockKey(IgniteFsPath path, long blockId) throws Exception {
GridGgfsEx ggfs0 = (GridGgfsEx)grid(0).fileSystem(GGFS_NAME);
IgniteUuid fileId = ggfs0.context().meta().fileId(path);
@@ -754,7 +754,7 @@ public class GridGgfsSizeSelfTest extends GridGgfsCommonAbstractTest {
for (int i = 0; i < FILES_CNT; i++) {
// Create empty file locally.
- GridGgfsPath path = new GridGgfsPath("/file-" + i);
+ IgniteFsPath path = new IgniteFsPath("/file-" + i);
ggfs(0).create(path, false).close();
@@ -797,7 +797,7 @@ public class GridGgfsSizeSelfTest extends GridGgfsCommonAbstractTest {
/** A file written to the file system. */
private static class GgfsFile {
/** Path to the file, */
- private final GridGgfsPath path;
+ private final IgniteFsPath path;
/** File length. */
private final int len;
@@ -812,14 +812,14 @@ public class GridGgfsSizeSelfTest extends GridGgfsCommonAbstractTest {
* @param len Length.
* @param blocks Blocks.
*/
- private GgfsFile(GridGgfsPath path, int len, Collection<GgfsBlock> blocks) {
+ private GgfsFile(IgniteFsPath path, int len, Collection<GgfsBlock> blocks) {
this.path = path;
this.len = len;
this.blocks = blocks;
}
/** @return Path. */
- GridGgfsPath path() {
+ IgniteFsPath path() {
return path;
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f3d93762/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsStreamsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsStreamsSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsStreamsSelfTest.java
index b2875a7..3194fdf 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsStreamsSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsStreamsSelfTest.java
@@ -163,13 +163,13 @@ public class GridGgfsStreamsSelfTest extends GridGgfsCommonAbstractTest {
* @throws Exception In case of exception.
*/
public void testCreateFile() throws Exception {
- GridGgfsPath root = new GridGgfsPath("/");
- GridGgfsPath path = new GridGgfsPath("/asdf");
+ IgniteFsPath root = new IgniteFsPath("/");
+ IgniteFsPath path = new IgniteFsPath("/asdf");
long max = 100L * CFG_BLOCK_SIZE / WRITING_THREADS_CNT;
for (long size = 0; size <= max; size = size * 15 / 10 + 1) {
- assertEquals(Collections.<GridGgfsPath>emptyList(), fs.listPaths(root));
+ assertEquals(Collections.<IgniteFsPath>emptyList(), fs.listPaths(root));
testCreateFile(path, size, new Random().nextInt());
}
@@ -177,7 +177,7 @@ public class GridGgfsStreamsSelfTest extends GridGgfsCommonAbstractTest {
/** @throws Exception If failed. */
public void testCreateFileColocated() throws Exception {
- GridGgfsPath path = new GridGgfsPath("/colocated");
+ IgniteFsPath path = new IgniteFsPath("/colocated");
UUID uuid = UUID.randomUUID();
@@ -202,7 +202,7 @@ public class GridGgfsStreamsSelfTest extends GridGgfsCommonAbstractTest {
GridGgfsFile info = fs.info(path);
- Collection<GridGgfsBlockLocation> affNodes = fs.affinity(path, 0, info.length());
+ Collection<IgniteFsBlockLocation> affNodes = fs.affinity(path, 0, info.length());
assertEquals(1, affNodes.size());
Collection<UUID> nodeIds = F.first(affNodes).nodeIds();
@@ -219,7 +219,7 @@ public class GridGgfsStreamsSelfTest extends GridGgfsCommonAbstractTest {
GridTestUtils.setFieldValue(fragmentizer, "fragmentizerEnabled", false);
- GridGgfsPath path = new GridGgfsPath("/file");
+ IgniteFsPath path = new IgniteFsPath("/file");
try {
IgniteFs fs0 = grid(0).fileSystem("ggfs");
@@ -306,17 +306,17 @@ public class GridGgfsStreamsSelfTest extends GridGgfsCommonAbstractTest {
* @param salt Salt for file content generation.
* @throws Exception In case of any exception.
*/
- private void testCreateFile(final GridGgfsPath path, final long size, final int salt) throws Exception {
+ private void testCreateFile(final IgniteFsPath path, final long size, final int salt) throws Exception {
info("Create file [path=" + path + ", size=" + size + ", salt=" + salt + ']');
final AtomicInteger cnt = new AtomicInteger(0);
- final Collection<GridGgfsPath> cleanUp = new ConcurrentLinkedQueue<>();
+ final Collection<IgniteFsPath> cleanUp = new ConcurrentLinkedQueue<>();
long time = runMultiThreaded(new Callable<Object>() {
@Override public Object call() throws Exception {
int id = cnt.incrementAndGet();
- GridGgfsPath f = new GridGgfsPath(path.parent(), "asdf" + (id > 1 ? "-" + id : ""));
+ IgniteFsPath f = new IgniteFsPath(path.parent(), "asdf" + (id > 1 ? "-" + id : ""));
try (GridGgfsOutputStream out = fs.create(f, 0, true, null, 0, 1024, null)) {
assertNotNull(out);
@@ -373,7 +373,7 @@ public class GridGgfsStreamsSelfTest extends GridGgfsCommonAbstractTest {
if (log.isDebugEnabled())
log.debug("File descriptor: " + desc);
- Collection<GridGgfsBlockLocation> aff = fs.affinity(path, 0, desc.length());
+ Collection<IgniteFsBlockLocation> aff = fs.affinity(path, 0, desc.length());
assertFalse("Affinity: " + aff, desc.length() != 0 && aff.isEmpty());
@@ -388,7 +388,7 @@ public class GridGgfsStreamsSelfTest extends GridGgfsCommonAbstractTest {
info("Cleanup files: " + cleanUp);
- for (GridGgfsPath f : cleanUp) {
+ for (IgniteFsPath f : cleanUp) {
fs.delete(f, true);
assertNull(fs.info(f));
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f3d93762/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsTaskSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsTaskSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsTaskSelfTest.java
index 3f6ac37..f01b253 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsTaskSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsTaskSelfTest.java
@@ -43,7 +43,7 @@ public class GridGgfsTaskSelfTest extends GridGgfsCommonAbstractTest {
"word6", "word7"};
/** File path. */
- private static final GridGgfsPath FILE = new GridGgfsPath("/file");
+ private static final IgniteFsPath FILE = new IgniteFsPath("/file");
/** Shared IP finder. */
private static final GridTcpDiscoveryIpFinder IP_FINDER = new GridTcpDiscoveryVmIpFinder(true);
@@ -230,7 +230,7 @@ public class GridGgfsTaskSelfTest extends GridGgfsCommonAbstractTest {
*/
private static class Task extends GridGgfsTask<String, IgniteBiTuple<Long, Integer>> {
/** {@inheritDoc} */
- @Override public GridGgfsJob createJob(GridGgfsPath path, GridGgfsFileRange range,
+ @Override public GridGgfsJob createJob(IgniteFsPath path, GridGgfsFileRange range,
GridGgfsTaskArgs<String> args) throws GridException {
return new Job();
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f3d93762/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/split/GridGgfsAbstractRecordResolverSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/split/GridGgfsAbstractRecordResolverSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/split/GridGgfsAbstractRecordResolverSelfTest.java
index ac46f14..affd964 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/split/GridGgfsAbstractRecordResolverSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/split/GridGgfsAbstractRecordResolverSelfTest.java
@@ -33,7 +33,7 @@ import static org.gridgain.grid.ggfs.GridGgfsMode.*;
*/
public class GridGgfsAbstractRecordResolverSelfTest extends GridCommonAbstractTest {
/** File path. */
- protected static final GridGgfsPath FILE = new GridGgfsPath("/file");
+ protected static final IgniteFsPath FILE = new IgniteFsPath("/file");
/** Shared IP finder. */
private final GridTcpDiscoveryIpFinder ipFinder = new GridTcpDiscoveryVmIpFinder(true);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f3d93762/modules/hadoop/src/main/java/org/gridgain/grid/ggfs/hadoop/v1/GridGgfsHadoopFileSystem.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/gridgain/grid/ggfs/hadoop/v1/GridGgfsHadoopFileSystem.java b/modules/hadoop/src/main/java/org/gridgain/grid/ggfs/hadoop/v1/GridGgfsHadoopFileSystem.java
index d66a593..9fa7c00 100644
--- a/modules/hadoop/src/main/java/org/gridgain/grid/ggfs/hadoop/v1/GridGgfsHadoopFileSystem.java
+++ b/modules/hadoop/src/main/java/org/gridgain/grid/ggfs/hadoop/v1/GridGgfsHadoopFileSystem.java
@@ -263,7 +263,7 @@ public class GridGgfsHadoopFileSystem extends FileSystem {
boolean initSecondary = paths.defaultMode() == PROXY;
if (paths.pathModes() != null && !paths.pathModes().isEmpty()) {
- for (T2<GridGgfsPath, GridGgfsMode> pathMode : paths.pathModes()) {
+ for (T2<IgniteFsPath, GridGgfsMode> pathMode : paths.pathModes()) {
GridGgfsMode mode = pathMode.getValue();
initSecondary |= mode == PROXY;
@@ -404,7 +404,7 @@ public class GridGgfsHadoopFileSystem extends FileSystem {
secondaryFs.setTimes(toSecondary(p), mtime, atime);
}
else {
- GridGgfsPath path = convert(p);
+ IgniteFsPath path = convert(p);
rmtClient.setTimes(path, atime, mtime);
}
@@ -476,7 +476,7 @@ public class GridGgfsHadoopFileSystem extends FileSystem {
enterBusy();
try {
- GridGgfsPath path = convert(f);
+ IgniteFsPath path = convert(f);
GridGgfsMode mode = mode(path);
if (mode == PROXY) {
@@ -544,7 +544,7 @@ public class GridGgfsHadoopFileSystem extends FileSystem {
OutputStream out = null;
try {
- GridGgfsPath path = convert(f);
+ IgniteFsPath path = convert(f);
GridGgfsMode mode = mode(path);
if (LOG.isDebugEnabled())
@@ -622,7 +622,7 @@ public class GridGgfsHadoopFileSystem extends FileSystem {
enterBusy();
try {
- GridGgfsPath path = convert(f);
+ IgniteFsPath path = convert(f);
GridGgfsMode mode = mode(path);
if (LOG.isDebugEnabled())
@@ -687,8 +687,8 @@ public class GridGgfsHadoopFileSystem extends FileSystem {
enterBusy();
try {
- GridGgfsPath srcPath = convert(src);
- GridGgfsPath dstPath = convert(dst);
+ IgniteFsPath srcPath = convert(src);
+ IgniteFsPath dstPath = convert(dst);
GridGgfsMode mode = mode(srcPath);
if (mode == PROXY) {
@@ -739,7 +739,7 @@ public class GridGgfsHadoopFileSystem extends FileSystem {
enterBusy();
try {
- GridGgfsPath path = convert(f);
+ IgniteFsPath path = convert(f);
GridGgfsMode mode = mode(path);
if (mode == PROXY) {
@@ -784,7 +784,7 @@ public class GridGgfsHadoopFileSystem extends FileSystem {
enterBusy();
try {
- GridGgfsPath path = convert(f);
+ IgniteFsPath path = convert(f);
GridGgfsMode mode = mode(path);
if (mode == PROXY) {
@@ -898,7 +898,7 @@ public class GridGgfsHadoopFileSystem extends FileSystem {
enterBusy();
try {
- GridGgfsPath path = convert(f);
+ IgniteFsPath path = convert(f);
GridGgfsMode mode = mode(path);
if (mode == PROXY) {
@@ -983,7 +983,7 @@ public class GridGgfsHadoopFileSystem extends FileSystem {
return secondaryFs.getContentSummary(toSecondary(f));
}
else {
- GridGgfsPathSummary sum = rmtClient.contentSummary(convert(f));
+ IgniteFsPathSummary sum = rmtClient.contentSummary(convert(f));
return new ContentSummary(sum.totalLength(), sum.filesCount(), sum.directoriesCount(),
-1, sum.totalLength(), rmtClient.fsStatus().spaceTotal());
@@ -1001,7 +1001,7 @@ public class GridGgfsHadoopFileSystem extends FileSystem {
enterBusy();
try {
- GridGgfsPath path = convert(status.getPath());
+ IgniteFsPath path = convert(status.getPath());
if (mode(status.getPath()) == PROXY) {
if (secondaryFs == null) {
@@ -1017,7 +1017,7 @@ public class GridGgfsHadoopFileSystem extends FileSystem {
else {
long now = System.currentTimeMillis();
- List<GridGgfsBlockLocation> affinity = new ArrayList<>(rmtClient.affinity(path, start, len));
+ List<IgniteFsBlockLocation> affinity = new ArrayList<>(rmtClient.affinity(path, start, len));
BlockLocation[] arr = new BlockLocation[affinity.size()];
@@ -1061,7 +1061,7 @@ public class GridGgfsHadoopFileSystem extends FileSystem {
* @param path GGFS path.
* @return Path mode.
*/
- public GridGgfsMode mode(GridGgfsPath path) {
+ public GridGgfsMode mode(IgniteFsPath path) {
return modeRslvr.resolveMode(path);
}
@@ -1133,7 +1133,7 @@ public class GridGgfsHadoopFileSystem extends FileSystem {
* @param path GGFS path.
* @return Hadoop path.
*/
- private Path convert(GridGgfsPath path) {
+ private Path convert(IgniteFsPath path) {
return new Path(GGFS_SCHEME, uriAuthority, path.toString());
}
@@ -1143,12 +1143,12 @@ public class GridGgfsHadoopFileSystem extends FileSystem {
* @param path Hadoop path.
* @return GGFS path.
*/
- @Nullable private GridGgfsPath convert(@Nullable Path path) {
+ @Nullable private IgniteFsPath convert(@Nullable Path path) {
if (path == null)
return null;
- return path.isAbsolute() ? new GridGgfsPath(path.toUri().getPath()) :
- new GridGgfsPath(convert(workingDir.get()), path.toUri().getPath());
+ return path.isAbsolute() ? new IgniteFsPath(path.toUri().getPath()) :
+ new IgniteFsPath(convert(workingDir.get()), path.toUri().getPath());
}
/**
@@ -1157,7 +1157,7 @@ public class GridGgfsHadoopFileSystem extends FileSystem {
* @param block GGFS affinity block location.
* @return Hadoop affinity block location.
*/
- private BlockLocation convert(GridGgfsBlockLocation block) {
+ private BlockLocation convert(IgniteFsBlockLocation block) {
Collection<String> names = block.names();
Collection<String> hosts = block.hosts();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f3d93762/modules/hadoop/src/main/java/org/gridgain/grid/ggfs/hadoop/v2/GridGgfsHadoopFileSystem.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/gridgain/grid/ggfs/hadoop/v2/GridGgfsHadoopFileSystem.java b/modules/hadoop/src/main/java/org/gridgain/grid/ggfs/hadoop/v2/GridGgfsHadoopFileSystem.java
index 3bc1b1b..e7dc2b3 100644
--- a/modules/hadoop/src/main/java/org/gridgain/grid/ggfs/hadoop/v2/GridGgfsHadoopFileSystem.java
+++ b/modules/hadoop/src/main/java/org/gridgain/grid/ggfs/hadoop/v2/GridGgfsHadoopFileSystem.java
@@ -83,7 +83,7 @@ public class GridGgfsHadoopFileSystem extends AbstractFileSystem implements Clos
private GridGgfsHadoopWrapper rmtClient;
/** Working directory. */
- private GridGgfsPath workingDir;
+ private IgniteFsPath workingDir;
/** URI. */
private URI uri;
@@ -143,7 +143,7 @@ public class GridGgfsHadoopFileSystem extends AbstractFileSystem implements Clos
throw e;
}
- workingDir = new GridGgfsPath("/user/" + cfg.get(MRJobConfig.USER_NAME, DFLT_USER_NAME));
+ workingDir = new IgniteFsPath("/user/" + cfg.get(MRJobConfig.USER_NAME, DFLT_USER_NAME));
}
/** {@inheritDoc} */
@@ -258,7 +258,7 @@ public class GridGgfsHadoopFileSystem extends AbstractFileSystem implements Clos
boolean initSecondary = paths.defaultMode() == PROXY;
if (paths.pathModes() != null) {
- for (T2<GridGgfsPath, GridGgfsMode> pathMode : paths.pathModes()) {
+ for (T2<IgniteFsPath, GridGgfsMode> pathMode : paths.pathModes()) {
GridGgfsMode mode = pathMode.getValue();
initSecondary |= mode == PROXY;
@@ -421,7 +421,7 @@ public class GridGgfsHadoopFileSystem extends AbstractFileSystem implements Clos
enterBusy();
try {
- GridGgfsPath path = convert(f);
+ IgniteFsPath path = convert(f);
GridGgfsMode mode = modeRslvr.resolveMode(path);
if (mode == PROXY) {
@@ -496,7 +496,7 @@ public class GridGgfsHadoopFileSystem extends AbstractFileSystem implements Clos
OutputStream out = null;
try {
- GridGgfsPath path = convert(f);
+ IgniteFsPath path = convert(f);
GridGgfsMode mode = modeRslvr.resolveMode(path);
if (LOG.isDebugEnabled())
@@ -594,8 +594,8 @@ public class GridGgfsHadoopFileSystem extends AbstractFileSystem implements Clos
enterBusy();
try {
- GridGgfsPath srcPath = convert(src);
- GridGgfsPath dstPath = convert(dst);
+ IgniteFsPath srcPath = convert(src);
+ IgniteFsPath dstPath = convert(dst);
Set<GridGgfsMode> childrenModes = modeRslvr.resolveChildrenModes(srcPath);
if (childrenModes.contains(PROXY)) {
@@ -622,7 +622,7 @@ public class GridGgfsHadoopFileSystem extends AbstractFileSystem implements Clos
enterBusy();
try {
- GridGgfsPath path = convert(f);
+ IgniteFsPath path = convert(f);
GridGgfsMode mode = modeRslvr.resolveMode(path);
Set<GridGgfsMode> childrenModes = modeRslvr.resolveChildrenModes(path);
@@ -667,7 +667,7 @@ public class GridGgfsHadoopFileSystem extends AbstractFileSystem implements Clos
enterBusy();
try {
- GridGgfsPath path = convert(f);
+ IgniteFsPath path = convert(f);
GridGgfsMode mode = modeRslvr.resolveMode(path);
if (mode == PROXY) {
@@ -727,7 +727,7 @@ public class GridGgfsHadoopFileSystem extends AbstractFileSystem implements Clos
enterBusy();
try {
- GridGgfsPath path = convert(f);
+ IgniteFsPath path = convert(f);
GridGgfsMode mode = modeRslvr.resolveMode(path);
if (mode == PROXY) {
@@ -775,7 +775,7 @@ public class GridGgfsHadoopFileSystem extends AbstractFileSystem implements Clos
@Override public BlockLocation[] getFileBlockLocations(Path path, long start, long len) throws IOException {
A.notNull(path, "path");
- GridGgfsPath ggfsPath = convert(path);
+ IgniteFsPath ggfsPath = convert(path);
enterBusy();
@@ -785,7 +785,7 @@ public class GridGgfsHadoopFileSystem extends AbstractFileSystem implements Clos
else {
long now = System.currentTimeMillis();
- List<GridGgfsBlockLocation> affinity = new ArrayList<>(
+ List<IgniteFsBlockLocation> affinity = new ArrayList<>(
rmtClient.affinity(ggfsPath, start, len));
BlockLocation[] arr = new BlockLocation[affinity.size()];
@@ -882,7 +882,7 @@ public class GridGgfsHadoopFileSystem extends AbstractFileSystem implements Clos
* @param path GGFS path.
* @return Hadoop path.
*/
- private Path convert(GridGgfsPath path) {
+ private Path convert(IgniteFsPath path) {
return new Path(GGFS_SCHEME, uriAuthority, path.toString());
}
@@ -892,12 +892,12 @@ public class GridGgfsHadoopFileSystem extends AbstractFileSystem implements Clos
* @param path Hadoop path.
* @return GGFS path.
*/
- @Nullable private GridGgfsPath convert(Path path) {
+ @Nullable private IgniteFsPath convert(Path path) {
if (path == null)
return null;
- return path.isAbsolute() ? new GridGgfsPath(path.toUri().getPath()) :
- new GridGgfsPath(workingDir, path.toUri().getPath());
+ return path.isAbsolute() ? new IgniteFsPath(path.toUri().getPath()) :
+ new IgniteFsPath(workingDir, path.toUri().getPath());
}
/**
@@ -906,7 +906,7 @@ public class GridGgfsHadoopFileSystem extends AbstractFileSystem implements Clos
* @param block GGFS affinity block location.
* @return Hadoop affinity block location.
*/
- private BlockLocation convert(GridGgfsBlockLocation block) {
+ private BlockLocation convert(IgniteFsBlockLocation block) {
Collection<String> names = block.names();
Collection<String> hosts = block.hosts();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f3d93762/modules/hadoop/src/main/java/org/gridgain/grid/kernal/ggfs/hadoop/GridGgfsHadoop.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/gridgain/grid/kernal/ggfs/hadoop/GridGgfsHadoop.java b/modules/hadoop/src/main/java/org/gridgain/grid/kernal/ggfs/hadoop/GridGgfsHadoop.java
index 4e92279..558500c 100644
--- a/modules/hadoop/src/main/java/org/gridgain/grid/kernal/ggfs/hadoop/GridGgfsHadoop.java
+++ b/modules/hadoop/src/main/java/org/gridgain/grid/kernal/ggfs/hadoop/GridGgfsHadoop.java
@@ -44,7 +44,7 @@ public interface GridGgfsHadoop {
* @return Future for info operation.
* @throws GridException If failed.
*/
- public GridGgfsFile info(GridGgfsPath path) throws GridException, IOException;
+ public GridGgfsFile info(IgniteFsPath path) throws GridException, IOException;
/**
* Command to update file properties.
@@ -54,7 +54,7 @@ public interface GridGgfsHadoop {
* @return Future for update operation.
* @throws GridException If failed.
*/
- public GridGgfsFile update(GridGgfsPath path, Map<String, String> props) throws GridException, IOException;
+ public GridGgfsFile update(IgniteFsPath path, Map<String, String> props) throws GridException, IOException;
/**
* Sets last access time and last modification time for a file.
@@ -64,7 +64,7 @@ public interface GridGgfsHadoop {
* @param modificationTime Last modification time to set.
* @throws GridException If failed.
*/
- public Boolean setTimes(GridGgfsPath path, long accessTime, long modificationTime) throws GridException,
+ public Boolean setTimes(IgniteFsPath path, long accessTime, long modificationTime) throws GridException,
IOException;
/**
@@ -75,7 +75,7 @@ public interface GridGgfsHadoop {
* @return Future for rename operation.
* @throws GridException If failed.
*/
- public Boolean rename(GridGgfsPath src, GridGgfsPath dest) throws GridException, IOException;
+ public Boolean rename(IgniteFsPath src, IgniteFsPath dest) throws GridException, IOException;
/**
* Command to delete given path.
@@ -85,7 +85,7 @@ public interface GridGgfsHadoop {
* @return Future for delete operation.
* @throws GridException If failed.
*/
- public Boolean delete(GridGgfsPath path, boolean recursive) throws GridException, IOException;
+ public Boolean delete(IgniteFsPath path, boolean recursive) throws GridException, IOException;
/**
* Command to get affinity for given path, offset and length.
@@ -96,7 +96,7 @@ public interface GridGgfsHadoop {
* @return Future for affinity command.
* @throws GridException If failed.
*/
- public Collection<GridGgfsBlockLocation> affinity(GridGgfsPath path, long start, long len) throws GridException,
+ public Collection<IgniteFsBlockLocation> affinity(IgniteFsPath path, long start, long len) throws GridException,
IOException;
/**
@@ -106,7 +106,7 @@ public interface GridGgfsHadoop {
* @return Future that will be completed when summary is received.
* @throws GridException If failed.
*/
- public GridGgfsPathSummary contentSummary(GridGgfsPath path) throws GridException, IOException;
+ public IgniteFsPathSummary contentSummary(IgniteFsPath path) throws GridException, IOException;
/**
* Command to create directories.
@@ -115,7 +115,7 @@ public interface GridGgfsHadoop {
* @return Future for mkdirs operation.
* @throws GridException If failed.
*/
- public Boolean mkdirs(GridGgfsPath path, Map<String, String> props) throws GridException, IOException;
+ public Boolean mkdirs(IgniteFsPath path, Map<String, String> props) throws GridException, IOException;
/**
* Command to get list of files in directory.
@@ -124,7 +124,7 @@ public interface GridGgfsHadoop {
* @return Future for listFiles operation.
* @throws GridException If failed.
*/
- public Collection<GridGgfsFile> listFiles(GridGgfsPath path) throws GridException, IOException;
+ public Collection<GridGgfsFile> listFiles(IgniteFsPath path) throws GridException, IOException;
/**
* Command to get directory listing.
@@ -133,7 +133,7 @@ public interface GridGgfsHadoop {
* @return Future for listPaths operation.
* @throws GridException If failed.
*/
- public Collection<GridGgfsPath> listPaths(GridGgfsPath path) throws GridException, IOException;
+ public Collection<IgniteFsPath> listPaths(IgniteFsPath path) throws GridException, IOException;
/**
* Performs status request.
@@ -150,7 +150,7 @@ public interface GridGgfsHadoop {
* @return Future for open operation.
* @throws GridException If failed.
*/
- public GridGgfsHadoopStreamDelegate open(GridGgfsPath path) throws GridException, IOException;
+ public GridGgfsHadoopStreamDelegate open(IgniteFsPath path) throws GridException, IOException;
/**
* Command to open file for reading.
@@ -159,7 +159,7 @@ public interface GridGgfsHadoop {
* @return Future for open operation.
* @throws GridException If failed.
*/
- public GridGgfsHadoopStreamDelegate open(GridGgfsPath path, int seqReadsBeforePrefetch) throws GridException,
+ public GridGgfsHadoopStreamDelegate open(IgniteFsPath path, int seqReadsBeforePrefetch) throws GridException,
IOException;
/**
@@ -173,7 +173,7 @@ public interface GridGgfsHadoop {
* @return Stream descriptor.
* @throws GridException If failed.
*/
- public GridGgfsHadoopStreamDelegate create(GridGgfsPath path, boolean overwrite, boolean colocate,
+ public GridGgfsHadoopStreamDelegate create(IgniteFsPath path, boolean overwrite, boolean colocate,
int replication, long blockSize, @Nullable Map<String, String> props) throws GridException, IOException;
/**
@@ -185,6 +185,6 @@ public interface GridGgfsHadoop {
* @return Stream descriptor.
* @throws GridException If failed.
*/
- public GridGgfsHadoopStreamDelegate append(GridGgfsPath path, boolean create,
+ public GridGgfsHadoopStreamDelegate append(IgniteFsPath path, boolean create,
@Nullable Map<String, String> props) throws GridException, IOException;
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f3d93762/modules/hadoop/src/main/java/org/gridgain/grid/kernal/ggfs/hadoop/GridGgfsHadoopFileSystemWrapper.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/gridgain/grid/kernal/ggfs/hadoop/GridGgfsHadoopFileSystemWrapper.java b/modules/hadoop/src/main/java/org/gridgain/grid/kernal/ggfs/hadoop/GridGgfsHadoopFileSystemWrapper.java
index 493e455..09bb563 100644
--- a/modules/hadoop/src/main/java/org/gridgain/grid/kernal/ggfs/hadoop/GridGgfsHadoopFileSystemWrapper.java
+++ b/modules/hadoop/src/main/java/org/gridgain/grid/kernal/ggfs/hadoop/GridGgfsHadoopFileSystemWrapper.java
@@ -76,7 +76,7 @@ public class GridGgfsHadoopFileSystemWrapper implements GridGgfsFileSystem, Auto
* @param path GGFS path.
* @return Hadoop path.
*/
- private Path convert(GridGgfsPath path) {
+ private Path convert(IgniteFsPath path) {
URI uri = fileSys.getUri();
return new Path(uri.getScheme(), uri.getAuthority(), path.toString());
@@ -116,7 +116,7 @@ public class GridGgfsHadoopFileSystemWrapper implements GridGgfsFileSystem, Auto
else if (e instanceof PathIsNotEmptyDirectoryException)
return new GridGgfsDirectoryNotEmptyException(e);
else if (e instanceof PathExistsException)
- return new GridGgfsPathAlreadyExistsException(msg, e);
+ return new IgniteFsPathAlreadyExistsException(msg, e);
else
return new GridGgfsException(msg, e);
}
@@ -138,7 +138,7 @@ public class GridGgfsHadoopFileSystemWrapper implements GridGgfsFileSystem, Auto
}
/** {@inheritDoc} */
- @Override public boolean exists(GridGgfsPath path) throws GridException {
+ @Override public boolean exists(IgniteFsPath path) throws GridException {
try {
return fileSys.exists(convert(path));
}
@@ -148,7 +148,7 @@ public class GridGgfsHadoopFileSystemWrapper implements GridGgfsFileSystem, Auto
}
/** {@inheritDoc} */
- @Nullable @Override public GridGgfsFile update(GridGgfsPath path, Map<String, String> props) throws GridException {
+ @Nullable @Override public GridGgfsFile update(IgniteFsPath path, Map<String, String> props) throws GridException {
GridGgfsHadoopFSProperties props0 = new GridGgfsHadoopFSProperties(props);
try {
@@ -167,7 +167,7 @@ public class GridGgfsHadoopFileSystemWrapper implements GridGgfsFileSystem, Auto
}
/** {@inheritDoc} */
- @Override public void rename(GridGgfsPath src, GridGgfsPath dest) throws GridException {
+ @Override public void rename(IgniteFsPath src, IgniteFsPath dest) throws GridException {
// Delegate to the secondary file system.
try {
if (!fileSys.rename(convert(src), convert(dest)))
@@ -180,7 +180,7 @@ public class GridGgfsHadoopFileSystemWrapper implements GridGgfsFileSystem, Auto
}
/** {@inheritDoc} */
- @Override public boolean delete(GridGgfsPath path, boolean recursive) throws GridException {
+ @Override public boolean delete(IgniteFsPath path, boolean recursive) throws GridException {
try {
return fileSys.delete(convert(path), recursive);
}
@@ -190,7 +190,7 @@ public class GridGgfsHadoopFileSystemWrapper implements GridGgfsFileSystem, Auto
}
/** {@inheritDoc} */
- @Override public void mkdirs(GridGgfsPath path) throws GridException {
+ @Override public void mkdirs(IgniteFsPath path) throws GridException {
try {
if (!fileSys.mkdirs(convert(path)))
throw new GridException("Failed to make directories [path=" + path + "]");
@@ -201,7 +201,7 @@ public class GridGgfsHadoopFileSystemWrapper implements GridGgfsFileSystem, Auto
}
/** {@inheritDoc} */
- @Override public void mkdirs(GridGgfsPath path, @Nullable Map<String, String> props) throws GridException {
+ @Override public void mkdirs(IgniteFsPath path, @Nullable Map<String, String> props) throws GridException {
try {
if (!fileSys.mkdirs(convert(path), new GridGgfsHadoopFSProperties(props).permission()))
throw new GridException("Failed to make directories [path=" + path + ", props=" + props + "]");
@@ -212,17 +212,17 @@ public class GridGgfsHadoopFileSystemWrapper implements GridGgfsFileSystem, Auto
}
/** {@inheritDoc} */
- @Override public Collection<GridGgfsPath> listPaths(GridGgfsPath path) throws GridException {
+ @Override public Collection<IgniteFsPath> listPaths(IgniteFsPath path) throws GridException {
try {
FileStatus[] statuses = fileSys.listStatus(convert(path));
if (statuses == null)
throw new GridGgfsFileNotFoundException("Failed to list files (path not found): " + path);
- Collection<GridGgfsPath> res = new ArrayList<>(statuses.length);
+ Collection<IgniteFsPath> res = new ArrayList<>(statuses.length);
for (FileStatus status : statuses)
- res.add(new GridGgfsPath(path, status.getPath().getName()));
+ res.add(new IgniteFsPath(path, status.getPath().getName()));
return res;
}
@@ -235,7 +235,7 @@ public class GridGgfsHadoopFileSystemWrapper implements GridGgfsFileSystem, Auto
}
/** {@inheritDoc} */
- @Override public Collection<GridGgfsFile> listFiles(GridGgfsPath path) throws GridException {
+ @Override public Collection<GridGgfsFile> listFiles(IgniteFsPath path) throws GridException {
try {
FileStatus[] statuses = fileSys.listStatus(convert(path));
@@ -249,7 +249,7 @@ public class GridGgfsHadoopFileSystemWrapper implements GridGgfsFileSystem, Auto
new GridGgfsFileInfo((int)status.getBlockSize(), status.getLen(), null, null, false,
properties(status));
- res.add(new GridGgfsFileImpl(new GridGgfsPath(path, status.getPath().getName()), fsInfo, 1));
+ res.add(new GridGgfsFileImpl(new IgniteFsPath(path, status.getPath().getName()), fsInfo, 1));
}
return res;
@@ -263,12 +263,12 @@ public class GridGgfsHadoopFileSystemWrapper implements GridGgfsFileSystem, Auto
}
/** {@inheritDoc} */
- @Override public GridGgfsReader open(GridGgfsPath path, int bufSize) {
+ @Override public IgniteFsReader open(IgniteFsPath path, int bufSize) {
return new GridGgfsHadoopReader(fileSys, convert(path), bufSize);
}
/** {@inheritDoc} */
- @Override public OutputStream create(GridGgfsPath path, boolean overwrite) throws GridException {
+ @Override public OutputStream create(IgniteFsPath path, boolean overwrite) throws GridException {
try {
return fileSys.create(convert(path), overwrite);
}
@@ -278,7 +278,7 @@ public class GridGgfsHadoopFileSystemWrapper implements GridGgfsFileSystem, Auto
}
/** {@inheritDoc} */
- @Override public OutputStream create(GridGgfsPath path, int bufSize, boolean overwrite, int replication,
+ @Override public OutputStream create(IgniteFsPath path, int bufSize, boolean overwrite, int replication,
long blockSize, @Nullable Map<String, String> props) throws GridException {
GridGgfsHadoopFSProperties props0 =
new GridGgfsHadoopFSProperties(props != null ? props : Collections.<String, String>emptyMap());
@@ -295,7 +295,7 @@ public class GridGgfsHadoopFileSystemWrapper implements GridGgfsFileSystem, Auto
}
/** {@inheritDoc} */
- @Override public OutputStream append(GridGgfsPath path, int bufSize, boolean create,
+ @Override public OutputStream append(IgniteFsPath path, int bufSize, boolean create,
@Nullable Map<String, String> props) throws GridException {
try {
return fileSys.append(convert(path), bufSize);
@@ -306,7 +306,7 @@ public class GridGgfsHadoopFileSystemWrapper implements GridGgfsFileSystem, Auto
}
/** {@inheritDoc} */
- @Override public GridGgfsFile info(final GridGgfsPath path) throws GridException {
+ @Override public GridGgfsFile info(final IgniteFsPath path) throws GridException {
try {
final FileStatus status = fileSys.getFileStatus(convert(path));
@@ -316,7 +316,7 @@ public class GridGgfsHadoopFileSystemWrapper implements GridGgfsFileSystem, Auto
final Map<String, String> props = properties(status);
return new GridGgfsFile() {
- @Override public GridGgfsPath path() {
+ @Override public IgniteFsPath path() {
return path;
}