ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [45/57] [abbrv] incubator-ignite git commit: # IGNITE-226: WIP (10)
Date Fri, 13 Feb 2015 10:54:55 GMT
# IGNITE-226: WIP (10)


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/639ff503
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/639ff503
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/639ff503

Branch: refs/heads/ignite-226
Commit: 639ff503b91606be1bbf8a6c11edee1e488c6862
Parents: 31d4e02
Author: vozerov-gridgain <vozerov@gridgain.com>
Authored: Fri Feb 13 13:09:56 2015 +0300
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Fri Feb 13 13:09:58 2015 +0300

----------------------------------------------------------------------
 .../examples/ignitefs/IgniteFsExample.java      |  30 +--
 .../ignitefs/IgniteFsMapReduceExample.java      |   8 +-
 .../ignite/examples/IgfsExamplesSelfTest.java   |  51 ++++
 .../examples/IgniteFsExamplesSelfTest.java      |  51 ----
 .../testsuites/IgniteExamplesSelfTestSuite.java |   2 +-
 .../main/java/org/apache/ignite/IgniteFs.java   |  54 ++--
 .../CacheIgniteFsPerBlockLruEvictionPolicy.java |   2 +-
 .../configuration/IgniteFsConfiguration.java    |   6 +-
 .../org/apache/ignite/events/IgniteFsEvent.java |  16 +-
 .../java/org/apache/ignite/ignitefs/Igfs.java   | 216 +++++++++++++++
 .../ignitefs/IgfsFileNotFoundException.java     |  44 ++++
 .../apache/ignite/ignitefs/IgfsInputStream.java |  80 ++++++
 .../org/apache/ignite/ignitefs/IgfsPath.java    | 262 +++++++++++++++++++
 .../apache/ignite/ignitefs/IgfsPathSummary.java | 138 ++++++++++
 .../org/apache/ignite/ignitefs/IgfsReader.java  |  38 +++
 .../ignite/ignitefs/IgniteFsBlockLocation.java  |   2 +-
 ...IgniteFsConcurrentModificationException.java |   2 +-
 .../apache/ignite/ignitefs/IgniteFsFile.java    |   4 +-
 .../ignitefs/IgniteFsFileNotFoundException.java |  44 ----
 .../ignite/ignitefs/IgniteFsInputStream.java    |  80 ------
 .../apache/ignite/ignitefs/IgniteFsPath.java    | 262 -------------------
 .../ignite/ignitefs/IgniteFsPathSummary.java    | 138 ----------
 .../apache/ignite/ignitefs/IgniteFsReader.java  |  38 ---
 .../ignitefs/mapreduce/IgfsFileRange.java       |   6 +-
 .../mapreduce/IgfsInputStreamJobAdapter.java    |   4 +-
 .../ignite/ignitefs/mapreduce/IgfsJob.java      |   6 +-
 .../mapreduce/IgfsRangeInputStream.java         |  10 +-
 .../ignitefs/mapreduce/IgfsRecordResolver.java  |   2 +-
 .../ignite/ignitefs/mapreduce/IgfsTask.java     |   6 +-
 .../ignite/ignitefs/mapreduce/IgfsTaskArgs.java |   4 +-
 .../IgfsByteDelimiterRecordResolver.java        |   6 +-
 .../records/IgfsFixedLengthRecordResolver.java  |   2 +-
 .../internal/fs/common/IgfsControlResponse.java |  18 +-
 .../ignite/internal/fs/common/IgfsLogger.java   |  14 +-
 .../internal/fs/common/IgfsMarshaller.java      |   8 +-
 .../fs/common/IgfsPathControlRequest.java       |  12 +-
 .../internal/processors/fs/IgfsAsyncImpl.java   |  54 ++--
 .../internal/processors/fs/IgfsDataManager.java |   4 +-
 .../ignite/internal/processors/fs/IgfsEx.java   |   8 +-
 .../internal/processors/fs/IgfsFileImpl.java    |  10 +-
 .../internal/processors/fs/IgfsFileInfo.java    |   8 +-
 .../processors/fs/IgfsFileWorkerBatch.java      |   6 +-
 .../ignite/internal/processors/fs/IgfsImpl.java | 150 +++++------
 .../processors/fs/IgfsInputStreamAdapter.java   |   2 +-
 .../processors/fs/IgfsInputStreamImpl.java      |  12 +-
 .../internal/processors/fs/IgfsJobImpl.java     |   6 +-
 .../internal/processors/fs/IgfsMetaManager.java | 146 +++++------
 .../processors/fs/IgfsModeResolver.java         |  28 +-
 .../processors/fs/IgfsNoopProcessor.java        |   3 +-
 .../processors/fs/IgfsOutputStreamAdapter.java  |   4 +-
 .../processors/fs/IgfsOutputStreamImpl.java     |   4 +-
 .../internal/processors/fs/IgfsPaths.java       |  12 +-
 .../internal/processors/fs/IgfsProcessor.java   |   2 +-
 .../processors/fs/IgfsProcessorAdapter.java     |   3 +-
 .../fs/IgfsSecondaryInputStreamDescriptor.java  |   6 +-
 .../processors/fs/IgfsTaskArgsImpl.java         |   6 +-
 .../visor/node/VisorGgfsConfiguration.java      |   2 +-
 .../visor/node/VisorNodeDataCollectorJob.java   |   1 -
 .../ignitefs/IgfsEventsAbstractSelfTest.java    | 146 +++++------
 .../IgfsFragmentizerAbstractSelfTest.java       |   6 +-
 .../ignitefs/IgfsFragmentizerSelfTest.java      |  17 +-
 .../IgfsFragmentizerTopologySelfTest.java       |   4 +-
 .../ignite/ignitefs/IgfsPathSelfTest.java       |  32 +--
 ...heIgfsPerBlockLruEvictionPolicySelfTest.java |  10 +-
 .../processors/fs/IgfsAbstractSelfTest.java     | 154 +++++------
 .../processors/fs/IgfsDataManagerSelfTest.java  |   6 +-
 .../processors/fs/IgfsDualAbstractSelfTest.java | 106 ++++----
 .../processors/fs/IgfsMetaManagerSelfTest.java  |  66 ++---
 .../processors/fs/IgfsMetricsSelfTest.java      |  34 +--
 .../processors/fs/IgfsModeResolverSelfTest.java |  36 +--
 .../processors/fs/IgfsModesSelfTest.java        |  12 +-
 .../processors/fs/IgfsProcessorSelfTest.java    |  54 ++--
 .../processors/fs/IgfsSizeSelfTest.java         |  18 +-
 .../processors/fs/IgfsStreamsSelfTest.java      |  24 +-
 .../processors/fs/IgfsTaskSelfTest.java         |   6 +-
 .../IgfsAbstractRecordResolverSelfTest.java     |   4 +-
 ...IgfsByteDelimiterRecordResolverSelfTest.java |   4 +-
 .../IgfsFixedLengthRecordResolverSelfTest.java  |   4 +-
 ...sNewLineDelimiterRecordResolverSelfTest.java |   4 +-
 ...fsStringDelimiterRecordResolverSelfTest.java |   4 +-
 .../ignite/testframework/junits/IgniteMock.java |   2 -
 .../hadoop/v1/IgfsHadoopFileSystem.java         |  34 +--
 .../hadoop/v2/IgfsHadoopFileSystem.java         |  30 +--
 .../ignite/internal/fs/hadoop/IgfsHadoop.java   |  28 +-
 .../fs/hadoop/IgfsHadoopFileSystemWrapper.java  |  50 ++--
 .../internal/fs/hadoop/IgfsHadoopInProc.java    |  28 +-
 .../internal/fs/hadoop/IgfsHadoopOutProc.java   |  32 +--
 .../internal/fs/hadoop/IgfsHadoopReader.java    |   2 +-
 .../internal/fs/hadoop/IgfsHadoopUtils.java     |   2 +-
 .../internal/fs/hadoop/IgfsHadoopWrapper.java   |  38 +--
 .../GridHadoopDefaultMapReducePlanner.java      |   2 +-
 .../GridHadoopClientProtocolSelfTest.java       |  15 +-
 .../ignite/ignitefs/IgfsEventsTestSuite.java    |   1 -
 .../IgfsHadoop20FileSystemAbstractSelfTest.java |   3 +-
 .../IgfsHadoopDualAbstractSelfTest.java         |  15 +-
 .../IgfsHadoopFileSystemAbstractSelfTest.java   |   2 +-
 .../IgfsHadoopFileSystemClientSelfTest.java     |   2 +-
 .../IgfsHadoopFileSystemHandshakeSelfTest.java  |   2 +-
 .../IgfsHadoopFileSystemLoggerSelfTest.java     |   6 +-
 ...fsHadoopFileSystemSecondaryModeSelfTest.java |   1 -
 .../hadoop/GridHadoopAbstractWordCountTest.java |   4 +-
 .../hadoop/GridHadoopCommandLineTest.java       |  14 +-
 ...idHadoopDefaultMapReducePlannerSelfTest.java |  60 ++---
 .../GridHadoopMapReduceEmbeddedSelfTest.java    |   6 +-
 .../hadoop/GridHadoopMapReduceTest.java         |   8 +-
 .../hadoop/GridHadoopTaskExecutionSelfTest.java |   2 +-
 .../hadoop/GridHadoopTasksAllVersionsTest.java  |   8 +-
 ...GridHadoopExternalTaskExecutionSelfTest.java |   2 +-
 108 files changed, 1748 insertions(+), 1545 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/639ff503/examples/src/main/java/org/apache/ignite/examples/ignitefs/IgniteFsExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ignitefs/IgniteFsExample.java b/examples/src/main/java/org/apache/ignite/examples/ignitefs/IgniteFsExample.java
