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:36 UTC
[09/38] incubator-ignite git commit: # Renaming
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f3d93762/modules/hadoop/src/main/java/org/gridgain/grid/kernal/ggfs/hadoop/GridGgfsHadoopInProc.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/gridgain/grid/kernal/ggfs/hadoop/GridGgfsHadoopInProc.java b/modules/hadoop/src/main/java/org/gridgain/grid/kernal/ggfs/hadoop/GridGgfsHadoopInProc.java
index 9a2cd96..b09fc5c 100644
--- a/modules/hadoop/src/main/java/org/gridgain/grid/kernal/ggfs/hadoop/GridGgfsHadoopInProc.java
+++ b/modules/hadoop/src/main/java/org/gridgain/grid/kernal/ggfs/hadoop/GridGgfsHadoopInProc.java
@@ -72,7 +72,7 @@ public class GridGgfsHadoopInProc implements GridGgfsHadoopEx {
}
/** {@inheritDoc} */
- @Override public GridGgfsFile info(GridGgfsPath path) throws GridException {
+ @Override public GridGgfsFile info(IgniteFsPath path) throws GridException {
try {
return ggfs.info(path);
}
@@ -82,7 +82,7 @@ public class GridGgfsHadoopInProc implements GridGgfsHadoopEx {
}
/** {@inheritDoc} */
- @Override public GridGgfsFile update(GridGgfsPath path, Map<String, String> props) throws GridException {
+ @Override public GridGgfsFile update(IgniteFsPath path, Map<String, String> props) throws GridException {
try {
return ggfs.update(path, props);
}
@@ -92,7 +92,7 @@ public class GridGgfsHadoopInProc implements GridGgfsHadoopEx {
}
/** {@inheritDoc} */
- @Override public Boolean setTimes(GridGgfsPath path, long accessTime, long modificationTime) throws GridException {
+ @Override public Boolean setTimes(IgniteFsPath path, long accessTime, long modificationTime) throws GridException {
try {
ggfs.setTimes(path, accessTime, modificationTime);
@@ -105,7 +105,7 @@ public class GridGgfsHadoopInProc implements GridGgfsHadoopEx {
}
/** {@inheritDoc} */
- @Override public Boolean rename(GridGgfsPath src, GridGgfsPath dest) throws GridException {
+ @Override public Boolean rename(IgniteFsPath src, IgniteFsPath dest) throws GridException {
try {
ggfs.rename(src, dest);
@@ -117,7 +117,7 @@ public class GridGgfsHadoopInProc implements GridGgfsHadoopEx {
}
/** {@inheritDoc} */
- @Override public Boolean delete(GridGgfsPath path, boolean recursive) throws GridException {
+ @Override public Boolean delete(IgniteFsPath path, boolean recursive) throws GridException {
try {
return ggfs.delete(path, recursive);
}
@@ -138,7 +138,7 @@ public class GridGgfsHadoopInProc implements GridGgfsHadoopEx {
}
/** {@inheritDoc} */
- @Override public Collection<GridGgfsPath> listPaths(GridGgfsPath path) throws GridException {
+ @Override public Collection<IgniteFsPath> listPaths(IgniteFsPath path) throws GridException {
try {
return ggfs.listPaths(path);
}
@@ -148,7 +148,7 @@ public class GridGgfsHadoopInProc implements GridGgfsHadoopEx {
}
/** {@inheritDoc} */
- @Override public Collection<GridGgfsFile> listFiles(GridGgfsPath path) throws GridException {
+ @Override public Collection<GridGgfsFile> listFiles(IgniteFsPath path) throws GridException {
try {
return ggfs.listFiles(path);
}
@@ -158,7 +158,7 @@ public class GridGgfsHadoopInProc implements GridGgfsHadoopEx {
}
/** {@inheritDoc} */
- @Override public Boolean mkdirs(GridGgfsPath path, Map<String, String> props) throws GridException {
+ @Override public Boolean mkdirs(IgniteFsPath path, Map<String, String> props) throws GridException {
try {
ggfs.mkdirs(path, props);
@@ -171,7 +171,7 @@ public class GridGgfsHadoopInProc implements GridGgfsHadoopEx {
}
/** {@inheritDoc} */
- @Override public GridGgfsPathSummary contentSummary(GridGgfsPath path) throws GridException {
+ @Override public IgniteFsPathSummary contentSummary(IgniteFsPath path) throws GridException {
try {
return ggfs.summary(path);
}
@@ -182,7 +182,7 @@ public class GridGgfsHadoopInProc implements GridGgfsHadoopEx {
}
/** {@inheritDoc} */
- @Override public Collection<GridGgfsBlockLocation> affinity(GridGgfsPath path, long start, long len)
+ @Override public Collection<IgniteFsBlockLocation> affinity(IgniteFsPath path, long start, long len)
throws GridException {
try {
return ggfs.affinity(path, start, len);
@@ -193,7 +193,7 @@ public class GridGgfsHadoopInProc implements GridGgfsHadoopEx {
}
/** {@inheritDoc} */
- @Override public GridGgfsHadoopStreamDelegate open(GridGgfsPath path) throws GridException {
+ @Override public GridGgfsHadoopStreamDelegate open(IgniteFsPath path) throws GridException {
try {
GridGgfsInputStreamAdapter stream = ggfs.open(path, bufSize);
@@ -205,7 +205,7 @@ public class GridGgfsHadoopInProc implements GridGgfsHadoopEx {
}
/** {@inheritDoc} */
- @Override public GridGgfsHadoopStreamDelegate open(GridGgfsPath path, int seqReadsBeforePrefetch)
+ @Override public GridGgfsHadoopStreamDelegate open(IgniteFsPath path, int seqReadsBeforePrefetch)
throws GridException {
try {
GridGgfsInputStreamAdapter stream = ggfs.open(path, bufSize, seqReadsBeforePrefetch);
@@ -218,7 +218,7 @@ public class GridGgfsHadoopInProc implements GridGgfsHadoopEx {
}
/** {@inheritDoc} */
- @Override public GridGgfsHadoopStreamDelegate create(GridGgfsPath path, boolean overwrite, boolean colocate,
+ @Override public GridGgfsHadoopStreamDelegate create(IgniteFsPath path, boolean overwrite, boolean colocate,
int replication, long blockSize, @Nullable Map<String, String> props) throws GridException {
try {
GridGgfsOutputStream stream = ggfs.create(path, bufSize, overwrite,
@@ -232,7 +232,7 @@ public class GridGgfsHadoopInProc implements GridGgfsHadoopEx {
}
/** {@inheritDoc} */
- @Override public GridGgfsHadoopStreamDelegate append(GridGgfsPath path, boolean create,
+ @Override public GridGgfsHadoopStreamDelegate append(IgniteFsPath path, boolean create,
@Nullable Map<String, String> props) throws GridException {
try {
GridGgfsOutputStream stream = ggfs.append(path, bufSize, create, props);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f3d93762/modules/hadoop/src/main/java/org/gridgain/grid/kernal/ggfs/hadoop/GridGgfsHadoopOutProc.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/gridgain/grid/kernal/ggfs/hadoop/GridGgfsHadoopOutProc.java b/modules/hadoop/src/main/java/org/gridgain/grid/kernal/ggfs/hadoop/GridGgfsHadoopOutProc.java
index c516e5c..194a217 100644
--- a/modules/hadoop/src/main/java/org/gridgain/grid/kernal/ggfs/hadoop/GridGgfsHadoopOutProc.java
+++ b/modules/hadoop/src/main/java/org/gridgain/grid/kernal/ggfs/hadoop/GridGgfsHadoopOutProc.java
@@ -54,15 +54,15 @@ public class GridGgfsHadoopOutProc implements GridGgfsHadoopEx, GridGgfsHadoopIp
/** Expected result is {@code GridGgfsFile}. */
private static final GridPlainClosure<GridPlainFuture<GridGgfsMessage>,
- Collection<GridGgfsPath>> PATH_COL_RES = createClosure();
+ Collection<IgniteFsPath>> PATH_COL_RES = createClosure();
/** Expected result is {@code GridGgfsPathSummary}. */
- private static final GridPlainClosure<GridPlainFuture<GridGgfsMessage>, GridGgfsPathSummary> SUMMARY_RES =
+ private static final GridPlainClosure<GridPlainFuture<GridGgfsMessage>, IgniteFsPathSummary> SUMMARY_RES =
createClosure();
/** Expected result is {@code GridGgfsFile}. */
private static final GridPlainClosure<GridPlainFuture<GridGgfsMessage>,
- Collection<GridGgfsBlockLocation>> BLOCK_LOCATION_COL_RES = createClosure();
+ Collection<IgniteFsBlockLocation>> BLOCK_LOCATION_COL_RES = createClosure();
/** Grid name. */
private final String grid;
@@ -157,7 +157,7 @@ public class GridGgfsHadoopOutProc implements GridGgfsHadoopEx, GridGgfsHadoopIp
}
/** {@inheritDoc} */
- @Override public GridGgfsFile info(GridGgfsPath path) throws GridException {
+ @Override public GridGgfsFile info(IgniteFsPath path) throws GridException {
final GridGgfsPathControlRequest msg = new GridGgfsPathControlRequest();
msg.command(INFO);
@@ -167,7 +167,7 @@ public class GridGgfsHadoopOutProc implements GridGgfsHadoopEx, GridGgfsHadoopIp
}
/** {@inheritDoc} */
- @Override public GridGgfsFile update(GridGgfsPath path, Map<String, String> props) throws GridException {
+ @Override public GridGgfsFile update(IgniteFsPath path, Map<String, String> props) throws GridException {
final GridGgfsPathControlRequest msg = new GridGgfsPathControlRequest();
msg.command(UPDATE);
@@ -178,7 +178,7 @@ public class GridGgfsHadoopOutProc implements GridGgfsHadoopEx, GridGgfsHadoopIp
}
/** {@inheritDoc} */
- @Override public Boolean setTimes(GridGgfsPath path, long accessTime, long modificationTime) throws GridException {
+ @Override public Boolean setTimes(IgniteFsPath path, long accessTime, long modificationTime) throws GridException {
final GridGgfsPathControlRequest msg = new GridGgfsPathControlRequest();
msg.command(SET_TIMES);
@@ -190,7 +190,7 @@ public class GridGgfsHadoopOutProc implements GridGgfsHadoopEx, GridGgfsHadoopIp
}
/** {@inheritDoc} */
- @Override public Boolean rename(GridGgfsPath src, GridGgfsPath dest) throws GridException {
+ @Override public Boolean rename(IgniteFsPath src, IgniteFsPath dest) throws GridException {
final GridGgfsPathControlRequest msg = new GridGgfsPathControlRequest();
msg.command(RENAME);
@@ -201,7 +201,7 @@ public class GridGgfsHadoopOutProc implements GridGgfsHadoopEx, GridGgfsHadoopIp
}
/** {@inheritDoc} */
- @Override public Boolean delete(GridGgfsPath path, boolean recursive) throws GridException {
+ @Override public Boolean delete(IgniteFsPath path, boolean recursive) throws GridException {
final GridGgfsPathControlRequest msg = new GridGgfsPathControlRequest();
msg.command(DELETE);
@@ -212,7 +212,7 @@ public class GridGgfsHadoopOutProc implements GridGgfsHadoopEx, GridGgfsHadoopIp
}
/** {@inheritDoc} */
- @Override public Collection<GridGgfsBlockLocation> affinity(GridGgfsPath path, long start, long len)
+ @Override public Collection<IgniteFsBlockLocation> affinity(IgniteFsPath path, long start, long len)
throws GridException {
final GridGgfsPathControlRequest msg = new GridGgfsPathControlRequest();
@@ -225,7 +225,7 @@ public class GridGgfsHadoopOutProc implements GridGgfsHadoopEx, GridGgfsHadoopIp
}
/** {@inheritDoc} */
- @Override public GridGgfsPathSummary contentSummary(GridGgfsPath path) throws GridException {
+ @Override public IgniteFsPathSummary contentSummary(IgniteFsPath path) throws GridException {
final GridGgfsPathControlRequest msg = new GridGgfsPathControlRequest();
msg.command(PATH_SUMMARY);
@@ -235,7 +235,7 @@ public class GridGgfsHadoopOutProc implements GridGgfsHadoopEx, GridGgfsHadoopIp
}
/** {@inheritDoc} */
- @Override public Boolean mkdirs(GridGgfsPath path, Map<String, String> props) throws GridException {
+ @Override public Boolean mkdirs(IgniteFsPath path, Map<String, String> props) throws GridException {
final GridGgfsPathControlRequest msg = new GridGgfsPathControlRequest();
msg.command(MAKE_DIRECTORIES);
@@ -246,7 +246,7 @@ public class GridGgfsHadoopOutProc implements GridGgfsHadoopEx, GridGgfsHadoopIp
}
/** {@inheritDoc} */
- @Override public Collection<GridGgfsFile> listFiles(GridGgfsPath path) throws GridException {
+ @Override public Collection<GridGgfsFile> listFiles(IgniteFsPath path) throws GridException {
final GridGgfsPathControlRequest msg = new GridGgfsPathControlRequest();
msg.command(LIST_FILES);
@@ -256,7 +256,7 @@ public class GridGgfsHadoopOutProc implements GridGgfsHadoopEx, GridGgfsHadoopIp
}
/** {@inheritDoc} */
- @Override public Collection<GridGgfsPath> listPaths(GridGgfsPath path) throws GridException {
+ @Override public Collection<IgniteFsPath> listPaths(IgniteFsPath path) throws GridException {
final GridGgfsPathControlRequest msg = new GridGgfsPathControlRequest();
msg.command(LIST_PATHS);
@@ -271,7 +271,7 @@ public class GridGgfsHadoopOutProc implements GridGgfsHadoopEx, GridGgfsHadoopIp
}
/** {@inheritDoc} */
- @Override public GridGgfsHadoopStreamDelegate open(GridGgfsPath path) throws GridException {
+ @Override public GridGgfsHadoopStreamDelegate open(IgniteFsPath path) throws GridException {
final GridGgfsPathControlRequest msg = new GridGgfsPathControlRequest();
msg.command(OPEN_READ);
@@ -284,7 +284,7 @@ public class GridGgfsHadoopOutProc implements GridGgfsHadoopEx, GridGgfsHadoopIp
}
/** {@inheritDoc} */
- @Override public GridGgfsHadoopStreamDelegate open(GridGgfsPath path,
+ @Override public GridGgfsHadoopStreamDelegate open(IgniteFsPath path,
int seqReadsBeforePrefetch) throws GridException {
final GridGgfsPathControlRequest msg = new GridGgfsPathControlRequest();
@@ -299,7 +299,7 @@ public class GridGgfsHadoopOutProc implements GridGgfsHadoopEx, GridGgfsHadoopIp
}
/** {@inheritDoc} */
- @Override public GridGgfsHadoopStreamDelegate create(GridGgfsPath path, boolean overwrite, boolean colocate,
+ @Override public GridGgfsHadoopStreamDelegate create(IgniteFsPath path, boolean overwrite, boolean colocate,
int replication, long blockSize, @Nullable Map<String, String> props) throws GridException {
final GridGgfsPathControlRequest msg = new GridGgfsPathControlRequest();
@@ -317,7 +317,7 @@ public class GridGgfsHadoopOutProc implements GridGgfsHadoopEx, GridGgfsHadoopIp
}
/** {@inheritDoc} */
- @Override public GridGgfsHadoopStreamDelegate append(GridGgfsPath path, boolean create,
+ @Override public GridGgfsHadoopStreamDelegate append(IgniteFsPath path, boolean create,
@Nullable Map<String, String> props) throws GridException {
final GridGgfsPathControlRequest msg = new GridGgfsPathControlRequest();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f3d93762/modules/hadoop/src/main/java/org/gridgain/grid/kernal/ggfs/hadoop/GridGgfsHadoopReader.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/gridgain/grid/kernal/ggfs/hadoop/GridGgfsHadoopReader.java b/modules/hadoop/src/main/java/org/gridgain/grid/kernal/ggfs/hadoop/GridGgfsHadoopReader.java
index efc54c1..4a73fcf 100644
--- a/modules/hadoop/src/main/java/org/gridgain/grid/kernal/ggfs/hadoop/GridGgfsHadoopReader.java
+++ b/modules/hadoop/src/main/java/org/gridgain/grid/kernal/ggfs/hadoop/GridGgfsHadoopReader.java
@@ -21,7 +21,7 @@ import java.io.*;
* <p>
* The class is expected to be used only from synchronized context and therefore is not tread-safe.
*/
-public class GridGgfsHadoopReader implements GridGgfsReader {
+public class GridGgfsHadoopReader implements IgniteFsReader {
/** Secondary file system. */
private final FileSystem fs;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f3d93762/modules/hadoop/src/main/java/org/gridgain/grid/kernal/ggfs/hadoop/GridGgfsHadoopUtils.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/gridgain/grid/kernal/ggfs/hadoop/GridGgfsHadoopUtils.java b/modules/hadoop/src/main/java/org/gridgain/grid/kernal/ggfs/hadoop/GridGgfsHadoopUtils.java
index 3e90f80..f54dbfb 100644
--- a/modules/hadoop/src/main/java/org/gridgain/grid/kernal/ggfs/hadoop/GridGgfsHadoopUtils.java
+++ b/modules/hadoop/src/main/java/org/gridgain/grid/kernal/ggfs/hadoop/GridGgfsHadoopUtils.java
@@ -108,7 +108,7 @@ public class GridGgfsHadoopUtils {
return new ParentNotDirectoryException(path);
else if (path != null && e instanceof GridGgfsDirectoryNotEmptyException)
return new PathIsNotEmptyDirectoryException(path);
- else if (path != null && e instanceof GridGgfsPathAlreadyExistsException)
+ else if (path != null && e instanceof IgniteFsPathAlreadyExistsException)
return new PathExistsException(path);
else
return new IOException(e);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f3d93762/modules/hadoop/src/main/java/org/gridgain/grid/kernal/ggfs/hadoop/GridGgfsHadoopWrapper.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/gridgain/grid/kernal/ggfs/hadoop/GridGgfsHadoopWrapper.java b/modules/hadoop/src/main/java/org/gridgain/grid/kernal/ggfs/hadoop/GridGgfsHadoopWrapper.java
index 98751ac..4fff807 100644
--- a/modules/hadoop/src/main/java/org/gridgain/grid/kernal/ggfs/hadoop/GridGgfsHadoopWrapper.java
+++ b/modules/hadoop/src/main/java/org/gridgain/grid/kernal/ggfs/hadoop/GridGgfsHadoopWrapper.java
@@ -88,7 +88,7 @@ public class GridGgfsHadoopWrapper implements GridGgfsHadoop {
}
/** {@inheritDoc} */
- @Override public GridGgfsFile info(final GridGgfsPath path) throws IOException {
+ @Override public GridGgfsFile info(final IgniteFsPath path) throws IOException {
return withReconnectHandling(new FileSystemClosure<GridGgfsFile>() {
@Override public GridGgfsFile apply(GridGgfsHadoopEx hadoop, GridGgfsHandshakeResponse hndResp)
throws GridException, IOException {
@@ -98,7 +98,7 @@ public class GridGgfsHadoopWrapper implements GridGgfsHadoop {
}
/** {@inheritDoc} */
- @Override public GridGgfsFile update(final GridGgfsPath path, final Map<String, String> props) throws IOException {
+ @Override public GridGgfsFile update(final IgniteFsPath path, final Map<String, String> props) throws IOException {
return withReconnectHandling(new FileSystemClosure<GridGgfsFile>() {
@Override public GridGgfsFile apply(GridGgfsHadoopEx hadoop, GridGgfsHandshakeResponse hndResp)
throws GridException, IOException {
@@ -108,7 +108,7 @@ public class GridGgfsHadoopWrapper implements GridGgfsHadoop {
}
/** {@inheritDoc} */
- @Override public Boolean setTimes(final GridGgfsPath path, final long accessTime, final long modificationTime)
+ @Override public Boolean setTimes(final IgniteFsPath path, final long accessTime, final long modificationTime)
throws IOException {
return withReconnectHandling(new FileSystemClosure<Boolean>() {
@Override public Boolean apply(GridGgfsHadoopEx hadoop, GridGgfsHandshakeResponse hndResp)
@@ -119,7 +119,7 @@ public class GridGgfsHadoopWrapper implements GridGgfsHadoop {
}
/** {@inheritDoc} */
- @Override public Boolean rename(final GridGgfsPath src, final GridGgfsPath dest) throws IOException {
+ @Override public Boolean rename(final IgniteFsPath src, final IgniteFsPath dest) throws IOException {
return withReconnectHandling(new FileSystemClosure<Boolean>() {
@Override public Boolean apply(GridGgfsHadoopEx hadoop, GridGgfsHandshakeResponse hndResp)
throws GridException, IOException {
@@ -129,7 +129,7 @@ public class GridGgfsHadoopWrapper implements GridGgfsHadoop {
}
/** {@inheritDoc} */
- @Override public Boolean delete(final GridGgfsPath path, final boolean recursive) throws IOException {
+ @Override public Boolean delete(final IgniteFsPath path, final boolean recursive) throws IOException {
return withReconnectHandling(new FileSystemClosure<Boolean>() {
@Override public Boolean apply(GridGgfsHadoopEx hadoop, GridGgfsHandshakeResponse hndResp)
throws GridException, IOException {
@@ -139,10 +139,10 @@ public class GridGgfsHadoopWrapper implements GridGgfsHadoop {
}
/** {@inheritDoc} */
- @Override public Collection<GridGgfsBlockLocation> affinity(final GridGgfsPath path, final long start,
+ @Override public Collection<IgniteFsBlockLocation> affinity(final IgniteFsPath path, final long start,
final long len) throws IOException {
- return withReconnectHandling(new FileSystemClosure<Collection<GridGgfsBlockLocation>>() {
- @Override public Collection<GridGgfsBlockLocation> apply(GridGgfsHadoopEx hadoop,
+ return withReconnectHandling(new FileSystemClosure<Collection<IgniteFsBlockLocation>>() {
+ @Override public Collection<IgniteFsBlockLocation> apply(GridGgfsHadoopEx hadoop,
GridGgfsHandshakeResponse hndResp) throws GridException, IOException {
return hadoop.affinity(path, start, len);
}
@@ -150,9 +150,9 @@ public class GridGgfsHadoopWrapper implements GridGgfsHadoop {
}
/** {@inheritDoc} */
- @Override public GridGgfsPathSummary contentSummary(final GridGgfsPath path) throws IOException {
- return withReconnectHandling(new FileSystemClosure<GridGgfsPathSummary>() {
- @Override public GridGgfsPathSummary apply(GridGgfsHadoopEx hadoop, GridGgfsHandshakeResponse hndResp)
+ @Override public IgniteFsPathSummary contentSummary(final IgniteFsPath path) throws IOException {
+ return withReconnectHandling(new FileSystemClosure<IgniteFsPathSummary>() {
+ @Override public IgniteFsPathSummary apply(GridGgfsHadoopEx hadoop, GridGgfsHandshakeResponse hndResp)
throws GridException, IOException {
return hadoop.contentSummary(path);
}
@@ -160,7 +160,7 @@ public class GridGgfsHadoopWrapper implements GridGgfsHadoop {
}
/** {@inheritDoc} */
- @Override public Boolean mkdirs(final GridGgfsPath path, final Map<String, String> props) throws IOException {
+ @Override public Boolean mkdirs(final IgniteFsPath path, final Map<String, String> props) throws IOException {
return withReconnectHandling(new FileSystemClosure<Boolean>() {
@Override public Boolean apply(GridGgfsHadoopEx hadoop, GridGgfsHandshakeResponse hndResp)
throws GridException, IOException {
@@ -170,7 +170,7 @@ public class GridGgfsHadoopWrapper implements GridGgfsHadoop {
}
/** {@inheritDoc} */
- @Override public Collection<GridGgfsFile> listFiles(final GridGgfsPath path) throws IOException {
+ @Override public Collection<GridGgfsFile> listFiles(final IgniteFsPath path) throws IOException {
return withReconnectHandling(new FileSystemClosure<Collection<GridGgfsFile>>() {
@Override public Collection<GridGgfsFile> apply(GridGgfsHadoopEx hadoop,
GridGgfsHandshakeResponse hndResp) throws GridException, IOException {
@@ -180,9 +180,9 @@ public class GridGgfsHadoopWrapper implements GridGgfsHadoop {
}
/** {@inheritDoc} */
- @Override public Collection<GridGgfsPath> listPaths(final GridGgfsPath path) throws IOException {
- return withReconnectHandling(new FileSystemClosure<Collection<GridGgfsPath>>() {
- @Override public Collection<GridGgfsPath> apply(GridGgfsHadoopEx hadoop,
+ @Override public Collection<IgniteFsPath> listPaths(final IgniteFsPath path) throws IOException {
+ return withReconnectHandling(new FileSystemClosure<Collection<IgniteFsPath>>() {
+ @Override public Collection<IgniteFsPath> apply(GridGgfsHadoopEx hadoop,
GridGgfsHandshakeResponse hndResp) throws GridException, IOException {
return hadoop.listPaths(path);
}
@@ -200,7 +200,7 @@ public class GridGgfsHadoopWrapper implements GridGgfsHadoop {
}
/** {@inheritDoc} */
- @Override public GridGgfsHadoopStreamDelegate open(final GridGgfsPath path) throws IOException {
+ @Override public GridGgfsHadoopStreamDelegate open(final IgniteFsPath path) throws IOException {
return withReconnectHandling(new FileSystemClosure<GridGgfsHadoopStreamDelegate>() {
@Override public GridGgfsHadoopStreamDelegate apply(GridGgfsHadoopEx hadoop,
GridGgfsHandshakeResponse hndResp) throws GridException, IOException {
@@ -210,7 +210,7 @@ public class GridGgfsHadoopWrapper implements GridGgfsHadoop {
}
/** {@inheritDoc} */
- @Override public GridGgfsHadoopStreamDelegate open(final GridGgfsPath path, final int seqReadsBeforePrefetch)
+ @Override public GridGgfsHadoopStreamDelegate open(final IgniteFsPath path, final int seqReadsBeforePrefetch)
throws IOException {
return withReconnectHandling(new FileSystemClosure<GridGgfsHadoopStreamDelegate>() {
@Override public GridGgfsHadoopStreamDelegate apply(GridGgfsHadoopEx hadoop,
@@ -221,7 +221,7 @@ public class GridGgfsHadoopWrapper implements GridGgfsHadoop {
}
/** {@inheritDoc} */
- @Override public GridGgfsHadoopStreamDelegate create(final GridGgfsPath path, final boolean overwrite,
+ @Override public GridGgfsHadoopStreamDelegate create(final IgniteFsPath path, final boolean overwrite,
final boolean colocate, final int replication, final long blockSize, @Nullable final Map<String, String> props)
throws IOException {
return withReconnectHandling(new FileSystemClosure<GridGgfsHadoopStreamDelegate>() {
@@ -233,7 +233,7 @@ public class GridGgfsHadoopWrapper implements GridGgfsHadoop {
}
/** {@inheritDoc} */
- @Override public GridGgfsHadoopStreamDelegate append(final GridGgfsPath path, final boolean create,
+ @Override public GridGgfsHadoopStreamDelegate append(final IgniteFsPath path, final boolean create,
@Nullable final Map<String, String> props) throws IOException {
return withReconnectHandling(new FileSystemClosure<GridGgfsHadoopStreamDelegate>() {
@Override public GridGgfsHadoopStreamDelegate apply(GridGgfsHadoopEx hadoop,
@@ -262,7 +262,7 @@ public class GridGgfsHadoopWrapper implements GridGgfsHadoop {
* @return Result.
* @throws IOException If failed.
*/
- private <T> T withReconnectHandling(final FileSystemClosure<T> clo, @Nullable GridGgfsPath path)
+ private <T> T withReconnectHandling(final FileSystemClosure<T> clo, @Nullable IgniteFsPath path)
throws IOException {
Exception err = null;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f3d93762/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/planner/GridHadoopDefaultMapReducePlanner.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/planner/GridHadoopDefaultMapReducePlanner.java b/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/planner/GridHadoopDefaultMapReducePlanner.java
index ffd14f6..74e73a8 100644
--- a/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/planner/GridHadoopDefaultMapReducePlanner.java
+++ b/modules/hadoop/src/main/java/org/gridgain/grid/kernal/processors/hadoop/planner/GridHadoopDefaultMapReducePlanner.java
@@ -154,7 +154,7 @@ public class GridHadoopDefaultMapReducePlanner implements GridHadoopMapReducePla
ggfs = (GridGgfsEx) ((GridEx) ignite).ggfsx(endpoint.ggfs());
if (ggfs != null && !ggfs.isProxy(split0.file())) {
- Collection<GridGgfsBlockLocation> blocks = ggfs.affinity(new GridGgfsPath(split0.file()),
+ Collection<IgniteFsBlockLocation> blocks = ggfs.affinity(new IgniteFsPath(split0.file()),
split0.start(), split0.length());
assert blocks != null;
@@ -169,7 +169,7 @@ public class GridHadoopDefaultMapReducePlanner implements GridHadoopMapReducePla
List<UUID> bestNodeIds = null;
long bestLen = -1L;
- for (GridGgfsBlockLocation block : blocks) {
+ for (IgniteFsBlockLocation block : blocks) {
for (UUID blockNodeId : block.nodeIds()) {
if (topIds.contains(blockNodeId)) {
Long oldLen = nodeMap.get(blockNodeId);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f3d93762/modules/hadoop/src/test/java/org/gridgain/client/hadoop/GridHadoopClientProtocolSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/gridgain/client/hadoop/GridHadoopClientProtocolSelfTest.java b/modules/hadoop/src/test/java/org/gridgain/client/hadoop/GridHadoopClientProtocolSelfTest.java
index 7f84e13..dda947f 100644
--- a/modules/hadoop/src/test/java/org/gridgain/client/hadoop/GridHadoopClientProtocolSelfTest.java
+++ b/modules/hadoop/src/test/java/org/gridgain/client/hadoop/GridHadoopClientProtocolSelfTest.java
@@ -144,10 +144,10 @@ public class GridHadoopClientProtocolSelfTest extends GridHadoopAbstractSelfTest
public void testJobCounters() throws Exception {
IgniteFs ggfs = grid(0).fileSystem(GridHadoopAbstractSelfTest.ggfsName);
- ggfs.mkdirs(new GridGgfsPath(PATH_INPUT));
+ ggfs.mkdirs(new IgniteFsPath(PATH_INPUT));
try (BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(ggfs.create(
- new GridGgfsPath(PATH_INPUT + "/test.file"), true)))) {
+ new IgniteFsPath(PATH_INPUT + "/test.file"), true)))) {
bw.write(
"alpha\n" +
@@ -262,10 +262,10 @@ public class GridHadoopClientProtocolSelfTest extends GridHadoopAbstractSelfTest
public void checkJobSubmit(boolean noCombiners, boolean noReducers) throws Exception {
IgniteFs ggfs = grid(0).fileSystem(GridHadoopAbstractSelfTest.ggfsName);
- ggfs.mkdirs(new GridGgfsPath(PATH_INPUT));
+ ggfs.mkdirs(new IgniteFsPath(PATH_INPUT));
try (BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(ggfs.create(
- new GridGgfsPath(PATH_INPUT + "/test.file"), true)))) {
+ new IgniteFsPath(PATH_INPUT + "/test.file"), true)))) {
bw.write("word");
}
@@ -381,7 +381,7 @@ public class GridHadoopClientProtocolSelfTest extends GridHadoopAbstractSelfTest
assert jobStatus.getMapProgress() == 1.0f;
assert jobStatus.getReduceProgress() == 1.0f;
- dumpGgfs(ggfs, new GridGgfsPath(PATH_OUTPUT));
+ dumpGgfs(ggfs, new IgniteFsPath(PATH_OUTPUT));
}
/**
@@ -392,7 +392,7 @@ public class GridHadoopClientProtocolSelfTest extends GridHadoopAbstractSelfTest
* @throws Exception If failed.
*/
@SuppressWarnings("ConstantConditions")
- private static void dumpGgfs(IgniteFs ggfs, GridGgfsPath path) throws Exception {
+ private static void dumpGgfs(IgniteFs ggfs, IgniteFsPath path) throws Exception {
GridGgfsFile file = ggfs.info(path);
assert file != null;
@@ -400,7 +400,7 @@ public class GridHadoopClientProtocolSelfTest extends GridHadoopAbstractSelfTest
System.out.println(file.path());
if (file.isDirectory()) {
- for (GridGgfsPath child : ggfs.listPaths(path))
+ for (IgniteFsPath child : ggfs.listPaths(path))
dumpGgfs(ggfs, child);
}
else {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f3d93762/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoop20FileSystemAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoop20FileSystemAbstractSelfTest.java b/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoop20FileSystemAbstractSelfTest.java
index 1fb40fb..8edd67f 100644
--- a/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoop20FileSystemAbstractSelfTest.java
+++ b/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoop20FileSystemAbstractSelfTest.java
@@ -1293,15 +1293,15 @@ public abstract class GridGgfsHadoop20FileSystemAbstractSelfTest extends GridGgf
IgniteFs igniteFs = grid(0).fileSystem("ggfs");
- GridGgfsPath filePath = new GridGgfsPath("/someFile");
+ IgniteFsPath filePath = new IgniteFsPath("/someFile");
GridGgfsFile fileInfo = igniteFs.info(filePath);
- Collection<GridGgfsBlockLocation> locations = igniteFs.affinity(filePath, 0, fileInfo.length());
+ Collection<IgniteFsBlockLocation> locations = igniteFs.affinity(filePath, 0, fileInfo.length());
assertEquals(1, locations.size());
- GridGgfsBlockLocation location = F.first(locations);
+ IgniteFsBlockLocation location = F.first(locations);
assertEquals(1, location.nodeIds().size());
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f3d93762/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopDualAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopDualAbstractSelfTest.java b/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopDualAbstractSelfTest.java
index 3c90a98..2528cd4 100644
--- a/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopDualAbstractSelfTest.java
+++ b/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopDualAbstractSelfTest.java
@@ -65,13 +65,13 @@ public abstract class GridGgfsHadoopDualAbstractSelfTest extends GridGgfsCommonA
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");
/** File. */
- protected static final GridGgfsPath FILE = new GridGgfsPath(SUBDIR, "file");
+ protected static final IgniteFsPath FILE = new IgniteFsPath(SUBDIR, "file");
/** Default data chunk (128 bytes). */
protected static byte[] chunk;
@@ -192,7 +192,7 @@ public abstract class GridGgfsHadoopDualAbstractSelfTest extends GridGgfsCommonA
* @param paths Paths to group.
* @return Paths as array.
*/
- protected GridGgfsPath[] paths(GridGgfsPath... paths) {
+ protected IgniteFsPath[] paths(IgniteFsPath... paths) {
return paths;
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f3d93762/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopFileSystemAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopFileSystemAbstractSelfTest.java b/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopFileSystemAbstractSelfTest.java
index 4fc262d..9300aaa 100644
--- a/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopFileSystemAbstractSelfTest.java
+++ b/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopFileSystemAbstractSelfTest.java
@@ -1532,15 +1532,15 @@ public abstract class GridGgfsHadoopFileSystemAbstractSelfTest extends GridGgfsC
IgniteFs igniteFs = grid(0).fileSystem("ggfs");
- GridGgfsPath filePath = new GridGgfsPath("/someFile");
+ IgniteFsPath filePath = new IgniteFsPath("/someFile");
GridGgfsFile fileInfo = igniteFs.info(filePath);
- Collection<GridGgfsBlockLocation> locations = igniteFs.affinity(filePath, 0, fileInfo.length());
+ Collection<IgniteFsBlockLocation> locations = igniteFs.affinity(filePath, 0, fileInfo.length());
assertEquals(1, locations.size());
- GridGgfsBlockLocation location = F.first(locations);
+ IgniteFsBlockLocation location = F.first(locations);
assertEquals(1, location.nodeIds().size());
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f3d93762/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopFileSystemClientSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopFileSystemClientSelfTest.java b/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopFileSystemClientSelfTest.java
index 2fd3a72..7095ded 100644
--- a/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopFileSystemClientSelfTest.java
+++ b/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopFileSystemClientSelfTest.java
@@ -120,7 +120,7 @@ public class GridGgfsHadoopFileSystemClientSelfTest extends GridGgfsCommonAbstra
client.handshake(null);
- GridGgfsPath path = new GridGgfsPath("/test1.file");
+ IgniteFsPath path = new IgniteFsPath("/test1.file");
GridGgfsHadoopStreamDelegate delegate = client.create(path, true, false, 1, 1024, null);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f3d93762/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopFileSystemHandshakeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopFileSystemHandshakeSelfTest.java b/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopFileSystemHandshakeSelfTest.java
index f51e85c..560b343 100644
--- a/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopFileSystemHandshakeSelfTest.java
+++ b/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopFileSystemHandshakeSelfTest.java
@@ -49,7 +49,7 @@ public class GridGgfsHadoopFileSystemHandshakeSelfTest extends GridGgfsCommonAbs
private static final String GGFS_NAME = "ggfs";
/** GGFS path. */
- private static final GridGgfsPath PATH = new GridGgfsPath("/path");
+ private static final IgniteFsPath PATH = new IgniteFsPath("/path");
/** {@inheritDoc} */
@Override protected void afterTest() throws Exception {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f3d93762/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopFileSystemLoggerSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopFileSystemLoggerSelfTest.java b/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopFileSystemLoggerSelfTest.java
index 6956bad..8edb6d6 100644
--- a/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopFileSystemLoggerSelfTest.java
+++ b/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopFileSystemLoggerSelfTest.java
@@ -30,7 +30,7 @@ public class GridGgfsHadoopFileSystemLoggerSelfTest extends GridGgfsCommonAbstra
private static final String PATH_STR_ESCAPED = PATH_STR.replace(';', '~');
/** Path. */
- private static final GridGgfsPath PATH = new GridGgfsPath(PATH_STR);
+ private static final IgniteFsPath PATH = new IgniteFsPath(PATH_STR);
/** GGFS name. */
private static final String GGFS_NAME = "ggfs";
@@ -196,7 +196,7 @@ public class GridGgfsHadoopFileSystemLoggerSelfTest extends GridGgfsCommonAbstra
String file2 = "/dir3/file1.test";
log.logMakeDirectory(PATH, PRIMARY);
- log.logRename(PATH, PRIMARY, new GridGgfsPath(newFile));
+ log.logRename(PATH, PRIMARY, new IgniteFsPath(newFile));
log.logListDirectory(PATH, PRIMARY, new String[] { file1, file2 });
log.logDelete(PATH, PRIMARY, false);
@@ -220,7 +220,7 @@ public class GridGgfsHadoopFileSystemLoggerSelfTest extends GridGgfsCommonAbstra
* @return GGFS file instance.
*/
private GridGgfsFile file(String path) {
- return new GridGgfsFileImpl(new GridGgfsPath(path), new GridGgfsFileInfo(), 64 * 1024 * 1024);
+ return new GridGgfsFileImpl(new IgniteFsPath(path), new GridGgfsFileInfo(), 64 * 1024 * 1024);
}
/**
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f3d93762/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopAbstractWordCountTest.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopAbstractWordCountTest.java b/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopAbstractWordCountTest.java
index 11aff60..66e2fd0 100644
--- a/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopAbstractWordCountTest.java
+++ b/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopAbstractWordCountTest.java
@@ -90,7 +90,7 @@ public abstract class GridHadoopAbstractWordCountTest extends GridHadoopAbstract
}
//Input file preparing
- PrintWriter testInputFileWriter = new PrintWriter(ggfs.create(new GridGgfsPath(path), true));
+ PrintWriter testInputFileWriter = new PrintWriter(ggfs.create(new IgniteFsPath(path), true));
int j = 0;
@@ -114,7 +114,7 @@ public abstract class GridHadoopAbstractWordCountTest extends GridHadoopAbstract
* @throws Exception If could not read the file.
*/
protected String readAndSortFile(String fileName) throws Exception {
- BufferedReader reader = new BufferedReader(new InputStreamReader(ggfs.open(new GridGgfsPath(fileName))));
+ BufferedReader reader = new BufferedReader(new InputStreamReader(ggfs.open(new IgniteFsPath(fileName))));
List<String> list = new ArrayList<>();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f3d93762/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopCommandLineTest.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopCommandLineTest.java b/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopCommandLineTest.java
index 51eec68..f9c0498 100644
--- a/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopCommandLineTest.java
+++ b/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopCommandLineTest.java
@@ -301,17 +301,17 @@ public class GridHadoopCommandLineTest extends GridCommonAbstractTest {
assertEquals(0, executeHadoopCmd("fs", "-put", new File(testWorkDir, "test-data").getAbsolutePath(), "/input"));
- assertTrue(ggfs.exists(new GridGgfsPath("/input/test-data")));
+ assertTrue(ggfs.exists(new IgniteFsPath("/input/test-data")));
assertEquals(0, executeHadoopCmd("jar", examplesJar.getAbsolutePath(), "wordcount", "/input", "/output"));
- GridGgfsPath path = new GridGgfsPath("/users/" + System.getProperty("user.name") + "/");
+ IgniteFsPath path = new IgniteFsPath("/users/" + System.getProperty("user.name") + "/");
assertTrue(ggfs.exists(path));
- GridGgfsPath jobStatPath = null;
+ IgniteFsPath jobStatPath = null;
- for (GridGgfsPath jobPath : ggfs.listPaths(path)) {
+ for (IgniteFsPath jobPath : ggfs.listPaths(path)) {
assertNull(jobStatPath);
jobStatPath = jobPath;
@@ -325,9 +325,9 @@ public class GridHadoopCommandLineTest extends GridCommonAbstractTest {
assertTrue(evtCnt >= 22); //It's the minimum amount of events for job with combiner.
- assertTrue(ggfs.exists(new GridGgfsPath("/output")));
+ assertTrue(ggfs.exists(new IgniteFsPath("/output")));
- BufferedReader in = new BufferedReader(new InputStreamReader(ggfs.open(new GridGgfsPath("/output/part-r-00000"))));
+ BufferedReader in = new BufferedReader(new InputStreamReader(ggfs.open(new IgniteFsPath("/output/part-r-00000"))));
List<String> res = new ArrayList<>();
@@ -358,7 +358,7 @@ public class GridHadoopCommandLineTest extends GridCommonAbstractTest {
"location '/result' as " + qry
));
- GridGgfsInputStreamAdapter in = ggfs.open(new GridGgfsPath("/result/000000_0"));
+ GridGgfsInputStreamAdapter in = ggfs.open(new IgniteFsPath("/result/000000_0"));
byte[] buf = new byte[(int) in.length()];
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f3d93762/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopDefaultMapReducePlannerSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopDefaultMapReducePlannerSelfTest.java b/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopDefaultMapReducePlannerSelfTest.java
index bbdb5b2..f8a603b 100644
--- a/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopDefaultMapReducePlannerSelfTest.java
+++ b/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopDefaultMapReducePlannerSelfTest.java
@@ -72,7 +72,7 @@ public class GridHadoopDefaultMapReducePlannerSelfTest extends GridHadoopAbstrac
private static final GridHadoopMapReducePlanner PLANNER = new GridHadoopDefaultMapReducePlanner();
/** Block locations. */
- private static final Map<Block, Collection<GridGgfsBlockLocation>> BLOCK_MAP = new HashMap<>();
+ private static final Map<Block, Collection<IgniteFsBlockLocation>> BLOCK_MAP = new HashMap<>();
/** Proxy map. */
private static final Map<URI, Boolean> PROXY_MAP = new HashMap<>();
@@ -488,7 +488,7 @@ public class GridHadoopDefaultMapReducePlannerSelfTest extends GridHadoopAbstrac
* @param nodeIds Node IDs.
* @return Block location.
*/
- private static GridGgfsBlockLocation location(long start, long len, UUID... nodeIds) {
+ private static IgniteFsBlockLocation location(long start, long len, UUID... nodeIds) {
assert nodeIds != null && nodeIds.length > 0;
Collection<ClusterNode> nodes = new ArrayList<>(nodeIds.length);
@@ -507,14 +507,14 @@ public class GridHadoopDefaultMapReducePlannerSelfTest extends GridHadoopAbstrac
* @param len Length.
* @param locations Locations.
*/
- private static void mapGgfsBlock(URI file, long start, long len, GridGgfsBlockLocation... locations) {
+ private static void mapGgfsBlock(URI file, long start, long len, IgniteFsBlockLocation... locations) {
assert locations != null && locations.length > 0;
- GridGgfsPath path = new GridGgfsPath(file);
+ IgniteFsPath path = new IgniteFsPath(file);
Block block = new Block(path, start, len);
- Collection<GridGgfsBlockLocation> locationsList = new ArrayList<>();
+ Collection<IgniteFsBlockLocation> locationsList = new ArrayList<>();
Collections.addAll(locationsList, locations);
@@ -526,7 +526,7 @@ public class GridHadoopDefaultMapReducePlannerSelfTest extends GridHadoopAbstrac
*/
private static class Block {
/** */
- private final GridGgfsPath path;
+ private final IgniteFsPath path;
/** */
private final long start;
@@ -541,7 +541,7 @@ public class GridHadoopDefaultMapReducePlannerSelfTest extends GridHadoopAbstrac
* @param start Start.
* @param len Length.
*/
- private Block(GridGgfsPath path, long start, long len) {
+ private Block(IgniteFsPath path, long start, long len) {
this.path = path;
this.start = start;
this.len = len;
@@ -659,13 +659,13 @@ public class GridHadoopDefaultMapReducePlannerSelfTest extends GridHadoopAbstrac
}
/** {@inheritDoc} */
- @Override public Collection<GridGgfsBlockLocation> affinity(GridGgfsPath path, long start, long len)
+ @Override public Collection<IgniteFsBlockLocation> affinity(IgniteFsPath path, long start, long len)
throws GridException {
return BLOCK_MAP.get(new Block(path, start, len));
}
/** {@inheritDoc} */
- @Override public Collection<GridGgfsBlockLocation> affinity(GridGgfsPath path, long start, long len,
+ @Override public Collection<IgniteFsBlockLocation> affinity(IgniteFsPath path, long start, long len,
long maxLen) throws GridException {
return null;
}
@@ -686,18 +686,18 @@ public class GridHadoopDefaultMapReducePlannerSelfTest extends GridHadoopAbstrac
}
/** {@inheritDoc} */
- @Override public GridGgfsInputStreamAdapter open(GridGgfsPath path, int bufSize, int seqReadsBeforePrefetch)
+ @Override public GridGgfsInputStreamAdapter open(IgniteFsPath path, int bufSize, int seqReadsBeforePrefetch)
throws GridException {
return null;
}
/** {@inheritDoc} */
- @Override public GridGgfsInputStreamAdapter open(GridGgfsPath path) throws GridException {
+ @Override public GridGgfsInputStreamAdapter open(IgniteFsPath path) throws GridException {
return null;
}
/** {@inheritDoc} */
- @Override public GridGgfsInputStreamAdapter open(GridGgfsPath path, int bufSize) throws GridException {
+ @Override public GridGgfsInputStreamAdapter open(IgniteFsPath path, int bufSize) throws GridException {
return null;
}
@@ -742,7 +742,7 @@ public class GridHadoopDefaultMapReducePlannerSelfTest extends GridHadoopAbstrac
}
/** {@inheritDoc} */
- @Override public boolean evictExclude(GridGgfsPath path, boolean primary) {
+ @Override public boolean evictExclude(IgniteFsPath path, boolean primary) {
return false;
}
@@ -757,53 +757,53 @@ public class GridHadoopDefaultMapReducePlannerSelfTest extends GridHadoopAbstrac
}
/** {@inheritDoc} */
- @Override public boolean exists(GridGgfsPath path) throws GridException {
+ @Override public boolean exists(IgniteFsPath path) throws GridException {
return false;
}
/** {@inheritDoc} */
- @Nullable @Override public GridGgfsFile info(GridGgfsPath path) throws GridException {
+ @Nullable @Override public GridGgfsFile info(IgniteFsPath path) throws GridException {
return null;
}
/** {@inheritDoc} */
- @Override public GridGgfsPathSummary summary(GridGgfsPath path) throws GridException {
+ @Override public IgniteFsPathSummary summary(IgniteFsPath path) throws GridException {
return null;
}
/** {@inheritDoc} */
- @Nullable @Override public GridGgfsFile update(GridGgfsPath path, Map<String, String> props)
+ @Nullable @Override public GridGgfsFile update(IgniteFsPath path, Map<String, String> props)
throws GridException {
return null;
}
/** {@inheritDoc} */
- @Override public void rename(GridGgfsPath src, GridGgfsPath dest) throws GridException {
+ @Override public void rename(IgniteFsPath src, IgniteFsPath dest) throws GridException {
// No-op.
}
/** {@inheritDoc} */
- @Override public boolean delete(GridGgfsPath path, boolean recursive) throws GridException {
+ @Override public boolean delete(IgniteFsPath path, boolean recursive) throws GridException {
return false;
}
/** {@inheritDoc} */
- @Override public void mkdirs(GridGgfsPath path) throws GridException {
+ @Override public void mkdirs(IgniteFsPath path) throws GridException {
// No-op.
}
/** {@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 {
// No-op.
}
/** {@inheritDoc} */
- @Override public Collection<GridGgfsPath> listPaths(GridGgfsPath path) throws GridException {
+ @Override public Collection<IgniteFsPath> listPaths(IgniteFsPath path) throws GridException {
return null;
}
/** {@inheritDoc} */
- @Override public Collection<GridGgfsFile> listFiles(GridGgfsPath path) throws GridException {
+ @Override public Collection<GridGgfsFile> listFiles(IgniteFsPath path) throws GridException {
return null;
}
@@ -818,36 +818,36 @@ public class GridHadoopDefaultMapReducePlannerSelfTest extends GridHadoopAbstrac
}
/** {@inheritDoc} */
- @Override public GridGgfsOutputStream create(GridGgfsPath path, boolean overwrite) throws GridException {
+ @Override public GridGgfsOutputStream create(IgniteFsPath path, boolean overwrite) throws GridException {
return null;
}
/** {@inheritDoc} */
- @Override public GridGgfsOutputStream create(GridGgfsPath path, int bufSize, boolean overwrite, int replication,
+ @Override public GridGgfsOutputStream create(IgniteFsPath path, int bufSize, boolean overwrite, int replication,
long blockSize, @Nullable Map<String, String> props) throws GridException {
return null;
}
/** {@inheritDoc} */
- @Override public GridGgfsOutputStream create(GridGgfsPath path, int bufSize, boolean overwrite,
+ @Override public GridGgfsOutputStream create(IgniteFsPath path, int bufSize, boolean overwrite,
@Nullable IgniteUuid affKey, int replication, long blockSize, @Nullable Map<String, String> props)
throws GridException {
return null;
}
/** {@inheritDoc} */
- @Override public GridGgfsOutputStream append(GridGgfsPath path, boolean create) throws GridException {
+ @Override public GridGgfsOutputStream append(IgniteFsPath path, boolean create) throws GridException {
return null;
}
/** {@inheritDoc} */
- @Override public GridGgfsOutputStream append(GridGgfsPath path, int bufSize, boolean create,
+ @Override public GridGgfsOutputStream append(IgniteFsPath path, int bufSize, boolean create,
@Nullable Map<String, String> props) throws GridException {
return null;
}
/** {@inheritDoc} */
- @Override public void setTimes(GridGgfsPath path, long accessTime, long modificationTime) throws GridException {
+ @Override public void setTimes(IgniteFsPath path, long accessTime, long modificationTime) throws GridException {
// No-op.
}
@@ -862,7 +862,7 @@ public class GridHadoopDefaultMapReducePlannerSelfTest extends GridHadoopAbstrac
}
/** {@inheritDoc} */
- @Override public long size(GridGgfsPath path) throws GridException {
+ @Override public long size(IgniteFsPath path) throws GridException {
return 0;
}
@@ -873,27 +873,27 @@ public class GridHadoopDefaultMapReducePlannerSelfTest extends GridHadoopAbstrac
/** {@inheritDoc} */
@Override public <T, R> R execute(GridGgfsTask<T, R> task, @Nullable GridGgfsRecordResolver rslvr,
- Collection<GridGgfsPath> paths, @Nullable T arg) throws GridException {
+ Collection<IgniteFsPath> paths, @Nullable T arg) throws GridException {
return null;
}
/** {@inheritDoc} */
@Override public <T, R> R execute(GridGgfsTask<T, R> task, @Nullable GridGgfsRecordResolver rslvr,
- Collection<GridGgfsPath> paths, boolean skipNonExistentFiles, long maxRangeLen, @Nullable T arg)
+ Collection<IgniteFsPath> paths, boolean skipNonExistentFiles, long maxRangeLen, @Nullable T arg)
throws GridException {
return null;
}
/** {@inheritDoc} */
@Override public <T, R> R execute(Class<? extends GridGgfsTask<T, R>> taskCls,
- @Nullable GridGgfsRecordResolver rslvr, Collection<GridGgfsPath> paths, @Nullable T arg)
+ @Nullable GridGgfsRecordResolver rslvr, Collection<IgniteFsPath> paths, @Nullable T arg)
throws GridException {
return null;
}
/** {@inheritDoc} */
@Override public <T, R> R execute(Class<? extends GridGgfsTask<T, R>> taskCls,
- @Nullable GridGgfsRecordResolver rslvr, Collection<GridGgfsPath> paths, boolean skipNonExistentFiles,
+ @Nullable GridGgfsRecordResolver rslvr, Collection<IgniteFsPath> paths, boolean skipNonExistentFiles,
long maxRangeLen, @Nullable T arg) throws GridException {
return null;
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f3d93762/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopMapReduceEmbeddedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopMapReduceEmbeddedSelfTest.java b/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopMapReduceEmbeddedSelfTest.java
index 128d19b..26b17d0 100644
--- a/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopMapReduceEmbeddedSelfTest.java
+++ b/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopMapReduceEmbeddedSelfTest.java
@@ -49,11 +49,11 @@ public class GridHadoopMapReduceEmbeddedSelfTest extends GridHadoopMapReduceTest
* @throws Exception If fails.
*/
public void testMultiReducerWholeMapReduceExecution() throws Exception {
- GridGgfsPath inDir = new GridGgfsPath(PATH_INPUT);
+ IgniteFsPath inDir = new IgniteFsPath(PATH_INPUT);
ggfs.mkdirs(inDir);
- GridGgfsPath inFile = new GridGgfsPath(inDir, GridHadoopWordCount2.class.getSimpleName() + "-input");
+ IgniteFsPath inFile = new IgniteFsPath(inDir, GridHadoopWordCount2.class.getSimpleName() + "-input");
generateTestFile(inFile.toString(), "key1", 10000, "key2", 20000, "key3", 15000, "key4", 7000, "key5", 12000,
"key6", 18000 );
@@ -61,7 +61,7 @@ public class GridHadoopMapReduceEmbeddedSelfTest extends GridHadoopMapReduceTest
for (int i = 0; i < 2; i++) {
boolean useNewAPI = i == 1;
- ggfs.delete(new GridGgfsPath(PATH_OUTPUT), true);
+ ggfs.delete(new IgniteFsPath(PATH_OUTPUT), true);
flags.put("serializationWasConfigured", false);
flags.put("partitionerWasConfigured", false);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f3d93762/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopMapReduceTest.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopMapReduceTest.java b/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopMapReduceTest.java
index 25504d7..75aefb2 100644
--- a/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopMapReduceTest.java
+++ b/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopMapReduceTest.java
@@ -44,16 +44,16 @@ public class GridHadoopMapReduceTest extends GridHadoopAbstractWordCountTest {
* @throws Exception If fails.
*/
public void testWholeMapReduceExecution() throws Exception {
- GridGgfsPath inDir = new GridGgfsPath(PATH_INPUT);
+ IgniteFsPath inDir = new IgniteFsPath(PATH_INPUT);
ggfs.mkdirs(inDir);
- GridGgfsPath inFile = new GridGgfsPath(inDir, GridHadoopWordCount2.class.getSimpleName() + "-input");
+ IgniteFsPath inFile = new IgniteFsPath(inDir, GridHadoopWordCount2.class.getSimpleName() + "-input");
generateTestFile(inFile.toString(), "red", 100000, "blue", 200000, "green", 150000, "yellow", 70000 );
for (int i = 0; i < 8; i++) {
- ggfs.delete(new GridGgfsPath(PATH_OUTPUT), true);
+ ggfs.delete(new IgniteFsPath(PATH_OUTPUT), true);
boolean useNewMapper = (i & 1) == 0;
boolean useNewCombiner = (i & 2) == 0;
@@ -171,7 +171,7 @@ public class GridHadoopMapReduceTest extends GridHadoopAbstractWordCountTest {
}
}
- final GridGgfsPath statPath = new GridGgfsPath("/users/anonymous/" + jobId + "/performance");
+ final IgniteFsPath statPath = new IgniteFsPath("/users/anonymous/" + jobId + "/performance");
GridTestUtils.waitForCondition(new GridAbsPredicate() {
@Override public boolean apply() {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f3d93762/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopTaskExecutionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopTaskExecutionSelfTest.java b/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopTaskExecutionSelfTest.java
index d4a75bc..4355101 100644
--- a/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopTaskExecutionSelfTest.java
+++ b/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopTaskExecutionSelfTest.java
@@ -240,7 +240,7 @@ public class GridHadoopTaskExecutionSelfTest extends GridHadoopAbstractSelfTest
private void prepareFile(String fileName, int lineCnt) throws Exception {
IgniteFs ggfs = grid(0).fileSystem(ggfsName);
- try (OutputStream os = ggfs.create(new GridGgfsPath(fileName), true)) {
+ try (OutputStream os = ggfs.create(new IgniteFsPath(fileName), true)) {
PrintWriter w = new PrintWriter(new OutputStreamWriter(os));
for (int i = 0; i < lineCnt; i++)
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f3d93762/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopTasksAllVersionsTest.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopTasksAllVersionsTest.java b/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopTasksAllVersionsTest.java
index fe134a3..7aa11b8 100644
--- a/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopTasksAllVersionsTest.java
+++ b/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/GridHadoopTasksAllVersionsTest.java
@@ -50,11 +50,11 @@ abstract class GridHadoopTasksAllVersionsTest extends GridHadoopAbstractWordCoun
*/
@SuppressWarnings("ConstantConditions")
public void testMapTask() throws Exception {
- GridGgfsPath inDir = new GridGgfsPath(PATH_INPUT);
+ IgniteFsPath inDir = new IgniteFsPath(PATH_INPUT);
ggfs.mkdirs(inDir);
- GridGgfsPath inFile = new GridGgfsPath(inDir, GridHadoopWordCount2.class.getSimpleName() + "-input");
+ IgniteFsPath inFile = new IgniteFsPath(inDir, GridHadoopWordCount2.class.getSimpleName() + "-input");
URI inFileUri = URI.create(ggfsScheme() + inFile.toString());
@@ -203,11 +203,11 @@ abstract class GridHadoopTasksAllVersionsTest extends GridHadoopAbstractWordCoun
*/
@SuppressWarnings("ConstantConditions")
public void testAllTasks() throws Exception {
- GridGgfsPath inDir = new GridGgfsPath(PATH_INPUT);
+ IgniteFsPath inDir = new IgniteFsPath(PATH_INPUT);
ggfs.mkdirs(inDir);
- GridGgfsPath inFile = new GridGgfsPath(inDir, GridHadoopWordCount2.class.getSimpleName() + "-input");
+ IgniteFsPath inFile = new IgniteFsPath(inDir, GridHadoopWordCount2.class.getSimpleName() + "-input");
URI inFileUri = URI.create(ggfsScheme() + inFile.toString());
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f3d93762/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/taskexecutor/external/GridHadoopExternalTaskExecutionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/taskexecutor/external/GridHadoopExternalTaskExecutionSelfTest.java b/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/taskexecutor/external/GridHadoopExternalTaskExecutionSelfTest.java
index 3697656..fe20f71 100644
--- a/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/taskexecutor/external/GridHadoopExternalTaskExecutionSelfTest.java
+++ b/modules/hadoop/src/test/java/org/gridgain/grid/kernal/processors/hadoop/taskexecutor/external/GridHadoopExternalTaskExecutionSelfTest.java
@@ -143,7 +143,7 @@ public class GridHadoopExternalTaskExecutionSelfTest extends GridHadoopAbstractS
private void prepareTestFile(String filePath) throws Exception {
IgniteFs ggfs = grid(0).fileSystem(ggfsName);
- try (GridGgfsOutputStream out = ggfs.create(new GridGgfsPath(filePath), true)) {
+ try (GridGgfsOutputStream out = ggfs.create(new IgniteFsPath(filePath), true)) {
PrintWriter wr = new PrintWriter(new OutputStreamWriter(out));
for (int i = 0; i < 1000; i++)