ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yzhda...@apache.org
Subject [03/26] incubator-ignite git commit: ignite-100
Date Wed, 21 Jan 2015 17:33:56 GMT
ignite-100


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

Branch: refs/heads/ignite-66
Commit: 2af57da6eaa49ea0281d739048036061576dd3df
Parents: c0c28ab
Author: S.Vladykin <svladykin@gridgain.com>
Authored: Fri Jan 16 17:58:12 2015 +0300
Committer: S.Vladykin <svladykin@gridgain.com>
Committed: Fri Jan 16 17:58:12 2015 +0300

----------------------------------------------------------------------
 ...heGgfsPerBlockLruEvictionPolicySelfTest.java | 15 ++--
 .../ggfs/GridGgfsAbstractSelfTest.java          | 20 ++++--
 .../ggfs/GridGgfsMetricsSelfTest.java           | 10 +--
 .../processors/ggfs/GridGgfsModesSelfTest.java  |  6 +-
 ...IpcEndpointRegistrationAbstractSelfTest.java | 33 ++++++---
 ...dpointRegistrationOnLinuxAndMacSelfTest.java |  6 +-
 ...pcEndpointRegistrationOnWindowsSelfTest.java |  4 +-
 ...idIpcServerEndpointDeserializerSelfTest.java | 76 ++++++++++----------
 .../testframework/GridGgfsTestUtils.java        | 55 --------------
 .../grid/ggfs/GridGgfsEventsTestSuite.java      | 26 ++++---
 ...dGgfsHadoop20FileSystemAbstractSelfTest.java |  9 ++-
 ...doop20FileSystemLoopbackPrimarySelfTest.java | 11 ++-
 ...sHadoop20FileSystemShmemPrimarySelfTest.java | 11 ++-
 .../GridGgfsHadoopDualAbstractSelfTest.java     | 19 +++--
 ...ridGgfsHadoopFileSystemAbstractSelfTest.java | 15 ++--
 .../GridGgfsHadoopFileSystemClientSelfTest.java |  6 +-
 ...idGgfsHadoopFileSystemHandshakeSelfTest.java |  7 +-
 ...ridGgfsHadoopFileSystemIpcCacheSelfTest.java |  7 +-
 ...GgfsHadoopFileSystemLoggerStateSelfTest.java |  7 +-
 ...adoopFileSystemLoopbackAbstractSelfTest.java |  9 ++-
 ...fsHadoopFileSystemSecondaryModeSelfTest.java | 12 +++-
 ...fsHadoopFileSystemShmemAbstractSelfTest.java |  7 +-
 .../ggfs/GridGgfsNearOnlyMultiNodeSelfTest.java |  7 +-
 23 files changed, 198 insertions(+), 180 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2af57da6/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridCacheGgfsPerBlockLruEvictionPolicySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridCacheGgfsPerBlockLruEvictionPolicySelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridCacheGgfsPerBlockLruEvictionPolicySelfTest.java
index 7d78f94..9a87319 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridCacheGgfsPerBlockLruEvictionPolicySelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridCacheGgfsPerBlockLruEvictionPolicySelfTest.java
@@ -49,14 +49,11 @@ public class GridCacheGgfsPerBlockLruEvictionPolicySelfTest extends GridGgfsComm
     /** Primary GGFS name. */
     private static final String GGFS_SECONDARY = "ggfs-secondary";
 
-    /** Secondary file system URI. */
-    private static final String SECONDARY_URI = "ggfs://ggfs-secondary:grid-secondary@127.0.0.1:11500/";
-
-    /** Secondary file system configuration path. */
-    private static final String SECONDARY_CFG = "modules/core/src/test/config/hadoop/core-site-loopback-secondary.xml";
-
-    /** Secondary file system REST endpoint configuration string. */
-    private static final String SECONDARY_REST_CFG = "{type:'tcp', port:11500}";
+    /** Secondary file system REST endpoint configuration map. */
+    private static final Map<String, String> SECONDARY_REST_CFG = new HashMap<String, String>() {{
+        put("type", "tcp");
+        put("port", "11500");
+    }};
 
     /** File working in PRIMARY mode. */
     public static final IgniteFsPath FILE = new IgniteFsPath("/file");
@@ -159,7 +156,7 @@ public class GridCacheGgfsPerBlockLruEvictionPolicySelfTest extends GridGgfsComm
         ggfsCfg.setName(GGFS_SECONDARY);
         ggfsCfg.setBlockSize(512);
         ggfsCfg.setDefaultMode(PRIMARY);
-        ggfsCfg.setIpcEndpointConfiguration(GridGgfsTestUtils.jsonToMap(SECONDARY_REST_CFG));
+        ggfsCfg.setIpcEndpointConfiguration(SECONDARY_REST_CFG);
 
         GridCacheConfiguration dataCacheCfg = defaultCacheConfiguration();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2af57da6/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsAbstractSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsAbstractSelfTest.java
index 2eb429b..0c252dc 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsAbstractSelfTest.java
@@ -66,11 +66,17 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes
     /** Amount of sequential block reads before prefetch is triggered. */
     protected static final int SEQ_READS_BEFORE_PREFETCH = 2;
 
-    /** Primary file system REST endpoint configuration string. */
-    protected static final String PRIMARY_REST_CFG = "{type:'tcp', port:10500}";
-
-    /** Secondary file system REST endpoint configuration string. */
-    protected static final String SECONDARY_REST_CFG = "{type:'tcp', port:11500}";
+    /** Primary file system REST endpoint configuration map. */
+    protected static final Map<String, String> PRIMARY_REST_CFG = new HashMap<String, String>() {{
+        put("type", "tcp");
+        put("port", "10500");
+    }};
+
+    /** Secondary file system REST endpoint configuration map. */
+    protected static final Map<String, String> SECONDARY_REST_CFG = new HashMap<String, String>() {{
+        put("type", "tcp");
+        put("port", "11500");
+    }};
 
     /** Directory. */
     protected static final IgniteFsPath DIR = new IgniteFsPath("/dir");
