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:38 UTC
[11/38] incubator-ignite git commit: # Renaming
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f3d93762/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsPaths.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsPaths.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsPaths.java
index e922089..12b401c 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsPaths.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsPaths.java
@@ -31,7 +31,7 @@ public class GridGgfsPaths implements Externalizable {
private GridGgfsMode dfltMode;
/** Path modes. */
- private List<T2<GridGgfsPath, GridGgfsMode>> pathModes;
+ private List<T2<IgniteFsPath, GridGgfsMode>> pathModes;
/**
* Empty constructor required by {@link Externalizable}.
@@ -47,7 +47,7 @@ public class GridGgfsPaths implements Externalizable {
* @param dfltMode Default GGFS mode.
* @param pathModes Path modes.
*/
- public GridGgfsPaths(Map<String, String> props, GridGgfsMode dfltMode, @Nullable List<T2<GridGgfsPath,
+ public GridGgfsPaths(Map<String, String> props, GridGgfsMode dfltMode, @Nullable List<T2<IgniteFsPath,
GridGgfsMode>> pathModes) {
this.props = props;
this.dfltMode = dfltMode;
@@ -71,7 +71,7 @@ public class GridGgfsPaths implements Externalizable {
/**
* @return Path modes.
*/
- @Nullable public List<T2<GridGgfsPath, GridGgfsMode>> pathModes() {
+ @Nullable public List<T2<IgniteFsPath, GridGgfsMode>> pathModes() {
return pathModes;
}
@@ -84,7 +84,7 @@ public class GridGgfsPaths implements Externalizable {
out.writeBoolean(true);
out.writeInt(pathModes.size());
- for (T2<GridGgfsPath, GridGgfsMode> pathMode : pathModes) {
+ for (T2<IgniteFsPath, GridGgfsMode> pathMode : pathModes) {
pathMode.getKey().writeExternal(out);
U.writeEnum0(out, pathMode.getValue());
}
@@ -104,10 +104,10 @@ public class GridGgfsPaths implements Externalizable {
pathModes = new ArrayList<>(size);
for (int i = 0; i < size; i++) {
- GridGgfsPath path = new GridGgfsPath();
+ IgniteFsPath path = new IgniteFsPath();
path.readExternal(in);
- T2<GridGgfsPath, GridGgfsMode> entry = new T2<>(path, GridGgfsMode.fromOrdinal(U.readEnumOrdinal0(in)));
+ T2<IgniteFsPath, GridGgfsMode> entry = new T2<>(path, GridGgfsMode.fromOrdinal(U.readEnumOrdinal0(in)));
pathModes.add(entry);
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f3d93762/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsProcessor.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsProcessor.java
index 8bb4edc..f1cfeba 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsProcessor.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsProcessor.java
@@ -222,7 +222,7 @@ public class GridGgfsProcessor extends GridGgfsProcessorAdapter {
}
/** {@inheritDoc} */
- @Nullable @Override public ComputeJob createJob(GridGgfsJob job, @Nullable String ggfsName, GridGgfsPath path,
+ @Nullable @Override public ComputeJob createJob(GridGgfsJob job, @Nullable String ggfsName, IgniteFsPath path,
long start, long length, GridGgfsRecordResolver recRslv) {
return new GridGgfsJobImpl(job, ggfsName, path, start, length, recRslv);
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f3d93762/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsProcessorAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsProcessorAdapter.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsProcessorAdapter.java
index c0509b0..f2dd046 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsProcessorAdapter.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsProcessorAdapter.java
@@ -67,6 +67,6 @@ public abstract class GridGgfsProcessorAdapter extends GridProcessorAdapter {
* @param recRslv Record resolver.
* @return Compute job.
*/
- @Nullable public abstract ComputeJob createJob(GridGgfsJob job, @Nullable String ggfsName, GridGgfsPath path,
+ @Nullable public abstract ComputeJob createJob(GridGgfsJob job, @Nullable String ggfsName, IgniteFsPath path,
long start, long length, GridGgfsRecordResolver recRslv);
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f3d93762/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsSecondaryInputStreamDescriptor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsSecondaryInputStreamDescriptor.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsSecondaryInputStreamDescriptor.java
index d7d33cd..3a17d38 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsSecondaryInputStreamDescriptor.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsSecondaryInputStreamDescriptor.java
@@ -19,7 +19,7 @@ public class GridGgfsSecondaryInputStreamDescriptor {
private final GridGgfsFileInfo info;
/** Secondary file system input stream wrapper. */
- private final GridGgfsReader secReader;
+ private final IgniteFsReader secReader;
/**
* Constructor.
@@ -27,7 +27,7 @@ public class GridGgfsSecondaryInputStreamDescriptor {
* @param info File info in the primary file system.
* @param secReader Secondary file system reader.
*/
- GridGgfsSecondaryInputStreamDescriptor(GridGgfsFileInfo info, GridGgfsReader secReader) {
+ GridGgfsSecondaryInputStreamDescriptor(GridGgfsFileInfo info, IgniteFsReader secReader) {
assert info != null;
assert secReader != null;
@@ -45,7 +45,7 @@ public class GridGgfsSecondaryInputStreamDescriptor {
/**
* @return Secondary file system reader.
*/
- GridGgfsReader reader() {
+ IgniteFsReader reader() {
return secReader;
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f3d93762/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsTaskArgsImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsTaskArgsImpl.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsTaskArgsImpl.java
index cc5be2e..516e5a4 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsTaskArgsImpl.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsTaskArgsImpl.java
@@ -27,7 +27,7 @@ public class GridGgfsTaskArgsImpl<T> implements GridGgfsTaskArgs<T>, Externaliz
private String ggfsName;
/** Paths. */
- private Collection<GridGgfsPath> paths;
+ private Collection<IgniteFsPath> paths;
/** Record resolver. */
private GridGgfsRecordResolver recRslvr;
@@ -58,7 +58,7 @@ public class GridGgfsTaskArgsImpl<T> implements GridGgfsTaskArgs<T>, Externaliz
* @param maxRangeLen Maximum range length.
* @param usrArg User argument.
*/
- public GridGgfsTaskArgsImpl(String ggfsName, Collection<GridGgfsPath> paths, GridGgfsRecordResolver recRslvr,
+ public GridGgfsTaskArgsImpl(String ggfsName, Collection<IgniteFsPath> paths, GridGgfsRecordResolver recRslvr,
boolean skipNonExistentFiles, long maxRangeLen, T usrArg) {
this.ggfsName = ggfsName;
this.paths = paths;
@@ -74,7 +74,7 @@ public class GridGgfsTaskArgsImpl<T> implements GridGgfsTaskArgs<T>, Externaliz
}
/** {@inheritDoc} */
- @Override public Collection<GridGgfsPath> paths() {
+ @Override public Collection<IgniteFsPath> paths() {
return paths;
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f3d93762/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridNoopGgfsProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridNoopGgfsProcessor.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridNoopGgfsProcessor.java
index 3836723..0c3887b 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridNoopGgfsProcessor.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridNoopGgfsProcessor.java
@@ -56,7 +56,7 @@ public class GridNoopGgfsProcessor extends GridGgfsProcessorAdapter {
}
/** {@inheritDoc} */
- @Nullable @Override public ComputeJob createJob(GridGgfsJob job, @Nullable String ggfsName, GridGgfsPath path,
+ @Nullable @Override public ComputeJob createJob(GridGgfsJob job, @Nullable String ggfsName, IgniteFsPath path,
long start, long length, GridGgfsRecordResolver recRslv) {
return null;
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f3d93762/modules/core/src/test/java/org/gridgain/grid/ggfs/GridGgfsEventsAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/ggfs/GridGgfsEventsAbstractSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/ggfs/GridGgfsEventsAbstractSelfTest.java
index 00d1e80..b6b6cb6 100644
--- a/modules/core/src/test/java/org/gridgain/grid/ggfs/GridGgfsEventsAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/ggfs/GridGgfsEventsAbstractSelfTest.java
@@ -196,15 +196,15 @@ public abstract class GridGgfsEventsAbstractSelfTest extends GridCommonAbstractT
}
}, EVTS_GGFS);
- GridGgfsPath dir = new GridGgfsPath("/dir1/dir2/dir3");
+ IgniteFsPath dir = new IgniteFsPath("/dir1/dir2/dir3");
- GridGgfsPath file = new GridGgfsPath(dir, "file1");
+ IgniteFsPath file = new IgniteFsPath(dir, "file1");
// Will generate 3 EVT_GGFS_DIR_CREATED + EVT_GGFS_FILE_CREATED + EVT_GGFS_FILE_OPENED_WRITE +
// EVT_GGFS_FILE_CLOSED and a number of EVT_GGFS_META_UPDATED.
ggfs.create(file, true).close();
- GridGgfsPath mvFile = new GridGgfsPath(dir, "mvFile1");
+ IgniteFsPath mvFile = new IgniteFsPath(dir, "mvFile1");
ggfs.rename(file, mvFile); // Will generate EVT_GGFS_FILE_RENAMED.
@@ -217,39 +217,39 @@ public abstract class GridGgfsEventsAbstractSelfTest extends GridCommonAbstractT
IgniteFsEvent evt = (IgniteFsEvent)evtList.get(0);
assertEquals(EVT_GGFS_DIR_CREATED, evt.type());
- assertEquals(new GridGgfsPath("/dir1"), evt.path());
+ assertEquals(new IgniteFsPath("/dir1"), evt.path());
assertTrue(evt.isDirectory());
evt = (IgniteFsEvent)evtList.get(1);
assertEquals(EVT_GGFS_DIR_CREATED, evt.type());
- assertEquals(new GridGgfsPath("/dir1/dir2"), evt.path());
+ assertEquals(new IgniteFsPath("/dir1/dir2"), evt.path());
evt = (IgniteFsEvent)evtList.get(2);
assertEquals(EVT_GGFS_DIR_CREATED, evt.type());
- assertEquals(new GridGgfsPath("/dir1/dir2/dir3"), evt.path());
+ assertEquals(new IgniteFsPath("/dir1/dir2/dir3"), evt.path());
evt = (IgniteFsEvent)evtList.get(3);
assertEquals(EVT_GGFS_FILE_CREATED, evt.type());
- assertEquals(new GridGgfsPath("/dir1/dir2/dir3/file1"), evt.path());
+ assertEquals(new IgniteFsPath("/dir1/dir2/dir3/file1"), evt.path());
assertFalse(evt.isDirectory());
evt = (IgniteFsEvent)evtList.get(4);
assertEquals(EVT_GGFS_FILE_OPENED_WRITE, evt.type());
- assertEquals(new GridGgfsPath("/dir1/dir2/dir3/file1"), evt.path());
+ assertEquals(new IgniteFsPath("/dir1/dir2/dir3/file1"), evt.path());
evt = (IgniteFsEvent)evtList.get(5);
assertEquals(EVT_GGFS_FILE_CLOSED_WRITE, evt.type());
- assertEquals(new GridGgfsPath("/dir1/dir2/dir3/file1"), evt.path());
+ assertEquals(new IgniteFsPath("/dir1/dir2/dir3/file1"), evt.path());
assertEquals(0, evt.dataSize());
evt = (IgniteFsEvent)evtList.get(6);
assertEquals(EVT_GGFS_FILE_RENAMED, evt.type());
- assertEquals(new GridGgfsPath("/dir1/dir2/dir3/file1"), evt.path());
- assertEquals(new GridGgfsPath("/dir1/dir2/dir3/mvFile1"), evt.newPath());
+ assertEquals(new IgniteFsPath("/dir1/dir2/dir3/file1"), evt.path());
+ assertEquals(new IgniteFsPath("/dir1/dir2/dir3/mvFile1"), evt.newPath());
evt = (IgniteFsEvent)evtList.get(7);
assertEquals(EVT_GGFS_DIR_DELETED, evt.type());
- assertEquals(new GridGgfsPath("/dir1/dir2"), evt.path());
+ assertEquals(new IgniteFsPath("/dir1/dir2"), evt.path());
}
/**
@@ -277,10 +277,10 @@ public abstract class GridGgfsEventsAbstractSelfTest extends GridCommonAbstractT
}
}, EVTS_GGFS);
- GridGgfsPath dir = new GridGgfsPath("/dir1");
+ IgniteFsPath dir = new IgniteFsPath("/dir1");
- GridGgfsPath file1 = new GridGgfsPath(dir, "file1");
- GridGgfsPath file2 = new GridGgfsPath(dir, "file2");
+ IgniteFsPath file1 = new IgniteFsPath(dir, "file1");
+ IgniteFsPath file2 = new IgniteFsPath(dir, "file2");
// Will generate EVT_GGFS_DIR_CREATED + EVT_GGFS_FILE_CREATED + EVT_GGFS_FILE_OPENED_WRITE +
// EVT_GGFS_FILE_CLOSED_WRITE.
@@ -299,38 +299,38 @@ public abstract class GridGgfsEventsAbstractSelfTest extends GridCommonAbstractT
IgniteFsEvent evt = (IgniteFsEvent)evtList.get(0);
assertEquals(EVT_GGFS_DIR_CREATED, evt.type());
- assertEquals(new GridGgfsPath("/dir1"), evt.path());
+ assertEquals(new IgniteFsPath("/dir1"), evt.path());
assertTrue(evt.isDirectory());
evt = (IgniteFsEvent)evtList.get(1);
assertEquals(EVT_GGFS_FILE_CREATED, evt.type());
- assertEquals(new GridGgfsPath("/dir1/file1"), evt.path());
+ assertEquals(new IgniteFsPath("/dir1/file1"), evt.path());
assertFalse(evt.isDirectory());
evt = (IgniteFsEvent)evtList.get(2);
assertEquals(EVT_GGFS_FILE_OPENED_WRITE, evt.type());
- assertEquals(new GridGgfsPath("/dir1/file1"), evt.path());
+ assertEquals(new IgniteFsPath("/dir1/file1"), evt.path());
evt = (IgniteFsEvent)evtList.get(3);
assertEquals(EVT_GGFS_FILE_CLOSED_WRITE, evt.type());
- assertEquals(new GridGgfsPath("/dir1/file1"), evt.path());
+ assertEquals(new IgniteFsPath("/dir1/file1"), evt.path());
evt = (IgniteFsEvent)evtList.get(4);
assertEquals(EVT_GGFS_FILE_CREATED, evt.type());
- assertEquals(new GridGgfsPath("/dir1/file2"), evt.path());
+ assertEquals(new IgniteFsPath("/dir1/file2"), evt.path());
assertFalse(evt.isDirectory());
evt = (IgniteFsEvent)evtList.get(5);
assertEquals(EVT_GGFS_FILE_OPENED_WRITE, evt.type());
- assertEquals(new GridGgfsPath("/dir1/file2"), evt.path());
+ assertEquals(new IgniteFsPath("/dir1/file2"), evt.path());
evt = (IgniteFsEvent)evtList.get(6);
assertEquals(EVT_GGFS_FILE_CLOSED_WRITE, evt.type());
- assertEquals(new GridGgfsPath("/dir1/file2"), evt.path());
+ assertEquals(new IgniteFsPath("/dir1/file2"), evt.path());
evt = (IgniteFsEvent)evtList.get(7);
assertEquals(EVT_GGFS_DIR_DELETED, evt.type());
- assertEquals(new GridGgfsPath("/dir1"), evt.path());
+ assertEquals(new IgniteFsPath("/dir1"), evt.path());
}
/**
@@ -358,11 +358,11 @@ public abstract class GridGgfsEventsAbstractSelfTest extends GridCommonAbstractT
}
}, EVTS_GGFS);
- GridGgfsPath dir = new GridGgfsPath("/dir1");
+ IgniteFsPath dir = new IgniteFsPath("/dir1");
ggfs.mkdirs(dir); // Will generate EVT_GGFS_DIR_CREATED.
- GridGgfsPath mvDir = new GridGgfsPath("/mvDir1");
+ IgniteFsPath mvDir = new IgniteFsPath("/mvDir1");
ggfs.rename(dir, mvDir); // Will generate EVT_GGFS_DIR_RENAMED.
@@ -376,18 +376,18 @@ public abstract class GridGgfsEventsAbstractSelfTest extends GridCommonAbstractT
IgniteFsEvent evt = (IgniteFsEvent)evtList.get(0);
assertEquals(EVT_GGFS_DIR_CREATED, evt.type());
- assertEquals(new GridGgfsPath("/dir1"), evt.path());
+ assertEquals(new IgniteFsPath("/dir1"), evt.path());
assertTrue(evt.isDirectory());
evt = (IgniteFsEvent)evtList.get(1);
assertEquals(EVT_GGFS_DIR_RENAMED, evt.type());
- assertEquals(new GridGgfsPath("/dir1"), evt.path());
- assertEquals(new GridGgfsPath("/mvDir1"), evt.newPath());
+ assertEquals(new IgniteFsPath("/dir1"), evt.path());
+ assertEquals(new IgniteFsPath("/mvDir1"), evt.newPath());
assertTrue(evt.isDirectory());
evt = (IgniteFsEvent)evtList.get(2);
assertEquals(EVT_GGFS_DIR_DELETED, evt.type());
- assertEquals(new GridGgfsPath("/mvDir1"), evt.path());
+ assertEquals(new IgniteFsPath("/mvDir1"), evt.path());
assertTrue(evt.isDirectory());
}
@@ -415,14 +415,14 @@ public abstract class GridGgfsEventsAbstractSelfTest extends GridCommonAbstractT
}
}, EVTS_GGFS);
- GridGgfsPath dir = new GridGgfsPath("/dir1");
+ IgniteFsPath dir = new IgniteFsPath("/dir1");
- GridGgfsPath file1 = new GridGgfsPath(dir, "file1");
+ IgniteFsPath file1 = new IgniteFsPath(dir, "file1");
// Will generate EVT_GGFS_FILE_CREATED event + EVT_GGFS_DIR_CREATED event + OPEN + CLOSE.
ggfs.create(file1, true).close();
- GridGgfsPath file2 = new GridGgfsPath(dir, "file2");
+ IgniteFsPath file2 = new IgniteFsPath(dir, "file2");
ggfs.create(file2, true).close(); // Will generate 1 EVT_GGFS_FILE_CREATED event + OPEN + CLOSE.
@@ -439,41 +439,41 @@ public abstract class GridGgfsEventsAbstractSelfTest extends GridCommonAbstractT
IgniteFsEvent evt = (IgniteFsEvent)evtList.get(0);
assertEquals(EVT_GGFS_DIR_CREATED, evt.type());
- assertEquals(new GridGgfsPath("/dir1"), evt.path());
+ assertEquals(new IgniteFsPath("/dir1"), evt.path());
assertTrue(evt.isDirectory());
evt = (IgniteFsEvent)evtList.get(1);
assertEquals(EVT_GGFS_FILE_CREATED, evt.type());
- assertEquals(new GridGgfsPath("/dir1/file1"), evt.path());
+ assertEquals(new IgniteFsPath("/dir1/file1"), evt.path());
evt = (IgniteFsEvent)evtList.get(2);
assertEquals(EVT_GGFS_FILE_OPENED_WRITE, evt.type());
- assertEquals(new GridGgfsPath("/dir1/file1"), evt.path());
+ assertEquals(new IgniteFsPath("/dir1/file1"), evt.path());
evt = (IgniteFsEvent)evtList.get(3);
assertEquals(EVT_GGFS_FILE_CLOSED_WRITE, evt.type());
- assertEquals(new GridGgfsPath("/dir1/file1"), evt.path());
+ assertEquals(new IgniteFsPath("/dir1/file1"), evt.path());
assertEquals(0, evt.dataSize());
evt = (IgniteFsEvent)evtList.get(4);
assertEquals(EVT_GGFS_FILE_CREATED, evt.type());
- assertEquals(new GridGgfsPath("/dir1/file2"), evt.path());
+ assertEquals(new IgniteFsPath("/dir1/file2"), evt.path());
evt = (IgniteFsEvent)evtList.get(5);
assertEquals(EVT_GGFS_FILE_OPENED_WRITE, evt.type());
- assertEquals(new GridGgfsPath("/dir1/file2"), evt.path());
+ assertEquals(new IgniteFsPath("/dir1/file2"), evt.path());
evt = (IgniteFsEvent)evtList.get(6);
assertEquals(EVT_GGFS_FILE_CLOSED_WRITE, evt.type());
- assertEquals(new GridGgfsPath("/dir1/file2"), evt.path());
+ assertEquals(new IgniteFsPath("/dir1/file2"), evt.path());
assertEquals(0, evt.dataSize());
assertOneToOne(
evtList.subList(7, 11),
- new EventPredicate(EVT_GGFS_FILE_DELETED, new GridGgfsPath("/dir1/file1")),
- new EventPredicate(EVT_GGFS_FILE_PURGED, new GridGgfsPath("/dir1/file1")),
- new EventPredicate(EVT_GGFS_FILE_DELETED, new GridGgfsPath("/dir1/file2")),
- new EventPredicate(EVT_GGFS_FILE_PURGED, new GridGgfsPath("/dir1/file2"))
+ new EventPredicate(EVT_GGFS_FILE_DELETED, new IgniteFsPath("/dir1/file1")),
+ new EventPredicate(EVT_GGFS_FILE_PURGED, new IgniteFsPath("/dir1/file1")),
+ new EventPredicate(EVT_GGFS_FILE_DELETED, new IgniteFsPath("/dir1/file2")),
+ new EventPredicate(EVT_GGFS_FILE_PURGED, new IgniteFsPath("/dir1/file2"))
);
}
@@ -502,7 +502,7 @@ public abstract class GridGgfsEventsAbstractSelfTest extends GridCommonAbstractT
}
}, EVTS_GGFS);
- GridGgfsPath dir = new GridGgfsPath("/dir1/dir2");
+ IgniteFsPath dir = new IgniteFsPath("/dir1/dir2");
ggfs.mkdirs(dir); // Will generate 2 EVT_GGFS_DIR_CREATED events.
@@ -521,15 +521,15 @@ public abstract class GridGgfsEventsAbstractSelfTest extends GridCommonAbstractT
IgniteFsEvent evt = (IgniteFsEvent)evtList.get(0);
assertEquals(EVT_GGFS_DIR_CREATED, evt.type());
- assertEquals(new GridGgfsPath("/dir1"), evt.path());
+ assertEquals(new IgniteFsPath("/dir1"), evt.path());
evt = (IgniteFsEvent)evtList.get(1);
assertEquals(EVT_GGFS_DIR_CREATED, evt.type());
- assertEquals(new GridGgfsPath("/dir1/dir2"), evt.path());
+ assertEquals(new IgniteFsPath("/dir1/dir2"), evt.path());
IgniteFsEvent evt3 = (IgniteFsEvent)evtList.get(2);
assertEquals(EVT_GGFS_DIR_DELETED, evt3.type());
- assertEquals(new GridGgfsPath("/dir1/dir2"), evt3.path());
+ assertEquals(new IgniteFsPath("/dir1/dir2"), evt3.path());
}
/**
@@ -556,16 +556,16 @@ public abstract class GridGgfsEventsAbstractSelfTest extends GridCommonAbstractT
}
}, EVTS_GGFS);
- GridGgfsPath dir = new GridGgfsPath("/dir1/dir2");
+ IgniteFsPath dir = new IgniteFsPath("/dir1/dir2");
- GridGgfsPath file = new GridGgfsPath(dir, "file1");
+ IgniteFsPath file = new IgniteFsPath(dir, "file1");
// Will generate 2 EVT_GGFS_DIR_CREATED events + EVT_GGFS_FILE_CREATED_EVENT + OPEN + CLOSE.
ggfs.create(file, true).close();
ggfs.rename(file, dir.parent()); // Will generate 1 EVT_GGFS_FILE_RENAMED.
- assertTrue(ggfs.exists(new GridGgfsPath(dir.parent(), file.name())));
+ assertTrue(ggfs.exists(new IgniteFsPath(dir.parent(), file.name())));
assertTrue(latch.await(10, TimeUnit.SECONDS));
@@ -573,29 +573,29 @@ public abstract class GridGgfsEventsAbstractSelfTest extends GridCommonAbstractT
IgniteFsEvent evt = (IgniteFsEvent)evtList.get(0);
assertEquals(EVT_GGFS_DIR_CREATED, evt.type());
- assertEquals(new GridGgfsPath("/dir1"), evt.path());
+ assertEquals(new IgniteFsPath("/dir1"), evt.path());
evt = (IgniteFsEvent)evtList.get(1);
assertEquals(EVT_GGFS_DIR_CREATED, evt.type());
- assertEquals(new GridGgfsPath("/dir1/dir2"), evt.path());
+ assertEquals(new IgniteFsPath("/dir1/dir2"), evt.path());
evt = (IgniteFsEvent)evtList.get(2);
assertEquals(EVT_GGFS_FILE_CREATED, evt.type());
- assertEquals(new GridGgfsPath("/dir1/dir2/file1"), evt.path());
+ assertEquals(new IgniteFsPath("/dir1/dir2/file1"), evt.path());
evt = (IgniteFsEvent)evtList.get(3);
assertEquals(EVT_GGFS_FILE_OPENED_WRITE, evt.type());
- assertEquals(new GridGgfsPath("/dir1/dir2/file1"), evt.path());
+ assertEquals(new IgniteFsPath("/dir1/dir2/file1"), evt.path());
evt = (IgniteFsEvent)evtList.get(4);
assertEquals(EVT_GGFS_FILE_CLOSED_WRITE, evt.type());
- assertEquals(new GridGgfsPath("/dir1/dir2/file1"), evt.path());
+ assertEquals(new IgniteFsPath("/dir1/dir2/file1"), evt.path());
assertEquals(0, evt.dataSize());
IgniteFsEvent evt4 = (IgniteFsEvent)evtList.get(5);
assertEquals(EVT_GGFS_FILE_RENAMED, evt4.type());
- assertEquals(new GridGgfsPath("/dir1/dir2/file1"), evt4.path());
- assertEquals(new GridGgfsPath("/dir1/file1"), evt4.newPath());
+ assertEquals(new IgniteFsPath("/dir1/dir2/file1"), evt4.path());
+ assertEquals(new IgniteFsPath("/dir1/file1"), evt4.newPath());
}
/**
@@ -623,7 +623,7 @@ public abstract class GridGgfsEventsAbstractSelfTest extends GridCommonAbstractT
}
}, EVTS_GGFS);
- GridGgfsPath dir = new GridGgfsPath("/dir1/dir2");
+ IgniteFsPath dir = new IgniteFsPath("/dir1/dir2");
assertFalse(ggfs.exists(dir.parent()));
@@ -637,15 +637,15 @@ public abstract class GridGgfsEventsAbstractSelfTest extends GridCommonAbstractT
IgniteFsEvent evt = (IgniteFsEvent)evtList.get(0);
assertEquals(EVT_GGFS_DIR_CREATED, evt.type());
- assertEquals(new GridGgfsPath("/dir1"), evt.path());
+ assertEquals(new IgniteFsPath("/dir1"), evt.path());
evt = (IgniteFsEvent)evtList.get(1);
assertEquals(EVT_GGFS_DIR_CREATED, evt.type());
- assertEquals(new GridGgfsPath("/dir1/dir2"), evt.path());
+ assertEquals(new IgniteFsPath("/dir1/dir2"), evt.path());
evt = (IgniteFsEvent)evtList.get(2);
assertEquals(EVT_GGFS_DIR_DELETED, evt.type());
- assertEquals(new GridGgfsPath("/dir1"), evt.path());
+ assertEquals(new IgniteFsPath("/dir1"), evt.path());
}
/**
@@ -673,7 +673,7 @@ public abstract class GridGgfsEventsAbstractSelfTest extends GridCommonAbstractT
}
}, EVTS_GGFS);
- final GridGgfsPath file = new GridGgfsPath("/file1");
+ final IgniteFsPath file = new IgniteFsPath("/file1");
ggfs.create(file, false).close(); // Will generate create, open and close events.
@@ -690,7 +690,7 @@ public abstract class GridGgfsEventsAbstractSelfTest extends GridCommonAbstractT
assertEquals(evtsCnt, evtList.size());
- final GridGgfsPath file1 = new GridGgfsPath("/file1");
+ final IgniteFsPath file1 = new IgniteFsPath("/file1");
IgniteFsEvent evt = (IgniteFsEvent)evtList.get(0);
assertEquals(EVT_GGFS_FILE_CREATED, evt.type());
@@ -769,7 +769,7 @@ public abstract class GridGgfsEventsAbstractSelfTest extends GridCommonAbstractT
}
}, EVTS_GGFS);
- final GridGgfsPath file = new GridGgfsPath("/file1");
+ final IgniteFsPath file = new IgniteFsPath("/file1");
final int dataSize = 1024;
@@ -791,24 +791,24 @@ public abstract class GridGgfsEventsAbstractSelfTest extends GridCommonAbstractT
IgniteFsEvent evt = (IgniteFsEvent)evtList.get(0);
assertEquals(EVT_GGFS_FILE_CREATED, evt.type());
- assertEquals(new GridGgfsPath("/file1"), evt.path());
+ assertEquals(new IgniteFsPath("/file1"), evt.path());
evt = (IgniteFsEvent)evtList.get(1);
assertEquals(EVT_GGFS_FILE_OPENED_WRITE, evt.type());
- assertEquals(new GridGgfsPath("/file1"), evt.path());
+ assertEquals(new IgniteFsPath("/file1"), evt.path());
evt = (IgniteFsEvent)evtList.get(2);
assertEquals(EVT_GGFS_FILE_CLOSED_WRITE, evt.type());
- assertEquals(new GridGgfsPath("/file1"), evt.path());
+ assertEquals(new IgniteFsPath("/file1"), evt.path());
assertEquals((long)dataSize, evt.dataSize());
evt = (IgniteFsEvent)evtList.get(3);
assertEquals(EVT_GGFS_FILE_OPENED_READ, evt.type());
- assertEquals(new GridGgfsPath("/file1"), evt.path());
+ assertEquals(new IgniteFsPath("/file1"), evt.path());
evt = (IgniteFsEvent)evtList.get(4);
assertEquals(EVT_GGFS_FILE_CLOSED_READ, evt.type());
- assertEquals(new GridGgfsPath("/file1"), evt.path());
+ assertEquals(new IgniteFsPath("/file1"), evt.path());
assertEquals((long)dataSize, evt.dataSize());
}
@@ -820,13 +820,13 @@ public abstract class GridGgfsEventsAbstractSelfTest extends GridCommonAbstractT
private final int evt;
/** */
- private final GridGgfsPath path;
+ private final IgniteFsPath path;
/**
* @param evt Event type.
* @param path GGFS path.
*/
- EventPredicate(int evt, GridGgfsPath path) {
+ EventPredicate(int evt, IgniteFsPath path) {
this.evt = evt;
this.path = path;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f3d93762/modules/core/src/test/java/org/gridgain/grid/ggfs/GridGgfsFragmentizerAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/ggfs/GridGgfsFragmentizerAbstractSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/ggfs/GridGgfsFragmentizerAbstractSelfTest.java
index 6239731..fc5a434 100644
--- a/modules/core/src/test/java/org/gridgain/grid/ggfs/GridGgfsFragmentizerAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/ggfs/GridGgfsFragmentizerAbstractSelfTest.java
@@ -117,7 +117,7 @@ public class GridGgfsFragmentizerAbstractSelfTest extends GridGgfsCommonAbstract
* @param path Path to await.
* @throws Exception If failed.
*/
- protected void awaitFileFragmenting(int gridIdx, GridGgfsPath path) throws Exception {
+ protected void awaitFileFragmenting(int gridIdx, IgniteFsPath path) throws Exception {
GridGgfsEx ggfs = (GridGgfsEx)grid(gridIdx).fileSystem("ggfs");
GridGgfsMetaManager meta = ggfs.context().meta();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f3d93762/modules/core/src/test/java/org/gridgain/grid/ggfs/GridGgfsFragmentizerSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/ggfs/GridGgfsFragmentizerSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/ggfs/GridGgfsFragmentizerSelfTest.java
index 2f01d30..67169eb 100644
--- a/modules/core/src/test/java/org/gridgain/grid/ggfs/GridGgfsFragmentizerSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/ggfs/GridGgfsFragmentizerSelfTest.java
@@ -30,7 +30,7 @@ public class GridGgfsFragmentizerSelfTest extends GridGgfsFragmentizerAbstractSe
public void testReadFragmentizing() throws Exception {
IgniteFs ggfs = grid(0).fileSystem("ggfs");
- GridGgfsPath path = new GridGgfsPath("/someFile");
+ IgniteFsPath path = new IgniteFsPath("/someFile");
try (GridGgfsOutputStream out = ggfs.create(path, true)) {
// Write 10 groups.
@@ -90,7 +90,7 @@ public class GridGgfsFragmentizerSelfTest extends GridGgfsFragmentizerAbstractSe
* @throws Exception If failed.
*/
private void checkAppendFragmentizing(int chunkSize, boolean rotate) throws Exception {
- GridGgfsPath path = new GridGgfsPath("/someFile");
+ IgniteFsPath path = new IgniteFsPath("/someFile");
long written = 0;
@@ -165,7 +165,7 @@ public class GridGgfsFragmentizerSelfTest extends GridGgfsFragmentizerAbstractSe
* @throws Exception If failed.
*/
private void checkFlushFragmentizing(int chunkSize) throws Exception {
- GridGgfsPath path = new GridGgfsPath("/someFile");
+ IgniteFsPath path = new IgniteFsPath("/someFile");
long written = 0;
int cnt = 0;
@@ -218,7 +218,7 @@ public class GridGgfsFragmentizerSelfTest extends GridGgfsFragmentizerAbstractSe
GridGgfsImpl ggfs = (GridGgfsImpl)grid(0).fileSystem("ggfs");
for (int i = 0; i < 30; i++) {
- GridGgfsPath path = new GridGgfsPath("/someFile" + i);
+ IgniteFsPath path = new IgniteFsPath("/someFile" + i);
try (GridGgfsOutputStream out = ggfs.create(path, true)) {
for (int j = 0; j < 5 * GGFS_GROUP_SIZE; j++)
@@ -228,7 +228,7 @@ public class GridGgfsFragmentizerSelfTest extends GridGgfsFragmentizerAbstractSe
U.sleep(200);
}
- ggfs.delete(new GridGgfsPath("/"), true);
+ ggfs.delete(new IgniteFsPath("/"), true);
ggfs.awaitDeletesAsync().get();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f3d93762/modules/core/src/test/java/org/gridgain/grid/ggfs/GridGgfsFragmentizerTopologySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/ggfs/GridGgfsFragmentizerTopologySelfTest.java b/modules/core/src/test/java/org/gridgain/grid/ggfs/GridGgfsFragmentizerTopologySelfTest.java
index 74d27c5..f8b2b01 100644
--- a/modules/core/src/test/java/org/gridgain/grid/ggfs/GridGgfsFragmentizerTopologySelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/ggfs/GridGgfsFragmentizerTopologySelfTest.java
@@ -23,7 +23,7 @@ public class GridGgfsFragmentizerTopologySelfTest extends GridGgfsFragmentizerAb
// Now node 1 should be coordinator.
try {
- GridGgfsPath path = new GridGgfsPath("/someFile");
+ IgniteFsPath path = new IgniteFsPath("/someFile");
IgniteFs ggfs = grid(1).fileSystem("ggfs");
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f3d93762/modules/core/src/test/java/org/gridgain/grid/ggfs/GridGgfsPathSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/ggfs/GridGgfsPathSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/ggfs/GridGgfsPathSelfTest.java
index b7e97c6..94168d6 100644
--- a/modules/core/src/test/java/org/gridgain/grid/ggfs/GridGgfsPathSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/ggfs/GridGgfsPathSelfTest.java
@@ -23,7 +23,7 @@ import java.util.*;
import java.util.concurrent.*;
/**
- * {@link GridGgfsPath} self test.
+ * {@link IgniteFsPath} self test.
*/
public class GridGgfsPathSelfTest extends GridCommonAbstractTest {
/** Marshaller to test {@link Externalizable} interface. */
@@ -35,7 +35,7 @@ public class GridGgfsPathSelfTest extends GridCommonAbstractTest {
* @throws Exception In case of any exception.
*/
public void testMethods() throws Exception {
- GridGgfsPath path = new GridGgfsPath("/a/s/d/f");
+ IgniteFsPath path = new IgniteFsPath("/a/s/d/f");
validateParent("/a/s/d/f", "/a/s/d");
validateParent("/a/s/d", "/a/s");
@@ -43,7 +43,7 @@ public class GridGgfsPathSelfTest extends GridCommonAbstractTest {
validateParent("/a", "/");
validateParent("/", null);
- assertEquals(new GridGgfsPath("/a/s/d/f-2"), path.suffix("-2"));
+ assertEquals(new IgniteFsPath("/a/s/d/f-2"), path.suffix("-2"));
assertEquals(Arrays.asList("a", "s", "d", "f"), path.components());
assertEquals(4, path.depth());
assertEquals(3, path.parent().depth());
@@ -51,10 +51,10 @@ public class GridGgfsPathSelfTest extends GridCommonAbstractTest {
assertEquals(path, mu(path));
- GridGgfsPath parent = path.parent();
+ IgniteFsPath parent = path.parent();
- assertTrue(path.compareTo(new GridGgfsPath(parent, "e")) > 0);
- assertTrue(path.compareTo(new GridGgfsPath(parent, "g")) < 0);
+ assertTrue(path.compareTo(new IgniteFsPath(parent, "e")) > 0);
+ assertTrue(path.compareTo(new IgniteFsPath(parent, "g")) < 0);
}
/**
@@ -64,7 +64,7 @@ public class GridGgfsPathSelfTest extends GridCommonAbstractTest {
* @param parent Expected parent path.
*/
private void validateParent(String child, @Nullable String parent) {
- assertEquals(parent == null ? null : new GridGgfsPath(parent), new GridGgfsPath(child).parent());
+ assertEquals(parent == null ? null : new IgniteFsPath(parent), new IgniteFsPath(child).parent());
}
/**
@@ -87,17 +87,17 @@ public class GridGgfsPathSelfTest extends GridCommonAbstractTest {
public void testConstructors() throws Exception {
String pathStr = "///";
URI uri = URI.create(pathStr);
- GridGgfsPath path = new GridGgfsPath(uri);
+ IgniteFsPath path = new IgniteFsPath(uri);
- assertNotNull(new GridGgfsPath(uri));
- assertNotNull(new GridGgfsPath(pathStr));
- assertNotNull(new GridGgfsPath("/"));
- assertNotNull(new GridGgfsPath(path, pathStr));
- assertNotNull(new GridGgfsPath());
+ assertNotNull(new IgniteFsPath(uri));
+ assertNotNull(new IgniteFsPath(pathStr));
+ assertNotNull(new IgniteFsPath("/"));
+ assertNotNull(new IgniteFsPath(path, pathStr));
+ assertNotNull(new IgniteFsPath());
Class nullUri = URI.class;
Class nullStr = String.class;
- Class nullPath = GridGgfsPath.class;
+ Class nullPath = IgniteFsPath.class;
expectConstructorThrows(NullPointerException.class, nullUri);
expectConstructorThrows(IllegalArgumentException.class, nullStr);
@@ -107,7 +107,7 @@ public class GridGgfsPathSelfTest extends GridCommonAbstractTest {
String name = "with space in path.txt";
- assertEquals(name, new GridGgfsPath(path, name).name());
+ assertEquals(name, new IgniteFsPath(path, name).name());
}
/**
@@ -133,7 +133,7 @@ public class GridGgfsPathSelfTest extends GridCommonAbstractTest {
GridTestUtils.assertThrows(log, new Callable<Object>() {
@Override public Object call() throws Exception {
try {
- Constructor<GridGgfsPath> constructor = GridGgfsPath.class.getConstructor(paramTypes);
+ Constructor<IgniteFsPath> constructor = IgniteFsPath.class.getConstructor(paramTypes);
constructor.newInstance(args);
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f3d93762/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridCacheGgfsPerBlockLruEvictionPolicySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridCacheGgfsPerBlockLruEvictionPolicySelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridCacheGgfsPerBlockLruEvictionPolicySelfTest.java
index bf4fcc9..68e7c6d 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridCacheGgfsPerBlockLruEvictionPolicySelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridCacheGgfsPerBlockLruEvictionPolicySelfTest.java
@@ -51,10 +51,10 @@ public class GridCacheGgfsPerBlockLruEvictionPolicySelfTest extends GridGgfsComm
private static final String SECONDARY_REST_CFG = "{type:'tcp', port:11500}";
/** File working in PRIMARY mode. */
- public static final GridGgfsPath FILE = new GridGgfsPath("/file");
+ public static final IgniteFsPath FILE = new IgniteFsPath("/file");
/** File working in DUAL mode. */
- public static final GridGgfsPath FILE_RMT = new GridGgfsPath("/fileRemote");
+ public static final IgniteFsPath FILE_RMT = new IgniteFsPath("/fileRemote");
/** Primary GGFS instances. */
private static GridGgfsImpl ggfsPrimary;
@@ -421,7 +421,7 @@ public class GridCacheGgfsPerBlockLruEvictionPolicySelfTest extends GridGgfsComm
* @param len Length.
* @throws Exception If failed.
*/
- private void read(GridGgfsPath path, int off, int len) throws Exception {
+ private void read(IgniteFsPath path, int off, int len) throws Exception {
GridGgfsInputStream is = ggfsPrimary.open(path);
is.readFully(off, new byte[len]);
@@ -436,7 +436,7 @@ public class GridCacheGgfsPerBlockLruEvictionPolicySelfTest extends GridGgfsComm
* @param len Data length.
* @throws Exception If failed.
*/
- private void append(GridGgfsPath path, int len) throws Exception {
+ private void append(IgniteFsPath path, int len) throws Exception {
GridGgfsOutputStream os = ggfsPrimary.append(path, false);
os.write(new byte[len]);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f3d93762/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsAbstractSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsAbstractSelfTest.java
index bb5f64c..1178dc0 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsAbstractSelfTest.java
@@ -65,34 +65,34 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes
protected static final String SECONDARY_REST_CFG = "{type:'tcp', port:11500}";
/** Directory. */
- protected static final GridGgfsPath DIR = new GridGgfsPath("/dir");
+ protected static final IgniteFsPath DIR = new IgniteFsPath("/dir");
/** Sub-directory. */
- protected static final GridGgfsPath SUBDIR = new GridGgfsPath(DIR, "subdir");
+ protected static final IgniteFsPath SUBDIR = new IgniteFsPath(DIR, "subdir");
/** Another sub-directory in the same directory. */
- protected static final GridGgfsPath SUBDIR2 = new GridGgfsPath(DIR, "subdir2");
+ protected static final IgniteFsPath SUBDIR2 = new IgniteFsPath(DIR, "subdir2");
/** Sub-directory of the sub-directory. */
- protected static final GridGgfsPath SUBSUBDIR = new GridGgfsPath(SUBDIR, "subsubdir");
+ protected static final IgniteFsPath SUBSUBDIR = new IgniteFsPath(SUBDIR, "subsubdir");
/** File. */
- protected static final GridGgfsPath FILE = new GridGgfsPath(SUBDIR, "file");
+ protected static final IgniteFsPath FILE = new IgniteFsPath(SUBDIR, "file");
/** Another file in the same directory. */
- protected static final GridGgfsPath FILE2 = new GridGgfsPath(SUBDIR, "file2");
+ protected static final IgniteFsPath FILE2 = new IgniteFsPath(SUBDIR, "file2");
/** Other directory. */
- protected static final GridGgfsPath DIR_NEW = new GridGgfsPath("/dirNew");
+ protected static final IgniteFsPath DIR_NEW = new IgniteFsPath("/dirNew");
/** Other subdirectory. */
- protected static final GridGgfsPath SUBDIR_NEW = new GridGgfsPath(DIR_NEW, "subdirNew");
+ protected static final IgniteFsPath SUBDIR_NEW = new IgniteFsPath(DIR_NEW, "subdirNew");
/** Other sub-directory of the sub-directory. */
- protected static final GridGgfsPath SUBSUBDIR_NEW = new GridGgfsPath(SUBDIR_NEW, "subsubdirNew");
+ protected static final IgniteFsPath SUBSUBDIR_NEW = new IgniteFsPath(SUBDIR_NEW, "subsubdirNew");
/** Other file. */
- protected static final GridGgfsPath FILE_NEW = new GridGgfsPath(SUBDIR_NEW, "fileNew");
+ protected static final IgniteFsPath FILE_NEW = new IgniteFsPath(SUBDIR_NEW, "fileNew");
/** Default data chunk (128 bytes). */
protected static byte[] chunk;
@@ -357,8 +357,8 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes
* @throws Exception If failed.
*/
public void testRenameFileParentRoot() throws Exception {
- GridGgfsPath file1 = new GridGgfsPath("/file1");
- GridGgfsPath file2 = new GridGgfsPath("/file2");
+ IgniteFsPath file1 = new IgniteFsPath("/file1");
+ IgniteFsPath file2 = new IgniteFsPath("/file2");
create(ggfs, null, paths(file1));
@@ -389,8 +389,8 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes
* @throws Exception If failed.
*/
public void testRenameDirectoryParentRoot() throws Exception {
- GridGgfsPath dir1 = new GridGgfsPath("/dir1");
- GridGgfsPath dir2 = new GridGgfsPath("/dir2");
+ IgniteFsPath dir1 = new IgniteFsPath("/dir1");
+ IgniteFsPath dir2 = new IgniteFsPath("/dir2");
create(ggfs, paths(dir1), null);
@@ -411,7 +411,7 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes
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);
}
@@ -423,9 +423,9 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes
public void testMoveFileDestinationRoot() throws Exception {
create(ggfs, paths(DIR, SUBDIR), paths(FILE));
- ggfs.rename(FILE, new GridGgfsPath());
+ ggfs.rename(FILE, new IgniteFsPath());
- checkExist(ggfs, ggfsSecondary, new GridGgfsPath("/" + FILE.name()));
+ checkExist(ggfs, ggfsSecondary, new IgniteFsPath("/" + FILE.name()));
checkNotExist(ggfs, ggfsSecondary, FILE);
}
@@ -435,13 +435,13 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes
* @throws Exception If failed.
*/
public void testMoveFileSourceParentRoot() throws Exception {
- GridGgfsPath file = new GridGgfsPath("/" + FILE.name());
+ IgniteFsPath file = new IgniteFsPath("/" + FILE.name());
create(ggfs, paths(DIR_NEW, SUBDIR_NEW), paths(file));
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);
}
@@ -466,7 +466,7 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes
* @throws Exception If failed.
*/
public void testMoveRenameFileDestinationRoot() throws Exception {
- GridGgfsPath file = new GridGgfsPath("/" + FILE.name());
+ IgniteFsPath file = new IgniteFsPath("/" + FILE.name());
create(ggfs, paths(DIR, SUBDIR), paths(FILE));
@@ -482,7 +482,7 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes
* @throws Exception If failed.
*/
public void testMoveRenameFileSourceParentRoot() throws Exception {
- GridGgfsPath file = new GridGgfsPath("/" + FILE_NEW.name());
+ IgniteFsPath file = new IgniteFsPath("/" + FILE_NEW.name());
create(ggfs, paths(DIR_NEW, SUBDIR_NEW), paths(file));
@@ -503,7 +503,7 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes
ggfs.rename(SUBSUBDIR, SUBDIR_NEW);
- checkExist(ggfs, ggfsSecondary, new GridGgfsPath(SUBDIR_NEW, SUBSUBDIR.name()));
+ checkExist(ggfs, ggfsSecondary, new IgniteFsPath(SUBDIR_NEW, SUBSUBDIR.name()));
checkNotExist(ggfs, ggfsSecondary, SUBSUBDIR);
}
@@ -515,9 +515,9 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes
public void testMoveDirectoryDestinationRoot() throws Exception {
create(ggfs, paths(DIR, SUBDIR, SUBSUBDIR), null);
- ggfs.rename(SUBSUBDIR, new GridGgfsPath());
+ ggfs.rename(SUBSUBDIR, new IgniteFsPath());
- checkExist(ggfs, ggfsSecondary, new GridGgfsPath("/" + SUBSUBDIR.name()));
+ checkExist(ggfs, ggfsSecondary, new IgniteFsPath("/" + SUBSUBDIR.name()));
checkNotExist(ggfs, ggfsSecondary, SUBSUBDIR);
}
@@ -527,13 +527,13 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes
* @throws Exception If failed.
*/
public void testMoveDirectorySourceParentRoot() throws Exception {
- GridGgfsPath dir = new GridGgfsPath("/" + SUBSUBDIR.name());
+ IgniteFsPath dir = new IgniteFsPath("/" + SUBSUBDIR.name());
create(ggfs, paths(DIR_NEW, SUBDIR_NEW, dir), 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);
}
@@ -558,7 +558,7 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes
* @throws Exception If failed.
*/
public void testMoveRenameDirectoryDestinationRoot() throws Exception {
- GridGgfsPath dir = new GridGgfsPath("/" + SUBSUBDIR.name());
+ IgniteFsPath dir = new IgniteFsPath("/" + SUBSUBDIR.name());
create(ggfs, paths(DIR, SUBDIR, SUBSUBDIR), null);
@@ -574,7 +574,7 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes
* @throws Exception If failed.
*/
public void testMoveRenameDirectorySourceParentRoot() throws Exception {
- GridGgfsPath dir = new GridGgfsPath("/" + SUBSUBDIR_NEW.name());
+ IgniteFsPath dir = new IgniteFsPath("/" + SUBSUBDIR_NEW.name());
create(ggfs, paths(DIR_NEW, SUBDIR_NEW, dir), null);
@@ -886,7 +886,7 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes
* @throws Exception If failed.
*/
public void testCreateParentRoot() throws Exception {
- GridGgfsPath file = new GridGgfsPath("/" + FILE.name());
+ IgniteFsPath file = new IgniteFsPath("/" + FILE.name());
createFile(ggfs, file, true, chunk);
@@ -1066,7 +1066,7 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes
@Override public void run() {
int idx = ctr.incrementAndGet();
- GridGgfsPath path = new GridGgfsPath("/file" + idx);
+ IgniteFsPath path = new IgniteFsPath("/file" + idx);
try {
for (int i = 0; i < REPEAT_CNT; i++) {
@@ -1182,7 +1182,7 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes
* @throws Exception If failed.
*/
public void testAppendParentRoot() throws Exception {
- GridGgfsPath file = new GridGgfsPath("/" + FILE.name());
+ IgniteFsPath file = new IgniteFsPath("/" + FILE.name());
createFile(ggfs, file, true, BLOCK_SIZE, chunk);
@@ -1375,13 +1375,13 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes
int threadCnt = 10;
for (int i = 0; i < threadCnt; i++)
- createFile(ggfs, new GridGgfsPath("/file" + i), false);
+ createFile(ggfs, new IgniteFsPath("/file" + i), false);
multithreaded(new Runnable() {
@Override public void run() {
int idx = ctr.getAndIncrement();
- GridGgfsPath path = new GridGgfsPath("/file" + idx);
+ IgniteFsPath path = new IgniteFsPath("/file" + idx);
try {
byte[][] chunks = new byte[REPEAT_CNT][];
@@ -1903,15 +1903,15 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes
assert childrenDirPerLvl > 0;
// First define file system structure.
- final Map<Integer, List<GridGgfsPath>> dirPaths = new HashMap<>();
- final Map<Integer, List<GridGgfsPath>> filePaths = new HashMap<>();
+ final Map<Integer, List<IgniteFsPath>> dirPaths = new HashMap<>();
+ final Map<Integer, List<IgniteFsPath>> filePaths = new HashMap<>();
- Queue<IgniteBiTuple<Integer, GridGgfsPath>> queue = new ArrayDeque<>();
+ Queue<IgniteBiTuple<Integer, IgniteFsPath>> queue = new ArrayDeque<>();
- queue.add(F.t(0, new GridGgfsPath())); // Add root directory.
+ queue.add(F.t(0, new IgniteFsPath())); // Add root directory.
while (!queue.isEmpty()) {
- IgniteBiTuple<Integer, GridGgfsPath> entry = queue.poll();
+ IgniteBiTuple<Integer, IgniteFsPath> entry = queue.poll();
int lvl = entry.getKey();
@@ -1919,21 +1919,21 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes
int newLvl = lvl + 1;
for (int i = 0; i < childrenDirPerLvl; i++) {
- GridGgfsPath path = new GridGgfsPath(entry.getValue(), "dir-" + newLvl + "-" + i);
+ IgniteFsPath path = new IgniteFsPath(entry.getValue(), "dir-" + newLvl + "-" + i);
queue.add(F.t(newLvl, path));
if (!dirPaths.containsKey(newLvl))
- dirPaths.put(newLvl, new ArrayList<GridGgfsPath>());
+ dirPaths.put(newLvl, new ArrayList<IgniteFsPath>());
dirPaths.get(newLvl).add(path);
}
for (int i = 0; i < childrenFilePerLvl; i++) {
- GridGgfsPath path = new GridGgfsPath(entry.getValue(), "file-" + newLvl + "-" + i);
+ IgniteFsPath path = new IgniteFsPath(entry.getValue(), "file-" + newLvl + "-" + i);
if (!filePaths.containsKey(newLvl))
- filePaths.put(newLvl, new ArrayList<GridGgfsPath>());
+ filePaths.put(newLvl, new ArrayList<IgniteFsPath>());
filePaths.get(newLvl).add(path);
}
@@ -1957,8 +1957,8 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes
int fromLvl = rand.nextInt(lvlCnt) + 1;
int toLvl = rand.nextInt(lvlCnt) + 1;
- List<GridGgfsPath> fromPaths;
- List<GridGgfsPath> toPaths;
+ List<IgniteFsPath> fromPaths;
+ List<IgniteFsPath> toPaths;
if (rand.nextInt(childrenDirPerLvl + childrenFilePerLvl) < childrenDirPerLvl) {
// Rename directories.
@@ -1971,8 +1971,8 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes
toPaths = filePaths.get(toLvl);
}
- GridGgfsPath fromPath = fromPaths.get(rand.nextInt(fromPaths.size()));
- GridGgfsPath toPath = toPaths.get(rand.nextInt(toPaths.size()));
+ IgniteFsPath fromPath = fromPaths.get(rand.nextInt(fromPaths.size()));
+ IgniteFsPath toPath = toPaths.get(rand.nextInt(toPaths.size()));
U.awaitQuiet(barrier);
@@ -1994,7 +1994,7 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes
try {
int lvl = rand.nextInt(lvlCnt) + 1;
- GridGgfsPath path = rand.nextInt(childrenDirPerLvl + childrenFilePerLvl) < childrenDirPerLvl ?
+ IgniteFsPath path = rand.nextInt(childrenDirPerLvl + childrenFilePerLvl) < childrenDirPerLvl ?
dirPaths.get(lvl).get(rand.nextInt(dirPaths.get(lvl).size())) :
filePaths.get(lvl).get(rand.nextInt(filePaths.get(lvl).size()));
@@ -2018,7 +2018,7 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes
try {
int lvl = rand.nextInt(lvlCnt) + 1;
- GridGgfsPath path = rand.nextInt(childrenDirPerLvl + childrenFilePerLvl) < childrenDirPerLvl ?
+ IgniteFsPath path = rand.nextInt(childrenDirPerLvl + childrenFilePerLvl) < childrenDirPerLvl ?
dirPaths.get(lvl).get(rand.nextInt(dirPaths.get(lvl).size())) :
filePaths.get(lvl).get(rand.nextInt(filePaths.get(lvl).size()));
@@ -2044,9 +2044,9 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes
try {
int lvl = rand.nextInt(lvlCnt) + 1;
- GridGgfsPath parentPath = dirPaths.get(lvl).get(rand.nextInt(dirPaths.get(lvl).size()));
+ IgniteFsPath parentPath = dirPaths.get(lvl).get(rand.nextInt(dirPaths.get(lvl).size()));
- GridGgfsPath path = new GridGgfsPath(parentPath, "newDir-" + dirCtr.incrementAndGet());
+ IgniteFsPath path = new IgniteFsPath(parentPath, "newDir-" + dirCtr.incrementAndGet());
U.awaitQuiet(barrier);
@@ -2071,9 +2071,9 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes
try {
int lvl = rand.nextInt(lvlCnt) + 1;
- GridGgfsPath parentPath = dirPaths.get(lvl).get(rand.nextInt(dirPaths.get(lvl).size()));
+ IgniteFsPath parentPath = dirPaths.get(lvl).get(rand.nextInt(dirPaths.get(lvl).size()));
- GridGgfsPath path = new GridGgfsPath(parentPath, "newFile-" + fileCtr.incrementAndGet());
+ IgniteFsPath path = new IgniteFsPath(parentPath, "newFile-" + fileCtr.incrementAndGet());
U.awaitQuiet(barrier);
@@ -2103,8 +2103,8 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes
GridGgfsImpl targetGgfs = dual ? lvl <= primaryLvlCnt ? ggfs : ggfsSecondary : ggfs;
- GridGgfsPath[] dirs = dirPaths.get(lvl).toArray(new GridGgfsPath[dirPaths.get(lvl).size()]);
- GridGgfsPath[] files = filePaths.get(lvl).toArray(new GridGgfsPath[filePaths.get(lvl).size()]);
+ IgniteFsPath[] dirs = dirPaths.get(lvl).toArray(new IgniteFsPath[dirPaths.get(lvl).size()]);
+ IgniteFsPath[] files = filePaths.get(lvl).toArray(new IgniteFsPath[filePaths.get(lvl).size()]);
create(targetGgfs, dirs, files);
}
@@ -2124,15 +2124,15 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes
* @param files Files.
* @throws Exception If failed.
*/
- public static void create(GridGgfsFileSystem ggfs, @Nullable GridGgfsPath[] dirs, @Nullable GridGgfsPath[] files)
+ public static void create(GridGgfsFileSystem ggfs, @Nullable IgniteFsPath[] dirs, @Nullable IgniteFsPath[] files)
throws Exception {
if (dirs != null) {
- for (GridGgfsPath dir : dirs)
+ for (IgniteFsPath dir : dirs)
ggfs.mkdirs(dir);
}
if (files != null) {
- for (GridGgfsPath file : files) {
+ for (IgniteFsPath file : files) {
OutputStream os = ggfs.create(file, true);
os.close();
@@ -2150,7 +2150,7 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes
* @throws IOException In case of IO exception.
* @throws GridException In case of Grid exception.
*/
- protected static void createFile(GridGgfsFileSystem ggfs, GridGgfsPath file, boolean overwrite,
+ protected static void createFile(GridGgfsFileSystem ggfs, IgniteFsPath file, boolean overwrite,
@Nullable byte[]... chunks) throws IOException, GridException {
OutputStream os = null;
@@ -2176,7 +2176,7 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes
* @param chunks Data chunks.
* @throws Exception If failed.
*/
- protected void createFile(IgniteFs ggfs, GridGgfsPath file, boolean overwrite, long blockSize,
+ protected void createFile(IgniteFs ggfs, IgniteFsPath file, boolean overwrite, long blockSize,
@Nullable byte[]... chunks) throws Exception {
GridGgfsOutputStream os = null;
@@ -2200,7 +2200,7 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes
* @param chunks Data chunks.
* @throws Exception If failed.
*/
- protected void appendFile(IgniteFs ggfs, GridGgfsPath file, @Nullable byte[]... chunks)
+ protected void appendFile(IgniteFs ggfs, IgniteFsPath file, @Nullable byte[]... chunks)
throws Exception {
GridGgfsOutputStream os = null;
@@ -2236,7 +2236,7 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes
* @param ggfs GGFS.
* @param file File.
*/
- public static void awaitFileClose(GridGgfsFileSystem ggfs, GridGgfsPath file) {
+ public static void awaitFileClose(GridGgfsFileSystem ggfs, IgniteFsPath file) {
try {
ggfs.update(file, Collections.singletonMap("prop", "val"));
}
@@ -2253,7 +2253,7 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes
* @param paths Paths.
* @throws Exception If failed.
*/
- protected void checkExist(GridGgfsImpl ggfs, GridGgfsImpl ggfsSecondary, GridGgfsPath... paths) throws Exception {
+ protected void checkExist(GridGgfsImpl ggfs, GridGgfsImpl ggfsSecondary, IgniteFsPath... paths) throws Exception {
checkExist(ggfs, paths);
if (dual)
@@ -2267,8 +2267,8 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes
* @param paths Paths.
* @throws GridException If failed.
*/
- protected void checkExist(GridGgfsImpl ggfs, GridGgfsPath... paths) throws GridException {
- for (GridGgfsPath path : paths) {
+ protected void checkExist(GridGgfsImpl ggfs, IgniteFsPath... paths) throws GridException {
+ for (IgniteFsPath path : paths) {
assert ggfs.context().meta().fileId(path) != null : "Path doesn't exist [ggfs=" + ggfs.name() +
", path=" + path + ']';
assert ggfs.exists(path) : "Path doesn't exist [ggfs=" + ggfs.name() + ", path=" + path + ']';
@@ -2283,7 +2283,7 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes
* @param paths Paths.
* @throws Exception If failed.
*/
- protected void checkNotExist(GridGgfsImpl ggfs, GridGgfsImpl ggfsSecondary, GridGgfsPath... paths)
+ protected void checkNotExist(GridGgfsImpl ggfs, GridGgfsImpl ggfsSecondary, IgniteFsPath... paths)
throws Exception {
checkNotExist(ggfs, paths);
@@ -2298,8 +2298,8 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes
* @param paths Paths.
* @throws Exception If failed.
*/
- protected void checkNotExist(GridGgfsImpl ggfs, GridGgfsPath... paths) throws Exception {
- for (GridGgfsPath path : paths) {
+ protected void checkNotExist(GridGgfsImpl ggfs, IgniteFsPath... paths) throws Exception {
+ for (IgniteFsPath path : paths) {
assert ggfs.context().meta().fileId(path) == null : "Path exists [ggfs=" + ggfs.name() + ", path=" +
path + ']';
assert !ggfs.exists(path) : "Path exists [ggfs=" + ggfs.name() + ", path=" + path + ']';
@@ -2316,7 +2316,7 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes
* @param chunks Expected data.
* @throws Exception If failed.
*/
- protected void checkFile(GridGgfsImpl ggfs, GridGgfsImpl ggfsSecondary, GridGgfsPath file,
+ protected void checkFile(GridGgfsImpl ggfs, GridGgfsImpl ggfsSecondary, IgniteFsPath file,
@Nullable byte[]... chunks) throws Exception {
checkExist(ggfs, file);
checkFileContent(ggfs, file, chunks);
@@ -2336,7 +2336,7 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes
* @throws IOException In case of IO exception.
* @throws GridException In case of Grid exception.
*/
- protected void checkFileContent(GridGgfsImpl ggfs, GridGgfsPath file, @Nullable byte[]... chunks)
+ protected void checkFileContent(GridGgfsImpl ggfs, IgniteFsPath file, @Nullable byte[]... chunks)
throws IOException, GridException {
if (chunks != null && chunks.length > 0) {
GridGgfsInputStream is = null;
@@ -2395,7 +2395,7 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes
* @param paths Paths to group.
* @return Paths as array.
*/
- protected GridGgfsPath[] paths(GridGgfsPath... paths) {
+ protected IgniteFsPath[] paths(IgniteFsPath... paths) {
return paths;
}
@@ -2425,10 +2425,10 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes
workerMapFld.setAccessible(true);
// Wait for all workers to finish.
- Map<GridGgfsPath, GridGgfsFileWorker> workerMap =
- (Map<GridGgfsPath, GridGgfsFileWorker>)workerMapFld.get(ggfs);
+ Map<IgniteFsPath, GridGgfsFileWorker> workerMap =
+ (Map<IgniteFsPath, GridGgfsFileWorker>)workerMapFld.get(ggfs);
- for (Map.Entry<GridGgfsPath, GridGgfsFileWorker> entry : workerMap.entrySet()) {
+ for (Map.Entry<IgniteFsPath, GridGgfsFileWorker> entry : workerMap.entrySet()) {
entry.getValue().cancel();
U.join(entry.getValue());
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f3d93762/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsDataManagerSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsDataManagerSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsDataManagerSelfTest.java
index c3dc4fc..7d5d494 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsDataManagerSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsDataManagerSelfTest.java
@@ -148,7 +148,7 @@ public class GridGgfsDataManagerSelfTest extends GridGgfsCommonAbstractTest {
@SuppressWarnings("ConstantConditions")
public void testDataStoring() throws Exception {
for (int i = 0; i < 10; i++) {
- GridGgfsPath path = new GridGgfsPath();
+ IgniteFsPath path = new IgniteFsPath();
GridGgfsFileInfo info = new GridGgfsFileInfo(200, null, false, null);
assertNull(mgr.dataBlock(info, path, 0, null).get());
@@ -229,7 +229,7 @@ public class GridGgfsDataManagerSelfTest extends GridGgfsCommonAbstractTest {
final int blockSize = GGFS_BLOCK_SIZE;
for (int i = 0; i < 10; i++) {
- GridGgfsPath path = new GridGgfsPath();
+ IgniteFsPath path = new IgniteFsPath();
GridGgfsFileInfo info = new GridGgfsFileInfo(blockSize, null, false, null);
assertNull(mgr.dataBlock(info, path, 0, null).get());
@@ -316,7 +316,7 @@ public class GridGgfsDataManagerSelfTest extends GridGgfsCommonAbstractTest {
final int writesCnt = 64;
for (int i = 0; i < 10; i++) {
- GridGgfsPath path = new GridGgfsPath();
+ IgniteFsPath path = new IgniteFsPath();
GridGgfsFileInfo info = new GridGgfsFileInfo(blockSize, null, false, null);
GridGgfsFileAffinityRange range = new GridGgfsFileAffinityRange();
@@ -388,17 +388,17 @@ public class GridGgfsDataManagerSelfTest extends GridGgfsCommonAbstractTest {
GridGgfsFileInfo info = new GridGgfsFileInfo(blockSize, 1024 * 1024, null, null, false, null);
for (int pos = 0; pos < 5 * grpSize; pos++) {
- assertEquals("Expects no affinity for zero length.", Collections.<GridGgfsBlockLocation>emptyList(),
+ assertEquals("Expects no affinity for zero length.", Collections.<IgniteFsBlockLocation>emptyList(),
mgr.affinity(info, pos, 0));
// Expects grouped data blocks are interpreted as a single block location.
// And no guaranties for blocks out of the group.
for (int len = 1, maxLen = grpSize - pos % grpSize; len < maxLen; len++) {
- Collection<GridGgfsBlockLocation> aff = mgr.affinity(info, pos, len);
+ Collection<IgniteFsBlockLocation> aff = mgr.affinity(info, pos, len);
assertEquals("Unexpected affinity: " + aff, 1, aff.size());
- GridGgfsBlockLocation loc = F.first(aff);
+ IgniteFsBlockLocation loc = F.first(aff);
assertEquals("Unexpected block location: " + loc, pos, loc.start());
assertEquals("Unexpected block location: " + loc, len, loc.length());
@@ -406,11 +406,11 @@ public class GridGgfsDataManagerSelfTest extends GridGgfsCommonAbstractTest {
// Validate ranges.
for (int len = grpSize * 4 + 1, maxLen = 5 * grpSize - pos % grpSize; len < maxLen; len++) {
- Collection<GridGgfsBlockLocation> aff = mgr.affinity(info, pos, len);
+ Collection<IgniteFsBlockLocation> aff = mgr.affinity(info, pos, len);
assertTrue("Unexpected affinity [aff=" + aff + ", pos=" + pos + ", len=" + len + ']', aff.size() <= 5);
- GridGgfsBlockLocation first = F.first(aff);
+ IgniteFsBlockLocation first = F.first(aff);
assertEquals("Unexpected the first block location [aff=" + aff + ", pos=" + pos + ", len=" + len + ']',
pos, first.start());
@@ -418,7 +418,7 @@ public class GridGgfsDataManagerSelfTest extends GridGgfsCommonAbstractTest {
assertTrue("Unexpected the first block location [aff=" + aff + ", pos=" + pos + ", len=" + len + ']',
first.length() >= grpSize - pos % grpSize);
- GridGgfsBlockLocation last = F.last(aff);
+ IgniteFsBlockLocation last = F.last(aff);
assertTrue("Unexpected the last block location [aff=" + aff + ", pos=" + pos + ", len=" + len + ']',
last.start() <= (pos / grpSize + 4) * grpSize);
@@ -435,9 +435,9 @@ public class GridGgfsDataManagerSelfTest extends GridGgfsCommonAbstractTest {
GridGgfsFileInfo info = new GridGgfsFileInfo(blockSize, 1024 * 1024, null, null, false, null);
- Collection<GridGgfsBlockLocation> affinity = mgr.affinity(info, 0, info.length());
+ Collection<IgniteFsBlockLocation> affinity = mgr.affinity(info, 0, info.length());
- for (GridGgfsBlockLocation loc : affinity) {
+ for (IgniteFsBlockLocation loc : affinity) {
info("Going to check GGFS block location: " + loc);
int block = (int)(loc.start() / blockSize);
@@ -475,7 +475,7 @@ public class GridGgfsDataManagerSelfTest extends GridGgfsCommonAbstractTest {
info.fileMap(map);
- Collection<GridGgfsBlockLocation> affinity = mgr.affinity(info, 0, info.length());
+ Collection<IgniteFsBlockLocation> affinity = mgr.affinity(info, 0, info.length());
checkAffinity(blockSize, info, affinity);
@@ -507,10 +507,10 @@ public class GridGgfsDataManagerSelfTest extends GridGgfsCommonAbstractTest {
* @param info File info.
* @param affinity Affinity block locations to check.
*/
- private void checkAffinity(int blockSize, GridGgfsFileInfo info, Iterable<GridGgfsBlockLocation> affinity) {
+ private void checkAffinity(int blockSize, GridGgfsFileInfo info, Iterable<IgniteFsBlockLocation> affinity) {
GridCache<Object, Object> dataCache = grid(0).cachex(DATA_CACHE_NAME);
- for (GridGgfsBlockLocation loc : affinity) {
+ for (IgniteFsBlockLocation loc : affinity) {
info("Going to check GGFS block location: " + loc);
int block = (int)(loc.start() / blockSize);