index 4615158..67ac39e 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ignitefs/IgniteFsExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ignitefs/IgniteFsExample.java
@@ -25,7 +25,7 @@ import java.io.*;
 import java.util.*;
 
 /**
- * Example that shows usage of {@link IgniteFs} API. It starts a node with {@code IgniteFs}
+ * Example that shows usage of {@link org.apache.ignite.IgniteFs} API. It starts a node with {@code IgniteFs}
  * configured and performs several file system operations (create, write, append, read and delete
  * files, create, list and delete directories).
  * <p>
@@ -50,10 +50,10 @@ public final class IgniteFsExample {
 
         try {
             // Get an instance of Ignite File System.
-            org.apache.ignite.IgniteFs fs = ignite.fileSystem("ignitefs");
+            IgniteFs fs = ignite.fileSystem("ignitefs");
 
             // Working directory path.
-            IgniteFsPath workDir = new IgniteFsPath("/examples/fs");
+            IgfsPath workDir = new IgfsPath("/examples/fs");
 
             // Cleanup working directory.
             delete(fs, workDir);
@@ -65,7 +65,7 @@ public final class IgniteFsExample {
             printInfo(fs, workDir);
 
             // File path.
-            IgniteFsPath filePath = new IgniteFsPath(workDir, "file.txt");
+            IgfsPath filePath = new IgfsPath(workDir, "file.txt");
 
             // Create file.
             create(fs, filePath, new byte[] {1, 2, 3});
@@ -90,7 +90,7 @@ public final class IgniteFsExample {
 
             // Create several files.
             for (int i = 0; i < 5; i++)
-                create(fs, new IgniteFsPath(workDir, "file-" + i + ".txt"), null);
+                create(fs, new IgfsPath(workDir, "file-" + i + ".txt"), null);
 
             list(fs, workDir);
         }
@@ -107,7 +107,7 @@ public final class IgniteFsExample {
      * @param path File or directory path.
      * @throws IgniteException In case of error.
      */
