ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [02/57] [abbrv] incubator-ignite git commit: # IGNITE-226: WIP.
Date Fri, 13 Feb 2015 10:54:12 GMT
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1be8b773/modules/core/src/main/java/org/apache/ignite/internal/processors/fs/IgfsOutputStreamImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/fs/IgfsOutputStreamImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/fs/IgfsOutputStreamImpl.java
index 65baa43..7702c3e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/fs/IgfsOutputStreamImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/fs/IgfsOutputStreamImpl.java
@@ -40,17 +40,17 @@ class IgfsOutputStreamImpl extends IgfsOutputStreamAdapter {
     private static final int MAX_BLOCKS_CNT = 16;
 
     /** GGFS context. */
-    private GridGgfsContext ggfsCtx;
+    private IgfsContext ggfsCtx;
 
     /** Meta info manager. */
-    private final GridGgfsMetaManager meta;
+    private final IgfsMetaManager meta;
 
     /** Data manager. */
-    private final GridGgfsDataManager data;
+    private final IgfsDataManager data;
 
     /** File descriptor. */
     @SuppressWarnings("FieldAccessedSynchronizedAndUnsynchronized")
-    private GridGgfsFileInfo fileInfo;
+    private IgfsFileInfo fileInfo;
 
     /** Parent ID. */
     private final IgniteUuid parentId;
@@ -75,16 +75,16 @@ class IgfsOutputStreamImpl extends IgfsOutputStreamAdapter {
     private final IgniteFsMode mode;
 
     /** File worker batch. */
-    private final GridGgfsFileWorkerBatch batch;
+    private final IgfsFileWorkerBatch batch;
 
     /** Ensures that onClose)_ routine is called no more than once. */
     private final AtomicBoolean onCloseGuard = new AtomicBoolean();
 
     /** Local GGFS metrics. */
-    private final GridGgfsLocalMetrics metrics;
+    private final IgfsLocalMetrics metrics;
 
     /** Affinity written by this output stream. */
-    private GridGgfsFileAffinityRange streamRange;
+    private IgfsFileAffinityRange streamRange;
 
     /**
      * Constructs file output stream.
@@ -98,8 +98,8 @@ class IgfsOutputStreamImpl extends IgfsOutputStreamAdapter {
      * @param metrics Local GGFs metrics.
      * @throws IgniteCheckedException If stream creation failed.
      */
-    IgfsOutputStreamImpl(GridGgfsContext ggfsCtx, IgniteFsPath path, GridGgfsFileInfo fileInfo, IgniteUuid parentId,
-        int bufSize, IgniteFsMode mode, @Nullable GridGgfsFileWorkerBatch batch, GridGgfsLocalMetrics metrics)
+    IgfsOutputStreamImpl(IgfsContext ggfsCtx, IgniteFsPath path, IgfsFileInfo fileInfo, IgniteUuid parentId,
+        int bufSize, IgniteFsMode mode, @Nullable IgfsFileWorkerBatch batch, IgfsLocalMetrics metrics)
         throws IgniteCheckedException {
         super(path, optimizeBufferSize(bufSize, fileInfo));
 
@@ -138,7 +138,7 @@ class IgfsOutputStreamImpl extends IgfsOutputStreamAdapter {
      * @return Optimized buffer size.
      */
     @SuppressWarnings("IfMayBeConditional")
-    private static int optimizeBufferSize(int bufSize, GridGgfsFileInfo fileInfo) {
+    private static int optimizeBufferSize(int bufSize, IgfsFileInfo fileInfo) {
         assert bufSize > 0;
 
         if (fileInfo == null)
@@ -285,7 +285,7 @@ class IgfsOutputStreamImpl extends IgfsOutputStreamAdapter {
             }
 
             if (space > 0) {
-                GridGgfsFileInfo fileInfo0 = meta.updateInfo(fileInfo.id(),
+                IgfsFileInfo fileInfo0 = meta.updateInfo(fileInfo.id(),
                     new ReserveSpaceClosure(space, streamRange));
 
                 if (fileInfo0 == null)
@@ -403,7 +403,7 @@ class IgfsOutputStreamImpl extends IgfsOutputStreamAdapter {
      * @param fileInfo File info to build initial range for.
      * @return Affinity range.
      */
-    private GridGgfsFileAffinityRange initialStreamRange(GridGgfsFileInfo fileInfo) {
+    private IgfsFileAffinityRange initialStreamRange(IgfsFileInfo fileInfo) {
         if (!ggfsCtx.configuration().isFragmentizerEnabled())
             return null;
 
@@ -421,13 +421,13 @@ class IgfsOutputStreamImpl extends IgfsOutputStreamAdapter {
         if (lastBlockOff < 0)
             lastBlockOff = 0;
 
-        GridGgfsFileMap map = fileInfo.fileMap();
+        IgfsFileMap map = fileInfo.fileMap();
 
         IgniteUuid prevAffKey = map == null ? null : map.affinityKey(lastBlockOff, false);
 
         IgniteUuid affKey = data.nextAffinityKey(prevAffKey);
 
-        return affKey == null ? null : new GridGgfsFileAffinityRange(off, off, affKey);
+        return affKey == null ? null : new IgfsFileAffinityRange(off, off, affKey);
     }
 
     /** {@inheritDoc} */
@@ -439,7 +439,7 @@ class IgfsOutputStreamImpl extends IgfsOutputStreamAdapter {
      * Helper closure to reserve specified space and update file's length
      */
     @GridInternal
-    private static final class ReserveSpaceClosure implements IgniteClosure<GridGgfsFileInfo, GridGgfsFileInfo>,
+    private static final class ReserveSpaceClosure implements IgniteClosure<IgfsFileInfo, IgfsFileInfo>,
         Externalizable {
         /** */
         private static final long serialVersionUID = 0L;
@@ -448,7 +448,7 @@ class IgfsOutputStreamImpl extends IgfsOutputStreamAdapter {
         private long space;
 
         /** Affinity range for this particular update. */
-        private GridGgfsFileAffinityRange range;
+        private IgfsFileAffinityRange range;
 
         /**
          * Empty constructor required for {@link Externalizable}.
@@ -464,21 +464,21 @@ class IgfsOutputStreamImpl extends IgfsOutputStreamAdapter {
          * @param space Space amount (bytes number) to increase file's length.
          * @param range Affinity range specifying which part of file was colocated.
          */
-        private ReserveSpaceClosure(long space, GridGgfsFileAffinityRange range) {
+        private ReserveSpaceClosure(long space, IgfsFileAffinityRange range) {
             this.space = space;
             this.range = range;
         }
 
         /** {@inheritDoc} */
-        @Override public GridGgfsFileInfo apply(GridGgfsFileInfo oldInfo) {
-            GridGgfsFileMap oldMap = oldInfo.fileMap();
+        @Override public IgfsFileInfo apply(IgfsFileInfo oldInfo) {
+            IgfsFileMap oldMap = oldInfo.fileMap();
 
-            GridGgfsFileMap newMap = new GridGgfsFileMap(oldMap);
+            IgfsFileMap newMap = new IgfsFileMap(oldMap);
 
             newMap.addRange(range);
 
             // Update file length.
-            GridGgfsFileInfo updated = new GridGgfsFileInfo(oldInfo, oldInfo.length() + space);
+            IgfsFileInfo updated = new IgfsFileInfo(oldInfo, oldInfo.length() + space);
 
             updated.fileMap(newMap);
 
@@ -494,7 +494,7 @@ class IgfsOutputStreamImpl extends IgfsOutputStreamAdapter {
         /** {@inheritDoc} */
         @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
             space = in.readLong();
-            range = (GridGgfsFileAffinityRange)in.readObject();
+            range = (IgfsFileAffinityRange)in.readObject();
         }
 
         /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1be8b773/modules/core/src/main/java/org/apache/ignite/internal/processors/fs/IgfsProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/fs/IgfsProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/fs/IgfsProcessor.java
index 09d680a..0cfcebc 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/fs/IgfsProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/fs/IgfsProcessor.java
@@ -51,14 +51,14 @@ public class IgfsProcessor extends IgfsProcessorAdapter {
     private static final String NULL_NAME = UUID.randomUUID().toString();
 
     /** Converts context to GGFS. */
-    private static final IgniteClosure<GridGgfsContext,IgniteFs> CTX_TO_GGFS = new C1<GridGgfsContext, IgniteFs>() {
-        @Override public IgniteFs apply(GridGgfsContext ggfsCtx) {
+    private static final IgniteClosure<IgfsContext,IgniteFs> CTX_TO_GGFS = new C1<IgfsContext, IgniteFs>() {
+        @Override public IgniteFs apply(IgfsContext ggfsCtx) {
             return ggfsCtx.ggfs();
         }
     };
 
     /** */
-    private final ConcurrentMap<String, GridGgfsContext> ggfsCache =
+    private final ConcurrentMap<String, IgfsContext> ggfsCache =
         new ConcurrentHashMap8<>();
 
     /**
@@ -81,16 +81,16 @@ public class IgfsProcessor extends IgfsProcessorAdapter {
 
         // Start GGFS instances.
         for (IgniteFsConfiguration cfg : cfgs) {
-            GridGgfsContext ggfsCtx = new GridGgfsContext(
+            IgfsContext ggfsCtx = new IgfsContext(
                 ctx,
                 new IgniteFsConfiguration(cfg),
-                new GridGgfsMetaManager(),
-                new GridGgfsDataManager(),
-                new GridGgfsServerManager(),
-                new GridGgfsFragmentizerManager());
+                new IgfsMetaManager(),
+                new IgfsDataManager(),
+                new IgfsServerManager(),
+                new IgfsFragmentizerManager());
 
             // Start managers first.
-            for (GridGgfsManager mgr : ggfsCtx.managers())
+            for (IgfsManager mgr : ggfsCtx.managers())
                 mgr.start(ggfsCtx);
 
             ggfsCache.put(maskName(cfg.getName()), ggfsCtx);
@@ -110,22 +110,22 @@ public class IgfsProcessor extends IgfsProcessorAdapter {
                 checkGgfsOnRemoteNode(n);
         }
 
-        for (GridGgfsContext ggfsCtx : ggfsCache.values())
-            for (GridGgfsManager mgr : ggfsCtx.managers())
+        for (IgfsContext ggfsCtx : ggfsCache.values())
+            for (IgfsManager mgr : ggfsCtx.managers())
                 mgr.onKernalStart();
     }
 
     /** {@inheritDoc} */
     @Override public void stop(boolean cancel) {
         // Stop GGFS instances.
-        for (GridGgfsContext ggfsCtx : ggfsCache.values()) {
+        for (IgfsContext ggfsCtx : ggfsCache.values()) {
             if (log.isDebugEnabled())
                 log.debug("Stopping ggfs: " + ggfsCtx.configuration().getName());
 
-            List<GridGgfsManager> mgrs = ggfsCtx.managers();
+            List<IgfsManager> mgrs = ggfsCtx.managers();
 
-            for (ListIterator<GridGgfsManager> it = mgrs.listIterator(mgrs.size()); it.hasPrevious();) {
-                GridGgfsManager mgr = it.previous();
+            for (ListIterator<IgfsManager> it = mgrs.listIterator(mgrs.size()); it.hasPrevious();) {
+                IgfsManager mgr = it.previous();
 
                 mgr.stop(cancel);
             }
@@ -141,14 +141,14 @@ public class IgfsProcessor extends IgfsProcessorAdapter {
 
     /** {@inheritDoc} */
     @Override public void onKernalStop(boolean cancel) {
-        for (GridGgfsContext ggfsCtx : ggfsCache.values()) {
+        for (IgfsContext ggfsCtx : ggfsCache.values()) {
             if (log.isDebugEnabled())
                 log.debug("Stopping ggfs: " + ggfsCtx.configuration().getName());
 
-            List<GridGgfsManager> mgrs = ggfsCtx.managers();
+            List<IgfsManager> mgrs = ggfsCtx.managers();
 
-            for (ListIterator<GridGgfsManager> it = mgrs.listIterator(mgrs.size()); it.hasPrevious();) {
-                GridGgfsManager mgr = it.previous();
+            for (ListIterator<IgfsManager> it = mgrs.listIterator(mgrs.size()); it.hasPrevious();) {
+                IgfsManager mgr = it.previous();
 
                 mgr.onKernalStop(cancel);
             }
@@ -173,14 +173,14 @@ public class IgfsProcessor extends IgfsProcessorAdapter {
 
     /** {@inheritDoc} */
     @Override @Nullable public IgniteFs ggfs(@Nullable String name) {
-        GridGgfsContext ggfsCtx = ggfsCache.get(maskName(name));
+        IgfsContext ggfsCtx = ggfsCache.get(maskName(name));
 
         return ggfsCtx == null ? null : ggfsCtx.ggfs();
     }
 
     /** {@inheritDoc} */
     @Override @Nullable public Collection<IpcServerEndpoint> endpoints(@Nullable String name) {
-        GridGgfsContext ggfsCtx = ggfsCache.get(maskName(name));
+        IgfsContext ggfsCtx = ggfsCache.get(maskName(name));
 
         return ggfsCtx == null ? Collections.<IpcServerEndpoint>emptyList() : ggfsCtx.server().endpoints();
     }
@@ -188,7 +188,7 @@ public class IgfsProcessor extends IgfsProcessorAdapter {
     /** {@inheritDoc} */
     @Nullable @Override public ComputeJob createJob(IgniteFsJob job, @Nullable String ggfsName, IgniteFsPath path,
         long start, long len, IgniteFsRecordResolver recRslv) {
-        return new GridGgfsJobImpl(job, ggfsName, path, start, len, recRslv);
+        return new IgfsJobImpl(job, ggfsName, path, start, len, recRslv);
     }
 
     /** {@inheritDoc} */
@@ -214,7 +214,7 @@ public class IgfsProcessor extends IgfsProcessorAdapter {
             }
         });
 
-        Collection<GridGgfsAttributes> attrVals = new ArrayList<>();
+        Collection<IgfsAttributes> attrVals = new ArrayList<>();
 
         assert gridCfg.getGgfsConfiguration() != null;
 
@@ -231,7 +231,7 @@ public class IgfsProcessor extends IgfsProcessorAdapter {
                 // Configuration will be validated later, while starting GridGgfsProcessor.
                 continue;
 
-            attrVals.add(new GridGgfsAttributes(
+            attrVals.add(new IgfsAttributes(
                 ggfsCfg.getName(),
                 ggfsCfg.getBlockSize(),
                 ((IgniteFsGroupDataBlocksKeyMapper)affMapper).groupSize(),
@@ -242,7 +242,7 @@ public class IgfsProcessor extends IgfsProcessorAdapter {
                 ggfsCfg.isFragmentizerEnabled()));
         }
 
-        attrs.put(ATTR_GGFS, attrVals.toArray(new GridGgfsAttributes[attrVals.size()]));
+        attrs.put(ATTR_GGFS, attrVals.toArray(new IgfsAttributes[attrVals.size()]));
     }
 
     /**
@@ -347,16 +347,16 @@ public class IgfsProcessor extends IgfsProcessorAdapter {
      * @throws IgniteCheckedException If check failed.
      */
     private void checkGgfsOnRemoteNode(ClusterNode rmtNode) throws IgniteCheckedException {
-        GridGgfsAttributes[] locAttrs = ctx.discovery().localNode().attribute(IgniteNodeAttributes.ATTR_GGFS);
-        GridGgfsAttributes[] rmtAttrs = rmtNode.attribute(IgniteNodeAttributes.ATTR_GGFS);
+        IgfsAttributes[] locAttrs = ctx.discovery().localNode().attribute(IgniteNodeAttributes.ATTR_GGFS);
+        IgfsAttributes[] rmtAttrs = rmtNode.attribute(IgniteNodeAttributes.ATTR_GGFS);
 
         if (F.isEmpty(locAttrs) || F.isEmpty(rmtAttrs))
             return;
 
         assert rmtAttrs != null && locAttrs != null;
 
-        for (GridGgfsAttributes rmtAttr : rmtAttrs)
-            for (GridGgfsAttributes locAttr : locAttrs) {
+        for (IgfsAttributes rmtAttr : rmtAttrs)
+            for (IgfsAttributes locAttr : locAttrs) {
                 // Checking the use of different caches on the different GGFSes.
                 if (!F.eq(rmtAttr.ggfsName(), locAttr.ggfsName())) {
                     if (F.eq(rmtAttr.metaCacheName(), locAttr.metaCacheName()))

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1be8b773/modules/core/src/main/java/org/apache/ignite/internal/processors/fs/IgfsSecondaryInputStreamDescriptor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/fs/IgfsSecondaryInputStreamDescriptor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/fs/IgfsSecondaryInputStreamDescriptor.java
index 4a067b7..b3dde90 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/fs/IgfsSecondaryInputStreamDescriptor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/fs/IgfsSecondaryInputStreamDescriptor.java
@@ -24,7 +24,7 @@ import org.apache.ignite.ignitefs.*;
  */
 public class IgfsSecondaryInputStreamDescriptor {
     /** File info in the primary file system. */
-    private final GridGgfsFileInfo info;
+    private final IgfsFileInfo info;
 
     /** Secondary file system input stream wrapper. */
     private final IgniteFsReader secReader;
@@ -35,7 +35,7 @@ public class IgfsSecondaryInputStreamDescriptor {
      * @param info File info in the primary file system.
      * @param secReader Secondary file system reader.
      */
-    IgfsSecondaryInputStreamDescriptor(GridGgfsFileInfo info, IgniteFsReader secReader) {
+    IgfsSecondaryInputStreamDescriptor(IgfsFileInfo info, IgniteFsReader secReader) {
         assert info != null;
         assert secReader != null;
 
@@ -46,7 +46,7 @@ public class IgfsSecondaryInputStreamDescriptor {
     /**
      * @return File info in the primary file system.
      */
-    GridGgfsFileInfo info() {
+    IgfsFileInfo info() {
         return info;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1be8b773/modules/core/src/main/java/org/apache/ignite/internal/processors/fs/IgfsSecondaryOutputStreamDescriptor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/fs/IgfsSecondaryOutputStreamDescriptor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/fs/IgfsSecondaryOutputStreamDescriptor.java
index df8399d..e093fd0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/fs/IgfsSecondaryOutputStreamDescriptor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/fs/IgfsSecondaryOutputStreamDescriptor.java
@@ -29,7 +29,7 @@ public class IgfsSecondaryOutputStreamDescriptor {
     private final IgniteUuid parentId;
 
     /** File info in the primary file system. */
-    private final GridGgfsFileInfo info;
+    private final IgfsFileInfo info;
 
     /** Output stream to the secondary file system. */
     private final OutputStream out;
@@ -41,7 +41,7 @@ public class IgfsSecondaryOutputStreamDescriptor {
      * @param info File info in the primary file system.
      * @param out Output stream to the secondary file system.
      */
-    IgfsSecondaryOutputStreamDescriptor(IgniteUuid parentId, GridGgfsFileInfo info, OutputStream out) {
+    IgfsSecondaryOutputStreamDescriptor(IgniteUuid parentId, IgfsFileInfo info, OutputStream out) {
         assert parentId != null;
         assert info != null;
         assert out != null;
@@ -61,7 +61,7 @@ public class IgfsSecondaryOutputStreamDescriptor {
     /**
      * @return File info in the primary file system.
      */
-    GridGgfsFileInfo info() {
+    IgfsFileInfo info() {
         return info;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1be8b773/modules/core/src/main/java/org/apache/ignite/internal/processors/fs/IgfsServer.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/fs/IgfsServer.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/fs/IgfsServer.java
index 96d89ba..1778c75 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/fs/IgfsServer.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/fs/IgfsServer.java
@@ -40,7 +40,7 @@ import static org.apache.ignite.spi.IgnitePortProtocol.*;
  */
 public class IgfsServer {
     /** GGFS context. */
-    private final GridGgfsContext ggfsCtx;
+    private final IgfsContext ggfsCtx;
 
     /** Logger. */
     private final IgniteLogger log;
@@ -55,7 +55,7 @@ public class IgfsServer {
     private IpcServerEndpoint srvEndpoint;
 
     /** Server message handler. */
-    private GridGgfsServerHandler hnd;
+    private IgfsServerHandler hnd;
 
     /** Accept worker. */
     private AcceptWorker acceptWorker;
@@ -72,7 +72,7 @@ public class IgfsServer {
      * @param endpointCfg Endpoint configuration to start.
      * @param mgmt Management flag - if true, server is intended to be started for Visor.
      */
-    public IgfsServer(GridGgfsContext ggfsCtx, Map<String, String> endpointCfg, boolean mgmt) {
+    public IgfsServer(IgfsContext ggfsCtx, Map<String, String> endpointCfg, boolean mgmt) {
         assert ggfsCtx != null;
         assert endpointCfg != null;
 
@@ -128,7 +128,7 @@ public class IgfsServer {
         if (srvEndpoint.getPort() >= 0)
             ggfsCtx.kernalContext().ports().registerPort(srvEndpoint.getPort(), TCP, srvEndpoint.getClass());
 
-        hnd = new GridGgfsIpcHandler(ggfsCtx);
+        hnd = new IgfsIpcHandler(ggfsCtx);
 
         // Start client accept worker.
         acceptWorker = new AcceptWorker();
@@ -204,7 +204,7 @@ public class IgfsServer {
         private final GridGgfsDataOutputStream out;
 
         /** Client session object. */
-        private GridGgfsClientSession ses;
+        private IgfsClientSession ses;
 
         /** Queue node for fast unlink. */
         private ConcurrentLinkedDeque8.Node<ClientWorker> node;
@@ -221,7 +221,7 @@ public class IgfsServer {
 
             this.endpoint = endpoint;
 
-            ses = new GridGgfsClientSession();
+            ses = new IgfsClientSession();
 
             out = new GridGgfsDataOutputStream(new BufferedOutputStream(endpoint.outputStream()));
         }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1be8b773/modules/core/src/main/java/org/apache/ignite/internal/processors/fs/IgfsServerHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/fs/IgfsServerHandler.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/fs/IgfsServerHandler.java
new file mode 100644
index 0000000..b06f872
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/fs/IgfsServerHandler.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.internal.processors.fs;
+
+import org.apache.ignite.*;
+import org.apache.ignite.internal.*;
+import org.apache.ignite.internal.fs.common.*;
+import org.jetbrains.annotations.*;
+
+import java.io.*;
+
+/**
+ * GGFS server message handler. Server component that is plugged in to the server implementation
+ * to handle incoming messages asynchronously.
+ */
+public interface IgfsServerHandler {
+    /**
+     * Asynchronously handles incoming message.
+     *
+     * @param ses Client session.
+     * @param msg Message to process.
+     * @param in Data input. Stream to read from in case if this is a WRITE_BLOCK message.
+     * @return Future that will be completed when response is ready or {@code null} if no
+     *      response is required.
+     */
+    @Nullable public IgniteInternalFuture<GridGgfsMessage> handleAsync(IgfsClientSession ses,
+        GridGgfsMessage msg, DataInput in);
+
+    /**
+     * Handles handles client close events.
+     *
+     * @param ses Session that was closed.
+     */
+    public void onClosed(IgfsClientSession ses);
+
+    /**
+     * Stops handling of incoming requests. No server commands will be handled anymore.
+     *
+     * @throws IgniteCheckedException If error occurred.
+     */
+    public void stop() throws IgniteCheckedException;
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1be8b773/modules/core/src/main/java/org/apache/ignite/internal/processors/fs/IgfsServerManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/fs/IgfsServerManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/fs/IgfsServerManager.java
new file mode 100644
index 0000000..88ba40b
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/fs/IgfsServerManager.java
@@ -0,0 +1,211 @@
+/*
+ * 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.internal.processors.fs;
+
+import org.apache.ignite.*;
+import org.apache.ignite.configuration.*;
+import org.apache.ignite.internal.util.ipc.*;
+import org.apache.ignite.internal.util.typedef.*;
+import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.internal.util.worker.*;
+import org.apache.ignite.lang.*;
+import org.apache.ignite.thread.*;
+
+import java.util.*;
+import java.util.concurrent.*;
+
+import static org.apache.ignite.configuration.IgniteFsConfiguration.*;
+
+/**
+ * GGFS server manager.
+ */
+public class IgfsServerManager extends IgfsManager {
+    /** IPC server rebind interval. */
+    private static final long REBIND_INTERVAL = 3000;
+
+    /** Collection of servers to maintain. */
+    private Collection<IgfsServer> srvrs;
+
+    /** Server port binders. */
+    private BindWorker bindWorker;
+
+    /** Kernal start latch. */
+    private CountDownLatch kernalStartLatch = new CountDownLatch(1);
+
+    /** {@inheritDoc} */
+    @Override protected void start0() throws IgniteCheckedException {
+        IgniteFsConfiguration ggfsCfg = ggfsCtx.configuration();
+        Map<String,String> cfg = ggfsCfg.getIpcEndpointConfiguration();
+
+        if (F.isEmpty(cfg)) {
+            // Set default configuration.
+            cfg = new HashMap<>();
+
+            cfg.put("type", U.isWindows() ? "tcp" : "shmem");
+            cfg.put("port", String.valueOf(DFLT_IPC_PORT));
+        }
+
+        if (ggfsCfg.isIpcEndpointEnabled())
+            bind(cfg, /*management*/false);
+
+        if (ggfsCfg.getManagementPort() >= 0) {
+            cfg = new HashMap<>();
+
+            cfg.put("type", "tcp");
+            cfg.put("port", String.valueOf(ggfsCfg.getManagementPort()));
+
+            bind(cfg, /*management*/true);
+        }
+
+        if (bindWorker != null)
+            new IgniteThread(bindWorker).start();
+    }
+
+    /**
+     * Tries to start server endpoint with specified configuration. If failed, will print warning and start a thread
+     * that will try to periodically start this endpoint.
+     *
+     * @param endpointCfg Endpoint configuration to start.
+     * @param mgmt {@code True} if endpoint is management.
+     * @throws IgniteCheckedException If failed.
+     */
+    private void bind(final Map<String,String> endpointCfg, final boolean mgmt) throws IgniteCheckedException {
+        if (srvrs == null)
+            srvrs = new ConcurrentLinkedQueue<>();
+
+        IgfsServer ipcSrv = new IgfsServer(ggfsCtx, endpointCfg, mgmt);
+
+        try {
+            ipcSrv.start();
+
+            srvrs.add(ipcSrv);
+        }
+        catch (IpcEndpointBindException ignored) {
+            int port = ipcSrv.getIpcServerEndpoint().getPort();
+
+            String portMsg = port != -1 ? " Failed to bind to port (is port already in use?): " + port : "";
+
+            U.warn(log, "Failed to start GGFS " + (mgmt ? "management " : "") + "endpoint " +
+                "(will retry every " + (REBIND_INTERVAL / 1000) + "s)." +
+                portMsg);
+
+            if (bindWorker == null)
+                bindWorker = new BindWorker();
+
+            bindWorker.addConfiguration(endpointCfg, mgmt);
+        }
+    }
+
+    /**
+     * @return Collection of active endpoints.
+     */
+    public Collection<IpcServerEndpoint> endpoints() {
+        return F.viewReadOnly(srvrs, new C1<IgfsServer, IpcServerEndpoint>() {
+            @Override public IpcServerEndpoint apply(IgfsServer e) {
+                return e.getIpcServerEndpoint();
+            }
+        });
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void onKernalStart0() throws IgniteCheckedException {
+        if (!F.isEmpty(srvrs)) {
+            for (IgfsServer srv : srvrs)
+                srv.onKernalStart();
+        }
+
+        kernalStartLatch.countDown();
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void stop0(boolean cancel) {
+        // Safety.
+        kernalStartLatch.countDown();
+
+        if (bindWorker != null) {
+            bindWorker.cancel();
+
+            U.join(bindWorker, log);
+        }
+
+        if (!F.isEmpty(srvrs)) {
+            for (IgfsServer srv : srvrs)
+                srv.stop(cancel);
+        }
+    }
+
+    /**
+     * Bind worker.
+     */
+    @SuppressWarnings("BusyWait")
+    private class BindWorker extends GridWorker {
+        /** Configurations to bind. */
+        private Collection<IgniteBiTuple<Map<String, String>, Boolean>> bindCfgs = new LinkedList<>();
+
+        /**
+         * Constructor.
+         */
+        private BindWorker() {
+            super(ggfsCtx.kernalContext().gridName(), "bind-worker", ggfsCtx.kernalContext().log());
+        }
+
+        /**
+         * Adds configuration to bind on. Should not be called after thread start.
+         *
+         * @param cfg Configuration.
+         * @param mgmt Management flag.
+         */
+        public void addConfiguration(Map<String, String> cfg, boolean mgmt) {
+            bindCfgs.add(F.t(cfg, mgmt));
+        }
+
+        /** {@inheritDoc} */
+        @Override protected void body() throws InterruptedException {
+            kernalStartLatch.await();
+
+            while (!isCancelled()) {
+                Thread.sleep(REBIND_INTERVAL);
+
+                Iterator<IgniteBiTuple<Map<String, String>, Boolean>> it = bindCfgs.iterator();
+
+                while (it.hasNext()) {
+                    IgniteBiTuple<Map<String, String>, Boolean> cfg = it.next();
+
+                    IgfsServer ipcSrv = new IgfsServer(ggfsCtx, cfg.get1(), cfg.get2());
+
+                    try {
+                        ipcSrv.start();
+
+                        ipcSrv.onKernalStart();
+
+                        srvrs.add(ipcSrv);
+
+                        it.remove();
+                    }
+                    catch (IgniteCheckedException e) {
+                        if (GridWorker.log.isDebugEnabled())
+                            GridWorker.log.debug("Failed to bind GGFS endpoint [cfg=" + cfg + ", err=" + e.getMessage() + ']');
+                    }
+                }
+
+                if (bindCfgs.isEmpty())
+                    break;
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1be8b773/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorGgfsSamplingStateTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorGgfsSamplingStateTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorGgfsSamplingStateTask.java
index fc85cd1..1ab621c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorGgfsSamplingStateTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorGgfsSamplingStateTask.java
@@ -52,7 +52,7 @@ public class VisorGgfsSamplingStateTask extends VisorOneNodeTask<IgniteBiTuple<S
         /** {@inheritDoc} */
         @Override protected Void run(IgniteBiTuple<String, Boolean> arg) {
             try {
-                ((GridGgfsEx)ignite.fileSystem(arg.get1())).globalSampling(arg.get2());
+                ((IgfsEx)ignite.fileSystem(arg.get1())).globalSampling(arg.get2());
 
                 return null;
             }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1be8b773/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorTaskUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorTaskUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorTaskUtils.java
index 945be88..4ab417b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorTaskUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorTaskUtils.java
@@ -606,8 +606,8 @@ public class VisorTaskUtils {
     public static Path resolveGgfsProfilerLogsDir(IgniteFs ggfs) throws IgniteCheckedException {
         String logsDir;
 
-        if (ggfs instanceof GridGgfsEx)
-            logsDir = ((GridGgfsEx)ggfs).clientLogDirectory();
+        if (ggfs instanceof IgfsEx)
+            logsDir = ((IgfsEx)ggfs).clientLogDirectory();
         else if (ggfs == null)
             throw new IgniteCheckedException("Failed to get profiler log folder (GGFS instance not found)");
         else

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1be8b773/modules/core/src/test/java/org/apache/ignite/ignitefs/GridGgfsEventsAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/ignitefs/GridGgfsEventsAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/ignitefs/GridGgfsEventsAbstractSelfTest.java
index 2033204..8a33d32 100644
--- a/modules/core/src/test/java/org/apache/ignite/ignitefs/GridGgfsEventsAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/ignitefs/GridGgfsEventsAbstractSelfTest.java
@@ -44,7 +44,7 @@ import static org.apache.ignite.testframework.GridTestUtils.*;
  */
 public abstract class GridGgfsEventsAbstractSelfTest extends GridCommonAbstractTest {
     /** GGFS. */
-    private static GridGgfsImpl ggfs;
+    private static IgfsImpl ggfs;
 
     /** Event listener. */
     private IgnitePredicate<Event> lsnr;
@@ -158,7 +158,7 @@ public abstract class GridGgfsEventsAbstractSelfTest extends GridCommonAbstractT
     @Override protected void beforeTestsStarted() throws Exception {
         Ignite ignite = startGrid(1);
 
-        ggfs = (GridGgfsImpl) ignite.fileSystems().iterator().next();
+        ggfs = (IgfsImpl) ignite.fileSystems().iterator().next();
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1be8b773/modules/core/src/test/java/org/apache/ignite/ignitefs/GridGgfsFragmentizerAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/ignitefs/GridGgfsFragmentizerAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/ignitefs/GridGgfsFragmentizerAbstractSelfTest.java
index 85c74ed..b96f1a7 100644
--- a/modules/core/src/test/java/org/apache/ignite/ignitefs/GridGgfsFragmentizerAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/ignitefs/GridGgfsFragmentizerAbstractSelfTest.java
@@ -126,16 +126,16 @@ public class GridGgfsFragmentizerAbstractSelfTest extends IgfsCommonAbstractTest
      * @throws Exception If failed.
      */
     protected void awaitFileFragmenting(int gridIdx, IgniteFsPath path) throws Exception {
-        GridGgfsEx ggfs = (GridGgfsEx)grid(gridIdx).fileSystem("ggfs");
+        IgfsEx ggfs = (IgfsEx)grid(gridIdx).fileSystem("ggfs");
 
-        GridGgfsMetaManager meta = ggfs.context().meta();
+        IgfsMetaManager meta = ggfs.context().meta();
 
         IgniteUuid fileId = meta.fileId(path);
 
         if (fileId == null)
             throw new IgniteFsFileNotFoundException("File not found: " + path);
 
-        GridGgfsFileInfo fileInfo = meta.info(fileId);
+        IgfsFileInfo fileInfo = meta.info(fileId);
 
         do {
             if (fileInfo == null)

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1be8b773/modules/core/src/test/java/org/apache/ignite/ignitefs/GridGgfsFragmentizerSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/ignitefs/GridGgfsFragmentizerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/ignitefs/GridGgfsFragmentizerSelfTest.java
index 2e76dd0..e836d82 100644
--- a/modules/core/src/test/java/org/apache/ignite/ignitefs/GridGgfsFragmentizerSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/ignitefs/GridGgfsFragmentizerSelfTest.java
@@ -223,7 +223,7 @@ public class GridGgfsFragmentizerSelfTest extends GridGgfsFragmentizerAbstractSe
      * @throws Exception If failed.
      */
     public void testDeleteFragmentizing() throws Exception {
-        GridGgfsImpl ggfs = (GridGgfsImpl)grid(0).fileSystem("ggfs");
+        IgfsImpl ggfs = (IgfsImpl)grid(0).fileSystem("ggfs");
 
         for (int i = 0; i < 30; i++) {
             IgniteFsPath path = new IgniteFsPath("/someFile" + i);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1be8b773/modules/core/src/test/java/org/apache/ignite/internal/processors/fs/GridCacheIgfsPerBlockLruEvictionPolicySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/fs/GridCacheIgfsPerBlockLruEvictionPolicySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/fs/GridCacheIgfsPerBlockLruEvictionPolicySelfTest.java
index 0cdd509..afa47bc 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/fs/GridCacheIgfsPerBlockLruEvictionPolicySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/fs/GridCacheIgfsPerBlockLruEvictionPolicySelfTest.java
@@ -62,13 +62,13 @@ public class GridCacheIgfsPerBlockLruEvictionPolicySelfTest extends IgfsCommonAb
     public static final IgniteFsPath FILE_RMT = new IgniteFsPath("/fileRemote");
 
     /** Primary GGFS instances. */
-    private static GridGgfsImpl ggfsPrimary;
+    private static IgfsImpl ggfsPrimary;
 
     /** Secondary GGFS instance. */
     private static IgniteFs secondaryFs;
 
     /** Primary file system data cache. */
-    private static GridCacheAdapter<GridGgfsBlockKey, byte[]> dataCache;
+    private static GridCacheAdapter<IgfsBlockKey, byte[]> dataCache;
 
     /** Eviction policy */
     private static CacheIgniteFsPerBlockLruEvictionPolicy evictPlc;
@@ -137,7 +137,7 @@ public class GridCacheIgfsPerBlockLruEvictionPolicySelfTest extends IgfsCommonAb
 
         Ignite g = G.start(cfg);
 
-        ggfsPrimary = (GridGgfsImpl)g.fileSystem(GGFS_PRIMARY);
+        ggfsPrimary = (IgfsImpl)g.fileSystem(GGFS_PRIMARY);
 
         dataCache = ggfsPrimary.context().kernalContext().cache().internalCache(
             ggfsPrimary.context().configuration().getDataCacheName());

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1be8b773/modules/core/src/test/java/org/apache/ignite/internal/processors/fs/IgfsAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/fs/IgfsAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/fs/IgfsAbstractSelfTest.java
index a328d6c..61892fd 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/fs/IgfsAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/fs/IgfsAbstractSelfTest.java
@@ -111,10 +111,10 @@ public abstract class IgfsAbstractSelfTest extends IgfsCommonAbstractTest {
     protected static byte[] chunk;
 
     /** Primary GGFS. */
-    protected static GridGgfsImpl ggfs;
+    protected static IgfsImpl ggfs;
 
     /** Secondary GGFS. */
-    protected static GridGgfsImpl ggfsSecondary;
+    protected static IgfsImpl ggfsSecondary;
 
     /** GGFS mode. */
     protected final IgniteFsMode mode;
@@ -152,11 +152,11 @@ public abstract class IgfsAbstractSelfTest extends IgfsCommonAbstractTest {
 
         Ignite igniteSecondary = startGridWithGgfs("ignite-secondary", "ignitefs-secondary", PRIMARY, null, SECONDARY_REST_CFG);
 
-        ggfsSecondary = (GridGgfsImpl) igniteSecondary.fileSystem("ignitefs-secondary");
+        ggfsSecondary = (IgfsImpl) igniteSecondary.fileSystem("ignitefs-secondary");
 
         Ignite ignite = startGridWithGgfs("ignite", "ggfs", mode, ggfsSecondary, PRIMARY_REST_CFG);
 
-        ggfs = (GridGgfsImpl) ignite.fileSystem("ggfs");
+        ggfs = (IgfsImpl) ignite.fileSystem("ggfs");
     }
 
     /** {@inheritDoc} */
@@ -707,7 +707,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsCommonAbstractTest {
 
                     return null;
                 }
-            }, GridGgfsDirectoryNotEmptyException.class, "Failed to remove directory (directory is not empty and " +
+            }, IgfsDirectoryNotEmptyException.class, "Failed to remove directory (directory is not empty and " +
                    "recursive flag is not set)");
         }
 
@@ -2114,7 +2114,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsCommonAbstractTest {
         for (int i = 0; i < lvlCnt; i++) {
             int lvl = i + 1;
 
-            GridGgfsImpl targetGgfs = dual ? lvl <= primaryLvlCnt ? ggfs : ggfsSecondary : ggfs;
+            IgfsImpl targetGgfs = dual ? lvl <= primaryLvlCnt ? ggfs : ggfsSecondary : ggfs;
 
             IgniteFsPath[] dirs = dirPaths.get(lvl).toArray(new IgniteFsPath[dirPaths.get(lvl).size()]);
             IgniteFsPath[] files = filePaths.get(lvl).toArray(new IgniteFsPath[filePaths.get(lvl).size()]);
@@ -2266,7 +2266,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsCommonAbstractTest {
      * @param paths Paths.
      * @throws Exception If failed.
      */
-    protected void checkExist(GridGgfsImpl ggfs, GridGgfsImpl ggfsSecondary, IgniteFsPath... paths) throws Exception {
+    protected void checkExist(IgfsImpl ggfs, IgfsImpl ggfsSecondary, IgniteFsPath... paths) throws Exception {
         checkExist(ggfs, paths);
 
         if (dual)
@@ -2280,7 +2280,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsCommonAbstractTest {
      * @param paths Paths.
      * @throws IgniteCheckedException If failed.
      */
-    protected void checkExist(GridGgfsImpl ggfs, IgniteFsPath... paths) throws IgniteCheckedException {
+    protected void checkExist(IgfsImpl ggfs, IgniteFsPath... paths) throws IgniteCheckedException {
         for (IgniteFsPath path : paths) {
             assert ggfs.context().meta().fileId(path) != null : "Path doesn't exist [ggfs=" + ggfs.name() +
                 ", path=" + path + ']';
@@ -2296,7 +2296,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsCommonAbstractTest {
      * @param paths Paths.
      * @throws Exception If failed.
      */
-    protected void checkNotExist(GridGgfsImpl ggfs, GridGgfsImpl ggfsSecondary, IgniteFsPath... paths)
+    protected void checkNotExist(IgfsImpl ggfs, IgfsImpl ggfsSecondary, IgniteFsPath... paths)
         throws Exception {
         checkNotExist(ggfs, paths);
 
@@ -2311,7 +2311,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsCommonAbstractTest {
      * @param paths Paths.
      * @throws Exception If failed.
      */
-    protected void checkNotExist(GridGgfsImpl ggfs, IgniteFsPath... paths) throws Exception {
+    protected void checkNotExist(IgfsImpl ggfs, IgniteFsPath... paths) throws Exception {
         for (IgniteFsPath path : paths) {
             assert ggfs.context().meta().fileId(path) == null : "Path exists [ggfs=" + ggfs.name() + ", path=" +
                 path + ']';
@@ -2329,7 +2329,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsCommonAbstractTest {
      * @param chunks Expected data.
      * @throws Exception If failed.
      */
-    protected void checkFile(GridGgfsImpl ggfs, GridGgfsImpl ggfsSecondary, IgniteFsPath file,
+    protected void checkFile(IgfsImpl ggfs, IgfsImpl ggfsSecondary, IgniteFsPath file,
         @Nullable byte[]... chunks) throws Exception {
         checkExist(ggfs, file);
         checkFileContent(ggfs, file, chunks);
@@ -2349,7 +2349,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsCommonAbstractTest {
      * @throws IOException In case of IO exception.
      * @throws IgniteCheckedException In case of Grid exception.
      */
-    protected void checkFileContent(GridGgfsImpl ggfs, IgniteFsPath file, @Nullable byte[]... chunks)
+    protected void checkFileContent(IgfsImpl ggfs, IgniteFsPath file, @Nullable byte[]... chunks)
         throws IOException, IgniteCheckedException {
         if (chunks != null && chunks.length > 0) {
             IgniteFsInputStream is = null;
@@ -2433,7 +2433,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsCommonAbstractTest {
      * @throws Exception If failed.
      */
     public static void clear(IgniteFs ggfs) throws Exception {
-        Field workerMapFld = GridGgfsImpl.class.getDeclaredField("workerMap");
+        Field workerMapFld = IgfsImpl.class.getDeclaredField("workerMap");
 
         workerMapFld.setAccessible(true);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1be8b773/modules/core/src/test/java/org/apache/ignite/internal/processors/fs/IgfsAttributesSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/fs/IgfsAttributesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/fs/IgfsAttributesSelfTest.java
index 39a86c4..7ed0e3d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/fs/IgfsAttributesSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/fs/IgfsAttributesSelfTest.java
@@ -26,7 +26,7 @@ import java.util.*;
 import static org.apache.ignite.ignitefs.IgniteFsMode.*;
 
 /**
- * {@link GridGgfsAttributes} test case.
+ * {@link IgfsAttributes} test case.
  */
 public class IgfsAttributesSelfTest extends IgfsCommonAbstractTest {
     /**
@@ -38,7 +38,7 @@ public class IgfsAttributesSelfTest extends IgfsCommonAbstractTest {
         pathModes.put("path1", PRIMARY);
         pathModes.put("path2", PROXY);
 
-        GridGgfsAttributes attrs = new GridGgfsAttributes("testGgfsName", 513000, 888, "meta", "data", DUAL_SYNC,
+        IgfsAttributes attrs = new IgfsAttributes("testGgfsName", 513000, 888, "meta", "data", DUAL_SYNC,
             pathModes, true);
 
         ByteArrayOutputStream bos = new ByteArrayOutputStream();
@@ -47,7 +47,7 @@ public class IgfsAttributesSelfTest extends IgfsCommonAbstractTest {
         os.writeObject(attrs);
         os.close();
 
-        GridGgfsAttributes deserializedAttrs = (GridGgfsAttributes)new ObjectInputStream(
+        IgfsAttributes deserializedAttrs = (IgfsAttributes)new ObjectInputStream(
             new ByteArrayInputStream(bos.toByteArray())).readObject();
 
         assertTrue(eq(attrs, deserializedAttrs));
@@ -59,11 +59,11 @@ public class IgfsAttributesSelfTest extends IgfsCommonAbstractTest {
      * @return Whether equals or not.
      * @throws Exception In case of error.
      */
-    private boolean eq(GridGgfsAttributes attr1, GridGgfsAttributes attr2) throws Exception {
+    private boolean eq(IgfsAttributes attr1, IgfsAttributes attr2) throws Exception {
         assert attr1 != null;
         assert attr2 != null;
 
-        for (Field f : GridGgfsAttributes.class.getDeclaredFields()) {
+        for (Field f : IgfsAttributes.class.getDeclaredFields()) {
             f.setAccessible(true);
 
             if (!Modifier.isStatic(f.getModifiers()) && !f.get(attr1).equals(f.get(attr2)))

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1be8b773/modules/core/src/test/java/org/apache/ignite/internal/processors/fs/IgfsDataManagerSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/fs/IgfsDataManagerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/fs/IgfsDataManagerSelfTest.java
index 891abd3..b21cc11 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/fs/IgfsDataManagerSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/fs/IgfsDataManagerSelfTest.java
@@ -43,7 +43,7 @@ import static org.apache.ignite.cache.CacheMode.*;
 import static org.apache.ignite.testframework.GridTestUtils.*;
 
 /**
- * {@link GridGgfsDataManager} test case.
+ * {@link IgfsDataManager} test case.
  */
 public class IgfsDataManagerSelfTest extends IgfsCommonAbstractTest {
     /** Test IP finder. */
@@ -74,11 +74,11 @@ public class IgfsDataManagerSelfTest extends IgfsCommonAbstractTest {
     private final SecureRandom rnd = new SecureRandom();
 
     /** Data manager to test. */
-    private GridGgfsDataManager mgr;
+    private IgfsDataManager mgr;
 
     /** {@inheritDoc} */
     @Override protected void beforeTest() throws Exception {
-        GridGgfsEx ggfs = (GridGgfsEx)grid(0).fileSystem("ggfs");
+        IgfsEx ggfs = (IgfsEx)grid(0).fileSystem("ggfs");
 
         mgr = ggfs.context().data();
     }
@@ -159,7 +159,7 @@ public class IgfsDataManagerSelfTest extends IgfsCommonAbstractTest {
     public void testDataStoring() throws Exception {
         for (int i = 0; i < 10; i++) {
             IgniteFsPath path = new IgniteFsPath();
-            GridGgfsFileInfo info = new GridGgfsFileInfo(200, null, false, null);
+            IgfsFileInfo info = new IgfsFileInfo(200, null, false, null);
 
             assertNull(mgr.dataBlock(info, path, 0, null).get());
 
@@ -171,13 +171,13 @@ public class IgfsDataManagerSelfTest extends IgfsCommonAbstractTest {
 
             expectsStoreFail(info, data, "Not enough space reserved to store data");
 
-            info = new GridGgfsFileInfo(info, info.length() + data.length - 3);
+            info = new IgfsFileInfo(info, info.length() + data.length - 3);
 
             expectsStoreFail(info, data, "Not enough space reserved to store data");
 
-            info = new GridGgfsFileInfo(info, info.length() + 3);
+            info = new IgfsFileInfo(info, info.length() + 3);
 
-            GridGgfsFileAffinityRange range = new GridGgfsFileAffinityRange();
+            IgfsFileAffinityRange range = new IgfsFileAffinityRange();
 
             byte[] remainder = mgr.storeDataBlocks(info, info.length(), null, 0, ByteBuffer.wrap(data), true,
                 range, null);
@@ -240,7 +240,7 @@ public class IgfsDataManagerSelfTest extends IgfsCommonAbstractTest {
 
         for (int i = 0; i < 10; i++) {
             IgniteFsPath path = new IgniteFsPath();
-            GridGgfsFileInfo info = new GridGgfsFileInfo(blockSize, null, false, null);
+            IgfsFileInfo info = new IgfsFileInfo(blockSize, null, false, null);
 
             assertNull(mgr.dataBlock(info, path, 0, null).get());
 
@@ -252,11 +252,11 @@ public class IgfsDataManagerSelfTest extends IgfsCommonAbstractTest {
 
             rnd.nextBytes(remainder);
 
-            info = new GridGgfsFileInfo(info, info.length() + data.length + remainder.length);
+            info = new IgfsFileInfo(info, info.length() + data.length + remainder.length);
 
             IgniteInternalFuture<Boolean> fut = mgr.writeStart(info);
 
-            GridGgfsFileAffinityRange range = new GridGgfsFileAffinityRange();
+            IgfsFileAffinityRange range = new IgfsFileAffinityRange();
 
             byte[] left = mgr.storeDataBlocks(info, info.length(), remainder, remainder.length, ByteBuffer.wrap(data),
                 false, range, null);
@@ -265,7 +265,7 @@ public class IgfsDataManagerSelfTest extends IgfsCommonAbstractTest {
 
             byte[] remainder2 = new byte[blockSize / 2];
 
-            info = new GridGgfsFileInfo(info, info.length() + remainder2.length);
+            info = new IgfsFileInfo(info, info.length() + remainder2.length);
 
             byte[] left2 = mgr.storeDataBlocks(info, info.length(), left, left.length, ByteBuffer.wrap(remainder2),
                 false, range, null);
@@ -327,9 +327,9 @@ public class IgfsDataManagerSelfTest extends IgfsCommonAbstractTest {
 
         for (int i = 0; i < 10; i++) {
             IgniteFsPath path = new IgniteFsPath();
-            GridGgfsFileInfo info = new GridGgfsFileInfo(blockSize, null, false, null);
+            IgfsFileInfo info = new IgfsFileInfo(blockSize, null, false, null);
 
-            GridGgfsFileAffinityRange range = new GridGgfsFileAffinityRange();
+            IgfsFileAffinityRange range = new IgfsFileAffinityRange();
 
             assertNull(mgr.dataBlock(info, path, 0, null).get());
 
@@ -337,7 +337,7 @@ public class IgfsDataManagerSelfTest extends IgfsCommonAbstractTest {
 
             byte[] data = new byte[chunkSize];
 
-            info = new GridGgfsFileInfo(info, info.length() + data.length * writesCnt);
+            info = new IgfsFileInfo(info, info.length() + data.length * writesCnt);
 
             IgniteInternalFuture<Boolean> fut = mgr.writeStart(info);
 
@@ -352,7 +352,7 @@ public class IgfsDataManagerSelfTest extends IgfsCommonAbstractTest {
 
             mgr.writeClose(info);
 
-            assertTrue(range.regionEqual(new GridGgfsFileAffinityRange(0, writesCnt * chunkSize - 1, null)));
+            assertTrue(range.regionEqual(new IgfsFileAffinityRange(0, writesCnt * chunkSize - 1, null)));
 
             fut.get(3000);
 
@@ -395,7 +395,7 @@ public class IgfsDataManagerSelfTest extends IgfsCommonAbstractTest {
         final int grpSize = blockSize * DATA_BLOCK_GROUP_CNT;
 
         //GridGgfsFileInfo info = new GridGgfsFileInfo(blockSize, 0);
-        GridGgfsFileInfo info = new GridGgfsFileInfo(blockSize, 1024 * 1024, null, null, false, null);
+        IgfsFileInfo info = new IgfsFileInfo(blockSize, 1024 * 1024, null, null, false, null);
 
         for (int pos = 0; pos < 5 * grpSize; pos++) {
             assertEquals("Expects no affinity for zero length.", Collections.<IgniteFsBlockLocation>emptyList(),
@@ -443,7 +443,7 @@ public class IgfsDataManagerSelfTest extends IgfsCommonAbstractTest {
     public void testAffinity2() throws Exception {
         int blockSize = BLOCK_SIZE;
 
-        GridGgfsFileInfo info = new GridGgfsFileInfo(blockSize, 1024 * 1024, null, null, false, null);
+        IgfsFileInfo info = new IgfsFileInfo(blockSize, 1024 * 1024, null, null, false, null);
 
         Collection<IgniteFsBlockLocation> affinity = mgr.affinity(info, 0, info.length());
 
@@ -455,7 +455,7 @@ public class IgfsDataManagerSelfTest extends IgfsCommonAbstractTest {
             int endPos;
 
             do {
-                GridGgfsBlockKey key = new GridGgfsBlockKey(info.id(), null, false, block);
+                IgfsBlockKey key = new IgfsBlockKey(info.id(), null, false, block);
 
                 ClusterNode affNode = grid(0).cachex(DATA_CACHE_NAME).affinity().mapKeyToNode(key);
 
@@ -474,14 +474,14 @@ public class IgfsDataManagerSelfTest extends IgfsCommonAbstractTest {
     public void testAffinityFileMap() throws Exception {
         int blockSize = BLOCK_SIZE;
 
-        GridGgfsFileInfo info = new GridGgfsFileInfo(blockSize, 1024 * 1024, null, null, false, null);
+        IgfsFileInfo info = new IgfsFileInfo(blockSize, 1024 * 1024, null, null, false, null);
 
         IgniteUuid affKey = IgniteUuid.randomUuid();
 
-        GridGgfsFileMap map = new GridGgfsFileMap();
+        IgfsFileMap map = new IgfsFileMap();
 
-        map.addRange(new GridGgfsFileAffinityRange(3 * BLOCK_SIZE, 5 * BLOCK_SIZE - 1, affKey));
-        map.addRange(new GridGgfsFileAffinityRange(13 * BLOCK_SIZE, 17 * BLOCK_SIZE - 1, affKey));
+        map.addRange(new IgfsFileAffinityRange(3 * BLOCK_SIZE, 5 * BLOCK_SIZE - 1, affKey));
+        map.addRange(new IgfsFileAffinityRange(13 * BLOCK_SIZE, 17 * BLOCK_SIZE - 1, affKey));
 
         info.fileMap(map);
 
@@ -517,7 +517,7 @@ public class IgfsDataManagerSelfTest extends IgfsCommonAbstractTest {
      * @param info File info.
      * @param affinity Affinity block locations to check.
      */
-    private void checkAffinity(int blockSize, GridGgfsFileInfo info, Iterable<IgniteFsBlockLocation> affinity) {
+    private void checkAffinity(int blockSize, IgfsFileInfo info, Iterable<IgniteFsBlockLocation> affinity) {
         GridCache<Object, Object> dataCache = grid(0).cachex(DATA_CACHE_NAME);
 
         for (IgniteFsBlockLocation loc : affinity) {
@@ -528,7 +528,7 @@ public class IgfsDataManagerSelfTest extends IgfsCommonAbstractTest {
             int endPos;
 
             do {
-                GridGgfsBlockKey key = new GridGgfsBlockKey(info.id(),
+                IgfsBlockKey key = new IgfsBlockKey(info.id(),
                     info.fileMap().affinityKey(block * blockSize, false), false, block);
 
                 ClusterNode affNode = dataCache.affinity().mapKeyToNode(key);
@@ -551,10 +551,10 @@ public class IgfsDataManagerSelfTest extends IgfsCommonAbstractTest {
      * @param data Data to store.
      * @param msg Expected failure message.
      */
-    private void expectsStoreFail(final GridGgfsFileInfo reserved, final byte[] data, @Nullable String msg) {
+    private void expectsStoreFail(final IgfsFileInfo reserved, final byte[] data, @Nullable String msg) {
         GridTestUtils.assertThrows(log, new Callable() {
             @Override public Object call() throws Exception {
-                GridGgfsFileAffinityRange range = new GridGgfsFileAffinityRange();
+                IgfsFileAffinityRange range = new IgfsFileAffinityRange();
 
                 mgr.storeDataBlocks(reserved, reserved.length(), null, 0, ByteBuffer.wrap(data), false, range, null);
 
@@ -569,7 +569,7 @@ public class IgfsDataManagerSelfTest extends IgfsCommonAbstractTest {
      * @param fileInfo File to delete data for.
      * @param msg Expected failure message.
      */
-    private void expectsDeleteFail(final GridGgfsFileInfo fileInfo, @Nullable String msg) {
+    private void expectsDeleteFail(final IgfsFileInfo fileInfo, @Nullable String msg) {
         GridTestUtils.assertThrows(log, new Callable() {
             @Override public Object call() throws Exception {
                 mgr.delete(fileInfo);
@@ -587,7 +587,7 @@ public class IgfsDataManagerSelfTest extends IgfsCommonAbstractTest {
      * @param len File part length to get affinity for.
      * @param msg Expected failure message.
      */
-    private void expectsAffinityFail(final GridGgfsFileInfo info, final long start, final long len,
+    private void expectsAffinityFail(final IgfsFileInfo info, final long start, final long len,
         @Nullable String msg) {
         GridTestUtils.assertThrows(log, new Callable() {
             @Override public Object call() throws Exception {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1be8b773/modules/core/src/test/java/org/apache/ignite/internal/processors/fs/IgfsDualAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/fs/IgfsDualAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/fs/IgfsDualAbstractSelfTest.java
index 1154742..4619f55 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/fs/IgfsDualAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/fs/IgfsDualAbstractSelfTest.java
@@ -1243,13 +1243,13 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest {
         }
 
         // Wait for a while for prefetch to finish.
-        GridGgfsMetaManager meta = ggfs.context().meta();
+        IgfsMetaManager meta = ggfs.context().meta();
 
-        GridGgfsFileInfo info = meta.info(meta.fileId(FILE));
+        IgfsFileInfo info = meta.info(meta.fileId(FILE));
 
-        GridGgfsBlockKey key = new GridGgfsBlockKey(info.id(), info.affinityKey(), info.evictExclude(), 2);
+        IgfsBlockKey key = new IgfsBlockKey(info.id(), info.affinityKey(), info.evictExclude(), 2);
 
-        GridCache<GridGgfsBlockKey, byte[]> dataCache = ggfs.context().kernalContext().cache().cache(
+        GridCache<IgfsBlockKey, byte[]> dataCache = ggfs.context().kernalContext().cache().cache(
             ggfs.configuration().getDataCacheName());
 
         for (int i = 0; i < 10; i++) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1be8b773/modules/core/src/test/java/org/apache/ignite/internal/processors/fs/IgfsFileInfoSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/fs/IgfsFileInfoSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/fs/IgfsFileInfoSelfTest.java
index af38b13..d843d92 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/fs/IgfsFileInfoSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/fs/IgfsFileInfoSelfTest.java
@@ -28,7 +28,7 @@ import java.util.*;
 import java.util.concurrent.*;
 
 /**
- * {@link org.apache.ignite.internal.processors.fs.GridGgfsFileInfo} test case.
+ * {@link IgfsFileInfo} test case.
  */
 public class IgfsFileInfoSelfTest extends IgfsCommonAbstractTest {
     /** Marshaller to test {@link Externalizable} interface. */
@@ -48,16 +48,16 @@ public class IgfsFileInfoSelfTest extends IgfsCommonAbstractTest {
             @SuppressWarnings("deprecation") // Suppress due to default constructor should never be used directly.
             @Nullable @Override public Object call() throws IgniteCheckedException {
                 for (int i = 0; i < 10000; i++) {
-                    testSerialization(new GridGgfsFileInfo());
-                    testSerialization(new GridGgfsFileInfo());
-                    testSerialization(new GridGgfsFileInfo(true, null));
-                    testSerialization(new GridGgfsFileInfo(false, null));
+                    testSerialization(new IgfsFileInfo());
+                    testSerialization(new IgfsFileInfo());
+                    testSerialization(new IgfsFileInfo(true, null));
+                    testSerialization(new IgfsFileInfo(false, null));
 
-                    GridGgfsFileInfo rndInfo = new GridGgfsFileInfo(rnd.nextInt(max), null, false, null);
+                    IgfsFileInfo rndInfo = new IgfsFileInfo(rnd.nextInt(max), null, false, null);
 
                     testSerialization(rndInfo);
-                    testSerialization(new GridGgfsFileInfo(rndInfo, rnd.nextInt(max)));
-                    testSerialization(new GridGgfsFileInfo(rndInfo, F.asMap("desc", String.valueOf(rnd.nextLong()))));
+                    testSerialization(new IgfsFileInfo(rndInfo, rnd.nextInt(max)));
+                    testSerialization(new IgfsFileInfo(rndInfo, F.asMap("desc", String.valueOf(rnd.nextLong()))));
                 }
 
                 return null;
@@ -71,7 +71,7 @@ public class IgfsFileInfoSelfTest extends IgfsCommonAbstractTest {
      * @param info Node info to test serialization for.
      * @throws IgniteCheckedException If failed.
      */
-    public void testSerialization(GridGgfsFileInfo info) throws IgniteCheckedException {
+    public void testSerialization(IgfsFileInfo info) throws IgniteCheckedException {
         assertEquals(info, mu(info));
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1be8b773/modules/core/src/test/java/org/apache/ignite/internal/processors/fs/IgfsFileMapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/fs/IgfsFileMapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/fs/IgfsFileMapSelfTest.java
index 7ff559c..ad353d0 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/fs/IgfsFileMapSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/fs/IgfsFileMapSelfTest.java
@@ -24,7 +24,7 @@ import org.apache.ignite.testframework.*;
 import java.util.*;
 import java.util.concurrent.*;
 
-import static org.apache.ignite.internal.processors.fs.GridGgfsFileAffinityRange.*;
+import static org.apache.ignite.internal.processors.fs.IgfsFileAffinityRange.*;
 
 /**
  * File map self test.
@@ -34,7 +34,7 @@ public class IgfsFileMapSelfTest extends IgfsCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testRanges() throws Exception {
-        GridGgfsFileMap map = new GridGgfsFileMap();
+        IgfsFileMap map = new IgfsFileMap();
 
         IgniteUuid[] affKeys = new IgniteUuid[20];
 
@@ -56,7 +56,7 @@ public class IgfsFileMapSelfTest extends IgfsCommonAbstractTest {
                 assertEquals("For i: " + i, affKey, map.affinityKey(off3, false));
             }
 
-            map.addRange(new GridGgfsFileAffinityRange(10 + 20 * numOfRanges, 19 + 20 * numOfRanges,
+            map.addRange(new IgfsFileAffinityRange(10 + 20 * numOfRanges, 19 + 20 * numOfRanges,
                 affKeys[numOfRanges]));
 
             numOfRanges++;
@@ -67,44 +67,44 @@ public class IgfsFileMapSelfTest extends IgfsCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testAddUpdateAdd() throws Exception {
-        GridGgfsFileMap map = new GridGgfsFileMap();
+        IgfsFileMap map = new IgfsFileMap();
 
         IgniteUuid affKey = IgniteUuid.randomUuid();
 
-        map.addRange(new GridGgfsFileAffinityRange(0, 9, affKey));
+        map.addRange(new IgfsFileAffinityRange(0, 9, affKey));
 
-        map.updateRangeStatus(new GridGgfsFileAffinityRange(0, 9, affKey), RANGE_STATUS_MOVING);
+        map.updateRangeStatus(new IgfsFileAffinityRange(0, 9, affKey), RANGE_STATUS_MOVING);
 
-        map.addRange(new GridGgfsFileAffinityRange(10, 19, affKey));
+        map.addRange(new IgfsFileAffinityRange(10, 19, affKey));
 
-        List<GridGgfsFileAffinityRange> ranges = map.ranges();
+        List<IgfsFileAffinityRange> ranges = map.ranges();
 
         assertEquals(2, ranges.size());
 
         assertEquals(RANGE_STATUS_MOVING, ranges.get(0).status());
-        assertTrue(ranges.get(0).regionEqual(new GridGgfsFileAffinityRange(0, 9, affKey)));
+        assertTrue(ranges.get(0).regionEqual(new IgfsFileAffinityRange(0, 9, affKey)));
 
         assertEquals(RANGE_STATUS_INITIAL, ranges.get(1).status());
-        assertTrue(ranges.get(1).regionEqual(new GridGgfsFileAffinityRange(10, 19, affKey)));
+        assertTrue(ranges.get(1).regionEqual(new IgfsFileAffinityRange(10, 19, affKey)));
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testRangeUpdate1() throws Exception {
-        GridGgfsFileMap map = new GridGgfsFileMap();
+        IgfsFileMap map = new IgfsFileMap();
 
         IgniteUuid affKey = IgniteUuid.randomUuid();
 
         for (int i = 0; i < 4; i++)
-            map.addRange(new GridGgfsFileAffinityRange(i * 20 + 10, i * 20 + 19, affKey));
+            map.addRange(new IgfsFileAffinityRange(i * 20 + 10, i * 20 + 19, affKey));
 
         // Middle, first, last.
-        map.updateRangeStatus(new GridGgfsFileAffinityRange(30, 39, affKey), RANGE_STATUS_MOVING);
-        map.updateRangeStatus(new GridGgfsFileAffinityRange(10, 19, affKey), RANGE_STATUS_MOVING);
-        map.updateRangeStatus(new GridGgfsFileAffinityRange(70, 79, affKey), RANGE_STATUS_MOVING);
+        map.updateRangeStatus(new IgfsFileAffinityRange(30, 39, affKey), RANGE_STATUS_MOVING);
+        map.updateRangeStatus(new IgfsFileAffinityRange(10, 19, affKey), RANGE_STATUS_MOVING);
+        map.updateRangeStatus(new IgfsFileAffinityRange(70, 79, affKey), RANGE_STATUS_MOVING);
 
-        List<GridGgfsFileAffinityRange> ranges = map.ranges();
+        List<IgfsFileAffinityRange> ranges = map.ranges();
 
         assertEquals(RANGE_STATUS_MOVING, ranges.get(0).status());
         assertEquals(RANGE_STATUS_MOVING, ranges.get(1).status());
@@ -112,9 +112,9 @@ public class IgfsFileMapSelfTest extends IgfsCommonAbstractTest {
         assertEquals(RANGE_STATUS_MOVING, ranges.get(3).status());
 
         // Middle, first, last.
-        map.updateRangeStatus(new GridGgfsFileAffinityRange(30, 39, affKey), RANGE_STATUS_MOVED);
-        map.updateRangeStatus(new GridGgfsFileAffinityRange(10, 19, affKey), RANGE_STATUS_MOVED);
-        map.updateRangeStatus(new GridGgfsFileAffinityRange(70, 79, affKey), RANGE_STATUS_MOVED);
+        map.updateRangeStatus(new IgfsFileAffinityRange(30, 39, affKey), RANGE_STATUS_MOVED);
+        map.updateRangeStatus(new IgfsFileAffinityRange(10, 19, affKey), RANGE_STATUS_MOVED);
+        map.updateRangeStatus(new IgfsFileAffinityRange(70, 79, affKey), RANGE_STATUS_MOVED);
 
         ranges = map.ranges();
 
@@ -124,151 +124,151 @@ public class IgfsFileMapSelfTest extends IgfsCommonAbstractTest {
         assertEquals(RANGE_STATUS_MOVED, ranges.get(3).status());
 
         // Middle, first, last.
-        map.deleteRange(new GridGgfsFileAffinityRange(30, 39, affKey));
-        map.deleteRange(new GridGgfsFileAffinityRange(10, 19, affKey));
-        map.deleteRange(new GridGgfsFileAffinityRange(70, 79, affKey));
+        map.deleteRange(new IgfsFileAffinityRange(30, 39, affKey));
+        map.deleteRange(new IgfsFileAffinityRange(10, 19, affKey));
+        map.deleteRange(new IgfsFileAffinityRange(70, 79, affKey));
 
         ranges = map.ranges();
 
         assertEquals(1, ranges.size());
         assertEquals(RANGE_STATUS_INITIAL, ranges.get(0).status());
-        assertTrue(ranges.get(0).regionEqual(new GridGgfsFileAffinityRange(50, 59, affKey)));
+        assertTrue(ranges.get(0).regionEqual(new IgfsFileAffinityRange(50, 59, affKey)));
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testRangeUpdate2() throws Exception {
-        GridGgfsFileMap map = new GridGgfsFileMap();
+        IgfsFileMap map = new IgfsFileMap();
 
         IgniteUuid affKey = IgniteUuid.randomUuid();
 
         for (int i = 0; i < 4; i++)
-            map.addRange(new GridGgfsFileAffinityRange(i * 20 + 10, i * 20 + 19, affKey));
+            map.addRange(new IgfsFileAffinityRange(i * 20 + 10, i * 20 + 19, affKey));
 
         // Middle, first, last.
-        map.updateRangeStatus(new GridGgfsFileAffinityRange(30, 35, affKey), RANGE_STATUS_MOVING);
-        map.updateRangeStatus(new GridGgfsFileAffinityRange(10, 15, affKey), RANGE_STATUS_MOVING);
-        map.updateRangeStatus(new GridGgfsFileAffinityRange(70, 75, affKey), RANGE_STATUS_MOVING);
+        map.updateRangeStatus(new IgfsFileAffinityRange(30, 35, affKey), RANGE_STATUS_MOVING);
+        map.updateRangeStatus(new IgfsFileAffinityRange(10, 15, affKey), RANGE_STATUS_MOVING);
+        map.updateRangeStatus(new IgfsFileAffinityRange(70, 75, affKey), RANGE_STATUS_MOVING);
 
-        List<GridGgfsFileAffinityRange> ranges = map.ranges();
+        List<IgfsFileAffinityRange> ranges = map.ranges();
 
         assertEquals(7, ranges.size());
 
         int idx = 0;
-        assertTrue(ranges.get(idx).regionEqual(new GridGgfsFileAffinityRange(10, 15, affKey)));
+        assertTrue(ranges.get(idx).regionEqual(new IgfsFileAffinityRange(10, 15, affKey)));
         assertEquals(RANGE_STATUS_MOVING, ranges.get(idx).status());
         idx++;
 
-        assertTrue(ranges.get(idx).regionEqual(new GridGgfsFileAffinityRange(16, 19, affKey)));
+        assertTrue(ranges.get(idx).regionEqual(new IgfsFileAffinityRange(16, 19, affKey)));
         assertEquals(RANGE_STATUS_INITIAL, ranges.get(idx).status());
         idx++;
 
-        assertTrue(ranges.get(idx).regionEqual(new GridGgfsFileAffinityRange(30, 35, affKey)));
+        assertTrue(ranges.get(idx).regionEqual(new IgfsFileAffinityRange(30, 35, affKey)));
         assertEquals(RANGE_STATUS_MOVING, ranges.get(idx).status());
         idx++;
 
-        assertTrue(ranges.get(idx).regionEqual(new GridGgfsFileAffinityRange(36, 39, affKey)));
+        assertTrue(ranges.get(idx).regionEqual(new IgfsFileAffinityRange(36, 39, affKey)));
         assertEquals(RANGE_STATUS_INITIAL, ranges.get(idx).status());
         idx++;
 
-        assertTrue(ranges.get(idx).regionEqual(new GridGgfsFileAffinityRange(50, 59, affKey)));
+        assertTrue(ranges.get(idx).regionEqual(new IgfsFileAffinityRange(50, 59, affKey)));
         assertEquals(RANGE_STATUS_INITIAL, ranges.get(idx).status());
         idx++;
 
-        assertTrue(ranges.get(idx).regionEqual(new GridGgfsFileAffinityRange(70, 75, affKey)));
+        assertTrue(ranges.get(idx).regionEqual(new IgfsFileAffinityRange(70, 75, affKey)));
         assertEquals(RANGE_STATUS_MOVING, ranges.get(idx).status());
         idx++;
 
-        assertTrue(ranges.get(idx).regionEqual(new GridGgfsFileAffinityRange(76, 79, affKey)));
+        assertTrue(ranges.get(idx).regionEqual(new IgfsFileAffinityRange(76, 79, affKey)));
         assertEquals(RANGE_STATUS_INITIAL, ranges.get(idx).status());
 
         // Middle, first, last.
-        map.updateRangeStatus(new GridGgfsFileAffinityRange(30, 35, affKey), RANGE_STATUS_MOVED);
-        map.updateRangeStatus(new GridGgfsFileAffinityRange(10, 15, affKey), RANGE_STATUS_MOVED);
-        map.updateRangeStatus(new GridGgfsFileAffinityRange(70, 75, affKey), RANGE_STATUS_MOVED);
+        map.updateRangeStatus(new IgfsFileAffinityRange(30, 35, affKey), RANGE_STATUS_MOVED);
+        map.updateRangeStatus(new IgfsFileAffinityRange(10, 15, affKey), RANGE_STATUS_MOVED);
+        map.updateRangeStatus(new IgfsFileAffinityRange(70, 75, affKey), RANGE_STATUS_MOVED);
 
         idx = 0;
-        assertTrue(ranges.get(idx).regionEqual(new GridGgfsFileAffinityRange(10, 15, affKey)));
+        assertTrue(ranges.get(idx).regionEqual(new IgfsFileAffinityRange(10, 15, affKey)));
         assertEquals(RANGE_STATUS_MOVED, ranges.get(idx).status());
         idx++;
 
-        assertTrue(ranges.get(idx).regionEqual(new GridGgfsFileAffinityRange(16, 19, affKey)));
+        assertTrue(ranges.get(idx).regionEqual(new IgfsFileAffinityRange(16, 19, affKey)));
         assertEquals(RANGE_STATUS_INITIAL, ranges.get(idx).status());
         idx++;
 
-        assertTrue(ranges.get(idx).regionEqual(new GridGgfsFileAffinityRange(30, 35, affKey)));
+        assertTrue(ranges.get(idx).regionEqual(new IgfsFileAffinityRange(30, 35, affKey)));
         assertEquals(RANGE_STATUS_MOVED, ranges.get(idx).status());
         idx++;
 
-        assertTrue(ranges.get(idx).regionEqual(new GridGgfsFileAffinityRange(36, 39, affKey)));
+        assertTrue(ranges.get(idx).regionEqual(new IgfsFileAffinityRange(36, 39, affKey)));
         assertEquals(RANGE_STATUS_INITIAL, ranges.get(idx).status());
         idx++;
 
-        assertTrue(ranges.get(idx).regionEqual(new GridGgfsFileAffinityRange(50, 59, affKey)));
+        assertTrue(ranges.get(idx).regionEqual(new IgfsFileAffinityRange(50, 59, affKey)));
         assertEquals(RANGE_STATUS_INITIAL, ranges.get(idx).status());
         idx++;
 
-        assertTrue(ranges.get(idx).regionEqual(new GridGgfsFileAffinityRange(70, 75, affKey)));
+        assertTrue(ranges.get(idx).regionEqual(new IgfsFileAffinityRange(70, 75, affKey)));
         assertEquals(RANGE_STATUS_MOVED, ranges.get(idx).status());
         idx++;
 
-        assertTrue(ranges.get(idx).regionEqual(new GridGgfsFileAffinityRange(76, 79, affKey)));
+        assertTrue(ranges.get(idx).regionEqual(new IgfsFileAffinityRange(76, 79, affKey)));
         assertEquals(RANGE_STATUS_INITIAL, ranges.get(idx).status());
 
         // Middle, first, last.
-        map.deleteRange(new GridGgfsFileAffinityRange(30, 35, affKey));
-        map.deleteRange(new GridGgfsFileAffinityRange(10, 15, affKey));
-        map.deleteRange(new GridGgfsFileAffinityRange(70, 75, affKey));
+        map.deleteRange(new IgfsFileAffinityRange(30, 35, affKey));
+        map.deleteRange(new IgfsFileAffinityRange(10, 15, affKey));
+        map.deleteRange(new IgfsFileAffinityRange(70, 75, affKey));
 
         ranges = map.ranges();
 
         assertEquals(4, ranges.size());
 
         assertEquals(RANGE_STATUS_INITIAL, ranges.get(0).status());
-        assertTrue(ranges.get(0).regionEqual(new GridGgfsFileAffinityRange(16, 19, affKey)));
+        assertTrue(ranges.get(0).regionEqual(new IgfsFileAffinityRange(16, 19, affKey)));
 
         assertEquals(RANGE_STATUS_INITIAL, ranges.get(1).status());
-        assertTrue(ranges.get(1).regionEqual(new GridGgfsFileAffinityRange(36, 39, affKey)));
+        assertTrue(ranges.get(1).regionEqual(new IgfsFileAffinityRange(36, 39, affKey)));
 
         assertEquals(RANGE_STATUS_INITIAL, ranges.get(2).status());
-        assertTrue(ranges.get(2).regionEqual(new GridGgfsFileAffinityRange(50, 59, affKey)));
+        assertTrue(ranges.get(2).regionEqual(new IgfsFileAffinityRange(50, 59, affKey)));
 
         assertEquals(RANGE_STATUS_INITIAL, ranges.get(3).status());
-        assertTrue(ranges.get(3).regionEqual(new GridGgfsFileAffinityRange(76, 79, affKey)));
+        assertTrue(ranges.get(3).regionEqual(new IgfsFileAffinityRange(76, 79, affKey)));
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testInvalidRangeUpdates() throws Exception {
-        final GridGgfsFileMap map = new GridGgfsFileMap();
+        final IgfsFileMap map = new IgfsFileMap();
 
         final IgniteUuid affKey1 = IgniteUuid.randomUuid();
         final IgniteUuid affKey2 = IgniteUuid.randomUuid();
 
-        map.addRange(new GridGgfsFileAffinityRange(10, 19, affKey1));
-        map.addRange(new GridGgfsFileAffinityRange(30, 39, affKey1));
+        map.addRange(new IgfsFileAffinityRange(10, 19, affKey1));
+        map.addRange(new IgfsFileAffinityRange(30, 39, affKey1));
 
         GridTestUtils.assertThrows(log, new Callable<Object>() {
             @Override public Object call() throws Exception {
-                map.updateRangeStatus(new GridGgfsFileAffinityRange(0, 5, affKey1), RANGE_STATUS_MOVING);
+                map.updateRangeStatus(new IgfsFileAffinityRange(0, 5, affKey1), RANGE_STATUS_MOVING);
 
                 return null;
             }
-        }, GridGgfsInvalidRangeException.class, null);
+        }, IgfsInvalidRangeException.class, null);
 
         GridTestUtils.assertThrows(log, new Callable<Object>() {
             @Override public Object call() throws Exception {
-                map.updateRangeStatus(new GridGgfsFileAffinityRange(15, 19, affKey1), RANGE_STATUS_MOVING);
+                map.updateRangeStatus(new IgfsFileAffinityRange(15, 19, affKey1), RANGE_STATUS_MOVING);
 
                 return null;
             }
-        }, GridGgfsInvalidRangeException.class, null);
+        }, IgfsInvalidRangeException.class, null);
 
         GridTestUtils.assertThrows(log, new Callable<Object>() {
             @Override public Object call() throws Exception {
-                map.updateRangeStatus(new GridGgfsFileAffinityRange(10, 19, affKey2), RANGE_STATUS_MOVING);
+                map.updateRangeStatus(new IgfsFileAffinityRange(10, 19, affKey2), RANGE_STATUS_MOVING);
 
                 return null;
             }
@@ -276,7 +276,7 @@ public class IgfsFileMapSelfTest extends IgfsCommonAbstractTest {
 
         GridTestUtils.assertThrows(log, new Callable<Object>() {
             @Override public Object call() throws Exception {
-                map.updateRangeStatus(new GridGgfsFileAffinityRange(10, 22, affKey1), RANGE_STATUS_MOVING);
+                map.updateRangeStatus(new IgfsFileAffinityRange(10, 22, affKey1), RANGE_STATUS_MOVING);
 
                 return null;
             }
@@ -291,9 +291,9 @@ public class IgfsFileMapSelfTest extends IgfsCommonAbstractTest {
     public void testRangeSplit() throws Exception {
         IgniteUuid affKey = IgniteUuid.randomUuid();
 
-        GridGgfsFileAffinityRange range = new GridGgfsFileAffinityRange(0, 9999, affKey);
+        IgfsFileAffinityRange range = new IgfsFileAffinityRange(0, 9999, affKey);
 
-        Collection<GridGgfsFileAffinityRange> split = range.split(10000);
+        Collection<IgfsFileAffinityRange> split = range.split(10000);
 
         assertEquals(1, split.size());
         assertTrue(range.regionEqual(F.first(split)));
@@ -302,15 +302,15 @@ public class IgfsFileMapSelfTest extends IgfsCommonAbstractTest {
 
         assertEquals(2, split.size());
 
-        Iterator<GridGgfsFileAffinityRange> it = split.iterator();
+        Iterator<IgfsFileAffinityRange> it = split.iterator();
 
-        GridGgfsFileAffinityRange part = it.next();
+        IgfsFileAffinityRange part = it.next();
 
-        assertTrue(part.regionEqual(new GridGgfsFileAffinityRange(0, 4999, affKey)));
+        assertTrue(part.regionEqual(new IgfsFileAffinityRange(0, 4999, affKey)));
 
         part = it.next();
 
-        assertTrue(part.regionEqual(new GridGgfsFileAffinityRange(5000, 9999, affKey)));
+        assertTrue(part.regionEqual(new IgfsFileAffinityRange(5000, 9999, affKey)));
 
         split = range.split(3000);
 
@@ -320,18 +320,18 @@ public class IgfsFileMapSelfTest extends IgfsCommonAbstractTest {
 
         part = it.next();
 
-        assertTrue(part.regionEqual(new GridGgfsFileAffinityRange(0, 2999, affKey)));
+        assertTrue(part.regionEqual(new IgfsFileAffinityRange(0, 2999, affKey)));
 
         part = it.next();
 
-        assertTrue(part.regionEqual(new GridGgfsFileAffinityRange(3000, 5999, affKey)));
+        assertTrue(part.regionEqual(new IgfsFileAffinityRange(3000, 5999, affKey)));
 
         part = it.next();
 
-        assertTrue(part.regionEqual(new GridGgfsFileAffinityRange(6000, 8999, affKey)));
+        assertTrue(part.regionEqual(new IgfsFileAffinityRange(6000, 8999, affKey)));
 
         part = it.next();
 
-        assertTrue(part.regionEqual(new GridGgfsFileAffinityRange(9000, 9999, affKey)));
+        assertTrue(part.regionEqual(new IgfsFileAffinityRange(9000, 9999, affKey)));
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1be8b773/modules/core/src/test/java/org/apache/ignite/internal/processors/fs/IgfsGroupDataBlockKeyMapperHashSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/fs/IgfsGroupDataBlockKeyMapperHashSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/fs/IgfsGroupDataBlockKeyMapperHashSelfTest.java
index 911d584..1bfe71a 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/fs/IgfsGroupDataBlockKeyMapperHashSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/fs/IgfsGroupDataBlockKeyMapperHashSelfTest.java
@@ -55,7 +55,7 @@ public class IgfsGroupDataBlockKeyMapperHashSelfTest extends IgfsCommonAbstractT
      * @return Partition index.
      */
     private int partition(IgniteFsGroupDataBlocksKeyMapper mapper, IgniteUuid fileId, long blockId, int partCnt) {
-        return U.safeAbs((Integer) mapper.affinityKey(new GridGgfsBlockKey(fileId, null, false, blockId)) % partCnt);
+        return U.safeAbs((Integer) mapper.affinityKey(new IgfsBlockKey(fileId, null, false, blockId)) % partCnt);
     }
 
     /**


Mime
View raw message