ignite-commits mailing list archives

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


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

Branch: refs/heads/ignite-226
Commit: 19c7b35cb3d466d631058b9f8c2e8570e57f0fd2
Parents: 639ff50
Author: vozerov-gridgain <vozerov@gridgain.com>
Authored: Fri Feb 13 13:11:34 2015 +0300
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Fri Feb 13 13:11:36 2015 +0300

----------------------------------------------------------------------
 examples/config/filesystem/example-ignitefs.xml |   2 +-
 .../examples/ignitefs/IgniteFsExample.java      |   4 +-
 .../ignitefs/IgniteFsMapReduceExample.java      |   2 +-
 .../main/java/org/apache/ignite/IgniteFs.java   |  16 +-
 .../configuration/IgniteFsConfiguration.java    |  18 +-
 .../java/org/apache/ignite/ignitefs/Igfs.java   |   6 +-
 .../ignite/ignitefs/IgfsBlockLocation.java      |  63 ++++++
 .../IgfsConcurrentModificationException.java    |  36 ++++
 .../ignitefs/IgfsCorruptedFileException.java    |  50 +++++
 .../apache/ignite/ignitefs/IgfsException.java   |  57 +++++
 .../org/apache/ignite/ignitefs/IgfsFile.java    | 120 +++++++++++
 .../ignitefs/IgfsFileNotFoundException.java     |   2 +-
 .../ignitefs/IgfsGroupDataBlocksKeyMapper.java  | 101 +++++++++
 .../IgfsInvalidHdfsVersionException.java        |  42 ++++
 .../ignitefs/IgfsInvalidPathException.java      |  57 +++++
 .../org/apache/ignite/ignitefs/IgfsMetrics.java | 159 ++++++++++++++
 .../org/apache/ignite/ignitefs/IgfsMode.java    |  80 +++++++
 .../ignitefs/IgfsOutOfSpaceException.java       |  58 +++++
 .../ignite/ignitefs/IgfsOutputStream.java       |  35 +++
 .../IgfsParentNotDirectoryException.java        |  50 +++++
 .../IgfsPathAlreadyExistsException.java         |  50 +++++
 .../ignite/ignitefs/IgniteFsBlockLocation.java  |  63 ------
 ...IgniteFsConcurrentModificationException.java |  36 ----
 .../IgniteFsCorruptedFileException.java         |  50 -----
 .../ignite/ignitefs/IgniteFsException.java      |  57 -----
 .../apache/ignite/ignitefs/IgniteFsFile.java    | 120 -----------
 .../ignite/ignitefs/IgniteFsFileSystem.java     | 216 -------------------
 .../IgniteFsGroupDataBlocksKeyMapper.java       | 101 ---------
 .../IgniteFsInvalidHdfsVersionException.java    |  42 ----
 .../ignitefs/IgniteFsInvalidPathException.java  |  57 -----
 .../apache/ignite/ignitefs/IgniteFsMetrics.java | 159 --------------
 .../apache/ignite/ignitefs/IgniteFsMode.java    |  80 -------
 .../ignitefs/IgniteFsOutOfSpaceException.java   |  58 -----
 .../ignite/ignitefs/IgniteFsOutputStream.java   |  35 ---
 .../IgniteFsParentNotDirectoryException.java    |  50 -----
 .../IgniteFsPathAlreadyExistsException.java     |  50 -----
 .../ignite/ignitefs/mapreduce/IgfsTask.java     |   6 +-
 .../internal/fs/common/IgfsControlResponse.java |  30 +--
 .../ignite/internal/fs/common/IgfsLogger.java   |  18 +-
 .../internal/processors/fs/IgfsAsyncImpl.java   |  22 +-
 .../internal/processors/fs/IgfsAttributes.java  |  22 +-
 .../processors/fs/IgfsBlockLocationImpl.java    |   4 +-
 .../internal/processors/fs/IgfsDataManager.java |  30 +--
 .../fs/IgfsDirectoryNotEmptyException.java      |   2 +-
 .../internal/processors/fs/IgfsFileImpl.java    |   2 +-
 .../ignite/internal/processors/fs/IgfsImpl.java | 116 +++++-----
 .../processors/fs/IgfsInputStreamImpl.java      |   4 +-
 .../internal/processors/fs/IgfsIpcHandler.java  |   4 +-
 .../internal/processors/fs/IgfsMetaManager.java |  26 +--
 .../processors/fs/IgfsMetricsAdapter.java       |   2 +-
 .../processors/fs/IgfsModeResolver.java         |  36 ++--
 .../processors/fs/IgfsOutputStreamAdapter.java  |   2 +-
 .../processors/fs/IgfsOutputStreamImpl.java     |   8 +-
 .../internal/processors/fs/IgfsPaths.java       |  18 +-
 .../internal/processors/fs/IgfsProcessor.java   |  12 +-
 .../internal/processors/job/GridJobWorker.java  |   2 +-
 .../processors/task/GridTaskWorker.java         |   2 +-
 .../ignite/internal/visor/ggfs/VisorGgfs.java   |   6 +-
 .../internal/visor/ggfs/VisorGgfsMetrics.java   |   4 +-
 .../internal/visor/ggfs/VisorGgfsProfiler.java  |   2 +-
 .../visor/ggfs/VisorGgfsProfilerEntry.java      |   6 +-
 .../visor/ggfs/VisorGgfsProfilerTask.java       |  10 +-
 .../visor/node/VisorGgfsConfiguration.java      |  12 +-
 modules/core/src/test/config/ggfs-loopback.xml  |   2 +-
 modules/core/src/test/config/ggfs-shmem.xml     |   2 +-
 .../ignitefs/IgfsEventsAbstractSelfTest.java    |   4 +-
 .../IgfsFragmentizerAbstractSelfTest.java       |   2 +-
 .../ignitefs/IgfsFragmentizerSelfTest.java      |   8 +-
 .../IgfsFragmentizerTopologySelfTest.java       |   2 +-
 ...heIgfsPerBlockLruEvictionPolicySelfTest.java |  16 +-
 .../processors/fs/IgfsAbstractSelfTest.java     |  76 +++----
 .../processors/fs/IgfsAttributesSelfTest.java   |   4 +-
 .../processors/fs/IgfsCacheSelfTest.java        |   2 +-
 .../processors/fs/IgfsDataManagerSelfTest.java  |  30 +--
 .../processors/fs/IgfsDualAbstractSelfTest.java |  18 +-
 .../processors/fs/IgfsDualAsyncSelfTest.java    |   2 +-
 .../processors/fs/IgfsDualSyncSelfTest.java     |   2 +-
 ...IgfsGroupDataBlockKeyMapperHashSelfTest.java |   8 +-
 .../processors/fs/IgfsMetaManagerSelfTest.java  |   6 +-
 .../processors/fs/IgfsMetricsSelfTest.java      |  32 +--
 .../processors/fs/IgfsModeResolverSelfTest.java |  18 +-
 .../processors/fs/IgfsModesSelfTest.java        |  20 +-
 .../fs/IgfsPrimaryOffheapTieredSelfTest.java    |   2 +-
 .../fs/IgfsPrimaryOffheapValuesSelfTest.java    |   2 +-
 .../processors/fs/IgfsPrimarySelfTest.java      |   2 +-
 .../processors/fs/IgfsProcessorSelfTest.java    |  40 ++--
 .../fs/IgfsProcessorValidationSelfTest.java     |   6 +-
 ...IpcEndpointRegistrationAbstractSelfTest.java |   2 +-
 .../processors/fs/IgfsSizeSelfTest.java         |  12 +-
 .../processors/fs/IgfsStreamsSelfTest.java      |  18 +-
 .../processors/fs/IgfsTaskSelfTest.java         |   4 +-
 .../IgfsAbstractRecordResolverSelfTest.java     |   6 +-
 .../hadoop/v1/IgfsHadoopFileSystem.java         |  44 ++--
 .../hadoop/v2/IgfsHadoopFileSystem.java         |  36 ++--
 .../ignite/internal/fs/hadoop/IgfsHadoop.java   |   8 +-
 .../fs/hadoop/IgfsHadoopFileSystemWrapper.java  |  26 +--
 .../internal/fs/hadoop/IgfsHadoopInProc.java    |  16 +-
 .../internal/fs/hadoop/IgfsHadoopOutProc.java   |  14 +-
 .../internal/fs/hadoop/IgfsHadoopUtils.java     |   4 +-
 .../internal/fs/hadoop/IgfsHadoopWrapper.java   |  24 +--
 .../GridHadoopDefaultMapReducePlanner.java      |   4 +-
 .../GridHadoopClientProtocolSelfTest.java       |   2 +-
 .../ignite/ignitefs/IgfsEventsTestSuite.java    |   2 +-
 .../IgfsHadoop20FileSystemAbstractSelfTest.java |  18 +-
 ...doop20FileSystemLoopbackPrimarySelfTest.java |   2 +-
 ...sHadoop20FileSystemShmemPrimarySelfTest.java |   2 +-
 .../IgfsHadoopDualAbstractSelfTest.java         |  12 +-
 .../ignitefs/IgfsHadoopDualAsyncSelfTest.java   |   2 +-
 .../ignitefs/IgfsHadoopDualSyncSelfTest.java    |   2 +-
 .../IgfsHadoopFileSystemAbstractSelfTest.java   |  16 +-
 .../IgfsHadoopFileSystemClientSelfTest.java     |   2 +-
 .../IgfsHadoopFileSystemHandshakeSelfTest.java  |   4 +-
 .../IgfsHadoopFileSystemIpcCacheSelfTest.java   |   2 +-
 .../IgfsHadoopFileSystemLoggerSelfTest.java     |   4 +-
 ...IgfsHadoopFileSystemLoggerStateSelfTest.java |   4 +-
 ...adoopFileSystemLoopbackAbstractSelfTest.java |   2 +-
 ...SystemLoopbackEmbeddedDualAsyncSelfTest.java |   2 +-
 ...eSystemLoopbackEmbeddedDualSyncSelfTest.java |   2 +-
 ...leSystemLoopbackEmbeddedPrimarySelfTest.java |   2 +-
 ...SystemLoopbackEmbeddedSecondarySelfTest.java |   2 +-
 ...SystemLoopbackExternalDualAsyncSelfTest.java |   2 +-
 ...eSystemLoopbackExternalDualSyncSelfTest.java |   2 +-
 ...leSystemLoopbackExternalPrimarySelfTest.java |   2 +-
 ...SystemLoopbackExternalSecondarySelfTest.java |   2 +-
 ...fsHadoopFileSystemSecondaryModeSelfTest.java |  14 +-
 ...fsHadoopFileSystemShmemAbstractSelfTest.java |   2 +-
 ...ileSystemShmemEmbeddedDualAsyncSelfTest.java |   2 +-
 ...FileSystemShmemEmbeddedDualSyncSelfTest.java |   2 +-
 ...pFileSystemShmemEmbeddedPrimarySelfTest.java |   2 +-
 ...ileSystemShmemEmbeddedSecondarySelfTest.java |   2 +-
 ...ileSystemShmemExternalDualAsyncSelfTest.java |   2 +-
 ...FileSystemShmemExternalDualSyncSelfTest.java |   2 +-
 ...pFileSystemShmemExternalPrimarySelfTest.java |   2 +-
 ...ileSystemShmemExternalSecondarySelfTest.java |   2 +-
 .../ignitefs/IgfsNearOnlyMultiNodeSelfTest.java |   2 +-
 .../hadoop/GridHadoopAbstractSelfTest.java      |   2 +-
 ...idHadoopDefaultMapReducePlannerSelfTest.java |  30 +--
 ...GridHadoopExternalTaskExecutionSelfTest.java |   2 +-
 138 files changed, 1529 insertions(+), 1745 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/19c7b35c/examples/config/filesystem/example-ignitefs.xml