-    private static void delete(org.apache.ignite.IgniteFs fs, IgniteFsPath path) throws IgniteException {
+    private static void delete(IgniteFs fs, IgfsPath path) throws IgniteException {
         assert fs != null;
         assert path != null;
 
@@ -139,7 +139,7 @@ public final class IgniteFsExample {
      * @param path Directory path.
      * @throws IgniteException In case of error.
      */
-    private static void mkdirs(IgniteFs fs, IgniteFsPath path) throws IgniteException {
+    private static void mkdirs(IgniteFs fs, IgfsPath path) throws IgniteException {
         assert fs != null;
         assert path != null;
 
@@ -166,7 +166,7 @@ public final class IgniteFsExample {
      * @throws IgniteException If file can't be created.
      * @throws IOException If data can't be written.
      */
-    private static void create(IgniteFs fs, IgniteFsPath path, @Nullable byte[] data)
+    private static void create(IgniteFs fs, IgfsPath path, @Nullable byte[] data)
         throws IgniteException, IOException {
         assert fs != null;
         assert path != null;
@@ -195,7 +195,7 @@ public final class IgniteFsExample {
      * @throws IgniteException If file can't be created.
      * @throws IOException If data can't be written.
      */
-    private static void append(IgniteFs fs, IgniteFsPath path, byte[] data) throws IgniteException, IOException {
+    private static void append(IgniteFs fs, IgfsPath path, byte[] data) throws IgniteException, IOException {
         assert fs != null;
         assert path != null;
         assert data != null;
@@ -220,14 +220,14 @@ public final class IgniteFsExample {
      * @throws IgniteException If file can't be opened.
      * @throws IOException If data can't be read.
      */
-    private static void read(org.apache.ignite.IgniteFs fs, IgniteFsPath path) throws IgniteException, IOException {
+    private static void read(IgniteFs fs, IgfsPath path) throws IgniteException, IOException {
         assert fs != null;
         assert path != null;
         assert fs.info(path).isFile();
 
         byte[] data = new byte[(int)fs.info(path).length()];
 
-        try (IgniteFsInputStream in = fs.open(path)) {
+        try (IgfsInputStream in = fs.open(path)) {
             in.read(data);
         }
 
@@ -242,12 +242,12 @@ public final class IgniteFsExample {
      * @param path Directory path.
      * @throws IgniteException In case of error.
      */
-    private static void list(org.apache.ignite.IgniteFs fs, IgniteFsPath path) throws IgniteException {
+    private static void list(IgniteFs fs, IgfsPath path) throws IgniteException {
         assert fs != null;
         assert path != null;
         assert fs.info(path).isDirectory();
 
-        Collection<IgniteFsPath> files = fs.listPaths(path);
+        Collection<IgfsPath> files = fs.listPaths(path);
 
         if (files.isEmpty()) {
             System.out.println();
@@ -257,7 +257,7 @@ public final class IgniteFsExample {
             System.out.println();
             System.out.println(">>> List of files in directory: " + path);
 
-            for (IgniteFsPath f : files)
+            for (IgfsPath f : files)
                 System.out.println(">>>     " + f.name());
         }
 
@@ -271,7 +271,7 @@ public final class IgniteFsExample {
      * @param path File or directory path.
      * @throws IgniteException In case of error.
      */
-    private static void printInfo(org.apache.ignite.IgniteFs fs, IgniteFsPath path) throws IgniteException {
+    private static void printInfo(IgniteFs fs, IgfsPath path) throws IgniteException {
         System.out.println();
         System.out.println("Information for " + path + ": " + fs.info(path));
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/639ff503/examples/src/main/java/org/apache/ignite/examples/ignitefs/IgniteFsMapReduceExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ignitefs/IgniteFsMapReduceExample.java b/examples/src/main/java/org/apache/ignite/examples/ignitefs/IgniteFsMapReduceExample.java
index 17c7691..89d10e7 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ignitefs/IgniteFsMapReduceExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ignitefs/IgniteFsMapReduceExample.java
@@ -64,10 +64,10 @@ public class IgniteFsMapReduceExample {
                 IgniteFs fs = ignite.fileSystem("ignitefs");
 
                 // Working directory path.
-                IgniteFsPath workDir = new IgniteFsPath("/examples/fs");
+                IgfsPath workDir = new IgfsPath("/examples/fs");
 
                 // Write file to GGFS.
-                IgniteFsPath fsPath = new IgniteFsPath(workDir, file.getName());
+                IgfsPath fsPath = new IgfsPath(workDir, file.getName());
 
                 writeFile(fs, fsPath, file);
 
@@ -94,7 +94,7 @@ public class IgniteFsMapReduceExample {
      * @param file File to write.
      * @throws Exception In case of exception.
      */
-    private static void writeFile(IgniteFs fs, IgniteFsPath fsPath, File file) throws Exception {
+    private static void writeFile(IgniteFs fs, IgfsPath fsPath, File file) throws Exception {
         System.out.println();
         System.out.println("Copying file to IgniteFs: " + file);
 
@@ -128,7 +128,7 @@ public class IgniteFsMapReduceExample {
      */
     private static class GrepTask extends IgfsTask<String, Collection<Line>> {
         /** {@inheritDoc} */
-        @Override public IgfsJob createJob(IgniteFsPath path, IgfsFileRange range,
+        @Override public IgfsJob createJob(IgfsPath path, IgfsFileRange range,
             IgfsTaskArgs<String> args) {
             return new GrepJob(args.userArgument());
         }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/639ff503/examples/src/test/java/org/apache/ignite/examples/IgfsExamplesSelfTest.java
----------------------------------------------------------------------
diff --git a/examples/src/test/java/org/apache/ignite/examples/IgfsExamplesSelfTest.java b/examples/src/test/java/org/apache/ignite/examples/IgfsExamplesSelfTest.java
new file mode 100644
index 0000000..c21634a
--- /dev/null
+++ b/examples/src/test/java/org/apache/ignite/examples/IgfsExamplesSelfTest.java
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.examples;
+
+import org.apache.ignite.examples.ignitefs.*;
+import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.testframework.junits.common.*;
+
+/**
+ * IgniteFs examples self test.
+ */
+public class IgfsExamplesSelfTest extends GridAbstractExamplesTest {
+    /** IgniteFs config with shared memory IPC. */
+    private static final String IGNITEFS_SHMEM_CFG = "modules/core/src/test/config/ggfs-shmem.xml";
+
+    /** IgniteFs config with loopback IPC. */
+    private static final String IGNITEFS_LOOPBACK_CFG = "modules/core/src/test/config/ggfs-loopback.xml";
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testIgniteFsApiExample() throws Exception {
+        String configPath = U.isWindows() ? IGNITEFS_LOOPBACK_CFG : IGNITEFS_SHMEM_CFG;
+
+        try {
+            startGrid("test1", configPath);
+            startGrid("test2", configPath);
+            startGrid("test3", configPath);
+
+            IgniteFsExample.main(EMPTY_ARGS);
+        }
+        finally {
+            stopAllGrids();
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/639ff503/examples/src/test/java/org/apache/ignite/examples/IgniteFsExamplesSelfTest.java
----------------------------------------------------------------------
diff --git a/examples/src/test/java/org/apache/ignite/examples/IgniteFsExamplesSelfTest.java b/examples/src/test/java/org/apache/ignite/examples/IgniteFsExamplesSelfTest.java
deleted file mode 100644
index 4566496..0000000
--- a/examples/src/test/java/org/apache/ignite/examples/IgniteFsExamplesSelfTest.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.examples;
-
-import org.apache.ignite.examples.ignitefs.*;
-import org.apache.ignite.internal.util.typedef.internal.*;
-import org.apache.ignite.testframework.junits.common.*;
-
-/**
- * IgniteFs examples self test.
- */
-public class IgniteFsExamplesSelfTest extends GridAbstractExamplesTest {
-    /** IgniteFs config with shared memory IPC. */
-    private static final String IGNITEFS_SHMEM_CFG = "modules/core/src/test/config/ggfs-shmem.xml";
-
-    /** IgniteFs config with loopback IPC. */
-    private static final String IGNITEFS_LOOPBACK_CFG = "modules/core/src/test/config/ggfs-loopback.xml";
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testIgniteFsApiExample() throws Exception {
-        String configPath = U.isWindows() ? IGNITEFS_LOOPBACK_CFG : IGNITEFS_SHMEM_CFG;
-
-        try {
-            startGrid("test1", configPath);
-            startGrid("test2", configPath);
-            startGrid("test3", configPath);
-
-            IgniteFsExample.main(EMPTY_ARGS);
-        }
-        finally {
-            stopAllGrids();
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/639ff503/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesSelfTestSuite.java
----------------------------------------------------------------------
diff --git a/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesSelfTestSuite.java b/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesSelfTestSuite.java
index 495e7d5..76a25a2 100644
--- a/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesSelfTestSuite.java
+++ b/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesSelfTestSuite.java
@@ -51,7 +51,7 @@ public class IgniteExamplesSelfTestSuite extends TestSuite {
         suite.addTest(new TestSuite(MonteCarloExamplesSelfTest.class));
         suite.addTest(new TestSuite(TaskExamplesSelfTest.class));
         suite.addTest(new TestSuite(SpringBeanExamplesSelfTest.class));
-        suite.addTest(new TestSuite(IgniteFsExamplesSelfTest.class));
+        suite.addTest(new TestSuite(IgfsExamplesSelfTest.class));
         suite.addTest(new TestSuite(CheckpointExamplesSelfTest.class));
         suite.addTest(new TestSuite(HibernateL2CacheExampleSelfTest.class));
         suite.addTest(new TestSuite(ProjectionExampleSelfTest.class));

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/639ff503/modules/core/src/main/java/org/apache/ignite/IgniteFs.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteFs.java b/modules/core/src/main/java/org/apache/ignite/IgniteFs.java
index deb593f..f62c477 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteFs.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteFs.java
@@ -56,7 +56,7 @@ import java.util.*;
  * <p>
  * <b>NOTE:</b> integration with Hadoop is available only in {@code In-Memory Accelerator For Hadoop} edition.
  */
-public interface IgniteFs extends IgniteFsFileSystem, IgniteAsyncSupport {
+public interface IgniteFs extends Igfs, IgniteAsyncSupport {
     /** GGFS scheme name. */
     public static final String GGFS_SCHEME = "ggfs";
 
@@ -83,10 +83,10 @@ public interface IgniteFs extends IgniteFsFileSystem, IgniteAsyncSupport {
      *
      * @param path Path to get information for.
      * @return Summary object.
-     * @throws IgniteFsFileNotFoundException If path is not found.
+     * @throws org.apache.ignite.ignitefs.IgfsFileNotFoundException If path is not found.
      * @throws IgniteException If failed.
      */
-    public IgniteFsPathSummary summary(IgniteFsPath path) throws IgniteException;
+    public IgfsPathSummary summary(IgfsPath path) throws IgniteException;
 
     /**
      * Opens a file for reading.
@@ -94,9 +94,9 @@ public interface IgniteFs extends IgniteFsFileSystem, IgniteAsyncSupport {
      * @param path File path to read.
      * @return File input stream to read data from.
      * @throws IgniteException In case of error.
-     * @throws IgniteFsFileNotFoundException If path doesn't exist.
+     * @throws org.apache.ignite.ignitefs.IgfsFileNotFoundException If path doesn't exist.
      */
-    public IgniteFsInputStream open(IgniteFsPath path) throws IgniteException;
+    public IgfsInputStream open(IgfsPath path) throws IgniteException;
 
     /**
      * Opens a file for reading.
@@ -105,9 +105,9 @@ public interface IgniteFs extends IgniteFsFileSystem, IgniteAsyncSupport {
      * @param bufSize Read buffer size (bytes) or {@code zero} to use default value.
      * @return File input stream to read data from.
      * @throws IgniteException In case of error.
-     * @throws IgniteFsFileNotFoundException If path doesn't exist.
+     * @throws org.apache.ignite.ignitefs.IgfsFileNotFoundException If path doesn't exist.
      */
-    @Override public IgniteFsInputStream open(IgniteFsPath path, int bufSize) throws IgniteException;
+    @Override public IgfsInputStream open(IgfsPath path, int bufSize) throws IgniteException;
 
     /**
      * Opens a file for reading.
@@ -117,9 +117,9 @@ public interface IgniteFs extends IgniteFsFileSystem, IgniteAsyncSupport {
      * @param seqReadsBeforePrefetch Amount of sequential reads before prefetch is started.
      * @return File input stream to read data from.
      * @throws IgniteException In case of error.
-     * @throws IgniteFsFileNotFoundException If path doesn't exist.
+     * @throws org.apache.ignite.ignitefs.IgfsFileNotFoundException If path doesn't exist.
      */
-    public IgniteFsInputStream open(IgniteFsPath path, int bufSize, int seqReadsBeforePrefetch) throws IgniteException;
+    public IgfsInputStream open(IgfsPath path, int bufSize, int seqReadsBeforePrefetch) throws IgniteException;
 
     /**
      * Creates a file and opens it for writing.
@@ -129,7 +129,7 @@ public interface IgniteFs extends IgniteFsFileSystem, IgniteAsyncSupport {
      * @return File output stream to write data to.
      * @throws IgniteException In case of error.
      */
-    @Override public IgniteFsOutputStream create(IgniteFsPath path, boolean overwrite) throws IgniteException;
+    @Override public IgniteFsOutputStream create(IgfsPath path, boolean overwrite) throws IgniteException;
 
     /**
      * Creates a file and opens it for writing.
@@ -143,7 +143,7 @@ public interface IgniteFs extends IgniteFsFileSystem, IgniteAsyncSupport {
      * @return File output stream to write data to.
      * @throws IgniteException In case of error.
      */
-    @Override public IgniteFsOutputStream create(IgniteFsPath path, int bufSize, boolean overwrite, int replication,
+    @Override public IgniteFsOutputStream create(IgfsPath path, int bufSize, boolean overwrite, int replication,
         long blockSize, @Nullable Map<String, String> props) throws IgniteException;
 
     /**
@@ -160,7 +160,7 @@ public interface IgniteFs extends IgniteFsFileSystem, IgniteAsyncSupport {
      * @return File output stream to write data to.
      * @throws IgniteException In case of error.
      */
-    public IgniteFsOutputStream create(IgniteFsPath path, int bufSize, boolean overwrite,
+    public IgniteFsOutputStream create(IgfsPath path, int bufSize, boolean overwrite,
         @Nullable IgniteUuid affKey, int replication, long blockSize, @Nullable Map<String, String> props)
         throws IgniteException;
 
@@ -171,9 +171,9 @@ public interface IgniteFs extends IgniteFsFileSystem, IgniteAsyncSupport {
      * @param create Create file if it doesn't exist yet.
      * @return File output stream to append data to.
      * @throws IgniteException In case of error.
-     * @throws IgniteFsFileNotFoundException If path doesn't exist and create flag is {@code false}.
+     * @throws org.apache.ignite.ignitefs.IgfsFileNotFoundException If path doesn't exist and create flag is {@code false}.
      */
-    public IgniteFsOutputStream append(IgniteFsPath path, boolean create) throws IgniteException;
+    public IgniteFsOutputStream append(IgfsPath path, boolean create) throws IgniteException;
 
     /**
      * Opens an output stream to an existing file for appending data.
@@ -184,9 +184,9 @@ public interface IgniteFs extends IgniteFsFileSystem, IgniteAsyncSupport {
      * @param props File properties to set only in case it file was just created.
      * @return File output stream to append data to.
      * @throws IgniteException In case of error.
-     * @throws IgniteFsFileNotFoundException If path doesn't exist and create flag is {@code false}.
+     * @throws org.apache.ignite.ignitefs.IgfsFileNotFoundException If path doesn't exist and create flag is {@code false}.
      */
-    @Override public IgniteFsOutputStream append(IgniteFsPath path, int bufSize, boolean create,
+    @Override public IgniteFsOutputStream append(IgfsPath path, int bufSize, boolean create,
         @Nullable Map<String, String> props) throws IgniteException;
 
     /**
@@ -197,10 +197,10 @@ public interface IgniteFs extends IgniteFsFileSystem, IgniteAsyncSupport {
      * @param accessTime Optional last access time to set. Value {@code -1} does not update access time.
      * @param modificationTime Optional last modification time to set. Value {@code -1} does not update
      *      modification time.
-     * @throws IgniteFsFileNotFoundException If target was not found.
+     * @throws org.apache.ignite.ignitefs.IgfsFileNotFoundException If target was not found.
      * @throws IgniteException If error occurred.
      */
-    public void setTimes(IgniteFsPath path, long accessTime, long modificationTime) throws IgniteException;
+    public void setTimes(IgfsPath path, long accessTime, long modificationTime) throws IgniteException;
 
     /**
      * Gets affinity block locations for data blocks of the file, i.e. the nodes, on which the blocks
@@ -211,9 +211,9 @@ public interface IgniteFs extends IgniteFsFileSystem, IgniteAsyncSupport {
      * @param len Size of data in the file to resolve affinity for.
      * @return Affinity block locations.
      * @throws IgniteException In case of error.
-     * @throws IgniteFsFileNotFoundException If path doesn't exist.
+     * @throws org.apache.ignite.ignitefs.IgfsFileNotFoundException If path doesn't exist.
      */
-    public Collection<IgniteFsBlockLocation> affinity(IgniteFsPath path, long start, long len) throws IgniteException;
+    public Collection<IgniteFsBlockLocation> affinity(IgfsPath path, long start, long len) throws IgniteException;
 
     /**
      * Get affinity block locations for data blocks of the file. In case {@code maxLen} parameter is set and
@@ -226,9 +226,9 @@ public interface IgniteFs extends IgniteFsFileSystem, IgniteAsyncSupport {
      * @param maxLen Maximum length of a single returned block location length.
      * @return Affinity block locations.
      * @throws IgniteException In case of error.
-     * @throws IgniteFsFileNotFoundException If path doesn't exist.
+     * @throws org.apache.ignite.ignitefs.IgfsFileNotFoundException If path doesn't exist.
      */
-    public Collection<IgniteFsBlockLocation> affinity(IgniteFsPath path, long start, long len, long maxLen)
+    public Collection<IgniteFsBlockLocation> affinity(IgfsPath path, long start, long len, long maxLen)
         throws IgniteException;
 
     /**
@@ -254,7 +254,7 @@ public interface IgniteFs extends IgniteFsFileSystem, IgniteAsyncSupport {
      * @return Total size.
      * @throws IgniteException In case of error.
      */
-    public long size(IgniteFsPath path) throws IgniteException;
+    public long size(IgfsPath path) throws IgniteException;
 
     /**
      * Formats the file system removing all existing entries from it.
@@ -280,7 +280,7 @@ public interface IgniteFs extends IgniteFsFileSystem, IgniteAsyncSupport {
      */
     @IgniteAsyncSupported
     public <T, R> R execute(IgfsTask<T, R> task, @Nullable IgfsRecordResolver rslvr,
-        Collection<IgniteFsPath> paths, @Nullable T arg) throws IgniteException;
+        Collection<IgfsPath> paths, @Nullable T arg) throws IgniteException;
 
     /**
      * Executes GGFS task with overridden maximum range length (see
@@ -301,7 +301,7 @@ public interface IgniteFs extends IgniteFsFileSystem, IgniteAsyncSupport {
      */
     @IgniteAsyncSupported
     public <T, R> R execute(IgfsTask<T, R> task, @Nullable IgfsRecordResolver rslvr,
-        Collection<IgniteFsPath> paths, boolean skipNonExistentFiles, long maxRangeLen, @Nullable T arg)
+        Collection<IgfsPath> paths, boolean skipNonExistentFiles, long maxRangeLen, @Nullable T arg)
         throws IgniteException;
 
     /**
@@ -318,7 +318,7 @@ public interface IgniteFs extends IgniteFsFileSystem, IgniteAsyncSupport {
      */
     @IgniteAsyncSupported
     public <T, R> R execute(Class<? extends IgfsTask<T, R>> taskCls,
-        @Nullable IgfsRecordResolver rslvr, Collection<IgniteFsPath> paths, @Nullable T arg) throws IgniteException;
+        @Nullable IgfsRecordResolver rslvr, Collection<IgfsPath> paths, @Nullable T arg) throws IgniteException;
 
     /**
      * Executes GGFS task with overridden maximum range length (see
@@ -338,7 +338,7 @@ public interface IgniteFs extends IgniteFsFileSystem, IgniteAsyncSupport {
      */
     @IgniteAsyncSupported
     public <T, R> R execute(Class<? extends IgfsTask<T, R>> taskCls,
-        @Nullable IgfsRecordResolver rslvr, Collection<IgniteFsPath> paths, boolean skipNonExistentFiles,
+        @Nullable IgfsRecordResolver rslvr, Collection<IgfsPath> paths, boolean skipNonExistentFiles,
         long maxRangeLen, @Nullable T arg) throws IgniteException;
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/639ff503/modules/core/src/main/java/org/apache/ignite/cache/eviction/ignitefs/CacheIgniteFsPerBlockLruEvictionPolicy.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/eviction/ignitefs/CacheIgniteFsPerBlockLruEvictionPolicy.java b/modules/core/src/main/java/org/apache/ignite/cache/eviction/ignitefs/CacheIgniteFsPerBlockLruEvictionPolicy.java
index ad5dba0..6647cc4 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/eviction/ignitefs/CacheIgniteFsPerBlockLruEvictionPolicy.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/eviction/ignitefs/CacheIgniteFsPerBlockLruEvictionPolicy.java
@@ -276,7 +276,7 @@ public class CacheIgniteFsPerBlockLruEvictionPolicy implements CacheEvictionPoli
      * @return {@code True} in case non block of related file must be excluded.
      * @throws IgniteCheckedException In case of faulty patterns.
      */
-    public boolean exclude(IgniteFsPath path) throws IgniteCheckedException {
+    public boolean exclude(IgfsPath path) throws IgniteCheckedException {
         assert path != null;
 
         Collection<Pattern> excludePatterns0;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/639ff503/modules/core/src/main/java/org/apache/ignite/configuration/IgniteFsConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/IgniteFsConfiguration.java b/modules/core/src/main/java/org/apache/ignite/configuration/IgniteFsConfiguration.java
index 6fe2e51..675f7b2 100644
--- a/modules/core/src/main/java/org/apache/ignite/configuration/IgniteFsConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/configuration/IgniteFsConfiguration.java
@@ -121,7 +121,7 @@ public class IgniteFsConfiguration {
     private int mgmtPort = DFLT_MGMT_PORT;
 
     /** Secondary file system */
-    private IgniteFsFileSystem secondaryFs;
+    private Igfs secondaryFs;
 
     /** GGFS mode. */
     private IgniteFsMode dfltMode = DFLT_MODE;
@@ -517,7 +517,7 @@ public class IgniteFsConfiguration {
      *
      * @return Secondary file system.
      */
-    public IgniteFsFileSystem getSecondaryFileSystem() {
+    public Igfs getSecondaryFileSystem() {
         return secondaryFs;
     }
 
@@ -527,7 +527,7 @@ public class IgniteFsConfiguration {
      *
      * @param fileSystem
      */
-    public void setSecondaryFileSystem(IgniteFsFileSystem fileSystem) {
+    public void setSecondaryFileSystem(Igfs fileSystem) {
         secondaryFs = fileSystem;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/639ff503/modules/core/src/main/java/org/apache/ignite/events/IgniteFsEvent.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/events/IgniteFsEvent.java b/modules/core/src/main/java/org/apache/ignite/events/IgniteFsEvent.java
index ca15cb3..6e6a7cb 100644
--- a/modules/core/src/main/java/org/apache/ignite/events/IgniteFsEvent.java
+++ b/modules/core/src/main/java/org/apache/ignite/events/IgniteFsEvent.java
@@ -68,10 +68,10 @@ public class IgniteFsEvent extends EventAdapter {
     private static final long serialVersionUID = 0L;
 
     /** File path. */
-    private final IgniteFsPath path;
+    private final IgfsPath path;
 
     /** New file path (for RENAME event). */
-    private IgniteFsPath newPath;
+    private IgfsPath newPath;
 
     /** Data size (for data transfer events). */
     private long dataSize;
@@ -87,7 +87,7 @@ public class IgniteFsEvent extends EventAdapter {
      * @param node Node.
      * @param type Event type.
      */
-    public IgniteFsEvent(IgniteFsPath path, ClusterNode node, int type) {
+    public IgniteFsEvent(IgfsPath path, ClusterNode node, int type) {
         super(node, "GGFS event.", type);
 
         this.path = path;
@@ -103,7 +103,7 @@ public class IgniteFsEvent extends EventAdapter {
      * @param node Node.
      * @param type Event type.
      */
-    public IgniteFsEvent(IgniteFsPath path, IgniteFsPath newPath, ClusterNode node, int type) {
+    public IgniteFsEvent(IgfsPath path, IgfsPath newPath, ClusterNode node, int type) {
         this(path, node, type);
 
         this.newPath = newPath;
@@ -119,7 +119,7 @@ public class IgniteFsEvent extends EventAdapter {
      * @param type Event type.
      * @param dataSize Transferred data size in bytes.
      */
-    public IgniteFsEvent(IgniteFsPath path, ClusterNode node, int type, long dataSize) {
+    public IgniteFsEvent(IgfsPath path, ClusterNode node, int type, long dataSize) {
         this(path, node, type);
 
         this.dataSize = dataSize;
@@ -134,7 +134,7 @@ public class IgniteFsEvent extends EventAdapter {
      * @param type Event type.
      * @param meta Modified properties.
      */
-    public IgniteFsEvent(IgniteFsPath path, ClusterNode node, int type, Map<String, String> meta) {
+    public IgniteFsEvent(IgfsPath path, ClusterNode node, int type, Map<String, String> meta) {
         this(path, node, type);
 
         this.meta = meta;
@@ -145,7 +145,7 @@ public class IgniteFsEvent extends EventAdapter {
      *
      * @return File path.
      */
-    public IgniteFsPath path() {
+    public IgfsPath path() {
         return path;
     }
 
@@ -156,7 +156,7 @@ public class IgniteFsEvent extends EventAdapter {
      * @return New file or directory path or {@code null},
      *         if not relevant for this event.
      */
-    @Nullable public IgniteFsPath newPath() {
+    @Nullable public IgfsPath newPath() {
         return newPath;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/639ff503/modules/core/src/main/java/org/apache/ignite/ignitefs/Igfs.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/ignitefs/Igfs.java b/modules/core/src/main/java/org/apache/ignite/ignitefs/Igfs.java
new file mode 100644
index 0000000..bd12336
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/ignitefs/Igfs.java
@@ -0,0 +1,216 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.ignitefs;
+
+import org.apache.ignite.*;
+import org.jetbrains.annotations.*;
+
+import java.io.*;
+import java.util.*;
+
+/**
+ * Common file system interface. It provides a typical generalized "view" of any file system:
+ * <ul>
+ *     <li>list directories or get information for a single path</li>
+ *     <li>create/move/delete files or directories</li>
+ *     <li>write/read data streams into/from files</li>
+ * </ul>
+ *
+ * This is the minimum of functionality that is needed to work as secondary file system in dual modes of GGFS.
+ */
+public interface Igfs {
+    /** File property: user name. */
+    public static final String PROP_USER_NAME = "usrName";
+
+    /** File property: group name. */
+    public static final String PROP_GROUP_NAME = "grpName";
+
+    /** File property: permission. */
+    public static final String PROP_PERMISSION = "permission";
+
+    /**
+     * Checks if the specified path exists in the file system.
+     *
+     * @param path Path to check for existence in the file system.
+     * @return {@code True} if such file exists, otherwise - {@code false}.
+     * @throws IgniteException In case of error.
+     */
+    public boolean exists(IgfsPath path);
+
+    /**
+     * Updates file information for the specified path. Existent properties, not listed in the passed collection,
+     * will not be affected. Other properties will be added or overwritten. Passed properties with {@code null} values
+     * will be removed from the stored properties or ignored if they don't exist in the file info.
+     * <p>
+     * When working in {@code DUAL_SYNC} or {@code DUAL_ASYNC} modes only the following properties will be propagated
+     * to the secondary file system:
+     * <ul>
+     * <li>{@code usrName} - file owner name;</li>
+     * <li>{@code grpName} - file owner group;</li>
+     * <li>{@code permission} - Unix-style string representing file permissions.</li>
+     * </ul>
+     *
+     * @param path File path to set properties for.
+     * @param props Properties to update.
+     * @return File information for specified path or {@code null} if such path does not exist.
+     * @throws IgniteException In case of error.
+     */
+    public IgniteFsFile update(IgfsPath path, Map<String, String> props) throws IgniteException;
+
+    /**
+     * Renames/moves a file.
+     * <p>
+     * You are free to rename/move data files as you wish, but directories can be only renamed.
+     * You cannot move the directory between different parent directories.
+     * <p>
+     * Examples:
+     * <ul>
+     *     <li>"/work/file.txt" => "/home/project/Presentation Scenario.txt"</li>
+     *     <li>"/work" => "/work-2012.bkp"</li>
+     *     <li>"/work" => "<strike>/backups/work</strike>" - such operation is restricted for directories.</li>
+     * </ul>
+     *
+     * @param src Source file path to rename.
+     * @param dest Destination file path. If destination path is a directory, then source file will be placed
+     *     into destination directory with original name.
+     * @throws IgniteException In case of error.
+     * @throws IgfsFileNotFoundException If source file doesn't exist.
+     */
+    public void rename(IgfsPath src, IgfsPath dest) throws IgniteException;
+
+    /**
+     * Deletes file.
+     *
+     * @param path File path to delete.
+     * @param recursive Delete non-empty directories recursively.
+     * @return {@code True} in case of success, {@code false} otherwise.
+     * @throws IgniteException In case of error.
+     */
+    public boolean delete(IgfsPath path, boolean recursive) throws IgniteException;
+
+    /**
+     * Creates directories under specified path.
+     *
+     * @param path Path of directories chain to create.
+     * @throws IgniteException In case of error.
+     */
+    public void mkdirs(IgfsPath path) throws IgniteException;
+
+    /**
+     * Creates directories under specified path with the specified properties.
+     *
+     * @param path Path of directories chain to create.
+     * @param props Metadata properties to set on created directories.
+     * @throws IgniteException In case of error.
+     */
+    public void mkdirs(IgfsPath path, @Nullable Map<String, String> props) throws IgniteException;
+
+    /**
+     * Lists file paths under the specified path.
+     *
+     * @param path Path to list files under.
+     * @return List of files under the specified path.
+     * @throws IgniteException In case of error.
+     * @throws IgfsFileNotFoundException If path doesn't exist.
+     */
+    public Collection<IgfsPath> listPaths(IgfsPath path) throws IgniteException;
+
+    /**
+     * Lists files under the specified path.
+     *
+     * @param path Path to list files under.
+     * @return List of files under the specified path.
+     * @throws IgniteException In case of error.
+     * @throws IgfsFileNotFoundException If path doesn't exist.
+     */
+    public Collection<IgniteFsFile> listFiles(IgfsPath path) throws IgniteException;
+
+    /**
+     * Opens a file for reading.
+     *
+     * @param path File path to read.
+     * @param bufSize Read buffer size (bytes) or {@code zero} to use default value.
+     * @return File input stream to read data from.
+     * @throws IgniteException In case of error.
+     * @throws IgfsFileNotFoundException If path doesn't exist.
+     */
+    public IgfsReader open(IgfsPath path, int bufSize) throws IgniteException;
+
+    /**
+     * Creates a file and opens it for writing.
+     *
+     * @param path File path to create.
+     * @param overwrite Overwrite file if it already exists. Note: you cannot overwrite an existent directory.
+     * @return File output stream to write data to.
+     * @throws IgniteException In case of error.
+     */
+    public OutputStream create(IgfsPath path, boolean overwrite) throws IgniteException;
+
+    /**
+     * Creates a file and opens it for writing.
+     *
+     * @param path File path to create.
+     * @param bufSize Write buffer size (bytes) or {@code zero} to use default value.
+     * @param overwrite Overwrite file if it already exists. Note: you cannot overwrite an existent directory.
+     * @param replication Replication factor.
+     * @param blockSize Block size.
+     * @param props File properties to set.
+     * @return File output stream to write data to.
+     * @throws IgniteException In case of error.
+     */
+    public OutputStream create(IgfsPath path, int bufSize, boolean overwrite, int replication, long blockSize,
+       @Nullable Map<String, String> props) throws IgniteException;
+
+    /**
+     * Opens an output stream to an existing file for appending data.
+     *
+     * @param path File path to append.
+     * @param bufSize Write buffer size (bytes) or {@code zero} to use default value.
+     * @param create Create file if it doesn't exist yet.
+     * @param props File properties to set only in case it file was just created.
+     * @return File output stream to append data to.
+     * @throws IgniteException In case of error.
+     * @throws IgfsFileNotFoundException If path doesn't exist and create flag is {@code false}.
+     */
+    public OutputStream append(IgfsPath path, int bufSize, boolean create, @Nullable Map<String, String> props)
+        throws IgniteException;
+
+    /**
+     * Gets file information for the specified path.
+     *
+     * @param path Path to get information for.
+     * @return File information for specified path or {@code null} if such path does not exist.
+     * @throws IgniteException In case of error.
+     */
+    public IgniteFsFile info(IgfsPath path) throws IgniteException;
+
+    /**
+     * Gets used space in bytes.
+     *
+     * @return Used space in bytes.
+     * @throws IgniteException In case of error.
+     */
+    public long usedSpaceSize() throws IgniteException;
+
+    /**
+     * Gets the implementation specific properties of file system.
+     *
+     * @return Map of properties.
+     */
+    public Map<String,String> properties();
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/639ff503/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsFileNotFoundException.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsFileNotFoundException.java b/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsFileNotFoundException.java
new file mode 100644
index 0000000..1024030
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsFileNotFoundException.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.ignitefs;
+
+/**
+ * {@code GGFS} exception indicating that target resource is not found.
+ */
+public class IgfsFileNotFoundException extends IgniteFsInvalidPathException {
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /**
+     * Creates exception with error message specified.
+     *
+     * @param msg Error message.
+     */
+    public IgfsFileNotFoundException(String msg) {
+        super(msg);
+    }
+
+    /**
+     * Creates exception with given exception cause.
+     *
+     * @param cause Exception cause.
+     */
+    public IgfsFileNotFoundException(Throwable cause) {
+        super(cause);
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/639ff503/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsInputStream.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsInputStream.java b/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsInputStream.java
new file mode 100644
index 0000000..5e1c918
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsInputStream.java
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.ignitefs;
+
+import java.io.*;
+
+/**
+ * {@code GGFS} input stream to read data from the file system.
+ * It provides several additional methods for asynchronous access.
+ */
+public abstract class IgfsInputStream extends InputStream implements IgfsReader {
+    /**
+     * Gets file length during file open.
+     *
+     * @return File length.
+     */
+    public abstract long length();
+
+    /**
+     * Seek to the specified position.
+     *
+     * @param pos Position to seek to.
+     * @throws IOException In case of IO exception.
+     */
+    public abstract void seek(long pos) throws IOException;
+
+    /**
+     * Get the current position in the input stream.
+     *
+     * @return The current position in the input stream.
+     * @throws IOException In case of IO exception.
+     */
+    public abstract long position() throws IOException;
+
+    /**
+     * Read bytes from the given position in the stream to the given buffer.
+     * Continues to read until passed buffer becomes filled.
+     *
+     * @param pos Position in the input stream to seek.
+     * @param buf Buffer into which data is read.
+     * @throws IOException In case of IO exception.
+     */
+    public abstract void readFully(long pos, byte[] buf) throws IOException;
+
+    /**
+     *
+     * @param pos Position in the input stream to seek.
+     * @param buf Buffer into which data is read.
+     * @param off Offset in the buffer from which stream data should be written.
+     * @param len The number of bytes to read.
+     * @throws IOException In case of IO exception.
+     */
+    public abstract void readFully(long pos, byte[] buf, int off, int len) throws IOException;
+
+    /**
+     *
+     * @param pos Position in the input stream to seek.
+     * @param buf Buffer into which data is read.
+     * @param off Offset in the buffer from which stream data should be written.
+     * @param len The number of bytes to read.
+     * @return Total number of bytes read into the buffer, or -1 if there is no more data (EOF).
+     * @throws IOException In case of IO exception.
+     */
+    @Override public abstract int read(long pos, byte[] buf, int off, int len) throws IOException;
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/639ff503/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsPath.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsPath.java b/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsPath.java
new file mode 100644
index 0000000..36cd999
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsPath.java
@@ -0,0 +1,262 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.ignitefs;
+
+import org.apache.ignite.internal.util.io.*;
+import org.apache.ignite.internal.util.typedef.*;
+import org.apache.ignite.internal.util.typedef.internal.*;
+import org.jetbrains.annotations.*;
+
+import java.io.*;
+import java.net.*;
+import java.util.*;
+
+/**
+ * {@code GGFS} path to file in the file system. For example, to get information about
+ * a file you would use the following code:
+ * <pre name="code" class="java">
+ *     GridGgfsPath dirPath = new GridGgfsPath("/my/working/dir");
+ *     GridGgfsPath filePath = new GridGgfsPath(dirPath, "file.txt");
+ *
+ *     // Get metadata about file.
+ *     GridGgfsFile file = ggfs.info(filePath);
+ * </pre>
+ */
+public final class IgfsPath implements Comparable<IgfsPath>, Externalizable {
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /** The directory separator character. */
+    private static final char SLASH_CHAR = '/';
+
+    /** The directory separator. */
+    private static final String SLASH = "/";
+
+    /** URI representing this path. Should never change after object creation or de-serialization. */
+    private String path;
+
+    /**
+     * Constructs default root path.
+     */
+    public IgfsPath() {
+        path = SLASH;
+    }
+
+    /**
+     * Constructs a path from an URI
+     *
+     * @param uri URI to create path from.
+     */
+    public IgfsPath(URI uri) {
+        A.notNull(uri, "uri");
+
+        path = normalizePath(uri.getPath());
+    }
+
+    /**
+     * Constructs a path from the URI string.
+     *
+     * @param path URI string.
+     */
+    public IgfsPath(String path) {
+        A.ensure(!F.isEmpty(path), "'path' is null or empty");
+
+        this.path = normalizePath(path);
+    }
+
+    /**
+     * Resolve a child path against a parent path.
+     *
+     * @param parentPath Parent path.
+     * @param childPath Child path.
+     */
+    public IgfsPath(IgfsPath parentPath, String childPath) {
+        A.notNull(parentPath, "parentPath");
+
+        String path = GridFilenameUtils.concat(parentPath.path, childPath);
+
+        if (F.isEmpty(path))
+            throw new IllegalArgumentException("Failed to parse path" +
+                " [parent=" + parentPath + ", childPath=" + childPath + ']');
+
+        this.path = normalizePath(path);
+    }
+
+    /**
+     * Initialize path with (1) not-null, (2) normalized, (3) absolute and (4) unix-format path component.
+     *
+     * @param path Path.
+     * @return Normalized path.
+     */
+    private static String normalizePath(String path) {
+        assert path != null;
+
+        String normalizedPath = GridFilenameUtils.normalizeNoEndSeparator(path, true);
+
+        if (F.isEmpty(normalizedPath))
+            throw new IllegalArgumentException("Failed to normalize path: " + path);
+
+        if (!SLASH.equals(GridFilenameUtils.getPrefix(normalizedPath)))
+            throw new IllegalArgumentException("Path should be absolute: " + path);
+
+        assert !normalizedPath.isEmpty() : "Expects normalized path is not empty.";
+        assert normalizedPath.length() == 1 || !normalizedPath.endsWith(SLASH) :
+            "Expects normalized path is root or don't ends with '/' symbol.";
+
+        return normalizedPath;
+    }
+
+    /**
+     * Returns the final component of this path.
+     *
+     * @return The final component of this path.
+     */
+    public String name() {
+        return GridFilenameUtils.getName(path);
+    }
+
+    /**
+     * Returns a root for this path.
+     *
+     * @return Root for this path.
+     */
+    public IgfsPath root() {
+        return new IgfsPath();
+    }
+
+    /**
+     * Split full path on components.
+     *
+     * @return Path components.
+     */
+    public List<String> components() {
+        String path = this.path;
+
+        assert path.length() >= 1 : "Path expected to be absolute: " + path;
+
+        // Path is short-living object, so we don't need to cache component's resolution result.
+        return path.length() == 1 ? Collections.<String>emptyList() : Arrays.asList(path.substring(1).split(SLASH));
+    }
+
+    /**
+     * Returns the parent of a path or {@code null} if at root.
+     *
+     * @return The parent of a path or {@code null} if at root.
+     */
+    @Nullable public IgfsPath parent() {
+        String path = this.path;
+
+        if (path.length() == 1)
+            return null; // Current path is root.
+
+        path = GridFilenameUtils.getFullPathNoEndSeparator(path);
+
+        return new IgfsPath(path);
+    }
+
+    /**
+     * Adds a suffix to the final name in the path.
+     *
+     * @param suffix Suffix.
+     * @return Path with suffix.
+     */
+    public IgfsPath suffix(String suffix) {
+        A.ensure(!F.isEmpty(suffix), "'suffix' is null or empty.");
+        A.ensure(!suffix.contains(SLASH), "'suffix' contains file's separator '" + SLASH + "'");
+
+        return new IgfsPath(path + suffix);
+    }
+
+    /**
+     * Return the number of elements in this path.
+     *
+     * @return The number of elements in this path, zero depth means root directory.
+     */
+    public int depth() {
+        final String path = this.path;
+        final int size = path.length();
+
+        assert size >= 1 && path.charAt(0) == SLASH_CHAR : "Expects absolute path: " + path;
+
+        if (size == 1)
+            return 0;
+
+        int depth = 1;
+
+        // Ignore the first character.
+        for (int i = 1; i < size; i++)
+            if (path.charAt(i) == SLASH_CHAR)
+                depth++;
+
+        return depth;
+    }
+
+    /**
+     * Checks whether this path is a sub-directory of argument.
+     *
+     * @param path Path to check.
+     * @return {@code True} if argument is same or a sub-directory of this object.
+     */
+    public boolean isSubDirectoryOf(IgfsPath path) {
+        A.notNull(path, "path");
+
+        return this.path.startsWith(path.path.endsWith(SLASH) ? path.path : path.path + SLASH);
+    }
+
+    /**
+     * Checks if paths are identical.
+     *
+     * @param path Path to check.
+     * @return {@code True} if paths are identical.
+     */
+    public boolean isSame(IgfsPath path) {
+        A.notNull(path, "path");
+
+        return this == path || this.path.equals(path.path);
+    }
+
+    /** {@inheritDoc} */
+    @Override public int compareTo(IgfsPath o) {
+        return path.compareTo(o.path);
+    }
+
+    /** {@inheritDoc} */
+    @Override public void writeExternal(ObjectOutput out) throws IOException {
+        U.writeString(out, path);
+    }
+
+    /** {@inheritDoc} */
+    @Override public void readExternal(ObjectInput in) throws IOException {
+        path = U.readString(in);
+    }
+
+    /** {@inheritDoc} */
+    @Override public int hashCode() {
+        return path.hashCode();
+    }
+
+    /** {@inheritDoc} */
+    @Override public boolean equals(Object o) {
+        return o == this || o != null && getClass() == o.getClass() && path.equals(((IgfsPath)o).path);
+    }
+
+    /** {@inheritDoc} */
+    @Override public String toString() {
+        return path;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/639ff503/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsPathSummary.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsPathSummary.java b/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsPathSummary.java
new file mode 100644
index 0000000..72883d2
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsPathSummary.java
@@ -0,0 +1,138 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.ignitefs;
+
+import org.apache.ignite.internal.util.typedef.internal.*;
+
+import java.io.*;
+
+/**
+ * Path summary: total files count, total directories count, total length.
+ */
+public class IgfsPathSummary implements Externalizable {
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /** Path. */
+    private IgfsPath path;
+
+    /** File count. */
+    private int filesCnt;
+
+    /** Directories count. */
+    private int dirCnt;
+
+    /** Length consumed. */
+    private long totalLen;
+
+    /**
+     * Empty constructor required by {@link Externalizable}.
+     */
+    public IgfsPathSummary() {
+        // No-op.
+    }
+
+    /**
+     * Construct empty path summary.
+     *
+     * @param path Path.
+     */
+    public IgfsPathSummary(IgfsPath path) {
+        this.path = path;
+    }
+
+    /**
+     * @return Files count.
+     */
+    public int filesCount() {
+        return filesCnt;
+    }
+
+    /**
+     * @param filesCnt Files count.
+     */
+    public void filesCount(int filesCnt) {
+        this.filesCnt = filesCnt;
+    }
+
+    /**
+     * @return Directories count.
+     */
+    public int directoriesCount() {
+        return dirCnt;
+    }
+
+    /**
+     * @param dirCnt Directories count.
+     */
+    public void directoriesCount(int dirCnt) {
+        this.dirCnt = dirCnt;
+    }
+
+    /**
+     * @return Total length.
+     */
+    public long totalLength() {
+        return totalLen;
+    }
+
+    /**
+     * @param totalLen Total length.
+     */
+    public void totalLength(long totalLen) {
+        this.totalLen = totalLen;
+    }
+
+    /**
+     * @return Path for which summary is obtained.
+     */
+    public IgfsPath path() {
+        return path;
+    }
+
+    /**
+     * @param path Path for which summary is obtained.
+     */
+    public void path(IgfsPath path) {
+        this.path = path;
+    }
+
+    /** {@inheritDoc} */
+    @Override public void writeExternal(ObjectOutput out) throws IOException {
+        out.writeInt(filesCnt);
+        out.writeInt(dirCnt);
+        out.writeLong(totalLen);
+
+        path.writeExternal(out);
+    }
+
+    /** {@inheritDoc} */
+    @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
+        filesCnt = in.readInt();
+        dirCnt = in.readInt();
+        totalLen = in.readLong();
+
+        path = new IgfsPath();
+        path.readExternal(in);
+    }
+
+    /** {@inheritDoc} */
+    @Override public String toString() {
+        return S.toString(IgfsPathSummary.class, this);
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/639ff503/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsReader.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsReader.java b/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsReader.java
new file mode 100644
index 0000000..81b8ec1
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsReader.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.ignitefs;
+
+import java.io.*;
+
+/**
+ * The simplest data input interface to read from secondary file system in dual modes.
+ */
+public interface IgfsReader extends Closeable {
+    /**
+     * Read up to the specified number of bytes, from a given position within a file, and return the number of bytes
+     * read.
+     *
+     * @param pos Position in the input stream to seek.
+     * @param buf Buffer into which data is read.
+     * @param off Offset in the buffer from which stream data should be written.
+     * @param len The number of bytes to read.
+     * @return Total number of bytes read into the buffer, or -1 if there is no more data (EOF).
+     * @throws IOException In case of any exception.
+     */
+    public int read(long pos, byte[] buf, int off, int len) throws IOException;
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/639ff503/modules/core/src/main/java/org/apache/ignite/ignitefs/IgniteFsBlockLocation.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/ignitefs/IgniteFsBlockLocation.java b/modules/core/src/main/java/org/apache/ignite/ignitefs/IgniteFsBlockLocation.java
index 226a01f..6ed4509 100644
--- a/modules/core/src/main/java/org/apache/ignite/ignitefs/IgniteFsBlockLocation.java
+++ b/modules/core/src/main/java/org/apache/ignite/ignitefs/IgniteFsBlockLocation.java
@@ -22,7 +22,7 @@ import java.util.*;
 /**
  * {@code GGFS} file's data block location in the grid. It is used to determine
  * node affinity of a certain file block within the Grid by calling
- * {@link org.apache.ignite.IgniteFs#affinity(IgniteFsPath, long, long)} method.
+ * {@link org.apache.ignite.IgniteFs#affinity(IgfsPath, long, long)} method.
  */
 public interface IgniteFsBlockLocation {
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/639ff503/modules/core/src/main/java/org/apache/ignite/ignitefs/IgniteFsConcurrentModificationException.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/ignitefs/IgniteFsConcurrentModificationException.java b/modules/core/src/main/java/org/apache/ignite/ignitefs/IgniteFsConcurrentModificationException.java
index af4bbdc..7461844 100644
--- a/modules/core/src/main/java/org/apache/ignite/ignitefs/IgniteFsConcurrentModificationException.java
+++ b/modules/core/src/main/java/org/apache/ignite/ignitefs/IgniteFsConcurrentModificationException.java
@@ -30,7 +30,7 @@ public class IgniteFsConcurrentModificationException extends IgniteFsException {
      *
      * @param path Affected path.
      */
-    public IgniteFsConcurrentModificationException(IgniteFsPath path) {
+    public IgniteFsConcurrentModificationException(IgfsPath path) {
         super("File system entry has been modified concurrently: " + path, null);
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/639ff503/modules/core/src/main/java/org/apache/ignite/ignitefs/IgniteFsFile.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/ignitefs/IgniteFsFile.java b/modules/core/src/main/java/org/apache/ignite/ignitefs/IgniteFsFile.java
index 95dd55b..badc713 100644
--- a/modules/core/src/main/java/org/apache/ignite/ignitefs/IgniteFsFile.java
+++ b/modules/core/src/main/java/org/apache/ignite/ignitefs/IgniteFsFile.java
@@ -37,7 +37,7 @@ public interface IgniteFsFile {
      *
      * @return Path to file.
      */
-    public IgniteFsPath path();
+    public IgfsPath path();
 
     /**
      * Check this file is a data file.
@@ -77,7 +77,7 @@ public interface IgniteFsFile {
     /**
      * Gets file last access time. File last access time is not updated automatically due to
      * performance considerations and can be updated on demand with
-     * {@link org.apache.ignite.IgniteFs#setTimes(IgniteFsPath, long, long)} method.
+     * {@link org.apache.ignite.IgniteFs#setTimes(IgfsPath, long, long)} method.
      * <p>
      * By default last access time equals file creation time.
      *

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/639ff503/modules/core/src/main/java/org/apache/ignite/ignitefs/IgniteFsFileNotFoundException.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/ignitefs/IgniteFsFileNotFoundException.java b/modules/core/src/main/java/org/apache/ignite/ignitefs/IgniteFsFileNotFoundException.java
deleted file mode 100644
index bf7cd65..0000000
--- a/modules/core/src/main/java/org/apache/ignite/ignitefs/IgniteFsFileNotFoundException.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.ignitefs;
-
-/**
- * {@code GGFS} exception indicating that target resource is not found.
- */
-public class IgniteFsFileNotFoundException extends IgniteFsInvalidPathException {
-    /** */
-    private static final long serialVersionUID = 0L;
-
-    /**
-     * Creates exception with error message specified.
-     *
-     * @param msg Error message.
-     */
-    public IgniteFsFileNotFoundException(String msg) {
-        super(msg);
-    }
-
-    /**
-     * Creates exception with given exception cause.
-     *
-     * @param cause Exception cause.
-     */
-    public IgniteFsFileNotFoundException(Throwable cause) {
-        super(cause);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/639ff503/modules/core/src/main/java/org/apache/ignite/ignitefs/IgniteFsInputStream.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/ignitefs/IgniteFsInputStream.java b/modules/core/src/main/java/org/apache/ignite/ignitefs/IgniteFsInputStream.java
deleted file mode 100644
index 510b948..0000000
--- a/modules/core/src/main/java/org/apache/ignite/ignitefs/IgniteFsInputStream.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.ignitefs;
-
-import java.io.*;
-
-/**
- * {@code GGFS} input stream to read data from the file system.
- * It provides several additional methods for asynchronous access.
- */
-public abstract class IgniteFsInputStream extends InputStream implements IgniteFsReader {
-    /**
-     * Gets file length during file open.
-     *
-     * @return File length.
-     */
-    public abstract long length();
-
-    /**
-     * Seek to the specified position.
-     *
-     * @param pos Position to seek to.
-     * @throws IOException In case of IO exception.
-     */
-    public abstract void seek(long pos) throws IOException;
-
-    /**
-     * Get the current position in the input stream.
-     *
-     * @return The current position in the input stream.
-     * @throws IOException In case of IO exception.
-     */
-    public abstract long position() throws IOException;
-
-    /**
-     * Read bytes from the given position in the stream to the given buffer.
-     * Continues to read until passed buffer becomes filled.
-     *
-     * @param pos Position in the input stream to seek.
-     * @param buf Buffer into which data is read.
-     * @throws IOException In case of IO exception.
-     */
-    public abstract void readFully(long pos, byte[] buf) throws IOException;
-
-    /**
-     *
-     * @param pos Position in the input stream to seek.
-     * @param buf Buffer into which data is read.
-     * @param off Offset in the buffer from which stream data should be written.
-     * @param len The number of bytes to read.
-     * @throws IOException In case of IO exception.
-     */
-    public abstract void readFully(long pos, byte[] buf, int off, int len) throws IOException;
-
-    /**
-     *
-     * @param pos Position in the input stream to seek.
-     * @param buf Buffer into which data is read.
-     * @param off Offset in the buffer from which stream data should be written.
-     * @param len The number of bytes to read.
-     * @return Total number of bytes read into the buffer, or -1 if there is no more data (EOF).
-     * @throws IOException In case of IO exception.
-     */
-    @Override public abstract int read(long pos, byte[] buf, int off, int len) throws IOException;
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/639ff503/modules/core/src/main/java/org/apache/ignite/ignitefs/IgniteFsPath.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/ignitefs/IgniteFsPath.java b/modules/core/src/main/java/org/apache/ignite/ignitefs/IgniteFsPath.java
deleted file mode 100644
index f6e1d14..0000000
--- a/modules/core/src/main/java/org/apache/ignite/ignitefs/IgniteFsPath.java
+++ /dev/null
@@ -1,262 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.ignitefs;
-
-import org.apache.ignite.internal.util.io.*;
-import org.apache.ignite.internal.util.typedef.*;
-import org.apache.ignite.internal.util.typedef.internal.*;
-import org.jetbrains.annotations.*;
-
-import java.io.*;
-import java.net.*;
-import java.util.*;
-
-/**
- * {@code GGFS} path to file in the file system. For example, to get information about
- * a file you would use the following code:
- * <pre name="code" class="java">
- *     GridGgfsPath dirPath = new GridGgfsPath("/my/working/dir");
- *     GridGgfsPath filePath = new GridGgfsPath(dirPath, "file.txt");
- *
- *     // Get metadata about file.
- *     GridGgfsFile file = ggfs.info(filePath);
- * </pre>
- */
-public final class IgniteFsPath implements Comparable<IgniteFsPath>, Externalizable {
-    /** */
-    private static final long serialVersionUID = 0L;
-
-    /** The directory separator character. */
-    private static final char SLASH_CHAR = '/';
-
-    /** The directory separator. */
-    private static final String SLASH = "/";
-
-    /** URI representing this path. Should never change after object creation or de-serialization. */
-    private String path;
-
-    /**
-     * Constructs default root path.
-     */
-    public IgniteFsPath() {
-        path = SLASH;
-    }
-
-    /**
-     * Constructs a path from an URI
-     *
-     * @param uri URI to create path from.
-     */
-    public IgniteFsPath(URI uri) {
-        A.notNull(uri, "uri");
-
-        path = normalizePath(uri.getPath());
-    }
-
-    /**
-     * Constructs a path from the URI string.
-     *
-     * @param path URI string.
-     */
-    public IgniteFsPath(String path) {
-        A.ensure(!F.isEmpty(path), "'path' is null or empty");
-
-        this.path = normalizePath(path);
-    }
-
-    /**
-     * Resolve a child path against a parent path.
-     *
-     * @param parentPath Parent path.
-     * @param childPath Child path.
-     */
-    public IgniteFsPath(IgniteFsPath parentPath, String childPath) {
-        A.notNull(parentPath, "parentPath");
-
-        String path = GridFilenameUtils.concat(parentPath.path, childPath);
-
-        if (F.isEmpty(path))
-            throw new IllegalArgumentException("Failed to parse path" +
-                " [parent=" + parentPath + ", childPath=" + childPath + ']');
-
-        this.path = normalizePath(path);
-    }
-
-    /**
-     * Initialize path with (1) not-null, (2) normalized, (3) absolute and (4) unix-format path component.
-     *
-     * @param path Path.
-     * @return Normalized path.
-     */
-    private static String normalizePath(String path) {
-        assert path != null;
-
-        String normalizedPath = GridFilenameUtils.normalizeNoEndSeparator(path, true);
-
-        if (F.isEmpty(normalizedPath))
-            throw new IllegalArgumentException("Failed to normalize path: " + path);
-
-        if (!SLASH.equals(GridFilenameUtils.getPrefix(normalizedPath)))
-            throw new IllegalArgumentException("Path should be absolute: " + path);
-
-        assert !normalizedPath.isEmpty() : "Expects normalized path is not empty.";
-        assert normalizedPath.length() == 1 || !normalizedPath.endsWith(SLASH) :
-            "Expects normalized path is root or don't ends with '/' symbol.";
-
-        return normalizedPath;
-    }
-
-    /**
-     * Returns the final component of this path.
-     *
-     * @return The final component of this path.
-     */
-    public String name() {
-        return GridFilenameUtils.getName(path);
-    }
-
-    /**
-     * Returns a root for this path.
-     *
-     * @return Root for this path.
-     */
-    public IgniteFsPath root() {
-        return new IgniteFsPath();
-    }
-
-    /**
-     * Split full path on components.
-     *
-     * @return Path components.
-     */
-    public List<String> components() {
-        String path = this.path;
-
-        assert path.length() >= 1 : "Path expected to be absolute: " + path;
-
-        // Path is short-living object, so we don't need to cache component's resolution result.
-        return path.length() == 1 ? Collections.<String>emptyList() : Arrays.asList(path.substring(1).split(SLASH));
-    }
-
-    /**
-     * Returns the parent of a path or {@code null} if at root.
-     *
-     * @return The parent of a path or {@code null} if at root.
-     */
-    @Nullable public IgniteFsPath parent() {
-        String path = this.path;
-
-        if (path.length() == 1)
-            return null; // Current path is root.
-
-        path = GridFilenameUtils.getFullPathNoEndSeparator(path);
-
-        return new IgniteFsPath(path);
-    }
-
-    /**
-     * Adds a suffix to the final name in the path.
-     *
-     * @param suffix Suffix.
-     * @return Path with suffix.
-     */
-    public IgniteFsPath suffix(String suffix) {
-        A.ensure(!F.isEmpty(suffix), "'suffix' is null or empty.");
-        A.ensure(!suffix.contains(SLASH), "'suffix' contains file's separator '" + SLASH + "'");
-
-        return new IgniteFsPath(path + suffix);
-    }
-
-    /**
-     * Return the number of elements in this path.
-     *
-     * @return The number of elements in this path, zero depth means root directory.
-     */
-    public int depth() {
-        final String path = this.path;
-        final int size = path.length();
-
-        assert size >= 1 && path.charAt(0) == SLASH_CHAR : "Expects absolute path: " + path;
-
-        if (size == 1)
-            return 0;
-
-        int depth = 1;
-
-        // Ignore the first character.
-        for (int i = 1; i < size; i++)
-            if (path.charAt(i) == SLASH_CHAR)
-                depth++;
-
-        return depth;
-    }
-
-    /**
-     * Checks whether this path is a sub-directory of argument.
-     *
-     * @param path Path to check.
-     * @return {@code True} if argument is same or a sub-directory of this object.
-     */
-    public boolean isSubDirectoryOf(IgniteFsPath path) {
-        A.notNull(path, "path");
-
-        return this.path.startsWith(path.path.endsWith(SLASH) ? path.path : path.path + SLASH);
-    }
-
-    /**
-     * Checks if paths are identical.
-     *
-     * @param path Path to check.
-     * @return {@code True} if paths are identical.
-     */
-    public boolean isSame(IgniteFsPath path) {
-        A.notNull(path, "path");
-
-        return this == path || this.path.equals(path.path);
-    }
-
-    /** {@inheritDoc} */
-    @Override public int compareTo(IgniteFsPath o) {
-        return path.compareTo(o.path);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void writeExternal(ObjectOutput out) throws IOException {
-        U.writeString(out, path);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void readExternal(ObjectInput in) throws IOException {
-        path = U.readString(in);
-    }
-
-    /** {@inheritDoc} */
-    @Override public int hashCode() {
-        return path.hashCode();
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean equals(Object o) {
-        return o == this || o != null && getClass() == o.getClass() && path.equals(((IgniteFsPath)o).path);
-    }
-
-    /** {@inheritDoc} */
-    @Override public String toString() {
-        return path;
-    }
-}


Mime
View raw message