@@ -176,7 +182,7 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes
      * @throws Exception If failed.
      */
     protected Ignite startGridWithGgfs(String gridName, String ggfsName, IgniteFsMode mode,
-        @Nullable IgniteFsFileSystem secondaryFs, @Nullable String restCfg) throws Exception {
+        @Nullable IgniteFsFileSystem secondaryFs, @Nullable Map<String, String> restCfg) throws Exception {
         IgniteFsConfiguration ggfsCfg = new IgniteFsConfiguration();
 
         ggfsCfg.setDataCacheName("dataCache");
@@ -184,7 +190,7 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes
         ggfsCfg.setName(ggfsName);
         ggfsCfg.setBlockSize(GGFS_BLOCK_SIZE);
         ggfsCfg.setDefaultMode(mode);
-        ggfsCfg.setIpcEndpointConfiguration(GridGgfsTestUtils.jsonToMap(restCfg));
+        ggfsCfg.setIpcEndpointConfiguration(restCfg);
         ggfsCfg.setSecondaryFileSystem(secondaryFs);
         ggfsCfg.setPrefetchBlocks(PREFETCH_BLOCKS);
         ggfsCfg.setSequentialReadsBeforePrefetch(SEQ_READS_BEFORE_PREFETCH);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2af57da6/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsMetricsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsMetricsSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsMetricsSelfTest.java
index 3cebd3c..22bd798 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsMetricsSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsMetricsSelfTest.java
@@ -26,7 +26,6 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
 import org.gridgain.grid.util.typedef.*;
 import org.gridgain.grid.util.typedef.internal.U;
-import org.gridgain.testframework.*;
 
 import java.util.*;
 
@@ -44,8 +43,11 @@ public class GridGgfsMetricsSelfTest extends GridGgfsCommonAbstractTest {
     /** Primary GGFS name. */
     private static final String GGFS_SECONDARY = "ggfs-secondary";
 
-    /** Secondary file system REST endpoint configuration string. */
-    private static final String SECONDARY_REST_CFG = "{type:'tcp', port:11500}";
+    /** Secondary file system REST endpoint configuration map. */
+    private static final Map<String, String> SECONDARY_REST_CFG = new HashMap<String, String>(){{
+        put("type", "tcp");
+        put("port", "11500");
+    }};
 
     /** Test nodes count. */
     private static final int NODES_CNT = 3;
@@ -164,7 +166,7 @@ public class GridGgfsMetricsSelfTest extends GridGgfsCommonAbstractTest {
         ggfsCfg.setName(GGFS_SECONDARY);
         ggfsCfg.setBlockSize(SECONDARY_BLOCK_SIZE);
         ggfsCfg.setDefaultMode(PRIMARY);
-        ggfsCfg.setIpcEndpointConfiguration(GridGgfsTestUtils.jsonToMap(SECONDARY_REST_CFG));
+        ggfsCfg.setIpcEndpointConfiguration(SECONDARY_REST_CFG);
 
         GridCacheConfiguration dataCacheCfg = defaultCacheConfiguration();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2af57da6/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsModesSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsModesSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsModesSelfTest.java
index 013771a..e1f9aec 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsModesSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsModesSelfTest.java
@@ -27,7 +27,6 @@ import org.gridgain.grid.cache.*;
 import org.gridgain.grid.kernal.*;
 import org.gridgain.grid.util.typedef.*;
 import org.gridgain.grid.util.typedef.internal.*;
-import org.gridgain.testframework.*;
 
 import java.util.*;
 
@@ -152,7 +151,10 @@ public class GridGgfsModesSelfTest extends GridGgfsCommonAbstractTest {
         ggfsCfg.setName("ggfs-secondary");
         ggfsCfg.setBlockSize(512 * 1024);
         ggfsCfg.setDefaultMode(PRIMARY);
-        ggfsCfg.setIpcEndpointConfiguration(GridGgfsTestUtils.jsonToMap("{type:'tcp', port:11500}"));
+        ggfsCfg.setIpcEndpointConfiguration(new HashMap<String, String>() {{
+            put("type", "tcp");
+            put("port", "11500");
+        }});
 
         GridCacheConfiguration cacheCfg = defaultCacheConfiguration();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2af57da6/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsServerManagerIpcEndpointRegistrationAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsServerManagerIpcEndpointRegistrationAbstractSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsServerManagerIpcEndpointRegistrationAbstractSelfTest.java
index b196f4e..98e1386 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsServerManagerIpcEndpointRegistrationAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsServerManagerIpcEndpointRegistrationAbstractSelfTest.java
@@ -30,7 +30,6 @@ import org.gridgain.grid.util.ipc.loopback.*;
 import org.gridgain.grid.util.ipc.shmem.*;
 import org.gridgain.grid.util.typedef.*;
 import org.gridgain.grid.util.typedef.internal.*;
-import org.gridgain.testframework.*;
 import org.jetbrains.annotations.*;
 
 import java.util.*;
@@ -60,7 +59,7 @@ public abstract class GridGgfsServerManagerIpcEndpointRegistrationAbstractSelfTe
         IgniteConfiguration cfg = gridConfiguration();
 
         cfg.setGgfsConfiguration(
-            gridGgfsConfiguration("{type:'tcp', port:" + DFLT_IPC_PORT + "}")
+            igniteFsConfiguration("tcp", DFLT_IPC_PORT, null)
         );
 
         G.start(cfg);
@@ -79,9 +78,8 @@ public abstract class GridGgfsServerManagerIpcEndpointRegistrationAbstractSelfTe
         IgniteConfiguration cfg = gridConfiguration();
 
         cfg.setGgfsConfiguration(
-            gridGgfsConfiguration("{type:'tcp', port:" + DFLT_IPC_PORT + ", host:'127.0.0.1'}"),
-            gridGgfsConfiguration("{type:'tcp', port:" + (DFLT_IPC_PORT + 1) + ", host:'" +
-                U.getLocalHost().getHostName() + "'}"));
+            igniteFsConfiguration("tcp", DFLT_IPC_PORT, "127.0.0.1"),
+            igniteFsConfiguration("tcp", DFLT_IPC_PORT + 1, U.getLocalHost().getHostName()));
 
         G.start(cfg);
 
@@ -151,10 +149,27 @@ public abstract class GridGgfsServerManagerIpcEndpointRegistrationAbstractSelfTe
     /**
      * Creates test-purposed IgniteFsConfiguration.
      *
-     * @param endpointCfg Optional REST endpoint configuration.
+     * @param endPntType End point type.
+     * @param endPntPort End point port.
+     * @param endPntHost End point host.
      * @return test-purposed IgniteFsConfiguration.
      */
-    protected IgniteFsConfiguration gridGgfsConfiguration(@Nullable String endpointCfg) throws IgniteCheckedException {
+    protected IgniteFsConfiguration igniteFsConfiguration(@Nullable String endPntType, @Nullable Integer endPntPort,
+        @Nullable String endPntHost) throws IgniteCheckedException {
+        HashMap<String, String> endPntCfg = null;
+
+        if (endPntType != null) {
+            endPntCfg = new HashMap<>();
+
+            endPntCfg.put("type", endPntType);
+
+            if (endPntPort != null)
+                endPntCfg.put("port", String.valueOf(endPntPort));
+
+            if (endPntHost != null)
+                endPntCfg.put("host", endPntHost);
+        }
+
         IgniteFsConfiguration ggfsConfiguration = new IgniteFsConfiguration();
 
         ggfsConfiguration.setDataCacheName("partitioned");
@@ -162,8 +177,8 @@ public abstract class GridGgfsServerManagerIpcEndpointRegistrationAbstractSelfTe
         ggfsConfiguration.setName("ggfs" + UUID.randomUUID());
         ggfsConfiguration.setManagementPort(mgmtPort.getAndIncrement());
 
-        if (endpointCfg != null)
-            ggfsConfiguration.setIpcEndpointConfiguration(GridGgfsTestUtils.jsonToMap(endpointCfg));
+        if (endPntCfg != null)
+            ggfsConfiguration.setIpcEndpointConfiguration(endPntCfg);
 
         return ggfsConfiguration;
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2af57da6/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsServerManagerIpcEndpointRegistrationOnLinuxAndMacSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsServerManagerIpcEndpointRegistrationOnLinuxAndMacSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsServerManagerIpcEndpointRegistrationOnLinuxAndMacSelfTest.java
index e73b43f..6961766 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsServerManagerIpcEndpointRegistrationOnLinuxAndMacSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsServerManagerIpcEndpointRegistrationOnLinuxAndMacSelfTest.java
@@ -35,9 +35,9 @@ public class GridGgfsServerManagerIpcEndpointRegistrationOnLinuxAndMacSelfTest
         IgniteConfiguration cfg = gridConfiguration();
 
         cfg.setGgfsConfiguration(
-            gridGgfsConfiguration(null), // Check null IPC endpoint config won't bring any hassles.
-            gridGgfsConfiguration("{type:'tcp', port:" + (DFLT_IPC_PORT + 1) + "}"),
-            gridGgfsConfiguration("{type:'shmem', port:" + (DFLT_IPC_PORT + 2) + "}"));
+            igniteFsConfiguration(null, null, null), // Check null IPC endpoint config won't bring any hassles.
+            igniteFsConfiguration("tcp", DFLT_IPC_PORT + 1, null),
+            igniteFsConfiguration("shmem", DFLT_IPC_PORT + 2, null));
 
         G.start(cfg);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2af57da6/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsServerManagerIpcEndpointRegistrationOnWindowsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsServerManagerIpcEndpointRegistrationOnWindowsSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsServerManagerIpcEndpointRegistrationOnWindowsSelfTest.java
index 5ae40a0..422afe2 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsServerManagerIpcEndpointRegistrationOnWindowsSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsServerManagerIpcEndpointRegistrationOnWindowsSelfTest.java
@@ -41,8 +41,8 @@ public class GridGgfsServerManagerIpcEndpointRegistrationOnWindowsSelfTest
             @Override public Object call() throws Exception {
                 IgniteConfiguration cfg = gridConfiguration();
 
-                cfg.setGgfsConfiguration(gridGgfsConfiguration(
-                    "{type:'shmem', port:" + GridIpcSharedMemoryServerEndpoint.DFLT_IPC_PORT + "}"));
+                cfg.setGgfsConfiguration(igniteFsConfiguration("shmem", GridIpcSharedMemoryServerEndpoint.DFLT_IPC_PORT,
+                    null));
 
                 return G.start(cfg);
             }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2af57da6/modules/core/src/test/java/org/gridgain/grid/util/ipc/GridIpcServerEndpointDeserializerSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/util/ipc/GridIpcServerEndpointDeserializerSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/util/ipc/GridIpcServerEndpointDeserializerSelfTest.java
index 0d7922f..7641dff 100644
--- a/modules/core/src/test/java/org/gridgain/grid/util/ipc/GridIpcServerEndpointDeserializerSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/util/ipc/GridIpcServerEndpointDeserializerSelfTest.java
@@ -17,13 +17,13 @@
 
 package org.gridgain.grid.util.ipc;
 
-import net.sf.json.*;
 import org.apache.ignite.*;
 import org.gridgain.grid.kernal.processors.ggfs.*;
 import org.gridgain.grid.util.ipc.loopback.*;
 import org.gridgain.grid.util.ipc.shmem.*;
 import org.gridgain.testframework.*;
 
+import java.util.*;
 import java.util.concurrent.*;
 
 /**
@@ -31,28 +31,28 @@ import java.util.concurrent.*;
  */
 public class GridIpcServerEndpointDeserializerSelfTest extends GridGgfsCommonAbstractTest {
     /** */
-    private GridIpcSharedMemoryServerEndpoint shmemSrvEndpoint;
+    private Map<String,String> shmemSrvEndpoint;
 
     /** */
-    private GridIpcServerTcpEndpoint tcpSrvEndpoint;
+    private Map<String,String> tcpSrvEndpoint;
 
     /**
      * Initialize test stuff.
      */
     @Override protected void beforeTest() throws Exception {
-        shmemSrvEndpoint = new GridIpcSharedMemoryServerEndpoint();
-        shmemSrvEndpoint.setPort(888);
-        shmemSrvEndpoint.setSize(111);
-        shmemSrvEndpoint.setTokenDirectoryPath("test-my-path-baby");
+        shmemSrvEndpoint = new HashMap<>();
+        shmemSrvEndpoint.put("port", "888");
+        shmemSrvEndpoint.put("size", "111");
+        shmemSrvEndpoint.put("tokenDirectoryPath", "test-my-path-baby");
 
-        tcpSrvEndpoint = new GridIpcServerTcpEndpoint();
-        tcpSrvEndpoint.setPort(999);
+        tcpSrvEndpoint = new HashMap<>();
+        tcpSrvEndpoint.put("port", "999");
     }
 
     /**
      * @throws Exception In case of any exception.
      */
-    public void testDeserializeIfJsonIsNull() throws Exception {
+    public void testDeserializeIfCfgIsNull() throws Exception {
         GridTestUtils.assertThrows(log, new Callable<Object>() {
             @SuppressWarnings("NullableProblems")
             @Override public Object call() throws Exception {
@@ -67,8 +67,7 @@ public class GridIpcServerEndpointDeserializerSelfTest extends GridGgfsCommonAbs
     public void testDeserializeIfShmemAndNoTypeInfoInJson() throws Exception {
         GridTestUtils.assertThrows(log, new Callable<Object>() {
             @Override public Object call() throws Exception {
-                return GridIpcServerEndpointDeserializer.deserialize(GridGgfsTestUtils.jsonToMap(
-                    JSONSerializer.toJSON(shmemSrvEndpoint).toString()));
+                return GridIpcServerEndpointDeserializer.deserialize(shmemSrvEndpoint);
             }
         }, IgniteCheckedException.class, "Failed to create server endpoint (type is not specified)");
     }
@@ -79,10 +78,12 @@ public class GridIpcServerEndpointDeserializerSelfTest extends GridGgfsCommonAbs
     public void testDeserializeIfShmemAndNoUnknownTypeInfoInJson() throws Exception {
         GridTestUtils.assertThrows(log, new Callable<Object>() {
             @Override public Object call() throws Exception {
-                JSONObject json = (JSONObject)JSONSerializer.toJSON(shmemSrvEndpoint);
-                json.accumulate("type", "unknownEndpointType");
+                Map<String, String> endPnt = new HashMap<>();
 
-                return GridIpcServerEndpointDeserializer.deserialize(GridGgfsTestUtils.jsonToMap(json.toString()));
+                endPnt.putAll(shmemSrvEndpoint);
+                endPnt.put("type", "unknownEndpointType");
+
+                return GridIpcServerEndpointDeserializer.deserialize(endPnt);
             }
         }, IgniteCheckedException.class, "Failed to create server endpoint (type is unknown): unknownEndpointType");
     }
@@ -93,8 +94,7 @@ public class GridIpcServerEndpointDeserializerSelfTest extends GridGgfsCommonAbs
     public void testDeserializeIfLoopbackAndJsonIsLightlyBroken() throws Exception {
         GridTestUtils.assertThrows(log, new Callable<Object>() {
             @Override public Object call() throws Exception {
-                return GridIpcServerEndpointDeserializer.deserialize(GridGgfsTestUtils.jsonToMap(
-                    JSONSerializer.toJSON(tcpSrvEndpoint).toString()));
+                return GridIpcServerEndpointDeserializer.deserialize(tcpSrvEndpoint);
             }
         }, IgniteCheckedException.class, null);
     }
@@ -103,58 +103,58 @@ public class GridIpcServerEndpointDeserializerSelfTest extends GridGgfsCommonAbs
      * @throws Exception In case of any exception.
      */
     public void testDeserializeIfShmemAndJsonIsOk() throws Exception {
-        String json = JSONSerializer.toJSON(shmemSrvEndpoint).toString();
+        Map<String, String> endPnt = new HashMap<>();
 
-        // Add endpoint type info into json.
-        json = "{\"type\" : \"shmem\"," + json.substring(1);
+        endPnt.putAll(shmemSrvEndpoint);
+        endPnt.put("type", "shmem");
 
-        GridIpcServerEndpoint deserialized = GridIpcServerEndpointDeserializer.deserialize(GridGgfsTestUtils.jsonToMap(json));
+        GridIpcServerEndpoint deserialized = GridIpcServerEndpointDeserializer.deserialize(endPnt);
 
         assertTrue(deserialized instanceof GridIpcSharedMemoryServerEndpoint);
 
         GridIpcSharedMemoryServerEndpoint deserializedShmemEndpoint = (GridIpcSharedMemoryServerEndpoint)deserialized;
 
-        assertEquals(shmemSrvEndpoint.getPort(), deserializedShmemEndpoint.getPort());
-        assertEquals(shmemSrvEndpoint.getSize(), deserializedShmemEndpoint.getSize());
-        assertEquals(shmemSrvEndpoint.getTokenDirectoryPath(), deserializedShmemEndpoint.getTokenDirectoryPath());
+        assertEquals(shmemSrvEndpoint.get("port"), String.valueOf(deserializedShmemEndpoint.getPort()));
+        assertEquals(shmemSrvEndpoint.get("size"), String.valueOf(deserializedShmemEndpoint.getSize()));
+        assertEquals(shmemSrvEndpoint.get("tokenDirectoryPath"), deserializedShmemEndpoint.getTokenDirectoryPath());
     }
 
     /**
      * @throws Exception In case of any exception.
      */
     public void testDeserializeIfShmemAndJsonIsOkAndDefaultValuesAreSetToFields() throws Exception {
-        shmemSrvEndpoint = new GridIpcSharedMemoryServerEndpoint();
-        shmemSrvEndpoint.setPort(8);
+        GridIpcSharedMemoryServerEndpoint defShmemSrvEndpoint = new GridIpcSharedMemoryServerEndpoint();
+        defShmemSrvEndpoint.setPort(8);
 
-        String json = JSONSerializer.toJSON(shmemSrvEndpoint).toString();
+        Map<String, String> endPnt = new HashMap<>();
 
-        // Add endpoint type info into json.
-        json = "{\"type\" : \"shmem\"," + json.substring(1);
+        endPnt.put("type", "shmem");
+        endPnt.put("port", String.valueOf(defShmemSrvEndpoint.getPort()));
 
-        GridIpcServerEndpoint deserialized = GridIpcServerEndpointDeserializer.deserialize(GridGgfsTestUtils.jsonToMap(json));
+        GridIpcServerEndpoint deserialized = GridIpcServerEndpointDeserializer.deserialize(endPnt);
 
         assertTrue(deserialized instanceof GridIpcSharedMemoryServerEndpoint);
 
         GridIpcSharedMemoryServerEndpoint deserializedShmemEndpoint = (GridIpcSharedMemoryServerEndpoint)deserialized;
 
-        assertEquals(shmemSrvEndpoint.getPort(), deserializedShmemEndpoint.getPort());
-        assertEquals(shmemSrvEndpoint.getSize(), deserializedShmemEndpoint.getSize());
-        assertEquals(shmemSrvEndpoint.getTokenDirectoryPath(), deserializedShmemEndpoint.getTokenDirectoryPath());
+        assertEquals(defShmemSrvEndpoint.getPort(), deserializedShmemEndpoint.getPort());
+        assertEquals(defShmemSrvEndpoint.getSize(), deserializedShmemEndpoint.getSize());
+        assertEquals(defShmemSrvEndpoint.getTokenDirectoryPath(), deserializedShmemEndpoint.getTokenDirectoryPath());
     }
 
     /**
      * @throws Exception In case of any exception.
      */
     public void testDeserializeIfLoopbackAndJsonIsOk() throws Exception {
-        String json = JSONSerializer.toJSON(tcpSrvEndpoint).toString();
+        Map<String, String> endPnt = new HashMap<>();
 
-        // Add endpoint type info into json.
-        json = "{\"type\" : \"tcp\"," + json.substring(1);
+        endPnt.putAll(tcpSrvEndpoint);
+        endPnt.put("type", "tcp");
 
-        GridIpcServerEndpoint deserialized = GridIpcServerEndpointDeserializer.deserialize(GridGgfsTestUtils.jsonToMap(json));
+        GridIpcServerEndpoint deserialized = GridIpcServerEndpointDeserializer.deserialize(endPnt);
 
         assertTrue(deserialized instanceof GridIpcServerTcpEndpoint);
 
-        assertEquals(tcpSrvEndpoint.getPort(), deserialized.getPort());
+        assertEquals(tcpSrvEndpoint.get("port"), String.valueOf(deserialized.getPort()));
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2af57da6/modules/core/src/test/java/org/gridgain/testframework/GridGgfsTestUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/testframework/GridGgfsTestUtils.java b/modules/core/src/test/java/org/gridgain/testframework/GridGgfsTestUtils.java
deleted file mode 100644
index 50e9152..0000000
--- a/modules/core/src/test/java/org/gridgain/testframework/GridGgfsTestUtils.java
+++ /dev/null
@@ -1,55 +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.gridgain.testframework;
-
-import net.sf.json.*;
-import org.apache.ignite.*;
-
-import java.util.*;
-
-/**
- * Utility class for tests.
- */
-public class GridGgfsTestUtils {
-    /**
-     * Converts json string to Map<String,String>.
-     *
-     * @param jsonStr String to convert.
-     * @return Map.
-     * @throws IgniteCheckedException If fails.
-     */
-    public static Map<String,String> jsonToMap(String jsonStr) throws IgniteCheckedException {
-        Map<String,String> res = new HashMap<>();
-
-        try {
-            JSONObject jsonObj = JSONObject.fromObject(jsonStr);
-
-            for (Object o : jsonObj.entrySet()) {
-                Map.Entry e = (Map.Entry) o;
-
-                res.put(e.getKey().toString(), e.getValue().toString());
-            }
-
-        }
-        catch (JSONException e) {
-            throw new IgniteCheckedException(e);
-        }
-
-        return res;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2af57da6/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsEventsTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsEventsTestSuite.java b/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsEventsTestSuite.java
index 1e7ae71..9dba55f 100644
--- a/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsEventsTestSuite.java
+++ b/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsEventsTestSuite.java
@@ -21,14 +21,14 @@ import junit.framework.*;
 import org.apache.ignite.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.fs.*;
-import org.gridgain.grid.*;
 import org.gridgain.grid.kernal.ggfs.hadoop.*;
 import org.gridgain.grid.kernal.processors.hadoop.*;
 import org.gridgain.grid.util.typedef.*;
 import org.gridgain.grid.util.ipc.shmem.*;
-import org.gridgain.testframework.*;
 import org.jetbrains.annotations.*;
 
+import java.util.*;
+
 import static org.apache.ignite.fs.IgniteFsMode.*;
 
 /**
@@ -80,8 +80,10 @@ public class GridGgfsEventsTestSuite extends TestSuite {
         @Override protected IgniteFsConfiguration getGgfsConfiguration() throws IgniteCheckedException {
             IgniteFsConfiguration ggfsCfg = super.getGgfsConfiguration();
 
-            ggfsCfg.setIpcEndpointConfiguration(GridGgfsTestUtils.jsonToMap("{type:'shmem', port:" +
-                (GridIpcSharedMemoryServerEndpoint.DFLT_IPC_PORT + 1) + "}"));
+            ggfsCfg.setIpcEndpointConfiguration(new HashMap<String, String>() {{
+                put("type", "shmem");
+                put("port", String.valueOf(GridIpcSharedMemoryServerEndpoint.DFLT_IPC_PORT + 1));
+            }});
 
             return ggfsCfg;
         }
@@ -95,8 +97,10 @@ public class GridGgfsEventsTestSuite extends TestSuite {
         @Override protected IgniteFsConfiguration getGgfsConfiguration() throws IgniteCheckedException {
             IgniteFsConfiguration ggfsCfg = super.getGgfsConfiguration();
 
-            ggfsCfg.setIpcEndpointConfiguration(GridGgfsTestUtils.jsonToMap("{type:'tcp', port:" +
-                (GridIpcSharedMemoryServerEndpoint.DFLT_IPC_PORT + 1) + "}"));
+            ggfsCfg.setIpcEndpointConfiguration(new HashMap<String, String>() {{
+                put("type", "tcp");
+                put("port", String.valueOf(GridIpcSharedMemoryServerEndpoint.DFLT_IPC_PORT + 1));
+            }});
 
             return ggfsCfg;
         }
@@ -128,7 +132,10 @@ public class GridGgfsEventsTestSuite extends TestSuite {
 
             ggfsCfg.setName("ggfs-secondary");
             ggfsCfg.setDefaultMode(PRIMARY);
-            ggfsCfg.setIpcEndpointConfiguration(GridGgfsTestUtils.jsonToMap("{type:'tcp', port:11500}"));
+            ggfsCfg.setIpcEndpointConfiguration(new HashMap<String, String>(){{
+                put("type", "tcp");
+                put("port", "11500");
+            }});
 
             return ggfsCfg;
         }
@@ -222,7 +229,10 @@ public class GridGgfsEventsTestSuite extends TestSuite {
 
             ggfsCfg.setName("ggfs-secondary");
             ggfsCfg.setDefaultMode(PRIMARY);
-            ggfsCfg.setIpcEndpointConfiguration(GridGgfsTestUtils.jsonToMap("{type:'tcp', port:11500}"));
+            ggfsCfg.setIpcEndpointConfiguration(new HashMap<String, String>() {{
+                put("type", "tcp");
+                put("port", "11500");
+            }});
 
             return ggfsCfg;
         }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2af57da6/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoop20FileSystemAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoop20FileSystemAbstractSelfTest.java b/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoop20FileSystemAbstractSelfTest.java
index 7ee8605..2451757 100644
--- a/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoop20FileSystemAbstractSelfTest.java
+++ b/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoop20FileSystemAbstractSelfTest.java
@@ -25,7 +25,6 @@ import org.apache.ignite.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.fs.*;
 import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
 import org.gridgain.grid.cache.*;
 import org.gridgain.grid.kernal.ggfs.hadoop.*;
 import org.gridgain.grid.kernal.processors.ggfs.*;
@@ -109,7 +108,7 @@ public abstract class GridGgfsHadoop20FileSystemAbstractSelfTest extends GridGgf
      * @param gridName Grid name.
      * @return IPC primary endpoint configuration.
      */
-    protected abstract String primaryIpcEndpointConfiguration(String gridName);
+    protected abstract Map<String, String>  primaryIpcEndpointConfiguration(String gridName);
 
     /**
      * Gets secondary file system URI path.
@@ -130,7 +129,7 @@ public abstract class GridGgfsHadoop20FileSystemAbstractSelfTest extends GridGgf
      *
      * @return Secondary IPC endpoint configuration.
      */
-    protected abstract String secondaryIpcEndpointConfiguration();
+    protected abstract Map<String, String>  secondaryIpcEndpointConfiguration();
 
     /** {@inheritDoc} */
     @Override protected void beforeTestsStarted() throws Exception {
@@ -150,7 +149,7 @@ public abstract class GridGgfsHadoop20FileSystemAbstractSelfTest extends GridGgf
             ggfsCfg.setDataCacheName("partitioned");
             ggfsCfg.setMetaCacheName("replicated");
             ggfsCfg.setName("ggfs_secondary");
-            ggfsCfg.setIpcEndpointConfiguration(GridGgfsTestUtils.jsonToMap(secondaryIpcEndpointConfiguration()));
+            ggfsCfg.setIpcEndpointConfiguration(secondaryIpcEndpointConfiguration());
             ggfsCfg.setManagementPort(-1);
             ggfsCfg.setBlockSize(512 * 1024);
             ggfsCfg.setPrefetchBlocks(1);
@@ -267,7 +266,7 @@ public abstract class GridGgfsHadoop20FileSystemAbstractSelfTest extends GridGgf
             cfg.setSecondaryFileSystem(new GridGgfsHadoopFileSystemWrapper(secondaryFileSystemUriPath(),
                 secondaryFileSystemConfigPath()));
 
-        cfg.setIpcEndpointConfiguration(GridGgfsTestUtils.jsonToMap(primaryIpcEndpointConfiguration(gridName)));
+        cfg.setIpcEndpointConfiguration(primaryIpcEndpointConfiguration(gridName));
         cfg.setManagementPort(-1);
 
         cfg.setBlockSize(512 * 1024); // Together with group blocks mapper will yield 64M per node groups.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2af57da6/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoop20FileSystemLoopbackPrimarySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoop20FileSystemLoopbackPrimarySelfTest.java b/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoop20FileSystemLoopbackPrimarySelfTest.java
index 4fffc46..f189669 100644
--- a/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoop20FileSystemLoopbackPrimarySelfTest.java
+++ b/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoop20FileSystemLoopbackPrimarySelfTest.java
@@ -17,6 +17,8 @@
 
 package org.gridgain.grid.ggfs;
 
+import java.util.*;
+
 import static org.apache.ignite.fs.IgniteFsMode.*;
 import static org.gridgain.grid.util.ipc.shmem.GridIpcSharedMemoryServerEndpoint.*;
 
@@ -42,8 +44,11 @@ public class GridGgfsHadoop20FileSystemLoopbackPrimarySelfTest extends GridGgfsH
     }
 
     /** {@inheritDoc} */
-    @Override protected String primaryIpcEndpointConfiguration(String gridName) {
-        return "{type:'tcp', port:" + (DFLT_IPC_PORT + getTestGridIndex(gridName)) + "}";
+    @Override protected Map<String, String> primaryIpcEndpointConfiguration(final String gridName) {
+        return new HashMap<String, String>() {{
+            put("type", "tcp");
+            put("port", String.valueOf(DFLT_IPC_PORT + getTestGridIndex(gridName)));
+        }};
     }
 
     /** {@inheritDoc} */
@@ -61,7 +66,7 @@ public class GridGgfsHadoop20FileSystemLoopbackPrimarySelfTest extends GridGgfsH
     }
 
     /** {@inheritDoc} */
-    @Override protected String secondaryIpcEndpointConfiguration() {
+    @Override protected Map<String, String> secondaryIpcEndpointConfiguration() {
         assert false;
 
         return null;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2af57da6/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoop20FileSystemShmemPrimarySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoop20FileSystemShmemPrimarySelfTest.java b/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoop20FileSystemShmemPrimarySelfTest.java
index 3ecc908..b632330 100644
--- a/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoop20FileSystemShmemPrimarySelfTest.java
+++ b/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoop20FileSystemShmemPrimarySelfTest.java
@@ -17,6 +17,8 @@
 
 package org.gridgain.grid.ggfs;
 
+import java.util.*;
+
 import static org.apache.ignite.fs.IgniteFsMode.*;
 import static org.gridgain.grid.util.ipc.shmem.GridIpcSharedMemoryServerEndpoint.*;
 
@@ -42,8 +44,11 @@ public class GridGgfsHadoop20FileSystemShmemPrimarySelfTest extends GridGgfsHado
     }
 
     /** {@inheritDoc} */
-    @Override protected String primaryIpcEndpointConfiguration(String gridName) {
-        return "{type:'shmem', port:" + (DFLT_IPC_PORT + getTestGridIndex(gridName)) + "}";
+    @Override protected Map<String, String> primaryIpcEndpointConfiguration(final String gridName) {
+        return new HashMap<String, String>() {{
+            put("type", "shmem");
+            put("port", String.valueOf(DFLT_IPC_PORT + getTestGridIndex(gridName)));
+        }};
     }
 
     /** {@inheritDoc} */
@@ -61,7 +66,7 @@ public class GridGgfsHadoop20FileSystemShmemPrimarySelfTest extends GridGgfsHado
     }
 
     /** {@inheritDoc} */
-    @Override protected String secondaryIpcEndpointConfiguration() {
+    @Override protected Map<String, String> secondaryIpcEndpointConfiguration() {
         assert false;
 
         return null;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2af57da6/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopDualAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopDualAbstractSelfTest.java b/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopDualAbstractSelfTest.java
index c790c71..075a1fc 100644
--- a/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopDualAbstractSelfTest.java
+++ b/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopDualAbstractSelfTest.java
@@ -34,6 +34,7 @@ import org.jetbrains.annotations.*;
 
 import java.io.*;
 import java.net.*;
+import java.util.*;
 import java.util.concurrent.*;
 
 import static org.gridgain.grid.cache.GridCacheAtomicityMode.*;
@@ -67,11 +68,17 @@ public abstract class GridGgfsHadoopDualAbstractSelfTest extends GridGgfsCommonA
     /** Primary file system configuration path. */
     protected static final String PRIMARY_CFG = "modules/core/src/test/config/hadoop/core-site-loopback.xml";
 
-    /** Primary file system REST endpoint configuration string. */
-    protected static final String PRIMARY_REST_CFG = "{type:'tcp', port:10500}";
+    /** Primary file system REST endpoint configuration map. */
+    protected static final Map<String, String> PRIMARY_REST_CFG = new HashMap<String, String>() {{
+        put("type", "tcp");
+        put("port", "10500");
+    }};
 
-    /** Secondary file system REST endpoint configuration string. */
-    protected static final String SECONDARY_REST_CFG = "{type:'tcp', port:11500}";
+    /** Secondary file system REST endpoint configuration map. */
+    protected static final Map<String, String> SECONDARY_REST_CFG = new HashMap<String, String>() {{
+        put("type", "tcp");
+        put("port", "11500");
+    }};
 
     /** Directory. */
     protected static final IgniteFsPath DIR = new IgniteFsPath("/dir");
@@ -116,7 +123,7 @@ public abstract class GridGgfsHadoopDualAbstractSelfTest extends GridGgfsCommonA
      * @throws Exception If failed.
      */
     protected Ignite startGridWithGgfs(String gridName, String ggfsName, IgniteFsMode mode,
-        @Nullable IgniteFsFileSystem secondaryFs, @Nullable String restCfg) throws Exception {
+        @Nullable IgniteFsFileSystem secondaryFs, @Nullable Map<String, String> restCfg) throws Exception {
         IgniteFsConfiguration ggfsCfg = new IgniteFsConfiguration();
 
         ggfsCfg.setDataCacheName("dataCache");
@@ -124,7 +131,7 @@ public abstract class GridGgfsHadoopDualAbstractSelfTest extends GridGgfsCommonA
         ggfsCfg.setName(ggfsName);
         ggfsCfg.setBlockSize(GGFS_BLOCK_SIZE);
         ggfsCfg.setDefaultMode(mode);
-        ggfsCfg.setIpcEndpointConfiguration(GridGgfsTestUtils.jsonToMap(restCfg));
+        ggfsCfg.setIpcEndpointConfiguration(restCfg);
         ggfsCfg.setSecondaryFileSystem(secondaryFs);
         ggfsCfg.setPrefetchBlocks(PREFETCH_BLOCKS);
         ggfsCfg.setSequentialReadsBeforePrefetch(SEQ_READS_BEFORE_PREFETCH);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2af57da6/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopFileSystemAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopFileSystemAbstractSelfTest.java b/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopFileSystemAbstractSelfTest.java
index 2c2ca51..1a8b22f 100644
--- a/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopFileSystemAbstractSelfTest.java
+++ b/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopFileSystemAbstractSelfTest.java
@@ -76,7 +76,10 @@ public abstract class GridGgfsHadoopFileSystemAbstractSelfTest extends GridGgfsC
     private static final String SECONDARY_CFG_PATH = "/work/core-site-test.xml";
 
     /** Secondary endpoint configuration. */
-    private static final String SECONDARY_ENDPOINT_CFG = "{type:'tcp', port:11500}";
+    protected static final Map<String, String> SECONDARY_ENDPOINT_CFG = new HashMap<String, String>() {{
+        put("type", "tcp");
+        put("port", "11500");
+    }};
 
     /** Group size. */
     public static final int GRP_SIZE = 128;
@@ -176,7 +179,7 @@ public abstract class GridGgfsHadoopFileSystemAbstractSelfTest extends GridGgfsC
             ggfsCfg.setDataCacheName("partitioned");
             ggfsCfg.setMetaCacheName("replicated");
             ggfsCfg.setName("ggfs_secondary");
-            ggfsCfg.setIpcEndpointConfiguration(GridGgfsTestUtils.jsonToMap(SECONDARY_ENDPOINT_CFG));
+            ggfsCfg.setIpcEndpointConfiguration(SECONDARY_ENDPOINT_CFG);
             ggfsCfg.setBlockSize(512 * 1024);
             ggfsCfg.setPrefetchBlocks(1);
 
@@ -258,7 +261,7 @@ public abstract class GridGgfsHadoopFileSystemAbstractSelfTest extends GridGgfsC
      * @param gridName Grid name.
      * @return IPC primary endpoint configuration.
      */
-    protected abstract String primaryIpcEndpointConfiguration(String gridName);
+    protected abstract Map<String, String> primaryIpcEndpointConfiguration(String gridName);
 
     /** {@inheritDoc} */
     @Override public String getTestGridName() {
@@ -329,11 +332,7 @@ public abstract class GridGgfsHadoopFileSystemAbstractSelfTest extends GridGgfsC
         if (mode != PRIMARY)
             cfg.setSecondaryFileSystem(new GridGgfsHadoopFileSystemWrapper(SECONDARY_URI, SECONDARY_CFG_PATH));
 
-        String x = primaryIpcEndpointConfiguration(gridName);
-
-        Map<String, String> endPointCfg = GridGgfsTestUtils.jsonToMap(x);
-
-        cfg.setIpcEndpointConfiguration(endPointCfg);
+        cfg.setIpcEndpointConfiguration(primaryIpcEndpointConfiguration(gridName));
 
         cfg.setManagementPort(-1);
         cfg.setBlockSize(512 * 1024); // Together with group blocks mapper will yield 64M per node groups.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2af57da6/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopFileSystemClientSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopFileSystemClientSelfTest.java b/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopFileSystemClientSelfTest.java
index 12844f2..5369754 100644
--- a/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopFileSystemClientSelfTest.java
+++ b/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopFileSystemClientSelfTest.java
@@ -20,7 +20,6 @@ package org.gridgain.grid.ggfs;
 import org.apache.commons.logging.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.fs.*;
-import org.gridgain.grid.*;
 import org.gridgain.grid.cache.*;
 import org.gridgain.grid.kernal.*;
 import org.gridgain.grid.kernal.ggfs.common.*;
@@ -75,7 +74,10 @@ public class GridGgfsHadoopFileSystemClientSelfTest extends GridGgfsCommonAbstra
         ggfsCfg.setMetaCacheName("replicated");
         ggfsCfg.setName("ggfs");
         ggfsCfg.setBlockSize(512 * 1024);
-        ggfsCfg.setIpcEndpointConfiguration(GridGgfsTestUtils.jsonToMap("{type:'tcp', port:" + DFLT_IPC_PORT + '}'));
+        ggfsCfg.setIpcEndpointConfiguration(new HashMap<String, String>() {{
+            put("type", "tcp");
+            put("port", String.valueOf(DFLT_IPC_PORT));
+        }});
 
         cfg.setCacheConfiguration(cacheConfiguration());
         cfg.setGgfsConfiguration(ggfsCfg);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2af57da6/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopFileSystemHandshakeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopFileSystemHandshakeSelfTest.java b/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopFileSystemHandshakeSelfTest.java
index b2bddd7..9478f3b 100644
--- a/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopFileSystemHandshakeSelfTest.java
+++ b/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopFileSystemHandshakeSelfTest.java
@@ -34,6 +34,7 @@ import org.gridgain.testframework.*;
 
 import java.io.*;
 import java.net.*;
+import java.util.*;
 import java.util.concurrent.*;
 
 import static org.gridgain.grid.cache.GridCacheAtomicityMode.*;
@@ -234,7 +235,11 @@ public class GridGgfsHadoopFileSystemHandshakeSelfTest extends GridGgfsCommonAbs
         ggfsCfg.setName(dfltGgfsName ? null : GGFS_NAME);
         ggfsCfg.setPrefetchBlocks(1);
         ggfsCfg.setDefaultMode(PRIMARY);
-        ggfsCfg.setIpcEndpointConfiguration(GridGgfsTestUtils.jsonToMap("{type:'tcp', port:" + DFLT_IPC_PORT + "}"));
+        ggfsCfg.setIpcEndpointConfiguration(new HashMap<String, String>() {{
+            put("type", "tcp");
+            put("port", String.valueOf(DFLT_IPC_PORT));
+        }});
+
         ggfsCfg.setManagementPort(-1);
         ggfsCfg.setBlockSize(512 * 1024);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2af57da6/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopFileSystemIpcCacheSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopFileSystemIpcCacheSelfTest.java b/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopFileSystemIpcCacheSelfTest.java
index fb7008d..f9ff668 100644
--- a/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopFileSystemIpcCacheSelfTest.java
+++ b/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopFileSystemIpcCacheSelfTest.java
@@ -31,7 +31,6 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
 import org.gridgain.grid.util.ipc.shmem.*;
 import org.gridgain.grid.util.typedef.*;
 import org.gridgain.grid.util.typedef.internal.*;
-import org.gridgain.testframework.*;
 
 import java.lang.reflect.*;
 import java.net.*;
@@ -74,8 +73,10 @@ public class GridGgfsHadoopFileSystemIpcCacheSelfTest extends GridGgfsCommonAbst
         ggfsCfg.setName("ggfs");
         ggfsCfg.setManagementPort(IgniteFsConfiguration.DFLT_MGMT_PORT + cnt);
 
-        ggfsCfg.setIpcEndpointConfiguration(GridGgfsTestUtils.jsonToMap(
-            "{type:'shmem', port:" + (GridIpcSharedMemoryServerEndpoint.DFLT_IPC_PORT + cnt) + "}"));
+        ggfsCfg.setIpcEndpointConfiguration(new HashMap<String, String>() {{
+            put("type", "shmem");
+            put("port", String.valueOf(GridIpcSharedMemoryServerEndpoint.DFLT_IPC_PORT + cnt));
+        }});
 
         ggfsCfg.setBlockSize(512 * 1024); // Together with group blocks mapper will yield 64M per node groups.
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2af57da6/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopFileSystemLoggerStateSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopFileSystemLoggerStateSelfTest.java b/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopFileSystemLoggerStateSelfTest.java
index b649bd4..948f19f 100644
--- a/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopFileSystemLoggerStateSelfTest.java
+++ b/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopFileSystemLoggerStateSelfTest.java
@@ -30,10 +30,10 @@ import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
 import org.gridgain.grid.util.typedef.*;
 import org.gridgain.grid.util.typedef.internal.*;
-import org.gridgain.testframework.*;
 
 import java.lang.reflect.*;
 import java.net.*;
+import java.util.*;
 import java.nio.file.*;
 
 import static org.gridgain.grid.cache.GridCacheAtomicityMode.*;
@@ -83,7 +83,10 @@ public class GridGgfsHadoopFileSystemLoggerStateSelfTest extends GridGgfsCommonA
         ggfsCfg.setName("ggfs");
         ggfsCfg.setBlockSize(512 * 1024);
         ggfsCfg.setDefaultMode(PRIMARY);
-        ggfsCfg.setIpcEndpointConfiguration(GridGgfsTestUtils.jsonToMap("{type:'tcp', port:10500}"));
+        ggfsCfg.setIpcEndpointConfiguration(new HashMap<String, String>() {{
+            put("type", "tcp");
+            put("port", "10500");
+        }});
 
         GridCacheConfiguration cacheCfg = defaultCacheConfiguration();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2af57da6/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopFileSystemLoopbackAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopFileSystemLoopbackAbstractSelfTest.java b/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopFileSystemLoopbackAbstractSelfTest.java
index f574a8e..0d940ee 100644
--- a/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopFileSystemLoopbackAbstractSelfTest.java
+++ b/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopFileSystemLoopbackAbstractSelfTest.java
@@ -19,6 +19,8 @@ package org.gridgain.grid.ggfs;
 
 import org.apache.ignite.fs.*;
 
+import java.util.*;
+
 import static org.gridgain.grid.util.ipc.shmem.GridIpcSharedMemoryServerEndpoint.*;
 
 /**
@@ -37,7 +39,10 @@ public abstract class GridGgfsHadoopFileSystemLoopbackAbstractSelfTest extends
     }
 
     /** {@inheritDoc} */
-    @Override protected String primaryIpcEndpointConfiguration(String gridName) {
-        return "{type:'tcp', port:" + (DFLT_IPC_PORT + getTestGridIndex(gridName)) + "}";
+    @Override protected Map<String, String> primaryIpcEndpointConfiguration(final String gridName) {
+        return new HashMap<String, String>() {{
+            put("type", "tcp");
+            put("port", String.valueOf(DFLT_IPC_PORT + getTestGridIndex(gridName)));
+        }};
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2af57da6/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopFileSystemSecondaryModeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopFileSystemSecondaryModeSelfTest.java b/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopFileSystemSecondaryModeSelfTest.java
index a673bbd..63b2dc5 100644
--- a/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopFileSystemSecondaryModeSelfTest.java
+++ b/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopFileSystemSecondaryModeSelfTest.java
@@ -30,7 +30,6 @@ import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
 import org.gridgain.grid.util.typedef.*;
 import org.gridgain.grid.util.typedef.internal.*;
-import org.gridgain.testframework.*;
 
 import java.net.*;
 import java.util.*;
@@ -93,7 +92,11 @@ public class GridGgfsHadoopFileSystemSecondaryModeSelfTest extends GridGgfsCommo
         ggfsCfg.setBlockSize(512 * 1024);
         ggfsCfg.setDefaultMode(mode);
         ggfsCfg.setPathModes(pathModes);
-        ggfsCfg.setIpcEndpointConfiguration(GridGgfsTestUtils.jsonToMap("{type:'tcp', port:10500}"));
+        ggfsCfg.setIpcEndpointConfiguration(new HashMap<String, String>() {{
+            put("type", "tcp");
+            put("port", "10500");
+        }});
+
         ggfsCfg.setManagementPort(-1);
         ggfsCfg.setSecondaryFileSystem(new GridGgfsHadoopFileSystemWrapper(
             "ggfs://ggfs-secondary:ggfs-grid-secondary@127.0.0.1:11500/",
@@ -156,7 +159,10 @@ public class GridGgfsHadoopFileSystemSecondaryModeSelfTest extends GridGgfsCommo
         ggfsCfg.setName("ggfs-secondary");
         ggfsCfg.setBlockSize(512 * 1024);
         ggfsCfg.setDefaultMode(PRIMARY);
-        ggfsCfg.setIpcEndpointConfiguration(GridGgfsTestUtils.jsonToMap("{type:'tcp', port:11500}"));
+        ggfsCfg.setIpcEndpointConfiguration(new HashMap<String, String>() {{
+            put("type", "tcp");
+            put("port", "11500");
+        }});
 
         GridCacheConfiguration cacheCfg = defaultCacheConfiguration();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2af57da6/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopFileSystemShmemAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopFileSystemShmemAbstractSelfTest.java b/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopFileSystemShmemAbstractSelfTest.java
index fe08bab..0d679d8 100644
--- a/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopFileSystemShmemAbstractSelfTest.java
+++ b/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsHadoopFileSystemShmemAbstractSelfTest.java
@@ -44,8 +44,11 @@ public abstract class GridGgfsHadoopFileSystemShmemAbstractSelfTest extends Grid
     }
 
     /** {@inheritDoc} */
-    @Override protected String primaryIpcEndpointConfiguration(String gridName) {
-        return "{type:'shmem', port:" + (DFLT_IPC_PORT + getTestGridIndex(gridName)) + "}";
+    @Override protected Map<String, String> primaryIpcEndpointConfiguration(final String gridName) {
+        return new HashMap<String, String>() {{
+            put("type", "shmem");
+            put("port", String.valueOf(DFLT_IPC_PORT + getTestGridIndex(gridName)));
+        }};
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2af57da6/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsNearOnlyMultiNodeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsNearOnlyMultiNodeSelfTest.java b/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsNearOnlyMultiNodeSelfTest.java
index 785c957..9d8bb58 100644
--- a/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsNearOnlyMultiNodeSelfTest.java
+++ b/modules/hadoop/src/test/java/org/gridgain/grid/ggfs/GridGgfsNearOnlyMultiNodeSelfTest.java
@@ -30,7 +30,6 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
 import org.gridgain.grid.util.ipc.shmem.*;
 import org.gridgain.grid.util.typedef.*;
 import org.gridgain.grid.util.typedef.internal.*;
-import org.gridgain.testframework.*;
 import org.gridgain.testframework.junits.common.*;
 
 import java.io.*;
@@ -83,8 +82,10 @@ public class GridGgfsNearOnlyMultiNodeSelfTest extends GridCommonAbstractTest {
         ggfsCfg.setMetaCacheName("partitioned");
         ggfsCfg.setName("ggfs");
 
-        ggfsCfg.setIpcEndpointConfiguration(GridGgfsTestUtils.jsonToMap(
-            "{type:'shmem', port:" + (GridIpcSharedMemoryServerEndpoint.DFLT_IPC_PORT + cnt) + "}"));
+        ggfsCfg.setIpcEndpointConfiguration(new HashMap<String, String>() {{
+            put("type", "shmem");
+            put("port", String.valueOf(GridIpcSharedMemoryServerEndpoint.DFLT_IPC_PORT + cnt));
+        }});
 
         ggfsCfg.setBlockSize(512 * 1024); // Together with group blocks mapper will yield 64M per node groups.
 


Mime
View raw message