----------------------------------------------------------------------
diff --git a/examples/config/filesystem/example-ignitefs.xml b/examples/config/filesystem/example-ignitefs.xml
index 74de394..8ffb278 100644
--- a/examples/config/filesystem/example-ignitefs.xml
+++ b/examples/config/filesystem/example-ignitefs.xml
@@ -122,7 +122,7 @@
                     <property name="distributionMode" value="PARTITIONED_ONLY"/>
                     <property name="backups" value="0"/>
                     <property name="affinityMapper">
-                        <bean class="org.apache.ignite.ignitefs.IgniteFsGroupDataBlocksKeyMapper">
+                        <bean class="org.apache.ignite.ignitefs.IgfsGroupDataBlocksKeyMapper">
                             <!-- Haw many blocks in row will be stored on the same node. -->
                             <constructor-arg value="512"/>
                         </bean>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/19c7b35c/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 67ac39e..cd247a4 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
@@ -120,7 +120,7 @@ public final class IgniteFsExample {
                 System.out.println();
                 System.out.println(">>> Deleted " + (isFile ? "file" : "directory") + ": " + path);
             }
-            catch (IgniteFsException e) {
+            catch (IgfsException e) {
                 System.out.println();
                 System.out.println(">>> Failed to delete " + (isFile ? "file" : "directory") + " [path=" + path +
                     ", msg=" + e.getMessage() + ']');
@@ -149,7 +149,7 @@ public final class IgniteFsExample {
             System.out.println();
             System.out.println(">>> Created directory: " + path);
         }
-        catch (IgniteFsException e) {
+        catch (IgfsException e) {
             System.out.println();
             System.out.println(">>> Failed to create a directory [path=" + path + ", msg=" + e.getMessage() + ']');
         }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/19c7b35c/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 89d10e7..b5f913c 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
@@ -99,7 +99,7 @@ public class IgniteFsMapReduceExample {
         System.out.println("Copying file to IgniteFs: " + file);
 
         try (
-            IgniteFsOutputStream os = fs.create(fsPath, true);
+            IgfsOutputStream os = fs.create(fsPath, true);
             FileInputStream fis = new FileInputStream(file)
         ) {
             byte[] buf = new byte[2048];

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/19c7b35c/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 f62c477..47632cf 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteFs.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteFs.java
@@ -129,7 +129,7 @@ public interface IgniteFs extends Igfs, IgniteAsyncSupport {
      * @return File output stream to write data to.
      * @throws IgniteException In case of error.
      */
-    @Override public IgniteFsOutputStream create(IgfsPath path, boolean overwrite) throws IgniteException;
+    @Override public IgfsOutputStream create(IgfsPath path, boolean overwrite) throws IgniteException;
 
     /**
      * Creates a file and opens it for writing.
@@ -143,7 +143,7 @@ public interface IgniteFs extends Igfs, IgniteAsyncSupport {
      * @return File output stream to write data to.
      * @throws IgniteException In case of error.
      */
-    @Override public IgniteFsOutputStream create(IgfsPath path, int bufSize, boolean overwrite, int replication,
+    @Override public IgfsOutputStream 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 Igfs, IgniteAsyncSupport {
      * @return File output stream to write data to.
      * @throws IgniteException In case of error.
      */
-    public IgniteFsOutputStream create(IgfsPath path, int bufSize, boolean overwrite,
+    public IgfsOutputStream create(IgfsPath path, int bufSize, boolean overwrite,
         @Nullable IgniteUuid affKey, int replication, long blockSize, @Nullable Map<String, String> props)
         throws IgniteException;
 
@@ -173,7 +173,7 @@ public interface IgniteFs extends Igfs, IgniteAsyncSupport {
      * @throws IgniteException In case of error.
      * @throws org.apache.ignite.ignitefs.IgfsFileNotFoundException If path doesn't exist and create flag is {@code false}.
      */
-    public IgniteFsOutputStream append(IgfsPath path, boolean create) throws IgniteException;
+    public IgfsOutputStream append(IgfsPath path, boolean create) throws IgniteException;
 
     /**
      * Opens an output stream to an existing file for appending data.
@@ -186,7 +186,7 @@ public interface IgniteFs extends Igfs, IgniteAsyncSupport {
      * @throws IgniteException In case of error.
      * @throws org.apache.ignite.ignitefs.IgfsFileNotFoundException If path doesn't exist and create flag is {@code false}.
      */
-    @Override public IgniteFsOutputStream append(IgfsPath path, int bufSize, boolean create,
+    @Override public IgfsOutputStream append(IgfsPath path, int bufSize, boolean create,
         @Nullable Map<String, String> props) throws IgniteException;
 
     /**
@@ -213,7 +213,7 @@ public interface IgniteFs extends Igfs, IgniteAsyncSupport {
      * @throws IgniteException In case of error.
      * @throws org.apache.ignite.ignitefs.IgfsFileNotFoundException If path doesn't exist.
      */
-    public Collection<IgniteFsBlockLocation> affinity(IgfsPath path, long start, long len) throws IgniteException;
+    public Collection<IgfsBlockLocation> 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
@@ -228,7 +228,7 @@ public interface IgniteFs extends Igfs, IgniteAsyncSupport {
      * @throws IgniteException In case of error.
      * @throws org.apache.ignite.ignitefs.IgfsFileNotFoundException If path doesn't exist.
      */
-    public Collection<IgniteFsBlockLocation> affinity(IgfsPath path, long start, long len, long maxLen)
+    public Collection<IgfsBlockLocation> affinity(IgfsPath path, long start, long len, long maxLen)
         throws IgniteException;
 
     /**
@@ -237,7 +237,7 @@ public interface IgniteFs extends Igfs, IgniteAsyncSupport {
      * @return Metrics.
      * @throws IgniteException In case of error.
      */
-    public IgniteFsMetrics metrics() throws IgniteException;
+    public IgfsMetrics metrics() throws IgniteException;
 
     /**
      * Resets metrics for this file system.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/19c7b35c/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 675f7b2..d12e94d 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
@@ -67,7 +67,7 @@ public class IgniteFsConfiguration {
     public static final int DFLT_PER_NODE_PARALLEL_BATCH_CNT = 8;
 
     /** Default GGFS mode. */
-    public static final IgniteFsMode DFLT_MODE = IgniteFsMode.DUAL_ASYNC;
+    public static final IgfsMode DFLT_MODE = IgfsMode.DUAL_ASYNC;
 
     /** Default file's data block size (bytes). */
     public static final int DFLT_BLOCK_SIZE = 1 << 16;
@@ -124,7 +124,7 @@ public class IgniteFsConfiguration {
     private Igfs secondaryFs;
 
     /** GGFS mode. */
-    private IgniteFsMode dfltMode = DFLT_MODE;
+    private IgfsMode dfltMode = DFLT_MODE;
 
     /** Fragmentizer throttling block length. */
     private long fragmentizerThrottlingBlockLen = DFLT_FRAGMENTIZER_THROTTLING_BLOCK_LENGTH;
@@ -142,7 +142,7 @@ public class IgniteFsConfiguration {
     private boolean fragmentizerEnabled = DFLT_FRAGMENTIZER_ENABLED;
 
     /** Path modes. */
-    private Map<String, IgniteFsMode> pathModes;
+    private Map<String, IgfsMode> pathModes;
 
     /** Maximum space. */
     private long maxSpace;
@@ -491,12 +491,12 @@ public class IgniteFsConfiguration {
      * Secondary Hadoop file system is provided for pass-through, write-through, and read-through
      * purposes.
      * <p>
-     * Default mode is {@link IgniteFsMode#DUAL_ASYNC}. If secondary Hadoop file system is
-     * not configured, this mode will work just like {@link IgniteFsMode#PRIMARY} mode.
+     * Default mode is {@link org.apache.ignite.ignitefs.IgfsMode#DUAL_ASYNC}. If secondary Hadoop file system is
+     * not configured, this mode will work just like {@link org.apache.ignite.ignitefs.IgfsMode#PRIMARY} mode.
      *
      * @return Mode to specify how GGFS interacts with secondary HDFS file system.
      */
-    public IgniteFsMode getDefaultMode() {
+    public IgfsMode getDefaultMode() {
         return dfltMode;
     }
 
@@ -507,7 +507,7 @@ public class IgniteFsConfiguration {
      *
      * @param dfltMode {@code GGFS} mode.
      */
-    public void setDefaultMode(IgniteFsMode dfltMode) {
+    public void setDefaultMode(IgfsMode dfltMode) {
         this.dfltMode = dfltMode;
     }
 
@@ -547,7 +547,7 @@ public class IgniteFsConfiguration {
      *
      * @return Map of paths to {@code GGFS} modes.
      */
-    @Nullable public Map<String, IgniteFsMode> getPathModes() {
+    @Nullable public Map<String, IgfsMode> getPathModes() {
         return pathModes;
     }
 
@@ -559,7 +559,7 @@ public class IgniteFsConfiguration {
      *
      * @param pathModes Map of paths to {@code GGFS} modes.
      */
-    public void setPathModes(Map<String, IgniteFsMode> pathModes) {
+    public void setPathModes(Map<String, IgfsMode> pathModes) {
         this.pathModes = pathModes;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/19c7b35c/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
index bd12336..5a1c872 100644
--- a/modules/core/src/main/java/org/apache/ignite/ignitefs/Igfs.java
+++ b/modules/core/src/main/java/org/apache/ignite/ignitefs/Igfs.java
@@ -70,7 +70,7 @@ public interface Igfs {
      * @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;
+    public IgfsFile update(IgfsPath path, Map<String, String> props) throws IgniteException;
 
     /**
      * Renames/moves a file.
@@ -138,7 +138,7 @@ public interface Igfs {
      * @throws IgniteException In case of error.
      * @throws IgfsFileNotFoundException If path doesn't exist.
      */
-    public Collection<IgniteFsFile> listFiles(IgfsPath path) throws IgniteException;
+    public Collection<IgfsFile> listFiles(IgfsPath path) throws IgniteException;
 
     /**
      * Opens a file for reading.
@@ -197,7 +197,7 @@ public interface Igfs {
      * @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;
+    public IgfsFile info(IgfsPath path) throws IgniteException;
 
     /**
      * Gets used space in bytes.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/19c7b35c/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsBlockLocation.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsBlockLocation.java b/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsBlockLocation.java
new file mode 100644
index 0000000..bf7f542
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsBlockLocation.java
@@ -0,0 +1,63 @@
+/*
+ * 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.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(IgfsPath, long, long)} method.
+ */
+public interface IgfsBlockLocation {
+    /**
+     * Start position in the file this block relates to.
+     *
+     * @return Start position in the file this block relates to.
+     */
+    public long start();
+
+    /**
+     * Length of the data block in the file.
+     *
+     * @return Length of the data block in the file.
+     */
+    public long length();
+
+    /**
+     * Nodes this block belongs to. First node id in collection is
+     * primary node id.
+     *
+     * @return Nodes this block belongs to.
+     */
+    public Collection<UUID> nodeIds();
+
+    /**
+     * Compliant with Hadoop interface.
+     *
+     * @return Collection of host:port addresses.
+     */
+    public Collection<String> names();
+
+    /**
+     * Compliant with Hadoop interface.
+     *
+     * @return Collection of host names.
+     */
+    public Collection<String> hosts();
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/19c7b35c/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsConcurrentModificationException.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsConcurrentModificationException.java b/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsConcurrentModificationException.java
new file mode 100644
index 0000000..a2df65e
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsConcurrentModificationException.java
@@ -0,0 +1,36 @@
+/*
+ * 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 file system structure was modified concurrently. This error
+ * indicates that an operation performed in DUAL mode cannot proceed due to these changes.
+ */
+public class IgfsConcurrentModificationException extends IgfsException {
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /**
+     * Creates new exception.
+     *
+     * @param path Affected path.
+     */
+    public IgfsConcurrentModificationException(IgfsPath path) {
+        super("File system entry has been modified concurrently: " + path, null);
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/19c7b35c/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsCorruptedFileException.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsCorruptedFileException.java b/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsCorruptedFileException.java
new file mode 100644
index 0000000..71c0a88
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsCorruptedFileException.java
@@ -0,0 +1,50 @@
+/*
+ * 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.jetbrains.annotations.*;
+
+/**
+ * Exception thrown when target file's block is not found in data cache.
+ */
+public class IgfsCorruptedFileException extends IgfsException {
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /**
+     * @param msg Error message.
+     */
+    public IgfsCorruptedFileException(String msg) {
+        super(msg);
+    }
+
+    /**
+     * @param cause Error cause.
+     */
+    public IgfsCorruptedFileException(Throwable cause) {
+        super(cause);
+    }
+
+    /**
+     * @param msg Error message.
+     * @param cause Error cause.
+     */
+    public IgfsCorruptedFileException(String msg, @Nullable Throwable cause) {
+        super(msg, cause);
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/19c7b35c/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsException.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsException.java b/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsException.java
new file mode 100644
index 0000000..40c5ca2
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsException.java
@@ -0,0 +1,57 @@
+/*
+ * 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.*;
+
+/**
+ * {@code GGFS} exception thrown by file system components.
+ */
+public class IgfsException extends IgniteException {
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /**
+     * Creates an instance of GGFS exception with descriptive error message.
+     *
+     * @param msg Error message.
+     */
+    public IgfsException(String msg) {
+        super(msg);
+    }
+
+    /**
+     * Creates an instance of GGFS exception caused by nested exception.
+     *
+     * @param cause Exception cause.
+     */
+    public IgfsException(Throwable cause) {
+        super(cause);
+    }
+
+    /**
+     * Creates an instance of GGFS exception with error message and underlying cause.
+     *
+     * @param msg Error message.
+     * @param cause Exception cause.
+     */
+    public IgfsException(String msg, @Nullable Throwable cause) {
+        super(msg, cause);
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/19c7b35c/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsFile.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsFile.java b/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsFile.java
new file mode 100644
index 0000000..f600175
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsFile.java
@@ -0,0 +1,120 @@
+/*
+ * 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.jetbrains.annotations.*;
+
+import java.util.*;
+
+/**
+ * {@code GGFS} file or directory descriptor. For example, to get information about
+ * a file you would use the following code:
+ * <pre name="code" class="java">
+ *     GridGgfsPath filePath = new GridGgfsPath("my/working/dir", "file.txt");
+ *
+ *     // Get metadata about file.
+ *     GridGgfsFile file = ggfs.info(filePath);
+ * </pre>
+ */
+public interface IgfsFile {
+    /**
+     * Gets path to file.
+     *
+     * @return Path to file.
+     */
+    public IgfsPath path();
+
+    /**
+     * Check this file is a data file.
+     *
+     * @return {@code True} if this is a data file.
+     */
+    public boolean isFile();
+
+    /**
+     * Check this file is a directory.
+     *
+     * @return {@code True} if this is a directory.
+     */
+    public boolean isDirectory();
+
+    /**
+     * Gets file's length.
+     *
+     * @return File's length or {@code zero} for directories.
+     */
+    public long length();
+
+    /**
+     * Gets file's data block size.
+     *
+     * @return File's data block size or {@code zero} for directories.
+     */
+    public int blockSize();
+
+    /**
+     * Gets file group block size (i.e. block size * group size).
+     *
+     * @return File group block size.
+     */
+    public long groupBlockSize();
+
+    /**
+     * 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(IgfsPath, long, long)} method.
+     * <p>
+     * By default last access time equals file creation time.
+     *
+     * @return Last access time.
+     */
+    public long accessTime();
+
+    /**
+     * Gets file last modification time. File modification time is updated automatically on each file write and
+     * append.
+     *
+     * @return Last modification time.
+     */
+    public long modificationTime();
+
+    /**
+     * Get file's property for specified name.
+     *
+     * @param name Name of the property.
+     * @return File's property for specified name.
+     * @throws IllegalArgumentException If requested property was not found.
+     */
+    public String property(String name) throws IllegalArgumentException;
+
+    /**
+     * Get file's property for specified name.
+     *
+     * @param name Name of the property.
+     * @param dfltVal Default value if requested property was not found.
+     * @return File's property for specified name.
+     */
+    @Nullable public String property(String name, @Nullable String dfltVal);
+
+    /**
+     * Get properties of the file.
+     *
+     * @return Properties of the file.
+     */
+    public Map<String, String> properties();
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/19c7b35c/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
index 1024030..da2c74a 100644
--- a/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsFileNotFoundException.java
+++ b/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsFileNotFoundException.java
@@ -20,7 +20,7 @@ package org.apache.ignite.ignitefs;
 /**
  * {@code GGFS} exception indicating that target resource is not found.
  */
-public class IgfsFileNotFoundException extends IgniteFsInvalidPathException {
+public class IgfsFileNotFoundException extends IgfsInvalidPathException {
     /** */
     private static final long serialVersionUID = 0L;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/19c7b35c/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsGroupDataBlocksKeyMapper.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsGroupDataBlocksKeyMapper.java b/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsGroupDataBlocksKeyMapper.java
new file mode 100644
index 0000000..4a1beb4
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsGroupDataBlocksKeyMapper.java
@@ -0,0 +1,101 @@
+/*
+ * 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.processors.cache.*;
+import org.apache.ignite.internal.processors.fs.*;
+import org.apache.ignite.internal.util.typedef.internal.*;
+
+/**
+ * {@code GGFS} class providing ability to group file's data blocks together on one node.
+ * All blocks within the same group are guaranteed to be cached together on the same node.
+ * Group size parameter controls how many sequential blocks will be cached together on the same node.
+ * <p>
+ * For example, if block size is {@code 64kb} and group size is {@code 256}, then each group will contain
+ * {@code 64kb * 256 = 16Mb}. Larger group sizes would reduce number of splits required to run map-reduce
+ * tasks, but will increase inequality of data size being stored on different nodes.
+ * <p>
+ * Note that {@link #groupSize()} parameter must correlate to Hadoop split size parameter defined
+ * in Hadoop via {@code mapred.max.split.size} property. Ideally you want all blocks accessed
+ * within one split to be mapped to {@code 1} group, so they can be located on the same grid node.
+ * For example, default Hadoop split size is {@code 64mb} and default {@code GGFS} block size
+ * is {@code 64kb}. This means that to make sure that each split goes only through blocks on
+ * the same node (without hopping between nodes over network), we have to make the {@link #groupSize()}
+ * value be equal to {@code 64mb / 64kb = 1024}.
+ * <p>
+ * It is required for {@code GGFS} data cache to be configured with this mapper. Here is an
+ * example of how it can be specified in XML configuration:
+ * <pre name="code" class="xml">
+ * &lt;bean id="cacheCfgBase" class="org.apache.ignite.cache.CacheConfiguration" abstract="true"&gt;
+ *     ...
+ *     &lt;property name="affinityMapper"&gt;
+ *         &lt;bean class="org.apache.ignite.ignitefs.IgniteFsGroupDataBlocksKeyMapper"&gt;
+ *             &lt;!-- How many sequential blocks will be stored on the same node. --&gt;
+ *             &lt;constructor-arg value="512"/&gt;
+ *         &lt;/bean&gt;
+ *     &lt;/property&gt;
+ *     ...
+ * &lt;/bean&gt;
+ * </pre>
+ */
+public class IgfsGroupDataBlocksKeyMapper extends GridCacheDefaultAffinityKeyMapper {
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /** Size of the group. */
+    private final int grpSize;
+
+    /***
+     * Constructs affinity mapper to group several data blocks with the same key.
+     *
+     * @param grpSize Size of the group in blocks.
+     */
+    public IgfsGroupDataBlocksKeyMapper(int grpSize) {
+        A.ensure(grpSize >= 1, "grpSize >= 1");
+
+        this.grpSize = grpSize;
+    }
+
+    /** {@inheritDoc} */
+    @Override public Object affinityKey(Object key) {
+        if (key != null && IgfsBlockKey.class.equals(key.getClass())) {
+            IgfsBlockKey blockKey = (IgfsBlockKey)key;
+
+            if (blockKey.affinityKey() != null)
+                return blockKey.affinityKey();
+
+            long grpId = blockKey.getBlockId() / grpSize;
+
+            return blockKey.getFileId().hashCode() + (int)(grpId ^ (grpId >>> 32));
+        }
+
+        return super.affinityKey(key);
+    }
+
+    /**
+     * @return Size of the group.
+     */
+    public int groupSize() {
+        return grpSize;
+    }
+
+    /** {@inheritDoc} */
+    @Override public String toString() {
+        return S.toString(IgfsGroupDataBlocksKeyMapper.class, this);
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/19c7b35c/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsInvalidHdfsVersionException.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsInvalidHdfsVersionException.java b/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsInvalidHdfsVersionException.java
new file mode 100644
index 0000000..2ea4072
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsInvalidHdfsVersionException.java
@@ -0,0 +1,42 @@
+/*
+ * 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;
+
+/**
+ * Exception thrown when Ignite detects that remote HDFS version differs from version of HDFS libraries
+ * in Ignite classpath.
+ */
+public class IgfsInvalidHdfsVersionException extends IgfsException {
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /**
+     * @param msg Error message.
+     */
+    public IgfsInvalidHdfsVersionException(String msg) {
+        super(msg);
+    }
+
+    /**
+     * @param msg Error message.
+     * @param cause Error cause.
+     */
+    public IgfsInvalidHdfsVersionException(String msg, Throwable cause) {
+        super(msg, cause);
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/19c7b35c/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsInvalidPathException.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsInvalidPathException.java b/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsInvalidPathException.java
new file mode 100644
index 0000000..ad6911e
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsInvalidPathException.java
@@ -0,0 +1,57 @@
+/*
+ * 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.jetbrains.annotations.*;
+
+/**
+ * {@code GGFS} exception indicating that operation target is invalid
+ * (e.g. not a file while expecting to be a file).
+ */
+public class IgfsInvalidPathException extends IgfsException {
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /**
+     * Creates exception with given error message.
+     *
+     * @param msg Error message.
+     */
+    public IgfsInvalidPathException(String msg) {
+        super(msg);
+    }
+
+    /**
+     * Creates exception with given exception cause.
+     *
+     * @param cause Exception cause.
+     */
+    public IgfsInvalidPathException(Throwable cause) {
+        super(cause);
+    }
+
+    /**
+     * Creates exception with given error message and exception cause.
+     *
+     * @param msg Error message.
+     * @param cause Error cause.
+     */
+    public IgfsInvalidPathException(String msg, @Nullable Throwable cause) {
+        super(msg, cause);
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/19c7b35c/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsMetrics.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsMetrics.java b/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsMetrics.java
new file mode 100644
index 0000000..59a27d0
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsMetrics.java
@@ -0,0 +1,159 @@
+/*
+ * 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} metrics snapshot for the file system. Note, that some metrics are global and
+ * some are local (i.e. per each node).
+ */
+public interface IgfsMetrics {
+    /**
+     * Gets local used space in bytes. This is the sum of all file chunks stored on local node.
+     * <p>
+     * This is a local metric.
+     *
+     * @return Node used space in bytes.
+     */
+    public long localSpaceSize();
+
+    /**
+     * Gets maximum amount of data that can be stored on local node. This metrics is either
+     * equal to {@link org.apache.ignite.configuration.IgniteFsConfiguration#getMaxSpaceSize()}, or, if it is {@code 0}, equal to
+     * {@code 80%} of maximum heap size allocated for JVM.
+     *
+     * @return Maximum GGFS local space size.
+     */
+    public long maxSpaceSize();
+
+    /**
+    * Get used space in bytes used in the secondary file system.
+    * <p>
+    * This is a global metric.
+    *
+    * @return Used space in the secondary file system or {@code 0} in case no secondary file system is configured.
+    */
+    public long secondarySpaceSize();
+
+    /**
+     * Gets number of directories created in file system.
+     * <p>
+     * This is a global metric.
+     *
+     * @return Number of directories.
+     */
+    public int directoriesCount();
+
+    /**
+     * Gets number of files stored in file system.
+     * <p>
+     * This is a global metric.
+     *
+     * @return Number of files.
+     */
+    public int filesCount();
+
+    /**
+     * Gets number of files that are currently opened for reading.
+     * <p>
+     * This is a local metric.
+     *
+     * @return Number of opened files.
+     */
+    public int filesOpenedForRead();
+
+    /**
+     * Gets number of files that are currently opened for writing.
+     * <p>
+     * This is a local metric.
+     *
+     * @return Number of opened files.
+     */
+    public int filesOpenedForWrite();
+
+    /**
+     * Gets total blocks read, local and remote.
+     * <p>
+     * This is a local metric.
+     *
+     * @return Total blocks read.
+     */
+    public long blocksReadTotal();
+
+    /**
+     * Gets total remote blocks read.
+     * <p>
+     * This is a local metric.
+     *
+     * @return Total blocks remote read.
+     */
+    public long blocksReadRemote();
+
+    /**
+     * Gets total blocks written, local and remote.
+     * <p>
+     * This is a local metric.
+     *
+     * @return Total blocks written.
+     */
+    public long blocksWrittenTotal();
+
+    /**
+     * Gets total remote blocks written.
+     * <p>
+     * This is a local metric.
+     *
+     * @return Total blocks written.
+     */
+    public long blocksWrittenRemote();
+
+    /**
+     * Gets total bytes read.
+     * <p>
+     * This is a local metric.
+     *
+     * @return Total bytes read.
+     */
+    public long bytesRead();
+
+    /**
+     * Gets total bytes read time.
+     * <p>
+     * This is a local metric.
+     *
+     * @return Total bytes read time.
+     */
+    public long bytesReadTime();
+
+    /**
+     * Gets total bytes written.
+     * <p>
+     * This is a local metric.
+     *
+     * @return Total bytes written.
+     */
+    public long bytesWritten();
+
+    /**
+     * Gets total bytes write time.
+     * <p>
+     * This is a local metric.
+     *
+     * @return Total bytes write time.
+     */
+    public long bytesWriteTime();
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/19c7b35c/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsMode.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsMode.java b/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsMode.java
new file mode 100644
index 0000000..824ab68
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsMode.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 org.jetbrains.annotations.*;
+
+/**
+ * {@code GGFS} mode defining interactions with underlying secondary Hadoop file system.
+ * Secondary Hadoop file system is provided for pass-through, write-through, and
+ * read-through purposes.
+ * <p>
+ * This mode is configured via {@link org.apache.ignite.configuration.IgniteFsConfiguration#getDefaultMode()}
+ * configuration property.
+ */
+public enum IgfsMode {
+    /**
+     * In this mode GGFS will not delegate to secondary Hadoop file system and will
+     * cache all the files in memory only.
+     */
+    PRIMARY,
+
+    /**
+     * In this mode GGFS will not cache any files in memory and will only pass them
+     * through to secondary Hadoop file system. If this mode is enabled, then
+     * secondary Hadoop file system must be configured.
+     *
+     * @see org.apache.ignite.configuration.IgniteFsConfiguration#getSecondaryHadoopFileSystemUri()
+     */
+    PROXY,
+
+    /**
+     * In this mode {@code GGFS} will cache files locally and also <i>synchronously</i>
+     * write them through to secondary Hadoop file system.
+     * <p>
+     * If secondary Hadoop file system is not configured, then this mode behaves like
+     * {@link #PRIMARY} mode.
+     *
+     * @see org.apache.ignite.configuration.IgniteFsConfiguration#getSecondaryHadoopFileSystemUri()
+     */
+    DUAL_SYNC,
+
+    /**
+     * In this mode {@code GGFS} will cache files locally and also <i>asynchronously</i>
+     * write them through to secondary Hadoop file system.
+     * <p>
+     * If secondary Hadoop file system is not configured, then this mode behaves like
+     * {@link #PRIMARY} mode.
+     *
+     * @see org.apache.ignite.configuration.IgniteFsConfiguration#getSecondaryHadoopFileSystemUri()
+     */
+    DUAL_ASYNC;
+
+    /** Enumerated values. */
+    private static final IgfsMode[] VALS = values();
+
+    /**
+     * Efficiently gets enumerated value from its ordinal.
+     *
+     * @param ord Ordinal value.
+     * @return Enumerated value or {@code null} if ordinal out of range.
+     */
+    @Nullable public static IgfsMode fromOrdinal(int ord) {
+        return ord >= 0 && ord < VALS.length ? VALS[ord] : null;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/19c7b35c/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsOutOfSpaceException.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsOutOfSpaceException.java b/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsOutOfSpaceException.java
new file mode 100644
index 0000000..7a72d75
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsOutOfSpaceException.java
@@ -0,0 +1,58 @@
+/*
+ * 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.jetbrains.annotations.*;
+
+/**
+ * {@code GGFS} exception that is thrown when it detected out-of-space condition.
+ * It is thrown when number of writes written to a {@code GGFS} data nodes exceeds
+ * its maximum value (that is configured per-node).
+ */
+public class IgfsOutOfSpaceException extends IgfsException {
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /**
+     * Creates exception with given error message.
+     *
+     * @param msg Error message.
+     */
+    public IgfsOutOfSpaceException(String msg) {
+        super(msg);
+    }
+
+    /**
+     * Creates an instance of exception with given exception cause.
+     *
+     * @param cause Exception cause.
+     */
+    public IgfsOutOfSpaceException(Throwable cause) {
+        super(cause);
+    }
+
+    /**
+     * Creates an instance of GGFS exception with given error message and given exception cause.
+     *
+     * @param msg Error message.
+     * @param cause Exception cause.
+     */
+    public IgfsOutOfSpaceException(String msg, @Nullable Throwable cause) {
+        super(msg, cause);
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/19c7b35c/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsOutputStream.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsOutputStream.java b/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsOutputStream.java
new file mode 100644
index 0000000..0d44690
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsOutputStream.java
@@ -0,0 +1,35 @@
+/*
+ * 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} output stream to write data into the file system.
+ */
+public abstract class IgfsOutputStream extends OutputStream {
+    /**
+     * Transfers specified amount of bytes from data input to this output stream.
+     * This method is optimized to avoid unnecessary temporal buffer creation and byte array copy.
+     *
+     * @param in Data input to copy bytes from.
+     * @param len Data length to copy.
+     * @throws IOException If write failed, read from input failed or there is no enough data in data input.
+     */
+    public abstract void transferFrom(DataInput in, int len) throws IOException;
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/19c7b35c/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsParentNotDirectoryException.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsParentNotDirectoryException.java b/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsParentNotDirectoryException.java
new file mode 100644
index 0000000..6997dc9
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsParentNotDirectoryException.java
@@ -0,0 +1,50 @@
+/*
+ * 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.jetbrains.annotations.*;
+
+/**
+ * Exception thrown when parent supposed to be a directory is a file.
+ */
+public class IgfsParentNotDirectoryException extends IgfsInvalidPathException {
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /**
+     * @param msg Error message.
+     */
+    public IgfsParentNotDirectoryException(String msg) {
+        super(msg);
+    }
+
+    /**
+     * @param cause Exception cause.
+     */
+    public IgfsParentNotDirectoryException(Throwable cause) {
+        super(cause);
+    }
+
+    /**
+     * @param msg Error message.
+     * @param cause Exception cause.
+     */
+    public IgfsParentNotDirectoryException(String msg, @Nullable Throwable cause) {
+        super(msg, cause);
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/19c7b35c/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsPathAlreadyExistsException.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsPathAlreadyExistsException.java b/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsPathAlreadyExistsException.java
new file mode 100644
index 0000000..3550ec8
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/ignitefs/IgfsPathAlreadyExistsException.java
@@ -0,0 +1,50 @@
+/*
+ * 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.jetbrains.annotations.*;
+
+/**
+ * Exception thrown when target path supposed to be created already exists.
+ */
+public class IgfsPathAlreadyExistsException extends IgfsInvalidPathException {
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /**
+     * @param msg Error message.
+     */
+    public IgfsPathAlreadyExistsException(String msg) {
+        super(msg);
+    }
+
+    /**
+     * @param cause Exception cause.
+     */
+    public IgfsPathAlreadyExistsException(Throwable cause) {
+        super(cause);
+    }
+
+    /**
+     * @param msg Error message.
+     * @param cause Exception cause.
+     */
+    public IgfsPathAlreadyExistsException(String msg, @Nullable Throwable cause) {
+        super(msg, cause);
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/19c7b35c/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
deleted file mode 100644
index 6ed4509..0000000
--- a/modules/core/src/main/java/org/apache/ignite/ignitefs/IgniteFsBlockLocation.java
+++ /dev/null
@@ -1,63 +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.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(IgfsPath, long, long)} method.
- */
-public interface IgniteFsBlockLocation {
-    /**
-     * Start position in the file this block relates to.
-     *
-     * @return Start position in the file this block relates to.
-     */
-    public long start();
-
-    /**
-     * Length of the data block in the file.
-     *
-     * @return Length of the data block in the file.
-     */
-    public long length();
-
-    /**
-     * Nodes this block belongs to. First node id in collection is
-     * primary node id.
-     *
-     * @return Nodes this block belongs to.
-     */
-    public Collection<UUID> nodeIds();
-
-    /**
-     * Compliant with Hadoop interface.
-     *
-     * @return Collection of host:port addresses.
-     */
-    public Collection<String> names();
-
-    /**
-     * Compliant with Hadoop interface.
-     *
-     * @return Collection of host names.
-     */
-    public Collection<String> hosts();
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/19c7b35c/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
deleted file mode 100644
index 7461844..0000000
--- a/modules/core/src/main/java/org/apache/ignite/ignitefs/IgniteFsConcurrentModificationException.java
+++ /dev/null
@@ -1,36 +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 file system structure was modified concurrently. This error
- * indicates that an operation performed in DUAL mode cannot proceed due to these changes.
- */
-public class IgniteFsConcurrentModificationException extends IgniteFsException {
-    /** */
-    private static final long serialVersionUID = 0L;
-
-    /**
-     * Creates new exception.
-     *
-     * @param path Affected 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/19c7b35c/modules/core/src/main/java/org/apache/ignite/ignitefs/IgniteFsCorruptedFileException.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/ignitefs/IgniteFsCorruptedFileException.java b/modules/core/src/main/java/org/apache/ignite/ignitefs/IgniteFsCorruptedFileException.java
deleted file mode 100644
index 0177d5d..0000000
--- a/modules/core/src/main/java/org/apache/ignite/ignitefs/IgniteFsCorruptedFileException.java
+++ /dev/null
@@ -1,50 +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.jetbrains.annotations.*;
-
-/**
- * Exception thrown when target file's block is not found in data cache.
- */
-public class IgniteFsCorruptedFileException extends IgniteFsException {
-    /** */
-    private static final long serialVersionUID = 0L;
-
-    /**
-     * @param msg Error message.
-     */
-    public IgniteFsCorruptedFileException(String msg) {
-        super(msg);
-    }
-
-    /**
-     * @param cause Error cause.
-     */
-    public IgniteFsCorruptedFileException(Throwable cause) {
-        super(cause);
-    }
-
-    /**
-     * @param msg Error message.
-     * @param cause Error cause.
-     */
-    public IgniteFsCorruptedFileException(String msg, @Nullable Throwable cause) {
-        super(msg, cause);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/19c7b35c/modules/core/src/main/java/org/apache/ignite/ignitefs/IgniteFsException.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/ignitefs/IgniteFsException.java b/modules/core/src/main/java/org/apache/ignite/ignitefs/IgniteFsException.java
deleted file mode 100644
index 45b01d6..0000000
--- a/modules/core/src/main/java/org/apache/ignite/ignitefs/IgniteFsException.java
+++ /dev/null
@@ -1,57 +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.*;
-import org.jetbrains.annotations.*;
-
-/**
- * {@code GGFS} exception thrown by file system components.
- */
-public class IgniteFsException extends IgniteException {
-    /** */
-    private static final long serialVersionUID = 0L;
-
-    /**
-     * Creates an instance of GGFS exception with descriptive error message.
-     *
-     * @param msg Error message.
-     */
-    public IgniteFsException(String msg) {
-        super(msg);
-    }
-
-    /**
-     * Creates an instance of GGFS exception caused by nested exception.
-     *
-     * @param cause Exception cause.
-     */
-    public IgniteFsException(Throwable cause) {
-        super(cause);
-    }
-
-    /**
-     * Creates an instance of GGFS exception with error message and underlying cause.
-     *
-     * @param msg Error message.
-     * @param cause Exception cause.
-     */
-    public IgniteFsException(String msg, @Nullable Throwable cause) {
-        super(msg, cause);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/19c7b35c/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
deleted file mode 100644
index badc713..0000000
--- a/modules/core/src/main/java/org/apache/ignite/ignitefs/IgniteFsFile.java
+++ /dev/null
@@ -1,120 +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.jetbrains.annotations.*;
-
-import java.util.*;
-
-/**
- * {@code GGFS} file or directory descriptor. For example, to get information about
- * a file you would use the following code:
- * <pre name="code" class="java">
- *     GridGgfsPath filePath = new GridGgfsPath("my/working/dir", "file.txt");
- *
- *     // Get metadata about file.
- *     GridGgfsFile file = ggfs.info(filePath);
- * </pre>
- */
-public interface IgniteFsFile {
-    /**
-     * Gets path to file.
-     *
-     * @return Path to file.
-     */
-    public IgfsPath path();
-
-    /**
-     * Check this file is a data file.
-     *
-     * @return {@code True} if this is a data file.
-     */
-    public boolean isFile();
-
-    /**
-     * Check this file is a directory.
-     *
-     * @return {@code True} if this is a directory.
-     */
-    public boolean isDirectory();
-
-    /**
-     * Gets file's length.
-     *
-     * @return File's length or {@code zero} for directories.
-     */
-    public long length();
-
-    /**
-     * Gets file's data block size.
-     *
-     * @return File's data block size or {@code zero} for directories.
-     */
-    public int blockSize();
-
-    /**
-     * Gets file group block size (i.e. block size * group size).
-     *
-     * @return File group block size.
-     */
-    public long groupBlockSize();
-
-    /**
-     * 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(IgfsPath, long, long)} method.
-     * <p>
-     * By default last access time equals file creation time.
-     *
-     * @return Last access time.
-     */
-    public long accessTime();
-
-    /**
-     * Gets file last modification time. File modification time is updated automatically on each file write and
-     * append.
-     *
-     * @return Last modification time.
-     */
-    public long modificationTime();
-
-    /**
-     * Get file's property for specified name.
-     *
-     * @param name Name of the property.
-     * @return File's property for specified name.
-     * @throws IllegalArgumentException If requested property was not found.
-     */
-    public String property(String name) throws IllegalArgumentException;
-
-    /**
-     * Get file's property for specified name.
-     *
-     * @param name Name of the property.
-     * @param dfltVal Default value if requested property was not found.
-     * @return File's property for specified name.
-     */
-    @Nullable public String property(String name, @Nullable String dfltVal);
-
-    /**
-     * Get properties of the file.
-     *
-     * @return Properties of the file.
-     */
-    public Map<String, String> properties();
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/19c7b35c/modules/core/src/main/java/org/apache/ignite/ignitefs/IgniteFsFileSystem.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/ignitefs/IgniteFsFileSystem.java b/modules/core/src/main/java/org/apache/ignite/ignitefs/IgniteFsFileSystem.java
deleted file mode 100644
index 9e46201..0000000
--- a/modules/core/src/main/java/org/apache/ignite/ignitefs/IgniteFsFileSystem.java
+++ /dev/null
@@ -1,216 +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.*;
-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 IgniteFsFileSystem {
-    /** 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(IgniteFsPath 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(IgniteFsPath 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 IgniteFsFileNotFoundException If source file doesn't exist.
-     */
-    public void rename(IgniteFsPath src, IgniteFsPath 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(IgniteFsPath 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(IgniteFsPath 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(IgniteFsPath 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 IgniteFsFileNotFoundException If path doesn't exist.
-     */
-    public Collection<IgniteFsPath> listPaths(IgniteFsPath 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 IgniteFsFileNotFoundException If path doesn't exist.
-     */
-    public Collection<IgniteFsFile> listFiles(IgniteFsPath 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 IgniteFsFileNotFoundException If path doesn't exist.
-     */
-    public IgniteFsReader open(IgniteFsPath 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(IgniteFsPath 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(IgniteFsPath 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 IgniteFsFileNotFoundException If path doesn't exist and create flag is {@code false}.
-     */
-    public OutputStream append(IgniteFsPath 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(IgniteFsPath 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();
-}


Mime
View raw message