You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by se...@apache.org on 2015/02/02 02:53:29 UTC

[01/50] [abbrv] incubator-ignite git commit: GridUtils -> IgniteUtils

Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-sql 17a1aa24b -> aa0ee770f


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fc768b83/modules/core/src/main/java/org/apache/ignite/internal/util/typedef/internal/U.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/typedef/internal/U.java b/modules/core/src/main/java/org/apache/ignite/internal/util/typedef/internal/U.java
index ef36125..05c76b4 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/typedef/internal/U.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/typedef/internal/U.java
@@ -20,9 +20,9 @@ package org.apache.ignite.internal.util.typedef.internal;
 import org.apache.ignite.internal.util.*;
 
 /**
- * Defines internal {@code typedef} for {@link GridUtils}. Since Java doesn't provide type aliases
+ * Defines internal {@code typedef} for {@link IgniteUtils}. Since Java doesn't provide type aliases
  * (like Scala, for example) we resort to these types of measures. This is intended for internal
  * use only and meant to provide for more terse code when readability of code is not compromised.
  */
 @SuppressWarnings({"ExtendsUtilityClass"})
-public class U extends GridUtils { /* No-op. */ }
+public class U extends IgniteUtils { /* No-op. */ }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fc768b83/modules/core/src/main/java/org/apache/ignite/internal/visor/misc/VisorResolveHostNameTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/misc/VisorResolveHostNameTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/misc/VisorResolveHostNameTask.java
index 8a2247e..6342bb5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/misc/VisorResolveHostNameTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/misc/VisorResolveHostNameTask.java
@@ -63,7 +63,7 @@ public class VisorResolveHostNameTask extends VisorOneNodeTask<Void, Map<String,
 
             try {
                 IgniteBiTuple<Collection<String>, Collection<String>> addrs =
-                    GridUtils.resolveLocalAddresses(InetAddress.getByName("0.0.0.0"));
+                    IgniteUtils.resolveLocalAddresses(InetAddress.getByName("0.0.0.0"));
 
                 assert(addrs.get1() != null);
                 assert(addrs.get2() != null);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fc768b83/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryUtils.java
index 95bb434..190f6da 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryUtils.java
@@ -53,8 +53,8 @@ public class VisorQueryUtils {
         if (o != null) {
             Class<?> clazz = o.getClass();
 
-            return clazz.isArray() ? GridUtils.compact(clazz.getComponentType().getName()) + "[]"
-                : GridUtils.compact(o.getClass().getName());
+            return clazz.isArray() ? IgniteUtils.compact(clazz.getComponentType().getName()) + "[]"
+                : IgniteUtils.compact(o.getClass().getName());
         }
         else
             return "n/a";

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fc768b83/modules/core/src/main/java/org/apache/ignite/marshaller/optimized/IgniteOptimizedMarshaller.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/marshaller/optimized/IgniteOptimizedMarshaller.java b/modules/core/src/main/java/org/apache/ignite/marshaller/optimized/IgniteOptimizedMarshaller.java
index bee3a2e..22349e1 100644
--- a/modules/core/src/main/java/org/apache/ignite/marshaller/optimized/IgniteOptimizedMarshaller.java
+++ b/modules/core/src/main/java/org/apache/ignite/marshaller/optimized/IgniteOptimizedMarshaller.java
@@ -183,7 +183,7 @@ public class IgniteOptimizedMarshaller extends IgniteAbstractMarshaller {
         if (path == null)
             return;
 
-        URL url = GridUtils.resolveGridGainUrl(path, false);
+        URL url = IgniteUtils.resolveGridGainUrl(path, false);
 
         if (url == null)
             throw new IgniteCheckedException("Failed to find resource for name: " + path);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fc768b83/modules/core/src/test/java/org/apache/ignite/IgniteExceptionHelpLinksSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/IgniteExceptionHelpLinksSelfTest.java b/modules/core/src/test/java/org/apache/ignite/IgniteExceptionHelpLinksSelfTest.java
index 3fbf4ec..d555c41 100644
--- a/modules/core/src/test/java/org/apache/ignite/IgniteExceptionHelpLinksSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/IgniteExceptionHelpLinksSelfTest.java
@@ -18,12 +18,11 @@
 package org.apache.ignite;
 
 import junit.framework.*;
-import org.apache.ignite.*;
 import org.jetbrains.annotations.*;
 
 import java.util.*;
 
-import static org.apache.ignite.internal.util.GridUtils.*;
+import static org.apache.ignite.internal.util.IgniteUtils.*;
 
 /**
  * Tests for proper link output in stack traces.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fc768b83/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageCheckAllEventsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageCheckAllEventsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageCheckAllEventsSelfTest.java
index ca71778..2c0b1dd 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageCheckAllEventsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageCheckAllEventsSelfTest.java
@@ -233,7 +233,7 @@ public class GridEventStorageCheckAllEventsSelfTest extends GridCommonAbstractTe
 
     /**
      * Returns timestamp at the method call moment, but sleeps before return,
-     * to allow pass {@link GridUtils#currentTimeMillis()}.
+     * to allow pass {@link IgniteUtils#currentTimeMillis()}.
      *
      * @return Call timestamp.
      * @throws InterruptedException If sleep was interrupted.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fc768b83/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractMetricsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractMetricsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractMetricsSelfTest.java
index fa3aeb3..d0dcda6 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractMetricsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractMetricsSelfTest.java
@@ -20,7 +20,7 @@ package org.apache.ignite.internal.processors.cache;
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.internal.*;
-import org.apache.ignite.internal.util.GridUtils;
+import org.apache.ignite.internal.util.IgniteUtils;
 import org.apache.ignite.internal.util.lang.*;
 import org.apache.ignite.testframework.*;
 import org.apache.ignite.transactions.*;
@@ -739,7 +739,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract
         }
 
         // One more update from the same cache entry to ensure that expire time is shifted forward.
-        GridUtils.sleep(100);
+        IgniteUtils.sleep(100);
 
         tx = inTx ? c.txStart() : null;
 
@@ -764,7 +764,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract
         }
 
         // And one more direct update to ensure that expire time is shifted forward.
-        GridUtils.sleep(100);
+        IgniteUtils.sleep(100);
 
         assertEquals(0, grid(0).cache(null).metrics().getCacheEvictions());
 
@@ -791,7 +791,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract
         }
 
         // And one more update to ensure that ttl is not changed and expire time is not shifted forward.
-        GridUtils.sleep(100);
+        IgniteUtils.sleep(100);
 
         assertEquals(0, grid(0).cache(null).metrics().getCacheEvictions());
 
@@ -864,7 +864,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract
                 tx.commit();
         }
 
-        GridUtils.sleep(2000);
+        IgniteUtils.sleep(2000);
 
         entry = c.entry(key);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fc768b83/modules/core/src/test/java/org/apache/ignite/internal/util/GridStartupWithSpecifiedWorkDirectorySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/GridStartupWithSpecifiedWorkDirectorySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/GridStartupWithSpecifiedWorkDirectorySelfTest.java
index d6ef6f3..0e034af 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/util/GridStartupWithSpecifiedWorkDirectorySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/util/GridStartupWithSpecifiedWorkDirectorySelfTest.java
@@ -31,7 +31,7 @@ import java.io.*;
 import java.util.*;
 
 import static org.apache.ignite.IgniteSystemProperties.*;
-import static org.apache.ignite.internal.util.GridUtils.*;
+import static org.apache.ignite.internal.util.IgniteUtils.*;
 
 /**
  * Checks creation of work folder.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fc768b83/modules/core/src/test/java/org/apache/ignite/internal/util/GridStartupWithUndefinedGridGainHomeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/GridStartupWithUndefinedGridGainHomeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/GridStartupWithUndefinedGridGainHomeSelfTest.java
index 0fc0ef4..a56f8b2 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/util/GridStartupWithUndefinedGridGainHomeSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/util/GridStartupWithUndefinedGridGainHomeSelfTest.java
@@ -29,7 +29,7 @@ import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.testframework.junits.common.*;
 
 import static org.apache.ignite.IgniteSystemProperties.*;
-import static org.apache.ignite.internal.util.GridUtils.*;
+import static org.apache.ignite.internal.util.IgniteUtils.*;
 
 /**
  * Checks that node can be started without operations with undefined GRIDGAIN_HOME.
@@ -58,7 +58,7 @@ public class GridStartupWithUndefinedGridGainHomeSelfTest extends TestCase {
      * @throws Exception If failed.
      */
     public void testStartStopWithUndefinedGridGainHome() throws Exception {
-        GridUtils.nullifyHomeDirectory();
+        IgniteUtils.nullifyHomeDirectory();
 
         // We can't use U.getGridGainHome() here because
         // it will initialize cached value which is forbidden to override.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fc768b83/modules/core/src/test/java/org/apache/ignite/internal/util/GridTestClockTimer.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/GridTestClockTimer.java b/modules/core/src/test/java/org/apache/ignite/internal/util/GridTestClockTimer.java
index b095c5f..b9bb5ab 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/util/GridTestClockTimer.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/util/GridTestClockTimer.java
@@ -17,8 +17,6 @@
 
 package org.apache.ignite.internal.util;
 
-import org.apache.ignite.internal.util.*;
-
 /**
  * Clock timer for tests.
  */
@@ -26,13 +24,13 @@ public class GridTestClockTimer implements Runnable {
     /** {@inheritDoc} */
     @Override public void run() {
         while (true) {
-            GridUtils.curTimeMillis = System.currentTimeMillis();
+            IgniteUtils.curTimeMillis = System.currentTimeMillis();
 
             try {
                 Thread.sleep(10);
             }
             catch (InterruptedException ignored) {
-                GridUtils.log(null, "Timer thread has been interrupted.");
+                IgniteUtils.log(null, "Timer thread has been interrupted.");
 
                 break;
             }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fc768b83/modules/core/src/test/java/org/apache/ignite/internal/util/GridUtilsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/GridUtilsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/GridUtilsSelfTest.java
deleted file mode 100644
index 3848b7f..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/util/GridUtilsSelfTest.java
+++ /dev/null
@@ -1,728 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.util;
-
-import org.apache.ignite.Ignite;
-import org.apache.ignite.cluster.ClusterGroup;
-import org.apache.ignite.cluster.ClusterNode;
-import org.apache.ignite.compute.ComputeJob;
-import org.apache.ignite.compute.ComputeJobAdapter;
-import org.apache.ignite.internal.util.lang.GridPeerDeployAware;
-import org.apache.ignite.internal.util.typedef.X;
-import org.apache.ignite.internal.util.typedef.internal.U;
-import org.apache.ignite.testframework.GridTestUtils;
-import org.apache.ignite.testframework.http.GridEmbeddedHttpServer;
-import org.apache.ignite.testframework.junits.GridTestKernalContext;
-import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
-import org.apache.ignite.testframework.junits.common.GridCommonTest;
-import org.jetbrains.annotations.Nullable;
-
-import java.io.*;
-import java.lang.annotation.*;
-import java.math.BigInteger;
-import java.net.InetSocketAddress;
-import java.net.URL;
-import java.nio.ByteBuffer;
-import java.util.*;
-
-import static org.junit.Assert.assertArrayEquals;
-
-/**
- * Grid utils tests.
- */
-@GridCommonTest(group = "Utils")
-public class GridUtilsSelfTest extends GridCommonAbstractTest {
-    /** */
-    public static final int[] EMPTY = new int[0];
-
-    /**
-     * @return 120 character length string.
-     */
-    private String text120() {
-        char[] chs = new char[120];
-
-        Arrays.fill(chs, 'x');
-
-        return new String(chs);
-    }
-
-    /**
-     *
-     */
-    public void testIsPow2() {
-        assertTrue(U.isPow2(1));
-        assertTrue(U.isPow2(2));
-        assertTrue(U.isPow2(4));
-        assertTrue(U.isPow2(8));
-        assertTrue(U.isPow2(16));
-        assertTrue(U.isPow2(16 * 16));
-        assertTrue(U.isPow2(32 * 32));
-
-        assertFalse(U.isPow2(-4));
-        assertFalse(U.isPow2(-3));
-        assertFalse(U.isPow2(-2));
-        assertFalse(U.isPow2(-1));
-        assertFalse(U.isPow2(0));
-        assertFalse(U.isPow2(3));
-        assertFalse(U.isPow2(5));
-        assertFalse(U.isPow2(6));
-        assertFalse(U.isPow2(7));
-        assertFalse(U.isPow2(9));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testAllLocalIps() throws Exception {
-        Collection<String> ips = U.allLocalIps();
-
-        System.out.println("All local IPs: " + ips);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testAllLocalMACs() throws Exception {
-        Collection<String> macs = U.allLocalMACs();
-
-        System.out.println("All local MACs: " + macs);
-    }
-
-    /**
-     * On linux NetworkInterface.getHardwareAddress() returns null from time to time.
-     *
-     * @throws Exception If failed.
-     */
-    public void testAllLocalMACsMultiThreaded() throws Exception {
-        GridTestUtils.runMultiThreaded(new Runnable() {
-            @Override public void run() {
-                for (int i = 0; i < 30; i++) {
-                    Collection<String> macs = U.allLocalMACs();
-
-                    assertTrue("Mac address are not defined.", !macs.isEmpty());
-                }
-            }
-        }, 32, "thread");
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testByteArray2String() throws Exception {
-        assertEquals("{0x0A,0x14,0x1E,0x28,0x32,0x3C,0x46,0x50,0x5A}",
-            U.byteArray2String(new byte[] {10, 20, 30, 40, 50, 60, 70, 80, 90}, "0x%02X", ",0x%02X"));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testFormatMins() throws Exception {
-        printFormatMins(0);
-        printFormatMins(1);
-        printFormatMins(2);
-        printFormatMins(59);
-        printFormatMins(60);
-        printFormatMins(61);
-        printFormatMins(60 * 24 - 1);
-        printFormatMins(60 * 24);
-        printFormatMins(60 * 24 + 1);
-        printFormatMins(5 * 60 * 24 - 1);
-        printFormatMins(5 * 60 * 24);
-        printFormatMins(5 * 60 * 24 + 1);
-    }
-
-    /**
-     * Helper method for {@link #testFormatMins()}
-     *
-     * @param mins Minutes to test.
-     */
-    private void printFormatMins(long mins) {
-        System.out.println("For " + mins + " minutes: " + X.formatMins(mins));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testDownloadUrlFromHttp() throws Exception {
-        GridEmbeddedHttpServer srv = null;
-        try {
-            String urlPath = "/testDownloadUrl/";
-            srv = GridEmbeddedHttpServer.startHttpServer().withFileDownloadingHandler(urlPath,
-                GridTestUtils.resolveGridGainPath("/modules/core/src/test/config/tests.properties"));
-
-            File file = new File(System.getProperty("java.io.tmpdir") + File.separator + "url-http.file");
-
-            file = U.downloadUrl(new URL(srv.getBaseUrl() + urlPath), file);
-
-            assert file.exists();
-            assert file.delete();
-        }
-        finally {
-            if (srv != null)
-                srv.stop(1);
-        }
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testDownloadUrlFromHttps() throws Exception {
-        GridEmbeddedHttpServer srv = null;
-        try {
-            String urlPath = "/testDownloadUrl/";
-            srv = GridEmbeddedHttpServer.startHttpsServer().withFileDownloadingHandler(urlPath,
-                GridTestUtils.resolveGridGainPath("modules/core/src/test/config/tests.properties"));
-
-            File file = new File(System.getProperty("java.io.tmpdir") + File.separator + "url-http.file");
-
-            file = U.downloadUrl(new URL(srv.getBaseUrl() + urlPath), file);
-
-            assert file.exists();
-            assert file.delete();
-        }
-        finally {
-            if (srv != null)
-                srv.stop(1);
-        }
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testDownloadUrlFromLocalFile() throws Exception {
-        File file = new File(System.getProperty("java.io.tmpdir") + File.separator + "url-http.file");
-
-        file = U.downloadUrl(
-            GridTestUtils.resolveGridGainPath("modules/core/src/test/config/tests.properties").toURI().toURL(), file);
-
-        assert file.exists();
-        assert file.delete();
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testOs() throws Exception {
-        System.out.println("OS string: " + U.osString());
-        System.out.println("JDK string: " + U.jdkString());
-        System.out.println("OS/JDK string: " + U.osJdkString());
-
-        System.out.println("Is Windows: " + U.isWindows());
-        System.out.println("Is Windows 95: " + U.isWindows95());
-        System.out.println("Is Windows 98: " + U.isWindows98());
-        System.out.println("Is Windows NT: " + U.isWindowsNt());
-        System.out.println("Is Windows 2000: " + U.isWindows2k());
-        System.out.println("Is Windows 2003: " + U.isWindows2003());
-        System.out.println("Is Windows XP: " + U.isWindowsXp());
-        System.out.println("Is Windows Vista: " + U.isWindowsVista());
-        System.out.println("Is Linux: " + U.isLinux());
-        System.out.println("Is Mac OS: " + U.isMacOs());
-        System.out.println("Is Netware: " + U.isNetWare());
-        System.out.println("Is Solaris: " + U.isSolaris());
-        System.out.println("Is Solaris SPARC: " + U.isSolarisSparc());
-        System.out.println("Is Solaris x86: " + U.isSolarisX86());
-        System.out.println("Is Windows7: " + U.isWindows7());
-        System.out.println("Is Sufficiently Tested OS: " + U.isSufficientlyTestedOs());
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testJavaSerialization() throws Exception {
-        ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
-        ObjectOutputStream objOut = new ObjectOutputStream(byteOut);
-
-        objOut.writeObject(new byte[] {1, 2, 3, 4, 5, 5});
-
-        objOut.flush();
-
-        byte[] sBytes = byteOut.toByteArray();
-
-        ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(sBytes));
-
-        in.readObject();
-    }
-
-    /**
-     *
-     */
-    public void testHidePassword() {
-        Collection<String> uriList = new ArrayList<>();
-
-        uriList.add("ftp://anonymous:111111;freq=5000@unknown.host:21/pub/gg-test");
-        uriList.add("ftp://anonymous:111111;freq=5000@localhost:21/pub/gg-test");
-
-        uriList.add("http://freq=5000@localhost/tasks");
-        uriList.add("http://freq=5000@unknownhost.host/tasks");
-
-        for (String uri : uriList)
-            X.println(uri + " -> " + U.hidePassword(uri));
-    }
-
-    /**
-     * Test job to test possible indefinite recursion in detecting peer deploy aware.
-     */
-    @SuppressWarnings({"UnusedDeclaration"})
-    private class SelfReferencedJob extends ComputeJobAdapter implements GridPeerDeployAware {
-        /** */
-        private SelfReferencedJob ref;
-
-        /** */
-        private SelfReferencedJob[] arr;
-
-        /** */
-        private Collection<SelfReferencedJob> col;
-
-        /** */
-        private ClusterNode node;
-
-        /** */
-        private ClusterGroup subGrid;
-
-        /**
-         * @param ignite Grid.
-         */
-        private SelfReferencedJob(Ignite ignite) {
-            node = ignite.cluster().localNode();
-
-            ref = this;
-
-            arr = new SelfReferencedJob[] {this, this};
-
-            col = Arrays.asList(this, this, this);
-
-            GridTestKernalContext ctx = newContext();
-
-            subGrid = ignite.cluster().forNodes(Collections.singleton(node));
-        }
-
-        /** {@inheritDoc} */
-        @Override public Object execute() {
-            return null;
-        }
-
-        /** {@inheritDoc} */
-        @Override public Class<?> deployClass() {
-            return getClass();
-        }
-
-        /** {@inheritDoc} */
-        @Override public ClassLoader classLoader() {
-            return getClass().getClassLoader();
-        }
-    }
-
-    /**
-     * @throws Exception If test fails.
-     */
-    public void testDetectPeerDeployAwareInfiniteRecursion() throws Exception {
-        Ignite g = startGrid(1);
-
-        try {
-            final SelfReferencedJob job = new SelfReferencedJob(g);
-
-            GridPeerDeployAware d = U.detectPeerDeployAware(U.peerDeployAware(job));
-
-            assert d != null;
-            assert SelfReferencedJob.class == d.deployClass();
-            assert d.classLoader() == SelfReferencedJob.class.getClassLoader();
-        }
-        finally {
-            stopGrid(1);
-        }
-    }
-
-    /**
-     * @param r Runnable.
-     * @return Job created for given runnable.
-     */
-    private static ComputeJob job(final Runnable r) {
-        return new ComputeJobAdapter() {
-            @Nullable @Override public Object execute() {
-                r.run();
-
-                return null;
-            }
-        };
-    }
-
-    /**
-     *
-     * @throws Exception If failed.
-     */
-    public void testParseIsoDate() throws Exception {
-        Calendar cal = U.parseIsoDate("2009-12-08T13:30:44.000Z");
-
-        assert cal.get(Calendar.YEAR) == 2009;
-        assert cal.get(Calendar.MONTH) == 11;
-        assert cal.get(Calendar.DAY_OF_MONTH) == 8;
-        assert cal.get(Calendar.HOUR_OF_DAY) == 13;
-        assert cal.get(Calendar.MINUTE) == 30;
-        assert cal.get(Calendar.SECOND) == 44;
-        assert cal.get(Calendar.MILLISECOND) == 0;
-        assert cal.get(Calendar.ZONE_OFFSET) == 0 :
-            "Unexpected value: " + cal.get(Calendar.ZONE_OFFSET);
-
-        cal = U.parseIsoDate("2009-12-08T13:30:44.000+03:00");
-
-        assert cal.get(Calendar.YEAR) == 2009;
-        assert cal.get(Calendar.MONTH) == 11;
-        assert cal.get(Calendar.DAY_OF_MONTH) == 8;
-        assert cal.get(Calendar.HOUR_OF_DAY) == 13;
-        assert cal.get(Calendar.MINUTE) == 30;
-        assert cal.get(Calendar.SECOND) == 44;
-        assert cal.get(Calendar.MILLISECOND) == 0;
-        assert cal.get(Calendar.ZONE_OFFSET) == 3 * 60 * 60 * 1000 :
-            "Unexpected value: " + cal.get(Calendar.ZONE_OFFSET);
-
-        cal = U.parseIsoDate("2009-12-08T13:30:44.000+0300");
-
-        assert cal.get(Calendar.YEAR) == 2009;
-        assert cal.get(Calendar.MONTH) == 11;
-        assert cal.get(Calendar.DAY_OF_MONTH) == 8;
-        assert cal.get(Calendar.HOUR_OF_DAY) == 13;
-        assert cal.get(Calendar.MINUTE) == 30;
-        assert cal.get(Calendar.SECOND) == 44;
-        assert cal.get(Calendar.MILLISECOND) == 0;
-        assert cal.get(Calendar.ZONE_OFFSET) == 3 * 60 * 60 * 1000 :
-            "Unexpected value: " + cal.get(Calendar.ZONE_OFFSET);
-    }
-
-    /**
-     * @throws Exception If test failed.
-     */
-    public void testPeerDeployAware0() throws Exception {
-        Collection<Object> col = new ArrayList<>();
-
-        col.add(null);
-        col.add(null);
-        col.add(null);
-
-        GridPeerDeployAware pda = U.peerDeployAware0(col);
-
-        assert pda != null;
-
-        col.clear();
-
-        col.add(null);
-
-        pda = U.peerDeployAware0(col);
-
-        assert pda != null;
-
-        col.clear();
-
-        pda = U.peerDeployAware0(col);
-
-        assert pda != null;
-
-        col.clear();
-
-        col.add(null);
-        col.add("Test");
-        col.add(null);
-
-        pda = U.peerDeployAware0(col);
-
-        assert pda != null;
-
-        col.clear();
-
-        col.add("Test");
-
-        pda = U.peerDeployAware0(col);
-
-        assert pda != null;
-
-        col.clear();
-
-        col.add("Test");
-        col.add(this);
-
-        pda = U.peerDeployAware0(col);
-
-        assert pda != null;
-
-        col.clear();
-
-        col.add(null);
-        col.add("Test");
-        col.add(null);
-        col.add(this);
-        col.add(null);
-
-        pda = U.peerDeployAware0(col);
-
-        assert pda != null;
-    }
-
-    /**
-     * Test UUID to bytes array conversion.
-     */
-    public void testsGetBytes() {
-        for (int i = 0; i < 100; i++) {
-            UUID id = UUID.randomUUID();
-
-            byte[] bytes = GridUtils.uuidToBytes(id);
-            BigInteger n = new BigInteger(bytes);
-
-            assert n.shiftRight(Long.SIZE).longValue() == id.getMostSignificantBits();
-            assert n.longValue() == id.getLeastSignificantBits();
-        }
-    }
-
-    /**
-     *
-     */
-    @SuppressWarnings("ZeroLengthArrayAllocation")
-    public void testReadByteArray() {
-        assertTrue(Arrays.equals(new byte[0], U.readByteArray(ByteBuffer.allocate(0))));
-        assertTrue(Arrays.equals(new byte[0], U.readByteArray(ByteBuffer.allocate(0), ByteBuffer.allocate(0))));
-
-        Random rnd = new Random();
-
-        byte[] bytes = new byte[13];
-
-        rnd.nextBytes(bytes);
-
-        assertTrue(Arrays.equals(bytes, U.readByteArray(ByteBuffer.wrap(bytes))));
-        assertTrue(Arrays.equals(bytes, U.readByteArray(ByteBuffer.wrap(bytes), ByteBuffer.allocate(0))));
-        assertTrue(Arrays.equals(bytes, U.readByteArray(ByteBuffer.allocate(0), ByteBuffer.wrap(bytes))));
-
-        for (int i = 0; i < 1000; i++) {
-            int n = rnd.nextInt(100);
-
-            bytes = new byte[n];
-
-            rnd.nextBytes(bytes);
-
-            ByteBuffer[] bufs = new ByteBuffer[1 + rnd.nextInt(10)];
-
-            int x = 0;
-
-            for (int j = 0; j < bufs.length - 1; j++) {
-                int size = x == n ? 0 : rnd.nextInt(n - x);
-
-                bufs[j] = (ByteBuffer)ByteBuffer.wrap(bytes).position(x).limit(x += size);
-            }
-
-            bufs[bufs.length - 1] = (ByteBuffer)ByteBuffer.wrap(bytes).position(x).limit(n);
-
-            assertTrue(Arrays.equals(bytes, U.readByteArray(bufs)));
-        }
-    }
-
-    /**
-     *
-     */
-    @SuppressWarnings("ZeroLengthArrayAllocation")
-    public void testHashCodeFromBuffers() {
-        assertEquals(Arrays.hashCode(new byte[0]), U.hashCode(ByteBuffer.allocate(0)));
-        assertEquals(Arrays.hashCode(new byte[0]), U.hashCode(ByteBuffer.allocate(0), ByteBuffer.allocate(0)));
-
-        Random rnd = new Random();
-
-        for (int i = 0; i < 1000; i++) {
-            ByteBuffer[] bufs = new ByteBuffer[1 + rnd.nextInt(15)];
-
-            for (int j = 0; j < bufs.length; j++) {
-                byte[] bytes = new byte[rnd.nextInt(25)];
-
-                rnd.nextBytes(bytes);
-
-                bufs[j] = ByteBuffer.wrap(bytes);
-            }
-
-            assertEquals(U.hashCode(bufs), Arrays.hashCode(U.readByteArray(bufs)));
-        }
-    }
-
-    /**
-     * Test annotation look up.
-     */
-    public void testGetAnnotations() {
-        assert U.getAnnotation(A1.class, Ann1.class) != null;
-        assert U.getAnnotation(A2.class, Ann1.class) != null;
-
-        assert U.getAnnotation(A1.class, Ann2.class) != null;
-        assert U.getAnnotation(A2.class, Ann2.class) != null;
-
-        assert U.getAnnotation(A3.class, Ann1.class) == null;
-        assert U.getAnnotation(A3.class, Ann2.class) != null;
-    }
-
-    /**
-     *
-     */
-    public void testUnique() {
-        int[][][] arrays = new int[][][]{
-            new int[][]{EMPTY, EMPTY, EMPTY},
-            new int[][]{new int[]{1, 2, 3}, EMPTY, new int[]{1, 2, 3}},
-            new int[][]{new int[]{1, 2, 3}, new int[]{1, 2, 3}, new int[]{1, 2, 3}},
-            new int[][]{new int[]{1, 2, 3}, new int[]{1, 3}, new int[]{1, 2, 3}},
-            new int[][]{new int[]{1, 2, 30, 40, 50}, new int[]{2, 40}, new int[]{1, 2, 30, 40, 50}},
-            new int[][]{new int[]{-100, -13, 1, 2, 5, 30, 40, 50}, new int[]{1, 2, 6, 100, 113},
-                new int[]{-100, -13, 1, 2, 5, 6, 30, 40, 50, 100, 113}}
-        };
-
-        for (int[][] a : arrays) {
-            assertArrayEquals(a[2], U.unique(a[0], a[0].length, a[1], a[1].length));
-
-            assertArrayEquals(a[2], U.unique(a[1], a[1].length, a[0], a[0].length));
-        }
-
-        assertArrayEquals(new int[]{1, 2, 3, 4}, U.unique(new int[]{1, 2, 3, 8}, 3, new int[]{2, 4, 5}, 2));
-        assertArrayEquals(new int[]{2, 4}, U.unique(new int[]{1, 2, 3, 8}, 0, new int[]{2, 4, 5}, 2));
-        assertArrayEquals(new int[]{1, 2, 4, 5}, U.unique(new int[]{1, 2, 3, 8}, 2, new int[]{2, 4, 5, 6}, 3));
-        assertArrayEquals(new int[]{1, 2}, U.unique(new int[]{1, 2, 3, 8}, 2, new int[]{2, 4, 5, 6}, 0));
-    }
-
-    /**
-     *
-     */
-    public void testDifference() {
-        int[][][] arrays = new int[][][]{
-            new int[][]{EMPTY, EMPTY, EMPTY},
-            new int[][]{new int[]{1, 2, 3}, EMPTY, new int[]{1, 2, 3}},
-            new int[][]{EMPTY, new int[]{1, 2, 3}, EMPTY},
-            new int[][]{new int[]{1, 2, 3}, new int[]{1, 2, 3}, EMPTY},
-            new int[][]{new int[]{-100, -50, 1, 2, 3}, new int[]{-50, -1, 1, 3}, new int[]{-100, 2}},
-            new int[][]{new int[]{-100, 1, 2, 30, 40, 50}, new int[]{2, 40}, new int[]{-100, 1, 30, 50}},
-            new int[][]{new int[]{-1, 1, 2, 30, 40, 50}, new int[]{1, 2, 100, 113}, new int[]{-1, 30, 40, 50}}
-        };
-
-        for (int[][] a : arrays)
-            assertArrayEquals(a[2], U.difference(a[0], a[0].length, a[1], a[1].length));
-
-        assertArrayEquals(new int[]{1, 2}, U.difference(new int[]{1, 2, 30, 40, 50}, 3, new int[]{30, 40}, 2));
-        assertArrayEquals(EMPTY, U.difference(new int[]{1, 2, 30, 40, 50}, 0, new int[]{30, 40}, 2));
-        assertArrayEquals(new int[]{1, 2, 40}, U.difference(new int[]{1, 2, 30, 40, 50}, 4, new int[]{30, 40}, 1));
-        assertArrayEquals(new int[]{1, 2, 30, 40}, U.difference(new int[]{1, 2, 30, 40, 50}, 4, new int[]{30, 40}, 0));
-    }
-
-    /**
-     *
-     */
-    public void testCopyIfExceeded() {
-        int[][] arrays = new int[][]{new int[]{13, 14, 17, 11}, new int[]{13}, EMPTY};
-
-        for (int[] a : arrays) {
-            int[] b = Arrays.copyOf(a, a.length);
-
-            assertEquals(a, U.copyIfExceeded(a, a.length));
-            assertArrayEquals(b, U.copyIfExceeded(a, a.length));
-
-            for (int j = 0; j < a.length - 1; j++)
-                assertArrayEquals(Arrays.copyOf(b, j), U.copyIfExceeded(a, j));
-        }
-    }
-
-    /**
-     *
-     */
-    public void testIsIncreasingArray() {
-        assertTrue(U.isIncreasingArray(EMPTY, 0));
-        assertTrue(U.isIncreasingArray(new int[]{Integer.MIN_VALUE, -10, 1, 13, Integer.MAX_VALUE}, 5));
-        assertTrue(U.isIncreasingArray(new int[]{1, 2, 3, -1, 5}, 0));
-        assertTrue(U.isIncreasingArray(new int[]{1, 2, 3, -1, 5}, 3));
-        assertFalse(U.isIncreasingArray(new int[]{1, 2, 3, -1, 5}, 4));
-        assertFalse(U.isIncreasingArray(new int[]{1, 2, 3, -1, 5}, 5));
-        assertFalse(U.isIncreasingArray(new int[]{1, 2, 3, 3, 5}, 4));
-        assertTrue(U.isIncreasingArray(new int[]{1, -1}, 1));
-        assertFalse(U.isIncreasingArray(new int[]{1, -1}, 2));
-        assertTrue(U.isIncreasingArray(new int[]{13, 13, 13}, 1));
-        assertFalse(U.isIncreasingArray(new int[]{13, 13, 13}, 2));
-        assertFalse(U.isIncreasingArray(new int[]{13, 13, 13}, 3));
-    }
-
-    /**
-     *
-     */
-    public void testIsNonDecreasingArray() {
-        assertTrue(U.isNonDecreasingArray(EMPTY, 0));
-        assertTrue(U.isNonDecreasingArray(new int[]{Integer.MIN_VALUE, -10, 1, 13, Integer.MAX_VALUE}, 5));
-        assertTrue(U.isNonDecreasingArray(new int[]{1, 2, 3, -1, 5}, 0));
-        assertTrue(U.isNonDecreasingArray(new int[]{1, 2, 3, -1, 5}, 3));
-        assertFalse(U.isNonDecreasingArray(new int[]{1, 2, 3, -1, 5}, 4));
-        assertFalse(U.isNonDecreasingArray(new int[]{1, 2, 3, -1, 5}, 5));
-        assertTrue(U.isNonDecreasingArray(new int[]{1, 2, 3, 3, 5}, 4));
-        assertTrue(U.isNonDecreasingArray(new int[]{1, -1}, 1));
-        assertFalse(U.isNonDecreasingArray(new int[]{1, -1}, 2));
-        assertTrue(U.isNonDecreasingArray(new int[]{13, 13, 13}, 1));
-        assertTrue(U.isNonDecreasingArray(new int[]{13, 13, 13}, 2));
-        assertTrue(U.isNonDecreasingArray(new int[]{13, 13, 13}, 3));
-    }
-
-    /**
-     * Test InetAddress Comparator.
-     */
-    public void testInetAddressesComparator() {
-        List<InetSocketAddress> ips = new ArrayList<InetSocketAddress>() {
-            {
-                add(new InetSocketAddress("127.0.0.1", 1));
-                add(new InetSocketAddress("10.0.0.1", 1));
-                add(new InetSocketAddress("172.16.0.1", 1));
-                add(new InetSocketAddress("192.168.0.1", 1));
-                add(new InetSocketAddress("100.0.0.1", 1));
-                add(new InetSocketAddress("XXX", 1));
-            }
-        };
-
-        Collections.sort(ips, U.inetAddressesComparator(true));
-
-        assertTrue(ips.get(0).getAddress().isLoopbackAddress());
-        assertTrue(ips.get(ips.size() - 1).isUnresolved());
-
-        Collections.sort(ips, U.inetAddressesComparator(false));
-
-        assertTrue(ips.get(ips.size() - 2).getAddress().isLoopbackAddress());
-        assertTrue(ips.get(ips.size() - 1).isUnresolved());
-    }
-
-
-    public void testMD5Calculation() throws Exception {
-        String md5 = GridUtils.calculateMD5(new ByteArrayInputStream("Corrupted information.".getBytes()));
-
-        assertEquals("d7dbe555be2eee7fa658299850169fa1", md5);
-    }
-
-    /**
-     * Test enum.
-     */
-    private enum TestEnum {
-        E1,
-        E2,
-        E3
-    }
-
-    @Documented @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE)
-    private @interface Ann1 {}
-
-    @Documented @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE)
-    private @interface Ann2 {}
-
-    private static class A1 implements I3, I5 {}
-    private static class A2 extends A1 {}
-    private static class A3 implements I5 {}
-
-    @Ann1 private interface I1 {}
-    private interface I2 extends I1 {}
-    private interface I3 extends I2 {}
-    @Ann2 private interface I4 {}
-    private interface I5 extends I4 {}
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fc768b83/modules/core/src/test/java/org/apache/ignite/internal/util/IgniteUtilsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/IgniteUtilsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/IgniteUtilsSelfTest.java
new file mode 100644
index 0000000..c5917bd
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/util/IgniteUtilsSelfTest.java
@@ -0,0 +1,728 @@
+/*
+ * 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.util;
+
+import org.apache.ignite.Ignite;
+import org.apache.ignite.cluster.ClusterGroup;
+import org.apache.ignite.cluster.ClusterNode;
+import org.apache.ignite.compute.ComputeJob;
+import org.apache.ignite.compute.ComputeJobAdapter;
+import org.apache.ignite.internal.util.lang.GridPeerDeployAware;
+import org.apache.ignite.internal.util.typedef.X;
+import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.testframework.GridTestUtils;
+import org.apache.ignite.testframework.http.GridEmbeddedHttpServer;
+import org.apache.ignite.testframework.junits.GridTestKernalContext;
+import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.apache.ignite.testframework.junits.common.GridCommonTest;
+import org.jetbrains.annotations.Nullable;
+
+import java.io.*;
+import java.lang.annotation.*;
+import java.math.BigInteger;
+import java.net.InetSocketAddress;
+import java.net.URL;
+import java.nio.ByteBuffer;
+import java.util.*;
+
+import static org.junit.Assert.assertArrayEquals;
+
+/**
+ * Grid utils tests.
+ */
+@GridCommonTest(group = "Utils")
+public class IgniteUtilsSelfTest extends GridCommonAbstractTest {
+    /** */
+    public static final int[] EMPTY = new int[0];
+
+    /**
+     * @return 120 character length string.
+     */
+    private String text120() {
+        char[] chs = new char[120];
+
+        Arrays.fill(chs, 'x');
+
+        return new String(chs);
+    }
+
+    /**
+     *
+     */
+    public void testIsPow2() {
+        assertTrue(U.isPow2(1));
+        assertTrue(U.isPow2(2));
+        assertTrue(U.isPow2(4));
+        assertTrue(U.isPow2(8));
+        assertTrue(U.isPow2(16));
+        assertTrue(U.isPow2(16 * 16));
+        assertTrue(U.isPow2(32 * 32));
+
+        assertFalse(U.isPow2(-4));
+        assertFalse(U.isPow2(-3));
+        assertFalse(U.isPow2(-2));
+        assertFalse(U.isPow2(-1));
+        assertFalse(U.isPow2(0));
+        assertFalse(U.isPow2(3));
+        assertFalse(U.isPow2(5));
+        assertFalse(U.isPow2(6));
+        assertFalse(U.isPow2(7));
+        assertFalse(U.isPow2(9));
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testAllLocalIps() throws Exception {
+        Collection<String> ips = U.allLocalIps();
+
+        System.out.println("All local IPs: " + ips);
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testAllLocalMACs() throws Exception {
+        Collection<String> macs = U.allLocalMACs();
+
+        System.out.println("All local MACs: " + macs);
+    }
+
+    /**
+     * On linux NetworkInterface.getHardwareAddress() returns null from time to time.
+     *
+     * @throws Exception If failed.
+     */
+    public void testAllLocalMACsMultiThreaded() throws Exception {
+        GridTestUtils.runMultiThreaded(new Runnable() {
+            @Override public void run() {
+                for (int i = 0; i < 30; i++) {
+                    Collection<String> macs = U.allLocalMACs();
+
+                    assertTrue("Mac address are not defined.", !macs.isEmpty());
+                }
+            }
+        }, 32, "thread");
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testByteArray2String() throws Exception {
+        assertEquals("{0x0A,0x14,0x1E,0x28,0x32,0x3C,0x46,0x50,0x5A}",
+            U.byteArray2String(new byte[] {10, 20, 30, 40, 50, 60, 70, 80, 90}, "0x%02X", ",0x%02X"));
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testFormatMins() throws Exception {
+        printFormatMins(0);
+        printFormatMins(1);
+        printFormatMins(2);
+        printFormatMins(59);
+        printFormatMins(60);
+        printFormatMins(61);
+        printFormatMins(60 * 24 - 1);
+        printFormatMins(60 * 24);
+        printFormatMins(60 * 24 + 1);
+        printFormatMins(5 * 60 * 24 - 1);
+        printFormatMins(5 * 60 * 24);
+        printFormatMins(5 * 60 * 24 + 1);
+    }
+
+    /**
+     * Helper method for {@link #testFormatMins()}
+     *
+     * @param mins Minutes to test.
+     */
+    private void printFormatMins(long mins) {
+        System.out.println("For " + mins + " minutes: " + X.formatMins(mins));
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testDownloadUrlFromHttp() throws Exception {
+        GridEmbeddedHttpServer srv = null;
+        try {
+            String urlPath = "/testDownloadUrl/";
+            srv = GridEmbeddedHttpServer.startHttpServer().withFileDownloadingHandler(urlPath,
+                GridTestUtils.resolveGridGainPath("/modules/core/src/test/config/tests.properties"));
+
+            File file = new File(System.getProperty("java.io.tmpdir") + File.separator + "url-http.file");
+
+            file = U.downloadUrl(new URL(srv.getBaseUrl() + urlPath), file);
+
+            assert file.exists();
+            assert file.delete();
+        }
+        finally {
+            if (srv != null)
+                srv.stop(1);
+        }
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testDownloadUrlFromHttps() throws Exception {
+        GridEmbeddedHttpServer srv = null;
+        try {
+            String urlPath = "/testDownloadUrl/";
+            srv = GridEmbeddedHttpServer.startHttpsServer().withFileDownloadingHandler(urlPath,
+                GridTestUtils.resolveGridGainPath("modules/core/src/test/config/tests.properties"));
+
+            File file = new File(System.getProperty("java.io.tmpdir") + File.separator + "url-http.file");
+
+            file = U.downloadUrl(new URL(srv.getBaseUrl() + urlPath), file);
+
+            assert file.exists();
+            assert file.delete();
+        }
+        finally {
+            if (srv != null)
+                srv.stop(1);
+        }
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testDownloadUrlFromLocalFile() throws Exception {
+        File file = new File(System.getProperty("java.io.tmpdir") + File.separator + "url-http.file");
+
+        file = U.downloadUrl(
+            GridTestUtils.resolveGridGainPath("modules/core/src/test/config/tests.properties").toURI().toURL(), file);
+
+        assert file.exists();
+        assert file.delete();
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testOs() throws Exception {
+        System.out.println("OS string: " + U.osString());
+        System.out.println("JDK string: " + U.jdkString());
+        System.out.println("OS/JDK string: " + U.osJdkString());
+
+        System.out.println("Is Windows: " + U.isWindows());
+        System.out.println("Is Windows 95: " + U.isWindows95());
+        System.out.println("Is Windows 98: " + U.isWindows98());
+        System.out.println("Is Windows NT: " + U.isWindowsNt());
+        System.out.println("Is Windows 2000: " + U.isWindows2k());
+        System.out.println("Is Windows 2003: " + U.isWindows2003());
+        System.out.println("Is Windows XP: " + U.isWindowsXp());
+        System.out.println("Is Windows Vista: " + U.isWindowsVista());
+        System.out.println("Is Linux: " + U.isLinux());
+        System.out.println("Is Mac OS: " + U.isMacOs());
+        System.out.println("Is Netware: " + U.isNetWare());
+        System.out.println("Is Solaris: " + U.isSolaris());
+        System.out.println("Is Solaris SPARC: " + U.isSolarisSparc());
+        System.out.println("Is Solaris x86: " + U.isSolarisX86());
+        System.out.println("Is Windows7: " + U.isWindows7());
+        System.out.println("Is Sufficiently Tested OS: " + U.isSufficientlyTestedOs());
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testJavaSerialization() throws Exception {
+        ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
+        ObjectOutputStream objOut = new ObjectOutputStream(byteOut);
+
+        objOut.writeObject(new byte[] {1, 2, 3, 4, 5, 5});
+
+        objOut.flush();
+
+        byte[] sBytes = byteOut.toByteArray();
+
+        ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(sBytes));
+
+        in.readObject();
+    }
+
+    /**
+     *
+     */
+    public void testHidePassword() {
+        Collection<String> uriList = new ArrayList<>();
+
+        uriList.add("ftp://anonymous:111111;freq=5000@unknown.host:21/pub/gg-test");
+        uriList.add("ftp://anonymous:111111;freq=5000@localhost:21/pub/gg-test");
+
+        uriList.add("http://freq=5000@localhost/tasks");
+        uriList.add("http://freq=5000@unknownhost.host/tasks");
+
+        for (String uri : uriList)
+            X.println(uri + " -> " + U.hidePassword(uri));
+    }
+
+    /**
+     * Test job to test possible indefinite recursion in detecting peer deploy aware.
+     */
+    @SuppressWarnings({"UnusedDeclaration"})
+    private class SelfReferencedJob extends ComputeJobAdapter implements GridPeerDeployAware {
+        /** */
+        private SelfReferencedJob ref;
+
+        /** */
+        private SelfReferencedJob[] arr;
+
+        /** */
+        private Collection<SelfReferencedJob> col;
+
+        /** */
+        private ClusterNode node;
+
+        /** */
+        private ClusterGroup subGrid;
+
+        /**
+         * @param ignite Grid.
+         */
+        private SelfReferencedJob(Ignite ignite) {
+            node = ignite.cluster().localNode();
+
+            ref = this;
+
+            arr = new SelfReferencedJob[] {this, this};
+
+            col = Arrays.asList(this, this, this);
+
+            GridTestKernalContext ctx = newContext();
+
+            subGrid = ignite.cluster().forNodes(Collections.singleton(node));
+        }
+
+        /** {@inheritDoc} */
+        @Override public Object execute() {
+            return null;
+        }
+
+        /** {@inheritDoc} */
+        @Override public Class<?> deployClass() {
+            return getClass();
+        }
+
+        /** {@inheritDoc} */
+        @Override public ClassLoader classLoader() {
+            return getClass().getClassLoader();
+        }
+    }
+
+    /**
+     * @throws Exception If test fails.
+     */
+    public void testDetectPeerDeployAwareInfiniteRecursion() throws Exception {
+        Ignite g = startGrid(1);
+
+        try {
+            final SelfReferencedJob job = new SelfReferencedJob(g);
+
+            GridPeerDeployAware d = U.detectPeerDeployAware(U.peerDeployAware(job));
+
+            assert d != null;
+            assert SelfReferencedJob.class == d.deployClass();
+            assert d.classLoader() == SelfReferencedJob.class.getClassLoader();
+        }
+        finally {
+            stopGrid(1);
+        }
+    }
+
+    /**
+     * @param r Runnable.
+     * @return Job created for given runnable.
+     */
+    private static ComputeJob job(final Runnable r) {
+        return new ComputeJobAdapter() {
+            @Nullable @Override public Object execute() {
+                r.run();
+
+                return null;
+            }
+        };
+    }
+
+    /**
+     *
+     * @throws Exception If failed.
+     */
+    public void testParseIsoDate() throws Exception {
+        Calendar cal = U.parseIsoDate("2009-12-08T13:30:44.000Z");
+
+        assert cal.get(Calendar.YEAR) == 2009;
+        assert cal.get(Calendar.MONTH) == 11;
+        assert cal.get(Calendar.DAY_OF_MONTH) == 8;
+        assert cal.get(Calendar.HOUR_OF_DAY) == 13;
+        assert cal.get(Calendar.MINUTE) == 30;
+        assert cal.get(Calendar.SECOND) == 44;
+        assert cal.get(Calendar.MILLISECOND) == 0;
+        assert cal.get(Calendar.ZONE_OFFSET) == 0 :
+            "Unexpected value: " + cal.get(Calendar.ZONE_OFFSET);
+
+        cal = U.parseIsoDate("2009-12-08T13:30:44.000+03:00");
+
+        assert cal.get(Calendar.YEAR) == 2009;
+        assert cal.get(Calendar.MONTH) == 11;
+        assert cal.get(Calendar.DAY_OF_MONTH) == 8;
+        assert cal.get(Calendar.HOUR_OF_DAY) == 13;
+        assert cal.get(Calendar.MINUTE) == 30;
+        assert cal.get(Calendar.SECOND) == 44;
+        assert cal.get(Calendar.MILLISECOND) == 0;
+        assert cal.get(Calendar.ZONE_OFFSET) == 3 * 60 * 60 * 1000 :
+            "Unexpected value: " + cal.get(Calendar.ZONE_OFFSET);
+
+        cal = U.parseIsoDate("2009-12-08T13:30:44.000+0300");
+
+        assert cal.get(Calendar.YEAR) == 2009;
+        assert cal.get(Calendar.MONTH) == 11;
+        assert cal.get(Calendar.DAY_OF_MONTH) == 8;
+        assert cal.get(Calendar.HOUR_OF_DAY) == 13;
+        assert cal.get(Calendar.MINUTE) == 30;
+        assert cal.get(Calendar.SECOND) == 44;
+        assert cal.get(Calendar.MILLISECOND) == 0;
+        assert cal.get(Calendar.ZONE_OFFSET) == 3 * 60 * 60 * 1000 :
+            "Unexpected value: " + cal.get(Calendar.ZONE_OFFSET);
+    }
+
+    /**
+     * @throws Exception If test failed.
+     */
+    public void testPeerDeployAware0() throws Exception {
+        Collection<Object> col = new ArrayList<>();
+
+        col.add(null);
+        col.add(null);
+        col.add(null);
+
+        GridPeerDeployAware pda = U.peerDeployAware0(col);
+
+        assert pda != null;
+
+        col.clear();
+
+        col.add(null);
+
+        pda = U.peerDeployAware0(col);
+
+        assert pda != null;
+
+        col.clear();
+
+        pda = U.peerDeployAware0(col);
+
+        assert pda != null;
+
+        col.clear();
+
+        col.add(null);
+        col.add("Test");
+        col.add(null);
+
+        pda = U.peerDeployAware0(col);
+
+        assert pda != null;
+
+        col.clear();
+
+        col.add("Test");
+
+        pda = U.peerDeployAware0(col);
+
+        assert pda != null;
+
+        col.clear();
+
+        col.add("Test");
+        col.add(this);
+
+        pda = U.peerDeployAware0(col);
+
+        assert pda != null;
+
+        col.clear();
+
+        col.add(null);
+        col.add("Test");
+        col.add(null);
+        col.add(this);
+        col.add(null);
+
+        pda = U.peerDeployAware0(col);
+
+        assert pda != null;
+    }
+
+    /**
+     * Test UUID to bytes array conversion.
+     */
+    public void testsGetBytes() {
+        for (int i = 0; i < 100; i++) {
+            UUID id = UUID.randomUUID();
+
+            byte[] bytes = IgniteUtils.uuidToBytes(id);
+            BigInteger n = new BigInteger(bytes);
+
+            assert n.shiftRight(Long.SIZE).longValue() == id.getMostSignificantBits();
+            assert n.longValue() == id.getLeastSignificantBits();
+        }
+    }
+
+    /**
+     *
+     */
+    @SuppressWarnings("ZeroLengthArrayAllocation")
+    public void testReadByteArray() {
+        assertTrue(Arrays.equals(new byte[0], U.readByteArray(ByteBuffer.allocate(0))));
+        assertTrue(Arrays.equals(new byte[0], U.readByteArray(ByteBuffer.allocate(0), ByteBuffer.allocate(0))));
+
+        Random rnd = new Random();
+
+        byte[] bytes = new byte[13];
+
+        rnd.nextBytes(bytes);
+
+        assertTrue(Arrays.equals(bytes, U.readByteArray(ByteBuffer.wrap(bytes))));
+        assertTrue(Arrays.equals(bytes, U.readByteArray(ByteBuffer.wrap(bytes), ByteBuffer.allocate(0))));
+        assertTrue(Arrays.equals(bytes, U.readByteArray(ByteBuffer.allocate(0), ByteBuffer.wrap(bytes))));
+
+        for (int i = 0; i < 1000; i++) {
+            int n = rnd.nextInt(100);
+
+            bytes = new byte[n];
+
+            rnd.nextBytes(bytes);
+
+            ByteBuffer[] bufs = new ByteBuffer[1 + rnd.nextInt(10)];
+
+            int x = 0;
+
+            for (int j = 0; j < bufs.length - 1; j++) {
+                int size = x == n ? 0 : rnd.nextInt(n - x);
+
+                bufs[j] = (ByteBuffer)ByteBuffer.wrap(bytes).position(x).limit(x += size);
+            }
+
+            bufs[bufs.length - 1] = (ByteBuffer)ByteBuffer.wrap(bytes).position(x).limit(n);
+
+            assertTrue(Arrays.equals(bytes, U.readByteArray(bufs)));
+        }
+    }
+
+    /**
+     *
+     */
+    @SuppressWarnings("ZeroLengthArrayAllocation")
+    public void testHashCodeFromBuffers() {
+        assertEquals(Arrays.hashCode(new byte[0]), U.hashCode(ByteBuffer.allocate(0)));
+        assertEquals(Arrays.hashCode(new byte[0]), U.hashCode(ByteBuffer.allocate(0), ByteBuffer.allocate(0)));
+
+        Random rnd = new Random();
+
+        for (int i = 0; i < 1000; i++) {
+            ByteBuffer[] bufs = new ByteBuffer[1 + rnd.nextInt(15)];
+
+            for (int j = 0; j < bufs.length; j++) {
+                byte[] bytes = new byte[rnd.nextInt(25)];
+
+                rnd.nextBytes(bytes);
+
+                bufs[j] = ByteBuffer.wrap(bytes);
+            }
+
+            assertEquals(U.hashCode(bufs), Arrays.hashCode(U.readByteArray(bufs)));
+        }
+    }
+
+    /**
+     * Test annotation look up.
+     */
+    public void testGetAnnotations() {
+        assert U.getAnnotation(A1.class, Ann1.class) != null;
+        assert U.getAnnotation(A2.class, Ann1.class) != null;
+
+        assert U.getAnnotation(A1.class, Ann2.class) != null;
+        assert U.getAnnotation(A2.class, Ann2.class) != null;
+
+        assert U.getAnnotation(A3.class, Ann1.class) == null;
+        assert U.getAnnotation(A3.class, Ann2.class) != null;
+    }
+
+    /**
+     *
+     */
+    public void testUnique() {
+        int[][][] arrays = new int[][][]{
+            new int[][]{EMPTY, EMPTY, EMPTY},
+            new int[][]{new int[]{1, 2, 3}, EMPTY, new int[]{1, 2, 3}},
+            new int[][]{new int[]{1, 2, 3}, new int[]{1, 2, 3}, new int[]{1, 2, 3}},
+            new int[][]{new int[]{1, 2, 3}, new int[]{1, 3}, new int[]{1, 2, 3}},
+            new int[][]{new int[]{1, 2, 30, 40, 50}, new int[]{2, 40}, new int[]{1, 2, 30, 40, 50}},
+            new int[][]{new int[]{-100, -13, 1, 2, 5, 30, 40, 50}, new int[]{1, 2, 6, 100, 113},
+                new int[]{-100, -13, 1, 2, 5, 6, 30, 40, 50, 100, 113}}
+        };
+
+        for (int[][] a : arrays) {
+            assertArrayEquals(a[2], U.unique(a[0], a[0].length, a[1], a[1].length));
+
+            assertArrayEquals(a[2], U.unique(a[1], a[1].length, a[0], a[0].length));
+        }
+
+        assertArrayEquals(new int[]{1, 2, 3, 4}, U.unique(new int[]{1, 2, 3, 8}, 3, new int[]{2, 4, 5}, 2));
+        assertArrayEquals(new int[]{2, 4}, U.unique(new int[]{1, 2, 3, 8}, 0, new int[]{2, 4, 5}, 2));
+        assertArrayEquals(new int[]{1, 2, 4, 5}, U.unique(new int[]{1, 2, 3, 8}, 2, new int[]{2, 4, 5, 6}, 3));
+        assertArrayEquals(new int[]{1, 2}, U.unique(new int[]{1, 2, 3, 8}, 2, new int[]{2, 4, 5, 6}, 0));
+    }
+
+    /**
+     *
+     */
+    public void testDifference() {
+        int[][][] arrays = new int[][][]{
+            new int[][]{EMPTY, EMPTY, EMPTY},
+            new int[][]{new int[]{1, 2, 3}, EMPTY, new int[]{1, 2, 3}},
+            new int[][]{EMPTY, new int[]{1, 2, 3}, EMPTY},
+            new int[][]{new int[]{1, 2, 3}, new int[]{1, 2, 3}, EMPTY},
+            new int[][]{new int[]{-100, -50, 1, 2, 3}, new int[]{-50, -1, 1, 3}, new int[]{-100, 2}},
+            new int[][]{new int[]{-100, 1, 2, 30, 40, 50}, new int[]{2, 40}, new int[]{-100, 1, 30, 50}},
+            new int[][]{new int[]{-1, 1, 2, 30, 40, 50}, new int[]{1, 2, 100, 113}, new int[]{-1, 30, 40, 50}}
+        };
+
+        for (int[][] a : arrays)
+            assertArrayEquals(a[2], U.difference(a[0], a[0].length, a[1], a[1].length));
+
+        assertArrayEquals(new int[]{1, 2}, U.difference(new int[]{1, 2, 30, 40, 50}, 3, new int[]{30, 40}, 2));
+        assertArrayEquals(EMPTY, U.difference(new int[]{1, 2, 30, 40, 50}, 0, new int[]{30, 40}, 2));
+        assertArrayEquals(new int[]{1, 2, 40}, U.difference(new int[]{1, 2, 30, 40, 50}, 4, new int[]{30, 40}, 1));
+        assertArrayEquals(new int[]{1, 2, 30, 40}, U.difference(new int[]{1, 2, 30, 40, 50}, 4, new int[]{30, 40}, 0));
+    }
+
+    /**
+     *
+     */
+    public void testCopyIfExceeded() {
+        int[][] arrays = new int[][]{new int[]{13, 14, 17, 11}, new int[]{13}, EMPTY};
+
+        for (int[] a : arrays) {
+            int[] b = Arrays.copyOf(a, a.length);
+
+            assertEquals(a, U.copyIfExceeded(a, a.length));
+            assertArrayEquals(b, U.copyIfExceeded(a, a.length));
+
+            for (int j = 0; j < a.length - 1; j++)
+                assertArrayEquals(Arrays.copyOf(b, j), U.copyIfExceeded(a, j));
+        }
+    }
+
+    /**
+     *
+     */
+    public void testIsIncreasingArray() {
+        assertTrue(U.isIncreasingArray(EMPTY, 0));
+        assertTrue(U.isIncreasingArray(new int[]{Integer.MIN_VALUE, -10, 1, 13, Integer.MAX_VALUE}, 5));
+        assertTrue(U.isIncreasingArray(new int[]{1, 2, 3, -1, 5}, 0));
+        assertTrue(U.isIncreasingArray(new int[]{1, 2, 3, -1, 5}, 3));
+        assertFalse(U.isIncreasingArray(new int[]{1, 2, 3, -1, 5}, 4));
+        assertFalse(U.isIncreasingArray(new int[]{1, 2, 3, -1, 5}, 5));
+        assertFalse(U.isIncreasingArray(new int[]{1, 2, 3, 3, 5}, 4));
+        assertTrue(U.isIncreasingArray(new int[]{1, -1}, 1));
+        assertFalse(U.isIncreasingArray(new int[]{1, -1}, 2));
+        assertTrue(U.isIncreasingArray(new int[]{13, 13, 13}, 1));
+        assertFalse(U.isIncreasingArray(new int[]{13, 13, 13}, 2));
+        assertFalse(U.isIncreasingArray(new int[]{13, 13, 13}, 3));
+    }
+
+    /**
+     *
+     */
+    public void testIsNonDecreasingArray() {
+        assertTrue(U.isNonDecreasingArray(EMPTY, 0));
+        assertTrue(U.isNonDecreasingArray(new int[]{Integer.MIN_VALUE, -10, 1, 13, Integer.MAX_VALUE}, 5));
+        assertTrue(U.isNonDecreasingArray(new int[]{1, 2, 3, -1, 5}, 0));
+        assertTrue(U.isNonDecreasingArray(new int[]{1, 2, 3, -1, 5}, 3));
+        assertFalse(U.isNonDecreasingArray(new int[]{1, 2, 3, -1, 5}, 4));
+        assertFalse(U.isNonDecreasingArray(new int[]{1, 2, 3, -1, 5}, 5));
+        assertTrue(U.isNonDecreasingArray(new int[]{1, 2, 3, 3, 5}, 4));
+        assertTrue(U.isNonDecreasingArray(new int[]{1, -1}, 1));
+        assertFalse(U.isNonDecreasingArray(new int[]{1, -1}, 2));
+        assertTrue(U.isNonDecreasingArray(new int[]{13, 13, 13}, 1));
+        assertTrue(U.isNonDecreasingArray(new int[]{13, 13, 13}, 2));
+        assertTrue(U.isNonDecreasingArray(new int[]{13, 13, 13}, 3));
+    }
+
+    /**
+     * Test InetAddress Comparator.
+     */
+    public void testInetAddressesComparator() {
+        List<InetSocketAddress> ips = new ArrayList<InetSocketAddress>() {
+            {
+                add(new InetSocketAddress("127.0.0.1", 1));
+                add(new InetSocketAddress("10.0.0.1", 1));
+                add(new InetSocketAddress("172.16.0.1", 1));
+                add(new InetSocketAddress("192.168.0.1", 1));
+                add(new InetSocketAddress("100.0.0.1", 1));
+                add(new InetSocketAddress("XXX", 1));
+            }
+        };
+
+        Collections.sort(ips, U.inetAddressesComparator(true));
+
+        assertTrue(ips.get(0).getAddress().isLoopbackAddress());
+        assertTrue(ips.get(ips.size() - 1).isUnresolved());
+
+        Collections.sort(ips, U.inetAddressesComparator(false));
+
+        assertTrue(ips.get(ips.size() - 2).getAddress().isLoopbackAddress());
+        assertTrue(ips.get(ips.size() - 1).isUnresolved());
+    }
+
+
+    public void testMD5Calculation() throws Exception {
+        String md5 = IgniteUtils.calculateMD5(new ByteArrayInputStream("Corrupted information.".getBytes()));
+
+        assertEquals("d7dbe555be2eee7fa658299850169fa1", md5);
+    }
+
+    /**
+     * Test enum.
+     */
+    private enum TestEnum {
+        E1,
+        E2,
+        E3
+    }
+
+    @Documented @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE)
+    private @interface Ann1 {}
+
+    @Documented @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE)
+    private @interface Ann2 {}
+
+    private static class A1 implements I3, I5 {}
+    private static class A2 extends A1 {}
+    private static class A3 implements I5 {}
+
+    @Ann1 private interface I1 {}
+    private interface I2 extends I1 {}
+    private interface I3 extends I2 {}
+    @Ann2 private interface I4 {}
+    private interface I5 extends I4 {}
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fc768b83/modules/core/src/test/java/org/apache/ignite/lang/GridSetWrapperSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/lang/GridSetWrapperSelfTest.java b/modules/core/src/test/java/org/apache/ignite/lang/GridSetWrapperSelfTest.java
index c0c0d66..07a78ea 100644
--- a/modules/core/src/test/java/org/apache/ignite/lang/GridSetWrapperSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/lang/GridSetWrapperSelfTest.java
@@ -120,7 +120,7 @@ public class GridSetWrapperSelfTest extends GridCommonAbstractTest {
         set.add("v4");
         set.add("v5");
 
-        set.removeAll(GridUtils.addAll(new HashSet<String>(), "v2", "v4", "v5"));
+        set.removeAll(IgniteUtils.addAll(new HashSet<String>(), "v2", "v4", "v5"));
 
         assertEquals(2, set.size());
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fc768b83/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteUtilSelfTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteUtilSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteUtilSelfTestSuite.java
index 87d38b7..6564b6f 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteUtilSelfTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteUtilSelfTestSuite.java
@@ -42,7 +42,7 @@ public class IgniteUtilSelfTestSuite extends TestSuite {
         TestSuite suite = new TestSuite("Ignite Util Test Suite");
 
         suite.addTestSuite(GridThreadPoolExecutorServiceSelfTest.class);
-        suite.addTestSuite(GridUtilsSelfTest.class);
+        suite.addTestSuite(IgniteUtilsSelfTest.class);
         suite.addTestSuite(GridSpinReadWriteLockSelfTest.class);
         suite.addTestSuite(GridQueueSelfTest.class);
         suite.addTestSuite(GridStringBuilderFactorySelfTest.class);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fc768b83/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/VisorConsole.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/VisorConsole.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/VisorConsole.scala
index 4f74794..d983025 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/VisorConsole.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/VisorConsole.scala
@@ -18,7 +18,7 @@
 package org.apache.ignite.visor.commands
 
 import org.apache.ignite.internal.GridProductImpl
-import org.apache.ignite.internal.util.GridUtils
+import org.apache.ignite.internal.util.IgniteUtils
 import org.apache.ignite.internal.util.typedef.internal.U
 import org.apache.ignite.internal.util.scala.impl
 
@@ -94,7 +94,7 @@ object VisorConsole extends App {
     customizeUI()
 
     // Wrap line symbol for user input.
-    private val wrapLine = if (GridUtils.isWindows) "^" else "\\"
+    private val wrapLine = if (IgniteUtils.isWindows) "^" else "\\"
 
     private val emptyArg = "^([a-zA-z!?]+)$".r
     private val varArg = "^([a-zA-z!?]+)\\s+(.+)$".r
@@ -270,7 +270,7 @@ private[commands] class VisorFileNameCompleter extends Completer {
             case emptyStr if emptyStr.trim == "" => ""
             case str =>
                 // replace wrong '/' on windows.
-                val translated = if (GridUtils.isWindows) str.replace('/', '\\') else str
+                val translated = if (IgniteUtils.isWindows) str.replace('/', '\\') else str
 
                 // line before cursor.
                 val left = translated.substring(0, cursor)

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fc768b83/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/alert/VisorAlertCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/alert/VisorAlertCommand.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/alert/VisorAlertCommand.scala
index 73c6e83..1899ca4 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/alert/VisorAlertCommand.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/alert/VisorAlertCommand.scala
@@ -17,7 +17,7 @@
 
 package org.apache.ignite.visor.commands.alert
 
-import org.apache.ignite.internal.util.{GridUtils => U}
+import org.apache.ignite.internal.util.{IgniteUtils => U}
 import org.apache.ignite.internal.util.lang.{GridFunc => F}
 
 import org.apache.ignite._
@@ -278,7 +278,7 @@ class VisorAlertCommand {
                             // Grid-wide metrics (not node specific).
                             case "cc" if v != null => gf = makeGridFilter(v, gf, grid.metrics().getTotalCpus)
                             case "nc" if v != null => gf = makeGridFilter(v, gf, grid.nodes().size)
-                            case "hc" if v != null => gf = makeGridFilter(v, gf, U.neighborhood(grid.nodes()).size)
+                            case "hc" if v != null => gf = makeGridFilter(v, gf, IgniteUtils.neighborhood(grid.nodes()).size)
                             case "cl" if v != null => gf = makeGridFilter(v, gf,
                                 () => (grid.metrics().getAverageCpuLoad * 100).toLong)
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fc768b83/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/config/VisorConfigurationCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/config/VisorConfigurationCommand.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/config/VisorConfigurationCommand.scala
index 2221e6b..4df0c35 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/config/VisorConfigurationCommand.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/config/VisorConfigurationCommand.scala
@@ -17,7 +17,7 @@
 
 package org.apache.ignite.visor.commands.config
 
-import org.apache.ignite.internal.util.GridUtils
+import org.apache.ignite.internal.util.IgniteUtils
 import org.apache.ignite.internal.visor.node.VisorNodeConfigurationCollectorTask
 
 import org.apache.ignite._
@@ -104,7 +104,7 @@ class VisorConfigurationCommand {
      * @return String.
      */
     private def arr2Str[T: ClassTag](arr: Array[T]): String = {
-        if (arr != null && arr.length > 0) GridUtils.compact(arr.mkString(", ")) else DFLT
+        if (arr != null && arr.length > 0) IgniteUtils.compact(arr.mkString(", ")) else DFLT
     }
 
     /**
@@ -352,7 +352,7 @@ class VisorConfigurationCommand {
 
             val evtsT = VisorTextTable()
 
-            val inclEvtTypes = Option(cfg.includeEventTypes()).fold(DFLT)(et => arr2Str(et.map(GridUtils.gridEventName)))
+            val inclEvtTypes = Option(cfg.includeEventTypes()).fold(DFLT)(et => arr2Str(et.map(IgniteUtils.gridEventName)))
 
             evtsT += ("Included event types", inclEvtTypes)
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fc768b83/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/deploy/VisorDeployCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/deploy/VisorDeployCommand.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/deploy/VisorDeployCommand.scala
index 4f189f2..08456d7 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/deploy/VisorDeployCommand.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/deploy/VisorDeployCommand.scala
@@ -17,7 +17,7 @@
 
 package org.apache.ignite.visor.commands.deploy
 
-import org.apache.ignite.internal.util.GridUtils
+import org.apache.ignite.internal.util.IgniteUtils
 import org.apache.ignite.internal.util.io.GridFilenameUtils
 import org.apache.ignite.internal.util.typedef.X
 
@@ -184,7 +184,7 @@ private case class VisorCopier(
                 ch.connect()
 
                 // Added to skip login message.
-                GridUtils.sleep(1000)
+                IgniteUtils.sleep(1000)
 
                 val writer = new PrintStream(ch.getOutputStream, true)
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fc768b83/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/disco/VisorDiscoveryCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/disco/VisorDiscoveryCommand.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/disco/VisorDiscoveryCommand.scala
index 3f9dea0..fc0f35d 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/disco/VisorDiscoveryCommand.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/disco/VisorDiscoveryCommand.scala
@@ -17,7 +17,7 @@
 
 package org.apache.ignite.visor.commands.disco
 
-import org.apache.ignite.internal.util.GridUtils
+import org.apache.ignite.internal.util.IgniteUtils
 import org.apache.ignite.internal.util.typedef.internal.U
 import org.apache.ignite.internal.visor.event.VisorGridDiscoveryEvent
 import org.apache.ignite.internal.visor.node.VisorNodeEventsCollectorTask
@@ -226,7 +226,7 @@ class VisorDiscoveryCommand {
         val nodeStartTime = node.metrics().getStartTime
 
         if (nodeStartTime > System.currentTimeMillis() - tmFrame) {
-            val root = new VisorGridDiscoveryEvent(EVT_NODE_JOINED, null, GridUtils.gridEventName(EVT_NODE_JOINED),
+            val root = new VisorGridDiscoveryEvent(EVT_NODE_JOINED, null, IgniteUtils.gridEventName(EVT_NODE_JOINED),
                 node.id(), nodeStartTime, "", "", node.id, node.addresses().head, node.isDaemon)
 
             evts = Seq(root) ++ evts

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fc768b83/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/events/VisorEventsCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/events/VisorEventsCommand.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/events/VisorEventsCommand.scala
index 24b9b94..79a98e5 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/events/VisorEventsCommand.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/events/VisorEventsCommand.scala
@@ -17,7 +17,7 @@
 
 package org.apache.ignite.visor.commands.events
 
-import org.apache.ignite.internal.util.GridUtils
+import org.apache.ignite.internal.util.IgniteUtils
 import org.apache.ignite.internal.util.typedef.internal.U
 import org.apache.ignite.internal.visor.event.VisorGridEvent
 import org.apache.ignite.internal.visor.node.VisorNodeEventsCollectorTask
@@ -395,7 +395,7 @@ class VisorEventsCommand {
             all #= ("Timestamp", "Description")
 
             sorted.take(cnt).foreach(evt =>
-                all += (formatDateTime(evt.timestamp()), GridUtils.compact(evt.shortDisplay))
+                all += (formatDateTime(evt.timestamp()), IgniteUtils.compact(evt.shortDisplay))
             )
 
             all.render()

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fc768b83/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/node/VisorNodeCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/node/VisorNodeCommand.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/node/VisorNodeCommand.scala
index 8083ce9..475f916 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/node/VisorNodeCommand.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/node/VisorNodeCommand.scala
@@ -18,7 +18,7 @@
 package org.apache.ignite.visor.commands.node
 
 import org.apache.ignite.internal.GridNodeAttributes
-import org.apache.ignite.internal.util.GridUtils
+import org.apache.ignite.internal.util.IgniteUtils
 import org.apache.ignite.internal.util.typedef.internal.U
 import GridNodeAttributes._
 import org.apache.ignite.internal.util.lang.{GridFunc => F}
@@ -175,7 +175,7 @@ class VisorNodeCommand {
 
                         val gridName: String = node.attribute(ATTR_GRID_NAME)
 
-                        val ver = GridUtils.productVersion(node)
+                        val ver = IgniteUtils.productVersion(node)
                         val verStr = ver.major() + "." + ver.minor() + "." + ver.maintenance() +
                             (if (F.isEmpty(ver.stage())) "" else "-" + ver.stage())
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fc768b83/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/start/VisorStartCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/start/VisorStartCommand.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/start/VisorStartCommand.scala
index 7f4ab1f..e91dd26 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/start/VisorStartCommand.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/start/VisorStartCommand.scala
@@ -22,7 +22,7 @@ import org.apache.ignite._
 import java.io._
 import java.util.concurrent._
 
-import org.apache.ignite.internal.util.GridUtils
+import org.apache.ignite.internal.util.IgniteUtils
 import org.apache.ignite.internal.util.typedef.internal.U
 import org.apache.ignite.visor.VisorTag
 import org.apache.ignite.visor.commands.{VisorConsoleCommand, VisorTextTable}
@@ -311,7 +311,7 @@ class VisorStartCommand {
 
                 errT #= ("Host", "Error")
 
-                res.filter(!_.ok) foreach (r => { errT += (r.host, r.errMsg.replace("\t", " ").split(GridUtils.nl()).toSeq) })
+                res.filter(!_.ok) foreach (r => { errT += (r.host, r.errMsg.replace("\t", " ").split(IgniteUtils.nl()).toSeq) })
 
                 errT.render()
             }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fc768b83/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/tasks/VisorTasksCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/tasks/VisorTasksCommand.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/tasks/VisorTasksCommand.scala
index be1b9f1..3486b95 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/tasks/VisorTasksCommand.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/tasks/VisorTasksCommand.scala
@@ -17,7 +17,7 @@
 
 package org.apache.ignite.visor.commands.tasks
 
-import org.apache.ignite.internal.util.GridUtils
+import org.apache.ignite.internal.util.IgniteUtils
 import org.apache.ignite.internal.util.typedef.internal.U
 import org.apache.ignite.internal.visor.event.{VisorGridEvent, VisorGridJobEvent, VisorGridTaskEvent}
 import org.apache.ignite.internal.visor.node.VisorNodeEventsCollectorTask
@@ -76,7 +76,7 @@ private case class VisorExecution(
      * ID8 form of task execution ID.
      */
     lazy val id8: String =
-        GridUtils.id8(id)
+        IgniteUtils.id8(id)
 
     /**
      * ID8 of the task execution + its associated variable.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fc768b83/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/top/VisorTopologyCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/top/VisorTopologyCommand.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/top/VisorTopologyCommand.scala
index 7648ea1..9f6b637 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/top/VisorTopologyCommand.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/top/VisorTopologyCommand.scala
@@ -18,7 +18,7 @@
 package org.apache.ignite.visor.commands.top
 
 import org.apache.ignite.internal.GridNodeAttributes
-import org.apache.ignite.internal.util.GridUtils
+import org.apache.ignite.internal.util.IgniteUtils
 import GridNodeAttributes._
 import org.apache.ignite.internal.util.typedef._
 
@@ -275,7 +275,7 @@ class VisorTopologyCommand {
             nl()
         }
 
-        val neighborhood = GridUtils.neighborhood(nodes)
+        val neighborhood = IgniteUtils.neighborhood(nodes)
 
         val hostsT = VisorTextTable()
 
@@ -336,7 +336,7 @@ class VisorTopologyCommand {
 
         val sumT = VisorTextTable()
 
-        sumT += ("Total hosts", GridUtils.neighborhood(grid.nodes()).size)
+        sumT += ("Total hosts", IgniteUtils.neighborhood(grid.nodes()).size)
         sumT += ("Total nodes", grid.nodes().size)
         sumT += ("Total CPUs", m.getTotalCpus)
         sumT += ("Avg. CPU load", safePercent(m.getAverageCpuLoad * 100))

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fc768b83/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/vvm/VisorVvmCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/vvm/VisorVvmCommand.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/vvm/VisorVvmCommand.scala
index 733cfee..a36762a 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/vvm/VisorVvmCommand.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/vvm/VisorVvmCommand.scala
@@ -18,7 +18,7 @@
 package org.apache.ignite.visor.commands.vvm
 
 import org.apache.ignite.internal.GridNodeAttributes
-import org.apache.ignite.internal.util.GridUtils
+import org.apache.ignite.internal.util.IgniteUtils
 import org.apache.ignite.internal.util.typedef.internal.U
 import GridNodeAttributes._
 import org.apache.ignite.internal.visor.util.{VisorTaskUtils => TU}
@@ -120,7 +120,7 @@ class VisorVvmCommand {
 
             var vvmCmd: String = null
 
-            val ext = if (GridUtils.isWindows) ".exe" else ""
+            val ext = if (IgniteUtils.isWindows) ".exe" else ""
 
             val fs = File.separator
 
@@ -195,7 +195,7 @@ class VisorVvmCommand {
 
             val neighbors = grid.forHost(grid.localNode).nodes()
 
-            if (GridUtils.isWindows)
+            if (IgniteUtils.isWindows)
                 vvmCmd = "cmd /c \"%s\"".format(vvmCmd)
 
             for (node <- nodes if !neighbors.contains(node)) {
@@ -236,7 +236,7 @@ class VisorVvmCommand {
      * @param vvmCmd VisualVM command.
      */
     private def vvmCommandArray(vvmCmd: String): Array[String] = {
-        if (GridUtils.isWindows) Array("cmd", "/c", vvmCmd) else Array(vvmCmd)
+        if (IgniteUtils.isWindows) Array("cmd", "/c", vvmCmd) else Array(vvmCmd)
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fc768b83/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala
index cb7ce1b..764a347 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala
@@ -33,7 +33,7 @@ import org.apache.ignite.internal.GridNodeAttributes._
 import org.apache.ignite.internal.processors.spring.IgniteSpringProcessor
 import org.apache.ignite.internal.util.lang.{GridFunc => F}
 import org.apache.ignite.internal.util.typedef._
-import org.apache.ignite.internal.util.{GridConfigurationFinder, GridUtils}
+import org.apache.ignite.internal.util.{GridConfigurationFinder, IgniteUtils}
 import org.apache.ignite.internal.visor.VisorTaskArgument
 import org.apache.ignite.internal.visor.node.VisorNodeEventsCollectorTask
 import org.apache.ignite.internal.visor.node.VisorNodeEventsCollectorTask.VisorNodeEventsCollectorTaskArg
@@ -1475,7 +1475,7 @@ object visor extends VisorTag {
                         new URL(path)
                     catch {
                         case e: Exception =>
-                            val url = GridUtils.resolveGridGainUrl(path)
+                            val url = IgniteUtils.resolveGridGainUrl(path)
 
                             if (url == null)
                                 throw new IgniteCheckedException("GridGain configuration path is invalid: " + path, e)
@@ -1486,7 +1486,7 @@ object visor extends VisorTag {
                 // Add no-op logger to remove no-appender warning.
                 val log4jTup =
                     if (classOf[Ignition].getClassLoader.getResource("org/apache/log4j/Appender.class") != null)
-                        GridUtils.addLog4jNoOpLogger()
+                        IgniteUtils.addLog4jNoOpLogger()
                     else
                         null
 
@@ -1499,7 +1499,7 @@ object visor extends VisorTag {
                             "drSenderHubConfiguration", "drReceiverHubConfiguration").get1()
                     finally {
                         if (log4jTup != null)
-                            GridUtils.removeLog4jNoOpLogger(log4jTup)
+                            IgniteUtils.removeLog4jNoOpLogger(log4jTup)
                     }
 
                 if (cfgs == null || cfgs.isEmpty)
@@ -1903,7 +1903,7 @@ object visor extends VisorTag {
 
         t #= ("#", "Int./Ext. IPs", "Node ID8(@)", "OS", "CPUs", "MACs", "CPU Load")
 
-        val neighborhood = GridUtils.neighborhood(grid.nodes()).values().toIndexedSeq
+        val neighborhood = IgniteUtils.neighborhood(grid.nodes()).values().toIndexedSeq
 
         if (neighborhood.isEmpty) {
             warn("Topology is empty.")
@@ -2355,7 +2355,7 @@ object visor extends VisorTag {
         val folder = Option(f.getParent).getOrElse("")
         val fileName = f.getName
 
-        logFile = new File(GridUtils.resolveWorkDirectory(folder, false), fileName)
+        logFile = new File(IgniteUtils.resolveWorkDirectory(folder, false), fileName)
 
         logFile.createNewFile()
 
@@ -2449,7 +2449,7 @@ object visor extends VisorTag {
                                         out,
                                         formatDateTime(e.timestamp),
                                         nodeId8Addr(e.nid()),
-                                        GridUtils.compact(e.shortDisplay())
+                                        IgniteUtils.compact(e.shortDisplay())
                                     )
 
                                     if (EVTS_DISCOVERY.contains(e.typeId()))
@@ -2457,7 +2457,7 @@ object visor extends VisorTag {
                                 })
                             }
                             finally {
-                                GridUtils.close(out, null)
+                                IgniteUtils.close(out, null)
                             }
                         }
                     }
@@ -2522,7 +2522,7 @@ object visor extends VisorTag {
         }
 
         logText("H/N/C" + pipe +
-            GridUtils.neighborhood(grid.nodes()).size.toString.padTo(4, ' ') + pipe +
+            IgniteUtils.neighborhood(grid.nodes()).size.toString.padTo(4, ' ') + pipe +
             grid.nodes().size().toString.padTo(4, ' ') + pipe +
             m.getTotalCpus.toString.padTo(4, ' ') + pipe +
             bar(m.getAverageCpuLoad, m.getHeapMemoryUsed / m.getHeapMemoryMaximum) + pipe
@@ -2554,7 +2554,7 @@ object visor extends VisorTag {
                 case e: IOException => ()
             }
             finally {
-                GridUtils.close(out, null)
+                IgniteUtils.close(out, null)
             }
         }
     }


[33/50] [abbrv] incubator-ignite git commit: # sprint-1: fixed opt class names generator.

Posted by se...@apache.org.
# sprint-1: fixed opt class names generator.


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

Branch: refs/heads/ignite-sql
Commit: ff01e66e78cdf836066ec9aaf7eedf2f450c3929
Parents: c98118f
Author: AKuznetsov <ak...@gridgain.com>
Authored: Fri Jan 30 17:42:17 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Fri Jan 30 17:42:17 2015 +0700

----------------------------------------------------------------------
 .../marshaller/optimized/OptimizedClassNamesGenerator.java     | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ff01e66e/modules/tools/src/main/java/org/apache/ignite/tools/marshaller/optimized/OptimizedClassNamesGenerator.java
----------------------------------------------------------------------
diff --git a/modules/tools/src/main/java/org/apache/ignite/tools/marshaller/optimized/OptimizedClassNamesGenerator.java b/modules/tools/src/main/java/org/apache/ignite/tools/marshaller/optimized/OptimizedClassNamesGenerator.java
index 39e9a57..f135754 100644
--- a/modules/tools/src/main/java/org/apache/ignite/tools/marshaller/optimized/OptimizedClassNamesGenerator.java
+++ b/modules/tools/src/main/java/org/apache/ignite/tools/marshaller/optimized/OptimizedClassNamesGenerator.java
@@ -210,7 +210,7 @@ public class OptimizedClassNamesGenerator {
     private void checkSerialVersionUid(Class cls) {
         // Check only GridGain classes.
         if (cls.isEnum() || cls.getSimpleName().isEmpty() || (!cls.getName().startsWith("org.gridgain.grid") &&
-            !cls.getName().startsWith("org.gridgain.client")))
+            !cls.getName().startsWith("org.gridgain.client") && !cls.getName().startsWith("org.apache.ignite")))
             return;
 
         try {
@@ -285,14 +285,14 @@ public class OptimizedClassNamesGenerator {
         File dir;
 
         if (args.length > 0 && args[0] != null && !args[0].isEmpty())
-            dir = new File(args[0], "/org/gridgain/grid/marshaller/optimized");
+            dir = new File(args[0], "/org/apache/ignite/marshaller/optimized");
         else {
             String home = home();
 
             if (home == null)
                 throw new Exception("Failed to find GridGain home.");
 
-            dir = new File(home, "/os/modules/core/src/main/java/org/gridgain/grid/marshaller/optimized");
+            dir = new File(home, "/os/modules/core/src/main/java/org/apache/ignite/marshaller/optimized");
         }
 
         if (!dir.exists())


[04/50] [abbrv] incubator-ignite git commit: GridUtils -> IgniteUtils

Posted by se...@apache.org.
GridUtils -> IgniteUtils


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

Branch: refs/heads/ignite-sql
Commit: fc768b8318213841dec6d92d1fcd013a8052aaca
Parents: d6a720f
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Thu Jan 29 17:10:36 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Thu Jan 29 17:10:36 2015 +0300

----------------------------------------------------------------------
 .../spi/checkpoint/s3/S3CheckpointSpi.java      |    4 +-
 .../ClientPropertiesConfigurationSelfTest.java  |    4 +-
 .../apache/ignite/IgniteCheckedException.java   |    2 +-
 .../java/org/apache/ignite/IgniteException.java |    2 +-
 .../cache/GridCacheDeploymentManager.java       |    2 +-
 .../cache/GridCacheMvccCandidate.java           |    4 +-
 .../apache/ignite/internal/util/GridUtils.java  | 9141 ------------------
 .../ignite/internal/util/IgniteUtils.java       | 9141 ++++++++++++++++++
 .../internal/util/typedef/internal/U.java       |    4 +-
 .../visor/misc/VisorResolveHostNameTask.java    |    2 +-
 .../internal/visor/query/VisorQueryUtils.java   |    4 +-
 .../optimized/IgniteOptimizedMarshaller.java    |    2 +-
 .../IgniteExceptionHelpLinksSelfTest.java       |    3 +-
 .../GridEventStorageCheckAllEventsSelfTest.java |    2 +-
 .../cache/GridCacheAbstractMetricsSelfTest.java |   10 +-
 ...artupWithSpecifiedWorkDirectorySelfTest.java |    2 +-
 ...tartupWithUndefinedGridGainHomeSelfTest.java |    4 +-
 .../internal/util/GridTestClockTimer.java       |    6 +-
 .../ignite/internal/util/GridUtilsSelfTest.java |  728 --
 .../internal/util/IgniteUtilsSelfTest.java      |  728 ++
 .../ignite/lang/GridSetWrapperSelfTest.java     |    2 +-
 .../testsuites/IgniteUtilSelfTestSuite.java     |    2 +-
 .../ignite/visor/commands/VisorConsole.scala    |    6 +-
 .../commands/alert/VisorAlertCommand.scala      |    4 +-
 .../config/VisorConfigurationCommand.scala      |    6 +-
 .../commands/deploy/VisorDeployCommand.scala    |    4 +-
 .../commands/disco/VisorDiscoveryCommand.scala  |    4 +-
 .../commands/events/VisorEventsCommand.scala    |    4 +-
 .../visor/commands/node/VisorNodeCommand.scala  |    4 +-
 .../commands/start/VisorStartCommand.scala      |    4 +-
 .../commands/tasks/VisorTasksCommand.scala      |    4 +-
 .../commands/top/VisorTopologyCommand.scala     |    6 +-
 .../visor/commands/vvm/VisorVvmCommand.scala    |    8 +-
 .../scala/org/apache/ignite/visor/visor.scala   |   20 +-
 34 files changed, 9935 insertions(+), 9938 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fc768b83/modules/aws/src/main/java/org/apache/ignite/spi/checkpoint/s3/S3CheckpointSpi.java
----------------------------------------------------------------------
diff --git a/modules/aws/src/main/java/org/apache/ignite/spi/checkpoint/s3/S3CheckpointSpi.java b/modules/aws/src/main/java/org/apache/ignite/spi/checkpoint/s3/S3CheckpointSpi.java
index 8bc0fb7..5a977a1 100644
--- a/modules/aws/src/main/java/org/apache/ignite/spi/checkpoint/s3/S3CheckpointSpi.java
+++ b/modules/aws/src/main/java/org/apache/ignite/spi/checkpoint/s3/S3CheckpointSpi.java
@@ -338,8 +338,8 @@ public class S3CheckpointSpi extends IgniteSpiAdapter implements CheckpointSpi,
     /** {@inheritDoc} */
     @Override public void spiStop() throws IgniteSpiException {
         if (timeoutWrk != null) {
-            GridUtils.interrupt(timeoutWrk);
-            GridUtils.join(timeoutWrk, log);
+            IgniteUtils.interrupt(timeoutWrk);
+            IgniteUtils.join(timeoutWrk, log);
         }
 
         unregisterMBean();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fc768b83/modules/clients/src/test/java/org/apache/ignite/client/impl/ClientPropertiesConfigurationSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/apache/ignite/client/impl/ClientPropertiesConfigurationSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/client/impl/ClientPropertiesConfigurationSelfTest.java
index 31e8638..7b903fa 100644
--- a/modules/clients/src/test/java/org/apache/ignite/client/impl/ClientPropertiesConfigurationSelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/client/impl/ClientPropertiesConfigurationSelfTest.java
@@ -158,7 +158,7 @@ public class ClientPropertiesConfigurationSelfTest extends GridCommonAbstractTes
         while (it.hasNext())
             lines.add(it.nextLine().replace("#gg.client.", "gg.client."));
 
-        GridUtils.closeQuiet(in);
+        IgniteUtils.closeQuiet(in);
 
         File tmp = File.createTempFile(UUID.randomUUID().toString(), "properties");
 
@@ -188,7 +188,7 @@ public class ClientPropertiesConfigurationSelfTest extends GridCommonAbstractTes
 
         assertEquals(expLoaded, props.size());
 
-        GridUtils.closeQuiet(in);
+        IgniteUtils.closeQuiet(in);
 
         return props;
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fc768b83/modules/core/src/main/java/org/apache/ignite/IgniteCheckedException.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteCheckedException.java b/modules/core/src/main/java/org/apache/ignite/IgniteCheckedException.java
index 8313c40..399b067 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteCheckedException.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteCheckedException.java
@@ -20,7 +20,7 @@ package org.apache.ignite;
 import org.apache.ignite.internal.util.typedef.*;
 import org.jetbrains.annotations.*;
 
-import static org.apache.ignite.internal.util.GridUtils.*;
+import static org.apache.ignite.internal.util.IgniteUtils.*;
 
 /**
  * General grid exception. This exception is used to indicate any error condition

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fc768b83/modules/core/src/main/java/org/apache/ignite/IgniteException.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteException.java b/modules/core/src/main/java/org/apache/ignite/IgniteException.java
index b517dea..0f89743 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteException.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteException.java
@@ -20,7 +20,7 @@ package org.apache.ignite;
 import org.apache.ignite.internal.util.typedef.*;
 import org.jetbrains.annotations.*;
 
-import static org.apache.ignite.internal.util.GridUtils.*;
+import static org.apache.ignite.internal.util.IgniteUtils.*;
 
 /**
  * General grid exception. This exception is used to indicate any error condition

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fc768b83/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentManager.java
index d5ffb0d..c74d0b3 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentManager.java
@@ -485,7 +485,7 @@ public class GridCacheDeploymentManager<K, V> extends GridCacheSharedManagerAdap
                     allParticipants.put(nodeId, ldrVer);
 
                     if (added == null)
-                        added = GridUtils.newHashMap(participants.size());
+                        added = IgniteUtils.newHashMap(participants.size());
 
                     added.put(nodeId, ldrVer);
                 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fc768b83/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccCandidate.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccCandidate.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccCandidate.java
index d814430..43aa691 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccCandidate.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccCandidate.java
@@ -539,7 +539,7 @@ public class GridCacheMvccCandidate<K> implements Externalizable,
 
     /** {@inheritDoc} */
     @Override public void writeExternal(ObjectOutput out) throws IOException {
-        GridUtils.writeUuid(out, nodeId);
+        IgniteUtils.writeUuid(out, nodeId);
 
         CU.writeVersion(out, ver);
 
@@ -551,7 +551,7 @@ public class GridCacheMvccCandidate<K> implements Externalizable,
 
     /** {@inheritDoc} */
     @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
-        nodeId = GridUtils.readUuid(in);
+        nodeId = IgniteUtils.readUuid(in);
 
         ver = CU.readVersion(in);
 


[17/50] [abbrv] incubator-ignite git commit: Merge remote-tracking branch 'remotes/origin/sprint-1' into ignite-72-1

Posted by se...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e19655df/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
index 0000000,7854bd9..e29d04d
mode 000000,100644..100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
@@@ -1,0 -1,3322 +1,3322 @@@
+ /*
+  * 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;
+ 
+ import org.apache.ignite.*;
+ import org.apache.ignite.cache.*;
+ import org.apache.ignite.cache.affinity.*;
+ import org.apache.ignite.cluster.*;
+ import org.apache.ignite.configuration.*;
+ import org.apache.ignite.internal.processors.*;
+ import org.apache.ignite.internal.processors.cache.*;
+ import org.apache.ignite.internal.processors.portable.*;
+ import org.apache.ignite.internal.util.*;
+ import org.apache.ignite.lang.*;
+ import org.apache.ignite.lifecycle.*;
+ import org.apache.ignite.marshaller.*;
+ import org.apache.ignite.marshaller.optimized.*;
+ import org.apache.ignite.mxbean.*;
+ import org.apache.ignite.plugin.*;
+ import org.apache.ignite.internal.product.*;
+ import org.apache.ignite.spi.*;
+ import org.apache.ignite.spi.authentication.*;
+ import org.apache.ignite.spi.authentication.noop.*;
+ import org.apache.ignite.hadoop.*;
+ import org.apache.ignite.internal.managers.*;
+ import org.apache.ignite.internal.managers.checkpoint.*;
+ import org.apache.ignite.internal.managers.collision.*;
+ import org.apache.ignite.internal.managers.communication.*;
+ import org.apache.ignite.internal.managers.deployment.*;
+ import org.apache.ignite.internal.managers.discovery.*;
+ import org.apache.ignite.internal.managers.eventstorage.*;
+ import org.apache.ignite.internal.managers.failover.*;
+ import org.apache.ignite.internal.managers.indexing.*;
+ import org.apache.ignite.internal.managers.loadbalancer.*;
+ import org.apache.ignite.internal.managers.securesession.*;
+ import org.apache.ignite.internal.managers.security.*;
+ import org.apache.ignite.internal.managers.swapspace.*;
+ import org.apache.ignite.internal.processors.affinity.*;
+ import org.apache.ignite.internal.processors.clock.*;
+ import org.apache.ignite.internal.processors.closure.*;
+ import org.apache.ignite.internal.processors.continuous.*;
+ import org.apache.ignite.internal.processors.dataload.*;
+ import org.apache.ignite.internal.processors.email.*;
+ import org.apache.ignite.internal.processors.interop.*;
+ import org.apache.ignite.internal.processors.job.*;
+ import org.apache.ignite.internal.processors.jobmetrics.*;
+ import org.apache.ignite.internal.processors.license.*;
+ import org.apache.ignite.internal.processors.offheap.*;
+ import org.apache.ignite.internal.processors.plugin.*;
+ import org.apache.ignite.internal.processors.port.*;
+ import org.apache.ignite.internal.processors.query.*;
+ import org.apache.ignite.internal.processors.resource.*;
+ import org.apache.ignite.internal.processors.rest.*;
+ import org.apache.ignite.internal.processors.segmentation.*;
+ import org.apache.ignite.internal.processors.service.*;
+ import org.apache.ignite.internal.processors.session.*;
+ import org.apache.ignite.internal.processors.streamer.*;
+ import org.apache.ignite.internal.processors.task.*;
+ import org.apache.ignite.internal.processors.timeout.*;
+ import org.apache.ignite.plugin.security.*;
+ import org.apache.ignite.spi.securesession.noop.*;
+ import org.apache.ignite.internal.util.future.*;
+ import org.apache.ignite.internal.util.lang.*;
+ import org.apache.ignite.internal.util.nodestart.*;
+ import org.apache.ignite.internal.util.tostring.*;
+ import org.apache.ignite.internal.util.typedef.*;
+ import org.apache.ignite.internal.util.typedef.internal.*;
+ import org.jetbrains.annotations.*;
+ 
+ import javax.management.*;
+ import java.io.*;
+ import java.lang.management.*;
+ import java.lang.reflect.*;
+ import java.net.*;
+ import java.text.*;
+ import java.util.*;
+ import java.util.concurrent.*;
+ import java.util.concurrent.atomic.*;
+ 
+ import static org.apache.ignite.internal.GridKernalState.*;
+ import static org.apache.ignite.lifecycle.LifecycleEventType.*;
+ import static org.apache.ignite.IgniteSystemProperties.*;
+ import static org.apache.ignite.internal.IgniteComponentType.*;
+ import static org.apache.ignite.internal.GridNodeAttributes.*;
+ import static org.apache.ignite.internal.GridProductImpl.*;
+ import static org.apache.ignite.internal.processors.license.GridLicenseSubsystem.*;
+ import static org.apache.ignite.internal.util.nodestart.GridNodeStartUtils.*;
+ 
+ /**
+  * GridGain kernal.
+  * <p/>
+  * See <a href="http://en.wikipedia.org/wiki/Kernal">http://en.wikipedia.org/wiki/Kernal</a> for information on the
+  * misspelling.
+  */
+ public class IgniteKernal extends ClusterGroupAdapter implements IgniteEx, IgniteMXBean {
+     /** */
+     private static final long serialVersionUID = 0L;
+ 
+     /** Compatible versions. */
+     private static final String COMPATIBLE_VERS = GridProperties.get("gridgain.compatible.vers");
+ 
+     /** GridGain site that is shown in log messages. */
+     static final String SITE = "www.gridgain.com";
+ 
+     /** System line separator. */
+     private static final String NL = U.nl();
+ 
+     /** Periodic version check delay. */
+     private static final long PERIODIC_VER_CHECK_DELAY = 1000 * 60 * 60; // Every hour.
+ 
+     /** Periodic version check delay. */
+     private static final long PERIODIC_VER_CHECK_CONN_TIMEOUT = 10 * 1000; // 10 seconds.
+ 
+     /** Periodic version check delay. */
+     private static final long PERIODIC_LIC_CHECK_DELAY = 1000 * 60; // Every minute.
+ 
+     /** Periodic starvation check interval. */
+     private static final long PERIODIC_STARVATION_CHECK_FREQ = 1000 * 30;
+ 
+     /** Shutdown delay in msec. when license violation detected. */
+     private static final int SHUTDOWN_DELAY = 60 * 1000;
+ 
+     /** */
+     private IgniteConfiguration cfg;
+ 
+     /** */
+     @SuppressWarnings({"FieldAccessedSynchronizedAndUnsynchronized"})
+     @GridToStringExclude
+     private GridLoggerProxy log;
+ 
+     /** */
+     private String gridName;
+ 
+     /** */
+     @GridToStringExclude
+     private ObjectName kernalMBean;
+ 
+     /** */
+     @GridToStringExclude
+     private ObjectName locNodeMBean;
+ 
+     /** */
+     @GridToStringExclude
+     private ObjectName pubExecSvcMBean;
+ 
+     /** */
+     @GridToStringExclude
+     private ObjectName sysExecSvcMBean;
+ 
+     /** */
+     @GridToStringExclude
+     private ObjectName mgmtExecSvcMBean;
+ 
+     /** */
+     @GridToStringExclude
+     private ObjectName p2PExecSvcMBean;
+ 
+     /** */
+     @GridToStringExclude
+     private ObjectName restExecSvcMBean;
+ 
+     /** Kernal start timestamp. */
+     private long startTime = U.currentTimeMillis();
+ 
+     /** Spring context, potentially {@code null}. */
+     private GridSpringResourceContext rsrcCtx;
+ 
+     /** */
+     @GridToStringExclude
+     private Timer updateNtfTimer;
+ 
+     /** */
+     @GridToStringExclude
+     private Timer starveTimer;
+ 
+     /** */
+     @GridToStringExclude
+     private Timer licTimer;
+ 
+     /** */
+     @GridToStringExclude
+     private Timer metricsLogTimer;
+ 
+     /** Indicate error on grid stop. */
+     @GridToStringExclude
+     private boolean errOnStop;
+ 
+     /** Node local store. */
+     @GridToStringExclude
+     private ClusterNodeLocalMap nodeLoc;
+ 
+     /** Scheduler. */
+     @GridToStringExclude
+     private IgniteScheduler scheduler;
+ 
+     /** Grid security instance. */
+     @GridToStringExclude
+     private GridSecurity security;
+ 
+     /** Portables instance. */
+     @GridToStringExclude
+     private IgnitePortables portables;
+ 
+     /** Kernal gateway. */
+     @GridToStringExclude
+     private final AtomicReference<GridKernalGateway> gw = new AtomicReference<>();
+ 
+     /** Data Grid edition usage registered flag. */
+     @GridToStringExclude
+     private volatile boolean dbUsageRegistered;
+ 
+     /** */
+     @GridToStringExclude
+     private final Collection<String> compatibleVers;
+ 
+     /** Stop guard. */
+     @GridToStringExclude
+     private final AtomicBoolean stopGuard = new AtomicBoolean();
+ 
+     /**
+      * No-arg constructor is required by externalization.
+      */
+     public IgniteKernal() {
+         this(null);
+     }
+ 
+     /**
+      * @param rsrcCtx Optional Spring application context.
+      */
+     public IgniteKernal(@Nullable GridSpringResourceContext rsrcCtx) {
+         super(null, null, null, (IgnitePredicate<ClusterNode>)null);
+ 
+         this.rsrcCtx = rsrcCtx;
+ 
+         String[] compatibleVers = COMPATIBLE_VERS.split(",");
+ 
+         for (int i = 0; i < compatibleVers.length; i++)
+             compatibleVers[i] = compatibleVers[i].trim();
+ 
+         this.compatibleVers = Collections.unmodifiableList(Arrays.asList(compatibleVers));
+     }
+ 
+     /** {@inheritDoc} */
+     @Override public IgniteCluster cluster() {
+         return this;
+     }
+ 
+     /** {@inheritDoc} */
+     @Override public final IgniteCompute compute(ClusterGroup prj) {
+         return ((ClusterGroupAdapter)prj).compute();
+     }
+ 
+     /** {@inheritDoc} */
+     @Override public final IgniteMessaging message(ClusterGroup prj) {
+         return ((ClusterGroupAdapter)prj).message();
+     }
+ 
+     /** {@inheritDoc} */
+     @Override public final IgniteEvents events(ClusterGroup prj) {
+         return ((ClusterGroupAdapter)prj).events();
+     }
+ 
+     /** {@inheritDoc} */
+     @Override public IgniteManaged managed(ClusterGroup prj) {
+         return ((ClusterGroupAdapter)prj).managed();
+     }
+ 
+     /** {@inheritDoc} */
+     @Override public ExecutorService executorService(ClusterGroup prj) {
+         return ((ClusterGroupAdapter)prj).executorService();
+     }
+ 
+     /** {@inheritDoc} */
+     @Override public String name() {
+         return gridName;
+     }
+ 
+     /** {@inheritDoc} */
+     @Override public String getCopyright() {
+         return ctx.product().copyright();
+     }
+ 
+     /** {@inheritDoc} */
+     @Override public String getLicenseFilePath() {
+         assert cfg != null;
+ 
+         return cfg.getLicenseUrl();
+     }
+ 
+     /** {@inheritDoc} */
+     @Override public long getStartTimestamp() {
+         return startTime;
+     }
+ 
+     /** {@inheritDoc} */
+     @Override public String getStartTimestampFormatted() {
+         return DateFormat.getDateTimeInstance().format(new Date(startTime));
+     }
+ 
+     /** {@inheritDoc} */
+     @Override public long getUpTime() {
+         return U.currentTimeMillis() - startTime;
+     }
+ 
+     /** {@inheritDoc} */
+     @Override public String getUpTimeFormatted() {
+         return X.timeSpan2HMSM(U.currentTimeMillis() - startTime);
+     }
+ 
+     /** {@inheritDoc} */
+     @Override public String getFullVersion() {
+         return COMPOUND_VER + '-' + BUILD_TSTAMP_STR;
+     }
+ 
+     /** {@inheritDoc} */
+     @Override public String getCheckpointSpiFormatted() {
+         assert cfg != null;
+ 
+         return Arrays.toString(cfg.getCheckpointSpi());
+     }
+ 
+     /** {@inheritDoc} */
+     @Override public String getSwapSpaceSpiFormatted() {
+         assert cfg != null;
+ 
+         return cfg.getSwapSpaceSpi().toString();
+     }
+ 
+     /** {@inheritDoc} */
+     @Override public String getCommunicationSpiFormatted() {
+         assert cfg != null;
+ 
+         return cfg.getCommunicationSpi().toString();
+     }
+ 
+     /** {@inheritDoc} */
+     @Override public String getDeploymentSpiFormatted() {
+         assert cfg != null;
+ 
+         return cfg.getDeploymentSpi().toString();
+     }
+ 
+     /** {@inheritDoc} */
+     @Override public String getDiscoverySpiFormatted() {
+         assert cfg != null;
+ 
+         return cfg.getDiscoverySpi().toString();
+     }
+ 
+     /** {@inheritDoc} */
+     @Override public String getEventStorageSpiFormatted() {
+         assert cfg != null;
+ 
+         return cfg.getEventStorageSpi().toString();
+     }
+ 
+     /** {@inheritDoc} */
+     @Override public String getCollisionSpiFormatted() {
+         assert cfg != null;
+ 
+         return cfg.getCollisionSpi().toString();
+     }
+ 
+     /** {@inheritDoc} */
+     @Override public String getFailoverSpiFormatted() {
+         assert cfg != null;
+ 
+         return Arrays.toString(cfg.getFailoverSpi());
+     }
+ 
+     /** {@inheritDoc} */
+     @Override public String getLoadBalancingSpiFormatted() {
+         assert cfg != null;
+ 
+         return Arrays.toString(cfg.getLoadBalancingSpi());
+     }
+ 
+     /** {@inheritDoc} */
+     @Override public String getAuthenticationSpiFormatted() {
+         assert cfg != null;
+ 
+         return cfg.getAuthenticationSpi().toString();
+     }
+ 
+     /** {@inheritDoc} */
+     @Override public String getSecureSessionSpiFormatted() {
+         assert cfg != null;
+ 
+         return cfg.getSecureSessionSpi().toString();
+     }
+ 
+     /** {@inheritDoc} */
+     @Override public String getOsInformation() {
+         return U.osString();
+     }
+ 
+     /** {@inheritDoc} */
+     @Override public String getJdkInformation() {
+         return U.jdkString();
+     }
+ 
+     /** {@inheritDoc} */
+     @Override public String getOsUser() {
+         return System.getProperty("user.name");
+     }
+ 
+     /** {@inheritDoc} */
+     @Override public String getVmName() {
+         return ManagementFactory.getRuntimeMXBean().getName();
+     }
+ 
+     /** {@inheritDoc} */
+     @Override public String getInstanceName() {
+         return gridName;
+     }
+ 
+     /** {@inheritDoc} */
+     @Override public String getExecutorServiceFormatted() {
+         assert cfg != null;
+ 
+         return cfg.getExecutorService().toString();
+     }
+ 
+     /** {@inheritDoc} */
+     @Override public String getGridGainHome() {
+         assert cfg != null;
+ 
+         return cfg.getGridGainHome();
+     }
+ 
+     /** {@inheritDoc} */
+     @Override public String getGridLoggerFormatted() {
+         assert cfg != null;
+ 
+         return cfg.getGridLogger().toString();
+     }
+ 
+     /** {@inheritDoc} */
+     @Override public String getMBeanServerFormatted() {
+         assert cfg != null;
+ 
+         return cfg.getMBeanServer().toString();
+     }
+ 
+     /** {@inheritDoc} */
+     @Override public UUID getLocalNodeId() {
+         assert cfg != null;
+ 
+         return cfg.getNodeId();
+     }
+ 
+     /** {@inheritDoc} */
+     @SuppressWarnings("unchecked")
+     @Override public Collection<String> getUserAttributesFormatted() {
+         assert cfg != null;
+ 
+         return F.transform(cfg.getUserAttributes().entrySet(), new C1<Map.Entry<String, ?>, String>() {
+             @Override public String apply(Map.Entry<String, ?> e) {
+                 return e.getKey() + ", " + e.getValue().toString();
+             }
+         });
+     }
+ 
+     /** {@inheritDoc} */
+     @Override public boolean isPeerClassLoadingEnabled() {
+         assert cfg != null;
+ 
+         return cfg.isPeerClassLoadingEnabled();
+     }
+ 
+     /** {@inheritDoc} */
+     @Override public Collection<String> getLifecycleBeansFormatted() {
+         LifecycleBean[] beans = cfg.getLifecycleBeans();
+ 
+         return F.isEmpty(beans) ? Collections.<String>emptyList() : F.transform(beans, F.<LifecycleBean>string());
+     }
+ 
+     /**
+      * @param attrs Current attributes.
+      * @param name  New attribute name.
+      * @param val New attribute value.
+      * @throws IgniteCheckedException If duplicated SPI name found.
+      */
+     private void add(Map<String, Object> attrs, String name, @Nullable Serializable val) throws IgniteCheckedException {
+         assert attrs != null;
+         assert name != null;
+ 
+         if (attrs.put(name, val) != null) {
+             if (name.endsWith(ATTR_SPI_CLASS))
+                 // User defined duplicated names for the different SPIs.
+                 throw new IgniteCheckedException("Failed to set SPI attribute. Duplicated SPI name found: " +
+                     name.substring(0, name.length() - ATTR_SPI_CLASS.length()));
+ 
+             // Otherwise it's a mistake of setting up duplicated attribute.
+             assert false : "Duplicate attribute: " + name;
+         }
+     }
+ 
+     /**
+      * Notifies life-cycle beans of grid event.
+      *
+      * @param evt Grid event.
+      * @throws IgniteCheckedException If user threw exception during start.
+      */
+     @SuppressWarnings({"CatchGenericClass"})
+     private void notifyLifecycleBeans(LifecycleEventType evt) throws IgniteCheckedException {
+         if (!cfg.isDaemon() && cfg.getLifecycleBeans() != null)
+             for (LifecycleBean bean : cfg.getLifecycleBeans())
+                 if (bean != null)
+                     bean.onLifecycleEvent(evt);
+     }
+ 
+     /**
+      * Notifies life-cycle beans of grid event.
+      *
+      * @param evt Grid event.
+      */
+     @SuppressWarnings({"CatchGenericClass"})
+     private void notifyLifecycleBeansEx(LifecycleEventType evt) {
+         try {
+             notifyLifecycleBeans(evt);
+         }
+         // Catch generic throwable to secure against user assertions.
+         catch (Throwable e) {
+             U.error(log, "Failed to notify lifecycle bean (safely ignored) [evt=" + evt +
+                 ", gridName=" + gridName + ']', e);
+         }
+     }
+ 
+     /**
+      * @param cfg Grid configuration to use.
+      * @param utilityCachePool Utility cache pool.
+      * @param errHnd Error handler to use for notification about startup problems.
+      * @throws IgniteCheckedException Thrown in case of any errors.
+      */
+     @SuppressWarnings({"CatchGenericClass", "unchecked"})
+     public void start(final IgniteConfiguration cfg, ExecutorService utilityCachePool, GridAbsClosure errHnd)
+         throws IgniteCheckedException {
+         gw.compareAndSet(null, new GridKernalGatewayImpl(cfg.getGridName()));
+ 
+         GridKernalGateway gw = this.gw.get();
+ 
+         gw.writeLock();
+ 
+         try {
+             switch (gw.getState()) {
+                 case STARTED: {
+                     U.warn(log, "Grid has already been started (ignored).");
+ 
+                     return;
+                 }
+ 
+                 case STARTING: {
+                     U.warn(log, "Grid is already in process of being started (ignored).");
+ 
+                     return;
+                 }
+ 
+                 case STOPPING: {
+                     throw new IgniteCheckedException("Grid is in process of being stopped");
+                 }
+ 
+                 case STOPPED: {
+                     break;
+                 }
+             }
+ 
+             gw.setState(STARTING);
+         }
+         finally {
+             gw.writeUnlock();
+         }
+ 
+         assert cfg != null;
+ 
+         // Make sure we got proper configuration.
+         validateCommon(cfg);
+ 
+         gridName = cfg.getGridName();
+ 
+         this.cfg = cfg;
+ 
+         log = (GridLoggerProxy)cfg.getGridLogger().getLogger(getClass().getName() +
+             (gridName != null ? '%' + gridName : ""));
+ 
+         RuntimeMXBean rtBean = ManagementFactory.getRuntimeMXBean();
+ 
+         // Ack various information.
+         ackAsciiLogo();
+         ackConfigUrl();
+         ackDaemon();
+         ackOsInfo();
+         ackLanguageRuntime();
+         ackRemoteManagement();
+         ackVmArguments(rtBean);
+         ackClassPaths(rtBean);
+         ackSystemProperties();
+         ackEnvironmentVariables();
+         ackSmtpConfiguration();
+         ackCacheConfiguration();
+         ackP2pConfiguration();
+ 
+         // Run background network diagnostics.
+         GridDiagnostic.runBackgroundCheck(gridName, cfg.getExecutorService(), log);
+ 
+         boolean notifyEnabled = IgniteSystemProperties.getBoolean(GG_UPDATE_NOTIFIER, true);
+ 
+         GridUpdateNotifier verChecker0 = null;
+ 
+         if (notifyEnabled) {
+             try {
+                 verChecker0 = new GridUpdateNotifier(gridName, VER, SITE, gw, false);
+ 
+                 verChecker0.checkForNewVersion(cfg.getExecutorService(), log);
+             }
+             catch (IgniteCheckedException e) {
+                 if (log.isDebugEnabled())
+                     log.debug("Failed to create GridUpdateNotifier: " + e);
+             }
+         }
+ 
+         final GridUpdateNotifier verChecker = verChecker0;
+ 
+         // Ack 3-rd party licenses location.
+         if (log.isInfoEnabled() && cfg.getGridGainHome() != null)
+             log.info("3-rd party licenses can be found at: " + cfg.getGridGainHome() + File.separatorChar + "libs" +
+                 File.separatorChar + "licenses");
+ 
+         // Check that user attributes are not conflicting
+         // with internally reserved names.
+         for (String name : cfg.getUserAttributes().keySet())
+             if (name.startsWith(ATTR_PREFIX))
+                 throw new IgniteCheckedException("User attribute has illegal name: '" + name + "'. Note that all names " +
+                     "starting with '" + ATTR_PREFIX + "' are reserved for internal use.");
+ 
+         // Ack local node user attributes.
+         logNodeUserAttributes();
+ 
+         // Ack configuration.
+         ackSpis();
+ 
+         Map<String, Object> attrs = createNodeAttributes(cfg, BUILD_TSTAMP_STR);
+ 
+         // Spin out SPIs & managers.
+         try {
+             GridKernalContextImpl ctx =
+                 new GridKernalContextImpl(log, this, cfg, gw, utilityCachePool, ENT);
+ 
+             nodeLoc = new ClusterNodeLocalMapImpl(ctx);
+ 
+             U.onGridStart();
+ 
+             // Set context into rich adapter.
+             setKernalContext(ctx);
+ 
+             // Start and configure resource processor first as it contains resources used
+             // by all other managers and processors.
+             GridResourceProcessor rsrcProc = new GridResourceProcessor(ctx);
+ 
+             rsrcProc.setSpringContext(rsrcCtx);
+ 
+             ctx.product(new GridProductImpl(ctx, verChecker));
+ 
+             scheduler = new IgniteSchedulerImpl(ctx);
+ 
+             startProcessor(ctx, rsrcProc, attrs);
+ 
+             // Inject resources into lifecycle beans.
+             if (!cfg.isDaemon() && cfg.getLifecycleBeans() != null)
+                 for (LifecycleBean bean : cfg.getLifecycleBeans())
+                     if (bean != null)
+                         rsrcProc.inject(bean);
+ 
+             // Lifecycle notification.
+             notifyLifecycleBeans(BEFORE_GRID_START);
+ 
+             // Starts lifecycle aware components.
+             U.startLifecycleAware(lifecycleAwares(cfg));
+ 
+             addHelper(ctx, GGFS_HELPER.create(F.isEmpty(cfg.getGgfsConfiguration())));
+ 
+             startProcessor(ctx, new IgnitePluginProcessor(ctx, cfg), attrs);
+ 
+             // Off-heap processor has no dependencies.
+             startProcessor(ctx, new GridOffHeapProcessor(ctx), attrs);
+ 
+             // Closure processor should be started before all others
+             // (except for resource processor), as many components can depend on it.
+             startProcessor(ctx, new GridClosureProcessor(ctx), attrs);
+ 
+             // Start some other processors (order & place is important).
+             startProcessor(ctx, (GridProcessor)EMAIL.create(ctx, cfg.getSmtpHost() == null), attrs);
+             startProcessor(ctx, new GridPortProcessor(ctx), attrs);
+             startProcessor(ctx, new GridJobMetricsProcessor(ctx), attrs);
+ 
+             // Timeout processor needs to be started before managers,
+             // as managers may depend on it.
+             startProcessor(ctx, new GridTimeoutProcessor(ctx), attrs);
+ 
+             // Start SPI managers.
+             // NOTE: that order matters as there are dependencies between managers.
+             startManager(ctx, createComponent(GridSecurityManager.class, ctx), attrs);
+             startManager(ctx, createComponent(GridSecureSessionManager.class, ctx), attrs);
+             startManager(ctx, new GridIoManager(ctx), attrs);
+             startManager(ctx, new GridCheckpointManager(ctx), attrs);
+ 
+             startManager(ctx, new GridEventStorageManager(ctx), attrs);
+             startManager(ctx, new GridDeploymentManager(ctx), attrs);
+             startManager(ctx, new GridLoadBalancerManager(ctx), attrs);
+             startManager(ctx, new GridFailoverManager(ctx), attrs);
+             startManager(ctx, new GridCollisionManager(ctx), attrs);
+             startManager(ctx, new GridSwapSpaceManager(ctx), attrs);
+             startManager(ctx, new GridIndexingManager(ctx), attrs);
+ 
+             ackSecurity(ctx);
+ 
+             // Start processors before discovery manager, so they will
+             // be able to start receiving messages once discovery completes.
+             startProcessor(ctx, new GridClockSyncProcessor(ctx), attrs);
+             startProcessor(ctx, createComponent(GridLicenseProcessor.class, ctx), attrs);
+             startProcessor(ctx, new GridAffinityProcessor(ctx), attrs);
+             startProcessor(ctx, createComponent(GridSegmentationProcessor.class, ctx), attrs);
+             startProcessor(ctx, new GridQueryProcessor(ctx), attrs);
+             startProcessor(ctx, new GridCacheProcessor(ctx), attrs);
+             startProcessor(ctx, new GridTaskSessionProcessor(ctx), attrs);
+             startProcessor(ctx, new GridJobProcessor(ctx), attrs);
+             startProcessor(ctx, new GridTaskProcessor(ctx), attrs);
+             startProcessor(ctx, (GridProcessor)SCHEDULE.createOptional(ctx), attrs);
+             startProcessor(ctx, createComponent(GridPortableProcessor.class, ctx), attrs);
+             startProcessor(ctx, createComponent(GridInteropProcessor.class, ctx), attrs);
+             startProcessor(ctx, new GridRestProcessor(ctx), attrs);
+             startProcessor(ctx, new GridDataLoaderProcessor(ctx), attrs);
+             startProcessor(ctx, new GridStreamProcessor(ctx), attrs);
+             startProcessor(ctx, (GridProcessor)GGFS.create(ctx, F.isEmpty(cfg.getGgfsConfiguration())), attrs);
+             startProcessor(ctx, new GridContinuousProcessor(ctx), attrs);
+             startProcessor(ctx, (GridProcessor)(cfg.isPeerClassLoadingEnabled() ?
+                 IgniteComponentType.HADOOP.create(ctx, true): // No-op when peer class loading is enabled.
+                 IgniteComponentType.HADOOP.createIfInClassPath(ctx, cfg.getHadoopConfiguration() != null)), attrs);
+             startProcessor(ctx, new GridServiceProcessor(ctx), attrs);
+ 
+             // Start plugins.
+             for (PluginProvider provider : ctx.plugins().allProviders()) {
+                 ctx.add(new GridPluginComponent(provider));
+ 
+                 provider.start(ctx.plugins().pluginContextForProvider(provider), attrs);
+             }
+ 
+             ctx.createMessageFactory();
+ 
+             if (ctx.isEnterprise()) {
+                 security = new GridSecurityImpl(ctx);
+                 portables = new GridPortablesImpl(ctx);
+             }
+ 
+             gw.writeLock();
+ 
+             try {
+                 gw.setState(STARTED);
+ 
+                 // Start discovery manager last to make sure that grid is fully initialized.
+                 startManager(ctx, new GridDiscoveryManager(ctx), attrs);
+             }
+             finally {
+                 gw.writeUnlock();
+             }
+ 
+             // Check whether physical RAM is not exceeded.
+             checkPhysicalRam();
+ 
+             // Suggest configuration optimizations.
+             suggestOptimizations(ctx, cfg);
+ 
+             if (!ctx.isEnterprise())
+                 warnNotSupportedFeaturesForOs(cfg);
+ 
+             // Notify discovery manager the first to make sure that topology is discovered.
+             ctx.discovery().onKernalStart();
+ 
+             // Notify IO manager the second so further components can send and receive messages.
+             ctx.io().onKernalStart();
+ 
+             // Callbacks.
+             for (GridComponent comp : ctx) {
+                 // Skip discovery manager.
+                 if (comp instanceof GridDiscoveryManager)
+                     continue;
+ 
+                 // Skip IO manager.
+                 if (comp instanceof GridIoManager)
+                     continue;
+ 
+                 comp.onKernalStart();
+             }
+ 
+             // Ack the license.
+             ctx.license().ackLicense();
+ 
+             // Register MBeans.
+             registerKernalMBean();
+             registerLocalNodeMBean();
+             registerExecutorMBeans();
+ 
+             // Lifecycle bean notifications.
+             notifyLifecycleBeans(AFTER_GRID_START);
+         }
+         catch (Throwable e) {
+             IgniteSpiVersionCheckException verCheckErr = X.cause(e, IgniteSpiVersionCheckException.class);
+ 
+             if (verCheckErr != null)
+                 U.error(log, verCheckErr.getMessage());
+             else if (X.hasCause(e, InterruptedException.class, IgniteInterruptedException.class))
+                 U.warn(log, "Grid startup routine has been interrupted (will rollback).");
+             else
+                 U.error(log, "Got exception while starting (will rollback startup routine).", e);
+ 
+             errHnd.apply();
+ 
+             stop(true);
+ 
+             if (e instanceof IgniteCheckedException)
+                 throw (IgniteCheckedException)e;
+             else
+                 throw new IgniteCheckedException(e);
+         }
+ 
+         // Mark start timestamp.
+         startTime = U.currentTimeMillis();
+ 
+         // Ack latest version information.
+         if (verChecker != null)
+             verChecker.reportStatus(log);
+ 
+         if (notifyEnabled) {
+             assert verChecker != null;
+ 
+             verChecker.reportOnlyNew(true);
+             verChecker.licenseProcessor(ctx.license());
+ 
 -            updateNtfTimer = new Timer("gridgain-update-notifier-timer");
++            updateNtfTimer = new Timer("ignite-update-notifier-timer");
+ 
+             // Setup periodic version check.
+             updateNtfTimer.scheduleAtFixedRate(new GridTimerTask() {
+                 @Override public void safeRun() throws InterruptedException {
+                     verChecker.topologySize(nodes().size());
+ 
+                     verChecker.checkForNewVersion(cfg.getExecutorService(), log);
+ 
+                     // Just wait for 10 secs.
+                     Thread.sleep(PERIODIC_VER_CHECK_CONN_TIMEOUT);
+ 
+                     // Report status if one is available.
+                     // No-op if status is NOT available.
+                     verChecker.reportStatus(log);
+                 }
+             }, PERIODIC_VER_CHECK_DELAY, PERIODIC_VER_CHECK_DELAY);
+         }
+ 
+         String intervalStr = IgniteSystemProperties.getString(GG_STARVATION_CHECK_INTERVAL);
+ 
+         // Start starvation checker if enabled.
+         boolean starveCheck = !isDaemon() && !"0".equals(intervalStr);
+ 
+         if (starveCheck) {
+             final long interval = F.isEmpty(intervalStr) ? PERIODIC_STARVATION_CHECK_FREQ : Long.parseLong(intervalStr);
+ 
 -            starveTimer = new Timer("gridgain-starvation-checker");
++            starveTimer = new Timer("ignite-starvation-checker");
+ 
+             starveTimer.scheduleAtFixedRate(new GridTimerTask() {
+                 /** Last completed task count. */
+                 private long lastCompletedCnt;
+ 
+                 @Override protected void safeRun() {
+                     ExecutorService e = cfg.getExecutorService();
+ 
+                     if (!(e instanceof ThreadPoolExecutor))
+                         return;
+ 
+                     ThreadPoolExecutor exec = (ThreadPoolExecutor)e;
+ 
+                     long completedCnt = exec.getCompletedTaskCount();
+ 
+                     // If all threads are active and no task has completed since last time and there is
+                     // at least one waiting request, then it is possible starvation.
+                     if (exec.getPoolSize() == exec.getActiveCount() && completedCnt == lastCompletedCnt &&
+                         !exec.getQueue().isEmpty())
+                         LT.warn(log, null, "Possible thread pool starvation detected (no task completed in last " +
+                             interval + "ms, is executorService pool size large enough?)");
+ 
+                     lastCompletedCnt = completedCnt;
+                 }
+             }, interval, interval);
+         }
+ 
+         if (!isDaemon()) {
 -            licTimer = new Timer("gridgain-license-checker");
++            licTimer = new Timer("ignite-license-checker");
+ 
+             // Setup periodic license check.
+             licTimer.scheduleAtFixedRate(new GridTimerTask() {
+                 @Override public void safeRun() throws InterruptedException {
+                     try {
+                         ctx.license().checkLicense();
+                     }
+                     // This exception only happens when license processor was unable
+                     // to resolve license violation on its own and this grid instance
+                     // now needs to be shutdown.
+                     //
+                     // Note that in most production configurations the license will
+                     // have certain grace period and license processor will attempt
+                     // to reload the license during the grace period.
+                     //
+                     // This exception thrown here means that grace period, if any,
+                     // has expired and license violation is still unresolved.
+                     catch (IgniteProductLicenseException ignored) {
+                         U.error(log, "License violation is unresolved. GridGain node will shutdown in " +
+                             (SHUTDOWN_DELAY / 1000) + " sec.");
+                         U.error(log, "  ^-- Contact your support for immediate assistance (!)");
+ 
+                         // Allow interruption to break from here since
+                         // node is stopping anyways.
+                         Thread.sleep(SHUTDOWN_DELAY);
+ 
+                         G.stop(gridName, true);
+                     }
+                     // Safety net.
+                     catch (Throwable e) {
+                         U.error(log, "Unable to check the license due to system error.", e);
+                         U.error(log, "Grid instance will be stopped...");
+ 
+                         // Stop the grid if we get unknown license-related error.
+                         // Should never happen. Practically an assertion...
+                         G.stop(gridName, true);
+                     }
+                 }
+             }, PERIODIC_LIC_CHECK_DELAY, PERIODIC_LIC_CHECK_DELAY);
+         }
+ 
+         long metricsLogFreq = cfg.getMetricsLogFrequency();
+ 
+         if (metricsLogFreq > 0) {
 -            metricsLogTimer = new Timer("gridgain-metrics-logger");
++            metricsLogTimer = new Timer("ignite-metrics-logger");
+ 
+             metricsLogTimer.scheduleAtFixedRate(new GridTimerTask() {
+                 /** */
+                 private final DecimalFormat dblFmt = new DecimalFormat("#.##");
+ 
+                 @Override protected void safeRun() {
+                     if (log.isInfoEnabled()) {
+                         ClusterMetrics m = localNode().metrics();
+ 
+                         double cpuLoadPct = m.getCurrentCpuLoad() * 100;
+                         double avgCpuLoadPct = m.getAverageCpuLoad() * 100;
+                         double gcPct = m.getCurrentGcCpuLoad() * 100;
+ 
+                         long heapUsed = m.getHeapMemoryUsed();
+                         long heapMax = m.getHeapMemoryMaximum();
+ 
+                         long heapUsedInMBytes = heapUsed / 1024 / 1024;
+                         long heapCommInMBytes = m.getHeapMemoryCommitted() / 1024 / 1024;
+ 
+                         double freeHeapPct = heapMax > 0 ? ((double)((heapMax - heapUsed) * 100)) / heapMax : -1;
+ 
+                         int hosts = 0;
+                         int nodes = 0;
+                         int cpus = 0;
+ 
+                         try {
+                             ClusterMetrics metrics = metrics();
+ 
+                             Collection<ClusterNode> nodes0 = nodes();
+ 
+                             hosts = U.neighborhood(nodes0).size();
+                             nodes = nodes0.size();
+                             cpus = metrics.getTotalCpus();
+                         }
+                         catch (IgniteCheckedException ignore) {
+                             // No-op.
+                         }
+ 
+                         int pubPoolActiveThreads = 0;
+                         int pubPoolIdleThreads = 0;
+                         int pubPoolQSize = 0;
+ 
+                         ExecutorService pubExec = cfg.getExecutorService();
+ 
+                         if (pubExec instanceof ThreadPoolExecutor) {
+                             ThreadPoolExecutor exec = (ThreadPoolExecutor)pubExec;
+ 
+                             int poolSize = exec.getPoolSize();
+ 
+                             pubPoolActiveThreads = Math.min(poolSize, exec.getActiveCount());
+                             pubPoolIdleThreads = poolSize - pubPoolActiveThreads;
+                             pubPoolQSize = exec.getQueue().size();
+                         }
+ 
+                         int sysPoolActiveThreads = 0;
+                         int sysPoolIdleThreads = 0;
+                         int sysPoolQSize = 0;
+ 
+                         ExecutorService sysExec = cfg.getSystemExecutorService();
+ 
+                         if (sysExec instanceof ThreadPoolExecutor) {
+                             ThreadPoolExecutor exec = (ThreadPoolExecutor)sysExec;
+ 
+                             int poolSize = exec.getPoolSize();
+ 
+                             sysPoolActiveThreads = Math.min(poolSize, exec.getActiveCount());
+                             sysPoolIdleThreads = poolSize - sysPoolActiveThreads;
+                             sysPoolQSize = exec.getQueue().size();
+                         }
+ 
+                         String msg = NL +
+                             "Metrics for local node (to disable set 'metricsLogFrequency' to 0)" + NL +
+                             "    ^-- H/N/C [hosts=" + hosts + ", nodes=" + nodes + ", CPUs=" + cpus + "]" + NL +
+                             "    ^-- CPU [cur=" + dblFmt.format(cpuLoadPct) + "%, avg=" +
+                                 dblFmt.format(avgCpuLoadPct) + "%, GC=" + dblFmt.format(gcPct) + "%]" + NL +
+                             "    ^-- Heap [used=" + dblFmt.format(heapUsedInMBytes) + "MB, free=" +
+                                 dblFmt.format(freeHeapPct) + "%, comm=" + dblFmt.format(heapCommInMBytes) + "MB]" + NL +
+                             "    ^-- Public thread pool [active=" + pubPoolActiveThreads + ", idle=" +
+                                 pubPoolIdleThreads + ", qSize=" + pubPoolQSize + "]" + NL +
+                             "    ^-- System thread pool [active=" + sysPoolActiveThreads + ", idle=" +
+                                 sysPoolIdleThreads + ", qSize=" + sysPoolQSize + "]" + NL +
+                             "    ^-- Outbound messages queue [size=" + m.getOutboundMessagesQueueSize() + "]";
+ 
+                         log.info(msg);
+                     }
+                 }
+             }, metricsLogFreq, metricsLogFreq);
+         }
+ 
+         ctx.performance().logSuggestions(log, gridName);
+ 
+         ackBenchmarks();
+         ackVisor();
+ 
+         ackStart(rtBean);
+ 
+         if (!isDaemon())
+             ctx.discovery().ackTopology();
+ 
+         // Send node start email notification, if enabled.
+         if (isSmtpEnabled() && isAdminEmailsSet() && cfg.isLifeCycleEmailNotification()) {
+             SB sb = new SB();
+ 
+             for (GridPortRecord rec : ctx.ports().records())
+                 sb.a(rec.protocol()).a(":").a(rec.port()).a(" ");
+ 
+             String nid = localNode().id().toString().toUpperCase();
+             String nid8 = U.id8(localNode().id()).toUpperCase();
+ 
+             IgniteProductLicense lic = ctx.license().license();
+ 
+             String body =
+                 "GridGain node started with the following parameters:" + NL +
+                 NL +
+                 "----" + NL +
+                 "GridGain ver. " + COMPOUND_VER + '#' + BUILD_TSTAMP_STR + "-sha1:" + REV_HASH + NL +
+                 "Grid name: " + gridName + NL +
+                 "Node ID: " + nid + NL +
+                 "Node order: " + localNode().order() + NL +
+                 "Node addresses: " + U.addressesAsString(localNode()) + NL +
+                 "Local ports: " + sb + NL +
+                 "OS name: " + U.osString() + NL +
+                 "OS user: " + System.getProperty("user.name") + NL +
+                 "CPU(s): " + localNode().metrics().getTotalCpus() + NL +
+                 "Heap: " + U.heapSize(localNode(), 2) + "GB" + NL +
+                 "JVM name: " + U.jvmName() + NL +
+                 "JVM vendor: " + U.jvmVendor() + NL +
+                 "JVM version: " + U.jvmVersion() + NL +
+                 "VM name: " + rtBean.getName() + NL;
+ 
+             if (lic != null) {
+                 body +=
+                     "License ID: " + lic.id().toString().toUpperCase() + NL +
+                     "Licensed to: " + lic.userOrganization() + NL;
+             }
+             else
+                 assert !ENT;
+ 
+             body +=
+                 "----" + NL +
+                 NL +
+                 "NOTE:" + NL +
+                 "This message is sent automatically to all configured admin emails." + NL +
+                 "To change this behavior use 'lifeCycleEmailNotify' grid configuration property." +
+                 NL + NL +
+                 "| " + SITE + NL +
+                 "| support@gridgain.com" + NL;
+ 
+             sendAdminEmailAsync("GridGain node started: " + nid8, body, false);
+         }
+     }
+ 
+     /**
+      * Validates common configuration parameters.
+      *
+      * @param cfg Configuration.
+      */
+     private void validateCommon(IgniteConfiguration cfg) {
+         A.notNull(cfg.getNodeId(), "cfg.getNodeId()");
+ 
+         A.notNull(cfg.getMBeanServer(), "cfg.getMBeanServer()");
+         A.notNull(cfg.getGridLogger(), "cfg.getGridLogger()");
+         A.notNull(cfg.getMarshaller(), "cfg.getMarshaller()");
+         A.notNull(cfg.getExecutorService(), "cfg.getExecutorService()");
+         A.notNull(cfg.getUserAttributes(), "cfg.getUserAttributes()");
+ 
+         // All SPIs should be non-null.
+         A.notNull(cfg.getSwapSpaceSpi(), "cfg.getSwapSpaceSpi()");
+         A.notNull(cfg.getCheckpointSpi(), "cfg.getCheckpointSpi()");
+         A.notNull(cfg.getCommunicationSpi(), "cfg.getCommunicationSpi()");
+         A.notNull(cfg.getDeploymentSpi(), "cfg.getDeploymentSpi()");
+         A.notNull(cfg.getDiscoverySpi(), "cfg.getDiscoverySpi()");
+         A.notNull(cfg.getEventStorageSpi(), "cfg.getEventStorageSpi()");
+         A.notNull(cfg.getAuthenticationSpi(), "cfg.getAuthenticationSpi()");
+         A.notNull(cfg.getSecureSessionSpi(), "cfg.getSecureSessionSpi()");
+         A.notNull(cfg.getCollisionSpi(), "cfg.getCollisionSpi()");
+         A.notNull(cfg.getFailoverSpi(), "cfg.getFailoverSpi()");
+         A.notNull(cfg.getLoadBalancingSpi(), "cfg.getLoadBalancingSpi()");
+         A.notNull(cfg.getIndexingSpi(), "cfg.getIndexingSpi()");
+ 
+         A.ensure(cfg.getNetworkTimeout() > 0, "cfg.getNetworkTimeout() > 0");
+         A.ensure(cfg.getNetworkSendRetryDelay() > 0, "cfg.getNetworkSendRetryDelay() > 0");
+         A.ensure(cfg.getNetworkSendRetryCount() > 0, "cfg.getNetworkSendRetryCount() > 0");
+ 
+         if (!F.isEmpty(cfg.getPluginConfigurations())) {
+             for (PluginConfiguration pluginCfg : cfg.getPluginConfigurations())
+                 A.notNull(pluginCfg.providerClass(), "PluginConfiguration.providerClass()");
+         }
+     }
+ 
+     /**
+      * Checks whether physical RAM is not exceeded.
+      */
+     @SuppressWarnings("ConstantConditions")
+     private void checkPhysicalRam() {
+         long ram = ctx.discovery().localNode().attribute(ATTR_PHY_RAM);
+ 
+         if (ram != -1) {
+             String macs = ctx.discovery().localNode().attribute(ATTR_MACS);
+ 
+             long totalHeap = 0;
+ 
+             for (ClusterNode node : ctx.discovery().allNodes()) {
+                 if (macs.equals(node.attribute(ATTR_MACS))) {
+                     long heap = node.metrics().getHeapMemoryMaximum();
+ 
+                     if (heap != -1)
+                         totalHeap += heap;
+                 }
+             }
+ 
+             if (totalHeap > ram) {
+                 U.quietAndWarn(log, "Attempting to start more nodes than physical RAM " +
+                     "available on current host (this can cause significant slowdown)");
+             }
+         }
+     }
+ 
+     /**
+      * @param ctx Context.
+      * @param cfg Configuration to check for possible performance issues.
+      */
+     private void suggestOptimizations(GridKernalContext ctx, IgniteConfiguration cfg) {
+         GridPerformanceSuggestions perf = ctx.performance();
+ 
+         if (ctx.collision().enabled())
+             perf.add("Disable collision resolution (remove 'collisionSpi' from configuration)");
+ 
+         if (ctx.checkpoint().enabled())
+             perf.add("Disable checkpoints (remove 'checkpointSpi' from configuration)");
+ 
+         if (cfg.isPeerClassLoadingEnabled())
+             perf.add("Disable peer class loading (set 'peerClassLoadingEnabled' to false)");
+ 
+         if (cfg.isMarshalLocalJobs())
+             perf.add("Disable local jobs marshalling (set 'marshalLocalJobs' to false)");
+ 
+         if (cfg.getIncludeEventTypes() != null && cfg.getIncludeEventTypes().length != 0)
+             perf.add("Disable grid events (remove 'includeEventTypes' from configuration)");
+ 
+         if (IgniteOptimizedMarshaller.available() && !(cfg.getMarshaller() instanceof IgniteOptimizedMarshaller))
+             perf.add("Enable optimized marshaller (set 'marshaller' to " +
+                 IgniteOptimizedMarshaller.class.getSimpleName() + ')');
+     }
+ 
+     /**
+      * Warns user about unsupported features which was configured in OS edition.
+      *
+      * @param cfg Grid configuration.
+      */
+     private void warnNotSupportedFeaturesForOs(IgniteConfiguration cfg) {
+         Collection<String> msgs = new ArrayList<>();
+ 
+         if (!F.isEmpty(cfg.getSegmentationResolvers()))
+             msgs.add("Network segmentation detection.");
+ 
+         if (cfg.getSecureSessionSpi() != null && !(cfg.getSecureSessionSpi() instanceof NoopSecureSessionSpi))
+             msgs.add("Secure session SPI.");
+ 
+         if (cfg.getAuthenticationSpi() != null && !(cfg.getAuthenticationSpi() instanceof NoopAuthenticationSpi))
+             msgs.add("Authentication SPI.");
+ 
+         if (!F.isEmpty(msgs)) {
+             U.quietAndInfo(log, "The following features are not supported in open source edition, " +
+                 "related configuration settings will be ignored " +
+                 "(consider downloading enterprise edition from http://www.gridgain.com):");
+ 
+             for (String s : msgs)
+                 U.quietAndInfo(log, "  ^-- " + s);
+ 
+             U.quietAndInfo(log, "");
+         }
+     }
+ 
+     /**
+      * Creates attributes map and fills it in.
+      *
+      * @param cfg Grid configuration.
+      * @param build Build string.
+      * @return Map of all node attributes.
+      * @throws IgniteCheckedException thrown if was unable to set up attribute.
+      */
+     @SuppressWarnings({"SuspiciousMethodCalls", "unchecked", "TypeMayBeWeakened"})
+     private Map<String, Object> createNodeAttributes(IgniteConfiguration cfg, String build) throws IgniteCheckedException {
+         Map<String, Object> attrs = new HashMap<>();
+ 
+         final String[] incProps = cfg.getIncludeProperties();
+ 
+         try {
+             // Stick all environment settings into node attributes.
+             attrs.putAll(F.view(System.getenv(), new P1<String>() {
+                 @Override public boolean apply(String name) {
+                     return incProps == null || U.containsStringArray(incProps, name, true) ||
+                         U.isVisorNodeStartProperty(name) || U.isVisorRequiredProperty(name);
+                 }
+             }));
+ 
+             if (log.isDebugEnabled())
+                 log.debug("Added environment properties to node attributes.");
+         }
+         catch (SecurityException e) {
+             throw new IgniteCheckedException("Failed to add environment properties to node attributes due to " +
+                 "security violation: " + e.getMessage());
+         }
+ 
+         try {
+             // Stick all system properties into node's attributes overwriting any
+             // identical names from environment properties.
+             for (Map.Entry<Object, Object> e : F.view(System.getProperties(), new P1<Object>() {
+                 @Override public boolean apply(Object o) {
+                     String name = (String)o;
+ 
+                     return incProps == null || U.containsStringArray(incProps, name, true) ||
+                         U.isVisorRequiredProperty(name);
+                 }
+             }).entrySet()) {
+                 Object val = attrs.get(e.getKey());
+ 
+                 if (val != null && !val.equals(e.getValue()))
+                     U.warn(log, "System property will override environment variable with the same name: "
+                         + e.getKey());
+ 
+                 attrs.put((String)e.getKey(), e.getValue());
+             }
+ 
+             if (log.isDebugEnabled())
+                 log.debug("Added system properties to node attributes.");
+         }
+         catch (SecurityException e) {
+             throw new IgniteCheckedException("Failed to add system properties to node attributes due to security " +
+                 "violation: " + e.getMessage());
+         }
+ 
+         // Add local network IPs and MACs.
+         String ips = F.concat(U.allLocalIps(), ", "); // Exclude loopbacks.
+         String macs = F.concat(U.allLocalMACs(), ", "); // Only enabled network interfaces.
+ 
+         // Ack network context.
+         if (log.isInfoEnabled()) {
+             log.info("Non-loopback local IPs: " + (F.isEmpty(ips) ? "N/A" : ips));
+             log.info("Enabled local MACs: " + (F.isEmpty(macs) ? "N/A" : macs));
+         }
+ 
+         // Warn about loopback.
+         if (ips.isEmpty() && macs.isEmpty())
+             U.warn(log, "GridGain is starting on loopback address... Only nodes on the same physical " +
+                 "computer can participate in topology.",
+                 "GridGain is starting on loopback address...");
+ 
+         // Stick in network context into attributes.
+         add(attrs, ATTR_IPS, (ips.isEmpty() ? "" : ips));
+         add(attrs, ATTR_MACS, (macs.isEmpty() ? "" : macs));
+ 
+         // Stick in some system level attributes
+         add(attrs, ATTR_JIT_NAME, U.getCompilerMx() == null ? "" : U.getCompilerMx().getName());
+         add(attrs, ATTR_BUILD_VER, COMPOUND_VER);
+         add(attrs, ATTR_BUILD_DATE, build);
+         add(attrs, ATTR_COMPATIBLE_VERS, (Serializable)compatibleVersions());
+         add(attrs, ATTR_MARSHALLER, cfg.getMarshaller().getClass().getName());
+         add(attrs, ATTR_USER_NAME, System.getProperty("user.name"));
+         add(attrs, ATTR_GRID_NAME, gridName);
+ 
+         add(attrs, ATTR_PEER_CLASSLOADING, cfg.isPeerClassLoadingEnabled());
+         add(attrs, ATTR_DEPLOYMENT_MODE, cfg.getDeploymentMode());
+         add(attrs, ATTR_LANG_RUNTIME, getLanguage());
+ 
+         add(attrs, ATTR_JVM_PID, U.jvmPid());
+ 
+         // Build a string from JVM arguments, because parameters with spaces are split.
+         SB jvmArgs = new SB(512);
+ 
+         for (String arg : U.jvmArgs()) {
+             if (arg.startsWith("-"))
+                 jvmArgs.a("@@@");
+             else
+                 jvmArgs.a(' ');
+ 
+             jvmArgs.a(arg);
+         }
+         // Add it to attributes.
+         add(attrs, ATTR_JVM_ARGS, jvmArgs.toString());
+ 
+         // Check daemon system property and override configuration if it's set.
+         if (isDaemon())
+             add(attrs, ATTR_DAEMON, "true");
+ 
+         // In case of the parsing error, JMX remote disabled or port not being set
+         // node attribute won't be set.
+         if (isJmxRemoteEnabled()) {
+             String portStr = System.getProperty("com.sun.management.jmxremote.port");
+ 
+             if (portStr != null)
+                 try {
+                     add(attrs, ATTR_JMX_PORT, Integer.parseInt(portStr));
+                 }
+                 catch (NumberFormatException ignore) {
+                     // No-op.
+                 }
+         }
+ 
+         // Whether restart is enabled and stick the attribute.
+         add(attrs, ATTR_RESTART_ENABLED, Boolean.toString(isRestartEnabled()));
+ 
+         // Save port range, port numbers will be stored by rest processor at runtime.
+         if (cfg.getClientConnectionConfiguration() != null)
+             add(attrs, ATTR_REST_PORT_RANGE, cfg.getClientConnectionConfiguration().getRestPortRange());
+ 
+         try {
+             AuthenticationSpi authSpi = cfg.getAuthenticationSpi();
+ 
+             boolean securityEnabled = authSpi != null && !U.hasAnnotation(authSpi.getClass(), IgniteSpiNoop.class);
+ 
+             GridSecurityCredentialsProvider provider = cfg.getSecurityCredentialsProvider();
+ 
+             if (provider != null) {
+                 GridSecurityCredentials cred = provider.credentials();
+ 
+                 if (cred != null)
+                     add(attrs, ATTR_SECURITY_CREDENTIALS, cred);
+                 else if (securityEnabled)
+                     throw new IgniteCheckedException("Failed to start node (authentication SPI is configured, " +
+                         "by security credentials provider returned null).");
+             }
+             else if (securityEnabled)
+                 throw new IgniteCheckedException("Failed to start node (authentication SPI is configured, " +
+                     "but security credentials provider is not set. Fix the configuration and restart the node).");
+         }
+         catch (IgniteCheckedException e) {
+             throw new IgniteCheckedException("Failed to create node security credentials", e);
+         }
+ 
+         // Stick in SPI versions and classes attributes.
+         addAttributes(attrs, cfg.getCollisionSpi());
+         addAttributes(attrs, cfg.getSwapSpaceSpi());
+         addAttributes(attrs, cfg.getDiscoverySpi());
+         addAttributes(attrs, cfg.getFailoverSpi());
+         addAttributes(attrs, cfg.getCommunicationSpi());
+         addAttributes(attrs, cfg.getEventStorageSpi());
+         addAttributes(attrs, cfg.getCheckpointSpi());
+         addAttributes(attrs, cfg.getLoadBalancingSpi());
+         addAttributes(attrs, cfg.getAuthenticationSpi());
+         addAttributes(attrs, cfg.getSecureSessionSpi());
+         addAttributes(attrs, cfg.getDeploymentSpi());
+ 
+         // Set user attributes for this node.
+         if (cfg.getUserAttributes() != null) {
+             for (Map.Entry<String, ?> e : cfg.getUserAttributes().entrySet()) {
+                 if (attrs.containsKey(e.getKey()))
+                     U.warn(log, "User or internal attribute has the same name as environment or system " +
+                         "property and will take precedence: " + e.getKey());
+ 
+                 attrs.put(e.getKey(), e.getValue());
+             }
+         }
+ 
+         return attrs;
+     }
+ 
+     /**
+      * Add SPI version and class attributes into node attributes.
+      *
+      * @param attrs Node attributes map to add SPI attributes to.
+      * @param spiList Collection of SPIs to get attributes from.
+      * @throws IgniteCheckedException Thrown if was unable to set up attribute.
+      */
+     private void addAttributes(Map<String, Object> attrs, IgniteSpi... spiList) throws IgniteCheckedException {
+         for (IgniteSpi spi : spiList) {
+             Class<? extends IgniteSpi> spiCls = spi.getClass();
+ 
+             add(attrs, U.spiAttribute(spi, ATTR_SPI_CLASS), spiCls.getName());
+         }
+     }
+ 
+     /** @throws IgniteCheckedException If registration failed. */
+     private void registerKernalMBean() throws IgniteCheckedException {
+         try {
+             kernalMBean = U.registerMBean(
+                 cfg.getMBeanServer(),
+                 cfg.getGridName(),
+                 "Kernal",
+                 getClass().getSimpleName(),
+                 this,
+                 IgniteMXBean.class);
+ 
+             if (log.isDebugEnabled())
+                 log.debug("Registered kernal MBean: " + kernalMBean);
+         }
+         catch (JMException e) {
+             kernalMBean = null;
+ 
+             throw new IgniteCheckedException("Failed to register kernal MBean.", e);
+         }
+     }
+ 
+     /** @throws IgniteCheckedException If registration failed. */
+     private void registerLocalNodeMBean() throws IgniteCheckedException {
+         ClusterLocalNodeMetricsMXBean mbean = new ClusterLocalNodeMetricsMXBeanImpl(ctx.discovery().localNode());
+ 
+         try {
+             locNodeMBean = U.registerMBean(
+                 cfg.getMBeanServer(),
+                 cfg.getGridName(),
+                 "Kernal",
+                 mbean.getClass().getSimpleName(),
+                 mbean,
+                 ClusterLocalNodeMetricsMXBean.class);
+ 
+             if (log.isDebugEnabled())
+                 log.debug("Registered local node MBean: " + locNodeMBean);
+         }
+         catch (JMException e) {
+             locNodeMBean = null;
+ 
+             throw new IgniteCheckedException("Failed to register local node MBean.", e);
+         }
+     }
+ 
+     /** @throws IgniteCheckedException If registration failed. */
+     private void registerExecutorMBeans() throws IgniteCheckedException {
+         pubExecSvcMBean = registerExecutorMBean(cfg.getExecutorService(), "GridExecutionExecutor");
+         sysExecSvcMBean = registerExecutorMBean(cfg.getSystemExecutorService(), "GridSystemExecutor");
+         mgmtExecSvcMBean = registerExecutorMBean(cfg.getManagementExecutorService(), "GridManagementExecutor");
+         p2PExecSvcMBean = registerExecutorMBean(cfg.getPeerClassLoadingExecutorService(), "GridClassLoadingExecutor");
+ 
+         ClientConnectionConfiguration clientCfg = cfg.getClientConnectionConfiguration();
+ 
+         if (clientCfg != null) {
+             restExecSvcMBean = clientCfg.getRestExecutorService() != null ?
+                 registerExecutorMBean(clientCfg.getRestExecutorService(), "GridRestExecutor") : null;
+         }
+     }
+ 
+     /**
+      * @param exec Executor service to register.
+      * @param name Property name for executor.
+      * @return Name for created MBean.
+      * @throws IgniteCheckedException If registration failed.
+      */
+     private ObjectName registerExecutorMBean(ExecutorService exec, String name) throws IgniteCheckedException {
+         assert exec != null;
+ 
+         try {
+             ObjectName res = U.registerMBean(
+                 cfg.getMBeanServer(),
+                 cfg.getGridName(),
+                 "Thread Pools",
+                 name,
+                 new IgniteThreadPoolMXBeanAdapter(exec),
+                 IgniteThreadPoolMXBean.class);
+ 
+             if (log.isDebugEnabled())
+                 log.debug("Registered executor service MBean: " + res);
+ 
+             return res;
+         }
+         catch (JMException e) {
+             throw new IgniteCheckedException("Failed to register executor service MBean [name=" + name + ", exec=" + exec + ']',
+                 e);
+         }
+     }
+ 
+     /**
+      * Unregisters given mbean.
+      *
+      * @param mbean MBean to unregister.
+      * @return {@code True} if successfully unregistered, {@code false} otherwise.
+      */
+     private boolean unregisterMBean(@Nullable ObjectName mbean) {
+         if (mbean != null)
+             try {
+                 cfg.getMBeanServer().unregisterMBean(mbean);
+ 
+                 if (log.isDebugEnabled())
+                     log.debug("Unregistered MBean: " + mbean);
+ 
+                 return true;
+             }
+             catch (JMException e) {
+                 U.error(log, "Failed to unregister MBean.", e);
+ 
+                 return false;
+             }
+ 
+         return true;
+     }
+ 
+     /**
+      * @param ctx Kernal context.
+      * @param mgr Manager to start.
+      * @param attrs SPI attributes to set.
+      * @throws IgniteCheckedException Throw in case of any errors.
+      */
+     private void startManager(GridKernalContextImpl ctx, GridManager mgr, Map<String, Object> attrs)
+         throws IgniteCheckedException {
+         mgr.addSpiAttributes(attrs);
+ 
+         // Set all node attributes into discovery manager,
+         // so they can be distributed to all nodes.
+         if (mgr instanceof GridDiscoveryManager)
+             ((GridDiscoveryManager)mgr).setNodeAttributes(attrs, ctx.product().version());
+ 
+         // Add manager to registry before it starts to avoid
+         // cases when manager is started but registry does not
+         // have it yet.
+         ctx.add(mgr);
+ 
+         try {
+             mgr.start();
+         }
+         catch (IgniteCheckedException e) {
+             throw new IgniteCheckedException("Failed to start manager: " + mgr, e);
+         }
+     }
+ 
+     /**
+      * @param ctx Kernal context.
+      * @param proc Processor to start.
+      * @param attrs Attributes.
+      * @throws IgniteCheckedException Thrown in case of any error.
+      */
+     private void startProcessor(GridKernalContextImpl ctx, GridProcessor proc, Map<String, Object> attrs)
+         throws IgniteCheckedException {
+         ctx.add(proc);
+ 
+         try {
+             proc.start();
+ 
+             proc.addAttributes(attrs);
+         }
+         catch (IgniteCheckedException e) {
+             throw new IgniteCheckedException("Failed to start processor: " + proc, e);
+         }
+     }
+ 
+     /**
+      * Add helper.
+      *
+      * @param ctx Context.
+      * @param helper Helper.
+      */
+     private void addHelper(GridKernalContextImpl ctx, Object helper) {
+         ctx.addHelper(helper);
+     }
+ 
+     /**
+      * Gets "on" or "off" string for given boolean value.
+      *
+      * @param b Boolean value to convert.
+      * @return Result string.
+      */
+     private String onOff(boolean b) {
+         return b ? "on" : "off";
+     }
+ 
+     /**
+      *
+      * @return Whether or not REST is enabled.
+      */
+     private boolean isRestEnabled() {
+         assert cfg != null;
+ 
+         return cfg.getClientConnectionConfiguration() != null;
+     }
+ 
+     /**
+      * Acks remote management.
+      */
+     private void ackRemoteManagement() {
+         assert log != null;
+ 
+         if (!log.isInfoEnabled())
+             return;
+ 
+         SB sb = new SB();
+ 
+         sb.a("Remote Management [");
+ 
+         boolean on = isJmxRemoteEnabled();
+ 
+         sb.a("restart: ").a(onOff(isRestartEnabled())).a(", ");
+         sb.a("REST: ").a(onOff(isRestEnabled())).a(", ");
+         sb.a("JMX (");
+         sb.a("remote: ").a(onOff(on));
+ 
+         if (on) {
+             sb.a(", ");
+ 
+             sb.a("port: ").a(System.getProperty("com.sun.management.jmxremote.port", "<n/a>")).a(", ");
+             sb.a("auth: ").a(onOff(Boolean.getBoolean("com.sun.management.jmxremote.authenticate"))).a(", ");
+ 
+             // By default SSL is enabled, that's why additional check for null is needed.
+             // See http://docs.oracle.com/javase/6/docs/technotes/guides/management/agent.html
+             sb.a("ssl: ").a(onOff(Boolean.getBoolean("com.sun.management.jmxremote.ssl") ||
+                 System.getProperty("com.sun.management.jmxremote.ssl") == null));
+         }
+ 
+         sb.a(")");
+ 
+         sb.a(']');
+ 
+         log.info(sb.toString());
+     }
+ 
+     /**
+      * Acks configuration URL.
+      */
+     private void ackConfigUrl() {
+         assert log != null;
+ 
+         if (log.isInfoEnabled())
+             log.info("Config URL: " + System.getProperty(GG_CONFIG_URL, "n/a"));
+     }
+ 
+     /**
+      * Acks Visor instructions.
+      */
+     private void ackVisor() {
+         assert log != null;
+ 
+         if (isDaemon())
+             return;
+ 
+         if (ctx.isEnterprise())
+             U.quietAndInfo(log, "To start GUI Management & Monitoring run ggvisorui.{sh|bat}");
+         else
+             U.quietAndInfo(log, "To start Console Management & Monitoring run ggvisorcmd.{sh|bat}");
+     }
+ 
+     /**
+      * Acks benchmarking instructions.
+      */
+     private void ackBenchmarks() {
+         if (!isDaemon())
+             U.quietAndInfo(log, "If running benchmarks, see http://bit.ly/GridGain-Benchmarking");
+     }
+ 
+     /**
+      * Acks ASCII-logo. Thanks to http://patorjk.com/software/taag
+      */
+     private void ackAsciiLogo() {
+         assert log != null;
+ 
+         String fileName = log.fileName();
+ 
+         if (System.getProperty(GG_NO_ASCII) == null) {
+             String ver = "ver. " + ACK_VER;
+ 
+             // Big thanks to: http://patorjk.com/software/taag
+             // Font name "Small Slant"
+             if (log.isQuiet()) {
+                 U.quiet(false,
+                     "   __________  ________________ ",
+                     "  /  _/ ___/ |/ /  _/_  __/ __/ ",
+                     " _/ // (_ /    // /  / / / _/   ",
+                     "/___/\\___/_/|_/___/ /_/ /___/  ",
+                     " ",
+                     ver,
+                     COPYRIGHT,
+                     "",
+                     "Quiet mode.");
+ 
+                 if (fileName != null)
+                     U.quiet(false, "  ^-- Logging to file '" +  fileName + '\'');
+ 
+                 U.quiet(false,
+                     "  ^-- To see **FULL** console log here add -DGRIDGAIN_QUIET=false or \"-v\" to ggstart.{sh|bat}",
+                     "");
+             }
+ 
+             if (log.isInfoEnabled()) {
+                 log.info(NL + NL +
+                     ">>>    __________  ________________  " + NL +
+                     ">>>   /  _/ ___/ |/ /  _/_  __/ __/  " + NL +
+                     ">>>  _/ // (_ /    // /  / / / _/    " + NL +
+                     ">>> /___/\\___/_/|_/___/ /_/ /___/   " + NL +
+                     ">>> " + NL +
+                     ">>> " + ver + NL +
+                     ">>> " + COPYRIGHT + NL
+                 );
+             }
+         }
+     }
+ 
+     /**
+      * Prints start info.
+      *
+      * @param rtBean Java runtime bean.
+      */
+     private void ackStart(RuntimeMXBean rtBean) {
+         if (log.isQuiet()) {
+             U.quiet(false, "");
+             U.quiet(false, "GridGain node started OK (id=" + U.id8(localNode().id()) +
+                 (F.isEmpty(gridName) ? "" : ", grid=" + gridName) + ')');
+         }
+ 
+         if (log.isInfoEnabled()) {
+             log.info("");
+ 
+             String ack = "GridGain ver. " + COMPOUND_VER + '#' + BUILD_TSTAMP_STR + "-sha1:" + REV_HASH;
+ 
+             String dash = U.dash(ack.length());
+ 
+             SB sb = new SB();
+ 
+             for (GridPortRecord rec : ctx.ports().records())
+                 sb.a(rec.protocol()).a(":").a(rec.port()).a(" ");
+ 
+             String str =
+                 NL + NL +
+                     ">>> " + dash + NL +
+                     ">>> " + ack + NL +
+                     ">>> " + dash + NL +
+                     ">>> OS name: " + U.osString() + NL +
+                     ">>> CPU(s): " + localNode().metrics().getTotalCpus() + NL +
+                     ">>> Heap: " + U.heapSize(localNode(), 2) + "GB" + NL +
+                     ">>> VM name: " + rtBean.getName() + NL +
+                     ">>> Grid name: " + gridName + NL +
+                     ">>> Local node [" +
+                     "ID=" + localNode().id().toString().toUpperCase() +
+                     ", order=" + localNode().order() +
+                     "]" + NL +
+                     ">>> Local node addresses: " + U.addressesAsString(localNode()) + NL +
+                     ">>> Local ports: " + sb + NL;
+ 
+             str += ">>> GridGain documentation: http://" + SITE + "/documentation" + NL;
+ 
+             log.info(str);
+         }
+     }
+ 
+     /**
+      * Logs out OS information.
+      */
+     private void ackOsInfo() {
+         assert log != null;
+ 
+         if (log.isInfoEnabled()) {
+             log.info("OS: " + U.osString());
+             log.info("OS user: " + System.getProperty("user.name"));
+         }
+     }
+ 
+     /**
+      * Logs out language runtime.
+      */
+     private void ackLanguageRuntime() {
+         assert log != null;
+ 
+         if (log.isInfoEnabled()) {
+             log.info("Language runtime: " + getLanguage());
+             log.info("VM information: " + U.jdkString());
+             log.info("VM total memory: " + U.heapSize(2) + "GB");
+         }
+     }
+ 
+     /**
+      * @return Language runtime.
+      */
+     @SuppressWarnings("ThrowableInstanceNeverThrown")
+     private String getLanguage() {
+         boolean scala = false;
+         boolean groovy = false;
+         boolean clojure = false;
+ 
+         for (StackTraceElement elem : Thread.currentThread().getStackTrace()) {
+             String s = elem.getClassName().toLowerCase();
+ 
+             if (s.contains("scala")) {
+                 scala = true;
+ 
+                 break;
+             }
+             else if (s.contains("groovy")) {
+                 groovy = true;
+ 
+                 break;
+             }
+             else if (s.contains("clojure")) {
+                 clojure = true;
+ 
+                 break;
+             }
+         }
+ 
+         if (scala) {
+             try (InputStream in = getClass().getResourceAsStream("/library.properties")) {
+                 Properties props = new Properties();
+ 
+                 if (in != null)
+                     props.load(in);
+ 
+                 return "Scala ver. " + props.getProperty("version.number", "<unknown>");
+             }
+             catch (Throwable ignore) {
+                 return "Scala ver. <unknown>";
+             }
+         }
+ 
+         // How to get Groovy and Clojure version at runtime?!?
+         return groovy ? "Groovy" : clojure ? "Clojure" : U.jdkName() + " ver. " + U.jdkVersion();
+     }
+ 
+     /**
+      * Stops grid instance.
+      *
+      * @param cancel Whether or not to cancel running jobs.
+      */
+     public void stop(boolean cancel) {
+         // Make sure that thread stopping grid is not interrupted.
+         boolean interrupted = Thread.interrupted();
+ 
+         try {
+             stop0(cancel);
+         }
+         finally {
+             if (interrupted)
+                 Thread.currentThread().interrupt();
+         }
+     }
+ 
+     /**
+      * @param cancel Whether or not to cancel running jobs.
+      */
+     private void stop0(boolean cancel) {
+         String nid = getLocalNodeId().toString().toUpperCase();
+         String nid8 = U.id8(getLocalNodeId()).toUpperCase();
+ 
+         gw.compareAndSet(null, new GridKernalGatewayImpl(gridName));
+ 
+         GridKernalGateway gw = this.gw.get();
+ 
+         if (stopGuard.compareAndSet(false, true)) {
+             // Only one thread is allowed to perform stop sequence.
+             boolean firstStop = false;
+ 
+             GridKernalState state = gw.getState();
+ 
+             if (state == STARTED)
+                 firstStop = true;
+             else if (state == STARTING)
+                 U.warn(log, "Attempt to stop starting grid. This operation " +
+                     "cannot be guaranteed to be successful.");
+ 
+             if (firstStop) {
+                 // Notify lifecycle beans.
+                 if (log.isDebugEnabled())
+                     log.debug("Notifying lifecycle beans.");
+ 
+                 notifyLifecycleBeansEx(LifecycleEventType.BEFORE_GRID_STOP);
+             }
+ 
+             IgniteEmailProcessorAdapter email = ctx.email();
+ 
+             List<GridComponent> comps = ctx.components();
+ 
+             // Callback component in reverse order while kernal is still functional
+             // if called in the same thread, at least.
+             for (ListIterator<GridComponent> it = comps.listIterator(comps.size()); it.hasPrevious();) {
+                 GridComponent comp = it.previous();
+ 
+                 try {
+                     comp.onKernalStop(cancel);
+                 }
+                 catch (Throwable e) {
+                     errOnStop = true;
+ 
+                     U.error(log, "Failed to pre-stop processor: " + comp, e);
+                 }
+             }
+ 
+             // Cancel update notification timer.
+             if (updateNtfTimer != null)
+                 updateNtfTimer.cancel();
+ 
+             if (starveTimer != null)
+                 starveTimer.cancel();
+ 
+             // Cancel license timer.
+             if (licTimer != null)
+                 licTimer.cancel();
+ 
+             // Cancel metrics log timer.
+             if (metricsLogTimer != null)
+                 metricsLogTimer.cancel();
+ 
+             gw.writeLock();
+ 
+             try {
+                 assert gw.getState() == STARTED || gw.getState() == STARTING;
+ 
+                 // No more kernal calls from this point on.
+                 gw.setState(STOPPING);
+ 
+                 // Clear node local store.
+                 nodeLoc.clear();
+ 
+                 if (log.isDebugEnabled())
+                     log.debug("Grid " + (gridName == null ? "" : '\'' + gridName + "' ") + "is stopping.");
+             }
+             finally {
+                 gw.writeUnlock();
+             }
+ 
+             // Unregister MBeans.
+             if (!(
+                 unregisterMBean(pubExecSvcMBean) &
+                     unregisterMBean(sysExecSvcMBean) &
+                     unregisterMBean(mgmtExecSvcMBean) &
+                     unregisterMBean(p2PExecSvcMBean) &
+                     unregisterMBean(kernalMBean) &
+                     unregisterMBean(locNodeMBean) &
+                     unregisterMBean(restExecSvcMBean)
+             ))
+                 errOnStop = false;
+ 
+             // Stop components in reverse order.
+             for (ListIterator<GridComponent> it = comps.listIterator(comps.size()); it.hasPrevious();) {
+                 GridComponent comp = it.previous();
+ 
+                 try {
+                     comp.stop(cancel);
+ 
+                     if (log.isDebugEnabled())
+                         log.debug("Component stopped: " + comp);
+                 }
+                 catch (Throwable e) {
+                     errOnStop = true;
+ 
+                     U.error(log, "Failed to stop component (ignoring): " + comp, e);
+                 }
+             }
+ 
+             // Stops lifecycle aware components.
+             U.stopLifecycleAware(log, lifecycleAwares(cfg));
+ 
+             // Lifecycle notification.
+             notifyLifecycleBeansEx(LifecycleEventType.AFTER_GRID_STOP);
+ 
+             // Clean internal class/classloader caches to avoid stopped contexts held in memory.
+             IgniteOptimizedMarshaller.clearCache();
+             IgniteMarshallerExclusions.clearCache();
+             GridEnumCache.clear();
+ 
+             gw.writeLock();
+ 
+             try {
+                 gw.setState(STOPPED);
+             }
+             finally {
+                 gw.writeUnlock();
+             }
+ 
+             // Ack stop.
+             if (log.isQuiet()) {
+                 if (!errOnStop)
+                     U.quiet(false, "GridGain node stopped OK [uptime=" +
+                         X.timeSpan2HMSM(U.currentTimeMillis() - startTime) + ']');
+                 else
+                     U.quiet(true, "GridGain node stopped wih ERRORS [uptime=" +
+                         X.timeSpan2HMSM(U.currentTimeMillis() - startTime) + ']');
+             }
+ 
+             if (log.isInfoEnabled())
+                 if (!errOnStop) {
+                     String ack = "GridGain ver. " + COMPOUND_VER + '#' + BUILD_TSTAMP_STR + "-sha1:" + REV_HASH +
+                         " stopped OK";
+ 
+                     String dash = U.dash(ack.length());
+ 
+                     log.info(NL + NL +
+                         ">>> " + dash + NL +
+                         ">>> " + ack + NL +
+                         ">>> " + dash + NL +
+                         ">>> Grid name: " + gridName + NL +
+                         ">>> Grid uptime: " + X.timeSpan2HMSM(U.currentTimeMillis() - startTime) +
+                         NL +
+                         NL);
+                 }
+                 else {
+                     String ack = "GridGain ver. " + COMPOUND_VER + '#' + BUILD_TSTAMP_STR + "-sha1:" + REV_HASH +
+                         " stopped with ERRORS";
+ 
+                     String dash = U.dash(ack.length());
+ 
+                     log.info(NL + NL +
+                         ">>> " + ack + NL +
+                         ">>> " + dash + NL +
+                         ">>> Grid name: " + gridName + NL +
+                         ">>> Grid uptime: " + X.timeSpan2HMSM(U.currentTimeMillis() - startTime) +
+                         NL +
+                         ">>> See log above for detailed error message." + NL +
+                         ">>> Note that some errors during stop can prevent grid from" + NL +
+                         ">>> maintaining correct topology since this node may have" + NL +
+                         ">>> not exited grid properly." + NL +
+                         NL);
+                 }
+ 
+             // Send node start email notification, if enabled.
+             if (isSmtpEnabled() && isAdminEmailsSet() && cfg.isLifeCycleEmailNotification()) {
+                 String errOk = errOnStop ? "with ERRORS" : "OK";
+ 
+                 String headline = "GridGain ver. " + COMPOUND_VER + '#' + BUILD_TSTAMP_STR +
+                     " stopped " + errOk + ":";
+                 String subj = "GridGain node stopped " + errOk + ": " + nid8;
+ 
+                 IgniteProductLicense lic = ctx.license() != null ? ctx.license().license() : null;
+ 
+                 String body =
+                     headline + NL + NL +
+                     "----" + NL +
+                     "GridGain ver. " + COMPOUND_VER + '#' + BUILD_TSTAMP_STR + "-sha1:" + REV_HASH + NL +
+                     "Grid name: " + gridName + NL +
+                     "Node ID: " + nid + NL +
+                     "Node uptime: " + X.timeSpan2HMSM(U.currentTimeMillis() - startTime) + NL;
+ 
+                 if (lic != null) {
+                     body +=
+                         "License ID: " + lic.id().toString().toUpperCase() + NL +
+                         "Licensed to: " + lic.userOrganization() + NL;
+                 }
+                 else
+                     assert !ENT;
+ 
+                 body +=
+                     "----" + NL +
+                     NL +
+                     "NOTE:" + NL +
+                     "This message is sent automatically to all configured admin emails." + NL +
+                     "To change this behavior use 'lifeCycleEmailNotify' grid configuration property.";
+ 
+                 if (errOnStop)
+                     body +=
+                         NL + NL +
+                             "NOTE:" + NL +
+                             "See node's log for detailed error message." + NL +
+                             "Some errors during stop can prevent grid from" + NL +
+                             "maintaining correct topology since this node may " + NL +
+                             "have not exited grid properly.";
+ 
+                 body +=
+                     NL + NL +
+                         "| " + SITE + NL +
+                         "| support@gridgain.com" + NL;
+ 
+                 if (email != null) {
+                     try {
+                         email.sendNow(subj,
+                             body,
+                             false,
+                             Arrays.asList(cfg.getAdminEmails()));
+                     }
+                     catch (IgniteCheckedException e) {
+                         U.error(log, "Failed to send lifecycle email notification.", e);
+                     }
+                 }
+             }
+ 
+             U.onGridStop();
+         }
+         else {
+             // Proper notification.
+             if (log.isDebugEnabled()) {
+                 if (gw.getState() == STOPPED)
+                     log.debug("Grid is already stopped. Nothing to do.");
+                 else
+                     log.debug("Grid is being stopped by another thread. Aborting this stop sequence " +
+                         "allowing other thread to finish.");
+             }
+         }
+     }
+ 
+     /**
+      * USED ONLY FOR TESTING.
+      *
+      * @param <K> Key type.
+      * @param <V> Value type.
+      * @return Internal cache instance.
+      */
+     /*@java.test.only*/
+     public <K, V> GridCacheAdapter<K, V> internalCache() {
+         return internalCache(null);
+     }
+ 
+     /**
+      * USED ONLY FOR TESTING.
+      *
+      * @param name Cache name.
+      * @param <K>  Key type.
+      * @param <V>  Value type.
+      * @return Internal cache instance.
+      */
+     /*@java.test.only*/
+     public <K, V> GridCacheAdapter<K, V> internalCache(@Nullable String name) {
+         return ctx.cache().internalCache(name);
+     }
+ 
+     /**
+      * It's intended for use by internal marshalling implementation only.
+      *
+      * @return Kernal context.
+      */
+     public GridKernalContext context() {
+         return ctx;
+     }
+ 
+     /**
+      * Prints all system properties in debug mode.
+      */
+     private void ackSystemProperties() {
+         assert log != null;
+ 
+         if (log.isDebugEnabled())
+             for (Object key : U.asIterable(System.getProperties().keys()))
+                 log.debug("System property [" + key + '=' + System.getProperty((String) key) + ']');
+     }
+ 
+     /**
+      * Prints all user attributes in info mode.
+      */
+     private void logNodeUserAttributes() {
+         assert log != null;
+ 
+         if (log.isInfoEnabled())
+             for (Map.Entry<?, ?> attr : cfg.getUserAttributes().entrySet())
+                 log.info("Local node user attribute [" + attr.getKey() + '=' + attr.getValue() + ']');
+     }
+ 
+     /**
+      * Prints all environment variables in debug mode.
+      */
+     private void ackEnvironmentVariables() {
+         assert log != null;
+ 
+         if (log.isDebugEnabled())
+             for (Map.Entry<?, ?> envVar : System.getenv().entrySet())
+                 log.debug("Environment variable [" + envVar.getKey() + '=' + envVar.getValue() + ']');
+     }
+ 
+     /**
+      * Acks daemon mode status.
+      */
+     private void ackDaemon() {
+         assert log != null;
+ 
+         if (log.isInfoEnabled())
+             log.info("Daemon mode: " + (isDaemon() ? "on" : "off"));
+     }
+ 
+     /**
+      *
+      * @return {@code True} is this node is daemon.
+      */
+     private boolean isDaemon() {
+         assert cfg != null;
+ 
+         return cfg.isDaemon() || "true".equalsIgnoreCase(System.getProperty(GG_DAEMON));
+     }
+ 
+     /**
+      * Whether or not remote JMX management is enabled for this node. Remote JMX management is
+      * enabled when the following system property is set:
+      * <ul>
+      *     <li>{@code com.sun.management.jmxremote}</li>
+      * </ul>
+      *
+      * @return {@code True} if remote JMX management is enabled - {@code false} otherwise.
+      */
+     @Override public boolean isJmxRemoteEnabled() {
+         return System.getProperty("com.sun.management.jmxremote") != null;
+     }
+ 
+     /**
+      * Whether or not node restart is enabled. Node restart us supported when this node was started
+      * with {@code bin/ggstart.{sh|bat}} script using {@code -r} argument. Node can be
+      * programmatically restarted using {@link org.apache.ignite.Ignition#restart(boolean)}} method.
+      *
+      * @return {@code True} if restart mode is enabled, {@code false} otherwise.
+      * @see org.apache.ignite.Ignition#restart(boolean)
+      */
+     @Override public boolean isRestartEnabled() {
+         return System.getProperty(GG_SUCCESS_FILE) != null;
+     }
+ 
+     /**
+      * Whether or not SMTP is configured. Note that SMTP is considered configured if
+      * SMTP host is provided in configuration (see {@link org.apache.ignite.configuration.IgniteConfiguration#getSmtpHost()}.
+      * <p>
+      * If SMTP is not configured all emails notifications will be disabled.
+      *
+      * @return {@code True} if SMTP is configured - {@code false} otherwise.
+      * @see org.apache.ignite.configuration.IgniteConfiguration#getSmtpFromEmail()
+      * @see org.apache.ignite.configuration.IgniteConfiguration#getSmtpHost()
+      * @see org.apache.ignite.configuration.IgniteConfiguration#getSmtpPassword()
+      * @see org.apache.ignite.configuration.IgniteConfiguration#getSmtpPort()
+      * @see org.apache.ignite.configuration.IgniteConfiguration#getSmtpUsername()
+      * @see org.apache.ignite.configuration.IgniteConfiguration#isSmtpSsl()
+      * @see org.apache.ignite.configuration.IgniteConfiguration#isSmtpStartTls()
+      * @see #sendAdminEmailAsync(String, String, boolean)
+      */
+     @Override public boolean isSmtpEnabled() {
+         assert cfg != null;
+ 
+         return cfg.getSmtpHost() != null;
+     }
+ 
+     /**
+      * Prints all configuration properties in info mode and SPIs in debug mode.
+      */
+     private void ackSpis() {
+         assert log != null;
+ 
+         if (log.isDebugEnabled()) {
+             log.debug("+-------------+");
+             log.debug("START SPI LIST:");
+             log.debug("+-------------+");
+             log.debug("Grid checkpoint SPI     : " + Arrays.toString(cfg.getCheckpointSpi()));
+             log.debug("Grid collision SPI      : " + cfg.getCollisionSpi());
+             log.debug("Grid communication SPI  : " + cfg.getCommunicationSpi());
+             log.debug("Grid deployment SPI     : " + cfg.getDeploymentSpi());
+             log.debug("Grid discovery SPI      : " + cfg.getDiscoverySpi());
+             log.debug("Grid event storage SPI  : " + cfg.getEventStorageSpi());
+             log.debug("Grid failover SPI       : " + Arrays.toString(cfg.getFailoverSpi()));
+             log.debug("Grid load balancing SPI : " + Arrays.toString(cfg.getLoadBalancingSpi()));
+             log.debug("Grid authentication SPI : " + cfg.getAuthenticationSpi());
+             log.debug("Grid secure session SPI : " + cfg.getSecureSessionSpi());
+             log.debug("Grid swap space SPI     : " + cfg.getSwapSpaceSpi());
+         }
+     }


<TRUNCATED>

[12/50] [abbrv] incubator-ignite git commit: # sprint-1 Fixed typo after auto renaming.

Posted by se...@apache.org.
# sprint-1 Fixed typo after auto renaming.


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

Branch: refs/heads/ignite-sql
Commit: 9502c0d9f747bc77d6e10f999d86e7f6dc5cb402
Parents: 580c36e
Author: AKuznetsov <ak...@gridgain.com>
Authored: Thu Jan 29 22:35:26 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Thu Jan 29 22:35:26 2015 +0700

----------------------------------------------------------------------
 .../org/apache/ignite/visor/commands/alert/VisorAlertCommand.scala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9502c0d9/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/alert/VisorAlertCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/alert/VisorAlertCommand.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/alert/VisorAlertCommand.scala
index ca22fa1..837b424 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/alert/VisorAlertCommand.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/alert/VisorAlertCommand.scala
@@ -17,7 +17,7 @@
 
 package org.apache.ignite.visor.commands.alert
 
-import org.apache.ignite.internal.util.IgniteUtils
+import org.apache.ignite.internal.util.{IgniteUtils => U}
 import org.apache.ignite.internal.util.lang.{GridFunc => F}
 
 import org.apache.ignite._


[20/50] [abbrv] incubator-ignite git commit: Merge remote-tracking branch 'remotes/origin/sprint-1' into ignite-71

Posted by se...@apache.org.
Merge remote-tracking branch 'remotes/origin/sprint-1' into ignite-71


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

Branch: refs/heads/ignite-sql
Commit: 2690391596363075afddd447c5025c39b28df1d6
Parents: 258a0e7 9550905
Author: avinogradov <av...@gridgain.com>
Authored: Fri Jan 30 11:33:47 2015 +0300
Committer: avinogradov <av...@gridgain.com>
Committed: Fri Jan 30 11:33:47 2015 +0300

----------------------------------------------------------------------
 assembly/release-hadoop.xml                     |    6 +-
 ipc/shmem/Makefile.am                           |    2 +-
 ipc/shmem/Makefile.in                           |    2 +-
 ipc/shmem/configure                             |    4 +-
 ipc/shmem/configure.ac                          |    2 +-
 ipc/shmem/ggshmem/Makefile.am                   |   23 -
 ipc/shmem/ggshmem/Makefile.in                   |  589 --
 ..._util_ipc_shmem_GridIpcSharedMemoryUtils.cpp |  882 --
 ipc/shmem/igniteshmem/Makefile.am               |   23 +
 ipc/shmem/igniteshmem/Makefile.in               |  589 ++
 ...rnal_util_ipc_shmem_IpcSharedMemoryUtils.cpp |  882 ++
 ipc/shmem/include/Makefile.am                   |    2 +-
 ipc/shmem/include/Makefile.in                   |    2 +-
 ...ternal_util_ipc_shmem_IpcSharedMemoryUtils.h |  117 +
 ...id_util_ipc_shmem_GridIpcSharedMemoryUtils.h |  117 -
 ipc/shmem/readme.txt                            |    9 +-
 .../spi/checkpoint/s3/S3CheckpointSpi.java      |    4 +-
 .../ClientPropertiesConfigurationSelfTest.java  |    4 +-
 .../java/META-INF/native/linux64/libggshmem.so  |  Bin 138023 -> 0 bytes
 .../META-INF/native/linux64/libigniteshmem.so   |  Bin 0 -> 138345 bytes
 .../java/META-INF/native/osx/libggshmem.dylib   |  Bin 32940 -> 0 bytes
 .../META-INF/native/osx/libigniteshmem.dylib    |  Bin 0 -> 33116 bytes
 .../apache/ignite/IgniteCheckedException.java   |    2 +-
 .../java/org/apache/ignite/IgniteException.java |    2 +-
 .../processors/cache/GridCacheAdapter.java      |   16 +-
 .../cache/GridCacheDeploymentManager.java       |    2 +-
 .../cache/GridCacheMvccCandidate.java           |    4 +-
 .../processors/cache/GridCacheStoreManager.java |   25 +-
 .../processors/cache/IgniteCacheProxy.java      |   24 +-
 .../transactions/IgniteTxLocalAdapter.java      |   42 +-
 .../internal/processors/fs/GridGgfsServer.java  |   26 +-
 .../processors/fs/GridGgfsServerManager.java    |    8 +-
 .../processors/fs/IgniteFsNoopProcessor.java    |    2 +-
 .../processors/fs/IgniteFsProcessor.java        |    4 +-
 .../processors/fs/IgniteFsProcessorAdapter.java |    2 +-
 .../service/GridServiceProcessor.java           |    2 +-
 .../apache/ignite/internal/util/GridUtils.java  | 9100 -----------------
 .../ignite/internal/util/IgniteUtils.java       | 9141 ++++++++++++++++++
 .../internal/util/ipc/GridIpcEndpoint.java      |   49 -
 .../util/ipc/GridIpcEndpointBindException.java  |   47 -
 .../util/ipc/GridIpcEndpointFactory.java        |   84 -
 .../internal/util/ipc/GridIpcEndpointType.java  |   29 -
 .../util/ipc/GridIpcServerEndpoint.java         |   73 -
 .../ipc/GridIpcServerEndpointDeserializer.java  |   66 -
 .../internal/util/ipc/GridIpcToNioAdapter.java  |  250 -
 .../ignite/internal/util/ipc/IpcEndpoint.java   |   49 +
 .../util/ipc/IpcEndpointBindException.java      |   47 +
 .../internal/util/ipc/IpcEndpointFactory.java   |   84 +
 .../internal/util/ipc/IpcEndpointType.java      |   29 +
 .../internal/util/ipc/IpcServerEndpoint.java    |   73 +
 .../util/ipc/IpcServerEndpointDeserializer.java |   66 +
 .../internal/util/ipc/IpcToNioAdapter.java      |  250 +
 .../ipc/loopback/GridIpcClientTcpEndpoint.java  |   87 -
 .../ipc/loopback/GridIpcServerTcpEndpoint.java  |  179 -
 .../util/ipc/loopback/IpcClientTcpEndpoint.java |   87 +
 .../util/ipc/loopback/IpcServerTcpEndpoint.java |  179 +
 .../GridIpcOutOfSystemResourcesException.java   |   59 -
 .../GridIpcSharedMemoryClientEndpoint.java      |  336 -
 .../shmem/GridIpcSharedMemoryInitRequest.java   |   67 -
 .../shmem/GridIpcSharedMemoryInitResponse.java  |  171 -
 .../shmem/GridIpcSharedMemoryInputStream.java   |   99 -
 .../shmem/GridIpcSharedMemoryNativeLoader.java  |  242 -
 ...cSharedMemoryOperationTimedoutException.java |   59 -
 .../shmem/GridIpcSharedMemoryOutputStream.java  |   80 -
 .../GridIpcSharedMemoryServerEndpoint.java      |  707 --
 .../ipc/shmem/GridIpcSharedMemorySpace.java     |  374 -
 .../ipc/shmem/GridIpcSharedMemoryUtils.java     |  242 -
 .../shmem/IpcOutOfSystemResourcesException.java |   59 +
 .../shmem/IpcSharedMemoryClientEndpoint.java    |  336 +
 .../ipc/shmem/IpcSharedMemoryInitRequest.java   |   67 +
 .../ipc/shmem/IpcSharedMemoryInitResponse.java  |  171 +
 .../ipc/shmem/IpcSharedMemoryInputStream.java   |   99 +
 .../ipc/shmem/IpcSharedMemoryNativeLoader.java  |  261 +
 ...cSharedMemoryOperationTimedoutException.java |   59 +
 .../ipc/shmem/IpcSharedMemoryOutputStream.java  |   80 +
 .../shmem/IpcSharedMemoryServerEndpoint.java    |  707 ++
 .../util/ipc/shmem/IpcSharedMemorySpace.java    |  374 +
 .../util/ipc/shmem/IpcSharedMemoryUtils.java    |  242 +
 .../util/nio/GridShmemCommunicationClient.java  |    4 +-
 .../internal/util/typedef/internal/U.java       |    4 +-
 .../visor/misc/VisorResolveHostNameTask.java    |    2 +-
 .../visor/node/VisorNodeDataCollectorJob.java   |    4 +-
 .../internal/visor/query/VisorQueryUtils.java   |    4 +-
 .../ignite/lang/IgniteAsyncSupportAdapter.java  |   27 +-
 .../optimized/IgniteOptimizedMarshaller.java    |    2 +-
 .../communication/tcp/TcpCommunicationSpi.java  |   24 +-
 .../IgniteExceptionHelpLinksSelfTest.java       |    3 +-
 .../GridEventStorageCheckAllEventsSelfTest.java |    2 +-
 .../cache/GridCacheAbstractMetricsSelfTest.java |   10 +-
 .../GridCacheAbstractProjectionSelfTest.java    |   50 +
 .../GridCacheReturnValueTransferSelfTest.java   |    2 +-
 .../cache/IgniteCacheInvokeAbstractTest.java    |    4 +-
 .../IgniteCrossCacheTxStoreSelfTest.java        |  288 +
 ...GridCacheValueConsistencyAtomicSelfTest.java |    2 +-
 .../IgniteCacheTxStoreSessionTest.java          |   11 +-
 ...IpcEndpointRegistrationAbstractSelfTest.java |    4 +-
 ...pcEndpointRegistrationOnWindowsSelfTest.java |    4 +-
 .../cache/GridCacheCommandHandlerSelfTest.java  |    4 +-
 ...artupWithSpecifiedWorkDirectorySelfTest.java |    2 +-
 ...tartupWithUndefinedGridGainHomeSelfTest.java |    4 +-
 .../internal/util/GridTestClockTimer.java       |    6 +-
 .../ignite/internal/util/GridUtilsSelfTest.java |  717 --
 .../internal/util/IgniteUtilsSelfTest.java      |  728 ++
 ...idIpcServerEndpointDeserializerSelfTest.java |  160 -
 .../IpcServerEndpointDeserializerSelfTest.java  |  160 +
 .../ipc/shmem/GgfsSharedMemoryTestClient.java   |   76 +
 .../ipc/shmem/GgfsSharedMemoryTestServer.java   |   71 +
 .../shmem/GridGgfsSharedMemoryTestClient.java   |   76 -
 .../shmem/GridGgfsSharedMemoryTestServer.java   |   71 -
 ...idIpcSharedMemoryCrashDetectionSelfTest.java |  500 -
 .../shmem/GridIpcSharedMemoryFakeClient.java    |   36 -
 .../shmem/GridIpcSharedMemoryNodeStartup.java   |   87 -
 .../shmem/GridIpcSharedMemorySpaceSelfTest.java |  267 -
 .../shmem/GridIpcSharedMemoryUtilsSelfTest.java |   84 -
 .../IpcSharedMemoryCrashDetectionSelfTest.java  |  500 +
 .../ipc/shmem/IpcSharedMemoryFakeClient.java    |   36 +
 .../IpcSharedMemoryNativeLoaderSelfTest.java    |   78 +
 .../ipc/shmem/IpcSharedMemoryNodeStartup.java   |   87 +
 .../ipc/shmem/IpcSharedMemorySpaceSelfTest.java |  267 +
 .../ipc/shmem/IpcSharedMemoryUtilsSelfTest.java |   84 +
 .../LoadWithCorruptedLibFileTestRunner.java     |   65 +
 .../GridIpcSharedMemoryBenchmarkParty.java      |   35 -
 .../GridIpcSharedMemoryBenchmarkReader.java     |  133 -
 .../GridIpcSharedMemoryBenchmarkWriter.java     |  125 -
 .../IpcSharedMemoryBenchmarkParty.java          |   35 +
 .../IpcSharedMemoryBenchmarkReader.java         |  133 +
 .../IpcSharedMemoryBenchmarkWriter.java         |  125 +
 .../ignite/lang/GridSetWrapperSelfTest.java     |    2 +-
 .../ignite/testsuites/IgniteCacheTestSuite.java |    1 +
 .../ignite/testsuites/IgniteFsTestSuite.java    |    2 +-
 .../IgniteIpcSharedMemorySelfTestSuite.java     |    7 +-
 .../testsuites/IgniteUtilSelfTestSuite.java     |    2 +-
 .../internal/fs/hadoop/GridGgfsHadoopIpcIo.java |   10 +-
 .../GridHadoopExternalCommunication.java        |   26 +-
 .../GridHadoopIpcToNioAdapter.java              |    6 +-
 ...doop20FileSystemLoopbackPrimarySelfTest.java |    2 +-
 ...sHadoop20FileSystemShmemPrimarySelfTest.java |    2 +-
 .../GridGgfsHadoopFileSystemClientSelfTest.java |    2 +-
 ...idGgfsHadoopFileSystemHandshakeSelfTest.java |    2 +-
 ...ridGgfsHadoopFileSystemIpcCacheSelfTest.java |    2 +-
 ...adoopFileSystemLoopbackAbstractSelfTest.java |    2 +-
 ...fsHadoopFileSystemShmemAbstractSelfTest.java |    8 +-
 .../fs/GridGgfsNearOnlyMultiNodeSelfTest.java   |    4 +-
 .../ignite/fs/IgniteFsEventsTestSuite.java      |    4 +-
 .../ignite/visor/commands/VisorConsole.scala    |    6 +-
 .../commands/alert/VisorAlertCommand.scala      |    2 +-
 .../config/VisorConfigurationCommand.scala      |    6 +-
 .../commands/deploy/VisorDeployCommand.scala    |    4 +-
 .../commands/disco/VisorDiscoveryCommand.scala  |    4 +-
 .../commands/events/VisorEventsCommand.scala    |    4 +-
 .../visor/commands/gc/VisorGcCommand.scala      |   13 +-
 .../visor/commands/node/VisorNodeCommand.scala  |    4 +-
 .../commands/start/VisorStartCommand.scala      |    4 +-
 .../commands/tasks/VisorTasksCommand.scala      |    4 +-
 .../commands/top/VisorTopologyCommand.scala     |    6 +-
 .../visor/commands/vvm/VisorVvmCommand.scala    |    8 +-
 .../scala/org/apache/ignite/visor/visor.scala   |   20 +-
 .../visor/commands/gc/VisorGcCommandSpec.scala  |   25 +-
 158 files changed, 17135 insertions(+), 16542 deletions(-)
----------------------------------------------------------------------



[50/50] [abbrv] incubator-ignite git commit: ignite-sql - renamings

Posted by se...@apache.org.
ignite-sql - renamings


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

Branch: refs/heads/ignite-sql
Commit: aa0ee770fa9c1bb6b7f93d7ce23bd1ac21ecf32c
Parents: fb4a74c
Author: S.Vladykin <sv...@gridgain.com>
Authored: Mon Feb 2 04:51:10 2015 +0300
Committer: S.Vladykin <sv...@gridgain.com>
Committed: Mon Feb 2 04:51:10 2015 +0300

----------------------------------------------------------------------
 examples/config/example-cache.xml               |   2 +-
 examples/config/filesystem/example-ggfs.xml     |   9 +-
 .../failover/ComputeFailoverExample.java        |   2 +-
 .../datagrid/CachePopularNumbersExample.java    |   2 +-
 .../examples/datagrid/CacheQueryExample.java    |  19 +-
 .../starschema/CacheStarSchemaExample.java      |   2 +-
 .../datagrid/starschema/DimProduct.java         |   6 +-
 .../examples/datagrid/starschema/DimStore.java  |   6 +-
 .../datagrid/starschema/FactPurchase.java       |  10 +-
 .../store/dummy/CacheDummyPersonStore.java      |   2 +-
 .../messaging/MessagingPingPongExample.java     |   2 +-
 .../MemcacheRestExampleNodeStartup.java         |   4 +-
 .../apache/ignite/examples/ComputeExample.java  |   2 -
 .../ignite/examples/MessagingExample.java       |   1 -
 .../ignite/jdbc/JdbcComplexQuerySelfTest.java   |  13 +-
 .../ignite/jdbc/JdbcLocalCachesSelfTest.java    |   2 +-
 .../ignite/jdbc/JdbcMetadataSelfTest.java       |  11 +-
 .../jdbc/JdbcPreparedStatementSelfTest.java     |  31 +-
 .../ignite/jdbc/JdbcResultSetSelfTest.java      |  37 +--
 .../ignite/jdbc/JdbcStatementSelfTest.java      |   9 +-
 .../clients/src/test/resources/spring-cache.xml |   2 +-
 .../src/test/resources/spring-server-node.xml   |   8 +-
 .../test/resources/spring-server-ssl-node.xml   |   8 +-
 .../java/org/apache/ignite/IgniteCache.java     |   7 +
 .../java/org/apache/ignite/IgnitePortables.java |   2 +-
 .../apache/ignite/cache/CacheConfiguration.java |   8 +-
 .../apache/ignite/cache/CacheProjection.java    |   4 +-
 .../cache/query/CacheContinuousQuery.java       |   4 +-
 .../apache/ignite/cache/query/CacheQueries.java | 152 ----------
 .../apache/ignite/cache/query/CacheQuery.java   | 294 ------------------
 .../cache/query/CacheQueryConfiguration.java    | 203 -------------
 .../ignite/cache/query/CacheQueryFuture.java    |  66 -----
 .../cache/query/CacheQueryGroupIndex.java       |  58 ----
 .../ignite/cache/query/CacheQueryMetrics.java   |  60 ----
 .../ignite/cache/query/CacheQuerySqlField.java  | 133 ---------
 .../cache/query/CacheQuerySqlFunction.java      |  67 -----
 .../ignite/cache/query/CacheQueryTextField.java |  33 ---
 .../ignite/cache/query/CacheQueryType.java      |  47 ---
 .../cache/query/CacheQueryTypeMetadata.java     | 196 ------------
 .../cache/query/CacheQueryTypeResolver.java     |  32 --
 .../ignite/cache/query/QueryConfiguration.java  | 203 +++++++++++++
 .../cache/query/QueryContinuousPredicate.java   |   4 +-
 .../apache/ignite/cache/query/QueryMetrics.java |  60 ++++
 .../apache/ignite/cache/query/QueryReducer.java |  19 +-
 .../ignite/cache/query/QueryTypeMetadata.java   | 196 ++++++++++++
 .../ignite/cache/query/QueryTypeResolver.java   |  32 ++
 .../query/annotations/QueryGroupIndex.java      |   9 -
 .../cache/query/annotations/QuerySqlField.java  |  14 +-
 .../cache/query/annotations/QueryTextField.java |   4 +-
 .../configuration/IgniteQueryConfiguration.java |   2 +-
 .../events/IgniteCacheQueryExecutedEvent.java   |   1 +
 .../events/IgniteCacheQueryReadEvent.java       |   1 +
 .../cache/CacheWeakQueryIteratorsHolder.java    |   4 +-
 .../processors/cache/GridCacheAdapter.java      |   1 -
 .../cache/GridCacheProjectionImpl.java          |   1 -
 .../processors/cache/GridCacheProxyImpl.java    |   1 -
 .../processors/cache/IgniteCacheProxy.java      |   6 +
 .../cache/datastructures/GridCacheSetImpl.java  |   1 -
 .../processors/cache/query/CacheQueries.java    | 153 ++++++++++
 .../processors/cache/query/CacheQuery.java      | 295 +++++++++++++++++++
 .../cache/query/CacheQueryFuture.java           |  66 +++++
 .../processors/cache/query/CacheQueryType.java  |  47 +++
 .../query/GridCacheDistributedQueryManager.java |   1 -
 .../cache/query/GridCacheLocalQueryManager.java |   1 -
 .../cache/query/GridCacheQueriesEx.java         |   1 -
 .../cache/query/GridCacheQueriesImpl.java       |   4 +-
 .../cache/query/GridCacheQueriesProxy.java      |   2 +-
 .../cache/query/GridCacheQueryAdapter.java      |   2 +-
 .../cache/query/GridCacheQueryErrorFuture.java  |   1 -
 .../query/GridCacheQueryFutureAdapter.java      |   1 -
 .../cache/query/GridCacheQueryManager.java      |  20 +-
 .../query/GridCacheQueryMetricsAdapter.java     |   4 +-
 .../cache/query/GridCacheQueryType.java         |   4 +-
 .../GridCacheContinuousQueryHandler.java        |   1 +
 .../query/jdbc/GridCacheQueryJdbcTask.java      |   1 -
 .../processors/query/GridQueryProcessor.java    |  61 ++--
 .../cache/GridCacheQueryCommandHandler.java     |   1 -
 .../visor/cache/VisorCacheQueryMetrics.java     |   2 +-
 .../internal/visor/query/VisorQueryTask.java    |   1 -
 .../internal/visor/query/VisorQueryUtils.java   |   2 +-
 modules/core/src/test/config/log4j-test.xml     |   4 +
 .../GridCacheConcurrentTxMultiNodeTest.java     |  23 +-
 .../GridCacheFieldsQueryNoDataSelfTest.java     |   2 +-
 ...CacheFullTextQueryMultithreadedSelfTest.java |   5 +-
 .../cache/GridCacheLuceneQueryIndexTest.java    |   6 +-
 .../cache/GridCacheOffHeapSelfTest.java         |   3 +-
 .../cache/GridCacheQueryEmbeddedValue.java      |   9 +-
 .../cache/GridCacheQueryIndexSelfTest.java      |   5 +-
 .../GridCacheQueryIndexingDisabledSelfTest.java |   2 +-
 .../processors/cache/GridCacheTestValue.java    |   3 +-
 .../processors/cache/GridCacheTestValue2.java   |   3 +-
 .../cache/IgniteTxMultiNodeAbstractTest.java    |   2 +-
 ...achePartitionedPreloadLifecycleSelfTest.java |   2 +-
 ...hePartitionedQueryMultiThreadedSelfTest.java |  11 +-
 ...CacheReplicatedPreloadLifecycleSelfTest.java |   2 +-
 .../GridCacheSwapScanQueryAbstractSelfTest.java |   1 -
 ...ridCacheContinuousQueryAbstractSelfTest.java |   2 +-
 ...dCacheAbstractReduceFieldsQuerySelfTest.java |  13 +-
 ...cheReduceFieldsQueryPartitionedSelfTest.java |   2 +-
 .../ignite/loadtests/mapper/TestObject.java     |   5 +-
 .../core/src/test/webapp/META-INF/gg-config.xml |   8 +-
 .../processors/query/h2/IgniteH2Indexing.java   |  28 +-
 .../query/h2/opt/GridH2AbstractKeyValueRow.java |   2 +-
 .../query/h2/opt/GridH2IndexBase.java           |   4 +-
 .../query/h2/opt/GridH2KeyValueRowOffheap.java  |   2 +-
 .../query/h2/opt/GridH2SpatialIndex.java        |   2 +-
 .../query/h2/opt/GridH2TreeIndex.java           |   4 +-
 .../query/h2/opt/GridLuceneDirectory.java       |   2 +-
 .../query/h2/opt/GridLuceneIndex.java           |   8 +-
 .../query/h2/opt/GridLuceneInputStream.java     |   2 +-
 .../query/h2/opt/GridLuceneOutputStream.java    |   5 +-
 .../query/h2/twostep/GridMapQueryExecutor.java  |   2 +-
 .../h2/twostep/GridReduceQueryExecutor.java     |   2 +-
 .../query/h2/twostep/GridResultPage.java        |   2 +-
 .../GridCacheAbstractFieldsQuerySelfTest.java   |  21 +-
 .../cache/GridCacheAbstractQuerySelfTest.java   |  44 +--
 .../cache/GridCacheCrossCacheQuerySelfTest.java |  18 +-
 .../cache/GridCacheOffHeapAndSwapSelfTest.java  |  12 +-
 .../cache/GridCacheQueryLoadSelfTest.java       |  11 +-
 .../cache/GridCacheQueryMetricsSelfTest.java    |   7 +-
 .../GridCacheQueryMultiThreadedSelfTest.java    |  13 +-
 .../cache/GridCacheQueryTestValue.java          |  20 +-
 ...idCacheReduceQueryMultithreadedSelfTest.java |   5 +-
 .../GridCacheSqlQueryMultiThreadedSelfTest.java |   5 +-
 .../processors/cache/GridCacheSwapSelfTest.java |  12 +-
 .../cache/GridIndexingWithNoopSwapSelfTest.java |   5 +-
 .../GridCacheAtomicFieldsQuerySelfTest.java     |   2 +-
 ...GridCachePartitionedFieldsQuerySelfTest.java |   2 +-
 ...idCachePartitionedHitsAndMissesSelfTest.java |   4 +-
 .../near/GridCachePartitionedQuerySelfTest.java |   2 +-
 .../near/GridCacheQueryNodeRestartSelfTest.java |   7 +-
 .../GridCacheReplicatedFieldsQuerySelfTest.java |   6 +-
 .../GridCacheReplicatedQuerySelfTest.java       |  10 +-
 .../local/GridCacheLocalQuerySelfTest.java      |   2 +-
 .../query/h2/GridH2IndexRebuildTest.java        |  17 +-
 .../query/h2/GridH2IndexingGeoSelfTest.java     |   7 +-
 .../h2/GridIndexingSpiAbstractSelfTest.java     |   4 +-
 .../query/h2/sql/GridQueryParsingTest.java      |  23 +-
 .../loadtests/h2indexing/GridTestEntity.java    |   6 +-
 .../tcp/GridOrderedMessageCancelSelfTest.java   |   9 +-
 .../IgniteCacheQuerySelfTestSuite.java          |   6 +-
 141 files changed, 1487 insertions(+), 1757 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/examples/config/example-cache.xml
----------------------------------------------------------------------
diff --git a/examples/config/example-cache.xml b/examples/config/example-cache.xml
index 9ec2ef2..43c1819 100644
--- a/examples/config/example-cache.xml
+++ b/examples/config/example-cache.xml
@@ -141,7 +141,7 @@
 
         <!-- Allow to index primitive values. -->
         <property name="queryConfiguration">
-            <bean class="org.apache.ignite.cache.query.CacheQueryConfiguration">
+            <bean class="org.apache.ignite.cache.query.QueryConfiguration">
                 <!-- Index primitives. -->
                 <property name="indexPrimitiveKey" value="true"/>
             </bean>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/examples/config/filesystem/example-ggfs.xml
----------------------------------------------------------------------
diff --git a/examples/config/filesystem/example-ggfs.xml b/examples/config/filesystem/example-ggfs.xml
index fb64227..a2644c5 100644
--- a/examples/config/filesystem/example-ggfs.xml
+++ b/examples/config/filesystem/example-ggfs.xml
@@ -27,12 +27,9 @@
     GridGain.start("examples/config/filesystem/example-ggfs.xml");
 -->
 <beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util"
-       xsi:schemaLocation="
-       http://www.springframework.org/schema/beans
-       http://www.springframework.org/schema/beans/spring-beans.xsd
-       http://www.springframework.org/schema/util
-       http://www.springframework.org/schema/util/spring-util.xsd">
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+       http://www.springframework.org/schema/beans/spring-beans.xsd">
 
     <!--
         Optional description.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/examples/src/main/java/org/apache/ignite/examples/compute/failover/ComputeFailoverExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/compute/failover/ComputeFailoverExample.java b/examples/src/main/java/org/apache/ignite/examples/compute/failover/ComputeFailoverExample.java
index fa065aa..1ed7663 100644
--- a/examples/src/main/java/org/apache/ignite/examples/compute/failover/ComputeFailoverExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/compute/failover/ComputeFailoverExample.java
@@ -20,9 +20,9 @@ package org.apache.ignite.examples.compute.failover;
 import org.apache.ignite.*;
 import org.apache.ignite.compute.*;
 import org.apache.ignite.examples.*;
+import org.apache.ignite.internal.util.lang.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.resources.*;
-import org.apache.ignite.internal.util.lang.*;
 
 import java.util.*;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/examples/src/main/java/org/apache/ignite/examples/datagrid/CachePopularNumbersExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/CachePopularNumbersExample.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/CachePopularNumbersExample.java
index 1617662..1d3eed4 100644
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/CachePopularNumbersExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/CachePopularNumbersExample.java
@@ -19,9 +19,9 @@ package org.apache.ignite.examples.datagrid;
 
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
-import org.apache.ignite.cache.query.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.dataload.*;
+import org.apache.ignite.internal.processors.cache.query.*;
 
 import javax.cache.processor.*;
 import java.util.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheQueryExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheQueryExample.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheQueryExample.java
index a0205d6..9fc5ca1 100644
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheQueryExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheQueryExample.java
@@ -20,7 +20,8 @@ package org.apache.ignite.examples.datagrid;
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.affinity.*;
-import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
+import org.apache.ignite.internal.processors.cache.query.*;
 import org.apache.ignite.lang.*;
 
 import java.io.*;
@@ -374,27 +375,27 @@ public class CacheQueryExample {
      */
     private static class Person implements Serializable {
         /** Person ID (indexed). */
-        @CacheQuerySqlField(index = true)
+        @QuerySqlField(index = true)
         private UUID id;
 
         /** Organization ID (indexed). */
-        @CacheQuerySqlField(index = true)
+        @QuerySqlField(index = true)
         private UUID orgId;
 
         /** First name (not-indexed). */
-        @CacheQuerySqlField
+        @QuerySqlField
         private String firstName;
 
         /** Last name (not indexed). */
-        @CacheQuerySqlField
+        @QuerySqlField
         private String lastName;
 
         /** Resume text (create LUCENE-based TEXT index for this field). */
-        @CacheQueryTextField
+        @QueryTextField
         private String resume;
 
         /** Salary (indexed). */
-        @CacheQuerySqlField
+        @QuerySqlField
         private double salary;
 
         /** Custom cache key to guarantee that person is always collocated with its organization. */
@@ -450,11 +451,11 @@ public class CacheQueryExample {
      */
     private static class Organization implements Serializable {
         /** Organization ID (indexed). */
-        @CacheQuerySqlField(index = true)
+        @QuerySqlField(index = true)
         private UUID id;
 
         /** Organization name (indexed). */
-        @CacheQuerySqlField(index = true)
+        @QuerySqlField(index = true)
         private String name;
 
         /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/examples/src/main/java/org/apache/ignite/examples/datagrid/starschema/CacheStarSchemaExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/starschema/CacheStarSchemaExample.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/starschema/CacheStarSchemaExample.java
index e5a79d4..8dacff3 100644
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/starschema/CacheStarSchemaExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/starschema/CacheStarSchemaExample.java
@@ -19,8 +19,8 @@ package org.apache.ignite.examples.datagrid.starschema;
 
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
-import org.apache.ignite.cache.query.*;
 import org.apache.ignite.examples.datagrid.*;
+import org.apache.ignite.internal.processors.cache.query.*;
 
 import java.util.*;
 import java.util.concurrent.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/examples/src/main/java/org/apache/ignite/examples/datagrid/starschema/DimProduct.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/starschema/DimProduct.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/starschema/DimProduct.java
index 48fc99a..af1ba4c 100644
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/starschema/DimProduct.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/starschema/DimProduct.java
@@ -17,7 +17,7 @@
 
 package org.apache.ignite.examples.datagrid.starschema;
 
-import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 
 /**
  * Represents a product available for purchase. In our {@code snowflake} schema a {@code product}
@@ -26,14 +26,14 @@ import org.apache.ignite.cache.query.*;
  */
 public class DimProduct {
     /** Primary key. */
-    @CacheQuerySqlField(index = true)
+    @QuerySqlField(index = true)
     private int id;
 
     /** Product name. */
     private String name;
 
     /** Product list price. */
-    @CacheQuerySqlField
+    @QuerySqlField
     private float price;
 
     /** Available product quantity. */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/examples/src/main/java/org/apache/ignite/examples/datagrid/starschema/DimStore.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/starschema/DimStore.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/starschema/DimStore.java
index 34585bd..11fe365 100644
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/starschema/DimStore.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/starschema/DimStore.java
@@ -17,7 +17,7 @@
 
 package org.apache.ignite.examples.datagrid.starschema;
 
-import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 
 /**
  * Represents a physical store location. In our {@code snowflake} schema a {@code store}
@@ -26,11 +26,11 @@ import org.apache.ignite.cache.query.*;
  */
 public class DimStore {
     /** Primary key. */
-    @CacheQuerySqlField(index = true)
+    @QuerySqlField(index = true)
     private int id;
 
     /** Store name. */
-    @CacheQuerySqlField
+    @QuerySqlField
     private String name;
 
     /** Zip code. */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/examples/src/main/java/org/apache/ignite/examples/datagrid/starschema/FactPurchase.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/starschema/FactPurchase.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/starschema/FactPurchase.java
index ed69be9..fb097a2 100644
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/starschema/FactPurchase.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/starschema/FactPurchase.java
@@ -17,7 +17,7 @@
 
 package org.apache.ignite.examples.datagrid.starschema;
 
-import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 
 /**
  * Represents a purchase record. In our {@code snowflake} schema purchase
@@ -26,19 +26,19 @@ import org.apache.ignite.cache.query.*;
  */
 public class FactPurchase {
     /** Primary key. */
-    @CacheQuerySqlField(index = true)
+    @QuerySqlField(index = true)
     private int id;
 
     /** Foreign key to store at which purchase occurred. */
-    @CacheQuerySqlField
+    @QuerySqlField
     private int storeId;
 
     /** Foreign key to purchased product. */
-    @CacheQuerySqlField
+    @QuerySqlField
     private int productId;
 
     /** Purchase price. */
-    @CacheQuerySqlField
+    @QuerySqlField
     private float purchasePrice;
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/examples/src/main/java/org/apache/ignite/examples/datagrid/store/dummy/CacheDummyPersonStore.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/store/dummy/CacheDummyPersonStore.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/store/dummy/CacheDummyPersonStore.java
index ed47df0..2e7e445 100644
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/store/dummy/CacheDummyPersonStore.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/store/dummy/CacheDummyPersonStore.java
@@ -18,7 +18,7 @@
 package org.apache.ignite.examples.datagrid.store.dummy;
 
 import org.apache.ignite.*;
-import org.apache.ignite.cache.GridCache;
+import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.store.*;
 import org.apache.ignite.examples.datagrid.store.*;
 import org.apache.ignite.lang.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/examples/src/main/java/org/apache/ignite/examples/messaging/MessagingPingPongExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/messaging/MessagingPingPongExample.java b/examples/src/main/java/org/apache/ignite/examples/messaging/MessagingPingPongExample.java
index a22b2aa..3e3338d 100644
--- a/examples/src/main/java/org/apache/ignite/examples/messaging/MessagingPingPongExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/messaging/MessagingPingPongExample.java
@@ -20,9 +20,9 @@ package org.apache.ignite.examples.messaging;
 import org.apache.ignite.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.examples.*;
+import org.apache.ignite.internal.util.lang.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.resources.*;
-import org.apache.ignite.internal.util.lang.*;
 
 import java.util.*;
 import java.util.concurrent.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/examples/src/main/java/org/apache/ignite/examples/misc/client/memcache/MemcacheRestExampleNodeStartup.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/misc/client/memcache/MemcacheRestExampleNodeStartup.java b/examples/src/main/java/org/apache/ignite/examples/misc/client/memcache/MemcacheRestExampleNodeStartup.java
index a6ea36d..2f6bb36 100644
--- a/examples/src/main/java/org/apache/ignite/examples/misc/client/memcache/MemcacheRestExampleNodeStartup.java
+++ b/examples/src/main/java/org/apache/ignite/examples/misc/client/memcache/MemcacheRestExampleNodeStartup.java
@@ -27,10 +27,10 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
 
 import java.util.*;
 
-import static org.apache.ignite.configuration.IgniteDeploymentMode.*;
 import static org.apache.ignite.cache.CacheAtomicityMode.*;
 import static org.apache.ignite.cache.CachePreloadMode.*;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*;
+import static org.apache.ignite.configuration.IgniteDeploymentMode.*;
 
 /**
  * Starts up an empty node with cache configuration that contains default cache.
@@ -75,7 +75,7 @@ public class MemcacheRestExampleNodeStartup {
         cacheCfg.setPreloadMode(SYNC);
         cacheCfg.setAtomicityMode(TRANSACTIONAL);
 
-        CacheQueryConfiguration qryCfg = new CacheQueryConfiguration();
+        QueryConfiguration qryCfg = new QueryConfiguration();
 
         qryCfg.setIndexPrimitiveKey(true);
         qryCfg.setIndexFixedTyping(false);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/examples/src/main/java8/org/apache/ignite/examples/ComputeExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java8/org/apache/ignite/examples/ComputeExample.java b/examples/src/main/java8/org/apache/ignite/examples/ComputeExample.java
index 71b9946..28af049 100644
--- a/examples/src/main/java8/org/apache/ignite/examples/ComputeExample.java
+++ b/examples/src/main/java8/org/apache/ignite/examples/ComputeExample.java
@@ -19,8 +19,6 @@ package org.apache.ignite.examples;
 
 import org.apache.ignite.*;
 import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
-import org.apache.ignite.lang.IgniteCallable;
 
 /**
  * Demonstrates broadcasting and unicasting computations within grid projection.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/examples/src/main/java8/org/apache/ignite/examples/MessagingExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java8/org/apache/ignite/examples/MessagingExample.java b/examples/src/main/java8/org/apache/ignite/examples/MessagingExample.java
index c69c3ab..f1da946 100644
--- a/examples/src/main/java8/org/apache/ignite/examples/MessagingExample.java
+++ b/examples/src/main/java8/org/apache/ignite/examples/MessagingExample.java
@@ -19,7 +19,6 @@ package org.apache.ignite.examples;
 
 import org.apache.ignite.*;
 import org.apache.ignite.cluster.*;
-import org.apache.ignite.examples.*;
 
 import java.util.concurrent.*;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcComplexQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcComplexQuerySelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcComplexQuerySelfTest.java
index 9f5a676..b9ea56e 100644
--- a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcComplexQuerySelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcComplexQuerySelfTest.java
@@ -20,6 +20,7 @@ package org.apache.ignite.jdbc;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.affinity.*;
 import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
@@ -258,19 +259,19 @@ public class JdbcComplexQuerySelfTest extends GridCommonAbstractTest {
     @SuppressWarnings("UnusedDeclaration")
     private static class Person implements Serializable {
         /** ID. */
-        @CacheQuerySqlField
+        @QuerySqlField
         private final int id;
 
         /** Name. */
-        @CacheQuerySqlField(index = false)
+        @QuerySqlField(index = false)
         private final String name;
 
         /** Age. */
-        @CacheQuerySqlField
+        @QuerySqlField
         private final int age;
 
         /** Organization ID. */
-        @CacheQuerySqlField
+        @QuerySqlField
         private final int orgId;
 
         /**
@@ -297,11 +298,11 @@ public class JdbcComplexQuerySelfTest extends GridCommonAbstractTest {
     @SuppressWarnings("UnusedDeclaration")
     private static class Organization implements Serializable {
         /** ID. */
-        @CacheQuerySqlField
+        @QuerySqlField
         private final int id;
 
         /** Name. */
-        @CacheQuerySqlField(index = false)
+        @QuerySqlField(index = false)
         private final String name;
 
         /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcLocalCachesSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcLocalCachesSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcLocalCachesSelfTest.java
index 244133f..f0681c9 100644
--- a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcLocalCachesSelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcLocalCachesSelfTest.java
@@ -55,7 +55,7 @@ public class JdbcLocalCachesSelfTest extends GridCommonAbstractTest {
         cache.setCacheMode(LOCAL);
         cache.setWriteSynchronizationMode(FULL_SYNC);
 
-        CacheQueryConfiguration qryCfg = new CacheQueryConfiguration();
+        QueryConfiguration qryCfg = new QueryConfiguration();
 
         qryCfg.setIndexPrimitiveKey(true);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcMetadataSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcMetadataSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcMetadataSelfTest.java
index 10f9dbf..6d2a84d 100644
--- a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcMetadataSelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcMetadataSelfTest.java
@@ -20,6 +20,7 @@ package org.apache.ignite.jdbc;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.affinity.*;
 import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
@@ -284,15 +285,15 @@ public class JdbcMetadataSelfTest extends GridCommonAbstractTest {
     @SuppressWarnings("UnusedDeclaration")
     private static class Person implements Serializable {
         /** Name. */
-        @CacheQuerySqlField(index = false)
+        @QuerySqlField(index = false)
         private final String name;
 
         /** Age. */
-        @CacheQuerySqlField
+        @QuerySqlField
         private final int age;
 
         /** Organization ID. */
-        @CacheQuerySqlField
+        @QuerySqlField
         private final int orgId;
 
         /**
@@ -317,11 +318,11 @@ public class JdbcMetadataSelfTest extends GridCommonAbstractTest {
     @SuppressWarnings("UnusedDeclaration")
     private static class Organization implements Serializable {
         /** ID. */
-        @CacheQuerySqlField
+        @QuerySqlField
         private final int id;
 
         /** Name. */
-        @CacheQuerySqlField(index = false)
+        @QuerySqlField(index = false)
         private final String name;
 
         /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcPreparedStatementSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcPreparedStatementSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcPreparedStatementSelfTest.java
index 5850f5a..bb3050d 100644
--- a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcPreparedStatementSelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcPreparedStatementSelfTest.java
@@ -19,6 +19,7 @@ package org.apache.ignite.jdbc;
 
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
@@ -657,63 +658,63 @@ public class JdbcPreparedStatementSelfTest extends GridCommonAbstractTest {
     @SuppressWarnings("UnusedDeclaration")
     private static class TestObject implements Serializable {
         /** */
-        @CacheQuerySqlField(index = false)
+        @QuerySqlField(index = false)
         private final int id;
 
         /** */
-        @CacheQuerySqlField
+        @QuerySqlField
         private Boolean boolVal;
 
         /** */
-        @CacheQuerySqlField
+        @QuerySqlField
         private Byte byteVal;
 
         /** */
-        @CacheQuerySqlField
+        @QuerySqlField
         private Short shortVal;
 
         /** */
-        @CacheQuerySqlField
+        @QuerySqlField
         private Integer intVal;
 
         /** */
-        @CacheQuerySqlField
+        @QuerySqlField
         private Long longVal;
 
         /** */
-        @CacheQuerySqlField
+        @QuerySqlField
         private Float floatVal;
 
         /** */
-        @CacheQuerySqlField
+        @QuerySqlField
         private Double doubleVal;
 
         /** */
-        @CacheQuerySqlField
+        @QuerySqlField
         private BigDecimal bigVal;
 
         /** */
-        @CacheQuerySqlField
+        @QuerySqlField
         private String strVal;
 
         /** */
-        @CacheQuerySqlField
+        @QuerySqlField
         private byte[] arrVal;
 
         /** */
-        @CacheQuerySqlField
+        @QuerySqlField
         private Date dateVal;
 
         /** */
-        @CacheQuerySqlField
+        @QuerySqlField
         private Time timeVal;
 
         /** */
-        @CacheQuerySqlField
+        @QuerySqlField
         private Timestamp tsVal;
 
         /** */
-        @CacheQuerySqlField
+        @QuerySqlField
         private URL urlVal;
 
         /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcResultSetSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcResultSetSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcResultSetSelfTest.java
index 1a58580..910ff40 100644
--- a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcResultSetSelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcResultSetSelfTest.java
@@ -19,6 +19,7 @@ package org.apache.ignite.jdbc;
 
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
@@ -528,75 +529,75 @@ public class JdbcResultSetSelfTest extends GridCommonAbstractTest {
     @SuppressWarnings("UnusedDeclaration")
     private static class TestObject implements Serializable {
         /** */
-        @CacheQuerySqlField
+        @QuerySqlField
         private final int id;
 
         /** */
-        @CacheQuerySqlField(index = false)
+        @QuerySqlField(index = false)
         private Boolean boolVal;
 
         /** */
-        @CacheQuerySqlField(index = false)
+        @QuerySqlField(index = false)
         private Byte byteVal;
 
         /** */
-        @CacheQuerySqlField(index = false)
+        @QuerySqlField(index = false)
         private Short shortVal;
 
         /** */
-        @CacheQuerySqlField(index = false)
+        @QuerySqlField(index = false)
         private Integer intVal;
 
         /** */
-        @CacheQuerySqlField(index = false)
+        @QuerySqlField(index = false)
         private Long longVal;
 
         /** */
-        @CacheQuerySqlField(index = false)
+        @QuerySqlField(index = false)
         private Float floatVal;
 
         /** */
-        @CacheQuerySqlField(index = false)
+        @QuerySqlField(index = false)
         private Double doubleVal;
 
         /** */
-        @CacheQuerySqlField(index = false)
+        @QuerySqlField(index = false)
         private BigDecimal bigVal;
 
         /** */
-        @CacheQuerySqlField(index = false)
+        @QuerySqlField(index = false)
         private String strVal;
 
         /** */
-        @CacheQuerySqlField(index = false)
+        @QuerySqlField(index = false)
         private byte[] arrVal;
 
         /** */
-        @CacheQuerySqlField(index = false)
+        @QuerySqlField(index = false)
         private Date dateVal;
 
         /** */
-        @CacheQuerySqlField(index = false)
+        @QuerySqlField(index = false)
         private Time timeVal;
 
         /** */
-        @CacheQuerySqlField(index = false)
+        @QuerySqlField(index = false)
         private Timestamp tsVal;
 
         /** */
-        @CacheQuerySqlField(index = false)
+        @QuerySqlField(index = false)
         private URL urlVal;
 
         /** */
-        @CacheQuerySqlField(index = false)
+        @QuerySqlField(index = false)
         private TestObjectField f1 = new TestObjectField(100, "AAAA");
 
         /** */
-        @CacheQuerySqlField(index = false)
+        @QuerySqlField(index = false)
         private TestObjectField f2 = new TestObjectField(500, "BBBB");
 
         /** */
-        @CacheQuerySqlField(index = false)
+        @QuerySqlField(index = false)
         private TestObjectField f3;
 
         /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcStatementSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcStatementSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcStatementSelfTest.java
index 235738f..1d06ac8 100644
--- a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcStatementSelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcStatementSelfTest.java
@@ -19,6 +19,7 @@ package org.apache.ignite.jdbc;
 
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
@@ -251,19 +252,19 @@ public class JdbcStatementSelfTest extends GridCommonAbstractTest {
     @SuppressWarnings("UnusedDeclaration")
     private static class Person implements Serializable {
         /** ID. */
-        @CacheQuerySqlField
+        @QuerySqlField
         private final int id;
 
         /** First name. */
-        @CacheQuerySqlField(index = false)
+        @QuerySqlField(index = false)
         private final String firstName;
 
         /** Last name. */
-        @CacheQuerySqlField(index = false)
+        @QuerySqlField(index = false)
         private final String lastName;
 
         /** Age. */
-        @CacheQuerySqlField
+        @QuerySqlField
         private final int age;
 
         /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/clients/src/test/resources/spring-cache.xml
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/resources/spring-cache.xml b/modules/clients/src/test/resources/spring-cache.xml
index a2e62a9..cf22c8f 100644
--- a/modules/clients/src/test/resources/spring-cache.xml
+++ b/modules/clients/src/test/resources/spring-cache.xml
@@ -92,7 +92,7 @@
 
                     <!-- Allow to index primitive values. -->
                     <property name="queryConfiguration">
-                        <bean class="org.apache.ignite.cache.query.CacheQueryConfiguration">
+                        <bean class="org.apache.ignite.cache.query.QueryConfiguration">
                             <!-- Index primitives. -->
                             <property name="indexPrimitiveKey" value="true"/>
                         </bean>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/clients/src/test/resources/spring-server-node.xml
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/resources/spring-server-node.xml b/modules/clients/src/test/resources/spring-server-node.xml
index ccfcf0f..f93aab4 100644
--- a/modules/clients/src/test/resources/spring-server-node.xml
+++ b/modules/clients/src/test/resources/spring-server-node.xml
@@ -153,10 +153,10 @@
                     <property name="queryIndexEnabled" value="true"/>
 
                     <property name="queryConfiguration">
-                        <bean class="org.apache.ignite.cache.query.CacheQueryConfiguration">
+                        <bean class="org.apache.ignite.cache.query.QueryConfiguration">
                             <property name="typeMetadata">
                                 <list>
-                                    <bean class="org.apache.ignite.cache.query.CacheQueryTypeMetadata">
+                                    <bean class="org.apache.ignite.cache.query.QueryTypeMetadata">
                                         <property name="type" value="GridPortablePerson"/>
                                         <property name="ascendingFields">
                                             <map>
@@ -174,7 +174,7 @@
                                             </list>
                                         </property>
                                     </bean>
-                                    <bean class="org.apache.ignite.cache.query.CacheQueryTypeMetadata">
+                                    <bean class="org.apache.ignite.cache.query.QueryTypeMetadata">
                                         <property name="type" value="GridImplicitPortablePerson"/>
                                         <property name="ascendingFields">
                                             <map>
@@ -187,7 +187,7 @@
                                             </map>
                                         </property>
                                     </bean>
-                                    <bean class="org.apache.ignite.cache.query.CacheQueryTypeMetadata">
+                                    <bean class="org.apache.ignite.cache.query.QueryTypeMetadata">
                                         <property name="type" value="GridNoDefPortablePerson"/>
                                         <property name="ascendingFields">
                                             <map>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/clients/src/test/resources/spring-server-ssl-node.xml
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/resources/spring-server-ssl-node.xml b/modules/clients/src/test/resources/spring-server-ssl-node.xml
index 68774da..ac7e3a3 100644
--- a/modules/clients/src/test/resources/spring-server-ssl-node.xml
+++ b/modules/clients/src/test/resources/spring-server-ssl-node.xml
@@ -137,10 +137,10 @@
                     <property name="queryIndexEnabled" value="true"/>
 
                     <property name="queryConfiguration">
-                        <bean class="org.apache.ignite.cache.query.CacheQueryConfiguration">
+                        <bean class="org.apache.ignite.cache.query.QueryConfiguration">
                             <property name="typeMetadata">
                                 <list>
-                                    <bean class="org.apache.ignite.cache.query.CacheQueryTypeMetadata">
+                                    <bean class="org.apache.ignite.cache.query.QueryTypeMetadata">
                                         <property name="type" value="GridPortablePerson"/>
                                         <property name="ascendingFields">
                                             <map>
@@ -158,7 +158,7 @@
                                             </list>
                                         </property>
                                     </bean>
-                                    <bean class="org.apache.ignite.cache.query.CacheQueryTypeMetadata">
+                                    <bean class="org.apache.ignite.cache.query.QueryTypeMetadata">
                                         <property name="type" value="GridImplicitPortablePerson"/>
                                         <property name="ascendingFields">
                                             <map>
@@ -171,7 +171,7 @@
                                             </map>
                                         </property>
                                     </bean>
-                                    <bean class="org.apache.ignite.cache.query.CacheQueryTypeMetadata">
+                                    <bean class="org.apache.ignite.cache.query.QueryTypeMetadata">
                                         <property name="type" value="GridNoDefPortablePerson"/>
                                         <property name="ascendingFields">
                                             <map>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteCache.java b/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
index 8430ec4..c0e800a 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
@@ -215,6 +215,13 @@ public interface IgniteCache<K, V> extends javax.cache.Cache<K, V>, IgniteAsyncS
 
     public Iterable<Entry<K, V>> localEntries(CachePeekMode... peekModes) throws CacheException;
 
+    /**
+     * Gets query metrics.
+     *
+     * @return Metrics.
+     */
+    public QueryMetrics queryMetrics();
+
     public Map<K, V> localPartition(int part) throws CacheException;
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/main/java/org/apache/ignite/IgnitePortables.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/IgnitePortables.java b/modules/core/src/main/java/org/apache/ignite/IgnitePortables.java
index 4da163e..167a64f 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgnitePortables.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgnitePortables.java
@@ -254,7 +254,7 @@ import java.util.Date;
  * or for a specific type via {@link org.apache.ignite.portables.PortableTypeConfiguration} instance.
  * <h1 class="header">Query Indexing</h1>
  * Portable objects can be indexed for querying by specifying index fields in
- * {@link org.apache.ignite.cache.query.CacheQueryTypeMetadata} inside of specific {@link CacheConfiguration} instance,
+ * {@link org.apache.ignite.cache.query.QueryTypeMetadata} inside of specific {@link CacheConfiguration} instance,
  * like so:
  * <pre name=code class=xml>
  * ...

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/main/java/org/apache/ignite/cache/CacheConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/CacheConfiguration.java b/modules/core/src/main/java/org/apache/ignite/cache/CacheConfiguration.java
index d5edb86..764fa7e 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/CacheConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/CacheConfiguration.java
@@ -336,7 +336,7 @@ public class CacheConfiguration extends MutableConfiguration {
     private boolean keepPortableInStore = true;
 
     /** Query configuration. */
-    private CacheQueryConfiguration qryCfg;
+    private QueryConfiguration qryCfg;
 
     /**
      * Flag indicating whether data can be read from backup.
@@ -1756,7 +1756,7 @@ public class CacheConfiguration extends MutableConfiguration {
      *
      * @return Cache query configuration.
      */
-    public CacheQueryConfiguration getQueryConfiguration() {
+    public QueryConfiguration getQueryConfiguration() {
         return qryCfg;
     }
 
@@ -1764,9 +1764,9 @@ public class CacheConfiguration extends MutableConfiguration {
      * Sets query configuration.
      *
      * @param qryCfg Query configuration.
-     * @see org.apache.ignite.cache.query.CacheQueryConfiguration
+     * @see org.apache.ignite.cache.query.QueryConfiguration
      */
-    public void setQueryConfiguration(CacheQueryConfiguration qryCfg) {
+    public void setQueryConfiguration(QueryConfiguration qryCfg) {
         this.qryCfg = qryCfg;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/main/java/org/apache/ignite/cache/CacheProjection.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/CacheProjection.java b/modules/core/src/main/java/org/apache/ignite/cache/CacheProjection.java
index 2457fcd..c3f141d 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/CacheProjection.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/CacheProjection.java
@@ -18,11 +18,11 @@
 package org.apache.ignite.cache;
 
 import org.apache.ignite.*;
-import org.apache.ignite.cache.query.*;
 import org.apache.ignite.cache.store.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.cache.*;
+import org.apache.ignite.internal.processors.cache.query.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.transactions.*;
 import org.jetbrains.annotations.*;
@@ -98,7 +98,7 @@ import java.util.concurrent.*;
  *  operations within a transaction (see {@link IgniteTx} for more information).
  * </li>
  * <li>
- *  {@link #queries()} method to get an instance of {@link org.apache.ignite.cache.query.CacheQueries} service for working
+ *  {@link #queries()} method to get an instance of {@link org.apache.ignite.internal.processors.cache.query.CacheQueries} service for working
  *  with distributed cache queries.
  * </li>
  * <li>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/main/java/org/apache/ignite/cache/query/CacheContinuousQuery.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/query/CacheContinuousQuery.java b/modules/core/src/main/java/org/apache/ignite/cache/query/CacheContinuousQuery.java
index eb5d265..4fa97b7 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/query/CacheContinuousQuery.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/query/CacheContinuousQuery.java
@@ -106,7 +106,7 @@ import java.util.*;
  * qry.cancel();
  * </pre>
  * Note that one query instance can be executed only once. After it's cancelled, it's non-operational.
- * If you need to repeat execution, use {@link CacheQueries#createContinuousQuery()} method to create
+ * If you need to repeat execution, use {@link org.apache.ignite.internal.processors.cache.query.CacheQueries#createContinuousQuery()} method to create
  * new query.
  */
 public interface CacheContinuousQuery<K, V> extends AutoCloseable {
@@ -332,7 +332,7 @@ public interface CacheContinuousQuery<K, V> extends AutoCloseable {
      * <p>
      * Note that one query instance can be executed only once.
      * After it's cancelled, it's non-operational.
-     * If you need to repeat execution, use {@link CacheQueries#createContinuousQuery()}
+     * If you need to repeat execution, use {@link org.apache.ignite.internal.processors.cache.query.CacheQueries#createContinuousQuery()}
      * method to create new query.
      *
      * @throws IgniteCheckedException In case of error.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueries.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueries.java b/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueries.java
deleted file mode 100644
index f14f869..0000000
--- a/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueries.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.cache.query;
-
-import org.apache.ignite.internal.*;
-import org.apache.ignite.lang.*;
-import org.jetbrains.annotations.*;
-
-import java.util.*;
-
-/**
- * Facade for creating distributed queries. It contains various {@code 'createXxxQuery(..)'}
- * methods for {@code SQL}, {@code TEXT}, and {@code SCAN} query creation (see {@link CacheQuery}
- * for more information).
- * <p>
- * Instance of {@code CacheQueries} is obtained from cache projection as follows:
- * <pre name="code" class="java">
- * CacheQueries q = GridGain.grid().cache("myCache").queries();
- * </pre>
- */
-public interface CacheQueries<K, V> {
-    /**
-     * Creates user's SQL query, queried class, and query clause which is generally
-     * a where clause. For more information refer to {@link CacheQuery} documentation.
-     *
-     * @param cls Query class.
-     * @param clause Query clause.
-     * @return Created query.
-     */
-    public CacheQuery<Map.Entry<K, V>> createSqlQuery(Class<?> cls, String clause);
-
-    /**
-     * Creates user's SQL query, queried class, and query clause which is generally
-     * a where clause. For more information refer to {@link CacheQuery} documentation.
-     *
-     * @param clsName Query class name.
-     * @param clause Query clause.
-     * @return Created query.
-     */
-    public CacheQuery<Map.Entry<K, V>> createSqlQuery(String clsName, String clause);
-
-    /**
-     * Creates user's SQL fields query for given clause. For more information refer to
-     * {@link CacheQuery} documentation.
-     *
-     * @param qry Query.
-     * @return Created query.
-     */
-    public CacheQuery<List<?>> createSqlFieldsQuery(String qry);
-
-    /**
-     * Creates user's full text query, queried class, and query clause.
-     * For more information refer to {@link CacheQuery} documentation.
-     *
-     * @param clsName Query class name.
-     * @param search Search clause.
-     * @return Created query.
-     */
-    public CacheQuery<Map.Entry<K, V>> createFullTextQuery(String clsName, String search);
-
-    /**
-     * Creates user's full text query, queried class, and query clause.
-     * For more information refer to {@link CacheQuery} documentation.
-     *
-     * @param cls Query class.
-     * @param search Search clause.
-     * @return Created query.
-     */
-    public CacheQuery<Map.Entry<K, V>> createFullTextQuery(Class<?> cls, String search);
-
-    /**
-     * Creates user's predicate based scan query.
-     *
-     * @param filter Scan filter.
-     * @return Created query.
-     */
-    public CacheQuery<Map.Entry<K, V>> createScanQuery(@Nullable IgniteBiPredicate<K, V> filter);
-
-    /**
-     * Creates new continuous query.
-     * <p>
-     * For more information refer to {@link CacheContinuousQuery} documentation.
-     *
-     * @return Created continuous query.
-     * @see CacheContinuousQuery
-     */
-    public CacheContinuousQuery<K, V> createContinuousQuery();
-
-    /**
-     * Forces this cache to rebuild all search indexes of given value type. Sometimes indexes
-     * may hold references to objects that have already been removed from cache. Although
-     * not affecting query results, these objects may consume extra memory. Rebuilding
-     * indexes will remove any redundant references that may have temporarily got stuck
-     * inside in-memory index.
-     *
-     * @param cls Value type to rebuild indexes for.
-     *
-     * @return Future that will be completed when rebuilding of all indexes is finished.
-     */
-    public IgniteInternalFuture<?> rebuildIndexes(Class<?> cls);
-
-    /**
-     * Forces this cache to rebuild all search indexes of given value type. Sometimes indexes
-     * may hold references to objects that have already been removed from cache. Although
-     * not affecting query results, these objects may consume extra memory. Rebuilding
-     * indexes will remove any redundant references that may have temporarily got stuck
-     * inside in-memory index.
-     *
-     * @param typeName Value type name to rebuild indexes for.
-     *
-     * @return Future that will be completed when rebuilding of all indexes is finished.
-     */
-    public IgniteInternalFuture<?> rebuildIndexes(String typeName);
-
-    /**
-     * Forces this cache to rebuild search indexes of all types. Sometimes indexes
-     * may hold references to objects that have already been removed from cache. Although
-     * not affecting query results, these objects may consume extra memory. Rebuilding
-     * indexes will remove any redundant references that may have temporarily got stuck
-     * inside in-memory index.
-     *
-     * @return Future that will be completed when rebuilding of all indexes is finished.
-     */
-    public IgniteInternalFuture<?> rebuildAllIndexes();
-
-    /**
-     * Accumulated metrics for all queries executed for this cache.
-     *
-     * @return Cache query metrics.
-     */
-    public CacheQueryMetrics metrics();
-
-    /**
-     * Resets accumulated metrics.
-     */
-    public void resetMetrics();
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQuery.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQuery.java b/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQuery.java
deleted file mode 100644
index 355f1f1..0000000
--- a/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQuery.java
+++ /dev/null
@@ -1,294 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.cache.query;
-
-import org.apache.ignite.cluster.*;
-import org.apache.ignite.lang.*;
-import org.jetbrains.annotations.*;
-
-/**
- * Main API for configuring and executing cache queries.
- * <p>
- * Cache queries are created from {@link CacheQueries} API via any of the available
- * {@code createXXXQuery(...)} methods.
- * <h1 class="header">SQL Queries</h1>
- * {@code SQL} query allows to execute distributed cache
- * queries using standard SQL syntax. All values participating in where clauses
- * or joins must be annotated with {@link CacheQuerySqlField} annotation. Query can be created
- * with {@link CacheQueries#createSqlQuery(Class, String)} method.
- * <h2 class="header">Field Queries</h2>
- * By default {@code select} clause is ignored as query result contains full objects.
- * If it is needed to select individual fields, use {@link CacheQueries#createSqlFieldsQuery(String)} method.
- * This type of query replaces full objects with individual fields. Note that selected fields
- * must be annotated with {@link CacheQuerySqlField} annotation.
- * <h2 class="header">Cross-Cache Queries</h2>
- * You are allowed to query data from several caches. Cache that this query was created on is
- * treated as default schema in this case. Other caches can be referenced by their names.
- * <p>
- * Note that cache name is case sensitive and has to always be specified in double quotes.
- * Here is an example of cross cache query (note that 'replicated' and 'partitioned' are
- * cache names for replicated and partitioned caches accordingly):
- * <pre name="code" class="java">
- * CacheQuery&lt;Map.Entry&lt;Integer, FactPurchase&gt;&gt; storePurchases = cache.queries().createSqlQuery(
- *     Purchase.class,
- *     "from \"replicated\".Store, \"partitioned\".Purchase where Store.id=Purchase.storeId and Store.id=?");
- * </pre>
- * <h2 class="header">Custom functions in SQL queries.</h2>
- * It is possible to write custom Java methods and call then form SQL queries. These methods must be public static
- * and annotated with {@link CacheQuerySqlFunction}. Classes containing these methods must be registered in
- * {@link org.apache.ignite.configuration.IgniteQueryConfiguration#setIndexCustomFunctionClasses(Class[])}.
- * <h1 class="header">Full Text Queries</h1>
- * GridGain supports full text queries based on Apache Lucene engine. This queries are created by
- * {@link CacheQueries#createFullTextQuery(Class, String)} method. Note that all fields that
- * are expected to show up in text query results must be annotated with {@link CacheQueryTextField}
- * annotation.
- * <h1 class="header">Scan Queries</h1>
- * Sometimes when it is known in advance that SQL query will cause a full data scan, or whenever data set
- * is relatively small, the full scan query may be used. This query will iterate over all cache
- * entries, skipping over entries that don't pass the optionally provided key-value filter
- * (see {@link CacheQueries#createScanQuery(org.apache.ignite.lang.IgniteBiPredicate)} method).
- * <h2 class="header">Limitations</h2>
- * Data in GridGain cache is usually distributed across several nodes,
- * so some queries may not work as expected. Keep in mind following limitations
- * (not applied if data is queried from one node only):
- * <ul>
- *     <li>
- *         {@code Group by} and {@code sort by} statements are applied separately
- *         on each node, so result set will likely be incorrectly grouped or sorted
- *         after results from multiple remote nodes are grouped together.
- *     </li>
- *     <li>
- *         Aggregation functions like {@code sum}, {@code max}, {@code avg}, etc.
- *         are also applied on each node. Therefore you will get several results
- *         containing aggregated values, one for each node.
- *     </li>
- *     <li>
- *         Joins will work correctly only if joined objects are stored in
- *         collocated mode or at least one side of the join is stored in
- *         {@link org.apache.ignite.cache.CacheMode#REPLICATED} cache. Refer to
- *         {@link org.apache.ignite.cache.affinity.CacheAffinityKey} javadoc for more information about colocation.
- *     </li>
- * </ul>
- * <h1 class="header">Query usage</h1>
- * As an example, suppose we have data model consisting of {@code 'Employee'} and {@code 'Organization'}
- * classes defined as follows:
- * <pre name="code" class="java">
- * public class Organization {
- *     // Indexed field.
- *     &#64;CacheQuerySqlField(index = true)
- *     private long id;
- *
- *     // Indexed field.
- *     &#64;CacheQuerySqlField(index = true)
- *     private String name;
- *     ...
- * }
- *
- * public class Person {
- *     // Indexed field.
- *     &#64;CacheQuerySqlField(index = true)
- *     private long id;
- *
- *     // Indexed field (Organization ID, used as a foreign key).
- *     &#64;CacheQuerySqlField(index = true)
- *     private long orgId;
- *
- *     // Without SQL field annotation, this field cannot be used in queries.
- *     private String name;
- *
- *     // Not indexed field.
- *     &#64;CacheQuerySqlField
- *     private double salary;
- *
- *     // Index for text search.
- *     &#64;CacheQueryTextField
- *     private String resume;
- *     ...
- * }
- * </pre>
- * Then you can create and execute queries that check various salary ranges like so:
- * <pre name="code" class="java">
- * Cache&lt;Long, Person&gt; cache = G.grid().cache();
- * ...
- * // Create query which selects salaries based on range for all employees
- * // that work for a certain company.
- * CacheQuery&lt;Map.Entry&lt;Long, Person&gt;&gt; qry = cache.queries().createSqlQuery(Person.class,
- *     "from Person, Organization where Person.orgId = Organization.id " +
- *         "and Organization.name = ? and Person.salary &gt; ? and Person.salary &lt;= ?");
- *
- * // Query all nodes to find all cached GridGain employees
- * // with salaries less than 1000.
- * qry.execute("GridGain", 0, 1000);
- *
- * // Query only remote nodes to find all remotely cached GridGain employees
- * // with salaries greater than 1000 and less than 2000.
- * qry.projection(grid.remoteProjection()).execute("GridGain", 1000, 2000);
- * </pre>
- * Here is a possible query that will use Lucene text search to scan all resumes to
- * check if employees have {@code Master} degree:
- * <pre name="code" class="java">
- * CacheQuery&lt;Map.Entry&lt;Long, Person&gt;&gt; mastersQry =
- *     cache.queries().createFullTextQuery(Person.class, "Master");
- *
- * // Query all cache nodes.
- * mastersQry.execute();
- * </pre>
- * <h1 class="header">Geo-Spatial Indexes and Queries</h1>
- * GridGain also support <b>Geo-Spatial Indexes</b>. Here is an example of geo-spatial index:
- * <pre name="code" class="java">
- * private class MapPoint implements Serializable {
- *     // Geospatial index.
- *     &#64;CacheQuerySqlField(index = true)
- *     private com.vividsolutions.jts.geom.Point location;
- *
- *     // Not indexed field.
- *     &#64;CacheQuerySqlField
- *     private String name;
- *
- *     public MapPoint(com.vividsolutions.jts.geom.Point location, String name) {
- *         this.location = location;
- *         this.name = name;
- *     }
- * }
- * </pre>
- * Example of spatial query on the geo-indexed field from above:
- * <pre name="code" class="java">
- * com.vividsolutions.jts.geom.GeometryFactory factory = new com.vividsolutions.jts.geom.GeometryFactory();
- *
- * com.vividsolutions.jts.geom.Polygon square = factory.createPolygon(new Coordinate[] {
- *     new com.vividsolutions.jts.geom.Coordinate(0, 0),
- *     new com.vividsolutions.jts.geom.Coordinate(0, 100),
- *     new com.vividsolutions.jts.geom.Coordinate(100, 100),
- *     new com.vividsolutions.jts.geom.Coordinate(100, 0),
- *     new com.vividsolutions.jts.geom.Coordinate(0, 0)
- * });
- *
- * Map.Entry<String, UserData> records = cache.queries().createSqlQuery(MapPoint.class, "select * from MapPoint where location && ?")
- *     .queryArguments(square)
- *     .execute()
- *     .get();
- * </pre>
- */
-public interface CacheQuery<T> {
-    /** Default query page size. */
-    public static final int DFLT_PAGE_SIZE = 1024;
-
-    /**
-     * Sets result page size. If not provided, {@link #DFLT_PAGE_SIZE} will be used.
-     * Results are returned from queried nodes one page at a tme.
-     *
-     * @param pageSize Page size.
-     * @return {@code this} query instance for chaining.
-     */
-    public CacheQuery<T> pageSize(int pageSize);
-
-    /**
-     * Sets query timeout. {@code 0} means there is no timeout (this
-     * is a default value).
-     *
-     * @param timeout Query timeout.
-     * @return {@code this} query instance for chaining.
-     */
-    public CacheQuery<T> timeout(long timeout);
-
-    /**
-     * Sets whether or not to keep all query results local. If not - only the current page
-     * is kept locally. Default value is {@code true}.
-     *
-     * @param keepAll Keep results or not.
-     * @return {@code this} query instance for chaining.
-     */
-    public CacheQuery<T> keepAll(boolean keepAll);
-
-    /**
-     * Sets whether or not to include backup entries into query result. This flag
-     * is {@code false} by default.
-     *
-     * @param incBackups Query {@code includeBackups} flag.
-     * @return {@code this} query instance for chaining.
-     */
-    public CacheQuery<T> includeBackups(boolean incBackups);
-
-    /**
-     * Sets whether or not to deduplicate query result set. If this flag is {@code true}
-     * then query result will not contain some key more than once even if several nodes
-     * returned entries with the same keys. Default value is {@code false}.
-     *
-     * @param dedup Query {@code enableDedup} flag.
-     * @return {@code this} query instance for chaining.
-     */
-    public CacheQuery<T> enableDedup(boolean dedup);
-
-    /**
-     * Sets optional grid projection to execute this query on.
-     *
-     * @param prj Projection.
-     * @return {@code this} query instance for chaining.
-     */
-    public CacheQuery<T> projection(ClusterGroup prj);
-
-    /**
-     * Executes the query and returns the query future. Caller may decide to iterate
-     * over the returned future directly in which case the iterator may block until
-     * the next value will become available, or wait for the whole query to finish
-     * by calling any of the {@code 'get(..)'} methods on the returned future. If
-     * {@link #keepAll(boolean)} flag is set to {@code false}, then {@code 'get(..)'}
-     * methods will only return the last page received, otherwise all pages will be
-     * accumulated and returned to user as a collection.
-     * <p>
-     * Note that if the passed in grid projection is a local node, then query
-     * will be executed locally without distribution to other nodes.
-     * <p>
-     * Also note that query state cannot be changed (clause, timeout etc.), except
-     * arguments, if this method was called at least once.
-     *
-     * @param args Optional arguments.
-     * @return Future for the query result.
-     */
-    public CacheQueryFuture<T> execute(@Nullable Object... args);
-
-    /**
-     * Executes the query the same way as {@link #execute(Object...)} method but reduces result remotely.
-     *
-     * @param rmtReducer Remote reducer.
-     * @param args Optional arguments.
-     * @return Future for the query result.
-     */
-    public <R> CacheQueryFuture<R> execute(IgniteReducer<T, R> rmtReducer, @Nullable Object... args);
-
-    /**
-     * Executes the query the same way as {@link #execute(Object...)} method but transforms result remotely.
-     *
-     * @param rmtTransform Remote transformer.
-     * @param args Optional arguments.
-     * @return Future for the query result.
-     */
-    public <R> CacheQueryFuture<R> execute(IgniteClosure<T, R> rmtTransform, @Nullable Object... args);
-
-    /**
-     * Gets metrics for this query.
-     *
-     * @return Query metrics.
-     */
-    public CacheQueryMetrics metrics();
-
-    /**
-     * Resets metrics for this query.
-     */
-    public void resetMetrics();
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueryConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueryConfiguration.java b/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueryConfiguration.java
deleted file mode 100644
index 9f1cb91..0000000
--- a/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueryConfiguration.java
+++ /dev/null
@@ -1,203 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.cache.query;
-
-import java.io.*;
-import java.util.*;
-
-/**
- * Query configuration object.
- */
-public class CacheQueryConfiguration implements Serializable {
-    /** */
-    private static final long serialVersionUID = 0L;
-
-    /** Collection of query type metadata. */
-    private Collection<CacheQueryTypeMetadata> typeMeta;
-
-    /** Query type resolver. */
-    private CacheQueryTypeResolver typeRslvr;
-
-    /** */
-    private boolean idxPrimitiveKey;
-
-    /** */
-    private boolean idxPrimitiveVal;
-
-    /** */
-    private boolean idxFixedTyping;
-
-    /** */
-    private boolean escapeAll;
-
-    /**
-     * Default constructor.
-     */
-    public CacheQueryConfiguration() {
-        // No-op.
-    }
-
-    /**
-     * @param cfg Configuration to copy.
-     */
-    public CacheQueryConfiguration(CacheQueryConfiguration cfg) {
-        typeMeta = cfg.getTypeMetadata();
-        typeRslvr = cfg.getTypeResolver();
-        idxPrimitiveKey = cfg.isIndexPrimitiveKey();
-        idxPrimitiveVal = cfg.isIndexPrimitiveValue();
-        idxFixedTyping = cfg.isIndexFixedTyping();
-        escapeAll = cfg.isEscapeAll();
-    }
-
-    /**
-     * Gets collection of query type metadata objects.
-     *
-     * @return Collection of query type metadata.
-     */
-    public Collection<CacheQueryTypeMetadata> getTypeMetadata() {
-        return typeMeta;
-    }
-
-    /**
-     * Sets collection of query type metadata objects.
-     *
-     * @param typeMeta Collection of query type metadata.
-     */
-    public void setTypeMetadata(Collection<CacheQueryTypeMetadata> typeMeta) {
-        this.typeMeta = typeMeta;
-    }
-
-    /**
-     * Gets query type resolver.
-     *
-     * @return Query type resolver.
-     */
-    public CacheQueryTypeResolver getTypeResolver() {
-        return typeRslvr;
-    }
-
-    /**
-     * Sets query type resolver.
-     *
-     * @param typeRslvr Query type resolver.
-     */
-    public void setTypeResolver(CacheQueryTypeResolver typeRslvr) {
-        this.typeRslvr = typeRslvr;
-    }
-
-    /**
-     * Gets flag indicating whether SQL engine should index by key in cases
-     * where key is primitive type
-     *
-     * @return {@code True} if primitive keys should be indexed.
-     */
-    public boolean isIndexPrimitiveKey() {
-        return idxPrimitiveKey;
-    }
-
-    /**
-     * Sets flag indicating whether SQL engine should index by key in cases
-     * where key is primitive type.
-     *
-     * @param idxPrimitiveKey {@code True} if primitive keys should be indexed.
-     */
-    public void setIndexPrimitiveKey(boolean idxPrimitiveKey) {
-        this.idxPrimitiveKey = idxPrimitiveKey;
-    }
-
-    /**
-     * Gets flag indicating whether SQL engine should index by value in cases
-     * where value is primitive type
-     *
-     * @return {@code True} if primitive values should be indexed.
-     */
-    public boolean isIndexPrimitiveValue() {
-        return idxPrimitiveVal;
-    }
-
-    /**
-     * Sets flag indexing whether SQL engine should index by value in cases
-     * where value is primitive type.
-     *
-     * @param idxPrimitiveVal {@code True} if primitive values should be indexed.
-     */
-    public void setIndexPrimitiveValue(boolean idxPrimitiveVal) {
-        this.idxPrimitiveVal = idxPrimitiveVal;
-    }
-
-    /**
-     * This flag essentially controls whether all values of the same type have
-     * identical key type.
-     * <p>
-     * If {@code false}, SQL engine will store all keys in BINARY form to make it possible to store
-     * the same value type with different key types. If {@code true}, key type will be converted
-     * to respective SQL type if it is possible, hence, improving performance of queries.
-     * <p>
-     * Setting this value to {@code false} also means that {@code '_key'} column cannot be indexed and
-     * cannot participate in query where clauses. The behavior of using '_key' column in where
-     * clauses with this flag set to {@code false} is undefined.
-     *
-     * @return {@code True} if SQL engine should try to convert values to their respective SQL
-     *      types for better performance.
-     */
-    public boolean isIndexFixedTyping() {
-        return idxFixedTyping;
-    }
-
-    /**
-     * This flag essentially controls whether key type is going to be identical
-     * for all values of the same type.
-     * <p>
-     * If false, SQL engine will store all keys in BINARY form to make it possible to store
-     * the same value type with different key types. If true, key type will be converted
-     * to respective SQL type if it is possible, which may provide significant performance
-     * boost.
-     *
-     * @param idxFixedTyping {@code True} if SQL engine should try to convert values to their respective SQL
-     *      types for better performance.
-     */
-    public void setIndexFixedTyping(boolean idxFixedTyping) {
-        this.idxFixedTyping = idxFixedTyping;
-    }
-
-    /**
-     * If {@code true}, then table name and all column names in 'create table' SQL
-     * generated for SQL engine are escaped with double quotes. This flag should be set if table name of
-     * column name is H2 reserved word or is not valid H2 identifier (e.g. contains space or hyphen).
-     * <p>
-     * Note if this flag is set then table and column name in SQL queries also must be escaped with double quotes.
-
-     * @return Flag value.
-     */
-    public boolean isEscapeAll() {
-        return escapeAll;
-    }
-
-    /**
-     * If {@code true}, then table name and all column names in 'create table' SQL
-     * generated for SQL engine are escaped with double quotes. This flag should be set if table name of
-     * column name is H2 reserved word or is not valid H2 identifier (e.g. contains space or hyphen).
-     * <p>
-     * Note if this flag is set then table and column name in SQL queries also must be escaped with double quotes.
-
-     * @param escapeAll Flag value.
-     */
-    public void setEscapeAll(boolean escapeAll) {
-        this.escapeAll = escapeAll;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueryFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueryFuture.java b/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueryFuture.java
deleted file mode 100644
index 6f68f29..0000000
--- a/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueryFuture.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.cache.query;
-
-import org.apache.ignite.*;
-import org.apache.ignite.internal.*;
-import org.jetbrains.annotations.*;
-
-import java.util.*;
-
-/**
- * Cache query future returned by query execution.
- * Refer to {@link CacheQuery} documentation for more information.
- */
-public interface CacheQueryFuture<T> extends IgniteInternalFuture<Collection<T>> {
-    /**
-     * Returns number of elements that are already fetched and can
-     * be returned from {@link #next()} method without blocking.
-     *
-     * @return Number of fetched elements which are available immediately.
-     * @throws IgniteCheckedException In case of error.
-     */
-    public int available() throws IgniteCheckedException;
-
-    /**
-     * Returns next element from result set.
-     * <p>
-     * This is a blocking call which will wait if there are no
-     * elements available immediately.
-     *
-     * @return Next fetched element or {@code null} if all the elements have been fetched.
-     * @throws IgniteCheckedException If failed.
-     */
-    @Nullable public T next() throws IgniteCheckedException;
-
-    /**
-     * Checks if all data is fetched by the query.
-     *
-     * @return {@code True} if all data is fetched, {@code false} otherwise.
-     */
-    @Override public boolean isDone();
-
-    /**
-     * Cancels this query future and stop receiving any further results for the query
-     * associated with this future.
-     *
-     * @return {@inheritDoc}
-     * @throws IgniteCheckedException {@inheritDoc}
-     */
-    @Override public boolean cancel() throws IgniteCheckedException;
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueryGroupIndex.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueryGroupIndex.java b/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueryGroupIndex.java
deleted file mode 100644
index e6eaa3c..0000000
--- a/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueryGroupIndex.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.cache.query;
-
-import java.lang.annotation.*;
-
-/**
- * Describes group index.
- */
-@Retention(RetentionPolicy.RUNTIME)
-@Target(ElementType.TYPE)
-public @interface CacheQueryGroupIndex {
-    /**
-     * Group index name.
-     *
-     * @return Name.
-     */
-    String name();
-
-    /**
-     * If this index is unique.
-     *
-     * @return True if this index is unique, false otherwise.
-     * @deprecated No longer supported, will be ignored.
-     */
-    @Deprecated
-    boolean unique() default false;
-
-    /**
-     * List of group indexes for type.
-     */
-    @SuppressWarnings("PublicInnerClass")
-    @Retention(RetentionPolicy.RUNTIME)
-    @Target(ElementType.TYPE)
-    public static @interface List {
-        /**
-         * Gets array of group indexes.
-         *
-         * @return Array of group indexes.
-         */
-        CacheQueryGroupIndex[] value();
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueryMetrics.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueryMetrics.java b/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueryMetrics.java
deleted file mode 100644
index 6c99aef..0000000
--- a/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueryMetrics.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.cache.query;
-
-/**
- * Cache query metrics used to obtain statistics on query. You can get metrics for
- * particular query via {@link CacheQuery#metrics()} method or accumulated metrics
- * for all queries via {@link CacheQueries#metrics()}.
- */
-public interface CacheQueryMetrics {
-    /**
-     * Gets minimum execution time of query.
-     *
-     * @return Minimum execution time of query.
-     */
-    public long minimumTime();
-
-    /**
-     * Gets maximum execution time of query.
-     *
-     * @return Maximum execution time of query.
-     */
-    public long maximumTime();
-
-    /**
-     * Gets average execution time of query.
-     *
-     * @return Average execution time of query.
-     */
-    public double averageTime();
-
-    /**
-     * Gets total number execution of query.
-     *
-     * @return Number of executions.
-     */
-    public int executions();
-
-    /**
-     * Gets total number of times a query execution failed.
-     *
-     * @return Total number of times a query execution failed.
-     */
-    public int fails();
-}


[41/50] [abbrv] incubator-ignite git commit: Merge remote-tracking branch 'remotes/origin/ignite-67' into sprint-1

Posted by se...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/115f5979/modules/web/src/main/java/org/apache/ignite/startup/servlet/IgniteServletContextListenerStartup.java
----------------------------------------------------------------------
diff --cc modules/web/src/main/java/org/apache/ignite/startup/servlet/IgniteServletContextListenerStartup.java
index e28f3e2,0000000..79f3f3a
mode 100644,000000..100644
--- a/modules/web/src/main/java/org/apache/ignite/startup/servlet/IgniteServletContextListenerStartup.java
+++ b/modules/web/src/main/java/org/apache/ignite/startup/servlet/IgniteServletContextListenerStartup.java
@@@ -1,181 -1,0 +1,181 @@@
 +/*
 + * 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.startup.servlet;
 +
 +import org.apache.ignite.*;
 +import org.apache.ignite.configuration.*;
 +import org.apache.ignite.internal.*;
 +import org.apache.ignite.lang.*;
 +import org.apache.ignite.internal.processors.resource.*;
 +import org.apache.ignite.internal.util.typedef.*;
 +import org.apache.ignite.internal.util.typedef.internal.*;
 +
 +import javax.servlet.*;
 +import java.net.*;
 +import java.util.*;
 +
 +/**
 + * This class defines GridGain startup based on servlet context listener.
 + * This startup can be used to start GridGain inside any web container.
 + * <p>
 + * This startup must be defined in {@code web.xml} file.
 + * <pre name="code" class="xml">
 + * &lt;listener&gt;
 + *     &lt;listener-class&gt;org.apache.ignite.startup.servlet.IgniteServletContextListenerStartup&lt;/listener-class&gt;
 + * &lt;/listener&gt;
 + *
 + * &lt;context-param&gt;
-  *     &lt;param-name&gt;GridGainConfigurationFilePath&lt;/param-name&gt;
++ *     &lt;param-name&gt;IgniteConfigurationFilePath&lt;/param-name&gt;
 + *     &lt;param-value&gt;config/default-config.xml&lt;/param-value&gt;
 + * &lt;/context-param&gt;
 + * </pre>
 + * <p>
 + * Servlet context listener based startup may be used in any web container like Tomcat, Jetty and etc.
 + * Depending on the way this startup is deployed the GridGain instance can be accessed
 + * by either all web applications or by only one. See web container class loading architecture:
 + * <ul>
 + * <li><a target=_blank href="http://tomcat.apache.org/tomcat-7.0-doc/class-loader-howto.html">http://tomcat.apache.org/tomcat-7.0-doc/class-loader-howto.html</a></li>
 + * <li><a target=_blank href="http://docs.codehaus.org/display/JETTY/Classloading">http://docs.codehaus.org/display/JETTY/Classloading</a></li>
 + * </ul>
 + * <p>
 + * <h2 class="header">Tomcat</h2>
 + * There are two ways to start GridGain on Tomcat.
 + * <ul>
 + * <li>GridGain started when web container starts and GridGain instance is accessible only to all web applications.
 + *     <ol>
 + *     <li>Add GridGain libraries in Tomcat common loader.
 + *         Add in file {@code $TOMCAT_HOME/conf/catalina.properties} for property {@code common.loader}
-  *         the following {@code $GRIDGAIN_HOME/*.jar,$GRIDGAIN_HOME/libs/*.jar}
-  *         (replace {@code $GRIDGAIN_HOME} with absolute path).
++ *         the following {@code $IGNITE_HOME/*.jar,$IGNITE_HOME/libs/*.jar}
++ *         (replace {@code $IGNITE_HOME} with absolute path).
 + *     </li>
 + *     <li>Configure this startup in {@code $TOMCAT_HOME/conf/web.xml}
 + *         <pre name="code" class="xml">
 + *         &lt;listener&gt;
 + *             &lt;listener-class&gt;org.apache.ignite.startup.servlet.IgniteServletContextListenerStartup&lt;/listener-class&gt;
 + *         &lt;/listener&gt;
 + *
 + *         &lt;context-param&gt;
-  *             &lt;param-name&gt;GridGainConfigurationFilePath&lt;/param-name&gt;
++ *             &lt;param-name&gt;IgniteConfigurationFilePath&lt;/param-name&gt;
 + *             &lt;param-value&gt;config/default-config.xml&lt;/param-value&gt;
 + *         &lt;/context-param&gt;
 + *         </pre>
 + *     </li>
 + *     </ol>
 + * </li>
 + * <li>
 + * GridGain started from WAR-file and GridGain instance is accessible only to that web application.
 + * Difference with approach described above is that {@code web.xml} file and all libraries should
 + * be added in WAR file without changes in Tomcat configuration files.
 + * </li>
 + * </ul>
 + */
 +public class IgniteServletContextListenerStartup implements ServletContextListener {
 +    /** Configuration file path parameter name. */
-     public static final String GRIDGAIN_CFG_FILE_PATH_PARAM = "GridGainConfigurationFilePath";
++    public static final String IGNITE_CFG_FILE_PATH_PARAM = "IgniteConfigurationFilePath";
 +
 +    /** Names of started grids. */
 +    private final Collection<String> gridNames = new ArrayList<>();
 +
 +    /** {@inheritDoc} */
 +    @Override public void contextInitialized(ServletContextEvent evt) {
 +        ServletContext ctx = evt.getServletContext();
 +
-         String cfgFile = ctx.getInitParameter(GRIDGAIN_CFG_FILE_PATH_PARAM);
++        String cfgFile = ctx.getInitParameter(IGNITE_CFG_FILE_PATH_PARAM);
 +
 +        Collection<IgniteConfiguration> cfgs;
 +        GridSpringResourceContext rsrcCtx = null;
 +
 +        if (cfgFile != null) {
 +            URL cfgUrl = null;
 +
 +            try {
 +                cfgUrl = evt.getServletContext().getResource("/META-INF/" + cfgFile);
 +            }
 +            catch (MalformedURLException ignored) {
-                 // Ignore, we still need to try with GRIDGAIN_HOME.
++                // Ignore, we still need to try with IGNITE_HOME.
 +            }
 +
 +            if (cfgUrl == null)
-                 // Try with GRIDGAIN_HOME and with context class loader.
++                // Try with IGNITE_HOME and with context class loader.
 +                cfgUrl = U.resolveGridGainUrl(cfgFile);
 +
 +            if (cfgUrl == null)
 +                throw new IgniteException("Failed to find Spring configuration file (path provided should be " +
-                     "either absolute, relative to GRIDGAIN_HOME, or relative to META-INF folder): " + cfgFile);
++                    "either absolute, relative to IGNITE_HOME, or relative to META-INF folder): " + cfgFile);
 +
 +            IgniteBiTuple<Collection<IgniteConfiguration>, ? extends GridSpringResourceContext> t;
 +
 +            try {
 +                t = IgnitionEx.loadConfigurations(cfgUrl);
 +            }
 +            catch (IgniteCheckedException e) {
 +                throw new IgniteException("Failed to load GridGain configuration.", e);
 +            }
 +
 +            cfgs = t.get1();
 +            rsrcCtx  = t.get2();
 +
 +            if (cfgs.isEmpty())
 +                throw new IgniteException("Can't find grid factory configuration in: " + cfgUrl);
 +        }
 +        else
 +            cfgs = Collections.<IgniteConfiguration>singleton(new IgniteConfiguration());
 +
 +        try {
 +            assert !cfgs.isEmpty();
 +
 +            for (IgniteConfiguration cfg : cfgs) {
 +                assert cfg != null;
 +
 +                Ignite ignite;
 +
 +                synchronized (IgniteServletContextListenerStartup.class) {
 +                    try {
 +                        ignite = G.ignite(cfg.getGridName());
 +                    }
 +                    catch (IgniteIllegalStateException ignored) {
 +                        ignite = IgnitionEx.start(new IgniteConfiguration(cfg), rsrcCtx);
 +                    }
 +                }
 +
 +                // Check if grid is not null - started properly.
 +                if (ignite != null)
 +                    gridNames.add(ignite.name());
 +            }
 +        }
 +        catch (IgniteCheckedException e) {
 +            // Stop started grids only.
 +            for (String name : gridNames)
 +                G.stop(name, true);
 +
 +            throw new IgniteException("Failed to start GridGain.", e);
 +        }
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public void contextDestroyed(ServletContextEvent evt) {
 +        // Stop started grids only.
 +        for (String name: gridNames)
 +            G.stop(name, true);
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public String toString() {
 +        return S.toString(IgniteServletContextListenerStartup.class, this);
 +    }
 +}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/115f5979/modules/web/src/main/java/org/apache/ignite/startup/servlet/IgniteServletStartup.java
----------------------------------------------------------------------
diff --cc modules/web/src/main/java/org/apache/ignite/startup/servlet/IgniteServletStartup.java
index 32c456c,0000000..20ea055
mode 100644,000000..100644
--- a/modules/web/src/main/java/org/apache/ignite/startup/servlet/IgniteServletStartup.java
+++ b/modules/web/src/main/java/org/apache/ignite/startup/servlet/IgniteServletStartup.java
@@@ -1,187 -1,0 +1,187 @@@
 +/*
 + * 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.startup.servlet;
 +
 +import org.apache.ignite.*;
 +import org.apache.ignite.configuration.*;
 +import org.apache.ignite.internal.*;
 +import org.apache.ignite.lang.*;
 +import org.apache.ignite.internal.processors.resource.*;
 +import org.apache.ignite.internal.util.typedef.*;
 +import org.apache.ignite.internal.util.typedef.internal.*;
 +
 +import javax.servlet.*;
 +import javax.servlet.http.*;
 +import java.net.*;
 +import java.util.*;
 +
 +/**
 + * This class defines servlet-based GridGain startup. This startup can be used to start GridGain
 + * inside any web container as servlet.
 + * <p>
 + * This startup must be defined in {@code web.xml} file.
 + * <pre name="code" class="xml">
 + * &lt;servlet&gt;
 + *     &lt;servlet-name&gt;GridGain&lt;/servlet-name&gt;
 + *     &lt;servlet-class&gt;org.apache.ignite.startup.servlet.IgniteServletStartup&lt;/servlet-class&gt;
 + *     &lt;init-param&gt;
 + *         &lt;param-name&gt;cfgFilePath&lt;/param-name&gt;
 + *         &lt;param-value&gt;config/default-config.xml&lt;/param-value&gt;
 + *     &lt;/init-param&gt;
 + *     &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
 + * &lt;/servlet&gt;
 + * </pre>
 + * <p>
 + * Servlet-based startup may be used in any web container like Tomcat, Jetty and etc.
 + * Depending on the way this startup is deployed the GridGain instance can be accessed
 + * by either all web applications or by only one. See web container class loading architecture:
 + * <ul>
 + * <li><a target=_blank href="http://tomcat.apache.org/tomcat-7.0-doc/class-loader-howto.html">http://tomcat.apache.org/tomcat-7.0-doc/class-loader-howto.html</a></li>
 + * <li><a target=_blank href="http://docs.codehaus.org/display/JETTY/Classloading">http://docs.codehaus.org/display/JETTY/Classloading</a></li>
 + * </ul>
 + * <p>
 + * <h2 class="header">Tomcat</h2>
 + * There are two ways to start GridGain on Tomcat.
 + * <ul>
 + * <li>GridGain started when web container starts and GridGain instance is accessible only to all web applications.
 + * <ol>
 + *     <li>Add GridGain libraries in Tomcat common loader.
 + *         Add in file {@code $TOMCAT_HOME/conf/catalina.properties} for property {@code shared.loader}
-  *         the following {@code $GRIDGAIN_HOME/gridgain.jar,$GRIDGAIN_HOME/libs/*.jar}
-  *         (replace {@code $GRIDGAIN_HOME} with absolute path).
++ *         the following {@code $IGNITE_HOME/gridgain.jar,$IGNITE_HOME/libs/*.jar}
++ *         (replace {@code $IGNITE_HOME} with absolute path).
 + *     </li>
 + *     <li>Configure startup in {@code $TOMCAT_HOME/conf/web.xml}
 + *         <pre name="code" class="xml">
 + *         &lt;servlet&gt;
 + *             &lt;servlet-name&gt;GridGain&lt;/servlet-name&gt;
 + *             &lt;servlet-class&gt;org.apache.ignite.startup.servlet.IgniteServletStartup&lt;/servlet-class&gt;
 + *             &lt;init-param&gt;
 + *                 &lt;param-name&gt;cfgFilePath&lt;/param-name&gt;
 + *                 &lt;param-value&gt;config/default-config.xml&lt;/param-value&gt;
 + *             &lt;/init-param&gt;
 + *             &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
 + *         &lt;/servlet&gt;
 + *         </pre>
 + *     </li>
 + *     </ol>
 + * </li>
 + * <li>
 + * GridGain started from WAR-file and GridGain instance is accessible only to that web application.
 + * Difference with approach described above is that {@code web.xml} file and all libraries should
 + * be added in WAR file without changes in Tomcat configuration files.
 + * </li>
 + * </ul>
 + * <p>
 + * <h2 class="header">Jetty</h2>
 + * Below is Java code example with Jetty API:
 + * <pre name="code" class="java">
 + * Server service = new Server();
 + *
 + * service.addListener("localhost:8090");
 + *
 + * ServletHttpContext ctx = (ServletHttpContext)service.getContext("/");
 + *
 + * ServletHolder servlet = ctx.addServlet("GridGain", "/GridGainStartup",
 + *      "org.apache.ignite.startup.servlet.IgniteServletStartup");
 + *
 + * servlet.setInitParameter("cfgFilePath", "config/default-config.xml");
 + *
 + * servlet.setInitOrder(1);
 + *
 + * servlet.start();
 + *
 + * service.start();
 + * </pre>
 + */
 +public class IgniteServletStartup extends HttpServlet {
 +    /** */
 +    private static final long serialVersionUID = 0L;
 +
 +    /** Grid loaded flag. */
 +    private static boolean loaded;
 +
 +    /** Configuration file path variable name. */
 +    private static final String cfgFilePathParam = "cfgFilePath";
 +
 +    /** */
 +    private Collection<String> gridNames = new ArrayList<>();
 +
 +    /** {@inheritDoc} */
 +    @SuppressWarnings({"unchecked"})
 +    @Override public void init() throws ServletException {
 +        // Avoid multiple servlet instances. GridGain should be loaded once.
 +        if (loaded)
 +            return;
 +
 +        String cfgFile = getServletConfig().getInitParameter(cfgFilePathParam);
 +
 +        if (cfgFile == null)
 +            throw new ServletException("Failed to read property: " + cfgFilePathParam);
 +
 +        URL cfgUrl = U.resolveGridGainUrl(cfgFile);
 +
 +        if (cfgUrl == null)
 +            throw new ServletException("Failed to find Spring configuration file (path provided should be " +
-                 "either absolute, relative to GRIDGAIN_HOME, or relative to META-INF folder): " + cfgFile);
++                "either absolute, relative to IGNITE_HOME, or relative to META-INF folder): " + cfgFile);
 +
 +        try {
 +            IgniteBiTuple<Collection<IgniteConfiguration>, ? extends GridSpringResourceContext> t =
 +                IgnitionEx.loadConfigurations(cfgUrl);
 +
 +            Collection<IgniteConfiguration> cfgs = t.get1();
 +
 +            if (cfgs == null)
 +                throw new ServletException("Failed to find a single grid factory configuration in: " + cfgUrl);
 +
 +            for (IgniteConfiguration cfg : cfgs) {
 +                assert cfg != null;
 +
 +                IgniteConfiguration adapter = new IgniteConfiguration(cfg);
 +
 +                Ignite ignite = IgnitionEx.start(adapter, t.get2());
 +
 +                // Test if grid is not null - started properly.
 +                if (ignite != null)
 +                    gridNames.add(ignite.name());
 +            }
 +        }
 +        catch (IgniteCheckedException e) {
 +            // Stop started grids only.
 +            for (String name: gridNames)
 +                G.stop(name, true);
 +
 +            throw new ServletException("Failed to start GridGain.", e);
 +        }
 +
 +        loaded = true;
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public void destroy() {
 +        // Stop started grids only.
 +        for (String name: gridNames)
 +            G.stop(name, true);
 +
 +        loaded = false;
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public String toString() {
 +        return S.toString(IgniteServletStartup.class, this);
 +    }
 +}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/115f5979/pom.xml
----------------------------------------------------------------------


[09/50] [abbrv] incubator-ignite git commit: Tests: Fix compile

Posted by se...@apache.org.
Tests: Fix compile


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

Branch: refs/heads/ignite-sql
Commit: f30d79d1f4b71833fea763fdacfe5f15300e4aa2
Parents: 4009aaa
Author: ivasilinets <iv...@gridgain.com>
Authored: Thu Jan 29 18:29:51 2015 +0300
Committer: ivasilinets <iv...@gridgain.com>
Committed: Thu Jan 29 18:29:51 2015 +0300

----------------------------------------------------------------------
 .../org/apache/ignite/visor/commands/alert/VisorAlertCommand.scala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f30d79d1/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/alert/VisorAlertCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/alert/VisorAlertCommand.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/alert/VisorAlertCommand.scala
index 1899ca4..8047b8a 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/alert/VisorAlertCommand.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/alert/VisorAlertCommand.scala
@@ -17,7 +17,7 @@
 
 package org.apache.ignite.visor.commands.alert
 
-import org.apache.ignite.internal.util.{IgniteUtils => U}
+import org.apache.ignite.internal.util.IgniteUtils
 import org.apache.ignite.internal.util.lang.{GridFunc => F}
 
 import org.apache.ignite._


[31/50] [abbrv] incubator-ignite git commit: Merge remote-tracking branch 'origin/sprint-1' into sprint-1

Posted by se...@apache.org.
Merge remote-tracking branch 'origin/sprint-1' into sprint-1


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

Branch: refs/heads/ignite-sql
Commit: c98118f0df4cbdad7b66ffa14501f18a72d8df00
Parents: 2ec1cb2 71442e2
Author: AKuznetsov <ak...@gridgain.com>
Authored: Fri Jan 30 17:36:05 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Fri Jan 30 17:36:05 2015 +0700

----------------------------------------------------------------------
 .../util/ipc/shmem/IpcSharedMemoryNativeLoaderSelfTest.java      | 2 +-
 .../java/org/apache/ignite/messaging/GridMessagingSelfTest.java  | 2 +-
 .../ignite/internal/processors/hadoop/GridHadoopClassLoader.java | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------



[02/50] [abbrv] incubator-ignite git commit: GridUtils -> IgniteUtils

Posted by se...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fc768b83/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
new file mode 100644
index 0000000..fedf24b
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
@@ -0,0 +1,9141 @@
+/*
+ * 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.util;
+
+import org.apache.ignite.*;
+import org.apache.ignite.cache.*;
+import org.apache.ignite.cluster.*;
+import org.apache.ignite.compute.*;
+import org.apache.ignite.configuration.*;
+import org.apache.ignite.events.*;
+import org.apache.ignite.internal.*;
+import org.apache.ignite.internal.mxbean.*;
+import org.apache.ignite.internal.processors.cache.*;
+import org.apache.ignite.internal.processors.cache.version.*;
+import org.apache.ignite.lang.*;
+import org.apache.ignite.lifecycle.*;
+import org.apache.ignite.portables.*;
+import org.apache.ignite.spi.*;
+import org.apache.ignite.internal.managers.deployment.*;
+import org.apache.ignite.internal.processors.streamer.*;
+import org.apache.ignite.spi.discovery.*;
+import org.apache.ignite.internal.util.io.*;
+import org.apache.ignite.internal.util.lang.*;
+import org.apache.ignite.internal.util.typedef.*;
+import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.internal.util.worker.*;
+import org.jdk8.backport.*;
+import org.jetbrains.annotations.*;
+import sun.misc.*;
+
+import javax.management.*;
+import javax.naming.*;
+import javax.net.ssl.*;
+import java.io.*;
+import java.lang.annotation.Annotation;
+import java.lang.management.*;
+import java.lang.reflect.Array;
+import java.lang.reflect.*;
+import java.math.*;
+import java.net.*;
+import java.nio.*;
+import java.nio.channels.*;
+import java.nio.channels.spi.*;
+import java.nio.charset.*;
+import java.security.*;
+import java.security.cert.*;
+import java.sql.*;
+import java.sql.Timestamp;
+import java.text.*;
+import java.util.*;
+import java.util.Date;
+import java.util.concurrent.*;
+import java.util.concurrent.atomic.*;
+import java.util.concurrent.locks.*;
+import java.util.jar.*;
+import java.util.logging.*;
+import java.util.regex.*;
+import java.util.zip.*;
+
+import static org.apache.ignite.IgniteSystemProperties.*;
+import static org.apache.ignite.events.IgniteEventType.*;
+import static org.apache.ignite.internal.GridNodeAttributes.*;
+
+/**
+ * Collection of utility methods used throughout the system.
+ */
+@SuppressWarnings({"UnusedReturnValue", "UnnecessaryFullyQualifiedName"})
+public abstract class IgniteUtils {
+    /** Unsafe. */
+    private static final Unsafe UNSAFE = GridUnsafe.unsafe();
+
+    /** {@code True} if {@code unsafe} should be used for array copy. */
+    private static final boolean UNSAFE_BYTE_ARR_CP = unsafeByteArrayCopyAvailable();
+
+    /** Offset. */
+    private static final int BYTE_ARRAY_DATA_OFFSET = UNSAFE.arrayBaseOffset(byte[].class);
+
+    /** Sun-specific JDK constructor factory for objects that don't have empty constructor. */
+    private static final Method CTOR_FACTORY;
+
+    /** Sun JDK reflection factory. */
+    private static final Object SUN_REFLECT_FACTORY;
+
+    /** Public {@code java.lang.Object} no-argument constructor. */
+    private static final Constructor OBJECT_CTOR;
+
+    /** All grid event names. */
+    private static final Map<Integer, String> GRID_EVT_NAMES = new HashMap<>();
+
+    /** All grid events. */
+    private static final int[] GRID_EVTS;
+
+    /** Empty integers array. */
+    private static final int[] EMPTY_INTS = new int[0];
+
+    /** Empty  longs. */
+    private static final long[] EMPTY_LONGS = new long[0];
+
+    /** System line separator. */
+    private static final String NL = System.getProperty("line.separator");
+
+    /** Default user version. */
+    public static final String DFLT_USER_VERSION = "0";
+
+    /** Cache for {@link GridPeerDeployAware} fields to speed up reflection. */
+    private static final ConcurrentMap<String, IgniteBiTuple<Class<?>, Collection<Field>>> p2pFields =
+        new ConcurrentHashMap8<>();
+
+    /** Secure socket protocol to use. */
+    private static final String HTTPS_PROTOCOL = "TLS";
+
+    /** Project home directory. */
+    private static volatile GridTuple<String> ggHome;
+
+    /** Project work directory. */
+    private static volatile String ggWork;
+
+    /** OS JDK string. */
+    private static String osJdkStr;
+
+    /** OS string. */
+    private static String osStr;
+
+    /** JDK string. */
+    private static String jdkStr;
+
+    /** Indicates whether current OS is Windows 95. */
+    private static boolean win95;
+
+    /** Indicates whether current OS is Windows 98. */
+    private static boolean win98;
+
+    /** Indicates whether current OS is Windows NT. */
+    private static boolean winNt;
+
+    /** Indicates whether current OS is Windows Vista. */
+    private static boolean winVista;
+
+    /** Indicates whether current OS is Windows 7. */
+    private static boolean win7;
+
+    /** Indicates whether current OS is Windows 8. */
+    private static boolean win8;
+
+    /** Indicates whether current OS is Windows 8.1. */
+    private static boolean win81;
+
+    /** Indicates whether current OS is some version of Windows. */
+    private static boolean unknownWin;
+
+    /** Indicates whether current OS is Windows 2000. */
+    private static boolean win2k;
+
+    /** Indicates whether current OS is Windows XP. */
+    private static boolean winXp;
+
+    /** Indicates whether current OS is Windows Server 2003. */
+    private static boolean win2003;
+
+    /** Indicates whether current OS is Windows Server 2008. */
+    private static boolean win2008;
+
+    /** Indicates whether current OS is UNIX flavor. */
+    private static boolean unix;
+
+    /** Indicates whether current OS is Solaris. */
+    private static boolean solaris;
+
+    /** Indicates whether current OS is Linux flavor. */
+    private static boolean linux;
+
+    /** Indicates whether current OS is NetWare. */
+    private static boolean netware;
+
+    /** Indicates whether current OS is Mac OS. */
+    private static boolean mac;
+
+    /** Indicates whether current OS architecture is Sun Sparc. */
+    private static boolean sparc;
+
+    /** Indicates whether current OS architecture is Intel X86. */
+    private static boolean x86;
+
+    /** Name of the underlying OS. */
+    private static String osName;
+
+    /** Version of the underlying OS. */
+    private static String osVer;
+
+    /** CPU architecture of the underlying OS. */
+    private static String osArch;
+
+    /** Name of the Java Runtime. */
+    private static String javaRtName;
+
+    /** Name of the Java Runtime version. */
+    private static String javaRtVer;
+
+    /** Name of the JDK vendor. */
+    private static String jdkVendor;
+
+    /** Name of the JDK. */
+    private static String jdkName;
+
+    /** Version of the JDK. */
+    private static String jdkVer;
+
+    /** Name of JVM specification. */
+    private static String jvmSpecName;
+
+    /** Version of JVM implementation. */
+    private static String jvmImplVer;
+
+    /** Vendor's name of JVM implementation. */
+    private static String jvmImplVendor;
+
+    /** Name of the JVM implementation. */
+    private static String jvmImplName;
+
+    /** JMX domain as 'xxx.gridgain'. */
+    public static final String JMX_DOMAIN = IgniteUtils.class.getName().substring(0, IgniteUtils.class.getName().
+        indexOf('.', IgniteUtils.class.getName().indexOf('.') + 1));
+
+    /** Network packet header. */
+    public static final byte[] GG_HEADER = U.intToBytes(0x00004747);
+
+    /** Default buffer size = 4K. */
+    private static final int BUF_SIZE = 4096;
+
+    /** Byte bit-mask. */
+    private static final int MASK = 0xf;
+
+    /** Long date format pattern for log messages. */
+    private static final SimpleDateFormat LONG_DATE_FMT = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss");
+
+    /**
+     * Short date format pattern for log messages in "quiet" mode.
+     * Only time is included since we don't expect "quiet" mode to be used
+     * for longer runs.
+     */
+    private static final SimpleDateFormat SHORT_DATE_FMT = new SimpleDateFormat("HH:mm:ss");
+
+    /** Debug date format. */
+    private static final SimpleDateFormat DEBUG_DATE_FMT = new SimpleDateFormat("HH:mm:ss,SSS");
+
+    /** Cached local host address to make sure that every time the same local host is returned. */
+    private static InetAddress locHost;
+
+    /** */
+    static volatile long curTimeMillis = System.currentTimeMillis();
+
+    /** Primitive class map. */
+    private static final Map<String, Class<?>> primitiveMap = new HashMap<>(16, .5f);
+
+    /** Boxed class map. */
+    private static final Map<Class<?>, Class<?>> boxedClsMap = new HashMap<>(16, .5f);
+
+    /** Class loader used to load GridGain. */
+    private static final ClassLoader gridClassLoader = IgniteUtils.class.getClassLoader();
+
+    /** MAC OS invalid argument socket error message. */
+    public static final String MAC_INVALID_ARG_MSG = "On MAC OS you may have too many file descriptors open " +
+        "(simple restart usually solves the issue)";
+
+    /** Default help pages. */
+    public static final List<String> DFLT_HELP_LINKS = Arrays.asList(
+        "Troubleshooting:      http://bit.ly/GridGain-Troubleshooting",
+        "Documentation Center: http://bit.ly/GridGain-Documentation");
+
+    /** Portable classes. */
+    private static final Collection<Class<?>> PORTABLE_CLS = new HashSet<>();
+
+    /** GridGain Logging Directory. */
+    public static final String GRIDGAIN_LOG_DIR = System.getenv(GG_LOG_DIR);
+
+    /** GridGain Work Directory. */
+    public static final String GRIDGAIN_WORK_DIR = System.getenv(GG_WORK_DIR);
+
+    /** Clock timer. */
+    private static Thread timer;
+
+    /** Grid counter. */
+    private static int gridCnt;
+
+    /** Mutex. */
+    private static final Object mux = new Object();
+
+    /**
+     * Initializes enterprise check.
+     */
+    static {
+        String osName = System.getProperty("os.name");
+
+        String osLow = osName.toLowerCase();
+
+        // OS type detection.
+        if (osLow.contains("win")) {
+            if (osLow.contains("95"))
+                win95 = true;
+            else if (osLow.contains("98"))
+                win98 = true;
+            else if (osLow.contains("nt"))
+                winNt = true;
+            else if (osLow.contains("2000"))
+                win2k = true;
+            else if (osLow.contains("vista"))
+                winVista = true;
+            else if (osLow.contains("xp"))
+                winXp = true;
+            else if (osLow.contains("2003"))
+                win2003 = true;
+            else if (osLow.contains("2008"))
+                win2008 = true;
+            else if (osLow.contains("7"))
+                win7 = true;
+            else if (osLow.contains("8.1"))
+                win81 = true;
+            else if (osLow.contains("8"))
+                win8 = true;
+            else
+                unknownWin = true;
+        }
+        else if (osLow.contains("netware"))
+            netware = true;
+        else if (osLow.contains("mac os"))
+            mac = true;
+        else {
+            // UNIXs flavors tokens.
+            for (CharSequence os : new String[]{"ix", "inux", "olaris", "un", "ux", "sco", "bsd", "att"})
+                if (osLow.contains(os)) {
+                    unix = true;
+
+                    break;
+                }
+
+            // UNIX name detection.
+            if (osLow.contains("olaris"))
+                solaris = true;
+            else if (osLow.contains("inux"))
+                linux = true;
+        }
+
+        String osArch = System.getProperty("os.arch");
+
+        String archStr = osArch.toLowerCase();
+
+        // OS architecture detection.
+        if (archStr.contains("x86"))
+            x86 = true;
+        else if (archStr.contains("sparc"))
+            sparc = true;
+
+        String javaRtName = System.getProperty("java.runtime.name");
+        String javaRtVer = System.getProperty("java.runtime.version");
+        String jdkVendor = System.getProperty("java.specification.vendor");
+        String jdkName = System.getProperty("java.specification.name");
+        String jdkVer = System.getProperty("java.specification.version");
+        String osVer = System.getProperty("os.version");
+        String jvmSpecName = System.getProperty("java.vm.specification.name");
+        String jvmImplVer = System.getProperty("java.vm.version");
+        String jvmImplVendor = System.getProperty("java.vm.vendor");
+        String jvmImplName = System.getProperty("java.vm.name");
+
+        String jdkStr = javaRtName + ' ' + javaRtVer + ' ' + jvmImplVendor + ' ' + jvmImplName + ' ' +
+            jvmImplVer;
+
+        osStr = osName + ' ' + osVer + ' ' + osArch;
+        osJdkStr = osLow + ", " + jdkStr;
+
+        // Copy auto variables to static ones.
+        IgniteUtils.osName = osName;
+        IgniteUtils.jdkName = jdkName;
+        IgniteUtils.jdkVendor = jdkVendor;
+        IgniteUtils.jdkVer = jdkVer;
+        IgniteUtils.jdkStr = jdkStr;
+        IgniteUtils.osVer = osVer;
+        IgniteUtils.osArch = osArch;
+        IgniteUtils.jvmSpecName = jvmSpecName;
+        IgniteUtils.jvmImplVer = jvmImplVer;
+        IgniteUtils.jvmImplVendor = jvmImplVendor;
+        IgniteUtils.jvmImplName = jvmImplName;
+        IgniteUtils.javaRtName = javaRtName;
+        IgniteUtils.javaRtVer = javaRtVer;
+
+        primitiveMap.put("byte", byte.class);
+        primitiveMap.put("short", short.class);
+        primitiveMap.put("int", int.class);
+        primitiveMap.put("long", long.class);
+        primitiveMap.put("float", float.class);
+        primitiveMap.put("double", double.class);
+        primitiveMap.put("char", char.class);
+        primitiveMap.put("boolean", boolean.class);
+
+        boxedClsMap.put(byte.class, Byte.class);
+        boxedClsMap.put(short.class, Short.class);
+        boxedClsMap.put(int.class, Integer.class);
+        boxedClsMap.put(long.class, Long.class);
+        boxedClsMap.put(float.class, Float.class);
+        boxedClsMap.put(double.class, Double.class);
+        boxedClsMap.put(char.class, Character.class);
+        boxedClsMap.put(boolean.class, Boolean.class);
+
+        try {
+            OBJECT_CTOR = Object.class.getConstructor();
+        }
+        catch (NoSuchMethodException e) {
+            throw withCause(new AssertionError("Object class does not have empty constructor (is JDK corrupted?)."), e);
+        }
+
+        // Constructor factory.
+        Method ctorFac = null;
+        Object refFac = null;
+
+        try {
+            Class<?> refFactoryCls = Class.forName("sun.reflect.ReflectionFactory");
+
+            refFac = refFactoryCls.getMethod("getReflectionFactory").invoke(null);
+
+            ctorFac = refFac.getClass().getMethod("newConstructorForSerialization", Class.class,
+                Constructor.class);
+        }
+        catch (NoSuchMethodException | ClassNotFoundException | IllegalAccessException | InvocationTargetException ignored) {
+            // No-op.
+        }
+
+        CTOR_FACTORY = ctorFac;
+        SUN_REFLECT_FACTORY = refFac;
+
+        // Disable hostname SSL verification for development and testing with self-signed certificates.
+        if (Boolean.parseBoolean(System.getProperty(GG_DISABLE_HOSTNAME_VERIFIER))) {
+            HttpsURLConnection.setDefaultHostnameVerifier(new HostnameVerifier() {
+                @Override public boolean verify(String hostname, SSLSession sslSes) {
+                    return true;
+                }
+            });
+        }
+
+        // Event names initialization.
+        for (Field field : IgniteEventType.class.getFields()) {
+            if (field.getType().equals(int.class)) {
+                try {
+                    assert field.getName().startsWith("EVT_") : "Invalid event name (should start with 'EVT_': " +
+                        field.getName();
+
+                    int type = field.getInt(null);
+
+                    String prev = GRID_EVT_NAMES.put(type, field.getName().substring(4));
+
+                    // Check for duplicate event types.
+                    assert prev == null : "Duplicate event [type=" + type + ", name1=" + prev +
+                        ", name2=" + field.getName() + ']';
+                }
+                catch (IllegalAccessException e) {
+                    throw new IgniteException(e);
+                }
+            }
+        }
+
+        // Event array initialization.
+        GRID_EVTS = toIntArray(GRID_EVT_NAMES.keySet());
+
+        // Sort for fast event lookup.
+        Arrays.sort(GRID_EVTS);
+
+        // We need to re-initialize EVTS_ALL and EVTS_ALL_MINUS_METRIC_UPDATE
+        // because they may have been initialized to null before GRID_EVTS were initialized.
+        if (EVTS_ALL == null || EVTS_ALL_MINUS_METRIC_UPDATE == null) {
+            try {
+                Field f1 = IgniteEventType.class.getDeclaredField("EVTS_ALL");
+                Field f2 = IgniteEventType.class.getDeclaredField("EVTS_ALL_MINUS_METRIC_UPDATE");
+
+                assert f1 != null;
+                assert f2 != null;
+
+                // We use unsafe operations to update static fields on interface because
+                // they are treated as static final and cannot be updated via standard reflection.
+                UNSAFE.putObjectVolatile(UNSAFE.staticFieldBase(f1), UNSAFE.staticFieldOffset(f1), gridEvents());
+                UNSAFE.putObjectVolatile(UNSAFE.staticFieldBase(f2), UNSAFE.staticFieldOffset(f2),
+                    gridEvents(EVT_NODE_METRICS_UPDATED));
+
+                assert EVTS_ALL != null;
+                assert EVTS_ALL.length == GRID_EVTS.length;
+
+                assert EVTS_ALL_MINUS_METRIC_UPDATE != null;
+                assert EVTS_ALL_MINUS_METRIC_UPDATE.length == GRID_EVTS.length - 1;
+
+                // Validate correctness.
+                for (int type : GRID_EVTS) {
+                    assert containsIntArray(EVTS_ALL, type);
+
+                    if (type != EVT_NODE_METRICS_UPDATED)
+                        assert containsIntArray(EVTS_ALL_MINUS_METRIC_UPDATE, type);
+                }
+
+                assert !containsIntArray(EVTS_ALL_MINUS_METRIC_UPDATE, EVT_NODE_METRICS_UPDATED);
+            }
+            catch (NoSuchFieldException e) {
+                throw new IgniteException(e);
+            }
+        }
+
+        PORTABLE_CLS.add(Byte.class);
+        PORTABLE_CLS.add(Short.class);
+        PORTABLE_CLS.add(Integer.class);
+        PORTABLE_CLS.add(Long.class);
+        PORTABLE_CLS.add(Float.class);
+        PORTABLE_CLS.add(Double.class);
+        PORTABLE_CLS.add(Character.class);
+        PORTABLE_CLS.add(Boolean.class);
+        PORTABLE_CLS.add(String.class);
+        PORTABLE_CLS.add(UUID.class);
+        PORTABLE_CLS.add(Date.class);
+        PORTABLE_CLS.add(Timestamp.class);
+        PORTABLE_CLS.add(byte[].class);
+        PORTABLE_CLS.add(short[].class);
+        PORTABLE_CLS.add(int[].class);
+        PORTABLE_CLS.add(long[].class);
+        PORTABLE_CLS.add(float[].class);
+        PORTABLE_CLS.add(double[].class);
+        PORTABLE_CLS.add(char[].class);
+        PORTABLE_CLS.add(boolean[].class);
+        PORTABLE_CLS.add(String[].class);
+        PORTABLE_CLS.add(UUID[].class);
+        PORTABLE_CLS.add(Date[].class);
+        PORTABLE_CLS.add(Timestamp[].class);
+    }
+
+    /**
+     * @return System time approximated by 10 ms.
+     */
+    public static long currentTimeMillis() {
+        return curTimeMillis;
+    }
+
+    /**
+     * @return Value of {@link System#nanoTime()} in microseconds.
+     */
+    public static long microTime() {
+        return System.nanoTime() / 1000;
+    }
+
+    /**
+     * Gets nearest power of 2 larger or equal than v.
+     *
+     * @param v Value.
+     * @return Nearest power of 2.
+     */
+    public static int ceilPow2(int v) {
+        v--;
+
+        v |= v >> 1;
+        v |= v >> 2;
+        v |= v >> 4;
+        v |= v >> 8;
+        v |= v >> 16;
+
+        return ++v;
+    }
+
+    /**
+     * @param i Value.
+     * @return {@code true} If the given value is power of 2 (0 is not power of 2).
+     */
+    public static boolean isPow2(int i) {
+        return i > 0 && (i & (i - 1)) == 0;
+    }
+
+    /**
+     * Return SUN specific constructor factory.
+     *
+     * @return SUN specific constructor factory.
+     */
+    @Nullable public static Method ctorFactory() {
+        return CTOR_FACTORY;
+    }
+
+    /**
+     * @return Empty constructor for object class.
+     */
+    public static Constructor objectConstructor() {
+        return OBJECT_CTOR;
+    }
+
+    /**
+     * SUN JDK specific reflection factory for objects without public constructor.
+     *
+     * @return Reflection factory for objects without public constructor.
+     */
+    @Nullable public static Object sunReflectionFactory() {
+        return SUN_REFLECT_FACTORY;
+    }
+
+    /**
+     * Gets name for given grid event type.
+     *
+     * @param type Event type.
+     * @return Event name.
+     */
+    public static String gridEventName(int type) {
+        String name = GRID_EVT_NAMES.get(type);
+
+        return name != null ? name : Integer.toString(type);
+    }
+
+    /**
+     * Gets all event types.
+     *
+     * @param excl Optional exclude events.
+     * @return All events minus excluded ones.
+     */
+    public static int[] gridEvents(final int... excl) {
+        if (F.isEmpty(excl))
+            return GRID_EVTS;
+
+        List<Integer> evts = toIntList(GRID_EVTS, new P1<Integer>() {
+            @Override
+            public boolean apply(Integer i) {
+                return !containsIntArray(excl, i);
+            }
+        });
+
+        return toIntArray(evts);
+    }
+
+    /**
+     * @param discoSpi Discovery SPI.
+     * @return {@code True} if ordering is supported.
+     */
+    public static boolean discoOrdered(DiscoverySpi discoSpi) {
+        DiscoverySpiOrderSupport ann = U.getAnnotation(discoSpi.getClass(), DiscoverySpiOrderSupport.class);
+
+        return ann != null && ann.value();
+    }
+
+    /**
+     * @return Checks if disco ordering should be enforced.
+     */
+    public static boolean relaxDiscoveryOrdered() {
+        return "true".equalsIgnoreCase(System.getProperty(GG_NO_DISCO_ORDER));
+    }
+
+    /**
+     * This method should be used for adding quick debug statements in code
+     * while debugging. Calls to this method should never be committed to master.
+     *
+     * @param msg Message to debug.
+     * @deprecated Calls to this method should never be committed to master.
+     */
+    @Deprecated
+    public static void debug(Object msg) {
+        X.println(debugPrefix() + msg);
+    }
+
+    /**
+     * This method should be used for adding quick debug statements in code
+     * while debugging. Calls to this method should never be committed to master.
+     *
+     * @param msg Message to debug.
+     * @deprecated Calls to this method should never be committed to master.
+     */
+    @Deprecated
+    public static void debugx(String msg) {
+        X.printerrln(debugPrefix() + msg);
+    }
+
+    /**
+     * This method should be used for adding quick debug statements in code
+     * while debugging. Calls to this method should never be committed to master.
+     *
+     * @param log Logger.
+     * @param msg Message to debug.
+     *
+     * @deprecated Calls to this method should never be committed to master.
+     */
+    @Deprecated
+    public static void debug(IgniteLogger log, String msg) {
+        log.info(msg);
+    }
+
+    /**
+     * Prints stack trace of the current thread to {@code System.out}.
+     *
+     * @deprecated Calls to this method should never be committed to master.
+     */
+    @SuppressWarnings("deprecation")
+    @Deprecated
+    public static void dumpStack() {
+        dumpStack("Dumping stack.");
+    }
+
+    /**
+     * Prints stack trace of the current thread to {@code System.out}.
+     *
+     * @param msg Message to print with the stack.
+     *
+     * @deprecated Calls to this method should never be committed to master.
+     */
+    @Deprecated
+    public static void dumpStack(String msg) {
+        new Exception(debugPrefix() + msg).printStackTrace(System.out);
+    }
+
+    /**
+     * @param log Logger.
+     * @param msg Message.
+     */
+    public static void dumpStack(@Nullable IgniteLogger log, String msg) {
+        U.error(log, "Dumping stack.", new Exception(msg));
+    }
+
+    /**
+     * Prints stack trace of the current thread to provided output stream.
+     *
+     * @param msg Message to print with the stack.
+     * @param out Output to dump stack to.
+     *
+     * @deprecated Calls to this method should never be committed to master.
+     */
+    @Deprecated
+    public static void dumpStack(String msg, PrintStream out) {
+        new Exception(msg).printStackTrace(out);
+    }
+
+    /**
+     * Prints stack trace of the current thread to provided logger.
+     *
+     * @param log Logger.
+     * @param msg Message to print with the stack.
+     *
+     * @deprecated Calls to this method should never be committed to master.
+     */
+    @Deprecated
+    public static void debugStack(IgniteLogger log, String msg) {
+        log.error(msg, new Exception(debugPrefix() + msg));
+    }
+
+    /**
+     * @return Common prefix for debug messages.
+     */
+    private static String debugPrefix() {
+        return '<' + DEBUG_DATE_FMT.format(new Date(System.currentTimeMillis())) + "><DEBUG><" +
+            Thread.currentThread().getName() + '>' + ' ';
+    }
+
+    /**
+     * Prints heap usage.
+     */
+    public static void debugHeapUsage() {
+        System.gc();
+
+        Runtime runtime = Runtime.getRuntime();
+
+        X.println('<' + DEBUG_DATE_FMT.format(new Date(System.currentTimeMillis())) + "><DEBUG><" +
+            Thread.currentThread().getName() + "> Heap stats [free=" + runtime.freeMemory() / (1024 * 1024) +
+            "M, total=" + runtime.totalMemory() / (1024 * 1024) + "M]");
+    }
+
+    /**
+     * Gets heap size in GB rounded to specified precision.
+     *
+     * @param node Node.
+     * @param precision Precision.
+     * @return Heap size in GB.
+     */
+    public static double heapSize(ClusterNode node, int precision) {
+        return heapSize(Collections.singleton(node), precision);
+    }
+
+    /**
+     * Gets total heap size in GB rounded to specified precision.
+     *
+     * @param nodes Nodes.
+     * @param precision Precision.
+     * @return Total heap size in GB.
+     */
+    public static double heapSize(Iterable<ClusterNode> nodes, int precision) {
+        // In bytes.
+        double heap = 0.0;
+
+        for (ClusterNode n : nodesPerJvm(nodes)) {
+            ClusterMetrics m = n.metrics();
+
+            heap += Math.max(m.getHeapMemoryInitialized(), m.getHeapMemoryMaximum());
+        }
+
+        return roundedHeapSize(heap, precision);
+    }
+
+    /**
+     * Returns one representative node for each JVM.
+     *
+     * @param nodes Nodes.
+     * @return Collection which contains only one representative node for each JVM.
+     */
+    private static Iterable<ClusterNode> nodesPerJvm(Iterable<ClusterNode> nodes) {
+        Map<String, ClusterNode> grpMap = new HashMap<>();
+
+        // Group by mac addresses and pid.
+        for (ClusterNode node : nodes) {
+            String grpId = node.attribute(ATTR_MACS) + "|" + node.attribute(ATTR_JVM_PID);
+
+            if (!grpMap.containsKey(grpId))
+                grpMap.put(grpId, node);
+        }
+
+        return grpMap.values();
+    }
+
+    /**
+     * Returns current JVM maxMemory in the same format as {@link #heapSize(org.apache.ignite.cluster.ClusterNode, int)}.
+     *
+     * @param precision Precision.
+     * @return Maximum memory size in GB.
+     */
+    public static double heapSize(int precision) {
+        return roundedHeapSize(Runtime.getRuntime().maxMemory(), precision);
+    }
+
+    /**
+     * Rounded heap size in gigabytes.
+     *
+     * @param heap Heap.
+     * @param precision Precision.
+     * @return Rounded heap size.
+     */
+    private static double roundedHeapSize(double heap, int precision) {
+        double rounded = new BigDecimal(heap / (1024 * 1024 * 1024d)).round(new MathContext(precision)).doubleValue();
+
+        return rounded < 0.1 ? 0.1 : rounded;
+    }
+
+    /**
+     * Performs thread dump and prints all available info to the given log.
+     *
+     * @param log Logger.
+     */
+    public static void dumpThreads(@Nullable IgniteLogger log) {
+        ThreadMXBean mxBean = ManagementFactory.getThreadMXBean();
+
+        ThreadInfo[] threadInfos =
+            mxBean.dumpAllThreads(mxBean.isObjectMonitorUsageSupported(), mxBean.isSynchronizerUsageSupported());
+
+        GridStringBuilder sb = new GridStringBuilder("Thread dump at ")
+            .a(new SimpleDateFormat("yyyy/MM/dd HH:mm:ss z").format(new Date(U.currentTimeMillis()))).a(NL);
+
+        for (ThreadInfo info : threadInfos) {
+            printThreadInfo(info, sb);
+
+            sb.a(NL);
+
+            if (info.getLockedSynchronizers() != null && info.getLockedSynchronizers().length > 0) {
+                printSynchronizersInfo(info.getLockedSynchronizers(), sb);
+
+                sb.a(NL);
+            }
+        }
+
+        sb.a(NL);
+
+        warn(log, sb.toString());
+    }
+
+    /**
+     * Prints single thread info to a buffer.
+     *
+     * @param threadInfo Thread info.
+     * @param sb Buffer.
+     */
+    private static void printThreadInfo(ThreadInfo threadInfo, GridStringBuilder sb) {
+        sb.a("Thread [name=\"").a(threadInfo.getThreadName())
+            .a("\", id=").a(threadInfo.getThreadId())
+            .a(", state=").a(threadInfo.getThreadState())
+            .a(", blockCnt=").a(threadInfo.getBlockedCount())
+            .a(", waitCnt=").a(threadInfo.getWaitedCount()).a("]").a(NL);
+
+        LockInfo lockInfo = threadInfo.getLockInfo();
+
+        if (lockInfo != null) {
+            sb.a("    Lock [object=").a(lockInfo)
+                .a(", ownerName=").a(threadInfo.getLockOwnerName())
+                .a(", ownerId=").a(threadInfo.getLockOwnerId()).a("]").a(NL);
+        }
+
+        MonitorInfo[] monitors = threadInfo.getLockedMonitors();
+        StackTraceElement[] elements = threadInfo.getStackTrace();
+
+        for (int i = 0; i < elements.length; i++) {
+            StackTraceElement e = elements[i];
+
+            sb.a("        at ").a(e.toString());
+
+            for (MonitorInfo monitor : monitors) {
+                if (monitor.getLockedStackDepth() == i)
+                    sb.a(NL).a("        - locked ").a(monitor);
+            }
+
+            sb.a(NL);
+        }
+    }
+
+    /**
+     * Prints Synchronizers info to a buffer.
+     *
+     * @param syncs Synchronizers info.
+     * @param sb Buffer.
+     */
+    private static void printSynchronizersInfo(LockInfo[] syncs, GridStringBuilder sb) {
+        sb.a("    Locked synchronizers:");
+
+        for (LockInfo info : syncs)
+            sb.a(NL).a("        ").a(info);
+    }
+
+    /**
+     * Gets empty constructor for class even if the class does not have empty constructor
+     * declared. This method is guaranteed to work with SUN JDK and other JDKs still need
+     * to be tested.
+     *
+     * @param cls Class to get empty constructor for.
+     * @return Empty constructor if one could be found or {@code null} otherwise.
+     * @throws IgniteCheckedException If failed.
+     */
+    @Nullable public static Constructor<?> forceEmptyConstructor(Class<?> cls) throws IgniteCheckedException {
+        Constructor<?> ctor = null;
+
+        try {
+            return cls.getDeclaredConstructor();
+        }
+        catch (Exception ignore) {
+            Method ctorFac = U.ctorFactory();
+            Object sunRefFac = U.sunReflectionFactory();
+
+            if (ctorFac != null && sunRefFac != null)
+                try {
+                    ctor = (Constructor)ctorFac.invoke(sunRefFac, cls, U.objectConstructor());
+                }
+                catch (IllegalAccessException | InvocationTargetException e) {
+                    throw new IgniteCheckedException("Failed to get object constructor for class: " + cls, e);
+                }
+        }
+
+        return ctor;
+    }
+
+    /**
+     * Creates new instance of a class only if it has an empty constructor (can be non-public).
+     *
+     * @param cls Class name.
+     * @return Instance.
+     * @throws IgniteCheckedException If failed.
+     */
+    @Nullable public static <T> T newInstance(String cls) throws IgniteCheckedException {
+        Class<?> cls0;
+
+        try {
+            cls0 = Class.forName(cls);
+        }
+        catch (Exception e) {
+            throw new IgniteCheckedException(e);
+        }
+
+        return (T)newInstance(cls0);
+    }
+
+    /**
+     * Creates new instance of a class only if it has an empty constructor (can be non-public).
+     *
+     * @param cls Class to instantiate.
+     * @return New instance of the class or {@code null} if empty constructor could not be assigned.
+     * @throws IgniteCheckedException If failed.
+     */
+    @Nullable public static <T> T newInstance(Class<T> cls) throws IgniteCheckedException {
+        boolean set = false;
+
+        Constructor<T> ctor = null;
+
+        try {
+            ctor = cls.getDeclaredConstructor();
+
+            if (ctor == null)
+                return null;
+
+            if (!ctor.isAccessible()) {
+                ctor.setAccessible(true);
+
+                set = true;
+            }
+
+            return ctor.newInstance();
+        }
+        catch (NoSuchMethodException e) {
+            throw new IgniteCheckedException("Failed to find empty constructor for class: " + cls, e);
+        }
+        catch (InstantiationException | InvocationTargetException | IllegalAccessException e) {
+            throw new IgniteCheckedException("Failed to create new instance for class: " + cls, e);
+        } finally {
+            if (ctor != null && set)
+                ctor.setAccessible(false);
+        }
+    }
+
+    /**
+     * Creates new instance of a class even if it does not have public constructor.
+     *
+     * @param cls Class to instantiate.
+     * @return New instance of the class or {@code null} if empty constructor could not be assigned.
+     * @throws IgniteCheckedException If failed.
+     */
+    @SuppressWarnings({"unchecked"})
+    @Nullable public static <T> T forceNewInstance(Class<?> cls) throws IgniteCheckedException {
+        Constructor ctor = forceEmptyConstructor(cls);
+
+        if (ctor == null)
+            return null;
+
+        boolean set = false;
+
+        try {
+
+            if (!ctor.isAccessible()) {
+                ctor.setAccessible(true);
+
+                set = true;
+            }
+
+            return (T)ctor.newInstance();
+        }
+        catch (InstantiationException | InvocationTargetException | IllegalAccessException e) {
+            throw new IgniteCheckedException("Failed to create new instance for class: " + cls, e);
+        } finally {
+            if (set)
+                ctor.setAccessible(false);
+        }
+    }
+
+    /**
+     * Pretty-formatting for minutes.
+     *
+     * @param mins Minutes to format.
+     * @return Formatted presentation of minutes.
+     */
+    public static String formatMins(long mins) {
+        assert mins >= 0;
+
+        if (mins == 0)
+            return "< 1 min";
+
+        SB sb = new SB();
+
+        long dd = mins / 1440; // 1440 mins = 60 mins * 24 hours
+
+        if (dd > 0)
+            sb.a(dd).a(dd == 1 ? " day " : " days ");
+
+        mins %= 1440;
+
+        long hh = mins / 60;
+
+        if (hh > 0)
+            sb.a(hh).a(hh == 1 ? " hour " : " hours ");
+
+        mins %= 60;
+
+        if (mins > 0)
+            sb.a(mins).a(mins == 1 ? " min " : " mins ");
+
+        return sb.toString().trim();
+    }
+
+    /**
+     * Gets 8-character substring of UUID (for terse logging).
+     *
+     * @param id Input ID.
+     * @return 8-character ID substring.
+     */
+    public static String id8(UUID id) {
+        return id.toString().substring(0, 8);
+    }
+
+    /**
+     * Gets 8-character substring of {@link org.apache.ignite.lang.IgniteUuid} (for terse logging).
+     * The ID8 will be constructed as follows:
+     * <ul>
+     * <li>Take first 4 digits for global ID, i.e. {@code GridUuid.globalId()}.</li>
+     * <li>Take last 4 digits for local ID, i.e. {@code GridUuid.localId()}.</li>
+     * </ul>
+     *
+     * @param id Input ID.
+     * @return 8-character representation of {@code GridUuid}.
+     */
+    public static String id8(IgniteUuid id) {
+        String s = id.toString();
+
+        return s.substring(0, 4) + s.substring(s.length() - 4);
+    }
+
+    /**
+     *
+     * @param len Number of characters to fill in.
+     * @param ch Character to fill with.
+     * @return String.
+     */
+    public static String filler(int len, char ch) {
+        char[] a = new char[len];
+
+        Arrays.fill(a, ch);
+
+        return new String(a);
+    }
+
+    /**
+     * Writes array to output stream.
+     *
+     * @param out Output stream.
+     * @param arr Array to write.
+     * @param <T> Array type.
+     * @throws IOException If failed.
+     */
+    public static <T> void writeArray(ObjectOutput out, T[] arr) throws IOException {
+        int len = arr == null ? 0 : arr.length;
+
+        out.writeInt(len);
+
+        if (arr != null && arr.length > 0)
+            for (T t : arr)
+                out.writeObject(t);
+    }
+
+    /**
+     * Reads array from input stream.
+     *
+     * @param in Input stream.
+     * @return Deserialized array.
+     * @throws IOException If failed.
+     * @throws ClassNotFoundException If class not found.
+     */
+    @Nullable public static Object[] readArray(ObjectInput in) throws IOException, ClassNotFoundException {
+        int len = in.readInt();
+
+        Object[] arr = null;
+
+        if (len > 0) {
+            arr = new Object[len];
+
+            for (int i = 0; i < len; i++)
+                arr[i] = in.readObject();
+        }
+
+        return arr;
+    }
+
+    /**
+     * Reads array from input stream.
+     *
+     * @param in Input stream.
+     * @return Deserialized array.
+     * @throws IOException If failed.
+     * @throws ClassNotFoundException If class not found.
+     */
+    @Nullable public static Class<?>[] readClassArray(ObjectInput in) throws IOException, ClassNotFoundException {
+        int len = in.readInt();
+
+        Class<?>[] arr = null;
+
+        if (len > 0) {
+            arr = new Class<?>[len];
+
+            for (int i = 0; i < len; i++)
+                arr[i] = (Class<?>)in.readObject();
+        }
+
+        return arr;
+    }
+
+    /**
+     * Reads array from input stream.
+     *
+     * @param in Input stream.
+     * @return Deserialized array.
+     * @throws IOException If failed.
+     * @throws ClassNotFoundException If class not found.
+     */
+    @SuppressWarnings("unchecked")
+    @Nullable public static <K, V> IgnitePredicate<CacheEntry<K, V>>[] readEntryFilterArray(ObjectInput in)
+        throws IOException, ClassNotFoundException {
+        int len = in.readInt();
+
+        IgnitePredicate<CacheEntry<K, V>>[] arr = null;
+
+        if (len > 0) {
+            arr = new IgnitePredicate[len];
+
+            for (int i = 0; i < len; i++)
+                arr[i] = (IgnitePredicate<CacheEntry<K, V>>)in.readObject();
+        }
+
+        return arr;
+    }
+
+    /**
+     *
+     * @param out Output.
+     * @param col Set to write.
+     * @throws IOException If write failed.
+     */
+    public static void writeCollection(ObjectOutput out, Collection<?> col) throws IOException {
+        if (col != null) {
+            out.writeInt(col.size());
+
+            for (Object o : col)
+                out.writeObject(o);
+        }
+        else
+            out.writeInt(-1);
+    }
+
+    /**
+     * Writes collection of byte arrays to data output.
+     *
+     * @param out Output to write to.
+     * @param bytes Collection with byte arrays.
+     * @throws IOException If write failed.
+     */
+    public static void writeBytesCollection(DataOutput out, Collection<byte[]> bytes) throws IOException {
+        if (bytes != null) {
+            out.writeInt(bytes.size());
+
+            for (byte[] b : bytes)
+                writeByteArray(out, b);
+        }
+        else
+            out.writeInt(-1);
+    }
+
+    /**
+     * Reads collection of byte arrays from data input.
+     *
+     * @param in Data input to read from.
+     * @return List of byte arrays.
+     * @throws IOException If read failed.
+     */
+    public static List<byte[]> readBytesList(DataInput in) throws IOException {
+        int size = in.readInt();
+
+        if (size < 0)
+            return null;
+
+        List<byte[]> res = new ArrayList<>(size);
+
+        for (int i = 0; i < size; i++)
+            res.add(readByteArray(in));
+
+        return res;
+    }
+
+    /**
+     *
+     * @param out Output.
+     * @param col Set to write.
+     * @throws IOException If write failed.
+     */
+    public static void writeIntCollection(DataOutput out, Collection<Integer> col) throws IOException {
+        if (col != null) {
+            out.writeInt(col.size());
+
+            for (Integer i : col)
+                out.writeInt(i);
+        }
+        else
+            out.writeInt(-1);
+    }
+
+    /**
+     * @param in Input.
+     * @return Deserialized set.
+     * @throws IOException If deserialization failed.
+     * @throws ClassNotFoundException If deserialized class could not be found.
+     */
+    @Nullable public static <E> Collection<E> readCollection(ObjectInput in)
+        throws IOException, ClassNotFoundException {
+        return readList(in);
+    }
+
+    /**
+     * @param in Input.
+     * @return Deserialized set.
+     * @throws IOException If deserialization failed.
+     */
+    @Nullable public static Collection<Integer> readIntCollection(DataInput in) throws IOException {
+        int size = in.readInt();
+
+        // Check null flag.
+        if (size == -1)
+            return null;
+
+        Collection<Integer> col = new ArrayList<>(size);
+
+        for (int i = 0; i < size; i++)
+            col.add(in.readInt());
+
+        return col;
+    }
+
+    /**
+     *
+     * @param m Map to copy.
+     * @param <K> Key type.
+     * @param <V> Value type
+     * @return Copied map.
+     */
+    public static <K, V> Map<K, V> copyMap(Map<K, V> m) {
+        return new HashMap<>(m);
+    }
+
+    /**
+     *
+     * @param m Map to seal.
+     * @param <K> Key type.
+     * @param <V> Value type
+     * @return Sealed map.
+     */
+    public static <K, V> Map<K, V> sealMap(Map<K, V> m) {
+        assert m != null;
+
+        return Collections.unmodifiableMap(new HashMap<>(m));
+    }
+
+    /**
+     * Seal collection.
+     *
+     * @param c Collection to seal.
+     * @param <E> Entry type
+     * @return Sealed collection.
+     */
+    public static <E> List<E> sealList(Collection<E> c) {
+        return Collections.unmodifiableList(new ArrayList<>(c));
+    }
+
+    /**
+     * Convert array to seal list.
+     *
+     * @param a Array for convert to seal list.
+     * @param <E> Entry type
+     * @return Sealed collection.
+     */
+    public static <E> List<E> sealList(E... a) {
+        return Collections.unmodifiableList(Arrays.asList(a));
+    }
+
+    /**
+     * Gets display name of the network interface this IP address belongs to.
+     *
+     * @param addr IP address for which to find network interface name.
+     * @return Network interface name or {@code null} if can't be found.
+     */
+    @Nullable public static String getNetworkInterfaceName(String addr) {
+        assert addr != null;
+
+        try {
+            InetAddress inetAddr = InetAddress.getByName(addr);
+
+            for (NetworkInterface itf : asIterable(NetworkInterface.getNetworkInterfaces()))
+                for (InetAddress itfAddr : asIterable(itf.getInetAddresses()))
+                    if (itfAddr.equals(inetAddr))
+                        return itf.getDisplayName();
+        }
+        catch (UnknownHostException ignore) {
+            return null;
+        }
+        catch (SocketException ignore) {
+            return null;
+        }
+
+        return null;
+    }
+
+    /**
+     * Tries to resolve host by name, returning local host if input is empty.
+     * This method reflects how {@link org.apache.ignite.configuration.IgniteConfiguration#getLocalHost()} should
+     * be handled in most places.
+     *
+     * @param hostName Hostname or {@code null} if local host should be returned.
+     * @return Address of given host or of localhost.
+     * @throws IOException If attempt to get local host failed.
+     */
+    public static InetAddress resolveLocalHost(@Nullable String hostName) throws IOException {
+        return F.isEmpty(hostName) ?
+            // Should default to InetAddress#anyLocalAddress which is package-private.
+            new InetSocketAddress(0).getAddress() :
+            InetAddress.getByName(hostName);
+    }
+
+    /**
+     * Determines whether current local host is different from previously cached.
+     *
+     * @return {@code true} or {@code false} depending on whether or not local host
+     *      has changed from the cached value.
+     * @throws IOException If attempt to get local host failed.
+     */
+    public static synchronized boolean isLocalHostChanged() throws IOException {
+        InetAddress locHost0 = locHost;
+
+        return locHost0 != null && !resetLocalHost().equals(locHost0);
+    }
+
+    /**
+     * Returns host names consistent with {@link #resolveLocalHost(String)}. So when it returns
+     * a common address this method returns single host name, and when a wildcard address passed
+     * this method tries to collect addresses of all available interfaces.
+     *
+     * @param locAddr Local address to resolve.
+     * @return Resolved available addresses of given local address.
+     * @throws IOException If failed.
+     * @throws IgniteCheckedException If no network interfaces found.
+     */
+    public static IgniteBiTuple<Collection<String>, Collection<String>> resolveLocalAddresses(InetAddress locAddr)
+        throws IOException, IgniteCheckedException {
+        assert locAddr != null;
+
+        Collection<String> addrs = new ArrayList<>();
+        Collection<String> hostNames = new ArrayList<>();
+
+        if (locAddr.isAnyLocalAddress()) {
+            // It should not take longer than 2 seconds to reach
+            // local address on any network.
+            int reachTimeout = 2000;
+
+            for (NetworkInterface itf : asIterable(NetworkInterface.getNetworkInterfaces())) {
+                for (InetAddress addr : asIterable(itf.getInetAddresses())) {
+                    if (!addr.isLinkLocalAddress() && reachable(itf, addr, reachTimeout))
+                        addresses(addr, addrs, hostNames);
+                }
+            }
+
+            if (F.isEmpty(addrs))
+                throw new IgniteCheckedException("No network addresses found (is networking enabled?).");
+        }
+        else
+            addresses(locAddr, addrs, hostNames);
+
+        return F.t(addrs, hostNames);
+    }
+
+    /**
+     * @param addr Address.
+     * @param addrs Addresses.
+     * @param hostNames Host names.
+     */
+    private static void addresses(InetAddress addr, Collection<String> addrs, Collection<String> hostNames) {
+        String hostName = addr.getHostName();
+
+        String ipAddr = addr.getHostAddress();
+
+        hostName = F.isEmpty(hostName) || hostName.equals(ipAddr) || addr.isLoopbackAddress() ? "" : hostName;
+
+        addrs.add(ipAddr);
+        hostNames.add(hostName);
+    }
+
+    /**
+     * Gets local host. Implementation will first attempt to get a non-loopback
+     * address. If that fails, then loopback address will be returned.
+     * <p>
+     * Note that this method is synchronized to make sure that local host
+     * initialization happens only once.
+     *
+     * @return Address representing local host.
+     * @throws IOException If attempt to get local host failed.
+     */
+    public static synchronized InetAddress getLocalHost() throws IOException {
+        if (locHost == null)
+            // Cache it.
+            resetLocalHost();
+
+        return locHost;
+    }
+
+    /**
+     * @return Local host.
+     * @throws IOException If attempt to get local host failed.
+     */
+    private static synchronized InetAddress resetLocalHost() throws IOException {
+        locHost = null;
+
+        String sysLocHost = IgniteSystemProperties.getString(GG_LOCAL_HOST);
+
+        if (sysLocHost != null)
+            sysLocHost = sysLocHost.trim();
+
+        if (!F.isEmpty(sysLocHost))
+            locHost = InetAddress.getByName(sysLocHost);
+        else {
+            List<NetworkInterface> itfs = new ArrayList<>();
+
+            for (NetworkInterface itf : asIterable(NetworkInterface.getNetworkInterfaces()))
+                itfs.add(itf);
+
+            Collections.sort(itfs, new Comparator<NetworkInterface>() {
+                @Override public int compare(NetworkInterface itf1, NetworkInterface itf2) {
+                    // Interfaces whose name starts with 'e' should go first.
+                    return itf1.getName().compareTo(itf2.getName());
+                }
+            });
+
+            // It should not take longer than 2 seconds to reach
+            // local address on any network.
+            int reachTimeout = 2000;
+
+            for (NetworkInterface itf : itfs) {
+                boolean found = false;
+
+                for (InetAddress addr : asIterable(itf.getInetAddresses())) {
+                    if (!addr.isLoopbackAddress() && !addr.isLinkLocalAddress() && reachable(itf, addr, reachTimeout)) {
+                        locHost = addr;
+
+                        found = true;
+
+                        break;
+                    }
+                }
+
+                if (found)
+                    break;
+            }
+        }
+
+        if (locHost == null)
+            locHost = InetAddress.getLocalHost();
+
+        return locHost;
+    }
+
+    /**
+     * Checks if address can be reached using three argument InetAddress.isReachable() version.
+     *
+     * @param itf Network interface to use for test.
+     * @param addr Address to check.
+     * @param reachTimeout Timeout for the check.
+     * @return {@code True} if address is reachable.
+     */
+    public static boolean reachable(NetworkInterface itf, InetAddress addr, int reachTimeout) {
+        try {
+            return addr.isReachable(itf, 0, reachTimeout);
+        }
+        catch (IOException ignore) {
+            return false;
+        }
+    }
+
+    /**
+     * Checks if address can be reached using one argument InetAddress.isReachable() version.
+     *
+     * @param addr Address to check.
+     * @param reachTimeout Timeout for the check.
+     * @return {@code True} if address is reachable.
+     */
+    public static boolean reachable(InetAddress addr, int reachTimeout) {
+        try {
+            return addr.isReachable(reachTimeout);
+        }
+        catch (IOException ignore) {
+            return false;
+        }
+    }
+
+    /**
+     * @param loc Local node.
+     * @param rmt Remote node.
+     * @return Whether given nodes have the same macs.
+     */
+    public static boolean sameMacs(ClusterNode loc, ClusterNode rmt) {
+        assert loc != null;
+        assert rmt != null;
+
+        String locMacs = loc.attribute(GridNodeAttributes.ATTR_MACS);
+        String rmtMacs = rmt.attribute(GridNodeAttributes.ATTR_MACS);
+
+        return locMacs != null && locMacs.equals(rmtMacs);
+    }
+
+    /**
+     * Gets a list of all local non-loopback IPs known to this JVM.
+     * Note that this will include both IPv4 and IPv6 addresses (even if one "resolves"
+     * into another). Loopbacks will be skipped.
+     *
+     * @return List of all known local IPs (empty list if no addresses available).
+     */
+    public static synchronized Collection<String> allLocalIps() {
+        List<String> ips = new ArrayList<>(4);
+
+        try {
+            Enumeration<NetworkInterface> itfs = NetworkInterface.getNetworkInterfaces();
+
+            if (itfs != null) {
+                for (NetworkInterface itf : asIterable(itfs)) {
+                    if (!itf.isLoopback()) {
+                        Enumeration<InetAddress> addrs = itf.getInetAddresses();
+
+                        if (addrs != null) {
+                            for (InetAddress addr : asIterable(addrs)) {
+                                String hostAddr = addr.getHostAddress();
+
+                                if (!addr.isLoopbackAddress() && !ips.contains(hostAddr))
+                                    ips.add(hostAddr);
+                            }
+                        }
+                    }
+                }
+            }
+        }
+        catch (SocketException ignore) {
+            return Collections.emptyList();
+        }
+
+        Collections.sort(ips);
+
+        return ips;
+    }
+
+    /**
+     * Gets a list of all local enabled MACs known to this JVM. It
+     * is using hardware address of the network interface that is not guaranteed to be
+     * MAC addresses (but in most cases it is).
+     * <p>
+     * Note that if network interface is disabled - its MAC won't be included. All
+     * local network interfaces are probed including loopbacks. Virtual interfaces
+     * (sub-interfaces) are skipped.
+     * <p>
+     * Note that on linux getHardwareAddress() can return null from time to time
+     * if NetworkInterface.getHardwareAddress() method is called from many threads.
+     *
+     * @return List of all known enabled local MACs or empty list
+     *      if no MACs could be found.
+     */
+    public static synchronized Collection<String> allLocalMACs() {
+        List<String> macs = new ArrayList<>(3);
+
+        try {
+            Enumeration<NetworkInterface> itfs = NetworkInterface.getNetworkInterfaces();
+
+            if (itfs != null) {
+                for (NetworkInterface itf : asIterable(itfs)) {
+                    byte[] hwAddr = itf.getHardwareAddress();
+
+                    // Loopback produces empty MAC.
+                    if (hwAddr != null && hwAddr.length > 0) {
+                        String mac = byteArray2HexString(hwAddr);
+
+                        if (!macs.contains(mac))
+                            macs.add(mac);
+                    }
+                }
+            }
+        }
+        catch (SocketException ignore) {
+            return Collections.emptyList();
+        }
+
+        Collections.sort(macs);
+
+        return macs;
+    }
+
+    /**
+     * Downloads resource by URL.
+     *
+     * @param url URL to download.
+     * @param file File where downloaded resource should be stored.
+     * @return File where downloaded resource should be stored.
+     * @throws IOException If error occurred.
+     */
+    public static File downloadUrl(URL url, File file) throws IOException {
+        assert url != null;
+        assert file != null;
+
+        InputStream in = null;
+        OutputStream out = null;
+
+        try {
+            URLConnection conn = url.openConnection();
+
+            if (conn instanceof HttpsURLConnection) {
+                HttpsURLConnection https = (HttpsURLConnection)conn;
+
+                https.setHostnameVerifier(new DeploymentHostnameVerifier());
+
+                SSLContext ctx = SSLContext.getInstance(HTTPS_PROTOCOL);
+
+                ctx.init(null, getTrustManagers(), null);
+
+                // Initialize socket factory.
+                https.setSSLSocketFactory(ctx.getSocketFactory());
+            }
+
+            in = conn.getInputStream();
+
+            if (in == null)
+                throw new IOException("Failed to open connection: " + url.toString());
+
+            out = new BufferedOutputStream(new FileOutputStream(file));
+
+            copy(in, out);
+        }
+        catch (NoSuchAlgorithmException | KeyManagementException e) {
+            throw new IOException("Failed to open HTTPs connection [url=" + url.toString() + ", msg=" + e + ']', e);
+        } finally {
+            close(in, null);
+            close(out, null);
+        }
+
+        return file;
+    }
+
+    /**
+     * Construct array with one trust manager which don't reject input certificates.
+     *
+     * @return Array with one X509TrustManager implementation of trust manager.
+     */
+    private static TrustManager[] getTrustManagers() {
+        return new TrustManager[]{
+            new X509TrustManager() {
+                @Nullable @Override public X509Certificate[] getAcceptedIssuers() {
+                    return null;
+                }
+
+                @Override public void checkClientTrusted(X509Certificate[] certs, String authType) {
+                    /* No-op. */
+                }
+
+                @Override public void checkServerTrusted(X509Certificate[] certs, String authType) {
+                    /* No-op. */
+                }
+            }
+        };
+    }
+
+    /**
+     * Replace password in URI string with a single '*' character.
+     * <p>
+     * Parses given URI by applying &quot;.*://(.*:.*)@.*&quot;
+     * regular expression pattern and than if URI matches it
+     * replaces password strings between '/' and '@' with '*'.
+     *
+     * @param uri URI which password should be replaced.
+     * @return Converted URI string
+     */
+    @Nullable public static String hidePassword(@Nullable String uri) {
+        if (uri == null)
+            return null;
+
+        if (Pattern.matches(".*://(.*:.*)@.*", uri)) {
+            int userInfoLastIdx = uri.indexOf('@');
+
+            assert userInfoLastIdx != -1;
+
+            String str = uri.substring(0, userInfoLastIdx);
+
+            int userInfoStartIdx = str.lastIndexOf('/');
+
+            str = str.substring(userInfoStartIdx + 1);
+
+            String[] params = str.split(";");
+
+            StringBuilder builder = new StringBuilder();
+
+            for (int i = 0; i < params.length; i++) {
+                int idx;
+
+                if ((idx = params[i].indexOf(':')) != -1)
+                    params[i] = params[i].substring(0, idx + 1) + '*';
+
+                builder.append(params[i]);
+
+                if (i != params.length - 1)
+                    builder.append(';');
+            }
+
+            return new StringBuilder(uri).replace(userInfoStartIdx + 1, userInfoLastIdx,
+                builder.toString()).toString();
+        }
+
+        return uri;
+    }
+
+    /**
+     * @return Class loader used to load GridGain itself.
+     */
+    public static ClassLoader gridClassLoader() {
+        return gridClassLoader;
+    }
+
+    /**
+     * @param parent Parent to find.
+     * @param ldr Loader to check.
+     * @return {@code True} if parent found.
+     */
+    public static boolean hasParent(@Nullable ClassLoader parent, ClassLoader ldr) {
+        if (parent != null) {
+            for (; ldr != null; ldr = ldr.getParent()) {
+                if (ldr.equals(parent))
+                    return true;
+            }
+
+            return false;
+        }
+
+        return true;
+    }
+
+    /**
+     * Verifier always returns successful result for any host.
+     */
+    private static class DeploymentHostnameVerifier implements HostnameVerifier {
+        /** {@inheritDoc} */
+        @Override public boolean verify(String hostname, SSLSession ses) {
+            // Remote host trusted by default.
+            return true;
+        }
+    }
+
+    /**
+     * Makes a {@code '+---+'} dash line.
+     *
+     * @param len Length of the dash line to make.
+     * @return Dash line.
+     */
+    public static String dash(int len) {
+        char[] dash = new char[len];
+
+        Arrays.fill(dash, '-');
+
+        dash[0] = dash[len - 1] = '+';
+
+        return new String(dash);
+    }
+
+    /**
+     * Creates space filled string of given length.
+     *
+     * @param len Number of spaces.
+     * @return Space filled string of given length.
+     */
+    public static String pad(int len) {
+        char[] dash = new char[len];
+
+        Arrays.fill(dash, ' ');
+
+        return new String(dash);
+    }
+
+    /**
+     * Formats system time in milliseconds for printing in logs.
+     *
+     * @param sysTime System time.
+     * @return Formatted time string.
+     */
+    public static String format(long sysTime) {
+        return LONG_DATE_FMT.format(new java.util.Date(sysTime));
+    }
+
+    /**
+     * Takes given collection, shuffles it and returns iterable instance.
+     *
+     * @param <T> Type of elements to create iterator for.
+     * @param col Collection to shuffle.
+     * @return Iterable instance over randomly shuffled collection.
+     */
+    public static <T> Iterable<T> randomIterable(Collection<T> col) {
+        List<T> list = new ArrayList<>(col);
+
+        Collections.shuffle(list);
+
+        return list;
+    }
+
+    /**
+     * Converts enumeration to iterable so it can be used in {@code foreach} construct.
+     *
+     * @param <T> Types of instances for iteration.
+     * @param e Enumeration to convert.
+     * @return Iterable over the given enumeration.
+     */
+    public static <T> Iterable<T> asIterable(final Enumeration<T> e) {
+        return new Iterable<T>() {
+            @Override public Iterator<T> iterator() {
+                return new Iterator<T>() {
+                    @Override public boolean hasNext() {
+                        return e.hasMoreElements();
+                    }
+
+                    @SuppressWarnings({"IteratorNextCanNotThrowNoSuchElementException"})
+                    @Override public T next() {
+                        return e.nextElement();
+                    }
+
+                    @Override public void remove() {
+                        throw new UnsupportedOperationException();
+                    }
+                };
+            }
+        };
+    }
+
+    /**
+     * Copy source file (or folder) to destination file (or folder). Supported source & destination:
+     * <ul>
+     * <li>File to File</li>
+     * <li>File to Folder</li>
+     * <li>Folder to Folder (Copy the content of the directory and not the directory itself)</li>
+     * </ul>
+     *
+     * @param src Source file or folder.
+     * @param dest Destination file or folder.
+     * @param overwrite Whether or not overwrite existing files and folders.
+     * @throws IOException Thrown if an I/O error occurs.
+     */
+    public static void copy(File src, File dest, boolean overwrite) throws IOException {
+        assert src != null;
+        assert dest != null;
+
+        /*
+         * Supported source & destination:
+         * ===============================
+         * 1. File -> File
+         * 2. File -> Directory
+         * 3. Directory -> Directory
+         */
+
+        // Source must exist.
+        if (!src.exists())
+            throw new FileNotFoundException("Source can't be found: " + src);
+
+        // Check that source and destination are not the same.
+        if (src.getAbsoluteFile().equals(dest.getAbsoluteFile()))
+            throw new IOException("Source and destination are the same [src=" + src + ", dest=" + dest + ']');
+
+        if (dest.exists()) {
+            if (!dest.isDirectory() && !overwrite)
+                throw new IOException("Destination already exists: " + dest);
+
+            if (!dest.canWrite())
+                throw new IOException("Destination is not writable:" + dest);
+        }
+        else {
+            File parent = dest.getParentFile();
+
+            if (parent != null && !parent.exists())
+                // Ignore any errors here.
+                // We will get errors when we'll try to open the file stream.
+                //noinspection ResultOfMethodCallIgnored
+                parent.mkdirs();
+
+            // If source is a directory, we should create destination directory.
+            if (src.isDirectory())
+                //noinspection ResultOfMethodCallIgnored
+                dest.mkdir();
+        }
+
+        if (src.isDirectory()) {
+            // In this case we have Directory -> Directory.
+            // Note that we copy the content of the directory and not the directory itself.
+
+            File[] files = src.listFiles();
+
+            for (File file : files) {
+                if (file.isDirectory()) {
+                    File dir = new File(dest, file.getName());
+
+                    if (!dir.exists() && !dir.mkdirs())
+                        throw new IOException("Can't create directory: " + dir);
+
+                    copy(file, dir, overwrite);
+                }
+                else
+                    copy(file, dest, overwrite);
+            }
+        }
+        else {
+            // In this case we have File -> File or File -> Directory.
+            File file = dest.exists() && dest.isDirectory() ? new File(dest, src.getName()) : dest;
+
+            if (!overwrite && file.exists())
+                throw new IOException("Destination already exists: " + file);
+
+            FileInputStream in = null;
+            FileOutputStream out = null;
+
+            try {
+                in = new FileInputStream(src);
+                out = new FileOutputStream(file);
+
+                copy(in, out);
+            }
+            finally {
+                if (in != null)
+                    in.close();
+
+                if (out != null) {
+                    out.getFD().sync();
+
+                    out.close();
+                }
+            }
+        }
+    }
+
+    /**
+     * Starts clock timer if grid is first.
+     */
+    public static void onGridStart() {
+        synchronized (mux) {
+            if (gridCnt == 0) {
+                timer = new Thread(new Runnable() {
+                    @SuppressWarnings({"BusyWait", "InfiniteLoopStatement"})
+                    @Override public void run() {
+                        while (true) {
+                            curTimeMillis = System.currentTimeMillis();
+
+                            try {
+                                Thread.sleep(10);
+                            }
+                            catch (InterruptedException ignored) {
+                                U.log(null, "Timer thread has been interrupted.");
+
+                                break;
+                            }
+                        }
+                    }
+                }, "gridgain-clock");
+
+                timer.setDaemon(true);
+
+                timer.setPriority(10);
+
+                timer.start();
+            }
+
+            ++gridCnt;
+        }
+    }
+
+    /**
+     * Stops clock timer if all nodes into JVM were stopped.
+     */
+    public static void onGridStop(){
+        synchronized (mux) {
+            assert gridCnt > 0 : gridCnt;
+
+            --gridCnt;
+
+            if (gridCnt == 0 && timer != null) {
+                timer.interrupt();
+
+                timer = null;
+            }
+        }
+    }
+
+    /**
+     * Copies input byte stream to output byte stream.
+     *
+     * @param in Input byte stream.
+     * @param out Output byte stream.
+     * @return Number of the copied bytes.
+     * @throws IOException Thrown if an I/O error occurs.
+     */
+    public static int copy(InputStream in, OutputStream out) throws IOException {
+        assert in != null;
+        assert out != null;
+
+        byte[] buf = new byte[BUF_SIZE];
+
+        int cnt = 0;
+
+        for (int n; (n = in.read(buf)) > 0;) {
+            out.write(buf, 0, n);
+
+            cnt += n;
+        }
+
+        return cnt;
+    }
+
+    /**
+     * Copies input character stream to output character stream.
+     *
+     * @param in Input character stream.
+     * @param out Output character stream.
+     * @return Number of the copied characters.
+     * @throws IOException Thrown if an I/O error occurs.
+     */
+    public static int copy(Reader in, Writer out) throws IOException {
+        assert in != null;
+        assert out != null;
+
+        char[] buf = new char[BUF_SIZE];
+
+        int cnt = 0;
+
+        for (int n; (n = in.read(buf)) > 0;) {
+            out.write(buf, 0, n);
+
+            cnt += n;
+        }
+
+        return cnt;
+    }
+
+    /**
+     * Writes string to file.
+     *
+     * @param file File.
+     * @param s String to write.
+     * @throws IOException Thrown if an I/O error occurs.
+     */
+    public static void writeStringToFile(File file, String s) throws IOException {
+        writeStringToFile(file, s, Charset.defaultCharset().toString(), false);
+    }
+
+    /**
+     * Writes string to file.
+     *
+     * @param file File.
+     * @param s String to write.
+     * @param charset Encoding.
+     * @throws IOException Thrown if an I/O error occurs.
+     */
+    public static void writeStringToFile(File file, String s, String charset) throws IOException {
+        writeStringToFile(file, s, charset, false);
+    }
+
+    /**
+     * Reads file to string using specified charset.
+     *
+     * @param fileName File name.
+     * @param charset File charset.
+     * @return File content.
+     * @throws IOException If error occurred.
+     */
+    public static String readFileToString(String fileName, String charset) throws IOException {
+        Reader input = new InputStreamReader(new FileInputStream(fileName), charset);
+
+        StringWriter output = new StringWriter();
+
+        char[] buf = new char[4096];
+
+        int n;
+
+        while ((n = input.read(buf)) != -1)
+            output.write(buf, 0, n);
+
+        return output.toString();
+    }
+
+    /**
+     * Writes string to file.
+     *
+     * @param file File.
+     * @param s String to write.
+     * @param charset Encoding.
+     * @param append If {@code true}, then specified string will be added to the end of the file.
+     * @throws IOException Thrown if an I/O error occurs.
+     */
+    public static void writeStringToFile(File file, String s, String charset, boolean append) throws IOException {
+        if (s == null)
+            return;
+
+        OutputStream out = null;
+
+        try {
+            out = new FileOutputStream(file, append);
+
+            if (s != null)
+                out.write(s.getBytes(charset));
+        } finally {
+            closeQuiet(out);
+        }
+    }
+
+    /**
+     * Utility method that sets cause into exception and returns it.
+     *
+     * @param e Exception to set cause to and return.
+     * @param cause Optional cause to set (if not {@code null}).
+     * @param <E> Type of the exception.
+     * @return Passed in exception with optionally set cause.
+     */
+    public static <E extends Throwable> E withCause(E e, @Nullable Throwable cause) {
+        assert e != null;
+
+        if (cause != null)
+            e.initCause(cause);
+
+        return e;
+    }
+
+    /**
+     * Deletes file or directory with all sub-directories and files.
+     *
+     * @param file File or directory to delete.
+     * @return {@code true} if and only if the file or directory is successfully deleted,
+     *      {@code false} otherwise
+     */
+    public static boolean delete(File file) {
+        assert file != null;
+
+        boolean res = true;
+
+        if (file.isDirectory()) {
+            File[] files = file.listFiles();
+
+            if (files != null && files.length > 0)
+                for (File file1 : files)
+                    if (file1.isDirectory())
+                        res &= delete(file1);
+                    else if (file1.getName().endsWith("jar"))
+                        try {
+                            // Why do we do this?
+                            new JarFile(file1, false).close();
+
+                            res &= file1.delete();
+                        }
+                        catch (IOException ignore) {
+                            // Ignore it here...
+                        }
+                    else
+                        res &= file1.delete();
+
+            res &= file.delete();
+        }
+        else
+            res = file.delete();
+
+        return res;
+    }
+
+    /**
+     * @param dir Directory to create along with all non-existent parent directories.
+     * @return {@code True} if directory exists (has been created or already existed),
+     *      {@code false} if has not been created and does not exist.
+     */
+    public static boolean mkdirs(File dir) {
+        assert dir != null;
+
+        return dir.mkdirs() || dir.exists();
+    }
+
+    /**
+     * Resolve project home directory based on source code base.
+     *
+     * @return Project home directory (or {@code null} if it cannot be resolved).
+     */
+    @Nullable private static String resolveProjectHome() {
+        assert Thread.holdsLock(IgniteUtils.class);
+
+        // Resolve GridGain home via environment variables.
+        String ggHome0 = IgniteSystemProperties.getString(GG_HOME);
+
+        if (!F.isEmpty(ggHome0))
+            return ggHome0;
+
+        String appWorkDir = System.getProperty("user.dir");
+
+        if (appWorkDir != null) {
+            ggHome0 = findProjectHome(new File(appWorkDir));
+
+            if (ggHome0 != null)
+                return ggHome0;
+        }
+
+        URI uri;
+
+        Class<IgniteUtils> cls = IgniteUtils.class;
+
+        try {
+            ProtectionDomain domain = cls.getProtectionDomain();
+
+            // Should not happen, but to make sure our code is not broken.
+            if (domain == null || domain.getCodeSource() == null || domain.getCodeSource().getLocation() == null) {
+                logResolveFailed(cls, null);
+
+                return null;
+            }
+
+            // Resolve path to class-file.
+            uri = domain.getCodeSource().getLocation().toURI();
+
+            // Overcome UNC path problem on Windows (http://www.tomergabel.com/JavaMishandlesUNCPathsOnWindows.aspx)
+            if (isWindows() && uri.getAuthority() != null)
+                uri = new URI(uri.toString().replace("file://", "file:/"));
+        }
+        catch (URISyntaxException | SecurityException e) {
+            logResolveFailed(cls, e);
+
+            return null;
+        }
+
+        return findProjectHome(new File(uri));
+    }
+
+    /**
+     * Tries to find project home starting from specified directory and moving to root.
+     *
+     * @param startDir First directory in search hierarchy.
+     * @return Project home path or {@code null} if it wasn't found.
+     */
+    private static String findProjectHome(File startDir) {
+        for (File cur = startDir.getAbsoluteFile(); cur != null; cur = cur.getParentFile()) {
+            // Check 'cur' is project home directory.
+            if (!new File(cur, "bin").isDirectory() ||
+                !new File(cur, "libs").isDirectory() ||
+                !new File(cur, "config").isDirectory())
+                continue;
+
+            return cur.getPath();
+        }
+
+        return null;
+    }
+
+    /**
+     * @param cls Class.
+     * @param e Exception.
+     */
+    private static void logResolveFailed(Class cls, Exception e) {
+        warn(null, "Failed to resolve GRIDGAIN_HOME automatically for class codebase " +
+            "[class=" + cls + (e == null ? "" : ", e=" + e.getMessage()) + ']');
+    }
+
+    /**
+     * Retrieves {@code GRIDGAIN_HOME} property. The property is retrieved from system
+     * properties or from environment in that order.
+     *
+     * @return {@code GRIDGAIN_HOME} property.
+     */
+    @Nullable public static String getGridGainHome() {
+        GridTuple<String> ggHomeTup = ggHome;
+
+        String ggHome0;
+
+        if (ggHomeTup == null) {
+            synchronized (IgniteUtils.class) {
+                // Double check.
+                ggHomeTup = ggHome;
+
+                if (ggHomeTup == null) {
+                    // Resolve GridGain installation home directory.
+                    ggHome = F.t(ggHome0 = resolveProjectHome());
+
+                    if (ggHome0 != null)
+                        System.setProperty(GG_HOME, ggHome0);
+                }
+                else
+                    ggHome0 = ggHomeTup.get();
+            }
+        }
+        else
+            ggHome0 = ggHomeTup.get();
+
+        return ggHome0;
+    }
+
+    /**
+     * @param path GridGain home. May be {@code null}.
+     */
+    public static void setGridGainHome(@Nullable String path) {
+        GridTuple<String> ggHomeTup = ggHome;
+
+        String ggHome0;
+
+        if (ggHomeTup == null) {
+            synchronized (IgniteUtils.class) {
+                // Double check.
+                ggHomeTup = ggHome;
+
+                if (ggHomeTup == null) {
+                    if (F.isEmpty(path))
+                        System.clearProperty(GG_HOME);
+                    else
+                        System.setProperty(GG_HOME, path);
+
+                    ggHome = F.t(path);
+
+                    return;
+                }
+                else
+                    ggHome0 = ggHomeTup.get();
+            }
+        }
+        else
+            ggHome0 = ggHomeTup.get();
+
+        if (ggHome0 != null && !ggHome0.equals(path))
+            throw new IgniteException("Failed to set GRIDGAIN_HOME after it has been already resolved " +
+                "[ggHome=" + ggHome0 + ", newGgHome=" + path + ']');
+    }
+
+    /**
+     * Gets file associated with path.
+     * <p>
+     * First check if path is relative to {@code GRIDGAIN_HOME}.
+     * If not, check if path is absolute.
+     * If all checks fail, then {@code null} is returned.
+     * <p>
+     * See {@link #getGridGainHome()} for information on how {@code GRIDGAIN_HOME} is retrieved.
+     *
+     * @param path Path to resolve.
+     * @return Resolved path as file, or {@code null} if path cannot be resolved.
+     */
+    @Nullable public static File resolveGridGainPath(String path) {
+        assert path != null;
+
+        /*
+         * 1. Check relative to GRIDGAIN_HOME specified in configuration, if any.
+         */
+
+        String home = getGridGainHome();
+
+        if (home != null) {
+            File file = new File(home, path);
+
+            if (file.exists())
+                return file;
+        }
+
+        /*
+         * 2. Check given path as absolute.
+         */
+
+        File file = new File(path);
+
+        if (file.exists())
+            return file;
+
+        /*
+         * 3. Check development path.
+         */
+
+        if (home != null)
+            file = new File(home, "os/" + path);
+
+        return file.exists() ? file : null;
+    }
+
+    /**
+     * Gets URL representing the path passed in. First the check is made if path is absolute.
+     * If not, then the check is made if path is relative to {@code META-INF} folder in classpath.
+     * If not, then the check is made if path is relative to ${GRIDGAIN_HOME}.
+     * If all checks fail,
+     * then {@code null} is returned, otherwise URL representing path is returned.
+     * <p>
+     * See {@link #getGridGainHome()} for information on how {@code GRIDGAIN_HOME} is retrieved.
+     *
+     * @param path Path to resolve.
+     * @return Resolved path as URL, or {@code null} if path cannot be resolved.
+     * @see #getGridGainHome()
+     */
+    @Nullable public static URL resolveGridGainUrl(String path) {
+        return resolveGridGainUrl(path, true);
+    }
+
+    /**
+     * Gets URL representing the path passed in. First the check is made if path is absolute.
+     * If not, then the check is made if path is relative to {@code META-INF} folder in classpath.
+     * If not, then the check is made if path is relative to ${GRIDGAIN_HOME}.
+     * If all checks fail,
+     * then {@code null} is returned, otherwise URL representing path is returned.
+     * <p>
+     * See {@link #getGridGainHome()} for information on how {@code GRIDGAIN_HOME} is retrieved.
+     *
+     * @param path Path to resolve.
+     * @param metaInf Flag to indicate whether META-INF folder should be checked or class path root.
+     * @return Resolved path as URL, or {@code null} if path cannot be resolved.
+     * @see #getGridGainHome()
+     */
+    @SuppressWarnings({"UnusedCatchParameter"})
+    @Nullable public static URL resolveGridGainUrl(String path, boolean metaInf) {
+        File f = resolveGridGainPath(path);
+
+        if (f == null)
+            f = resolveGridGainPath("os/" + path);
+
+        if (f != null) {
+            try {
+                // Note: we use that method's chain instead of File.getURL() with due
+                // Sun bug http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6179468
+                return f.toURI().toURL();
+            }
+            catch (MalformedURLException e) {
+                // No-op.
+            }
+        }
+
+        String locPath = (metaInf ? "META-INF/" : "") + path.replaceAll("\\\\", "/");
+
+        return Thread.currentThread().getContextClassLoader().getResource(locPath);
+    }
+
+    /**
+     * Join byte arrays into single one.
+     *
+     * @param bufs list of byte arrays to concatenate.
+     * @return Concatenated byte's array.
+     */
+    public static byte[] join(byte[]... bufs) {
+        int size = 0;
+        for (byte[] buf : bufs) {
+            size += buf.length;
+        }
+
+        byte[] res = new byte[size];
+        int position = 0;
+        for (byte[] buf : bufs) {
+            arrayCopy(buf, 0, res, position, buf.length);
+            position += buf.length;
+        }
+
+        return res;
+    }
+
+    /**
+     * Converts byte array to formatted string. If calling:
+     * <pre name="code" class="java">
+     * ...
+     * byte[] data = {10, 20, 30, 40, 50, 60, 70, 80, 90};
+     *
+     * U.byteArray2String(data, "0x%02X", ",0x%02X")
+     * ...
+     * </pre>
+     * the result will be:
+     * <pre name="code" class="java">
+     * ...
+     * 0x0A, 0x14, 0x1E, 0x28, 0x32, 0x3C, 0x46, 0x50, 0x5A
+     * ...
+     * </pre>
+     *
+     * @param arr Array of byte.
+     * @param hdrFmt C-style string format for the first element.
+     * @param bodyFmt C-style string format for second and following elements, if any.
+     * @return String with converted bytes.
+     */
+    public static String byteArray2String(byte[] arr, String hdrFmt, String bodyFmt) {
+        assert arr != null;
+        assert hdrFmt != null;
+        assert bodyFmt != null;
+
+        SB sb = new SB();
+
+        sb.a('{');
+
+        boolean first = true;
+
+        for (byte b : arr)
+            if (first) {
+                sb.a(String.format(hdrFmt, b));
+
+                first = false;
+            }
+            else
+                sb.a(String.format(bodyFmt, b));
+
+        sb.a('}');
+
+        return sb.toString();
+    }
+
+    /**
+     * Converts byte array to hex string.
+     *
+     * @param arr Array of bytes.
+     * @return Hex string.
+     */
+    public static String byteArray2HexString(byte[] arr) {
+        SB sb = new SB(arr.length << 1);
+
+        for (byte b : arr)
+            sb.a(Integer.toHexString(MASK & b >>> 4)).a(Integer.toHexString(MASK & b));
+
+        return sb.toString().toUpperCase();
+    }
+
+    /**
+     * Convert string with hex values to byte array.
+     *
+     * @param hex Hexadecimal string to convert.
+     * @return array of bytes defined as hex in string.
+     * @throws IllegalArgumentException If input character differs from certain hex characters.
+     */
+    public static byte[] hexString2ByteArray(String hex) throws IllegalArgumentException {
+        // If Hex string has odd character length.
+        if (hex.length() % 2 != 0)
+            hex = '0' + hex;
+
+        char[] chars = hex.toCharArray();
+
+        byte[] bytes = new byte[chars.length / 2];
+
+        int byteCnt = 0;
+
+        for (int i = 0; i < chars.length; i += 2) {
+            int newByte = 0;
+
+            newByte |= hexCharToByte(chars[i]);
+
+            newByte <<= 4;
+
+            newByte |= hexCharToByte(chars[i + 1]);
+
+            bytes[byteCnt] = (byte)newByte;
+
+            byteCnt++;
+        }
+
+        return bytes;
+    }
+
+    /**
+     * Return byte value for certain character.
+     *
+     * @param ch Character
+     * @return Byte value.
+     * @throws IllegalArgumentException If input character differ from certain hex characters.
+     */
+    @SuppressWarnings({"UnnecessaryFullyQualifiedName", "fallthrough"})
+    private static byte hexCharToByte(char ch) throws IllegalArgumentException {
+        switch (ch) {
+            case '0':
+            case '1':
+            case '2':
+            case '3':
+            case '4':
+            case '5':
+            case '6':
+            case '7':
+            case '8':
+            case '9':
+                return (byte)(ch - '0');
+
+            case 'a':
+            case 'A':
+                return 0xa;
+
+            case 'b':
+            case 'B':
+                return 0xb;
+
+            case 'c':
+            case 'C':
+                return 0xc;
+
+            case 'd':
+            case 'D':
+                return 0xd;
+
+            case 'e':
+            case 'E':
+                return 0xe;
+
+            case 'f':
+            case 'F':
+                return 0xf;
+
+            default:
+                throw new IllegalArgumentException("Hex decoding wrong input character [character=" + ch + ']');
+        }
+    }
+
+    /**
+     * Converts primitive double to byte array.
+     *
+     * @param d Double to convert.
+     * @return Byte array.
+     */
+    public static byte[] doubleToBytes(double d) {
+        return longToBytes(Double.doubleToLongBits(d));
+    }
+
+    /**
+     * Converts primitive {@code double} type to byte array and stores
+     * it in the specified byte array.
+     *
+     * @param d Double to convert.
+     * @param bytes Array of bytes.
+     * @param off Offset.
+     * @return New offset.
+     */
+    public static int doubleToBytes(double d, byte[] bytes, int off) {
+        return longToBytes(Double.doubleToLongBits(d), bytes, off);
+    }
+
+    /**
+     * Converts primitive float to byte array.
+     *
+     * @param f Float to convert.
+     * @return Array of bytes.
+     */
+    public static byte[] floatToBytes(float f) {
+        return intToBytes(Float.floatToIntBits(f));
+    }
+
+    /**
+     * Converts primitive float to byte array.
+     *
+     * @param f Float to convert.
+     * @param bytes Array of bytes.
+     * @param off Offset.
+     * @return New offset.
+     */
+    public static int floatToBytes(float f, byte[] bytes, int off) {
+        return intToBytes(Float.floatToIntBits(f), bytes, off);
+    }
+
+    /**
+     * Converts primitive {@code long} type to byte array.
+     *
+     * @param l Long value.
+     * @return Array of bytes.
+     */
+    public static byte[] longToBytes(long l) {
+        return GridClientByteUtils.longToBytes(l);
+    }
+
+    /**
+     * Converts primitive {@code long} type to byte array and stores it in specified
+     * byte array.
+     *
+     * @param l Long value.
+     * @param bytes Array of bytes.
+     * @param off Offset in {@code bytes} array.
+     * @return Number o

<TRUNCATED>

[47/50] [abbrv] incubator-ignite git commit: ignite-sql - renamings

Posted by se...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheCrossCacheQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheCrossCacheQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheCrossCacheQuerySelfTest.java
index 1211301..09739fc 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheCrossCacheQuerySelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheCrossCacheQuerySelfTest.java
@@ -19,7 +19,7 @@ package org.apache.ignite.internal.processors.cache;
 
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
-import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.processors.cache.query.*;
 import org.apache.ignite.internal.util.typedef.*;
@@ -347,11 +347,11 @@ public class GridCacheCrossCacheQuerySelfTest extends GridCommonAbstractTest {
      */
     private static class DimProduct {
         /** Primary key. */
-        @CacheQuerySqlField
+        @QuerySqlField
         private int id;
 
         /** Product name. */
-        @CacheQuerySqlField
+        @QuerySqlField
         private String name;
 
         /**
@@ -390,11 +390,11 @@ public class GridCacheCrossCacheQuerySelfTest extends GridCommonAbstractTest {
      */
     private static class DimStore {
         /** Primary key. */
-        @CacheQuerySqlField
+        @QuerySqlField
         private int id;
 
         /** Store name. */
-        @CacheQuerySqlField
+        @QuerySqlField
         private String name;
 
         /**
@@ -433,18 +433,18 @@ public class GridCacheCrossCacheQuerySelfTest extends GridCommonAbstractTest {
      */
     private static class FactPurchase {
         /** Primary key. */
-        @CacheQuerySqlField
+        @QuerySqlField
         private int id;
 
         /** Foreign key to store at which purchase occurred. */
-        @CacheQuerySqlField
+        @QuerySqlField
         private int storeId;
 
         /** Foreign key to purchased product. */
-        @CacheQuerySqlField
+        @QuerySqlField
         private int productId;
 
-        @CacheQuerySqlField
+        @QuerySqlField
         private int price;
 
         /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapAndSwapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapAndSwapSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapAndSwapSelfTest.java
index b529279..3db27de 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapAndSwapSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapAndSwapSelfTest.java
@@ -23,25 +23,25 @@ import org.apache.ignite.cache.query.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.events.*;
 import org.apache.ignite.internal.*;
+import org.apache.ignite.internal.processors.cache.distributed.near.*;
+import org.apache.ignite.internal.util.lang.*;
+import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
 import org.apache.ignite.spi.swapspace.file.*;
-import org.apache.ignite.internal.processors.cache.distributed.near.*;
-import org.apache.ignite.internal.util.lang.*;
-import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.testframework.junits.common.*;
 
 import java.util.*;
 import java.util.concurrent.atomic.*;
 
-import static org.apache.ignite.configuration.IgniteDeploymentMode.*;
-import static org.apache.ignite.events.IgniteEventType.*;
 import static org.apache.ignite.cache.CacheAtomicityMode.*;
 import static org.apache.ignite.cache.CacheDistributionMode.*;
 import static org.apache.ignite.cache.CacheMode.*;
 import static org.apache.ignite.cache.GridCachePeekMode.*;
+import static org.apache.ignite.configuration.IgniteDeploymentMode.*;
+import static org.apache.ignite.events.IgniteEventType.*;
 
 /**
  * Tests off heap storage when both offheaped and swapped entries exists.
@@ -136,7 +136,7 @@ public class GridCacheOffHeapAndSwapSelfTest extends GridCommonAbstractTest {
 
         cacheCfg.setEvictionPolicy(null);
 
-        CacheQueryConfiguration qcfg = new CacheQueryConfiguration();
+        QueryConfiguration qcfg = new QueryConfiguration();
 
         qcfg.setIndexPrimitiveKey(true);
         qcfg.setIndexPrimitiveValue(true);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryLoadSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryLoadSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryLoadSelfTest.java
index 1e50a92..cb7fbb5 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryLoadSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryLoadSelfTest.java
@@ -19,18 +19,17 @@ package org.apache.ignite.internal.processors.cache;
 
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
-import org.apache.ignite.cache.GridCache;
-import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.cache.store.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.*;
+import org.apache.ignite.internal.processors.cache.query.*;
+import org.apache.ignite.internal.util.typedef.*;
+import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
-import org.apache.ignite.internal.processors.cache.query.*;
-import org.apache.ignite.internal.util.typedef.*;
-import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.testframework.junits.common.*;
 import org.jetbrains.annotations.*;
 
@@ -433,7 +432,7 @@ public class GridCacheQueryLoadSelfTest extends GridCommonAbstractTest {
      */
     private static class ValueObject {
         /** Value. */
-        @CacheQuerySqlField
+        @QuerySqlField
         private final int val;
 
         /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryMetricsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryMetricsSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryMetricsSelfTest.java
index 0122336..f196e17 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryMetricsSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryMetricsSelfTest.java
@@ -20,6 +20,7 @@ package org.apache.ignite.internal.processors.cache;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.query.*;
 import org.apache.ignite.configuration.*;
+import org.apache.ignite.internal.processors.cache.query.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
@@ -68,7 +69,7 @@ public class GridCacheQueryMetricsSelfTest extends GridCommonAbstractTest {
         cacheCfg.setCacheMode(CACHE_MODE);
         cacheCfg.setWriteSynchronizationMode(FULL_SYNC);
 
-        CacheQueryConfiguration qcfg = new CacheQueryConfiguration();
+        QueryConfiguration qcfg = new QueryConfiguration();
 
         qcfg.setIndexPrimitiveKey(true);
 
@@ -93,7 +94,7 @@ public class GridCacheQueryMetricsSelfTest extends GridCommonAbstractTest {
         // Execute query.
         qry.execute().get();
 
-        CacheQueryMetrics m = cache.queries().metrics();
+        QueryMetrics m = cache.queries().metrics();
 
         assert m != null;
 
@@ -135,7 +136,7 @@ public class GridCacheQueryMetricsSelfTest extends GridCommonAbstractTest {
         // Execute.
         qry.execute().get();
 
-        CacheQueryMetrics m = qry.metrics();
+        QueryMetrics m = qry.metrics();
 
         info("Metrics: " + m);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryMultiThreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryMultiThreadedSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryMultiThreadedSelfTest.java
index 9468e68..1923648 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryMultiThreadedSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryMultiThreadedSelfTest.java
@@ -21,18 +21,19 @@ import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.eviction.lru.*;
 import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.*;
+import org.apache.ignite.internal.processors.cache.query.*;
+import org.apache.ignite.internal.processors.query.*;
+import org.apache.ignite.internal.processors.query.h2.*;
+import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.marshaller.optimized.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
 import org.apache.ignite.spi.swapspace.file.*;
-import org.apache.ignite.internal.processors.cache.query.*;
-import org.apache.ignite.internal.processors.query.*;
-import org.apache.ignite.internal.processors.query.h2.*;
-import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.testframework.junits.common.*;
 import org.jetbrains.annotations.*;
 
@@ -94,7 +95,7 @@ public class GridCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTest
         cacheCfg.setBackups(1);
         cacheCfg.setEvictionPolicy(evictsEnabled() ? new CacheLruEvictionPolicy(100) : null);
 
-        CacheQueryConfiguration qcfg = new CacheQueryConfiguration();
+        QueryConfiguration qcfg = new QueryConfiguration();
 
         qcfg.setIndexPrimitiveKey(true);
 
@@ -839,7 +840,7 @@ public class GridCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTest
      */
     private static class TestValue implements Serializable {
         /** Value. */
-        @CacheQuerySqlField
+        @QuerySqlField
         private int val;
 
         /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryTestValue.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryTestValue.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryTestValue.java
index d5b5321..34ade7e 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryTestValue.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryTestValue.java
@@ -17,7 +17,7 @@
 
 package org.apache.ignite.internal.processors.cache;
 
-import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 
 import java.io.*;
 
@@ -27,29 +27,29 @@ import java.io.*;
 @SuppressWarnings("unused")
 public class GridCacheQueryTestValue implements Serializable {
     /** */
-    @CacheQueryTextField
-    @CacheQuerySqlField(name = "fieldname")
+    @QueryTextField
+    @QuerySqlField(name = "fieldname")
     private String field1;
 
     /** */
     private int field2;
 
     /** */
-    @CacheQuerySqlField(unique = true)
+    @QuerySqlField(index = true)
     private long field3;
 
     /** */
-    @CacheQuerySqlField(orderedGroups = {
-        @CacheQuerySqlField.Group(name = "grp1", order = 1),
-        @CacheQuerySqlField.Group(name = "grp2", order = 2)})
+    @QuerySqlField(orderedGroups = {
+        @QuerySqlField.Group(name = "grp1", order = 1),
+        @QuerySqlField.Group(name = "grp2", order = 2)})
     private long field4;
 
     /** */
-    @CacheQuerySqlField(orderedGroups = {@CacheQuerySqlField.Group(name = "grp1", order = 2)})
+    @QuerySqlField(orderedGroups = {@QuerySqlField.Group(name = "grp1", order = 2)})
     private long field5;
 
     /** */
-    @CacheQuerySqlField(orderedGroups = {@CacheQuerySqlField.Group(name = "grp1", order = 3)})
+    @QuerySqlField(orderedGroups = {@QuerySqlField.Group(name = "grp1", order = 3)})
     private GridCacheQueryEmbeddedValue field6 = new GridCacheQueryEmbeddedValue();
 
     /**
@@ -72,7 +72,7 @@ public class GridCacheQueryTestValue implements Serializable {
      *
      * @return Field.
      */
-    @CacheQuerySqlField
+    @QuerySqlField
     public int getField2() {
         return field2;
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReduceQueryMultithreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReduceQueryMultithreadedSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReduceQueryMultithreadedSelfTest.java
index 6fcd412..6eb6075 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReduceQueryMultithreadedSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReduceQueryMultithreadedSelfTest.java
@@ -21,8 +21,9 @@ import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.query.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.*;
-import org.apache.ignite.marshaller.optimized.*;
+import org.apache.ignite.internal.processors.cache.query.*;
 import org.apache.ignite.internal.util.typedef.*;
+import org.apache.ignite.marshaller.optimized.*;
 
 import java.util.*;
 import java.util.concurrent.*;
@@ -68,7 +69,7 @@ public class GridCacheReduceQueryMultithreadedSelfTest extends GridCacheAbstract
         cfg.setBackups(1);
         cfg.setWriteSynchronizationMode(FULL_SYNC);
 
-        CacheQueryConfiguration qcfg = new CacheQueryConfiguration();
+        QueryConfiguration qcfg = new QueryConfiguration();
 
         qcfg.setIndexPrimitiveKey(true);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSqlQueryMultiThreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSqlQueryMultiThreadedSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSqlQueryMultiThreadedSelfTest.java
index 4681028..01d9d8a 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSqlQueryMultiThreadedSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSqlQueryMultiThreadedSelfTest.java
@@ -18,8 +18,9 @@
 package org.apache.ignite.internal.processors.cache;
 
 import org.apache.ignite.cache.*;
-import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.configuration.*;
+import org.apache.ignite.internal.processors.cache.query.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
@@ -120,7 +121,7 @@ public class GridCacheSqlQueryMultiThreadedSelfTest extends GridCommonAbstractTe
      */
     private static class Person implements Serializable {
         /** */
-        @CacheQuerySqlField
+        @QuerySqlField
         private int age;
 
         /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapSelfTest.java
index 6321ab2..7b94521 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapSelfTest.java
@@ -19,9 +19,10 @@ package org.apache.ignite.internal.processors.cache;
 
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
-import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.events.*;
+import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.marshaller.optimized.*;
 import org.apache.ignite.spi.discovery.tcp.*;
@@ -29,7 +30,6 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
 import org.apache.ignite.spi.swapspace.*;
 import org.apache.ignite.spi.swapspace.noop.*;
-import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.testframework.junits.common.*;
 
 import java.util.*;
@@ -37,11 +37,11 @@ import java.util.concurrent.*;
 import java.util.concurrent.atomic.*;
 
 import static java.util.concurrent.TimeUnit.*;
-import static org.apache.ignite.events.IgniteEventType.*;
-import static org.apache.ignite.configuration.IgniteDeploymentMode.*;
 import static org.apache.ignite.cache.CacheMode.*;
-import static org.apache.ignite.cache.GridCachePeekMode.*;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*;
+import static org.apache.ignite.cache.GridCachePeekMode.*;
+import static org.apache.ignite.configuration.IgniteDeploymentMode.*;
+import static org.apache.ignite.events.IgniteEventType.*;
 
 /**
  * Test for cache swap.
@@ -655,7 +655,7 @@ public class GridCacheSwapSelfTest extends GridCommonAbstractTest {
      */
     private static class CacheValue {
         /** Value. */
-        @CacheQuerySqlField
+        @QuerySqlField
         private final int val;
 
         /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridIndexingWithNoopSwapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridIndexingWithNoopSwapSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridIndexingWithNoopSwapSelfTest.java
index dc433c3..e814052 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridIndexingWithNoopSwapSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridIndexingWithNoopSwapSelfTest.java
@@ -22,11 +22,12 @@ import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.eviction.fifo.*;
 import org.apache.ignite.cache.query.*;
 import org.apache.ignite.configuration.*;
+import org.apache.ignite.internal.processors.cache.GridCacheAbstractQuerySelfTest.*;
+import org.apache.ignite.internal.processors.cache.query.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
 import org.apache.ignite.spi.swapspace.noop.*;
-import org.apache.ignite.internal.processors.cache.GridCacheAbstractQuerySelfTest.*;
 import org.apache.ignite.testframework.junits.common.*;
 
 import java.util.*;
@@ -69,7 +70,7 @@ public class GridIndexingWithNoopSwapSelfTest extends GridCommonAbstractTest {
         cc.setBackups(1);
         cc.setAtomicityMode(TRANSACTIONAL);
 
-        CacheQueryConfiguration qcfg = new CacheQueryConfiguration();
+        QueryConfiguration qcfg = new QueryConfiguration();
 
         qcfg.setIndexPrimitiveKey(true);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicFieldsQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicFieldsQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicFieldsQuerySelfTest.java
index 270f5f1..47abfde 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicFieldsQuerySelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicFieldsQuerySelfTest.java
@@ -19,7 +19,7 @@ package org.apache.ignite.internal.processors.cache.distributed.near;
 
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
-import org.apache.ignite.cache.query.*;
+import org.apache.ignite.internal.processors.cache.query.*;
 import org.apache.ignite.internal.util.typedef.*;
 
 import java.util.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFieldsQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFieldsQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFieldsQuerySelfTest.java
index be078c4..1e28498 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFieldsQuerySelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFieldsQuerySelfTest.java
@@ -19,8 +19,8 @@ package org.apache.ignite.internal.processors.cache.distributed.near;
 
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.affinity.*;
-import org.apache.ignite.cache.query.*;
 import org.apache.ignite.internal.processors.cache.*;
+import org.apache.ignite.internal.processors.cache.query.*;
 import org.jetbrains.annotations.*;
 
 import java.util.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedHitsAndMissesSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedHitsAndMissesSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedHitsAndMissesSelfTest.java
index acfe247..1e87ff7 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedHitsAndMissesSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedHitsAndMissesSelfTest.java
@@ -26,8 +26,8 @@ import org.apache.ignite.marshaller.optimized.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
-import org.apache.ignite.transactions.*;
 import org.apache.ignite.testframework.junits.common.*;
+import org.apache.ignite.transactions.*;
 
 import javax.cache.processor.*;
 import java.util.*;
@@ -92,7 +92,7 @@ public class GridCachePartitionedHitsAndMissesSelfTest extends GridCommonAbstrac
         cfg.setBackups(1);
         cfg.setStatisticsEnabled(true);
 
-        CacheQueryConfiguration qcfg = new CacheQueryConfiguration();
+        QueryConfiguration qcfg = new QueryConfiguration();
 
         qcfg.setIndexPrimitiveKey(true);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedQuerySelfTest.java
index 01debfc..7a4d538 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedQuerySelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedQuerySelfTest.java
@@ -19,8 +19,8 @@ package org.apache.ignite.internal.processors.cache.distributed.near;
 
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
-import org.apache.ignite.cache.query.*;
 import org.apache.ignite.internal.processors.cache.*;
+import org.apache.ignite.internal.processors.cache.query.*;
 import org.apache.ignite.internal.util.lang.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.jetbrains.annotations.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheQueryNodeRestartSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheQueryNodeRestartSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheQueryNodeRestartSelfTest.java
index eb6f1c9..9d1801e 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheQueryNodeRestartSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheQueryNodeRestartSelfTest.java
@@ -24,12 +24,13 @@ import org.apache.ignite.configuration.*;
 import org.apache.ignite.events.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.cache.*;
+import org.apache.ignite.internal.processors.cache.query.*;
+import org.apache.ignite.internal.util.typedef.*;
+import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
-import org.apache.ignite.internal.util.typedef.*;
-import org.apache.ignite.internal.util.typedef.internal.*;
 
 import java.util.*;
 import java.util.concurrent.*;
@@ -80,7 +81,7 @@ public class GridCacheQueryNodeRestartSelfTest extends GridCacheAbstractSelfTest
         cc.setAtomicityMode(TRANSACTIONAL);
         cc.setDistributionMode(NEAR_PARTITIONED);
 
-        CacheQueryConfiguration qcfg = new CacheQueryConfiguration();
+        QueryConfiguration qcfg = new QueryConfiguration();
 
         qcfg.setIndexPrimitiveKey(true);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedFieldsQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedFieldsQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedFieldsQuerySelfTest.java
index b21dee0..a792f50 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedFieldsQuerySelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedFieldsQuerySelfTest.java
@@ -19,23 +19,23 @@ package org.apache.ignite.internal.processors.cache.distributed.replicated;
 
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
-import org.apache.ignite.cache.query.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.events.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.cache.*;
-import org.apache.ignite.lang.*;
+import org.apache.ignite.internal.processors.cache.query.*;
 import org.apache.ignite.internal.processors.query.*;
 import org.apache.ignite.internal.util.future.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.lang.*;
 import org.apache.ignite.testframework.*;
 
 import java.util.*;
 import java.util.concurrent.*;
 
-import static org.apache.ignite.events.IgniteEventType.*;
 import static org.apache.ignite.cache.CacheMode.*;
+import static org.apache.ignite.events.IgniteEventType.*;
 
 /**
  * Tests for fields queries.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedQuerySelfTest.java
index 4d480b3..119273f 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedQuerySelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedQuerySelfTest.java
@@ -19,19 +19,19 @@ package org.apache.ignite.internal.processors.cache.distributed.replicated;
 
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
-import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.events.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.cache.*;
-import org.apache.ignite.lang.*;
-import org.apache.ignite.transactions.*;
 import org.apache.ignite.internal.processors.cache.query.*;
 import org.apache.ignite.internal.util.future.*;
 import org.apache.ignite.internal.util.lang.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.lang.*;
 import org.apache.ignite.testframework.*;
+import org.apache.ignite.transactions.*;
 import org.jetbrains.annotations.*;
 import org.springframework.util.*;
 
@@ -42,8 +42,8 @@ import java.util.*;
 import java.util.concurrent.*;
 import java.util.concurrent.atomic.*;
 
-import static org.apache.ignite.events.IgniteEventType.*;
 import static org.apache.ignite.cache.CacheMode.*;
+import static org.apache.ignite.events.IgniteEventType.*;
 
 /**
  * Tests replicated query.
@@ -613,7 +613,7 @@ public class GridCacheReplicatedQuerySelfTest extends GridCacheAbstractQuerySelf
      */
     private static class CacheValue implements Externalizable {
         /** Value. */
-        @CacheQuerySqlField
+        @QuerySqlField
         private String val;
 
         /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalQuerySelfTest.java
index 91dd34b..9cd000b 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalQuerySelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalQuerySelfTest.java
@@ -18,8 +18,8 @@
 package org.apache.ignite.internal.processors.cache.local;
 
 import org.apache.ignite.cache.*;
-import org.apache.ignite.cache.query.*;
 import org.apache.ignite.internal.processors.cache.*;
+import org.apache.ignite.internal.processors.cache.query.*;
 import org.apache.ignite.lang.*;
 
 import java.util.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexRebuildTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexRebuildTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexRebuildTest.java
index e305482..7b68801 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexRebuildTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexRebuildTest.java
@@ -19,13 +19,14 @@ package org.apache.ignite.internal.processors.query.h2;
 
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
-import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.cache.*;
-import org.apache.ignite.lang.*;
+import org.apache.ignite.internal.processors.cache.query.*;
 import org.apache.ignite.internal.processors.query.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.lang.*;
 import org.apache.ignite.testframework.*;
 import org.jetbrains.annotations.*;
 
@@ -93,19 +94,19 @@ public class GridH2IndexRebuildTest extends GridCacheAbstractSelfTest {
     @SuppressWarnings("UnusedDeclaration")
     private static class TestValue1 {
         /** */
-        @CacheQuerySqlField(index = true)
+        @QuerySqlField(index = true)
         private long val1;
 
         /** */
-        @CacheQuerySqlField(index = true)
+        @QuerySqlField(index = true)
         private String val2;
 
         /** */
-        @CacheQuerySqlField(groups = "group1")
+        @QuerySqlField(groups = "group1")
         private int val3;
 
         /** */
-        @CacheQuerySqlField(groups = "group1")
+        @QuerySqlField(groups = "group1")
         private int val4;
 
         /**
@@ -124,11 +125,11 @@ public class GridH2IndexRebuildTest extends GridCacheAbstractSelfTest {
     @SuppressWarnings("UnusedDeclaration")
     private static class TestValue2 {
         /** */
-        @CacheQuerySqlField(index = true)
+        @QuerySqlField(index = true)
         private long val1;
 
         /** */
-        @CacheQueryTextField
+        @QueryTextField
         private String val2;
 
         /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexingGeoSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexingGeoSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexingGeoSelfTest.java
index 71705d9..878f9b2 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexingGeoSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexingGeoSelfTest.java
@@ -20,9 +20,10 @@ package org.apache.ignite.internal.processors.query.h2;
 import com.vividsolutions.jts.geom.*;
 import com.vividsolutions.jts.io.*;
 import org.apache.ignite.cache.*;
-import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.cache.*;
+import org.apache.ignite.internal.processors.cache.query.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.testframework.*;
@@ -229,11 +230,11 @@ public class GridH2IndexingGeoSelfTest extends GridCacheAbstractSelfTest {
      */
     private static class EnemyCamp implements Serializable {
         /** */
-        @CacheQuerySqlField(index = true)
+        @QuerySqlField(index = true)
         private Geometry coords;
 
         /** */
-        @CacheQuerySqlField
+        @QuerySqlField
         private String name;
 
         /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridIndexingSpiAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridIndexingSpiAbstractSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridIndexingSpiAbstractSelfTest.java
index 77c743e..c1f5ece 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridIndexingSpiAbstractSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridIndexingSpiAbstractSelfTest.java
@@ -18,11 +18,11 @@
 package org.apache.ignite.internal.processors.query.h2;
 
 import org.apache.ignite.*;
-import org.apache.ignite.lang.*;
-import org.apache.ignite.spi.*;
 import org.apache.ignite.internal.processors.query.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.lang.*;
+import org.apache.ignite.spi.*;
 import org.apache.ignite.testframework.*;
 import org.apache.ignite.testframework.junits.common.*;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/GridQueryParsingTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/GridQueryParsingTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/GridQueryParsingTest.java
index 49ce6d3..6cefc34 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/GridQueryParsingTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/GridQueryParsingTest.java
@@ -12,6 +12,7 @@ package org.apache.ignite.internal.processors.query.h2.sql;
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.query.*;
@@ -31,8 +32,8 @@ import java.io.*;
 import java.util.*;
 
 import static org.apache.ignite.cache.CacheDistributionMode.*;
-import static org.apache.ignite.cache.CachePreloadMode.SYNC;
-import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
+import static org.apache.ignite.cache.CachePreloadMode.*;
+import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*;
 
 /**
  *
@@ -71,7 +72,7 @@ public class GridQueryParsingTest extends GridCommonAbstractTest {
         cc.setPreloadMode(SYNC);
         cc.setSwapEnabled(false);
 
-        CacheQueryConfiguration qcfg = new CacheQueryConfiguration();
+        QueryConfiguration qcfg = new QueryConfiguration();
 
         qcfg.setIndexPrimitiveKey(true);
         qcfg.setIndexFixedTyping(true);
@@ -258,19 +259,19 @@ public class GridQueryParsingTest extends GridCommonAbstractTest {
      *
      */
     public static class Person implements Serializable {
-        @CacheQuerySqlField(index = true)
+        @QuerySqlField(index = true)
         public Date date = new Date();
 
-        @CacheQuerySqlField(index = true)
+        @QuerySqlField(index = true)
         public String name = "Ivan";
 
-        @CacheQuerySqlField(index = true)
+        @QuerySqlField(index = true)
         public String parentName;
 
-        @CacheQuerySqlField(index = true)
+        @QuerySqlField(index = true)
         public int addrId;
 
-        @CacheQuerySqlField(index = true)
+        @QuerySqlField(index = true)
         public int old;
     }
 
@@ -278,13 +279,13 @@ public class GridQueryParsingTest extends GridCommonAbstractTest {
      *
      */
     public static class Address implements Serializable {
-        @CacheQuerySqlField(index = true)
+        @QuerySqlField(index = true)
         public int id;
 
-        @CacheQuerySqlField(index = true)
+        @QuerySqlField(index = true)
         public int streetNumber;
 
-        @CacheQuerySqlField(index = true)
+        @QuerySqlField(index = true)
         public String street = "Nevskiy";
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/indexing/src/test/java/org/apache/ignite/loadtests/h2indexing/GridTestEntity.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/loadtests/h2indexing/GridTestEntity.java b/modules/indexing/src/test/java/org/apache/ignite/loadtests/h2indexing/GridTestEntity.java
index 39069f1..c1802c8 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/loadtests/h2indexing/GridTestEntity.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/loadtests/h2indexing/GridTestEntity.java
@@ -17,7 +17,7 @@
 
 package org.apache.ignite.loadtests.h2indexing;
 
-import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 
 import java.util.*;
 
@@ -26,11 +26,11 @@ import java.util.*;
  */
 public class GridTestEntity {
     /** */
-    @CacheQuerySqlField(index = true)
+    @QuerySqlField(index = true)
     private final String name;
 
     /** */
-    @CacheQuerySqlField(index = false)
+    @QuerySqlField(index = false)
     private final Date date;
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/indexing/src/test/java/org/apache/ignite/spi/communication/tcp/GridOrderedMessageCancelSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/spi/communication/tcp/GridOrderedMessageCancelSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/spi/communication/tcp/GridOrderedMessageCancelSelfTest.java
index 7f95f34..a0cc41a 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/spi/communication/tcp/GridOrderedMessageCancelSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/spi/communication/tcp/GridOrderedMessageCancelSelfTest.java
@@ -19,18 +19,17 @@ package org.apache.ignite.spi.communication.tcp;
 
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
-import org.apache.ignite.cache.query.*;
 import org.apache.ignite.compute.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.*;
-import org.apache.ignite.lang.*;
-import org.apache.ignite.spi.discovery.tcp.*;
-import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
-import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
 import org.apache.ignite.internal.managers.communication.*;
 import org.apache.ignite.internal.processors.cache.query.*;
 import org.apache.ignite.internal.util.direct.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.lang.*;
+import org.apache.ignite.spi.discovery.tcp.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
 import org.apache.ignite.testframework.junits.common.*;
 import org.jetbrains.annotations.*;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
index 16dbd19..cd2cf62 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
@@ -19,14 +19,14 @@ package org.apache.ignite.testsuites;
 
 import junit.framework.*;
 import org.apache.ignite.internal.processors.cache.*;
-import org.apache.ignite.internal.processors.cache.distributed.replicated.*;
-import org.apache.ignite.internal.processors.query.h2.sql.*;
-import org.apache.ignite.spi.communication.tcp.*;
 import org.apache.ignite.internal.processors.cache.distributed.near.*;
+import org.apache.ignite.internal.processors.cache.distributed.replicated.*;
 import org.apache.ignite.internal.processors.cache.local.*;
 import org.apache.ignite.internal.processors.cache.query.*;
 import org.apache.ignite.internal.processors.cache.query.continuous.*;
 import org.apache.ignite.internal.processors.cache.query.reducefields.*;
+import org.apache.ignite.internal.processors.query.h2.sql.*;
+import org.apache.ignite.spi.communication.tcp.*;
 
 /**
  * Test suite for cache queries.


[21/50] [abbrv] incubator-ignite git commit: #Test: Fix hadoop

Posted by se...@apache.org.
#Test: Fix hadoop


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

Branch: refs/heads/ignite-sql
Commit: b6eb388670f0954cfca76a17e134486b4465b015
Parents: 9550905
Author: sboikov <sb...@gridgain.com>
Authored: Fri Jan 30 11:35:56 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Fri Jan 30 11:35:56 2015 +0300

----------------------------------------------------------------------
 .../ignite/internal/processors/hadoop/GridHadoopClassLoader.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b6eb3886/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/GridHadoopClassLoader.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/GridHadoopClassLoader.java b/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/GridHadoopClassLoader.java
index 809d77f..1aa01b5 100644
--- a/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/GridHadoopClassLoader.java
+++ b/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/GridHadoopClassLoader.java
@@ -74,10 +74,10 @@ public class GridHadoopClassLoader extends URLClassLoader {
      * @return {@code true} if we need to check this class.
      */
     private static boolean isGgfsOrGgHadoop(String cls) {
-        String gg = "org.apache.";
+        String gg = "org.apache.ignite";
         int len = gg.length();
 
-        return cls.startsWith(gg) && (cls.indexOf("ggfs.", len) != -1 || cls.indexOf("hadoop.", len) != -1);
+        return cls.startsWith(gg) && (cls.indexOf("ggfs.", len) != -1 || cls.indexOf(".fs.", len) != -1 || cls.indexOf("hadoop.", len) != -1);
     }
 
     /**


[34/50] [abbrv] incubator-ignite git commit: Ignite-71 GridLog4jCorrectFileNameTest fix

Posted by se...@apache.org.
Ignite-71 GridLog4jCorrectFileNameTest fix


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

Branch: refs/heads/ignite-sql
Commit: 9b6f75e27be952f9e703824feb65183e0e6b2aa9
Parents: 2690391
Author: avinogradov <av...@gridgain.com>
Authored: Fri Jan 30 14:38:47 2015 +0300
Committer: avinogradov <av...@gridgain.com>
Committed: Fri Jan 30 14:38:47 2015 +0300

----------------------------------------------------------------------
 .../apache/ignite/logger/log4j/GridLog4jCorrectFileNameTest.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9b6f75e2/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jCorrectFileNameTest.java
----------------------------------------------------------------------
diff --git a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jCorrectFileNameTest.java b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jCorrectFileNameTest.java
index dc9cd37..0f76f25 100644
--- a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jCorrectFileNameTest.java
+++ b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jCorrectFileNameTest.java
@@ -81,7 +81,7 @@ public class GridLog4jCorrectFileNameTest extends TestCase {
     private void checkOneNode(int id) throws Exception {
         try (Ignite ignite = G.start(getConfiguration("grid" + id))) {
             String id8 = U.id8(ignite.cluster().localNode().id());
-            String logPath = "work/log/gridgain-" + id8 + ".log";
+            String logPath = "work/log/ignite-" + id8 + ".log";
             File logFile = U.resolveGridGainPath(logPath);
 
             assertNotNull("Failed to resolve path: " + logPath, logFile);


[23/50] [abbrv] incubator-ignite git commit: Ignite-67 log fix

Posted by se...@apache.org.
Ignite-67 log fix


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

Branch: refs/heads/ignite-sql
Commit: a360ab7794b844dd49693de91a7a7f9b115486dd
Parents: ed8d4d8
Author: avinogradov <av...@gridgain.com>
Authored: Fri Jan 30 12:22:44 2015 +0300
Committer: avinogradov <av...@gridgain.com>
Committed: Fri Jan 30 12:22:44 2015 +0300

----------------------------------------------------------------------
 .../src/test/resources/log/gridgain.log.tst     | 2540 +++++++++---------
 1 file changed, 1270 insertions(+), 1270 deletions(-)
----------------------------------------------------------------------



[45/50] [abbrv] incubator-ignite git commit: gg*{sh, bat} renamed to ignite*{sh, bat}

Posted by se...@apache.org.
gg*{sh,bat} renamed to ignite*{sh,bat}


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

Branch: refs/heads/ignite-sql
Commit: 7e8ea4f1d71e6c9a9e329a0f00471878a73d6b54
Parents: 115f597
Author: Anton Vinogradov <av...@gridgain.com>
Authored: Fri Jan 30 22:33:10 2015 +0300
Committer: Anton Vinogradov <av...@gridgain.com>
Committed: Fri Jan 30 22:33:11 2015 +0300

----------------------------------------------------------------------
 assembly/libs/readme.txt                        |   4 +-
 assembly/release-base-fabric.xml                |   4 +-
 assembly/release-base.xml                       |   4 +-
 bin/ggrouter.bat                                |  33 ---
 bin/ggrouter.sh                                 |  50 ----
 bin/ggstart.bat                                 | 228 -------------------
 bin/ggstart.sh                                  | 176 --------------
 bin/ggvisorcmd.bat                              | 144 ------------
 bin/ggvisorcmd.sh                               | 124 ----------
 bin/ignite.bat                                  | 228 +++++++++++++++++++
 bin/ignite.sh                                   | 176 ++++++++++++++
 bin/igniterouter.bat                            |  33 +++
 bin/igniterouter.sh                             |  50 ++++
 bin/ignitevisorcmd.bat                          | 144 ++++++++++++
 bin/ignitevisorcmd.sh                           | 124 ++++++++++
 bin/setup-hadoop.bat                            |   2 +-
 bin/setup-hadoop.sh                             |   2 +-
 config/hadoop/default-config.xml                |   2 +-
 config/router/default-router.xml                |   2 +-
 docs/hadoop_readme.md                           |   6 +-
 docs/ignite_readme.md                           |  12 +-
 examples/config/example-cache.xml               |   2 +-
 examples/config/example-streamer.xml            |   2 +-
 examples/config/filesystem/example-ggfs.xml     |   2 +-
 examples/rest/http-rest-example.php             |   2 +-
 examples/rest/memcache-rest-example.php         |   2 +-
 .../compute/ComputeBroadcastExample.java        |   2 +-
 .../compute/ComputeCallableExample.java         |   2 +-
 .../examples/compute/ComputeClosureExample.java |   2 +-
 .../compute/ComputeContinuousMapperExample.java |   2 +-
 .../compute/ComputeExecutorServiceExample.java  |   2 +-
 .../ComputeFibonacciContinuationExample.java    |   2 +-
 .../compute/ComputeProjectionExample.java       |   2 +-
 .../examples/compute/ComputeReducerExample.java |   2 +-
 .../compute/ComputeRunnableExample.java         |   2 +-
 .../compute/ComputeScheduleExample.java         |   2 +-
 .../examples/compute/ComputeTaskMapExample.java |   2 +-
 .../compute/ComputeTaskSplitExample.java        |   2 +-
 .../compute/montecarlo/CreditRiskExample.java   |   2 +-
 .../examples/datagrid/CacheAffinityExample.java |   2 +-
 .../examples/datagrid/CacheApiExample.java      |   2 +-
 .../datagrid/CacheContinuousQueryExample.java   |   2 +-
 .../datagrid/CacheDataLoaderExample.java        |   2 +-
 .../examples/datagrid/CacheEventsExample.java   |   2 +-
 .../datagrid/CachePopularNumbersExample.java    |   2 +-
 .../examples/datagrid/CachePutGetExample.java   |   2 +-
 .../examples/datagrid/CacheQueryExample.java    |   2 +-
 .../datagrid/CacheTransactionExample.java       |   2 +-
 .../datastructures/CacheAtomicLongExample.java  |   2 +-
 .../CacheAtomicReferenceExample.java            |   2 +-
 .../CacheAtomicSequenceExample.java             |   2 +-
 .../CacheAtomicStampedExample.java              |   2 +-
 .../CacheCountDownLatchExample.java             |   2 +-
 .../datastructures/CacheQueueExample.java       |   2 +-
 .../datastructures/CacheSetExample.java         |   2 +-
 .../starschema/CacheStarSchemaExample.java      |   2 +-
 .../ignite/examples/events/EventsExample.java   |   2 +-
 .../ignite/examples/ggfs/GgfsExample.java       |   2 +-
 .../examples/ggfs/GgfsMapReduceExample.java     |   2 +-
 .../ignite/examples/ggfs/GgfsNodeStartup.java   |   4 +-
 .../examples/messaging/MessagingExample.java    |   2 +-
 .../messaging/MessagingPingPongExample.java     |   2 +-
 .../MessagingPingPongListenActorExample.java    |   2 +-
 .../misc/deployment/DeploymentExample.java      |   2 +-
 .../misc/springbean/SpringBeanExample.java      |   2 +-
 .../examples/services/ServicesExample.java      |   2 +-
 .../streaming/StreamingCheckInExample.java      |   2 +-
 .../StreamingPopularNumbersExample.java         |   2 +-
 .../streaming/StreamingPriceBarsExample.java    |   2 +-
 .../StreamingRunningAverageExample.java         |   2 +-
 .../apache/ignite/examples/ComputeExample.java  |   2 +-
 .../ignite/examples/MessagingExample.java       |   2 +-
 .../examples/ScalarCacheAffinityExample1.scala  |   2 +-
 .../examples/ScalarCacheAffinityExample2.scala  |   2 +-
 .../ScalarCacheAffinitySimpleExample.scala      |   2 +-
 .../scalar/examples/ScalarCacheExample.scala    |   2 +-
 .../ScalarCachePopularNumbersExample.scala      |   2 +-
 .../examples/ScalarCacheQueryExample.scala      |   2 +-
 .../scalar/examples/ScalarClosureExample.scala  |   2 +-
 .../examples/ScalarContinuationExample.scala    |   2 +-
 .../examples/ScalarCreditRiskExample.scala      |   2 +-
 .../examples/ScalarPiCalculationExample.scala   |   2 +-
 .../scalar/examples/ScalarPingPongExample.scala |   2 +-
 .../scalar/examples/ScalarPrimeExample.scala    |   2 +-
 .../scalar/examples/ScalarScheduleExample.scala |   2 +-
 .../examples/ScalarSnowflakeSchemaExample.scala |   2 +-
 .../scalar/examples/ScalarTaskExample.scala     |   2 +-
 .../examples/ScalarWorldShortestMapReduce.scala |   2 +-
 modules/aop/readme.txt                          |   2 +-
 modules/aws/readme.txt                          |   2 +-
 modules/clients/src/test/bin/start-nodes.cmd    |  10 +-
 modules/clients/src/test/bin/start-nodes.sh     |   8 +-
 .../clients/src/test/resources/spring-cache.xml |   2 +-
 .../src/test/resources/spring-router-ssl.xml    |   2 +-
 .../src/test/resources/spring-router.xml        |   2 +-
 .../src/test/resources/spring-server-node.xml   |   2 +-
 .../test/resources/spring-server-ssl-node.xml   |   2 +-
 .../java/org/apache/ignite/IgniteCluster.java   |   4 +-
 .../main/java/org/apache/ignite/IgniteFs.java   |   4 +-
 .../java/org/apache/ignite/IgniteLogger.java    |   2 +-
 .../apache/ignite/IgniteSystemProperties.java   |   4 +-
 .../main/java/org/apache/ignite/Ignition.java   |   4 +-
 .../ignite/client/router/GridRouterFactory.java |   2 +-
 .../configuration/IgniteDeploymentMode.java     |   2 +-
 .../apache/ignite/internal/IgniteKernal.java    |   6 +-
 .../org/apache/ignite/internal/IgnitionEx.java  |   2 +-
 .../apache/ignite/lifecycle/LifecycleBean.java  |   2 +-
 .../segmentation/GridSegmentationPolicy.java    |   2 +-
 .../startup/cmdline/CommandLineStartup.java     |  10 +-
 .../startup/cmdline/CommandLineTransformer.java |   6 +-
 .../core/src/test/bin/start-nodes-custom.bat    |   2 +-
 modules/core/src/test/bin/start-nodes-custom.sh |   2 +-
 .../spring-cache-client-benchmark-1.xml         |   2 +-
 .../spring-cache-client-benchmark-2.xml         |   2 +-
 .../spring-cache-client-benchmark-3.xml         |   2 +-
 modules/core/src/test/config/example-cache.xml  |   2 +-
 modules/core/src/test/config/ggfs-loopback.xml  |   2 +-
 modules/core/src/test/config/ggfs-shmem.xml     |   2 +-
 .../core/src/test/config/spring-cache-load.xml  |   2 +-
 .../core/src/test/config/spring-multicache.xml  |   2 +-
 .../average/spring-streamer-average-base.xml    |   2 +-
 .../average/spring-streamer-average-local.xml   |   2 +-
 .../average/spring-streamer-average-random.xml  |   2 +-
 .../config/streamer/spring-streamer-base.xml    |   2 +-
 .../GridCacheMultiNodeDataStructureTest.java    |   4 +-
 .../capacity/spring-capacity-cache.xml          |   2 +-
 .../loadtests/colocation/spring-colocation.xml  |   2 +-
 .../loadtests/mapper/GridNodeStartup.java       |   4 +-
 .../startup/GridRandomCommandLineLoader.java    |   2 +-
 .../ignite/startup/GridVmNodesStarter.java      |   2 +-
 .../core/src/test/webapp/META-INF/gg-config.xml |   2 +-
 modules/email/readme.txt                        |   2 +-
 modules/hadoop/readme.txt                       |   2 +-
 modules/hibernate/readme.txt                    |   2 +-
 modules/indexing/readme.txt                     |   2 +-
 modules/jcl/readme.txt                          |   2 +-
 modules/jta/readme.txt                          |   2 +-
 modules/log4j/readme.txt                        |   2 +-
 modules/rest-http/readme.txt                    |   2 +-
 modules/scalar/readme.txt                       |   2 +-
 modules/schedule/readme.txt                     |   2 +-
 modules/slf4j/readme.txt                        |   2 +-
 modules/spring/readme.txt                       |   2 +-
 .../ignite/cache/spring/SpringCacheManager.java |   2 +-
 modules/ssh/readme.txt                          |   2 +-
 .../util/nodestart/GridNodeCallableImpl.java    |   8 +-
 modules/urideploy/readme.txt                    |   2 +-
 .../scala/org/apache/ignite/visor/Packet.scala  |   2 +-
 .../ignite/visor/commands/start/Packet.scala    |   4 +-
 .../commands/start/VisorStartCommand.scala      |   8 +-
 .../scala/org/apache/ignite/visor/visor.scala   |   2 +-
 modules/web/readme.txt                          |   2 +-
 152 files changed, 934 insertions(+), 934 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/assembly/libs/readme.txt
----------------------------------------------------------------------
diff --git a/assembly/libs/readme.txt b/assembly/libs/readme.txt
index 7595da9..78b3604 100644
--- a/assembly/libs/readme.txt
+++ b/assembly/libs/readme.txt
@@ -2,7 +2,7 @@ Apache Ignite Dependencies
 --------------------------
 
 Current folder contains JAR files for all Apache Ignite modules along with their dependencies.
-When node is started using 'ggstart.{sh|bat}' script, all JARs and classes located in
+When node is started using 'ignite.{sh|bat}' script, all JARs and classes located in
 'libs' folder and all its sub-folders except 'optional' are added to classpath of the node.
 
 By default, only Apache Ignite core JAR and a minimum set of modules is enabled, while other
@@ -10,7 +10,7 @@ modules are located in 'optional' folder and therefore disabled.
 
 To enable any of optional Ignite modules when starting a standalone node,
 move corresponding module folder from 'libs/optional' to 'libs' before running
-'ggstart.{sh|bat}' script. The content of the module folder will be added to
+'ignite.{sh|bat}' script. The content of the module folder will be added to
 classpath in this case.
 
 If you need to add your own classes to classpath of the node (e.g., task classes), put them

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/assembly/release-base-fabric.xml
----------------------------------------------------------------------
diff --git a/assembly/release-base-fabric.xml b/assembly/release-base-fabric.xml
index bd70839..f985b6a 100644
--- a/assembly/release-base-fabric.xml
+++ b/assembly/release-base-fabric.xml
@@ -39,7 +39,7 @@
             <directory>bin</directory>
             <outputDirectory>/bin</outputDirectory>
             <includes>
-                <include>ggrouter.bat</include>
+                <include>igniterouter.bat</include>
             </includes>
         </fileSet>
 
@@ -48,7 +48,7 @@
             <outputDirectory>/bin</outputDirectory>
             <fileMode>0755</fileMode>
             <includes>
-                <include>ggrouter.sh</include>
+                <include>igniterouter.sh</include>
             </includes>
         </fileSet>
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/assembly/release-base.xml
----------------------------------------------------------------------
diff --git a/assembly/release-base.xml b/assembly/release-base.xml
index 3995732..5cdeb2a 100644
--- a/assembly/release-base.xml
+++ b/assembly/release-base.xml
@@ -55,7 +55,7 @@
             </includes>
             <excludes>
                 <exclude>**/*hadoop*.bat</exclude>
-                <exclude>ggrouter.bat</exclude>
+                <exclude>igniterouter.bat</exclude>
                 <exclude>**/target-classpath.bat</exclude>
             </excludes>
         </fileSet>
@@ -69,7 +69,7 @@
             </includes>
             <excludes>
                 <exclude>**/*hadoop*.sh</exclude>
-                <exclude>ggrouter.sh</exclude>
+                <exclude>igniterouter.sh</exclude>
                 <exclude>**/target-classpath.sh</exclude>
                 <exclude>**/service.sh</exclude>
             </excludes>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/bin/ggrouter.bat
----------------------------------------------------------------------
diff --git a/bin/ggrouter.bat b/bin/ggrouter.bat
deleted file mode 100644
index a364061..0000000
--- a/bin/ggrouter.bat
+++ /dev/null
@@ -1,33 +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.
-
-::
-:: Grid router command line loader.
-::
-
-@echo off
-
-if "%OS%" == "Windows_NT" setlocal
-
-::
-:: Set router service environment.
-::
-set "DEFAULT_CONFIG=config\router\default-router.xml"
-set MAIN_CLASS=org.gridgain.client.router.impl.GridRouterCommandLineStartup
-
-::
-:: Start router service.
-::
-call "%~dp0\ggstart.bat" %*

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/bin/ggrouter.sh
----------------------------------------------------------------------
diff --git a/bin/ggrouter.sh b/bin/ggrouter.sh
deleted file mode 100755
index 29ac1d1..0000000
--- a/bin/ggrouter.sh
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/bin/bash
-#  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.
-
-#
-# Router command line loader.
-#
-
-#
-# Import common functions.
-#
-if [ "${IGNITE_HOME}" = "" ];
-    then IGNITE_HOME_TMP="$(dirname "$(cd "$(dirname "$0")"; "pwd")")";IGNITE_HOME_TMP="$(dirname "${IGNITE_HOME_TMP}")" # Will be removed in release.
-    else IGNITE_HOME_TMP=${IGNITE_HOME};
-fi
-
-#
-# Set SCRIPTS_HOME - base path to scripts.
-#
-SCRIPTS_HOME="${IGNITE_HOME_TMP}/bin"
-
-source "${SCRIPTS_HOME}"/include/functions.sh
-
-#
-# Discover IGNITE_HOME environment variable.
-#
-setGridGainHome
-
-#
-# Set router service environment.
-#
-export DEFAULT_CONFIG=config/router/default-router.xml
-export MAIN_CLASS=org.gridgain.client.router.impl.GridRouterCommandLineStartup
-
-#
-# Start router service.
-#
-. "${SCRIPTS_HOME}"/ggstart.sh $@

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/bin/ggstart.bat
----------------------------------------------------------------------
diff --git a/bin/ggstart.bat b/bin/ggstart.bat
deleted file mode 100644
index 2db610b..0000000
--- a/bin/ggstart.bat
+++ /dev/null
@@ -1,228 +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.
-
-::
-:: Grid command line loader.
-::
-
-@echo off
-
-if "%OS%" == "Windows_NT"  setlocal
-
-:: Check JAVA_HOME.
-if defined JAVA_HOME  goto checkJdk
-    echo %0, ERROR:
-    echo JAVA_HOME environment variable is not found.
-    echo Please point JAVA_HOME variable to location of JDK 1.7 or JDK 1.8.
-    echo You can also download latest JDK at http://java.com/download.
-goto error_finish
-
-:checkJdk
-:: Check that JDK is where it should be.
-if exist "%JAVA_HOME%\bin\java.exe" goto checkJdkVersion
-    echo %0, ERROR:
-    echo JAVA is not found in JAVA_HOME=%JAVA_HOME%.
-    echo Please point JAVA_HOME variable to installation of JDK 1.7 or JDK 1.8.
-    echo You can also download latest JDK at http://java.com/download.
-goto error_finish
-
-:checkJdkVersion
-"%JAVA_HOME%\bin\java.exe" -version 2>&1 | findstr "1\.[78]\." > nul
-if %ERRORLEVEL% equ 0 goto checkGridGainHome1
-    echo %0, ERROR:
-    echo The version of JAVA installed in %JAVA_HOME% is incorrect.
-    echo Please point JAVA_HOME variable to installation of JDK 1.7 or JDK 1.8.
-    echo You can also download latest JDK at http://java.com/download.
-goto error_finish
-
-:: Check IGNITE_HOME.
-:checkGridGainHome1
-if defined IGNITE_HOME goto checkGridGainHome2
-    pushd "%~dp0"/..
-    set IGNITE_HOME=%CD%
-    popd
-
-:checkGridGainHome2
-:: Strip double quotes from IGNITE_HOME
-set IGNITE_HOME=%IGNITE_HOME:"=%
-
-:: remove all trailing slashes from IGNITE_HOME.
-if %IGNITE_HOME:~-1,1% == \ goto removeTrailingSlash
-if %IGNITE_HOME:~-1,1% == / goto removeTrailingSlash
-goto checkGridGainHome3
-
-:removeTrailingSlash
-set IGNITE_HOME=%IGNITE_HOME:~0,-1%
-goto checkGridGainHome2
-
-:checkGridGainHome3
-if exist "%IGNITE_HOME%\config" goto checkGridGainHome4
-    echo %0, ERROR: GridGain installation folder is not found or IGNITE_HOME environment variable is not valid.
-    echo Please create IGNITE_HOME environment variable pointing to location of
-    echo GridGain installation folder.
-    goto error_finish
-
-:checkGridGainHome4
-
-::
-:: Set SCRIPTS_HOME - base path to scripts.
-::
-set SCRIPTS_HOME=%IGNITE_HOME%\bin
-
-:: Remove trailing spaces
-for /l %%a in (1,1,31) do if /i "%SCRIPTS_HOME:~-1%" == " " set SCRIPTS_HOME=%SCRIPTS_HOME:~0,-1%
-
-if /i "%SCRIPTS_HOME%\" == "%~dp0" goto setProgName
-    echo %0, WARN: IGNITE_HOME environment variable may be pointing to wrong folder: %IGNITE_HOME%
-
-:setProgName
-::
-:: Set program name.
-::
-set PROG_NAME=ggstart.bat
-if "%OS%" == "Windows_NT" set PROG_NAME=%~nx0%
-
-:run
-
-::
-:: Set IGNITE_LIBS
-::
-call "%SCRIPTS_HOME%\include\setenv.bat"
-call "%SCRIPTS_HOME%\include\target-classpath.bat" &:: Will be removed in release.
-set CP=%IGNITE_LIBS%
-
-::
-:: Parse command line parameters.
-::
-if not defined DEFAULT_CONFIG set "DEFAULT_CONFIG=config\default-config.xml"
-call "%SCRIPTS_HOME%\include\parseargs.bat" %*
-if %ERRORLEVEL% neq 0 (
-    echo Arguments parsing failed
-    exit /b %ERRORLEVEL%
-)
-
-::
-:: Process 'restart'.
-::
-set RANDOM_NUMBER_COMMAND="%JAVA_HOME%\bin\java.exe" -cp %CP% org.apache.ignite.startup.cmdline.CommandLineRandomNumberGenerator
-for /f "usebackq tokens=*" %%i in (`"%RANDOM_NUMBER_COMMAND%"`) do set RANDOM_NUMBER=%%i
-
-set RESTART_SUCCESS_FILE="%IGNITE_HOME%\work\ignite_success_%RANDOM_NUMBER%"
-set RESTART_SUCCESS_OPT=-DIGNITE_SUCCESS_FILE=%RESTART_SUCCESS_FILE%
-
-::
-:: Find available port for JMX
-::
-:: You can specify IGNITE_JMX_PORT environment variable for overriding automatically found JMX port
-::
-for /F "tokens=*" %%A in ('""%JAVA_HOME%\bin\java" -cp %CP% org.gridgain.grid.util.portscanner.GridJmxPortFinder"') do (
-    set JMX_PORT=%%A
-)
-
-::
-:: This variable defines necessary parameters for JMX
-:: monitoring and management.
-::
-:: This enables remote unsecure access to JConsole or VisualVM.
-::
-:: ADD YOUR ADDITIONAL PARAMETERS/OPTIONS HERE
-::
-if "%JMX_PORT%" == "" (
-    echo %0, WARN: Failed to resolve JMX host. JMX will be disabled.
-    set JMX_MON=
-) else (
-    set JMX_MON=-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=%JMX_PORT% ^
-    -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false
-)
-
-::
-:: JVM options. See http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp for more details.
-::
-:: ADD YOUR/CHANGE ADDITIONAL OPTIONS HERE
-::
-if "%JVM_OPTS%" == "" set JVM_OPTS=-Xms1g -Xmx1g -server -XX:+AggressiveOpts -XX:MaxPermSize=256m
-
-::
-:: Uncomment the following GC settings if you see spikes in your throughput due to Garbage Collection.
-::
-:: set JVM_OPTS=%JVM_OPTS% -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+UseTLAB -XX:NewSize=128m -XX:MaxNewSize=128m
-:: set JVM_OPTS=%JVM_OPTS% -XX:MaxTenuringThreshold=0 -XX:SurvivorRatio=1024 -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=60
-
-::
-:: Uncomment if you get StackOverflowError.
-:: On 64 bit systems this value can be larger, e.g. -Xss16m
-::
-:: set JVM_OPTS=%JVM_OPTS% -Xss4m
-
-::
-:: Uncomment to set preference to IPv4 stack.
-::
-:: set JVM_OPTS=%JVM_OPTS% -Djava.net.preferIPv4Stack=true
-
-::
-:: Assertions are disabled by default since version 3.5.
-:: If you want to enable them - set 'ENABLE_ASSERTIONS' flag to '1'.
-::
-set ENABLE_ASSERTIONS=1
-
-::
-:: Set '-ea' options if assertions are enabled.
-::
-if %ENABLE_ASSERTIONS% == 1 set JVM_OPTS=%JVM_OPTS% -ea
-
-:run_java
-
-::
-:: Set main class to start service (grid node by default).
-::
-
-if "%MAIN_CLASS%" == "" set MAIN_CLASS=org.apache.ignite.startup.cmdline.CommandLineStartup
-
-::
-:: Remote debugging (JPDA).
-:: Uncomment and change if remote debugging is required.
-:: set JVM_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n %JVM_OPTS%
-::
-
-if "%INTERACTIVE%" == "1" (
-    "%JAVA_HOME%\bin\java.exe" %JVM_OPTS% %QUIET% %RESTART_SUCCESS_OPT% %JMX_MON% ^
-    -DIGNITE_UPDATE_NOTIFIER=false -DIGNITE_HOME="%IGNITE_HOME%" -DIGNITE_PROG_NAME="%PROG_NAME%" %JVM_XOPTS% ^
-    -cp "%CP%" %MAIN_CLASS%
-) else (
-    "%JAVA_HOME%\bin\java.exe" %JVM_OPTS% %QUIET% %RESTART_SUCCESS_OPT% %JMX_MON% ^
-    -DIGNITE_UPDATE_NOTIFIER=false -DIGNITE_HOME="%IGNITE_HOME%" -DIGNITE_PROG_NAME="%PROG_NAME%" %JVM_XOPTS% ^
-    -cp "%CP%" %MAIN_CLASS% "%CONFIG%"
-)
-
-set JAVA_ERRORLEVEL=%ERRORLEVEL%
-
-:: errorlevel 130 if aborted with Ctrl+c
-if %JAVA_ERRORLEVEL%==130 goto finish
-
-:: Exit if first run unsuccessful (Loader must create file).
-if not exist %RESTART_SUCCESS_FILE% goto error_finish
-del %RESTART_SUCCESS_FILE%
-
-goto run_java
-
-:finish
-if not exist %RESTART_SUCCESS_FILE% goto error_finish
-del %RESTART_SUCCESS_FILE%
-
-:error_finish
-
-if not "%NO_PAUSE%" == "1" pause
-
-goto :eof

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/bin/ggstart.sh
----------------------------------------------------------------------
diff --git a/bin/ggstart.sh b/bin/ggstart.sh
deleted file mode 100755
index 4e2f37c..0000000
--- a/bin/ggstart.sh
+++ /dev/null
@@ -1,176 +0,0 @@
-#!/bin/bash
-#  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.
-
-#
-# Grid command line loader.
-#
-
-#
-# Import common functions.
-#
-if [ "${IGNITE_HOME}" = "" ];
-    then IGNITE_HOME_TMP="$(dirname "$(cd "$(dirname "$0")"; "pwd")")";
-    else IGNITE_HOME_TMP=${IGNITE_HOME};
-fi
-
-#
-# Set SCRIPTS_HOME - base path to scripts.
-#
-SCRIPTS_HOME="${IGNITE_HOME_TMP}/bin"
-
-source "${SCRIPTS_HOME}"/include/functions.sh
-
-#
-# Discover path to Java executable and check it's version.
-#
-checkJava
-
-#
-# Discover IGNITE_HOME environment variable.
-#
-setGridGainHome
-
-if [ "${DEFAULT_CONFIG}" == "" ]; then
-    DEFAULT_CONFIG=config/default-config.xml
-fi
-
-#
-# Parse command line parameters.
-#
-. "${SCRIPTS_HOME}"/include/parseargs.sh
-
-#
-# Set IGNITE_LIBS.
-#
-. "${SCRIPTS_HOME}"/include/setenv.sh
-. "${SCRIPTS_HOME}"/include/target-classpath.sh # Will be removed in release.
-CP="${IGNITE_LIBS}"
-
-RANDOM_NUMBER=$("$JAVA" -cp "${CP}" org.apache.ignite.startup.cmdline.CommandLineRandomNumberGenerator)
-
-RESTART_SUCCESS_FILE="${IGNITE_HOME}/work/ignite_success_${RANDOM_NUMBER}"
-RESTART_SUCCESS_OPT="-DIGNITE_SUCCESS_FILE=${RESTART_SUCCESS_FILE}"
-
-#
-# Find available port for JMX
-#
-# You can specify IGNITE_JMX_PORT environment variable for overriding automatically found JMX port
-#
-findAvailableJmxPort
-
-# Mac OS specific support to display correct name in the dock.
-osname=`uname`
-
-if [ "${DOCK_OPTS}" == "" ]; then
-    DOCK_OPTS="-Xdock:name=GridGain Node"
-fi
-
-#
-# JVM options. See http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp for more details.
-#
-# ADD YOUR/CHANGE ADDITIONAL OPTIONS HERE
-#
-if [ -z "$JVM_OPTS" ] ; then
-    JVM_OPTS="-Xms1g -Xmx1g -server -XX:+AggressiveOpts -XX:MaxPermSize=256m"
-fi
-
-#
-# Uncomment the following GC settings if you see spikes in your throughput due to Garbage Collection.
-#
-# JVM_OPTS="$JVM_OPTS -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+UseTLAB -XX:NewSize=128m -XX:MaxNewSize=128m"
-# JVM_OPTS="$JVM_OPTS -XX:MaxTenuringThreshold=0 -XX:SurvivorRatio=1024 -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=60"
-
-#
-# Uncomment if you get StackOverflowError.
-# On 64 bit systems this value can be larger, e.g. -Xss16m
-#
-# JVM_OPTS="${JVM_OPTS} -Xss4m"
-
-#
-# Uncomment to set preference for IPv4 stack.
-#
-# JVM_OPTS="${JVM_OPTS} -Djava.net.preferIPv4Stack=true"
-
-#
-# Assertions are disabled by default since version 3.5.
-# If you want to enable them - set 'ENABLE_ASSERTIONS' flag to '1'.
-#
-ENABLE_ASSERTIONS="1"
-
-#
-# Set '-ea' options if assertions are enabled.
-#
-if [ "${ENABLE_ASSERTIONS}" = "1" ]; then
-    JVM_OPTS="${JVM_OPTS} -ea"
-fi
-
-#
-# Set main class to start service (grid node by default).
-#
-if [ "${MAIN_CLASS}" = "" ]; then
-    MAIN_CLASS=org.apache.ignite.startup.cmdline.CommandLineStartup
-fi
-
-#
-# Remote debugging (JPDA).
-# Uncomment and change if remote debugging is required.
-#
-# JVM_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n ${JVM_OPTS}"
-
-ERRORCODE="-1"
-
-while [ "${ERRORCODE}" -ne "130" ]
-do
-    if [ "${INTERACTIVE}" == "1" ] ; then
-        case $osname in
-            Darwin*)
-                "$JAVA" ${JVM_OPTS} ${QUIET} "${DOCK_OPTS}" "${RESTART_SUCCESS_OPT}" ${JMX_MON} \
-                -DIGNITE_UPDATE_NOTIFIER=false -DIGNITE_HOME="${IGNITE_HOME}" \
-                -DIGNITE_PROG_NAME="$0" ${JVM_XOPTS} -cp "${CP}" ${MAIN_CLASS}
-            ;;
-            *)
-                "$JAVA" ${JVM_OPTS} ${QUIET} "${RESTART_SUCCESS_OPT}" ${JMX_MON} \
-                -DIGNITE_UPDATE_NOTIFIER=false -DIGNITE_HOME="${IGNITE_HOME}" \
-                -DIGNITE_PROG_NAME="$0" ${JVM_XOPTS} -cp "${CP}" ${MAIN_CLASS}
-            ;;
-        esac
-    else
-        case $osname in
-            Darwin*)
-                "$JAVA" ${JVM_OPTS} ${QUIET} "${DOCK_OPTS}" "${RESTART_SUCCESS_OPT}" ${JMX_MON} \
-                 -DIGNITE_UPDATE_NOTIFIER=false -DIGNITE_HOME="${IGNITE_HOME}" \
-                 -DIGNITE_PROG_NAME="$0" ${JVM_XOPTS} -cp "${CP}" ${MAIN_CLASS} "${CONFIG}"
-            ;;
-            *)
-                "$JAVA" ${JVM_OPTS} ${QUIET} "${RESTART_SUCCESS_OPT}" ${JMX_MON} \
-                 -DIGNITE_UPDATE_NOTIFIER=false -DIGNITE_HOME="${IGNITE_HOME}" \
-                 -DIGNITE_PROG_NAME="$0" ${JVM_XOPTS} -cp "${CP}" ${MAIN_CLASS} "${CONFIG}"
-            ;;
-        esac
-    fi
-
-    ERRORCODE="$?"
-
-    if [ ! -f "${RESTART_SUCCESS_FILE}" ] ; then
-        break
-    else
-        rm -f "${RESTART_SUCCESS_FILE}"
-    fi
-done
-
-if [ -f "${RESTART_SUCCESS_FILE}" ] ; then
-    rm -f "${RESTART_SUCCESS_FILE}"
-fi

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/bin/ggvisorcmd.bat
----------------------------------------------------------------------
diff --git a/bin/ggvisorcmd.bat b/bin/ggvisorcmd.bat
deleted file mode 100644
index c4c64f9..0000000
--- a/bin/ggvisorcmd.bat
+++ /dev/null
@@ -1,144 +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.
-
-::
-:: Starts GridGain Visor Console.
-::
-
-@echo off
-
-if "%OS%" == "Windows_NT"  setlocal
-
-:: Check JAVA_HOME.
-if not "%JAVA_HOME%" == "" goto checkJdk
-    echo %0, ERROR: JAVA_HOME environment variable is not found.
-    echo %0, ERROR: Please create JAVA_HOME variable pointing to location of JDK 1.7 or JDK 1.8.
-    echo %0, ERROR: You can also download latest JDK at: http://java.sun.com/getjava
-goto error_finish
-
-:checkJdk
-:: Check that JDK is where it should be.
-if exist "%JAVA_HOME%\bin\java.exe" goto checkJdkVersion
-    echo %0, ERROR: The JDK is not found in %JAVA_HOME%.
-    echo %0, ERROR: Please modify your script so that JAVA_HOME would point to valid location of JDK.
-goto error_finish
-
-:checkJdkVersion
-"%JAVA_HOME%\bin\java.exe" -version 2>&1 | findstr "1\.[78]\." > nul
-if %ERRORLEVEL% equ 0 goto checkGridGainHome1
-    echo %0, ERROR: The version of JAVA installed in %JAVA_HOME% is incorrect.
-    echo %0, ERROR: Please install JDK 1.7 or 1.8.
-    echo %0, ERROR: You can also download latest JDK at: http://java.sun.com/getjava
-goto error_finish
-
-:: Check IGNITE_HOME.
-:checkGridGainHome1
-if not "%IGNITE_HOME%" == "" goto checkGridGainHome2
-    pushd "%~dp0"/..
-    set IGNITE_HOME=%CD%
-    popd
-
-:checkGridGainHome2
-:: Strip double quotes from IGNITE_HOME
-set IGNITE_HOME=%IGNITE_HOME:"=%
-
-:: remove all trailing slashes from IGNITE_HOME.
-if %IGNITE_HOME:~-1,1% == \ goto removeTrailingSlash
-if %IGNITE_HOME:~-1,1% == / goto removeTrailingSlash
-goto checkGridGainHome3
-
-:removeTrailingSlash
-set IGNITE_HOME=%IGNITE_HOME:~0,-1%
-goto checkGridGainHome2
-
-:checkGridGainHome3
-if exist "%IGNITE_HOME%\config" goto checkGridGainHome4
-    echo %0, ERROR: GridGain installation folder is not found or IGNITE_HOME environment variable is not valid.
-    echo Please create IGNITE_HOME environment variable pointing to location of
-    echo GridGain installation folder.
-    goto error_finish
-
-:checkGridGainHome4
-
-::
-:: Set SCRIPTS_HOME - base path to scripts.
-::
-set SCRIPTS_HOME=%IGNITE_HOME%\bin
-
-:: Remove trailing spaces
-for /l %%a in (1,1,31) do if /i "%SCRIPTS_HOME:~-1%" == " " set SCRIPTS_HOME=%SCRIPTS_HOME:~0,-1%
-
-if /i "%SCRIPTS_HOME%\" == "%~dp0" goto run
-    echo %0, WARN: IGNITE_HOME environment variable may be pointing to wrong folder: %IGNITE_HOME%
-
-:run
-
-::
-:: Set IGNITE_LIBS
-::
-call "%SCRIPTS_HOME%\include\setenv.bat"
-call "%SCRIPTS_HOME%\include\target-classpath.bat" &:: Will be removed in release.
-set CP=%IGNITE_HOME%\bin\include\visor-common\*;%IGNITE_HOME%\bin\include\visorcmd\*;%IGNITE_LIBS%
-
-::
-:: Parse command line parameters.
-::
-call "%SCRIPTS_HOME%\include\parseargs.bat" %*
-if %ERRORLEVEL% neq 0 (
-    echo Arguments parsing failed
-    exit /b %ERRORLEVEL%
-)
-
-::
-:: Set program name.
-::
-set PROG_NAME=gridgain.bat
-if "%OS%" == "Windows_NT" set PROG_NAME=%~nx0%
-
-::
-:: JVM options. See http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp for more details.
-::
-:: ADD YOUR/CHANGE ADDITIONAL OPTIONS HERE
-::
-if "%JVM_OPTS_VISOR%" == "" set JVM_OPTS_VISOR=-Xms1g -Xmx1g -XX:MaxPermSize=128M
-
-::
-:: Uncomment to set preference to IPv4 stack.
-::
-:: set JVM_OPTS_VISOR=%JVM_OPTS_VISOR% -Djava.net.preferIPv4Stack=true
-
-::
-:: Assertions are disabled by default since version 3.5.
-:: If you want to enable them - set 'ENABLE_ASSERTIONS' flag to '1'.
-::
-set ENABLE_ASSERTIONS=1
-
-::
-:: Set '-ea' options if assertions are enabled.
-::
-if %ENABLE_ASSERTIONS% == 1 set JVM_OPTS_VISOR=%JVM_OPTS_VISOR% -ea
-
-::
-:: Starts Visor console.
-::
-"%JAVA_HOME%\bin\java.exe" %JVM_OPTS_VISOR% -DIGNITE_PROG_NAME="%PROG_NAME%" ^
--DIGNITE_DEPLOYMENT_MODE_OVERRIDE=ISOLATED %QUIET% %JVM_XOPTS% -cp "%CP%" ^
- org.gridgain.visor.commands.VisorConsole
-
-:error_finish
-
-if not "%NO_PAUSE%" == "1" pause
-
-goto :eof

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/bin/ggvisorcmd.sh
----------------------------------------------------------------------
diff --git a/bin/ggvisorcmd.sh b/bin/ggvisorcmd.sh
deleted file mode 100755
index 319d282..0000000
--- a/bin/ggvisorcmd.sh
+++ /dev/null
@@ -1,124 +0,0 @@
-#!/bin/bash
-#  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.
-
-#
-# Import common functions.
-#
-if [ "${IGNITE_HOME}" = "" ];
-    then IGNITE_HOME_TMP="$(dirname "$(cd "$(dirname "$0")"; "pwd")")";IGNITE_HOME_TMP="$(dirname "${IGNITE_HOME_TMP}")" # Will be removed in release.
-    else IGNITE_HOME_TMP=${IGNITE_HOME};
-fi
-
-#
-# Set SCRIPTS_HOME - base path to scripts.
-#
-SCRIPTS_HOME="${IGNITE_HOME_TMP}/bin"
-
-source "${SCRIPTS_HOME}"/include/functions.sh
-
-#
-# Discover path to Java executable and check it's version.
-#
-checkJava
-
-#
-# Discover IGNITE_HOME environment variable.
-#
-setGridGainHome
-
-#
-# Parse command line parameters.
-#
-. "${SCRIPTS_HOME}"/include/parseargs.sh
-
-#
-# Set IGNITE_LIBS.
-#
-. "${SCRIPTS_HOME}"/include/setenv.sh
-. "${SCRIPTS_HOME}"/include/target-classpath.sh # Will be removed in release.
-CP="${IGNITE_HOME}/bin/include/visor-common/*${SEP}${IGNITE_HOME}/bin/include/visorcmd/*${SEP}${IGNITE_LIBS}"
-
-#
-# JVM options. See http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp for more details.
-#
-# ADD YOUR/CHANGE ADDITIONAL OPTIONS HERE
-#
-JVM_OPTS="-Xms1g -Xmx1g -XX:MaxPermSize=128M -server ${JVM_OPTS}"
-
-# Mac OS specific support to display correct name in the dock.
-osname=`uname`
-
-if [ "${DOCK_OPTS}" == "" ]; then
-    DOCK_OPTS="-Xdock:name=Visor - GridGain Shell Console"
-fi
-
-#
-# Uncomment to set preference for IPv4 stack.
-#
-# JVM_OPTS="${JVM_OPTS} -Djava.net.preferIPv4Stack=true"
-
-#
-# Assertions are disabled by default since version 3.5.
-# If you want to enable them - set 'ENABLE_ASSERTIONS' flag to '1'.
-#
-ENABLE_ASSERTIONS="1"
-
-#
-# Set '-ea' options if assertions are enabled.
-#
-if [ "${ENABLE_ASSERTIONS}" = "1" ]; then
-    JVM_OPTS="${JVM_OPTS} -ea"
-fi
-
-#
-# Save terminal setting. Used to restore terminal on finish.
-#
-SAVED_STTY=`stty -g 2>/dev/null`
-
-#
-# Restores terminal.
-#
-function restoreSttySettings() {
-    stty ${SAVED_STTY}
-}
-
-#
-# Trap that restores terminal in case script execution is interrupted.
-#
-trap restoreSttySettings INT
-
-#
-# Start Visor console.
-#
-case $osname in
-    Darwin*)
-        "$JAVA" ${JVM_OPTS} ${QUIET} "${DOCK_OPTS}" \
-        -DIGNITE_UPDATE_NOTIFIER=false -DIGNITE_HOME="${IGNITE_HOME}" -DIGNITE_PROG_NAME="$0" \
-        -DIGNITE_DEPLOYMENT_MODE_OVERRIDE=ISOLATED ${JVM_XOPTS} -cp "${CP}" \
-        org.apache.ignite.visor.commands.VisorConsole
-    ;;
-    *)
-        "$JAVA" ${JVM_OPTS} ${QUIET} -DIGNITE_UPDATE_NOTIFIER=false \
-        -DIGNITE_HOME="${IGNITE_HOME}" -DIGNITE_PROG_NAME="$0" -DIGNITE_DEPLOYMENT_MODE_OVERRIDE=ISOLATED \
-        ${JVM_XOPTS} -cp "${CP}" \
-        org.apache.ignite.visor.commands.VisorConsole
-    ;;
-esac
-
-#
-# Restore terminal.
-#
-restoreSttySettings

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/bin/ignite.bat
----------------------------------------------------------------------
diff --git a/bin/ignite.bat b/bin/ignite.bat
new file mode 100644
index 0000000..d11dc1b
--- /dev/null
+++ b/bin/ignite.bat
@@ -0,0 +1,228 @@
+::  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.
+
+::
+:: Grid command line loader.
+::
+
+@echo off
+
+if "%OS%" == "Windows_NT"  setlocal
+
+:: Check JAVA_HOME.
+if defined JAVA_HOME  goto checkJdk
+    echo %0, ERROR:
+    echo JAVA_HOME environment variable is not found.
+    echo Please point JAVA_HOME variable to location of JDK 1.7 or JDK 1.8.
+    echo You can also download latest JDK at http://java.com/download.
+goto error_finish
+
+:checkJdk
+:: Check that JDK is where it should be.
+if exist "%JAVA_HOME%\bin\java.exe" goto checkJdkVersion
+    echo %0, ERROR:
+    echo JAVA is not found in JAVA_HOME=%JAVA_HOME%.
+    echo Please point JAVA_HOME variable to installation of JDK 1.7 or JDK 1.8.
+    echo You can also download latest JDK at http://java.com/download.
+goto error_finish
+
+:checkJdkVersion
+"%JAVA_HOME%\bin\java.exe" -version 2>&1 | findstr "1\.[78]\." > nul
+if %ERRORLEVEL% equ 0 goto checkGridGainHome1
+    echo %0, ERROR:
+    echo The version of JAVA installed in %JAVA_HOME% is incorrect.
+    echo Please point JAVA_HOME variable to installation of JDK 1.7 or JDK 1.8.
+    echo You can also download latest JDK at http://java.com/download.
+goto error_finish
+
+:: Check IGNITE_HOME.
+:checkGridGainHome1
+if defined IGNITE_HOME goto checkGridGainHome2
+    pushd "%~dp0"/..
+    set IGNITE_HOME=%CD%
+    popd
+
+:checkGridGainHome2
+:: Strip double quotes from IGNITE_HOME
+set IGNITE_HOME=%IGNITE_HOME:"=%
+
+:: remove all trailing slashes from IGNITE_HOME.
+if %IGNITE_HOME:~-1,1% == \ goto removeTrailingSlash
+if %IGNITE_HOME:~-1,1% == / goto removeTrailingSlash
+goto checkGridGainHome3
+
+:removeTrailingSlash
+set IGNITE_HOME=%IGNITE_HOME:~0,-1%
+goto checkGridGainHome2
+
+:checkGridGainHome3
+if exist "%IGNITE_HOME%\config" goto checkGridGainHome4
+    echo %0, ERROR: GridGain installation folder is not found or IGNITE_HOME environment variable is not valid.
+    echo Please create IGNITE_HOME environment variable pointing to location of
+    echo GridGain installation folder.
+    goto error_finish
+
+:checkGridGainHome4
+
+::
+:: Set SCRIPTS_HOME - base path to scripts.
+::
+set SCRIPTS_HOME=%IGNITE_HOME%\bin
+
+:: Remove trailing spaces
+for /l %%a in (1,1,31) do if /i "%SCRIPTS_HOME:~-1%" == " " set SCRIPTS_HOME=%SCRIPTS_HOME:~0,-1%
+
+if /i "%SCRIPTS_HOME%\" == "%~dp0" goto setProgName
+    echo %0, WARN: IGNITE_HOME environment variable may be pointing to wrong folder: %IGNITE_HOME%
+
+:setProgName
+::
+:: Set program name.
+::
+set PROG_NAME=ignite.bat
+if "%OS%" == "Windows_NT" set PROG_NAME=%~nx0%
+
+:run
+
+::
+:: Set IGNITE_LIBS
+::
+call "%SCRIPTS_HOME%\include\setenv.bat"
+call "%SCRIPTS_HOME%\include\target-classpath.bat" &:: Will be removed in release.
+set CP=%IGNITE_LIBS%
+
+::
+:: Parse command line parameters.
+::
+if not defined DEFAULT_CONFIG set "DEFAULT_CONFIG=config\default-config.xml"
+call "%SCRIPTS_HOME%\include\parseargs.bat" %*
+if %ERRORLEVEL% neq 0 (
+    echo Arguments parsing failed
+    exit /b %ERRORLEVEL%
+)
+
+::
+:: Process 'restart'.
+::
+set RANDOM_NUMBER_COMMAND="%JAVA_HOME%\bin\java.exe" -cp %CP% org.apache.ignite.startup.cmdline.CommandLineRandomNumberGenerator
+for /f "usebackq tokens=*" %%i in (`"%RANDOM_NUMBER_COMMAND%"`) do set RANDOM_NUMBER=%%i
+
+set RESTART_SUCCESS_FILE="%IGNITE_HOME%\work\ignite_success_%RANDOM_NUMBER%"
+set RESTART_SUCCESS_OPT=-DIGNITE_SUCCESS_FILE=%RESTART_SUCCESS_FILE%
+
+::
+:: Find available port for JMX
+::
+:: You can specify IGNITE_JMX_PORT environment variable for overriding automatically found JMX port
+::
+for /F "tokens=*" %%A in ('""%JAVA_HOME%\bin\java" -cp %CP% org.gridgain.grid.util.portscanner.GridJmxPortFinder"') do (
+    set JMX_PORT=%%A
+)
+
+::
+:: This variable defines necessary parameters for JMX
+:: monitoring and management.
+::
+:: This enables remote unsecure access to JConsole or VisualVM.
+::
+:: ADD YOUR ADDITIONAL PARAMETERS/OPTIONS HERE
+::
+if "%JMX_PORT%" == "" (
+    echo %0, WARN: Failed to resolve JMX host. JMX will be disabled.
+    set JMX_MON=
+) else (
+    set JMX_MON=-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=%JMX_PORT% ^
+    -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false
+)
+
+::
+:: JVM options. See http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp for more details.
+::
+:: ADD YOUR/CHANGE ADDITIONAL OPTIONS HERE
+::
+if "%JVM_OPTS%" == "" set JVM_OPTS=-Xms1g -Xmx1g -server -XX:+AggressiveOpts -XX:MaxPermSize=256m
+
+::
+:: Uncomment the following GC settings if you see spikes in your throughput due to Garbage Collection.
+::
+:: set JVM_OPTS=%JVM_OPTS% -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+UseTLAB -XX:NewSize=128m -XX:MaxNewSize=128m
+:: set JVM_OPTS=%JVM_OPTS% -XX:MaxTenuringThreshold=0 -XX:SurvivorRatio=1024 -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=60
+
+::
+:: Uncomment if you get StackOverflowError.
+:: On 64 bit systems this value can be larger, e.g. -Xss16m
+::
+:: set JVM_OPTS=%JVM_OPTS% -Xss4m
+
+::
+:: Uncomment to set preference to IPv4 stack.
+::
+:: set JVM_OPTS=%JVM_OPTS% -Djava.net.preferIPv4Stack=true
+
+::
+:: Assertions are disabled by default since version 3.5.
+:: If you want to enable them - set 'ENABLE_ASSERTIONS' flag to '1'.
+::
+set ENABLE_ASSERTIONS=1
+
+::
+:: Set '-ea' options if assertions are enabled.
+::
+if %ENABLE_ASSERTIONS% == 1 set JVM_OPTS=%JVM_OPTS% -ea
+
+:run_java
+
+::
+:: Set main class to start service (grid node by default).
+::
+
+if "%MAIN_CLASS%" == "" set MAIN_CLASS=org.apache.ignite.startup.cmdline.CommandLineStartup
+
+::
+:: Remote debugging (JPDA).
+:: Uncomment and change if remote debugging is required.
+:: set JVM_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n %JVM_OPTS%
+::
+
+if "%INTERACTIVE%" == "1" (
+    "%JAVA_HOME%\bin\java.exe" %JVM_OPTS% %QUIET% %RESTART_SUCCESS_OPT% %JMX_MON% ^
+    -DIGNITE_UPDATE_NOTIFIER=false -DIGNITE_HOME="%IGNITE_HOME%" -DIGNITE_PROG_NAME="%PROG_NAME%" %JVM_XOPTS% ^
+    -cp "%CP%" %MAIN_CLASS%
+) else (
+    "%JAVA_HOME%\bin\java.exe" %JVM_OPTS% %QUIET% %RESTART_SUCCESS_OPT% %JMX_MON% ^
+    -DIGNITE_UPDATE_NOTIFIER=false -DIGNITE_HOME="%IGNITE_HOME%" -DIGNITE_PROG_NAME="%PROG_NAME%" %JVM_XOPTS% ^
+    -cp "%CP%" %MAIN_CLASS% "%CONFIG%"
+)
+
+set JAVA_ERRORLEVEL=%ERRORLEVEL%
+
+:: errorlevel 130 if aborted with Ctrl+c
+if %JAVA_ERRORLEVEL%==130 goto finish
+
+:: Exit if first run unsuccessful (Loader must create file).
+if not exist %RESTART_SUCCESS_FILE% goto error_finish
+del %RESTART_SUCCESS_FILE%
+
+goto run_java
+
+:finish
+if not exist %RESTART_SUCCESS_FILE% goto error_finish
+del %RESTART_SUCCESS_FILE%
+
+:error_finish
+
+if not "%NO_PAUSE%" == "1" pause
+
+goto :eof

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/bin/ignite.sh
----------------------------------------------------------------------
diff --git a/bin/ignite.sh b/bin/ignite.sh
new file mode 100644
index 0000000..4e2f37c
--- /dev/null
+++ b/bin/ignite.sh
@@ -0,0 +1,176 @@
+#!/bin/bash
+#  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.
+
+#
+# Grid command line loader.
+#
+
+#
+# Import common functions.
+#
+if [ "${IGNITE_HOME}" = "" ];
+    then IGNITE_HOME_TMP="$(dirname "$(cd "$(dirname "$0")"; "pwd")")";
+    else IGNITE_HOME_TMP=${IGNITE_HOME};
+fi
+
+#
+# Set SCRIPTS_HOME - base path to scripts.
+#
+SCRIPTS_HOME="${IGNITE_HOME_TMP}/bin"
+
+source "${SCRIPTS_HOME}"/include/functions.sh
+
+#
+# Discover path to Java executable and check it's version.
+#
+checkJava
+
+#
+# Discover IGNITE_HOME environment variable.
+#
+setGridGainHome
+
+if [ "${DEFAULT_CONFIG}" == "" ]; then
+    DEFAULT_CONFIG=config/default-config.xml
+fi
+
+#
+# Parse command line parameters.
+#
+. "${SCRIPTS_HOME}"/include/parseargs.sh
+
+#
+# Set IGNITE_LIBS.
+#
+. "${SCRIPTS_HOME}"/include/setenv.sh
+. "${SCRIPTS_HOME}"/include/target-classpath.sh # Will be removed in release.
+CP="${IGNITE_LIBS}"
+
+RANDOM_NUMBER=$("$JAVA" -cp "${CP}" org.apache.ignite.startup.cmdline.CommandLineRandomNumberGenerator)
+
+RESTART_SUCCESS_FILE="${IGNITE_HOME}/work/ignite_success_${RANDOM_NUMBER}"
+RESTART_SUCCESS_OPT="-DIGNITE_SUCCESS_FILE=${RESTART_SUCCESS_FILE}"
+
+#
+# Find available port for JMX
+#
+# You can specify IGNITE_JMX_PORT environment variable for overriding automatically found JMX port
+#
+findAvailableJmxPort
+
+# Mac OS specific support to display correct name in the dock.
+osname=`uname`
+
+if [ "${DOCK_OPTS}" == "" ]; then
+    DOCK_OPTS="-Xdock:name=GridGain Node"
+fi
+
+#
+# JVM options. See http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp for more details.
+#
+# ADD YOUR/CHANGE ADDITIONAL OPTIONS HERE
+#
+if [ -z "$JVM_OPTS" ] ; then
+    JVM_OPTS="-Xms1g -Xmx1g -server -XX:+AggressiveOpts -XX:MaxPermSize=256m"
+fi
+
+#
+# Uncomment the following GC settings if you see spikes in your throughput due to Garbage Collection.
+#
+# JVM_OPTS="$JVM_OPTS -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+UseTLAB -XX:NewSize=128m -XX:MaxNewSize=128m"
+# JVM_OPTS="$JVM_OPTS -XX:MaxTenuringThreshold=0 -XX:SurvivorRatio=1024 -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=60"
+
+#
+# Uncomment if you get StackOverflowError.
+# On 64 bit systems this value can be larger, e.g. -Xss16m
+#
+# JVM_OPTS="${JVM_OPTS} -Xss4m"
+
+#
+# Uncomment to set preference for IPv4 stack.
+#
+# JVM_OPTS="${JVM_OPTS} -Djava.net.preferIPv4Stack=true"
+
+#
+# Assertions are disabled by default since version 3.5.
+# If you want to enable them - set 'ENABLE_ASSERTIONS' flag to '1'.
+#
+ENABLE_ASSERTIONS="1"
+
+#
+# Set '-ea' options if assertions are enabled.
+#
+if [ "${ENABLE_ASSERTIONS}" = "1" ]; then
+    JVM_OPTS="${JVM_OPTS} -ea"
+fi
+
+#
+# Set main class to start service (grid node by default).
+#
+if [ "${MAIN_CLASS}" = "" ]; then
+    MAIN_CLASS=org.apache.ignite.startup.cmdline.CommandLineStartup
+fi
+
+#
+# Remote debugging (JPDA).
+# Uncomment and change if remote debugging is required.
+#
+# JVM_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n ${JVM_OPTS}"
+
+ERRORCODE="-1"
+
+while [ "${ERRORCODE}" -ne "130" ]
+do
+    if [ "${INTERACTIVE}" == "1" ] ; then
+        case $osname in
+            Darwin*)
+                "$JAVA" ${JVM_OPTS} ${QUIET} "${DOCK_OPTS}" "${RESTART_SUCCESS_OPT}" ${JMX_MON} \
+                -DIGNITE_UPDATE_NOTIFIER=false -DIGNITE_HOME="${IGNITE_HOME}" \
+                -DIGNITE_PROG_NAME="$0" ${JVM_XOPTS} -cp "${CP}" ${MAIN_CLASS}
+            ;;
+            *)
+                "$JAVA" ${JVM_OPTS} ${QUIET} "${RESTART_SUCCESS_OPT}" ${JMX_MON} \
+                -DIGNITE_UPDATE_NOTIFIER=false -DIGNITE_HOME="${IGNITE_HOME}" \
+                -DIGNITE_PROG_NAME="$0" ${JVM_XOPTS} -cp "${CP}" ${MAIN_CLASS}
+            ;;
+        esac
+    else
+        case $osname in
+            Darwin*)
+                "$JAVA" ${JVM_OPTS} ${QUIET} "${DOCK_OPTS}" "${RESTART_SUCCESS_OPT}" ${JMX_MON} \
+                 -DIGNITE_UPDATE_NOTIFIER=false -DIGNITE_HOME="${IGNITE_HOME}" \
+                 -DIGNITE_PROG_NAME="$0" ${JVM_XOPTS} -cp "${CP}" ${MAIN_CLASS} "${CONFIG}"
+            ;;
+            *)
+                "$JAVA" ${JVM_OPTS} ${QUIET} "${RESTART_SUCCESS_OPT}" ${JMX_MON} \
+                 -DIGNITE_UPDATE_NOTIFIER=false -DIGNITE_HOME="${IGNITE_HOME}" \
+                 -DIGNITE_PROG_NAME="$0" ${JVM_XOPTS} -cp "${CP}" ${MAIN_CLASS} "${CONFIG}"
+            ;;
+        esac
+    fi
+
+    ERRORCODE="$?"
+
+    if [ ! -f "${RESTART_SUCCESS_FILE}" ] ; then
+        break
+    else
+        rm -f "${RESTART_SUCCESS_FILE}"
+    fi
+done
+
+if [ -f "${RESTART_SUCCESS_FILE}" ] ; then
+    rm -f "${RESTART_SUCCESS_FILE}"
+fi

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/bin/igniterouter.bat
----------------------------------------------------------------------
diff --git a/bin/igniterouter.bat b/bin/igniterouter.bat
new file mode 100644
index 0000000..36f1fae
--- /dev/null
+++ b/bin/igniterouter.bat
@@ -0,0 +1,33 @@
+::  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.
+
+::
+:: Grid router command line loader.
+::
+
+@echo off
+
+if "%OS%" == "Windows_NT" setlocal
+
+::
+:: Set router service environment.
+::
+set "DEFAULT_CONFIG=config\router\default-router.xml"
+set MAIN_CLASS=org.gridgain.client.router.impl.GridRouterCommandLineStartup
+
+::
+:: Start router service.
+::
+call "%~dp0\ignite.bat" %*

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/bin/igniterouter.sh
----------------------------------------------------------------------
diff --git a/bin/igniterouter.sh b/bin/igniterouter.sh
new file mode 100644
index 0000000..b75aec3
--- /dev/null
+++ b/bin/igniterouter.sh
@@ -0,0 +1,50 @@
+#!/bin/bash
+#  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.
+
+#
+# Router command line loader.
+#
+
+#
+# Import common functions.
+#
+if [ "${IGNITE_HOME}" = "" ];
+    then IGNITE_HOME_TMP="$(dirname "$(cd "$(dirname "$0")"; "pwd")")";IGNITE_HOME_TMP="$(dirname "${IGNITE_HOME_TMP}")" # Will be removed in release.
+    else IGNITE_HOME_TMP=${IGNITE_HOME};
+fi
+
+#
+# Set SCRIPTS_HOME - base path to scripts.
+#
+SCRIPTS_HOME="${IGNITE_HOME_TMP}/bin"
+
+source "${SCRIPTS_HOME}"/include/functions.sh
+
+#
+# Discover IGNITE_HOME environment variable.
+#
+setGridGainHome
+
+#
+# Set router service environment.
+#
+export DEFAULT_CONFIG=config/router/default-router.xml
+export MAIN_CLASS=org.gridgain.client.router.impl.GridRouterCommandLineStartup
+
+#
+# Start router service.
+#
+. "${SCRIPTS_HOME}"/ignite.sh $@

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/bin/ignitevisorcmd.bat
----------------------------------------------------------------------
diff --git a/bin/ignitevisorcmd.bat b/bin/ignitevisorcmd.bat
new file mode 100644
index 0000000..c4c64f9
--- /dev/null
+++ b/bin/ignitevisorcmd.bat
@@ -0,0 +1,144 @@
+::  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.
+
+::
+:: Starts GridGain Visor Console.
+::
+
+@echo off
+
+if "%OS%" == "Windows_NT"  setlocal
+
+:: Check JAVA_HOME.
+if not "%JAVA_HOME%" == "" goto checkJdk
+    echo %0, ERROR: JAVA_HOME environment variable is not found.
+    echo %0, ERROR: Please create JAVA_HOME variable pointing to location of JDK 1.7 or JDK 1.8.
+    echo %0, ERROR: You can also download latest JDK at: http://java.sun.com/getjava
+goto error_finish
+
+:checkJdk
+:: Check that JDK is where it should be.
+if exist "%JAVA_HOME%\bin\java.exe" goto checkJdkVersion
+    echo %0, ERROR: The JDK is not found in %JAVA_HOME%.
+    echo %0, ERROR: Please modify your script so that JAVA_HOME would point to valid location of JDK.
+goto error_finish
+
+:checkJdkVersion
+"%JAVA_HOME%\bin\java.exe" -version 2>&1 | findstr "1\.[78]\." > nul
+if %ERRORLEVEL% equ 0 goto checkGridGainHome1
+    echo %0, ERROR: The version of JAVA installed in %JAVA_HOME% is incorrect.
+    echo %0, ERROR: Please install JDK 1.7 or 1.8.
+    echo %0, ERROR: You can also download latest JDK at: http://java.sun.com/getjava
+goto error_finish
+
+:: Check IGNITE_HOME.
+:checkGridGainHome1
+if not "%IGNITE_HOME%" == "" goto checkGridGainHome2
+    pushd "%~dp0"/..
+    set IGNITE_HOME=%CD%
+    popd
+
+:checkGridGainHome2
+:: Strip double quotes from IGNITE_HOME
+set IGNITE_HOME=%IGNITE_HOME:"=%
+
+:: remove all trailing slashes from IGNITE_HOME.
+if %IGNITE_HOME:~-1,1% == \ goto removeTrailingSlash
+if %IGNITE_HOME:~-1,1% == / goto removeTrailingSlash
+goto checkGridGainHome3
+
+:removeTrailingSlash
+set IGNITE_HOME=%IGNITE_HOME:~0,-1%
+goto checkGridGainHome2
+
+:checkGridGainHome3
+if exist "%IGNITE_HOME%\config" goto checkGridGainHome4
+    echo %0, ERROR: GridGain installation folder is not found or IGNITE_HOME environment variable is not valid.
+    echo Please create IGNITE_HOME environment variable pointing to location of
+    echo GridGain installation folder.
+    goto error_finish
+
+:checkGridGainHome4
+
+::
+:: Set SCRIPTS_HOME - base path to scripts.
+::
+set SCRIPTS_HOME=%IGNITE_HOME%\bin
+
+:: Remove trailing spaces
+for /l %%a in (1,1,31) do if /i "%SCRIPTS_HOME:~-1%" == " " set SCRIPTS_HOME=%SCRIPTS_HOME:~0,-1%
+
+if /i "%SCRIPTS_HOME%\" == "%~dp0" goto run
+    echo %0, WARN: IGNITE_HOME environment variable may be pointing to wrong folder: %IGNITE_HOME%
+
+:run
+
+::
+:: Set IGNITE_LIBS
+::
+call "%SCRIPTS_HOME%\include\setenv.bat"
+call "%SCRIPTS_HOME%\include\target-classpath.bat" &:: Will be removed in release.
+set CP=%IGNITE_HOME%\bin\include\visor-common\*;%IGNITE_HOME%\bin\include\visorcmd\*;%IGNITE_LIBS%
+
+::
+:: Parse command line parameters.
+::
+call "%SCRIPTS_HOME%\include\parseargs.bat" %*
+if %ERRORLEVEL% neq 0 (
+    echo Arguments parsing failed
+    exit /b %ERRORLEVEL%
+)
+
+::
+:: Set program name.
+::
+set PROG_NAME=gridgain.bat
+if "%OS%" == "Windows_NT" set PROG_NAME=%~nx0%
+
+::
+:: JVM options. See http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp for more details.
+::
+:: ADD YOUR/CHANGE ADDITIONAL OPTIONS HERE
+::
+if "%JVM_OPTS_VISOR%" == "" set JVM_OPTS_VISOR=-Xms1g -Xmx1g -XX:MaxPermSize=128M
+
+::
+:: Uncomment to set preference to IPv4 stack.
+::
+:: set JVM_OPTS_VISOR=%JVM_OPTS_VISOR% -Djava.net.preferIPv4Stack=true
+
+::
+:: Assertions are disabled by default since version 3.5.
+:: If you want to enable them - set 'ENABLE_ASSERTIONS' flag to '1'.
+::
+set ENABLE_ASSERTIONS=1
+
+::
+:: Set '-ea' options if assertions are enabled.
+::
+if %ENABLE_ASSERTIONS% == 1 set JVM_OPTS_VISOR=%JVM_OPTS_VISOR% -ea
+
+::
+:: Starts Visor console.
+::
+"%JAVA_HOME%\bin\java.exe" %JVM_OPTS_VISOR% -DIGNITE_PROG_NAME="%PROG_NAME%" ^
+-DIGNITE_DEPLOYMENT_MODE_OVERRIDE=ISOLATED %QUIET% %JVM_XOPTS% -cp "%CP%" ^
+ org.gridgain.visor.commands.VisorConsole
+
+:error_finish
+
+if not "%NO_PAUSE%" == "1" pause
+
+goto :eof

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/bin/ignitevisorcmd.sh
----------------------------------------------------------------------
diff --git a/bin/ignitevisorcmd.sh b/bin/ignitevisorcmd.sh
new file mode 100644
index 0000000..319d282
--- /dev/null
+++ b/bin/ignitevisorcmd.sh
@@ -0,0 +1,124 @@
+#!/bin/bash
+#  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.
+
+#
+# Import common functions.
+#
+if [ "${IGNITE_HOME}" = "" ];
+    then IGNITE_HOME_TMP="$(dirname "$(cd "$(dirname "$0")"; "pwd")")";IGNITE_HOME_TMP="$(dirname "${IGNITE_HOME_TMP}")" # Will be removed in release.
+    else IGNITE_HOME_TMP=${IGNITE_HOME};
+fi
+
+#
+# Set SCRIPTS_HOME - base path to scripts.
+#
+SCRIPTS_HOME="${IGNITE_HOME_TMP}/bin"
+
+source "${SCRIPTS_HOME}"/include/functions.sh
+
+#
+# Discover path to Java executable and check it's version.
+#
+checkJava
+
+#
+# Discover IGNITE_HOME environment variable.
+#
+setGridGainHome
+
+#
+# Parse command line parameters.
+#
+. "${SCRIPTS_HOME}"/include/parseargs.sh
+
+#
+# Set IGNITE_LIBS.
+#
+. "${SCRIPTS_HOME}"/include/setenv.sh
+. "${SCRIPTS_HOME}"/include/target-classpath.sh # Will be removed in release.
+CP="${IGNITE_HOME}/bin/include/visor-common/*${SEP}${IGNITE_HOME}/bin/include/visorcmd/*${SEP}${IGNITE_LIBS}"
+
+#
+# JVM options. See http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp for more details.
+#
+# ADD YOUR/CHANGE ADDITIONAL OPTIONS HERE
+#
+JVM_OPTS="-Xms1g -Xmx1g -XX:MaxPermSize=128M -server ${JVM_OPTS}"
+
+# Mac OS specific support to display correct name in the dock.
+osname=`uname`
+
+if [ "${DOCK_OPTS}" == "" ]; then
+    DOCK_OPTS="-Xdock:name=Visor - GridGain Shell Console"
+fi
+
+#
+# Uncomment to set preference for IPv4 stack.
+#
+# JVM_OPTS="${JVM_OPTS} -Djava.net.preferIPv4Stack=true"
+
+#
+# Assertions are disabled by default since version 3.5.
+# If you want to enable them - set 'ENABLE_ASSERTIONS' flag to '1'.
+#
+ENABLE_ASSERTIONS="1"
+
+#
+# Set '-ea' options if assertions are enabled.
+#
+if [ "${ENABLE_ASSERTIONS}" = "1" ]; then
+    JVM_OPTS="${JVM_OPTS} -ea"
+fi
+
+#
+# Save terminal setting. Used to restore terminal on finish.
+#
+SAVED_STTY=`stty -g 2>/dev/null`
+
+#
+# Restores terminal.
+#
+function restoreSttySettings() {
+    stty ${SAVED_STTY}
+}
+
+#
+# Trap that restores terminal in case script execution is interrupted.
+#
+trap restoreSttySettings INT
+
+#
+# Start Visor console.
+#
+case $osname in
+    Darwin*)
+        "$JAVA" ${JVM_OPTS} ${QUIET} "${DOCK_OPTS}" \
+        -DIGNITE_UPDATE_NOTIFIER=false -DIGNITE_HOME="${IGNITE_HOME}" -DIGNITE_PROG_NAME="$0" \
+        -DIGNITE_DEPLOYMENT_MODE_OVERRIDE=ISOLATED ${JVM_XOPTS} -cp "${CP}" \
+        org.apache.ignite.visor.commands.VisorConsole
+    ;;
+    *)
+        "$JAVA" ${JVM_OPTS} ${QUIET} -DIGNITE_UPDATE_NOTIFIER=false \
+        -DIGNITE_HOME="${IGNITE_HOME}" -DIGNITE_PROG_NAME="$0" -DIGNITE_DEPLOYMENT_MODE_OVERRIDE=ISOLATED \
+        ${JVM_XOPTS} -cp "${CP}" \
+        org.apache.ignite.visor.commands.VisorConsole
+    ;;
+esac
+
+#
+# Restore terminal.
+#
+restoreSttySettings

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/bin/setup-hadoop.bat
----------------------------------------------------------------------
diff --git a/bin/setup-hadoop.bat b/bin/setup-hadoop.bat
index fa3ba8e..45b3520 100644
--- a/bin/setup-hadoop.bat
+++ b/bin/setup-hadoop.bat
@@ -23,4 +23,4 @@ if "%OS%" == "Windows_NT" setlocal
 
 set MAIN_CLASS=org.gridgain.grid.hadoop.GridHadoopSetup
 
-call "%~dp0\ggstart.bat" %*
+call "%~dp0\ignite.bat" %*

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/bin/setup-hadoop.sh
----------------------------------------------------------------------
diff --git a/bin/setup-hadoop.sh b/bin/setup-hadoop.sh
index 342916f..f36e4fa 100755
--- a/bin/setup-hadoop.sh
+++ b/bin/setup-hadoop.sh
@@ -57,4 +57,4 @@ export MAIN_CLASS=org.gridgain.grid.hadoop.GridHadoopSetup
 #
 # Start utility.
 #
-. "${SCRIPTS_HOME}/ggstart.sh" $@
+. "${SCRIPTS_HOME}/ignite.sh" $@

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/config/hadoop/default-config.xml
----------------------------------------------------------------------
diff --git a/config/hadoop/default-config.xml b/config/hadoop/default-config.xml
index 03b45fa..1b27ee0 100644
--- a/config/hadoop/default-config.xml
+++ b/config/hadoop/default-config.xml
@@ -21,7 +21,7 @@
     GridGain Spring configuration file.
 
     When starting a standalone GridGain node, you need to execute the following command:
-    {IGNITE_HOME}/bin/ggstart.{bat|sh} path-to-this-file/default-config.xml
+    {IGNITE_HOME}/bin/ignite.{bat|sh} path-to-this-file/default-config.xml
 
     When starting GridGain from Java IDE, pass path to this file into GridGain:
     GridGain.start("path-to-this-file/default-config.xml");

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/config/router/default-router.xml
----------------------------------------------------------------------
diff --git a/config/router/default-router.xml b/config/router/default-router.xml
index 6a8f831..e40a31f 100644
--- a/config/router/default-router.xml
+++ b/config/router/default-router.xml
@@ -21,7 +21,7 @@
     Default rest router configuration.
 
     This file is automatically scanned by
-    $IGNITE_HOME/bin/ggrouter.sh and $IGNITE_HOME/bin/ggrouter.bat
+    $IGNITE_HOME/bin/igniterouter.sh and $IGNITE_HOME/bin/igniterouter.bat
     for org.gridgain.client.router.GridTcpRestRouterConfiguration  bean definition.
     First found is used to start router instance.
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/docs/hadoop_readme.md
----------------------------------------------------------------------
diff --git a/docs/hadoop_readme.md b/docs/hadoop_readme.md
index 1fda55d..22d52a0 100644
--- a/docs/hadoop_readme.md
+++ b/docs/hadoop_readme.md
@@ -40,7 +40,7 @@ Installation requirements:
 After setup script successfully completed, you can execute the Ignite startup script.
 The following command will startup Ignite node with default configuration using multicast node discovery.
 
-    bin/ggstart.{sh|bat}
+    bin/ignite.{sh|bat}
 
 If Ignite was installed successfully, the output from above commands should produce no exceptions or errors.
 Note that you may see some other warnings during startup, but this is OK as they are meant to inform that certain
@@ -53,7 +53,7 @@ Here is an example of log printout when 2 nodes join topology:
 
 You can also start Ignite Management Console, called Visor, and observe started nodes. To startup Visor, you should execute the following script:
 
-    /bin/ggvisorcmd.{sh|bat} 
+    /bin/ignitevisorcmd.{sh|bat}
 
 ## 3. Configuration
 
@@ -112,6 +112,6 @@ Ignite comes with CLI (command) based DevOps Managements Console, called Visor,
 
 To start Visor in console mode you should execute the following command:
 
-    `bin/ggvisorcmd.sh`
+    `bin/ignitevisorcmd.sh`
 
 On Windows, run the same commands with `.bat` extension.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/docs/ignite_readme.md
----------------------------------------------------------------------
diff --git a/docs/ignite_readme.md b/docs/ignite_readme.md
index 297b8b3..a238109 100644
--- a/docs/ignite_readme.md
+++ b/docs/ignite_readme.md
@@ -37,11 +37,11 @@ To verify Ignite installation, you can execute the Ignite startup script.
 
 The following command will startup Ignite with default configuration using Multicast node discovery.
 
-    bin/ggstart.{sh|bat}
+    bin/ignite.{sh|bat}
 
 The following command will startup Ignite with example configuration.
 
-    bin/ggstart.{sh|bat} examples/config/example-compute.xml
+    bin/ignite.{sh|bat} examples/config/example-compute.xml
 
 If Ignite was installed successfully, the output from above commands should produce no exceptions or errors.
 Note that you may see some warnings during startup, but this is OK as they are meant to inform that certain functionality is turned on or off by default.
@@ -53,7 +53,7 @@ Here is an example of log printout when 2 nodes join topology:
 
 You can also start Ignite Management Console, called Visor, and observe started nodes. To startup Visor, you should execute the following script:
 
-    /bin/ggvisorcmd.{sh|bat} 
+    /bin/ignitevisorcmd.{sh|bat}
 
 ### 2.2 Running Ignite Examples
 
@@ -78,18 +78,18 @@ You can use maven to add Ignite artifacts to your project. Ignite has one main a
 
 
 ## 4. Starting Ignite Nodes
-Ignite nodes can be started by executing `bin/ggstart.{sh|bat}` script and passing a relative path to Ignite configuration file. If no file is passed, then grid nodes are started with default configuration using Multicast discovery protocol.
+Ignite nodes can be started by executing `bin/ignite.{sh|bat}` script and passing a relative path to Ignite configuration file. If no file is passed, then grid nodes are started with default configuration using Multicast discovery protocol.
 
 Here is an example of how to start Ignite node with non-default configuration:
 
-    `bin/ggstart.sh examples/config/example-cache.xml`
+    `bin/ignite.sh examples/config/example-cache.xml`
 
 ## 5. Management & Monitoring with Visor
 Ignite comes with CLI (command) based DevOps Managements Console, called Visor, delivering advance set of management and monitoring capabilities. 
 
 To start Visor in console mode you should execute the following command:
 
-    `bin/ggvisorcmd.sh`
+    `bin/ignitevisorcmd.sh`
 
 On Windows, run the same commands with `.bat` extension.
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/config/example-cache.xml
----------------------------------------------------------------------
diff --git a/examples/config/example-cache.xml b/examples/config/example-cache.xml
index 682a8a3..9ec2ef2 100644
--- a/examples/config/example-cache.xml
+++ b/examples/config/example-cache.xml
@@ -21,7 +21,7 @@
     GridGain Spring configuration file to startup grid cache.
 
     When starting a standalone GridGain node, you need to execute the following command:
-    {IGNITE_HOME}/bin/ggstart.{bat|sh} examples/config/example-cache.xml
+    {IGNITE_HOME}/bin/ignite.{bat|sh} examples/config/example-cache.xml
 
     When starting GridGain from Java IDE, pass path to this file to GridGain:
     GridGain.start("examples/config/example-cache.xml");

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/config/example-streamer.xml
----------------------------------------------------------------------
diff --git a/examples/config/example-streamer.xml b/examples/config/example-streamer.xml
index 6674b24..c13b90d 100644
--- a/examples/config/example-streamer.xml
+++ b/examples/config/example-streamer.xml
@@ -21,7 +21,7 @@
     GridGain Spring configuration file to startup grid with streamers.
 
     When starting a standalone GridGain node, you need to execute the following command:
-    {IGNITE_HOME}/bin/ggstart.{bat|sh} examples/config/example-streamer.xml
+    {IGNITE_HOME}/bin/ignite.{bat|sh} examples/config/example-streamer.xml
     When starting nodes this way JAR file containing the examples code
     should be placed to {IGNITE_HOME}/libs folder. You can build
     gridgain-examples.jar by running "mvn package" in {IGNITE_HOME}/examples folder.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/config/filesystem/example-ggfs.xml
----------------------------------------------------------------------
diff --git a/examples/config/filesystem/example-ggfs.xml b/examples/config/filesystem/example-ggfs.xml
index 08ac4cd..fb64227 100644
--- a/examples/config/filesystem/example-ggfs.xml
+++ b/examples/config/filesystem/example-ggfs.xml
@@ -21,7 +21,7 @@
     GridGain Spring configuration file to startup grid cache.
 
     When starting a standalone GridGain node, you need to execute the following command:
-    {IGNITE_HOME}/bin/ggstart.{bat|sh} examples/config/filesystem/example-ggfs.xml
+    {IGNITE_HOME}/bin/ignite.{bat|sh} examples/config/filesystem/example-ggfs.xml
 
     When starting GridGain from Java IDE, pass path to this file into GridGain:
     GridGain.start("examples/config/filesystem/example-ggfs.xml");

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/rest/http-rest-example.php
----------------------------------------------------------------------
diff --git a/examples/rest/http-rest-example.php b/examples/rest/http-rest-example.php
index 9c02a16..26bb394 100644
--- a/examples/rest/http-rest-example.php
+++ b/examples/rest/http-rest-example.php
@@ -22,7 +22,7 @@
  * To execute this script simply start up an instance of GridGain with cache enabled.
  * You can use any cache configuration from examples/config folder as follows:
  * ----
- * ${IGNITE_HOME}/bin/ggstart.sh examples/config/example-cache.xml
+ * ${IGNITE_HOME}/bin/ignite.sh examples/config/example-cache.xml
  * ----
  *
  * Make sure you have correctly specified $CACHE_NAME script global variable

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/rest/memcache-rest-example.php
----------------------------------------------------------------------
diff --git a/examples/rest/memcache-rest-example.php b/examples/rest/memcache-rest-example.php
index 9507e19..b8509cf 100644
--- a/examples/rest/memcache-rest-example.php
+++ b/examples/rest/memcache-rest-example.php
@@ -27,7 +27,7 @@
  * You can use default cache configuration from examples/config folder to
  * start up an instance of GridGain with cache enabled as follows:
  * ----
- * ${IGNITE_HOME}/bin/ggstart.sh examples/config/example-cache-default.xml
+ * ${IGNITE_HOME}/bin/ignite.sh examples/config/example-cache-default.xml
  * ----
  */
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/java/org/apache/ignite/examples/compute/ComputeBroadcastExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/compute/ComputeBroadcastExample.java b/examples/src/main/java/org/apache/ignite/examples/compute/ComputeBroadcastExample.java
index cf8e487..a12b6ac 100644
--- a/examples/src/main/java/org/apache/ignite/examples/compute/ComputeBroadcastExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/compute/ComputeBroadcastExample.java
@@ -28,7 +28,7 @@ import java.util.*;
  * Demonstrates broadcasting computations within grid projection.
  * <p>
  * Remote nodes should always be started with special configuration file which
- * enables P2P class loading: {@code 'ggstart.{sh|bat} examples/config/example-compute.xml'}.
+ * enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-compute.xml'}.
  * <p>
  * Alternatively you can run {@link ComputeNodeStartup} in another JVM which will start GridGain node
  * with {@code examples/config/example-compute.xml} configuration.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/java/org/apache/ignite/examples/compute/ComputeCallableExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/compute/ComputeCallableExample.java b/examples/src/main/java/org/apache/ignite/examples/compute/ComputeCallableExample.java
index 6c70c70..880ed10 100644
--- a/examples/src/main/java/org/apache/ignite/examples/compute/ComputeCallableExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/compute/ComputeCallableExample.java
@@ -31,7 +31,7 @@ import java.util.*;
  * word.
  * <p>
  * Remote nodes should always be started with special configuration file which
- * enables P2P class loading: {@code 'ggstart.{sh|bat} examples/config/example-compute.xml'}.
+ * enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-compute.xml'}.
  * <p>
  * Alternatively you can run {@link ComputeNodeStartup} in another JVM which will start GridGain node
  * with {@code examples/config/example-compute.xml} configuration.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/java/org/apache/ignite/examples/compute/ComputeClosureExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/compute/ComputeClosureExample.java b/examples/src/main/java/org/apache/ignite/examples/compute/ComputeClosureExample.java
index 0365fb5..d0b2538 100644
--- a/examples/src/main/java/org/apache/ignite/examples/compute/ComputeClosureExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/compute/ComputeClosureExample.java
@@ -30,7 +30,7 @@ import java.util.*;
  * nodes and then computes total amount of non-whitespaces characters in the phrase.
  * <p>
  * Remote nodes should always be started with special configuration file which
- * enables P2P class loading: {@code 'ggstart.{sh|bat} examples/config/example-compute.xml'}.
+ * enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-compute.xml'}.
  * <p>
  * Alternatively you can run {@link ComputeNodeStartup} in another JVM which will start GridGain node
  * with {@code examples/config/example-compute.xml} configuration.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/java/org/apache/ignite/examples/compute/ComputeContinuousMapperExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/compute/ComputeContinuousMapperExample.java b/examples/src/main/java/org/apache/ignite/examples/compute/ComputeContinuousMapperExample.java
index cea5ee0..cfbbc94 100644
--- a/examples/src/main/java/org/apache/ignite/examples/compute/ComputeContinuousMapperExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/compute/ComputeContinuousMapperExample.java
@@ -40,7 +40,7 @@ import java.util.concurrent.atomic.*;
  * previous word has been received.
  * <p>
  * Remote nodes should always be started with special configuration file which
- * enables P2P class loading: {@code 'ggstart.{sh|bat} examples/config/example-compute.xml'}.
+ * enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-compute.xml'}.
  * <p>
  * Alternatively you can run {@link ComputeNodeStartup} in another JVM which will start GridGain node
  * with {@code examples/config/example-compute.xml} configuration.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/java/org/apache/ignite/examples/compute/ComputeExecutorServiceExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/compute/ComputeExecutorServiceExample.java b/examples/src/main/java/org/apache/ignite/examples/compute/ComputeExecutorServiceExample.java
index 46f6bfa..38f277f 100644
--- a/examples/src/main/java/org/apache/ignite/examples/compute/ComputeExecutorServiceExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/compute/ComputeExecutorServiceExample.java
@@ -27,7 +27,7 @@ import java.util.concurrent.*;
  * Simple example to demonstrate usage of grid-enabled executor service provided by GridGain.
  * <p>
  * Remote nodes should always be started with special configuration file which
- * enables P2P class loading: {@code 'ggstart.{sh|bat} examples/config/example-compute.xml'}.
+ * enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-compute.xml'}.
  * <p>
  * Alternatively you can run {@link ComputeNodeStartup} in another JVM which will start GridGain node
  * with {@code examples/config/example-compute.xml} configuration.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/java/org/apache/ignite/examples/compute/ComputeFibonacciContinuationExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/compute/ComputeFibonacciContinuationExample.java b/examples/src/main/java/org/apache/ignite/examples/compute/ComputeFibonacciContinuationExample.java
index 9301686..6f2ced7 100644
--- a/examples/src/main/java/org/apache/ignite/examples/compute/ComputeFibonacciContinuationExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/compute/ComputeFibonacciContinuationExample.java
@@ -37,7 +37,7 @@ import java.util.*;
  * {@link org.apache.ignite.compute.ComputeJobContext#callcc()} method calls in {@link FibonacciClosure} class.
  * <p>
  * Remote nodes should always be started with special configuration file which
- * enables P2P class loading: {@code 'ggstart.{sh|bat} examples/config/example-compute.xml'}.
+ * enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-compute.xml'}.
  * <p>
  * Alternatively you can run {@link ComputeNodeStartup} in another JVM which will start GridGain node
  * with {@code examples/config/example-compute.xml} configuration.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/java/org/apache/ignite/examples/compute/ComputeProjectionExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/compute/ComputeProjectionExample.java b/examples/src/main/java/org/apache/ignite/examples/compute/ComputeProjectionExample.java
index 258b5cd..0131003 100644
--- a/examples/src/main/java/org/apache/ignite/examples/compute/ComputeProjectionExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/compute/ComputeProjectionExample.java
@@ -26,7 +26,7 @@ import org.apache.ignite.lang.*;
  * Demonstrates new functional APIs.
  * <p>
  * Remote nodes should always be started with special configuration file which
- * enables P2P class loading: {@code 'ggstart.{sh|bat} examples/config/example-compute.xml'}.
+ * enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-compute.xml'}.
  * <p>
  * Alternatively you can run {@link ComputeNodeStartup} in another JVM which will start GridGain node
  * with {@code examples/config/example-compute.xml} configuration.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/java/org/apache/ignite/examples/compute/ComputeReducerExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/compute/ComputeReducerExample.java b/examples/src/main/java/org/apache/ignite/examples/compute/ComputeReducerExample.java
index 779add0..4942875 100644
--- a/examples/src/main/java/org/apache/ignite/examples/compute/ComputeReducerExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/compute/ComputeReducerExample.java
@@ -31,7 +31,7 @@ import java.util.concurrent.atomic.*;
  * calculated. Then total phrase length is calculated using reducer.
  * <p>
  * Remote nodes should always be started with special configuration file which
- * enables P2P class loading: {@code 'ggstart.{sh|bat} examples/config/example-compute.xml'}.
+ * enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-compute.xml'}.
  * <p>
  * Alternatively you can run {@link ComputeNodeStartup} in another JVM which will start GridGain node
  * with {@code examples/config/example-compute.xml} configuration.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/java/org/apache/ignite/examples/compute/ComputeRunnableExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/compute/ComputeRunnableExample.java b/examples/src/main/java/org/apache/ignite/examples/compute/ComputeRunnableExample.java
index a7dfad0..e062335 100644
--- a/examples/src/main/java/org/apache/ignite/examples/compute/ComputeRunnableExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/compute/ComputeRunnableExample.java
@@ -28,7 +28,7 @@ import java.util.*;
  * Demonstrates a simple use of {@link org.apache.ignite.lang.IgniteRunnable}.
  * <p>
  * Remote nodes should always be started with special configuration file which
- * enables P2P class loading: {@code 'ggstart.{sh|bat} examples/config/example-compute.xml'}.
+ * enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-compute.xml'}.
  * <p>
  * Alternatively you can run {@link ComputeNodeStartup} in another JVM which will start GridGain node
  * with {@code examples/config/example-compute.xml} configuration.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/java/org/apache/ignite/examples/compute/ComputeScheduleExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/compute/ComputeScheduleExample.java b/examples/src/main/java/org/apache/ignite/examples/compute/ComputeScheduleExample.java
index 07f2fa6..7802f75 100644
--- a/examples/src/main/java/org/apache/ignite/examples/compute/ComputeScheduleExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/compute/ComputeScheduleExample.java
@@ -30,7 +30,7 @@ import java.util.concurrent.*;
  * three times with initial scheduling delay equal to five seconds.
  * <p>
  * Remote nodes should always be started with special configuration file which
- * enables P2P class loading: {@code 'ggstart.{sh|bat} examples/config/example-compute.xml'}.
+ * enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-compute.xml'}.
  * <p>
  * Alternatively you can run {@link ComputeNodeStartup} in another JVM which will start GridGain node
  * with {@code examples/config/example-compute.xml} configuration.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/java/org/apache/ignite/examples/compute/ComputeTaskMapExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/compute/ComputeTaskMapExample.java b/examples/src/main/java/org/apache/ignite/examples/compute/ComputeTaskMapExample.java
index eece6f2..bd3fc67 100644
--- a/examples/src/main/java/org/apache/ignite/examples/compute/ComputeTaskMapExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/compute/ComputeTaskMapExample.java
@@ -34,7 +34,7 @@ import java.util.*;
  * calculated on reduce stage.
  * <p>
  * Remote nodes should always be started with special configuration file which
- * enables P2P class loading: {@code 'ggstart.{sh|bat} examples/config/example-compute.xml'}.
+ * enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-compute.xml'}.
  * <p>
  * Alternatively you can run {@link ComputeNodeStartup} in another JVM which will start GridGain node
  * with {@code examples/config/example-compute.xml} configuration.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/java/org/apache/ignite/examples/compute/ComputeTaskSplitExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/compute/ComputeTaskSplitExample.java b/examples/src/main/java/org/apache/ignite/examples/compute/ComputeTaskSplitExample.java
index 8bb9191..d6c7d4c 100644
--- a/examples/src/main/java/org/apache/ignite/examples/compute/ComputeTaskSplitExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/compute/ComputeTaskSplitExample.java
@@ -32,7 +32,7 @@ import java.util.*;
  * is calculated on reduce stage.
  * <p>
  * Remote nodes should always be started with special configuration file which
- * enables P2P class loading: {@code 'ggstart.{sh|bat} examples/config/example-compute.xml'}.
+ * enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-compute.xml'}.
  * <p>
  * Alternatively you can run {@link ComputeNodeStartup} in another JVM which will start GridGain node
  * with {@code examples/config/example-compute.xml} configuration.


[44/50] [abbrv] incubator-ignite git commit: gg*{sh, bat} renamed to ignite*{sh, bat}

Posted by se...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/java/org/apache/ignite/examples/compute/montecarlo/CreditRiskExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/compute/montecarlo/CreditRiskExample.java b/examples/src/main/java/org/apache/ignite/examples/compute/montecarlo/CreditRiskExample.java
index ce36999..49a2667 100644
--- a/examples/src/main/java/org/apache/ignite/examples/compute/montecarlo/CreditRiskExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/compute/montecarlo/CreditRiskExample.java
@@ -27,7 +27,7 @@ import java.util.*;
  * Monte-Carlo example. Demonstrates distributed credit risk calculation.
  * <p>
  * Remote nodes should always be started with special configuration file which
- * enables P2P class loading: {@code 'ggstart.{sh|bat} examples/config/example-compute.xml'}.
+ * enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-compute.xml'}.
  * <p>
  * Alternatively you can run {@link ComputeNodeStartup} in another JVM which will start GridGain node
  * with {@code examples/config/example-compute.xml} configuration.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheAffinityExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheAffinityExample.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheAffinityExample.java
index a0be78e..8d6b275 100644
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheAffinityExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheAffinityExample.java
@@ -30,7 +30,7 @@ import java.util.*;
  * example is to provide the simplest code example of this logic.
  * <p>
  * Remote nodes should always be started with special configuration file which
- * enables P2P class loading: {@code 'ggstart.{sh|bat} examples/config/example-cache.xml'}.
+ * enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-cache.xml'}.
  * <p>
  * Alternatively you can run {@link CacheNodeStartup} in another JVM which will
  * start GridGain node with {@code examples/config/example-cache.xml} configuration.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheApiExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheApiExample.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheApiExample.java
index 218d734..26057c5 100644
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheApiExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheApiExample.java
@@ -28,7 +28,7 @@ import java.util.concurrent.*;
  * This example demonstrates some of the cache rich API capabilities.
  * <p>
  * Remote nodes should always be started with special configuration file which
- * enables P2P class loading: {@code 'ggstart.{sh|bat} examples/config/example-cache.xml'}.
+ * enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-cache.xml'}.
  * <p>
  * Alternatively you can run {@link CacheNodeStartup} in another JVM which will
  * start GridGain node with {@code examples/config/example-cache.xml} configuration.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheContinuousQueryExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheContinuousQueryExample.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheContinuousQueryExample.java
index 2084921..d801148 100644
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheContinuousQueryExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheContinuousQueryExample.java
@@ -28,7 +28,7 @@ import java.util.*;
  * This examples demonstrates continuous query API.
  * <p>
  * Remote nodes should always be started with special configuration file which
- * enables P2P class loading: {@code 'ggstart.{sh|bat} examples/config/example-cache.xml'}.
+ * enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-cache.xml'}.
  * <p>
  * Alternatively you can run {@link CacheNodeStartup} in another JVM which will
  * start GridGain node with {@code examples/config/example-cache.xml} configuration.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheDataLoaderExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheDataLoaderExample.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheDataLoaderExample.java
index 853a72d..b13b625 100644
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheDataLoaderExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheDataLoaderExample.java
@@ -27,7 +27,7 @@ import org.apache.ignite.examples.*;
  * together and properly manages load on remote nodes.
  * <p>
  * Remote nodes should always be started with special configuration file which
- * enables P2P class loading: {@code 'ggstart.{sh|bat} examples/config/example-cache.xml'}.
+ * enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-cache.xml'}.
  * <p>
  * Alternatively you can run {@link CacheNodeStartup} in another JVM which will
  * start GridGain node with {@code examples/config/example-cache.xml} configuration.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheEventsExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheEventsExample.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheEventsExample.java
index bc2c01e..80b4217 100644
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheEventsExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheEventsExample.java
@@ -31,7 +31,7 @@ import static org.apache.ignite.events.IgniteEventType.*;
  * must be specifically enabled, just like in {@code examples/config/example-cache.xml} file.
  * <p>
  * Remote nodes should always be started with special configuration file which
- * enables P2P class loading: {@code 'ggstart.{sh|bat} examples/config/example-cache.xml'}.
+ * enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-cache.xml'}.
  * <p>
  * Alternatively you can run {@link CacheNodeStartup} in another JVM which will
  * start GridGain node with {@code examples/config/example-cache.xml} configuration.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/java/org/apache/ignite/examples/datagrid/CachePopularNumbersExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/CachePopularNumbersExample.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/CachePopularNumbersExample.java
index ac73134..1617662 100644
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/CachePopularNumbersExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/CachePopularNumbersExample.java
@@ -30,7 +30,7 @@ import java.util.*;
  * Real time popular numbers counter.
  * <p>
  * Remote nodes should always be started with special configuration file which
- * enables P2P class loading: {@code 'ggstart.{sh|bat} examples/config/example-cache.xml'}.
+ * enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-cache.xml'}.
  * <p>
  * Alternatively you can run {@link CacheNodeStartup} in another JVM which will
  * start GridGain node with {@code examples/config/example-cache.xml} configuration.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/java/org/apache/ignite/examples/datagrid/CachePutGetExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/CachePutGetExample.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/CachePutGetExample.java
index a6b8f6c..9df8fe5 100644
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/CachePutGetExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/CachePutGetExample.java
@@ -26,7 +26,7 @@ import java.util.*;
  * This example demonstrates very basic operations on cache, such as 'put' and 'get'.
  * <p>
  * Remote nodes should always be started with special configuration file which
- * enables P2P class loading: {@code 'ggstart.{sh|bat} examples/config/example-cache.xml'}.
+ * enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-cache.xml'}.
  * <p>
  * Alternatively you can run {@link CacheNodeStartup} in another JVM which will
  * start GridGain node with {@code examples/config/example-cache.xml} configuration.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheQueryExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheQueryExample.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheQueryExample.java
index f7ade22..a0205d6 100644
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheQueryExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheQueryExample.java
@@ -59,7 +59,7 @@ import java.util.*;
  * </ul>
  * <p>
  * Remote nodes should always be started with special configuration file which
- * enables P2P class loading: {@code 'ggstart.{sh|bat} examples/config/example-cache.xml'}.
+ * enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-cache.xml'}.
  * <p>
  * Alternatively you can run {@link CacheNodeStartup} in another JVM which will
  * start GridGain node with {@code examples/config/example-cache.xml} configuration.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheTransactionExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheTransactionExample.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheTransactionExample.java
index db61b22..1e1793f 100644
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheTransactionExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheTransactionExample.java
@@ -31,7 +31,7 @@ import static org.apache.ignite.transactions.IgniteTxIsolation.*;
  * Demonstrates how to use cache transactions.
  * <p>
  * Remote nodes should always be started with special configuration file which
- * enables P2P class loading: {@code 'ggstart.{sh|bat} examples/config/example-cache.xml'}.
+ * enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-cache.xml'}.
  * <p>
  * Alternatively you can run {@link CacheNodeStartup} in another JVM which will
  * start GridGain node with {@code examples/config/example-cache.xml} configuration.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheAtomicLongExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheAtomicLongExample.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheAtomicLongExample.java
index 3e7996e..51359fd 100644
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheAtomicLongExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheAtomicLongExample.java
@@ -28,7 +28,7 @@ import java.util.*;
  * Demonstrates a simple usage of distributed atomic long.
  * <p>
  * Remote nodes should always be started with special configuration file which
- * enables P2P class loading: {@code 'ggstart.{sh|bat} examples/config/example-cache.xml'}.
+ * enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-cache.xml'}.
  * <p>
  * Alternatively you can run {@link CacheNodeStartup} in another JVM which will
  * start GridGain node with {@code examples/config/example-cache.xml} configuration.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheAtomicReferenceExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheAtomicReferenceExample.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheAtomicReferenceExample.java
index eae31f3..fa86d21 100644
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheAtomicReferenceExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheAtomicReferenceExample.java
@@ -28,7 +28,7 @@ import java.util.*;
  * Demonstrates a simple usage of distributed atomic reference.
  * <p>
  * Remote nodes should always be started with special configuration file which
- * enables P2P class loading: {@code 'ggstart.{sh|bat} examples/config/example-cache.xml'}.
+ * enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-cache.xml'}.
  * <p>
  * Alternatively you can run {@link CacheNodeStartup} in another JVM which will
  * start GridGain node with {@code examples/config/example-cache.xml} configuration.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheAtomicSequenceExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheAtomicSequenceExample.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheAtomicSequenceExample.java
index d4ad2ce..1e509ba 100644
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheAtomicSequenceExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheAtomicSequenceExample.java
@@ -28,7 +28,7 @@ import java.util.*;
  * Demonstrates a simple usage of distributed atomic sequence.
  * <p>
  * Remote nodes should always be started with special configuration file which
- * enables P2P class loading: {@code 'ggstart.{sh|bat} examples/config/example-cache.xml'}.
+ * enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-cache.xml'}.
  * <p>
  * Alternatively you can run {@link CacheNodeStartup} in another JVM which will
  * start GridGain node with {@code examples/config/example-cache.xml} configuration.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheAtomicStampedExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheAtomicStampedExample.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheAtomicStampedExample.java
index eb70edd..696c2fe 100644
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheAtomicStampedExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheAtomicStampedExample.java
@@ -28,7 +28,7 @@ import java.util.*;
  * Demonstrates a simple usage of distributed atomic stamped.
  * <p>
  * Remote nodes should always be started with special configuration file which
- * enables P2P class loading: {@code 'ggstart.{sh|bat} examples/config/example-cache.xml'}.
+ * enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-cache.xml'}.
  * <p>
  * Alternatively you can run {@link CacheNodeStartup} in another JVM which will
  * start GridGain node with {@code examples/config/example-cache.xml} configuration.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheCountDownLatchExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheCountDownLatchExample.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheCountDownLatchExample.java
index 495d8ac..bd3c68b 100644
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheCountDownLatchExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheCountDownLatchExample.java
@@ -28,7 +28,7 @@ import java.util.*;
  * Demonstrates a simple usage of distributed count down latch.
  * <p>
  * Remote nodes should always be started with special configuration file which
- * enables P2P class loading: {@code 'ggstart.{sh|bat} examples/config/example-cache.xml'}.
+ * enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-cache.xml'}.
  * <p>
  * Alternatively you can run {@link CacheNodeStartup} in another JVM which will
  * start GridGain node with {@code examples/config/example-cache.xml} configuration.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheQueueExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheQueueExample.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheQueueExample.java
index 5ab64c6..ae1f3b9 100644
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheQueueExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheQueueExample.java
@@ -29,7 +29,7 @@ import java.util.*;
  * cache queue.
  * <p>
  * Remote nodes should always be started with special configuration file which
- * enables P2P class loading: {@code 'ggstart.{sh|bat} examples/config/example-cache.xml'}.
+ * enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-cache.xml'}.
  * <p>
  * Alternatively you can run {@link CacheNodeStartup} in another JVM which will
  * start GridGain node with {@code examples/config/example-cache.xml} configuration.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheSetExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheSetExample.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheSetExample.java
index cff0046..dc68b1e 100644
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheSetExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheSetExample.java
@@ -28,7 +28,7 @@ import java.util.*;
  * Grid cache distributed set example.
  * <p>
  * Remote nodes should always be started with special configuration file which
- * enables P2P class loading: {@code 'ggstart.{sh|bat} examples/config/example-cache.xml'}.
+ * enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-cache.xml'}.
  * <p>
  * Alternatively you can run {@link CacheNodeStartup} in another JVM which will
  * start GridGain node with {@code examples/config/example-cache.xml} configuration.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/java/org/apache/ignite/examples/datagrid/starschema/CacheStarSchemaExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/starschema/CacheStarSchemaExample.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/starschema/CacheStarSchemaExample.java
index 65bd6c3..e5a79d4 100644
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/starschema/CacheStarSchemaExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/starschema/CacheStarSchemaExample.java
@@ -42,7 +42,7 @@ import java.util.concurrent.*;
  * in various ways.
  * <p>
  * Remote nodes should always be started with special configuration file which
- * enables P2P class loading: {@code 'ggstart.{sh|bat} examples/config/example-cache.xml'}.
+ * enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-cache.xml'}.
  * <p>
  * Alternatively you can run {@link CacheNodeStartup} in another JVM which will
  * start GridGain node with {@code examples/config/example-cache.xml} configuration.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/java/org/apache/ignite/examples/events/EventsExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/events/EventsExample.java b/examples/src/main/java/org/apache/ignite/examples/events/EventsExample.java
index 6877935..fb30474 100644
--- a/examples/src/main/java/org/apache/ignite/examples/events/EventsExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/events/EventsExample.java
@@ -33,7 +33,7 @@ import static org.apache.ignite.events.IgniteEventType.*;
  * Note that grid events are disabled by default and must be specifically enabled,
  * just like in {@code examples/config/example-compute.xml} file.
  * <p>
- * Remote nodes should always be started with configuration: {@code 'ggstart.sh examples/config/example-compute.xml'}.
+ * Remote nodes should always be started with configuration: {@code 'ignite.sh examples/config/example-compute.xml'}.
  * <p>
  * Alternatively you can run {@link ComputeNodeStartup} in another JVM which will start
  * GridGain node with {@code examples/config/example-compute.xml} configuration.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/java/org/apache/ignite/examples/ggfs/GgfsExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ggfs/GgfsExample.java b/examples/src/main/java/org/apache/ignite/examples/ggfs/GgfsExample.java
index 496541c..b8fa35e 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ggfs/GgfsExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ggfs/GgfsExample.java
@@ -30,7 +30,7 @@ import java.util.*;
  * files, create, list and delete directories).
  * <p>
  * Remote nodes should always be started with configuration file which includes
- * GGFS: {@code 'ggstart.sh examples/config/filesystem/example-ggfs.xml'}.
+ * GGFS: {@code 'ignite.sh examples/config/filesystem/example-ggfs.xml'}.
  * <p>
  * Alternatively you can run {@link GgfsNodeStartup} in another JVM which will start
  * GridGain node with {@code examples/config/filesystem/example-ggfs.xml} configuration.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/java/org/apache/ignite/examples/ggfs/GgfsMapReduceExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ggfs/GgfsMapReduceExample.java b/examples/src/main/java/org/apache/ignite/examples/ggfs/GgfsMapReduceExample.java
index 1ba193f..3813e2d 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ggfs/GgfsMapReduceExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ggfs/GgfsMapReduceExample.java
@@ -31,7 +31,7 @@ import java.util.*;
  * the same way as {@code grep} command does.
  * <p>
  * Remote nodes should always be started with configuration file which includes
- * GGFS: {@code 'ggstart.sh examples/config/filesystem/example-ggfs.xml'}.
+ * GGFS: {@code 'ignite.sh examples/config/filesystem/example-ggfs.xml'}.
  * <p>
  * Alternatively you can run {@link GgfsNodeStartup} in another JVM which will start
  * GridGain node with {@code examples/config/filesystem/example-ggfs.xml} configuration.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/java/org/apache/ignite/examples/ggfs/GgfsNodeStartup.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ggfs/GgfsNodeStartup.java b/examples/src/main/java/org/apache/ignite/examples/ggfs/GgfsNodeStartup.java
index 381de6b..e2cfea6 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ggfs/GgfsNodeStartup.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ggfs/GgfsNodeStartup.java
@@ -22,8 +22,8 @@ import org.apache.ignite.*;
 /**
  * Starts up an empty node with GGFS configuration.
  * You can also start a stand-alone GridGain instance by passing the path
- * to configuration file to {@code 'ggstart.{sh|bat}'} script, like so:
- * {@code 'ggstart.sh examples/config/filesystem/example-ggfs.xml'}.
+ * to configuration file to {@code 'ignite.{sh|bat}'} script, like so:
+ * {@code 'ignite.sh examples/config/filesystem/example-ggfs.xml'}.
  * <p>
  * The difference is that running this class from IDE adds all example classes to classpath
  * but running from command line doesn't.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/java/org/apache/ignite/examples/messaging/MessagingExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/messaging/MessagingExample.java b/examples/src/main/java/org/apache/ignite/examples/messaging/MessagingExample.java
index 8aabf4e..2629a64 100644
--- a/examples/src/main/java/org/apache/ignite/examples/messaging/MessagingExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/messaging/MessagingExample.java
@@ -34,7 +34,7 @@ import java.util.concurrent.*;
  * To run this example you must have at least one remote node started.
  * <p>
  * Remote nodes should always be started with special configuration file which
- * enables P2P class loading: {@code 'ggstart.{sh|bat} examples/config/example-compute.xml'}.
+ * enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-compute.xml'}.
  * <p>
  * Alternatively you can run {@link ComputeNodeStartup} in another JVM which will start GridGain node
  * with {@code examples/config/example-compute.xml} configuration.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/java/org/apache/ignite/examples/messaging/MessagingPingPongExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/messaging/MessagingPingPongExample.java b/examples/src/main/java/org/apache/ignite/examples/messaging/MessagingPingPongExample.java
index 11edc44..a22b2aa 100644
--- a/examples/src/main/java/org/apache/ignite/examples/messaging/MessagingPingPongExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/messaging/MessagingPingPongExample.java
@@ -33,7 +33,7 @@ import java.util.concurrent.*;
  * To run this example you must have at least one remote node started.
  * <p>
  * Remote nodes should always be started with special configuration file which
- * enables P2P class loading: {@code 'ggstart.{sh|bat} examples/config/example-compute.xml'}.
+ * enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-compute.xml'}.
  * <p>
  * Alternatively you can run {@link ComputeNodeStartup} in another JVM which will start GridGain node
  * with {@code examples/config/example-compute.xml} configuration.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/java/org/apache/ignite/examples/messaging/MessagingPingPongListenActorExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/messaging/MessagingPingPongListenActorExample.java b/examples/src/main/java/org/apache/ignite/examples/messaging/MessagingPingPongListenActorExample.java
index 65fa6ae..eec94a7 100644
--- a/examples/src/main/java/org/apache/ignite/examples/messaging/MessagingPingPongListenActorExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/messaging/MessagingPingPongListenActorExample.java
@@ -31,7 +31,7 @@ import java.util.concurrent.*;
  * To run this example you must have at least one remote node started.
  * <p>
  * Remote nodes should always be started with special configuration file which
- * enables P2P class loading: {@code 'ggstart.{sh|bat} examples/config/example-compute.xml'}.
+ * enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-compute.xml'}.
  * <p>
  * Alternatively you can run {@link ComputeNodeStartup} in another JVM which will start GridGain node
  * with {@code examples/config/example-compute.xml} configuration.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/java/org/apache/ignite/examples/misc/deployment/DeploymentExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/misc/deployment/DeploymentExample.java b/examples/src/main/java/org/apache/ignite/examples/misc/deployment/DeploymentExample.java
index 873a63f..64151f6 100644
--- a/examples/src/main/java/org/apache/ignite/examples/misc/deployment/DeploymentExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/misc/deployment/DeploymentExample.java
@@ -40,7 +40,7 @@ import java.util.*;
  * in system classpath, so even in this case the deployment step is unnecessary.
  * <p>
  * Remote nodes should always be started with special configuration file which
- * enables P2P class loading: {@code 'ggstart.{sh|bat} examples/config/example-cache.xml'}.
+ * enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-cache.xml'}.
  * <p>
  * Alternatively you can run {@link ComputeNodeStartup} in another JVM which will
  * start GridGain node with {@code examples/config/example-compute.xml} configuration.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/java/org/apache/ignite/examples/misc/springbean/SpringBeanExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/misc/springbean/SpringBeanExample.java b/examples/src/main/java/org/apache/ignite/examples/misc/springbean/SpringBeanExample.java
index 83a3e17..709fb2b 100644
--- a/examples/src/main/java/org/apache/ignite/examples/misc/springbean/SpringBeanExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/misc/springbean/SpringBeanExample.java
@@ -36,7 +36,7 @@ import java.util.concurrent.*;
  * apply grid bean destructor and stop the grid.
  * <p>
  * Remote nodes should always be started with special configuration file which
- * enables P2P class loading: {@code 'ggstart.{sh|bat} examples/config/example-compute.xml'}.
+ * enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-compute.xml'}.
  * <p>
  * Alternatively you can run {@link ComputeNodeStartup} in another JVM which will start GridGain node
  * with {@code examples/config/example-compute.xml} configuration.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/java/org/apache/ignite/examples/services/ServicesExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/services/ServicesExample.java b/examples/src/main/java/org/apache/ignite/examples/services/ServicesExample.java
index c5d0c51..7481137 100644
--- a/examples/src/main/java/org/apache/ignite/examples/services/ServicesExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/services/ServicesExample.java
@@ -34,7 +34,7 @@ import java.util.*;
  * which will start GridGain node with {@code examples/config/example-compute.xml} configuration.
  * <p>
  * NOTE:<br/>
- * Starting {@code ggstart.sh} directly will not work, as distributed services
+ * Starting {@code ignite.sh} directly will not work, as distributed services
  * cannot be peer-deployed and classes must be on the classpath for every node.
  */
 public class ServicesExample {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/java/org/apache/ignite/examples/streaming/StreamingCheckInExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/streaming/StreamingCheckInExample.java b/examples/src/main/java/org/apache/ignite/examples/streaming/StreamingCheckInExample.java
index 2b3c0e8..6423d1e 100644
--- a/examples/src/main/java/org/apache/ignite/examples/streaming/StreamingCheckInExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/streaming/StreamingCheckInExample.java
@@ -52,7 +52,7 @@ import java.util.concurrent.*;
  * the users that have checked-in in the known places within the last 10 seconds.
  * <p>
  * Remote nodes should always be started with special configuration file:
- * {@code 'ggstart.{sh|bat} examples/config/example-streamer.xml'}.
+ * {@code 'ignite.{sh|bat} examples/config/example-streamer.xml'}.
  * When starting nodes this way JAR file containing the examples code
  * should be placed to {@code IGNITE_HOME/libs} folder. You can build
  * {@code gridgain-examples.jar} by running {@code mvn package} in

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/java/org/apache/ignite/examples/streaming/StreamingPopularNumbersExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/streaming/StreamingPopularNumbersExample.java b/examples/src/main/java/org/apache/ignite/examples/streaming/StreamingPopularNumbersExample.java
index 56712bf..81e91f9 100644
--- a/examples/src/main/java/org/apache/ignite/examples/streaming/StreamingPopularNumbersExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/streaming/StreamingPopularNumbersExample.java
@@ -35,7 +35,7 @@ import java.util.*;
  * is set to {@code 10,000}.
  * <p>
  * Remote nodes should always be started with special configuration file:
- * {@code 'ggstart.{sh|bat} examples/config/example-streamer.xml'}.
+ * {@code 'ignite.{sh|bat} examples/config/example-streamer.xml'}.
  * When starting nodes this way JAR file containing the examples code
  * should be placed to {@code IGNITE_HOME/libs} folder. You can build
  * {@code gridgain-examples.jar} by running {@code mvn package} in

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/java/org/apache/ignite/examples/streaming/StreamingPriceBarsExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/streaming/StreamingPriceBarsExample.java b/examples/src/main/java/org/apache/ignite/examples/streaming/StreamingPriceBarsExample.java
index 708564e..584e55a 100644
--- a/examples/src/main/java/org/apache/ignite/examples/streaming/StreamingPriceBarsExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/streaming/StreamingPriceBarsExample.java
@@ -46,7 +46,7 @@ import java.util.concurrent.*;
  * with purpose to demonstrate multi-stage streaming processing.
  * <p>
  * Remote nodes should always be started with special configuration file:
- * {@code 'ggstart.{sh|bat} examples/config/example-streamer.xml'}.
+ * {@code 'ignite.{sh|bat} examples/config/example-streamer.xml'}.
  * When starting nodes this way JAR file containing the examples code
  * should be placed to {@code IGNITE_HOME/libs} folder. You can build
  * {@code gridgain-examples.jar} by running {@code mvn package} in

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/java/org/apache/ignite/examples/streaming/StreamingRunningAverageExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/streaming/StreamingRunningAverageExample.java b/examples/src/main/java/org/apache/ignite/examples/streaming/StreamingRunningAverageExample.java
index 3b6f52e..7ccbf42 100644
--- a/examples/src/main/java/org/apache/ignite/examples/streaming/StreamingRunningAverageExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/streaming/StreamingRunningAverageExample.java
@@ -32,7 +32,7 @@ import java.util.concurrent.*;
  * continuously maintains a running average over last {@code 500} numbers.
  * <p>
  * Remote nodes should always be started with special configuration file:
- * {@code 'ggstart.{sh|bat} examples/config/example-streamer.xml'}.
+ * {@code 'ignite.{sh|bat} examples/config/example-streamer.xml'}.
  * When starting nodes this way JAR file containing the examples code
  * should be placed to {@code IGNITE_HOME/libs} folder. You can build
  * {@code gridgain-examples.jar} by running {@code mvn package} in

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/java8/org/apache/ignite/examples/ComputeExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java8/org/apache/ignite/examples/ComputeExample.java b/examples/src/main/java8/org/apache/ignite/examples/ComputeExample.java
index 6bcb12c..71b9946 100644
--- a/examples/src/main/java8/org/apache/ignite/examples/ComputeExample.java
+++ b/examples/src/main/java8/org/apache/ignite/examples/ComputeExample.java
@@ -26,7 +26,7 @@ import org.apache.ignite.lang.IgniteCallable;
  * Demonstrates broadcasting and unicasting computations within grid projection.
  * <p>
  * Remote nodes should always be started with special configuration file which
- * enables P2P class loading: {@code 'ggstart.{sh|bat} examples/config/example-compute.xml'}.
+ * enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-compute.xml'}.
  */
 public class ComputeExample {
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/java8/org/apache/ignite/examples/MessagingExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java8/org/apache/ignite/examples/MessagingExample.java b/examples/src/main/java8/org/apache/ignite/examples/MessagingExample.java
index dd7e1ea..c69c3ab 100644
--- a/examples/src/main/java8/org/apache/ignite/examples/MessagingExample.java
+++ b/examples/src/main/java8/org/apache/ignite/examples/MessagingExample.java
@@ -31,7 +31,7 @@ import java.util.concurrent.*;
  * To run this example you must have at least one remote node started.
  * <p>
  * Remote nodes should always be started with special configuration file which
- * enables P2P class loading: {@code 'ggstart.{sh|bat} examples/config/example-compute.xml'}.
+ * enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-compute.xml'}.
  * <p>
  * Alternatively you can run {@link ComputeNodeStartup} in another JVM which will start GridGain node
  * with {@code examples/config/example-compute.xml} configuration.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheAffinityExample1.scala
----------------------------------------------------------------------
diff --git a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheAffinityExample1.scala b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheAffinityExample1.scala
index 2598e93..b0ca960 100644
--- a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheAffinityExample1.scala
+++ b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheAffinityExample1.scala
@@ -34,7 +34,7 @@ import java.util.concurrent.Callable
  * keys.
  *
  * Remote nodes should always be started with configuration file which includes
- * cache: `'ggstart.sh examples/config/example-cache.xml'`. Local node can
+ * cache: `'ignite.sh examples/config/example-cache.xml'`. Local node can
  * be started with or without cache.
  */
 object ScalarCacheAffinityExample1 {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheAffinityExample2.scala
----------------------------------------------------------------------
diff --git a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheAffinityExample2.scala b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheAffinityExample2.scala
index bc6f0a1..e12f3bf 100644
--- a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheAffinityExample2.scala
+++ b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheAffinityExample2.scala
@@ -28,7 +28,7 @@ import scala.util.control.Breaks._
  * Note that affinity routing is enabled for all caches.
  *
  * Remote nodes should always be started with configuration file which includes
- * cache: `'ggstart.sh examples/config/example-cache.xml'`. Local node can
+ * cache: `'ignite.sh examples/config/example-cache.xml'`. Local node can
  * be started with or without cache.
  */
 object ScalarCacheAffinityExample2 {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheAffinitySimpleExample.scala
----------------------------------------------------------------------
diff --git a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheAffinitySimpleExample.scala b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheAffinitySimpleExample.scala
index 103bcb3..12c2f96 100644
--- a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheAffinitySimpleExample.scala
+++ b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheAffinitySimpleExample.scala
@@ -32,7 +32,7 @@ import org.apache.ignite.scalar.scalar._
  * Note also that for affinity routing is enabled for all caches.
  *
  * Remote nodes should always be started with configuration file which includes
- * cache: `'ggstart.sh examples/config/example-cache.xml'`. Local node can
+ * cache: `'ignite.sh examples/config/example-cache.xml'`. Local node can
  * be started with or without cache.
  */
 object ScalarCacheAffinitySimpleExample extends App {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheExample.scala
----------------------------------------------------------------------
diff --git a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheExample.scala b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheExample.scala
index 574006f..22ab99e 100644
--- a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheExample.scala
+++ b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheExample.scala
@@ -30,7 +30,7 @@ import scala.collection.JavaConversions._
  * Demonstrates basic In-Memory Data Grid operations with Scalar.
  * <p>
  * Remote nodes should always be started with configuration file which includes
- * cache: `'ggstart.sh examples/config/example-cache.xml'`. Local node can
+ * cache: `'ignite.sh examples/config/example-cache.xml'`. Local node can
  * be started with or without cache.
  */
 object ScalarCacheExample extends App {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCachePopularNumbersExample.scala
----------------------------------------------------------------------
diff --git a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCachePopularNumbersExample.scala b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCachePopularNumbersExample.scala
index 4cf0b04..e52f431 100644
--- a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCachePopularNumbersExample.scala
+++ b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCachePopularNumbersExample.scala
@@ -30,7 +30,7 @@ import scala.util.Random
  * Real time popular number counter.
  * <p>
  * Remote nodes should always be started with special configuration file which
- * enables P2P class loading: `ggstart.sh examples/config/example-cache.xml`
+ * enables P2P class loading: `ignite.sh examples/config/example-cache.xml`
  * <p>
  * Alternatively you can run [[CacheNodeStartup]] in another JVM which will
  * start GridGain node with `examples/config/example-cache.xml` configuration.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheQueryExample.scala
----------------------------------------------------------------------
diff --git a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheQueryExample.scala b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheQueryExample.scala
index 99334f4..d189e9f 100644
--- a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheQueryExample.scala
+++ b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheQueryExample.scala
@@ -31,7 +31,7 @@ import java.util._
  * Demonstrates cache ad-hoc queries with Scalar.
  * <p>
  * Remote nodes should always be started with configuration file which includes
- * cache: `'ggstart.sh examples/config/example-cache.xml'`. Local node can
+ * cache: `'ignite.sh examples/config/example-cache.xml'`. Local node can
  * be started with or without cache.
  */
 object ScalarCacheQueryExample {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarClosureExample.scala
----------------------------------------------------------------------
diff --git a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarClosureExample.scala b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarClosureExample.scala
index 3587356..fc4b46b 100644
--- a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarClosureExample.scala
+++ b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarClosureExample.scala
@@ -25,7 +25,7 @@ import org.apache.ignite.scalar.scalar._
  * Demonstrates various closure executions on the cloud using Scalar.
  * <p>
  * Remote nodes should always be started with special configuration file which
- * enables P2P class loading: `'ggstart.{sh|bat} examples/config/example-compute.xml'`.
+ * enables P2P class loading: `'ignite.{sh|bat} examples/config/example-compute.xml'`.
  */
 object ScalarClosureExample extends App {
     scalar("examples/config/example-compute.xml") {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarContinuationExample.scala
----------------------------------------------------------------------
diff --git a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarContinuationExample.scala b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarContinuationExample.scala
index 7218490..1c1dc46 100644
--- a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarContinuationExample.scala
+++ b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarContinuationExample.scala
@@ -40,7 +40,7 @@ import java.util
  * the more values it will be cached on remote nodes.
  * <p>
  * Remote nodes should always be started with special configuration file which
- * enables P2P class loading: `'ggstart.{sh|bat} examples/config/example-compute.xml'`.
+ * enables P2P class loading: `'ignite.{sh|bat} examples/config/example-compute.xml'`.
  */
 object ScalarContinuationExample {
     def main(args: Array[String]) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCreditRiskExample.scala
----------------------------------------------------------------------
diff --git a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCreditRiskExample.scala b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCreditRiskExample.scala
index 1affeb9..65393f7 100644
--- a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCreditRiskExample.scala
+++ b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCreditRiskExample.scala
@@ -27,7 +27,7 @@ import scala.util.control.Breaks._
  * Scalar-based Monte-Carlo example.
  * <p>
  * Remote nodes should always be started with special configuration file which
- * enables P2P class loading: `'ggstart.{sh|bat} examples/config/example-compute.xml'`.
+ * enables P2P class loading: `'ignite.{sh|bat} examples/config/example-compute.xml'`.
  */
 object ScalarCreditRiskExample {
     def main(args: Array[String]) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarPiCalculationExample.scala
----------------------------------------------------------------------
diff --git a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarPiCalculationExample.scala b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarPiCalculationExample.scala
index 3064108..12b72b7 100644
--- a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarPiCalculationExample.scala
+++ b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarPiCalculationExample.scala
@@ -28,7 +28,7 @@ import scala.math._
  * or any explicit deployment.
  * <p>
  * Remote nodes should always be started with special configuration file which
- * enables P2P class loading: `'ggstart.{sh|bat} examples/config/example-compute.xml'`.
+ * enables P2P class loading: `'ignite.{sh|bat} examples/config/example-compute.xml'`.
  */
 object ScalarPiCalculationExample {
     /** Number of iterations per node. */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarPingPongExample.scala
----------------------------------------------------------------------
diff --git a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarPingPongExample.scala b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarPingPongExample.scala
index bff48a4..dbdd9e0 100644
--- a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarPingPongExample.scala
+++ b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarPingPongExample.scala
@@ -29,7 +29,7 @@ import java.util.concurrent.CountDownLatch
  * two nodes. It is analogous to `GridMessagingPingPongExample` on Java side.
  * <p>
  * Remote nodes should always be started with special configuration file which
- * enables P2P class loading: `'ggstart.{sh|bat} examples/config/example-compute.xml'`.
+ * enables P2P class loading: `'ignite.{sh|bat} examples/config/example-compute.xml'`.
  */
 object ScalarPingPongExample extends App {
     scalar("examples/config/example-compute.xml") {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarPrimeExample.scala
----------------------------------------------------------------------
diff --git a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarPrimeExample.scala b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarPrimeExample.scala
index 1165ef9..3a29101 100644
--- a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarPrimeExample.scala
+++ b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarPrimeExample.scala
@@ -30,7 +30,7 @@ import scala.util.control.Breaks._
  * ==Starting Remote Nodes==
  * To try this example you should (but don't have to) start remote grid instances.
  * You can start as many as you like by executing the following script:
- * `{IGNITE_HOME}/bin/ggstart.{bat|sh} examples/config/example-compute.xml`
+ * `{IGNITE_HOME}/bin/ignite.{bat|sh} examples/config/example-compute.xml`
  *
  * Once remote instances are started, you can execute this example from
  * Eclipse, IntelliJ IDEA, or NetBeans (and any other Java IDE) by simply hitting run

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarScheduleExample.scala
----------------------------------------------------------------------
diff --git a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarScheduleExample.scala b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarScheduleExample.scala
index a5b79ca..299bc0f 100644
--- a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarScheduleExample.scala
+++ b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarScheduleExample.scala
@@ -26,7 +26,7 @@ import org.apache.ignite.scalar.scalar._
  * three times with initial scheduling delay equal to five seconds.
  * <p>
  * Remote nodes should always be started with special configuration file which
- * enables P2P class loading: `'ggstart.{sh|bat} examples/config/example-compute.xml'`.
+ * enables P2P class loading: `'ignite.{sh|bat} examples/config/example-compute.xml'`.
  */
 object ScalarScheduleExample extends App {
     scalar("examples/config/example-compute.xml") {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarSnowflakeSchemaExample.scala
----------------------------------------------------------------------
diff --git a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarSnowflakeSchemaExample.scala b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarSnowflakeSchemaExample.scala
index 574a816..9791d87 100644
--- a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarSnowflakeSchemaExample.scala
+++ b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarSnowflakeSchemaExample.scala
@@ -44,7 +44,7 @@ import scala.collection.JavaConversions._
  * in various ways.
  * <p>
  * Remote nodes should always be started with configuration file which includes
- * cache: `'ggstart.sh examples/config/example-cache.xml'`.
+ * cache: `'ignite.sh examples/config/example-cache.xml'`.
  */
 object ScalarSnowflakeSchemaExample {
     /** Name of replicated cache specified in spring configuration. */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarTaskExample.scala
----------------------------------------------------------------------
diff --git a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarTaskExample.scala b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarTaskExample.scala
index cd98f06..7dc8c5f 100644
--- a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarTaskExample.scala
+++ b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarTaskExample.scala
@@ -32,7 +32,7 @@ import scala.collection.JavaConversions._
  * As a trade off in such cases the more code needs to be written vs. simple closure execution.
  * <p>
  * Remote nodes should always be started with special configuration file which
- * enables P2P class loading: `'ggstart.{sh|bat} examples/config/example-compute.xml'`.
+ * enables P2P class loading: `'ignite.{sh|bat} examples/config/example-compute.xml'`.
  */
 object ScalarTaskExample extends App {
     scalar("examples/config/example-compute.xml") {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarWorldShortestMapReduce.scala
----------------------------------------------------------------------
diff --git a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarWorldShortestMapReduce.scala b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarWorldShortestMapReduce.scala
index 674c69a..8d73cda 100644
--- a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarWorldShortestMapReduce.scala
+++ b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarWorldShortestMapReduce.scala
@@ -26,7 +26,7 @@ import org.apache.ignite.scalar.scalar._
  * on thousands requiring no special configuration or deployment.
  * <p>
  * Remote nodes should always be started with special configuration file which
- * enables P2P class loading: `'ggstart.{sh|bat} examples/config/example-compute.xml'`.
+ * enables P2P class loading: `'ignite.{sh|bat} examples/config/example-compute.xml'`.
  */
 object ScalarWorldShortestMapReduce extends App {
     scalar("examples/config/example-compute.xml") {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/aop/readme.txt
----------------------------------------------------------------------
diff --git a/modules/aop/readme.txt b/modules/aop/readme.txt
index 75c5f49..4d04630 100644
--- a/modules/aop/readme.txt
+++ b/modules/aop/readme.txt
@@ -5,7 +5,7 @@ Apache Ignite AOP module provides capability to turn any Java method to a distri
 adding @Gridify annotation to it.
 
 To enable AOP module when starting a standalone node, move 'optional/ignite-aop' folder to
-'libs' folder before running 'ggstart.{sh|bat}' script. The content of the module folder will
+'libs' folder before running 'ignite.{sh|bat}' script. The content of the module folder will
 be added to classpath in this case.
 
 Importing AOP Module In Maven Project

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/aws/readme.txt
----------------------------------------------------------------------
diff --git a/modules/aws/readme.txt b/modules/aws/readme.txt
index 317369c..1819915 100644
--- a/modules/aws/readme.txt
+++ b/modules/aws/readme.txt
@@ -4,7 +4,7 @@ Apache Ignite AWS Module
 Apache Ignite AWS module provides S3-based implementations of checkpoint SPI and IP finder for TCP discovery.
 
 To enable AWS module when starting a standalone node, move 'optional/ignite-aws' folder to
-'libs' folder before running 'ggstart.{sh|bat}' script. The content of the module folder will
+'libs' folder before running 'ignite.{sh|bat}' script. The content of the module folder will
 be added to classpath in this case.
 
 Importing AWS Module In Maven Project

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/clients/src/test/bin/start-nodes.cmd
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/bin/start-nodes.cmd b/modules/clients/src/test/bin/start-nodes.cmd
index ece9ee2..5e1fdb2 100644
--- a/modules/clients/src/test/bin/start-nodes.cmd
+++ b/modules/clients/src/test/bin/start-nodes.cmd
@@ -35,9 +35,9 @@ mkdir %IGNITE_HOME%\work\log
 
 set JVM_OPTS=-DCLIENTS_MODULE_PATH=%CLIENTS_MODULE_PATH%
 
-FOR /L %%G IN (1,1,%NODES_COUNT%) DO start "Node #%%G" /low /MIN cmd /C "%BIN_PATH%\ggstart.bat -v %CONFIG_DIR%\spring-server-node.xml >> %IGNITE_HOME%\work\log\node-%%G.log 2>&1"
-FOR /L %%G IN (1,1,%NODES_COUNT%) DO start "SSL Node #%%G" /low /MIN cmd /C "%BIN_PATH%\ggstart.bat -v %CONFIG_DIR%\spring-server-ssl-node.xml >> %IGNITE_HOME%\work\log\node-ssl-%%G.log 2>&1"
-FOR /L %%G IN (1,1,%NODES_COUNT%) DO start "Cache Node #%%G" /low /MIN cmd /C "%BIN_PATH%\ggstart.bat -v %CONFIG_DIR%\spring-cache.xml >> %IGNITE_HOME%\work\log\cache-node-%%G.log 2>&1"
+FOR /L %%G IN (1,1,%NODES_COUNT%) DO start "Node #%%G" /low /MIN cmd /C "%BIN_PATH%\ignite.bat -v %CONFIG_DIR%\spring-server-node.xml >> %IGNITE_HOME%\work\log\node-%%G.log 2>&1"
+FOR /L %%G IN (1,1,%NODES_COUNT%) DO start "SSL Node #%%G" /low /MIN cmd /C "%BIN_PATH%\ignite.bat -v %CONFIG_DIR%\spring-server-ssl-node.xml >> %IGNITE_HOME%\work\log\node-ssl-%%G.log 2>&1"
+FOR /L %%G IN (1,1,%NODES_COUNT%) DO start "Cache Node #%%G" /low /MIN cmd /C "%BIN_PATH%\ignite.bat -v %CONFIG_DIR%\spring-cache.xml >> %IGNITE_HOME%\work\log\cache-node-%%G.log 2>&1"
 
 echo Wait 60 seconds while nodes started.
 ping -n 60 127.0.0.1 > NUL
@@ -45,8 +45,8 @@ ping -n 60 127.0.0.1 > NUL
 rem Disable hostname verification for self-signed certificates.
 set JVM_OPTS=%JVM_OPTS% -DIGNITE_DISABLE_HOSTNAME_VERIFIER=true
 
-FOR /L %%G IN (1,1,1) DO start "Router #%%G" /low /MIN cmd /C "%BIN_PATH%\ggrouter.bat -v %CONFIG_DIR%\spring-router.xml >> %IGNITE_HOME%\work\log\router-%%G.log 2>&1"
-FOR /L %%G IN (1,1,1) DO start "SSL Router #%%G" /low /MIN cmd /C "%BIN_PATH%\ggrouter.bat -v %CONFIG_DIR%\spring-router-ssl.xml >> %IGNITE_HOME%\work\log\router-ssl-%%G.log 2>&1"
+FOR /L %%G IN (1,1,1) DO start "Router #%%G" /low /MIN cmd /C "%BIN_PATH%\igniterouter.bat -v %CONFIG_DIR%\spring-router.xml >> %IGNITE_HOME%\work\log\router-%%G.log 2>&1"
+FOR /L %%G IN (1,1,1) DO start "SSL Router #%%G" /low /MIN cmd /C "%BIN_PATH%\igniterouter.bat -v %CONFIG_DIR%\spring-router-ssl.xml >> %IGNITE_HOME%\work\log\router-ssl-%%G.log 2>&1"
 
 echo Wait 10 seconds while routers started.
 ping -n 10 127.0.0.1 > NUL

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/clients/src/test/bin/start-nodes.sh
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/bin/start-nodes.sh b/modules/clients/src/test/bin/start-nodes.sh
index 739a81e..cb68204 100644
--- a/modules/clients/src/test/bin/start-nodes.sh
+++ b/modules/clients/src/test/bin/start-nodes.sh
@@ -63,7 +63,7 @@ do
     LOG_FILE=${IGNITE_HOME}/work/log/node-${iter}.log
 
     echo Start node ${iter}: ${LOG_FILE}
-    nohup /bin/bash $BIN_PATH/ggstart.sh $CONFIG_DIR/spring-server-node.xml -v < /dev/null > ${LOG_FILE} 2>&1 &
+    nohup /bin/bash $BIN_PATH/ignite.sh $CONFIG_DIR/spring-server-node.xml -v < /dev/null > ${LOG_FILE} 2>&1 &
 done
 
 for iter in {1..2}
@@ -71,7 +71,7 @@ do
     LOG_FILE=${IGNITE_HOME}/work/log/node-ssl-${iter}.log
 
     echo Start SSL node ${iter}: ${LOG_FILE}
-    nohup /bin/bash $BIN_PATH/ggstart.sh $CONFIG_DIR/spring-server-ssl-node.xml -v < /dev/null > ${LOG_FILE} 2>&1 &
+    nohup /bin/bash $BIN_PATH/ignite.sh $CONFIG_DIR/spring-server-ssl-node.xml -v < /dev/null > ${LOG_FILE} 2>&1 &
 done
 
 echo Wait 60 seconds while nodes start.
@@ -79,14 +79,14 @@ sleep 60
 
 LOG_FILE=${IGNITE_HOME}/work/log/router.log
 echo Start Router: ${LOG_FILE}
-nohup /bin/bash $BIN_PATH/ggrouter.sh $CONFIG_DIR/spring-router.xml -v < /dev/null > ${LOG_FILE} 2>&1 &
+nohup /bin/bash $BIN_PATH/igniterouter.sh $CONFIG_DIR/spring-router.xml -v < /dev/null > ${LOG_FILE} 2>&1 &
 
 # Disable hostname verification for self-signed certificates.
 export JVM_OPTS="${JVM_OPTS} -DIGNITE_DISABLE_HOSTNAME_VERIFIER=true"
 
 LOG_FILE=${IGNITE_HOME}/work/log/router-ssl.log
 echo Start Router SSL: ${LOG_FILE}
-nohup /bin/bash $BIN_PATH/ggrouter.sh $CONFIG_DIR/spring-router-ssl.xml -v < /dev/null > ${LOG_FILE} 2>&1 &
+nohup /bin/bash $BIN_PATH/igniterouter.sh $CONFIG_DIR/spring-router-ssl.xml -v < /dev/null > ${LOG_FILE} 2>&1 &
 
 echo Wait 30 seconds while router starts.
 sleep 30

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/clients/src/test/resources/spring-cache.xml
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/resources/spring-cache.xml b/modules/clients/src/test/resources/spring-cache.xml
index b675635..a2e62a9 100644
--- a/modules/clients/src/test/resources/spring-cache.xml
+++ b/modules/clients/src/test/resources/spring-cache.xml
@@ -21,7 +21,7 @@
     GridGain Spring configuration file to startup grid cache.
 
     When starting a standalone GridGain node, you need to execute the following command:
-    {IGNITE_HOME}/bin/ggstart.{bat|sh} examples/config/example-cache.xml
+    {IGNITE_HOME}/bin/ignite.{bat|sh} examples/config/example-cache.xml
 
     When starting GridGain from Java IDE, pass path to this file into GridGain:
     GridGain.start("examples/config/example-cache.xml");

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/clients/src/test/resources/spring-router-ssl.xml
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/resources/spring-router-ssl.xml b/modules/clients/src/test/resources/spring-router-ssl.xml
index e4906c9..bf1a342 100644
--- a/modules/clients/src/test/resources/spring-router-ssl.xml
+++ b/modules/clients/src/test/resources/spring-router-ssl.xml
@@ -21,7 +21,7 @@
     Default rest router configuration.
 
     This file is automatically scanned by
-    $IGNITE_HOME/bin/ggrouter.sh and $IGNITE_HOME/bin/ggrouter.bat
+    $IGNITE_HOME/bin/igniterouter.sh and $IGNITE_HOME/bin/igniterouter.bat
     for org.gridgain.client.router.GridTcpRestRouterConfiguration and
     org.gridgain.client.router.GridHttpRestRouterConfiguration bean definitions.
     First found are used to start corresponding router instances.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/clients/src/test/resources/spring-router.xml
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/resources/spring-router.xml b/modules/clients/src/test/resources/spring-router.xml
index 09e68d8..ba078f5 100644
--- a/modules/clients/src/test/resources/spring-router.xml
+++ b/modules/clients/src/test/resources/spring-router.xml
@@ -21,7 +21,7 @@
     Default rest router configuration.
 
     This file is automatically scanned by
-    $IGNITE_HOME/bin/ggrouter.sh and $IGNITE_HOME/bin/ggrouter.bat
+    $IGNITE_HOME/bin/igniterouter.sh and $IGNITE_HOME/bin/igniterouter.bat
     for org.gridgain.client.router.GridTcpRestRouterConfiguration and
     org.gridgain.client.router.GridHttpRestRouterConfiguration bean definitions.
     First found are used to start corresponding router instances.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/clients/src/test/resources/spring-server-node.xml
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/resources/spring-server-node.xml b/modules/clients/src/test/resources/spring-server-node.xml
index 690fd7d..ccfcf0f 100644
--- a/modules/clients/src/test/resources/spring-server-node.xml
+++ b/modules/clients/src/test/resources/spring-server-node.xml
@@ -21,7 +21,7 @@
     GridGain Spring configuration file to startup grid cache.
 
     When starting a standalone GridGain node, you need to execute the following command:
-    {IGNITE_HOME}/bin/ggstart.{bat|sh} path-to-this-file/example-cache.xml
+    {IGNITE_HOME}/bin/ignite.{bat|sh} path-to-this-file/example-cache.xml
 
     When starting GridGain from Java IDE, pass path to this file into GridGain:
     GridGain.start("path-to-this-file/example-benchmark.xml");

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/clients/src/test/resources/spring-server-ssl-node.xml
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/resources/spring-server-ssl-node.xml b/modules/clients/src/test/resources/spring-server-ssl-node.xml
index e02727d..68774da 100644
--- a/modules/clients/src/test/resources/spring-server-ssl-node.xml
+++ b/modules/clients/src/test/resources/spring-server-ssl-node.xml
@@ -21,7 +21,7 @@
     GridGain Spring configuration file to startup grid cache.
 
     When starting a standalone GridGain node, you need to execute the following command:
-    {IGNITE_HOME}/bin/ggstart.{bat|sh} path-to-this-file/example-cache.xml
+    {IGNITE_HOME}/bin/ignite.{bat|sh} path-to-this-file/example-cache.xml
 
     When starting GridGain from Java IDE, pass path to this file into GridGain:
     GridGain.start("path-to-this-file/example-benchmark.xml");

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/core/src/main/java/org/apache/ignite/IgniteCluster.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteCluster.java b/modules/core/src/main/java/org/apache/ignite/IgniteCluster.java
index c518ec8..6613fdd 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteCluster.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteCluster.java
@@ -312,7 +312,7 @@ public interface IgniteCluster extends ClusterGroup, IgniteAsyncSupport {
      * Restarts nodes satisfying optional set of predicates.
      * <p>
      * <b>NOTE:</b> this command only works for grid nodes started with GridGain
-     * {@code ggstart.sh} or {@code ggstart.bat} scripts.
+     * {@code ignite.sh} or {@code ignite.bat} scripts.
      *
      * @throws IgniteCheckedException In case of error.
      */
@@ -322,7 +322,7 @@ public interface IgniteCluster extends ClusterGroup, IgniteAsyncSupport {
      * Restarts nodes defined by provided IDs.
      * <p>
      * <b>NOTE:</b> this command only works for grid nodes started with GridGain
-     * {@code ggstart.sh} or {@code ggstart.bat} scripts.
+     * {@code ignite.sh} or {@code ignite.bat} scripts.
      *
      * @param ids IDs defining nodes to restart.
      * @throws IgniteCheckedException In case of error.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/core/src/main/java/org/apache/ignite/IgniteFs.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteFs.java b/modules/core/src/main/java/org/apache/ignite/IgniteFs.java
index ff7a9b6..7e672f1 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteFs.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteFs.java
@@ -39,8 +39,8 @@ import java.util.*;
  * This API is fully thread-safe and you can use it from several threads.
  * <h1 class="header">GGFS Configuration</h1>
  * The simplest way to run a GridGain node with configured file system is to pass
- * special configuration file included in GridGain distribution to {@code ggstart.sh} or
- * {@code ggstart.bat} scripts, like this: {@code ggstart.sh config/hadoop/default-config.xml}
+ * special configuration file included in GridGain distribution to {@code ignite.sh} or
+ * {@code ignite.bat} scripts, like this: {@code ignite.sh config/hadoop/default-config.xml}
  * <p>
  * {@code GGFS} can be started as a data node or as a client node. Data node is responsible for
  * caching data, while client node is responsible for basic file system operations and accessing

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/core/src/main/java/org/apache/ignite/IgniteLogger.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteLogger.java b/modules/core/src/main/java/org/apache/ignite/IgniteLogger.java
index 0c7dd32..9245e6b 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteLogger.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteLogger.java
@@ -60,7 +60,7 @@ import org.jetbrains.annotations.*;
  * will operate in normal un-suppressed logging mode. Note that all output in "quiet" mode is
  * done through standard output (STDOUT).
  * <p>
- * Note that GridGain's standard startup scripts <tt>$IGNITE_HOME/bin/ggstart.{sh|bat}</tt> start
+ * Note that GridGain's standard startup scripts <tt>$IGNITE_HOME/bin/ignite.{sh|bat}</tt> start
  * by default in "quiet" mode. Both scripts accept {@code -v} arguments to turn off "quiet" mode.
  */
 @GridToStringExclude

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java b/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
index 0af1487..2e3b6aa 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
@@ -114,7 +114,7 @@ public final class IgniteSystemProperties {
      * of Ignite. In quiet mode, only warning and errors are printed into the log
      * additionally to a shortened version of standard output on the start.
      * <p>
-     * Note that if you use <tt>ggstart.{sh|bat}</tt> scripts to start Ignite they
+     * Note that if you use <tt>ignite.{sh|bat}</tt> scripts to start Ignite they
      * start by default in quiet mode. You can supply <tt>-v</tt> flag to override it.
      */
     public static final String IGNITE_QUIET = "IGNITE_QUIET";
@@ -135,7 +135,7 @@ public final class IgniteSystemProperties {
     /**
      * Name of the system property defining success file name. This file
      * is used with auto-restarting functionality when Ignite is started
-     * by supplied <tt>ggstart.{bat|sh}</tt> scripts.
+     * by supplied <tt>ignite.{bat|sh}</tt> scripts.
      */
     public static final String IGNITE_SUCCESS_FILE = "IGNITE_SUCCESS_FILE";
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/core/src/main/java/org/apache/ignite/Ignition.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/Ignition.java b/modules/core/src/main/java/org/apache/ignite/Ignition.java
index ee878ca..478021c 100644
--- a/modules/core/src/main/java/org/apache/ignite/Ignition.java
+++ b/modules/core/src/main/java/org/apache/ignite/Ignition.java
@@ -85,7 +85,7 @@ public class Ignition {
      * for a JVM to restart itself from Java application and therefore we rely on
      * external tools to provide that capability.
      * <p>
-     * Note that standard <tt>ggstart.{sh|bat}</tt> scripts support restarting when
+     * Note that standard <tt>ignite.{sh|bat}</tt> scripts support restarting when
      * JVM process exits with this code.
      */
     public static final int RESTART_EXIT_CODE = 250;
@@ -226,7 +226,7 @@ public class Ignition {
      * should be responsible for stopping it.
      * <p>
      * Note also that restarting functionality only works with the tools that specifically
-     * support GridGain's protocol for restarting. Currently only standard <tt>ggstart.{sh|bat}</tt>
+     * support GridGain's protocol for restarting. Currently only standard <tt>ignite.{sh|bat}</tt>
      * scripts support restarting of JVM GridGain's process.
      *
      * @param cancel If {@code true} then all jobs currently executing on

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/core/src/main/java/org/apache/ignite/client/router/GridRouterFactory.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/client/router/GridRouterFactory.java b/modules/core/src/main/java/org/apache/ignite/client/router/GridRouterFactory.java
index d8ea4f4..4d44c2f 100644
--- a/modules/core/src/main/java/org/apache/ignite/client/router/GridRouterFactory.java
+++ b/modules/core/src/main/java/org/apache/ignite/client/router/GridRouterFactory.java
@@ -34,7 +34,7 @@ import java.util.concurrent.*;
  * See {@link GridTcpRouter} for example on how to configure and start embedded router.
  * <h1 class="header">Standalone router startup</h1>
  * Alternatively you can run routers as a standalone processes by executing
- * {@code IGNITE_HOME/bin/ggrouter.sh} or {@code IGNITE_HOME/bin/ggrouter.bat}.
+ * {@code IGNITE_HOME/bin/igniterouter.sh} or {@code IGNITE_HOME/bin/igniterouter.bat}.
  * They both accept path to a configuration file as first command line argument.
  * See {@code IGNITE_HOME/config/router/default-router.xml} for configuration example.
  *

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/core/src/main/java/org/apache/ignite/configuration/IgniteDeploymentMode.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/IgniteDeploymentMode.java b/modules/core/src/main/java/org/apache/ignite/configuration/IgniteDeploymentMode.java
index e14066c..ba410bc 100644
--- a/modules/core/src/main/java/org/apache/ignite/configuration/IgniteDeploymentMode.java
+++ b/modules/core/src/main/java/org/apache/ignite/configuration/IgniteDeploymentMode.java
@@ -61,7 +61,7 @@ import org.jetbrains.annotations.*;
  * <ol>
  *  <li>
  *      Simply startup stand-alone GridGain nodes by executing
- *      {@code IGNITE_HOME/ggstart.{sh|bat}} scripts.
+ *      {@code IGNITE_HOME/ignite.{sh|bat}} scripts.
  *  </li>
  *  <li>
  *      Now, all jobs executing locally or remotely can have a single instance of cache

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
index 4bd44d6..dc9d81d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
@@ -1678,7 +1678,7 @@ public class IgniteKernal extends ClusterGroupAdapter implements IgniteEx, Ignit
         if (ctx.isEnterprise())
             U.quietAndInfo(log, "To start GUI Management & Monitoring run ggvisorui.{sh|bat}");
         else
-            U.quietAndInfo(log, "To start Console Management & Monitoring run ggvisorcmd.{sh|bat}");
+            U.quietAndInfo(log, "To start Console Management & Monitoring run ignitevisorcmd.{sh|bat}");
     }
 
     /**
@@ -1718,7 +1718,7 @@ public class IgniteKernal extends ClusterGroupAdapter implements IgniteEx, Ignit
                     U.quiet(false, "  ^-- Logging to file '" +  fileName + '\'');
 
                 U.quiet(false,
-                    "  ^-- To see **FULL** console log here add -DIGNITE_QUIET=false or \"-v\" to ggstart.{sh|bat}",
+                    "  ^-- To see **FULL** console log here add -DIGNITE_QUIET=false or \"-v\" to ignite.{sh|bat}",
                     "");
             }
 
@@ -2226,7 +2226,7 @@ public class IgniteKernal extends ClusterGroupAdapter implements IgniteEx, Ignit
 
     /**
      * Whether or not node restart is enabled. Node restart us supported when this node was started
-     * with {@code bin/ggstart.{sh|bat}} script using {@code -r} argument. Node can be
+     * with {@code bin/ignite.{sh|bat}} script using {@code -r} argument. Node can be
      * programmatically restarted using {@link org.apache.ignite.Ignition#restart(boolean)}} method.
      *
      * @return {@code True} if restart mode is enabled, {@code false} otherwise.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
index 0f062dd..7dd9e73 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
@@ -336,7 +336,7 @@ public class IgnitionEx {
      * should be responsible for stopping it.
      * <p>
      * Note also that restarting functionality only works with the tools that specifically
-     * support GridGain's protocol for restarting. Currently only standard <tt>ggstart.{sh|bat}</tt>
+     * support GridGain's protocol for restarting. Currently only standard <tt>ignite.{sh|bat}</tt>
      * scripts support restarting of JVM GridGain's process.
      *
      * @param cancel If {@code true} then all jobs currently executing on

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/core/src/main/java/org/apache/ignite/lifecycle/LifecycleBean.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/lifecycle/LifecycleBean.java b/modules/core/src/main/java/org/apache/ignite/lifecycle/LifecycleBean.java
index b6366b1..0095661 100644
--- a/modules/core/src/main/java/org/apache/ignite/lifecycle/LifecycleBean.java
+++ b/modules/core/src/main/java/org/apache/ignite/lifecycle/LifecycleBean.java
@@ -66,7 +66,7 @@ import org.apache.ignite.*;
  * If you need to tie your application logic into GridGain lifecycle,
  * you can configure lifecycle beans via standard grid configuration, add your
  * application library dependencies into {@code IGNITE_HOME/libs} folder, and
- * simply start {@code IGNITE_HOME/ggstart.{sh|bat}} scripts.
+ * simply start {@code IGNITE_HOME/ignite.{sh|bat}} scripts.
  * <p>
  * <h1 class="header">Configuration</h1>
  * Grid lifecycle beans can be configured programmatically as follows:

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/core/src/main/java/org/apache/ignite/plugin/segmentation/GridSegmentationPolicy.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/plugin/segmentation/GridSegmentationPolicy.java b/modules/core/src/main/java/org/apache/ignite/plugin/segmentation/GridSegmentationPolicy.java
index e1d297c..bed865c 100644
--- a/modules/core/src/main/java/org/apache/ignite/plugin/segmentation/GridSegmentationPolicy.java
+++ b/modules/core/src/main/java/org/apache/ignite/plugin/segmentation/GridSegmentationPolicy.java
@@ -27,7 +27,7 @@ public enum GridSegmentationPolicy {
      * When segmentation policy is {@code RESTART_JVM}, all listeners will receive
      * {@link org.apache.ignite.events.IgniteEventType#EVT_NODE_SEGMENTED} event and then JVM will be restarted.
      * Note, that this will work <b>only</b> if GridGain is started with {@link org.apache.ignite.startup.cmdline.CommandLineStartup}
-     * via standard {@code ggstart.{sh|bat}} shell script.
+     * via standard {@code ignite.{sh|bat}} shell script.
      */
     RESTART_JVM,
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/core/src/main/java/org/apache/ignite/startup/cmdline/CommandLineStartup.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/startup/cmdline/CommandLineStartup.java b/modules/core/src/main/java/org/apache/ignite/startup/cmdline/CommandLineStartup.java
index 7ee575a..52d5f20 100644
--- a/modules/core/src/main/java/org/apache/ignite/startup/cmdline/CommandLineStartup.java
+++ b/modules/core/src/main/java/org/apache/ignite/startup/cmdline/CommandLineStartup.java
@@ -47,7 +47,7 @@ import static org.apache.ignite.internal.GridProductImpl.*;
  * parameter which is Spring XML configuration file path. You can run this class from command
  * line without parameters to get help message.
  * <p>
- * Note that scripts {@code ${IGNITE_HOME}/bin/ggstart.{sh|bat}} shipped with GridGain use
+ * Note that scripts {@code ${IGNITE_HOME}/bin/ignite.{sh|bat}} shipped with GridGain use
  * this startup and you can use them as an example.
  */
 @SuppressWarnings({"CallToSystemExit"})
@@ -144,23 +144,23 @@ public final class CommandLineStartup {
         if (errMsg != null)
             X.error(errMsg);
 
-        String runner = System.getProperty(IGNITE_PROG_NAME, "ggstart.{sh|bat}");
+        String runner = System.getProperty(IGNITE_PROG_NAME, "ignite.{sh|bat}");
 
         int space = runner.indexOf(' ');
 
         runner = runner.substring(0, space == -1 ? runner.length() : space);
 
         if (showUsage) {
-            boolean ggstart = runner.contains("ggstart.");
+            boolean ignite = runner.contains("ignite.");
 
             X.error(
                 "Usage:",
-                "    " + runner + (ggstart ? " [?]|[path {-v}]|[-i]" : " [?]|[-v]"),
+                "    " + runner + (ignite ? " [?]|[path {-v}]|[-i]" : " [?]|[-v]"),
                 "    Where:",
                 "    ?, /help, -help - show this message.",
                 "    -v              - verbose mode (quiet by default).");
 
-            if (ggstart) {
+            if (ignite) {
                 X.error(
                     "    -i              - interactive mode (choose configuration file from list).",
                     "    path            - path to Spring XML configuration file.",

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/core/src/main/java/org/apache/ignite/startup/cmdline/CommandLineTransformer.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/startup/cmdline/CommandLineTransformer.java b/modules/core/src/main/java/org/apache/ignite/startup/cmdline/CommandLineTransformer.java
index e9e3726..2a29095 100644
--- a/modules/core/src/main/java/org/apache/ignite/startup/cmdline/CommandLineTransformer.java
+++ b/modules/core/src/main/java/org/apache/ignite/startup/cmdline/CommandLineTransformer.java
@@ -26,12 +26,12 @@ import java.util.*;
  * Windows batch usage variables.
  * <p>
  * The idea behind the workaround is:<br>
- * 1. User runs ggstart.bat with some args.<br>
- * 2. ggstart.bat calls parseargs.bat with all that args.<br>
+ * 1. User runs ignite.bat with some args.<br>
+ * 2. ignite.bat calls parseargs.bat with all that args.<br>
  * 3. parsearg.bat runs this class with all that args.<br>
  * 4. This class transforms the args and prints them out.<br>
  * 5. parseargs.bat splits the output of this class and sets each variable it found.<br>
- * 6. ggstart.bat uses environment variables as if they were defined by a user.
+ * 6. ignite.bat uses environment variables as if they were defined by a user.
  * <p>
  *
  * @see <a href="http://jcommander.org/">JCommander command line parameters parsing library</a>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/core/src/test/bin/start-nodes-custom.bat
----------------------------------------------------------------------
diff --git a/modules/core/src/test/bin/start-nodes-custom.bat b/modules/core/src/test/bin/start-nodes-custom.bat
index ad4829b..51fbce0 100644
--- a/modules/core/src/test/bin/start-nodes-custom.bat
+++ b/modules/core/src/test/bin/start-nodes-custom.bat
@@ -19,4 +19,4 @@ if %SCRIPT_DIR:~-1,1% == \ set SCRIPT_DIR=%SCRIPT_DIR:~0,-1%
 
 :: -np option is mandatory, if it is not provided then we will wait for a user input,
 :: as a result ggservice windows service hangs forever
-call "%SCRIPT_DIR%\..\..\..\..\..\bin\ggstart.bat" -v -np modules\core\src\test\config\spring-start-nodes-attr.xml
+call "%SCRIPT_DIR%\..\..\..\..\..\bin\ignite.bat" -v -np modules\core\src\test\config\spring-start-nodes-attr.xml

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/core/src/test/bin/start-nodes-custom.sh
----------------------------------------------------------------------
diff --git a/modules/core/src/test/bin/start-nodes-custom.sh b/modules/core/src/test/bin/start-nodes-custom.sh
index 6845b79..75dba94 100755
--- a/modules/core/src/test/bin/start-nodes-custom.sh
+++ b/modules/core/src/test/bin/start-nodes-custom.sh
@@ -18,4 +18,4 @@ SCRIPT_DIR=$(cd $(dirname "$0"); pwd)
 
 BIN_DIR="${SCRIPT_DIR}"/../../../../..
 
-"${BIN_DIR}"/bin/ggstart.sh -v modules/core/src/test/config/spring-start-nodes-attr.xml
+"${BIN_DIR}"/bin/ignite.sh -v modules/core/src/test/config/spring-start-nodes-attr.xml


[07/50] [abbrv] incubator-ignite git commit: Fix IgniteCacheIterator

Posted by se...@apache.org.
Fix IgniteCacheIterator


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

Branch: refs/heads/ignite-sql
Commit: 9900ae49ba2b839eb3c549bb95cdf397743a8303
Parents: 4535322
Author: ivasilinets <iv...@gridgain.com>
Authored: Thu Jan 29 18:14:08 2015 +0300
Committer: ivasilinets <iv...@gridgain.com>
Committed: Thu Jan 29 18:14:08 2015 +0300

----------------------------------------------------------------------
 .../processors/cache/GridCacheAdapter.java      | 16 ++-----
 .../processors/cache/IgniteCacheProxy.java      |  2 +-
 .../GridCacheAbstractProjectionSelfTest.java    | 50 ++++++++++++++++++++
 3 files changed, 54 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9900ae49/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
index 92d2039..1c04d29 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
@@ -3887,10 +3887,10 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
     }
 
     /**
-     * @param prj Projection.
+     * @param delegate Cache proxy.
      * @return Distributed ignite cache iterator.
      */
-    public Iterator<Cache.Entry<K, V>> igniteIterator(final GridCacheProjectionImpl<K, V> prj) {
+    public Iterator<Cache.Entry<K, V>> igniteIterator(final IgniteCacheProxy<K, V> delegate) {
         CacheQueryFuture<Map.Entry<K, V>> fut = queries().createScanQuery(null)
             .keepAll(false)
             .execute();
@@ -3901,17 +3901,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
             }
 
             @Override protected void remove(Cache.Entry<K, V> item) {
-                GridCacheProjectionImpl<K, V> prev = ctx.gate().enter(prj);
-
-                try {
-                    GridCacheAdapter.this.removex(item.getKey());
-                }
-                catch (IgniteCheckedException e) {
-                    throw new CacheException(e);
-                }
-                finally {
-                    ctx.gate().leave(prev);
-                }
+                delegate.remove(item.getKey());
             }
         });
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9900ae49/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
index 743e5b9..0bb2543 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
@@ -943,7 +943,7 @@ public class IgniteCacheProxy<K, V> extends IgniteAsyncSupportAdapter<IgniteCach
         GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
 
         try {
-            return ((GridCacheAdapter)delegate).igniteIterator(prj);
+            return ctx.cache().igniteIterator(this);
         }
         finally {
             gate.leave(prev);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9900ae49/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractProjectionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractProjectionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractProjectionSelfTest.java
index 6337339..acdeede 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractProjectionSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractProjectionSelfTest.java
@@ -617,6 +617,56 @@ public abstract class GridCacheAbstractProjectionSelfTest extends GridCacheAbstr
     /**
      * @throws Exception if failed.
      */
+    public void testSkipStoreIterator() throws Exception {
+        assertNull(cache().put("1", 100500));
+
+        IgniteCache<String, Integer> c = jcache().withSkipStore();
+
+        Iterator i = c.iterator();
+
+        assertTrue(i.hasNext());
+
+        i.next();
+
+        i.remove();
+
+        i = c.iterator();
+
+        assertFalse(i.hasNext());
+
+        assertNull(c.get("1"));
+
+        assertEquals(100500, map.get("1"));
+    }
+
+    /**
+     * @throws Exception if failed.
+     */
+    public void testNotSkipStoreIterator() throws Exception {
+        assertNull(cache().put("1", 100500));
+
+        IgniteCache<String, Integer> c = jcache();
+
+        Iterator i = c.iterator();
+
+        assertTrue(i.hasNext());
+
+        i.next();
+
+        i.remove();
+
+        i = c.iterator();
+
+        assertFalse(i.hasNext());
+
+        assertNull(c.get("1"));
+
+        assertNull(map.get("1"));
+    }
+
+    /**
+     * @throws Exception if failed.
+     */
     // TODO: enable when GG-7579 is fixed.
     public void _testSkipStoreFlagMultinode() throws Exception {
         final int nGrids = 3;


[18/50] [abbrv] incubator-ignite git commit: Merge remote-tracking branch 'remotes/origin/sprint-1' into ignite-72-1

Posted by se...@apache.org.
Merge remote-tracking branch 'remotes/origin/sprint-1' into ignite-72-1


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

Branch: refs/heads/ignite-sql
Commit: e19655dfb3fd53f5423d3842bce7ca3395dc0f3b
Parents: 18e02cd 9550905
Author: avinogradov <av...@gridgain.com>
Authored: Fri Jan 30 11:30:11 2015 +0300
Committer: avinogradov <av...@gridgain.com>
Committed: Fri Jan 30 11:30:11 2015 +0300

----------------------------------------------------------------------
 assembly/release-base-fabric.xml                |    2 +-
 assembly/release-hadoop.xml                     |    6 +-
 ipc/shmem/Makefile.am                           |    2 +-
 ipc/shmem/Makefile.in                           |    2 +-
 ipc/shmem/configure                             |    4 +-
 ipc/shmem/configure.ac                          |    2 +-
 ipc/shmem/ggshmem/Makefile.am                   |   23 -
 ipc/shmem/ggshmem/Makefile.in                   |  589 --
 ..._util_ipc_shmem_GridIpcSharedMemoryUtils.cpp |  882 --
 ipc/shmem/igniteshmem/Makefile.am               |   23 +
 ipc/shmem/igniteshmem/Makefile.in               |  589 ++
 ...rnal_util_ipc_shmem_IpcSharedMemoryUtils.cpp |  882 ++
 ipc/shmem/include/Makefile.am                   |    2 +-
 ipc/shmem/include/Makefile.in                   |    2 +-
 ...ternal_util_ipc_shmem_IpcSharedMemoryUtils.h |  117 +
 ...id_util_ipc_shmem_GridIpcSharedMemoryUtils.h |  117 -
 ipc/shmem/readme.txt                            |    9 +-
 .../spi/checkpoint/s3/S3CheckpointSpi.java      |    4 +-
 .../ClientAbstractMultiThreadedSelfTest.java    |    2 +-
 .../ClientPropertiesConfigurationSelfTest.java  |    4 +-
 .../ClientAbstractMultiNodeSelfTest.java        |    4 +-
 .../rest/RestBinaryProtocolSelfTest.java        |    2 +-
 .../rest/TaskCommandHandlerSelfTest.java        |    2 +-
 .../java/META-INF/native/linux64/libggshmem.so  |  Bin 138023 -> 0 bytes
 .../META-INF/native/linux64/libigniteshmem.so   |  Bin 0 -> 138345 bytes
 .../java/META-INF/native/osx/libggshmem.dylib   |  Bin 32940 -> 0 bytes
 .../META-INF/native/osx/libigniteshmem.dylib    |  Bin 0 -> 33116 bytes
 .../apache/ignite/IgniteCheckedException.java   |    2 +-
 .../java/org/apache/ignite/IgniteException.java |    2 +-
 .../main/java/org/apache/ignite/Ignition.java   |   38 +-
 .../apache/ignite/cache/CachingProvider.java    |    2 +-
 .../ignite/fs/mapreduce/IgniteFsTask.java       |    2 +-
 .../ignite/internal/ClusterGroupAdapter.java    |    2 +-
 .../internal/ClusterNodeLocalMapImpl.java       |    2 +-
 .../java/org/apache/ignite/internal/GridEx.java |  143 -
 .../org/apache/ignite/internal/GridGainEx.java  | 2399 -----
 .../org/apache/ignite/internal/GridKernal.java  | 3322 -------
 .../ignite/internal/GridKernalContext.java      |    2 +-
 .../ignite/internal/GridKernalContextImpl.java  |    8 +-
 .../apache/ignite/internal/GridLoggerProxy.java |    2 +-
 .../ignite/internal/GridUpdateNotifier.java     |    2 +-
 .../ignite/internal/IgniteClusterAsyncImpl.java |    4 +-
 .../org/apache/ignite/internal/IgniteEx.java    |  143 +
 .../apache/ignite/internal/IgniteKernal.java    | 3322 +++++++
 .../org/apache/ignite/internal/IgnitionEx.java  | 2396 +++++
 .../processors/affinity/GridAffinityUtils.java  |    2 +-
 .../processors/cache/GridCacheAdapter.java      |   24 +-
 .../processors/cache/GridCacheContext.java      |    4 +-
 .../cache/GridCacheDeploymentManager.java       |    2 +-
 .../cache/GridCacheMvccCandidate.java           |    4 +-
 .../processors/cache/GridCacheStoreManager.java |   25 +-
 .../processors/cache/IgniteCacheProxy.java      |   24 +-
 .../GridCacheDataStructuresManager.java         |    4 +-
 .../cache/query/GridCacheQueryManager.java      |    2 +-
 .../jdbc/GridCacheQueryJdbcMetadataTask.java    |    2 +-
 .../query/jdbc/GridCacheQueryJdbcTask.java      |    2 +-
 .../transactions/IgniteTxLocalAdapter.java      |   42 +-
 .../dr/GridDrDataLoadCacheUpdater.java          |    2 +-
 .../internal/processors/fs/GridGgfsImpl.java    |    2 +-
 .../internal/processors/fs/GridGgfsServer.java  |   26 +-
 .../processors/fs/GridGgfsServerManager.java    |    8 +-
 .../processors/fs/IgniteFsNoopProcessor.java    |    2 +-
 .../processors/fs/IgniteFsProcessor.java        |    4 +-
 .../processors/fs/IgniteFsProcessorAdapter.java |    2 +-
 .../resource/GridResourceProcessor.java         |    2 +-
 .../resource/GridSpringResourceContext.java     |    2 +-
 .../handlers/cache/GridCacheCommandHandler.java |    6 +-
 .../handlers/task/GridTaskCommandHandler.java   |    2 +-
 .../service/GridServiceProcessor.java           |    2 +-
 .../processors/service/GridServiceProxy.java    |    2 +-
 .../apache/ignite/internal/util/GridUtils.java  | 9100 -----------------
 .../ignite/internal/util/IgniteUtils.java       | 9141 ++++++++++++++++++
 .../internal/util/ipc/GridIpcEndpoint.java      |   49 -
 .../util/ipc/GridIpcEndpointBindException.java  |   47 -
 .../util/ipc/GridIpcEndpointFactory.java        |   84 -
 .../internal/util/ipc/GridIpcEndpointType.java  |   29 -
 .../util/ipc/GridIpcServerEndpoint.java         |   73 -
 .../ipc/GridIpcServerEndpointDeserializer.java  |   66 -
 .../internal/util/ipc/GridIpcToNioAdapter.java  |  250 -
 .../ignite/internal/util/ipc/IpcEndpoint.java   |   49 +
 .../util/ipc/IpcEndpointBindException.java      |   47 +
 .../internal/util/ipc/IpcEndpointFactory.java   |   84 +
 .../internal/util/ipc/IpcEndpointType.java      |   29 +
 .../internal/util/ipc/IpcServerEndpoint.java    |   73 +
 .../util/ipc/IpcServerEndpointDeserializer.java |   66 +
 .../internal/util/ipc/IpcToNioAdapter.java      |  250 +
 .../ipc/loopback/GridIpcClientTcpEndpoint.java  |   87 -
 .../ipc/loopback/GridIpcServerTcpEndpoint.java  |  179 -
 .../util/ipc/loopback/IpcClientTcpEndpoint.java |   87 +
 .../util/ipc/loopback/IpcServerTcpEndpoint.java |  179 +
 .../GridIpcOutOfSystemResourcesException.java   |   59 -
 .../GridIpcSharedMemoryClientEndpoint.java      |  336 -
 .../shmem/GridIpcSharedMemoryInitRequest.java   |   67 -
 .../shmem/GridIpcSharedMemoryInitResponse.java  |  171 -
 .../shmem/GridIpcSharedMemoryInputStream.java   |   99 -
 .../shmem/GridIpcSharedMemoryNativeLoader.java  |  242 -
 ...cSharedMemoryOperationTimedoutException.java |   59 -
 .../shmem/GridIpcSharedMemoryOutputStream.java  |   80 -
 .../GridIpcSharedMemoryServerEndpoint.java      |  707 --
 .../ipc/shmem/GridIpcSharedMemorySpace.java     |  374 -
 .../ipc/shmem/GridIpcSharedMemoryUtils.java     |  242 -
 .../shmem/IpcOutOfSystemResourcesException.java |   59 +
 .../shmem/IpcSharedMemoryClientEndpoint.java    |  336 +
 .../ipc/shmem/IpcSharedMemoryInitRequest.java   |   67 +
 .../ipc/shmem/IpcSharedMemoryInitResponse.java  |  171 +
 .../ipc/shmem/IpcSharedMemoryInputStream.java   |   99 +
 .../ipc/shmem/IpcSharedMemoryNativeLoader.java  |  261 +
 ...cSharedMemoryOperationTimedoutException.java |   59 +
 .../ipc/shmem/IpcSharedMemoryOutputStream.java  |   80 +
 .../shmem/IpcSharedMemoryServerEndpoint.java    |  707 ++
 .../util/ipc/shmem/IpcSharedMemorySpace.java    |  374 +
 .../util/ipc/shmem/IpcSharedMemoryUtils.java    |  242 +
 .../util/nio/GridShmemCommunicationClient.java  |    4 +-
 .../internal/util/typedef/internal/U.java       |    4 +-
 .../apache/ignite/internal/visor/VisorJob.java  |    2 +-
 .../internal/visor/VisorMultiNodeTask.java      |    2 +-
 .../ignite/internal/visor/cache/VisorCache.java |    2 +-
 .../compute/VisorComputeMonitoringHolder.java   |   10 +-
 .../visor/misc/VisorResolveHostNameTask.java    |    2 +-
 .../visor/node/VisorBasicConfiguration.java     |    2 +-
 .../visor/node/VisorGridConfiguration.java      |    2 +-
 .../visor/node/VisorNodeDataCollectorJob.java   |    6 +-
 .../internal/visor/query/VisorQueryTask.java    |    2 +-
 .../internal/visor/query/VisorQueryUtils.java   |    4 +-
 .../ignite/lang/IgniteAsyncSupportAdapter.java  |   27 +-
 .../optimized/IgniteOptimizedMarshaller.java    |    2 +-
 .../communication/tcp/TcpCommunicationSpi.java  |   24 +-
 .../StreamerCacheAffinityEventRouter.java       |    2 +-
 .../ignite/GridExceptionHelpLinksSelfTest.java  |  106 -
 .../ignite/GridExternalizableAbstractTest.java  |   41 -
 .../IgniteExceptionHelpLinksSelfTest.java       |  105 +
 .../IgniteExternalizableAbstractTest.java       |   41 +
 ...CachePartitionFairAffinityNodesSelfTest.java |    6 +-
 ...CacheJdbcBlobStoreMultithreadedSelfTest.java |    2 +-
 .../fs/GridGgfsEventsAbstractSelfTest.java      |    2 +-
 .../ignite/fs/GridGgfsFragmentizerSelfTest.java |    2 +-
 .../internal/GridDiscoveryEventSelfTest.java    |    3 +-
 .../ignite/internal/GridDiscoverySelfTest.java  |    4 +-
 .../GridEventStorageCheckAllEventsSelfTest.java |    2 +-
 .../internal/GridExecutorServiceTest.java       |  315 -
 .../GridExplicitImplicitDeploymentSelfTest.java |  476 -
 .../ignite/internal/GridKernalTestUtils.java    |    3 +-
 .../internal/GridListenActorSelfTest.java       |    3 +-
 .../GridTopicExternalizableSelfTest.java        |    3 +-
 .../GridTopologyBuildVersionSelfTest.java       |    2 +-
 .../internal/GridUpdateNotifierSelfTest.java    |    3 +-
 .../internal/IgniteExecutorServiceTest.java     |  315 +
 ...gniteExplicitImplicitDeploymentSelfTest.java |  476 +
 .../GridCheckpointManagerAbstractSelfTest.java  |    2 +-
 .../GridCommunicationSendMessageSelfTest.java   |    4 +-
 .../GridDiscoveryManagerAliveCacheSelfTest.java |    2 +-
 .../discovery/GridDiscoveryManagerSelfTest.java |    6 +-
 .../swapspace/GridSwapSpaceManagerSelfTest.java |    2 +-
 .../GridAffinityProcessorAbstractSelfTest.java  |    6 +-
 .../cache/GridCacheAbstractFullApiSelfTest.java |    4 +-
 .../cache/GridCacheAbstractMetricsSelfTest.java |   10 +-
 .../GridCacheAbstractProjectionSelfTest.java    |   50 +
 .../cache/GridCacheAbstractSelfTest.java        |    2 +-
 .../cache/GridCacheAffinityApiSelfTest.java     |    4 +-
 .../GridCacheConcurrentTxMultiNodeTest.java     |    4 +-
 .../cache/GridCacheEntryVersionSelfTest.java    |    4 +-
 .../GridCacheFinishPartitionsSelfTest.java      |    4 +-
 .../GridCacheGroupLockAbstractSelfTest.java     |    4 +-
 .../processors/cache/GridCacheLeakTest.java     |    2 +-
 ...GridCacheMixedPartitionExchangeSelfTest.java |    2 +-
 .../cache/GridCacheMultiUpdateLockSelfTest.java |    2 +-
 .../cache/GridCacheMvccFlagsTest.java           |    4 +-
 .../cache/GridCacheMvccManagerSelfTest.java     |    4 +-
 .../cache/GridCacheMvccPartitionedSelfTest.java |    4 +-
 .../processors/cache/GridCacheMvccSelfTest.java |    4 +-
 .../cache/GridCacheNestedTxAbstractTest.java    |    2 +-
 .../cache/GridCacheObjectToStringSelfTest.java  |    2 +-
 .../GridCacheOrderedPreloadingSelfTest.java     |    2 +-
 .../cache/GridCacheP2PUndeploySelfTest.java     |    6 +-
 .../cache/GridCachePartitionedGetSelfTest.java  |    2 +-
 .../GridCachePreloadingEvictionsSelfTest.java   |    6 +-
 .../GridCacheQueryInternalKeysSelfTest.java     |    2 +-
 .../GridCacheReturnValueTransferSelfTest.java   |    2 +-
 .../cache/GridCacheSlowTxWarnTest.java          |    4 +-
 .../cache/GridCacheStoreValueBytesSelfTest.java |    4 +-
 .../cache/GridCacheSwapReloadSelfTest.java      |    2 +-
 .../cache/GridCacheTtlManagerLoadTest.java      |    2 +-
 .../cache/GridCacheTtlManagerSelfTest.java      |    2 +-
 .../IgniteCacheEntryListenerAbstractTest.java   |    2 +-
 .../cache/IgniteCacheInvokeAbstractTest.java    |    4 +-
 .../processors/cache/IgniteTxAbstractTest.java  |    2 +-
 .../IgniteTxConcurrentGetAbstractTest.java      |    3 +-
 .../IgniteTxExceptionAbstractSelfTest.java      |    2 +-
 .../cache/IgniteTxMultiNodeAbstractTest.java    |    6 +-
 .../IgniteTxStoreExceptionAbstractSelfTest.java |    2 +-
 ...actQueueFailoverDataConsistencySelfTest.java |    2 +-
 .../GridCacheCountDownLatchSelfTest.java        |    2 +-
 .../GridCacheQueueCleanupSelfTest.java          |    2 +-
 .../GridCacheSetAbstractSelfTest.java           |    8 +-
 .../GridCacheSetFailoverAbstractSelfTest.java   |    2 +-
 .../GridCacheAtomicTimeoutSelfTest.java         |    2 +-
 .../distributed/GridCacheEventAbstractTest.java |    2 +-
 ...heExpiredEntriesPreloadAbstractSelfTest.java |    2 +-
 .../GridCacheMultiNodeLockAbstractTest.java     |    2 +-
 .../IgniteCrossCacheTxStoreSelfTest.java        |  288 +
 ...iteTxConsistencyRestartAbstractSelfTest.java |    4 +-
 ...xOriginatingNodeFailureAbstractSelfTest.java |   10 +-
 ...cOriginatingNodeFailureAbstractSelfTest.java |   20 +-
 .../dht/GridCacheAtomicNearCacheSelfTest.java   |    2 +-
 .../dht/GridCacheColocatedDebugTest.java        |    6 +-
 .../dht/GridCacheDhtEntrySelfTest.java          |    2 +-
 ...GridCacheDhtEvictionNearReadersSelfTest.java |    4 +-
 .../dht/GridCacheDhtEvictionSelfTest.java       |    4 +-
 .../dht/GridCacheDhtMappingSelfTest.java        |    2 +-
 .../dht/GridCacheDhtPreloadDelayedSelfTest.java |    2 +-
 .../GridCacheDhtPreloadStartStopSelfTest.java   |    2 +-
 ...dCachePartitionedTopologyChangeSelfTest.java |   32 +-
 ...itionedTxOriginatingNodeFailureSelfTest.java |    8 +-
 ...eAtomicInvalidPartitionHandlingSelfTest.java |    2 +-
 .../atomic/GridCacheAtomicPreloadSelfTest.java  |    4 +-
 ...GridCacheValueConsistencyAtomicSelfTest.java |    2 +-
 .../near/GridCacheNearMultiNodeSelfTest.java    |    6 +-
 .../near/GridCacheNearReadersSelfTest.java      |    4 +-
 .../near/GridCacheNearTxMultiNodeSelfTest.java  |    2 +-
 .../GridCachePartitionedFullApiSelfTest.java    |    4 +-
 ...achePartitionedMultiNodeCounterSelfTest.java |    2 +-
 .../GridCachePartitionedProjectionSelfTest.java |    4 +-
 .../GridCachePartitionedTxSalvageSelfTest.java  |    2 +-
 .../IgniteCacheExpiryPolicyAbstractTest.java    |    2 +-
 .../IgniteCacheTxStoreSessionTest.java          |   11 +-
 ...ridCacheContinuousQueryAbstractSelfTest.java |    4 +-
 .../clock/GridTimeSyncProcessorSelfTest.java    |    6 +-
 .../continuous/GridEventConsumeSelfTest.java    |    2 +-
 .../processors/fs/GridGgfsAbstractSelfTest.java |    2 +-
 .../processors/fs/GridGgfsModesSelfTest.java    |    4 +-
 .../fs/GridGgfsProcessorSelfTest.java           |    2 +-
 ...IpcEndpointRegistrationAbstractSelfTest.java |    6 +-
 ...pcEndpointRegistrationOnWindowsSelfTest.java |    4 +-
 .../processors/fs/GridGgfsSizeSelfTest.java     |    8 +-
 .../cache/GridCacheCommandHandlerSelfTest.java  |   10 +-
 .../GridServiceReassignmentSelfTest.java        |    2 +-
 ...artupWithSpecifiedWorkDirectorySelfTest.java |    2 +-
 ...tartupWithUndefinedGridGainHomeSelfTest.java |    4 +-
 .../internal/util/GridTestClockTimer.java       |    6 +-
 .../ignite/internal/util/GridUtilsSelfTest.java |  717 --
 .../internal/util/IgniteUtilsSelfTest.java      |  728 ++
 .../util/future/GridFinishedFutureSelfTest.java |    2 +-
 ...idIpcServerEndpointDeserializerSelfTest.java |  160 -
 .../IpcServerEndpointDeserializerSelfTest.java  |  160 +
 .../ipc/shmem/GgfsSharedMemoryTestClient.java   |   76 +
 .../ipc/shmem/GgfsSharedMemoryTestServer.java   |   71 +
 .../shmem/GridGgfsSharedMemoryTestClient.java   |   76 -
 .../shmem/GridGgfsSharedMemoryTestServer.java   |   71 -
 ...idIpcSharedMemoryCrashDetectionSelfTest.java |  500 -
 .../shmem/GridIpcSharedMemoryFakeClient.java    |   36 -
 .../shmem/GridIpcSharedMemoryNodeStartup.java   |   87 -
 .../shmem/GridIpcSharedMemorySpaceSelfTest.java |  267 -
 .../shmem/GridIpcSharedMemoryUtilsSelfTest.java |   84 -
 .../IpcSharedMemoryCrashDetectionSelfTest.java  |  500 +
 .../ipc/shmem/IpcSharedMemoryFakeClient.java    |   36 +
 .../IpcSharedMemoryNativeLoaderSelfTest.java    |   78 +
 .../ipc/shmem/IpcSharedMemoryNodeStartup.java   |   87 +
 .../ipc/shmem/IpcSharedMemorySpaceSelfTest.java |  267 +
 .../ipc/shmem/IpcSharedMemoryUtilsSelfTest.java |   84 +
 .../LoadWithCorruptedLibFileTestRunner.java     |   65 +
 .../GridIpcSharedMemoryBenchmarkParty.java      |   35 -
 .../GridIpcSharedMemoryBenchmarkReader.java     |  133 -
 .../GridIpcSharedMemoryBenchmarkWriter.java     |  125 -
 .../IpcSharedMemoryBenchmarkParty.java          |   35 +
 .../IpcSharedMemoryBenchmarkReader.java         |  133 +
 .../IpcSharedMemoryBenchmarkWriter.java         |  125 +
 .../ignite/lang/GridSetWrapperSelfTest.java     |    2 +-
 .../cache/GridCachePutRemoveLoadTest.java       |    2 +-
 .../communication/GridIoManagerBenchmark.java   |   10 +-
 .../communication/GridIoManagerBenchmark0.java  |   12 +-
 .../ignite/loadtests/dsi/GridDsiPerfJob.java    |    2 +-
 .../marshaller/GridMarshallerAbstractTest.java  |    6 +-
 .../tcp/GridTcpDiscoveryMultiThreadedTest.java  |    2 +-
 .../discovery/tcp/GridTcpDiscoverySelfTest.java |   14 +-
 .../ignite/testframework/GridTestUtils.java     |    4 +-
 .../testframework/junits/GridAbstractTest.java  |   14 +-
 .../junits/GridTestKernalContext.java           |    2 +-
 .../junits/common/GridCommonAbstractTest.java   |   22 +-
 .../ignite/testsuites/IgniteBasicTestSuite.java |    2 +-
 .../ignite/testsuites/IgniteCacheTestSuite.java |    1 +
 .../testsuites/IgniteComputeGridTestSuite.java  |    4 +-
 .../ignite/testsuites/IgniteFsTestSuite.java    |    2 +-
 .../IgniteIpcSharedMemorySelfTestSuite.java     |    7 +-
 .../testsuites/IgniteUtilSelfTestSuite.java     |    2 +-
 .../internal/fs/hadoop/GridGgfsHadoopIpcIo.java |   10 +-
 .../GridHadoopDefaultMapReducePlanner.java      |    2 +-
 .../GridHadoopExternalCommunication.java        |   26 +-
 .../GridHadoopIpcToNioAdapter.java              |    6 +-
 ...doop20FileSystemLoopbackPrimarySelfTest.java |    2 +-
 ...sHadoop20FileSystemShmemPrimarySelfTest.java |    2 +-
 .../GridGgfsHadoopFileSystemClientSelfTest.java |    4 +-
 ...idGgfsHadoopFileSystemHandshakeSelfTest.java |    2 +-
 ...ridGgfsHadoopFileSystemIpcCacheSelfTest.java |    2 +-
 ...adoopFileSystemLoopbackAbstractSelfTest.java |    2 +-
 ...fsHadoopFileSystemShmemAbstractSelfTest.java |    8 +-
 .../fs/GridGgfsNearOnlyMultiNodeSelfTest.java   |    4 +-
 .../ignite/fs/IgniteFsEventsTestSuite.java      |    4 +-
 ...idHadoopDefaultMapReducePlannerSelfTest.java |    4 +-
 .../hadoop/GridHadoopJobTrackerSelfTest.java    |    2 +-
 .../cache/GridCacheAbstractQuerySelfTest.java   |    6 +-
 .../cache/GridCacheOffHeapAndSwapSelfTest.java  |    4 +-
 .../cache/GridCacheQueryLoadSelfTest.java       |    2 +-
 .../GridCacheQueryMultiThreadedSelfTest.java    |    8 +-
 .../GridCacheReplicatedFieldsQuerySelfTest.java |    2 +-
 .../GridCacheReplicatedQuerySelfTest.java       |    4 +-
 .../query/h2/sql/GridQueryParsingTest.java      |    2 +-
 .../tcp/GridOrderedMessageCancelSelfTest.java   |    2 +-
 .../GridTmLookupLifecycleAwareSelfTest.java     |    2 +-
 .../java/org/apache/ignite/IgniteSpring.java    |    8 +-
 .../cache/spring/SpringDynamicCacheManager.java |    2 +-
 .../ignite/visor/commands/VisorConsole.scala    |    6 +-
 .../commands/alert/VisorAlertCommand.scala      |    2 +-
 .../config/VisorConfigurationCommand.scala      |    6 +-
 .../commands/deploy/VisorDeployCommand.scala    |    4 +-
 .../commands/disco/VisorDiscoveryCommand.scala  |    4 +-
 .../commands/events/VisorEventsCommand.scala    |    4 +-
 .../visor/commands/gc/VisorGcCommand.scala      |   13 +-
 .../visor/commands/node/VisorNodeCommand.scala  |    4 +-
 .../commands/start/VisorStartCommand.scala      |    4 +-
 .../commands/tasks/VisorTasksCommand.scala      |    4 +-
 .../commands/top/VisorTopologyCommand.scala     |    6 +-
 .../visor/commands/vvm/VisorVvmCommand.scala    |    8 +-
 .../scala/org/apache/ignite/visor/visor.scala   |   26 +-
 .../visor/commands/gc/VisorGcCommandSpec.scala  |   25 +-
 .../GridServletContextListenerStartup.java      |    4 +-
 .../startup/servlet/GridServletStartup.java     |    4 +-
 326 files changed, 24257 insertions(+), 23673 deletions(-)
----------------------------------------------------------------------



[19/50] [abbrv] incubator-ignite git commit: Merge remote-tracking branch 'remotes/origin/sprint-1' into ignite-69

Posted by se...@apache.org.
Merge remote-tracking branch 'remotes/origin/sprint-1' into ignite-69


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

Branch: refs/heads/ignite-sql
Commit: 5a50356e2f06f633ea3da1516694d606bc03cd48
Parents: a297fb3 9550905
Author: avinogradov <av...@gridgain.com>
Authored: Fri Jan 30 11:33:01 2015 +0300
Committer: avinogradov <av...@gridgain.com>
Committed: Fri Jan 30 11:33:01 2015 +0300

----------------------------------------------------------------------
 assembly/release-hadoop.xml                     |    6 +-
 ipc/shmem/Makefile.am                           |    2 +-
 ipc/shmem/Makefile.in                           |    2 +-
 ipc/shmem/configure                             |    4 +-
 ipc/shmem/configure.ac                          |    2 +-
 ipc/shmem/ggshmem/Makefile.am                   |   23 -
 ipc/shmem/ggshmem/Makefile.in                   |  589 --
 ..._util_ipc_shmem_GridIpcSharedMemoryUtils.cpp |  882 --
 ipc/shmem/igniteshmem/Makefile.am               |   23 +
 ipc/shmem/igniteshmem/Makefile.in               |  589 ++
 ...rnal_util_ipc_shmem_IpcSharedMemoryUtils.cpp |  882 ++
 ipc/shmem/include/Makefile.am                   |    2 +-
 ipc/shmem/include/Makefile.in                   |    2 +-
 ...ternal_util_ipc_shmem_IpcSharedMemoryUtils.h |  117 +
 ...id_util_ipc_shmem_GridIpcSharedMemoryUtils.h |  117 -
 ipc/shmem/readme.txt                            |    9 +-
 .../spi/checkpoint/s3/S3CheckpointSpi.java      |    4 +-
 .../ClientPropertiesConfigurationSelfTest.java  |    4 +-
 .../java/META-INF/native/linux64/libggshmem.so  |  Bin 138023 -> 0 bytes
 .../META-INF/native/linux64/libigniteshmem.so   |  Bin 0 -> 138345 bytes
 .../java/META-INF/native/osx/libggshmem.dylib   |  Bin 32940 -> 0 bytes
 .../META-INF/native/osx/libigniteshmem.dylib    |  Bin 0 -> 33116 bytes
 .../apache/ignite/IgniteCheckedException.java   |    2 +-
 .../java/org/apache/ignite/IgniteException.java |    2 +-
 .../processors/cache/GridCacheAdapter.java      |   16 +-
 .../cache/GridCacheDeploymentManager.java       |    2 +-
 .../cache/GridCacheMvccCandidate.java           |    4 +-
 .../processors/cache/GridCacheStoreManager.java |   25 +-
 .../processors/cache/IgniteCacheProxy.java      |   24 +-
 .../transactions/IgniteTxLocalAdapter.java      |   42 +-
 .../internal/processors/fs/GridGgfsServer.java  |   26 +-
 .../processors/fs/GridGgfsServerManager.java    |    8 +-
 .../processors/fs/IgniteFsNoopProcessor.java    |    2 +-
 .../processors/fs/IgniteFsProcessor.java        |    4 +-
 .../processors/fs/IgniteFsProcessorAdapter.java |    2 +-
 .../service/GridServiceProcessor.java           |    2 +-
 .../apache/ignite/internal/util/GridUtils.java  | 9100 -----------------
 .../ignite/internal/util/IgniteUtils.java       | 9141 ++++++++++++++++++
 .../internal/util/ipc/GridIpcEndpoint.java      |   49 -
 .../util/ipc/GridIpcEndpointBindException.java  |   47 -
 .../util/ipc/GridIpcEndpointFactory.java        |   84 -
 .../internal/util/ipc/GridIpcEndpointType.java  |   29 -
 .../util/ipc/GridIpcServerEndpoint.java         |   73 -
 .../ipc/GridIpcServerEndpointDeserializer.java  |   66 -
 .../internal/util/ipc/GridIpcToNioAdapter.java  |  250 -
 .../ignite/internal/util/ipc/IpcEndpoint.java   |   49 +
 .../util/ipc/IpcEndpointBindException.java      |   47 +
 .../internal/util/ipc/IpcEndpointFactory.java   |   84 +
 .../internal/util/ipc/IpcEndpointType.java      |   29 +
 .../internal/util/ipc/IpcServerEndpoint.java    |   73 +
 .../util/ipc/IpcServerEndpointDeserializer.java |   66 +
 .../internal/util/ipc/IpcToNioAdapter.java      |  250 +
 .../ipc/loopback/GridIpcClientTcpEndpoint.java  |   87 -
 .../ipc/loopback/GridIpcServerTcpEndpoint.java  |  179 -
 .../util/ipc/loopback/IpcClientTcpEndpoint.java |   87 +
 .../util/ipc/loopback/IpcServerTcpEndpoint.java |  179 +
 .../GridIpcOutOfSystemResourcesException.java   |   59 -
 .../GridIpcSharedMemoryClientEndpoint.java      |  336 -
 .../shmem/GridIpcSharedMemoryInitRequest.java   |   67 -
 .../shmem/GridIpcSharedMemoryInitResponse.java  |  171 -
 .../shmem/GridIpcSharedMemoryInputStream.java   |   99 -
 .../shmem/GridIpcSharedMemoryNativeLoader.java  |  242 -
 ...cSharedMemoryOperationTimedoutException.java |   59 -
 .../shmem/GridIpcSharedMemoryOutputStream.java  |   80 -
 .../GridIpcSharedMemoryServerEndpoint.java      |  707 --
 .../ipc/shmem/GridIpcSharedMemorySpace.java     |  374 -
 .../ipc/shmem/GridIpcSharedMemoryUtils.java     |  242 -
 .../shmem/IpcOutOfSystemResourcesException.java |   59 +
 .../shmem/IpcSharedMemoryClientEndpoint.java    |  336 +
 .../ipc/shmem/IpcSharedMemoryInitRequest.java   |   67 +
 .../ipc/shmem/IpcSharedMemoryInitResponse.java  |  171 +
 .../ipc/shmem/IpcSharedMemoryInputStream.java   |   99 +
 .../ipc/shmem/IpcSharedMemoryNativeLoader.java  |  261 +
 ...cSharedMemoryOperationTimedoutException.java |   59 +
 .../ipc/shmem/IpcSharedMemoryOutputStream.java  |   80 +
 .../shmem/IpcSharedMemoryServerEndpoint.java    |  707 ++
 .../util/ipc/shmem/IpcSharedMemorySpace.java    |  374 +
 .../util/ipc/shmem/IpcSharedMemoryUtils.java    |  242 +
 .../util/nio/GridShmemCommunicationClient.java  |    4 +-
 .../internal/util/typedef/internal/U.java       |    4 +-
 .../visor/misc/VisorResolveHostNameTask.java    |    2 +-
 .../visor/node/VisorNodeDataCollectorJob.java   |    4 +-
 .../internal/visor/query/VisorQueryUtils.java   |    4 +-
 .../ignite/lang/IgniteAsyncSupportAdapter.java  |   27 +-
 .../optimized/IgniteOptimizedMarshaller.java    |    2 +-
 .../communication/tcp/TcpCommunicationSpi.java  |   24 +-
 .../IgniteExceptionHelpLinksSelfTest.java       |    3 +-
 .../GridEventStorageCheckAllEventsSelfTest.java |    2 +-
 .../cache/GridCacheAbstractMetricsSelfTest.java |   10 +-
 .../GridCacheAbstractProjectionSelfTest.java    |   50 +
 .../GridCacheReturnValueTransferSelfTest.java   |    2 +-
 .../cache/IgniteCacheInvokeAbstractTest.java    |    4 +-
 .../IgniteCrossCacheTxStoreSelfTest.java        |  288 +
 ...GridCacheValueConsistencyAtomicSelfTest.java |    2 +-
 .../IgniteCacheTxStoreSessionTest.java          |   11 +-
 ...IpcEndpointRegistrationAbstractSelfTest.java |    4 +-
 ...pcEndpointRegistrationOnWindowsSelfTest.java |    4 +-
 .../cache/GridCacheCommandHandlerSelfTest.java  |    4 +-
 ...artupWithSpecifiedWorkDirectorySelfTest.java |    2 +-
 ...tartupWithUndefinedGridGainHomeSelfTest.java |    4 +-
 .../internal/util/GridTestClockTimer.java       |    6 +-
 .../ignite/internal/util/GridUtilsSelfTest.java |  717 --
 .../internal/util/IgniteUtilsSelfTest.java      |  728 ++
 ...idIpcServerEndpointDeserializerSelfTest.java |  160 -
 .../IpcServerEndpointDeserializerSelfTest.java  |  160 +
 .../ipc/shmem/GgfsSharedMemoryTestClient.java   |   76 +
 .../ipc/shmem/GgfsSharedMemoryTestServer.java   |   71 +
 .../shmem/GridGgfsSharedMemoryTestClient.java   |   76 -
 .../shmem/GridGgfsSharedMemoryTestServer.java   |   71 -
 ...idIpcSharedMemoryCrashDetectionSelfTest.java |  500 -
 .../shmem/GridIpcSharedMemoryFakeClient.java    |   36 -
 .../shmem/GridIpcSharedMemoryNodeStartup.java   |   87 -
 .../shmem/GridIpcSharedMemorySpaceSelfTest.java |  267 -
 .../shmem/GridIpcSharedMemoryUtilsSelfTest.java |   84 -
 .../IpcSharedMemoryCrashDetectionSelfTest.java  |  500 +
 .../ipc/shmem/IpcSharedMemoryFakeClient.java    |   36 +
 .../IpcSharedMemoryNativeLoaderSelfTest.java    |   78 +
 .../ipc/shmem/IpcSharedMemoryNodeStartup.java   |   87 +
 .../ipc/shmem/IpcSharedMemorySpaceSelfTest.java |  267 +
 .../ipc/shmem/IpcSharedMemoryUtilsSelfTest.java |   84 +
 .../LoadWithCorruptedLibFileTestRunner.java     |   65 +
 .../GridIpcSharedMemoryBenchmarkParty.java      |   35 -
 .../GridIpcSharedMemoryBenchmarkReader.java     |  133 -
 .../GridIpcSharedMemoryBenchmarkWriter.java     |  125 -
 .../IpcSharedMemoryBenchmarkParty.java          |   35 +
 .../IpcSharedMemoryBenchmarkReader.java         |  133 +
 .../IpcSharedMemoryBenchmarkWriter.java         |  125 +
 .../ignite/lang/GridSetWrapperSelfTest.java     |    2 +-
 .../ignite/testsuites/IgniteCacheTestSuite.java |    1 +
 .../ignite/testsuites/IgniteFsTestSuite.java    |    2 +-
 .../IgniteIpcSharedMemorySelfTestSuite.java     |    7 +-
 .../testsuites/IgniteUtilSelfTestSuite.java     |    2 +-
 .../internal/fs/hadoop/GridGgfsHadoopIpcIo.java |   10 +-
 .../GridHadoopExternalCommunication.java        |   26 +-
 .../GridHadoopIpcToNioAdapter.java              |    6 +-
 ...doop20FileSystemLoopbackPrimarySelfTest.java |    2 +-
 ...sHadoop20FileSystemShmemPrimarySelfTest.java |    2 +-
 .../GridGgfsHadoopFileSystemClientSelfTest.java |    2 +-
 ...idGgfsHadoopFileSystemHandshakeSelfTest.java |    2 +-
 ...ridGgfsHadoopFileSystemIpcCacheSelfTest.java |    2 +-
 ...adoopFileSystemLoopbackAbstractSelfTest.java |    2 +-
 ...fsHadoopFileSystemShmemAbstractSelfTest.java |    8 +-
 .../fs/GridGgfsNearOnlyMultiNodeSelfTest.java   |    4 +-
 .../ignite/fs/IgniteFsEventsTestSuite.java      |    4 +-
 .../ignite/visor/commands/VisorConsole.scala    |    6 +-
 .../commands/alert/VisorAlertCommand.scala      |    2 +-
 .../config/VisorConfigurationCommand.scala      |    6 +-
 .../commands/deploy/VisorDeployCommand.scala    |    4 +-
 .../commands/disco/VisorDiscoveryCommand.scala  |    4 +-
 .../commands/events/VisorEventsCommand.scala    |    4 +-
 .../visor/commands/gc/VisorGcCommand.scala      |   13 +-
 .../visor/commands/node/VisorNodeCommand.scala  |    4 +-
 .../commands/start/VisorStartCommand.scala      |    4 +-
 .../commands/tasks/VisorTasksCommand.scala      |    4 +-
 .../commands/top/VisorTopologyCommand.scala     |    6 +-
 .../visor/commands/vvm/VisorVvmCommand.scala    |    8 +-
 .../scala/org/apache/ignite/visor/visor.scala   |   20 +-
 .../visor/commands/gc/VisorGcCommandSpec.scala  |   25 +-
 158 files changed, 17135 insertions(+), 16542 deletions(-)
----------------------------------------------------------------------



[36/50] [abbrv] incubator-ignite git commit: Merge remote-tracking branch 'remotes/origin/sprint-1' into ignite-71

Posted by se...@apache.org.
Merge remote-tracking branch 'remotes/origin/sprint-1' into ignite-71


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

Branch: refs/heads/ignite-sql
Commit: 8df3ac4ea6b75407b802448d04211a1995fac74e
Parents: 9b6f75e ff01e66
Author: avinogradov <av...@gridgain.com>
Authored: Fri Jan 30 15:10:45 2015 +0300
Committer: avinogradov <av...@gridgain.com>
Committed: Fri Jan 30 15:10:45 2015 +0300

----------------------------------------------------------------------
 .../util/ipc/shmem/IpcSharedMemoryNativeLoaderSelfTest.java    | 2 +-
 .../org/apache/ignite/messaging/GridMessagingSelfTest.java     | 2 +-
 .../internal/processors/hadoop/GridHadoopClassLoader.java      | 4 ++--
 .../marshaller/optimized/OptimizedClassNamesGenerator.java     | 6 +++---
 .../src/main/scala/org/apache/ignite/visor/visor.scala         | 1 -
 5 files changed, 7 insertions(+), 8 deletions(-)
----------------------------------------------------------------------



[35/50] [abbrv] incubator-ignite git commit: Merge remote-tracking branch 'remotes/origin/sprint-1' into ignite-69

Posted by se...@apache.org.
Merge remote-tracking branch 'remotes/origin/sprint-1' into ignite-69


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

Branch: refs/heads/ignite-sql
Commit: 43d54c27f61691e3e4d15276dd7cf4676929a975
Parents: 5a50356 ff01e66
Author: avinogradov <av...@gridgain.com>
Authored: Fri Jan 30 15:09:09 2015 +0300
Committer: avinogradov <av...@gridgain.com>
Committed: Fri Jan 30 15:09:09 2015 +0300

----------------------------------------------------------------------
 .../util/ipc/shmem/IpcSharedMemoryNativeLoaderSelfTest.java    | 2 +-
 .../org/apache/ignite/messaging/GridMessagingSelfTest.java     | 2 +-
 .../internal/processors/hadoop/GridHadoopClassLoader.java      | 4 ++--
 .../marshaller/optimized/OptimizedClassNamesGenerator.java     | 6 +++---
 .../src/main/scala/org/apache/ignite/visor/visor.scala         | 1 -
 5 files changed, 7 insertions(+), 8 deletions(-)
----------------------------------------------------------------------



[29/50] [abbrv] incubator-ignite git commit: Merge remote-tracking branch 'origin/sprint-1' into sprint-1

Posted by se...@apache.org.
Merge remote-tracking branch 'origin/sprint-1' into sprint-1


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

Branch: refs/heads/ignite-sql
Commit: 71442e29f702a9c8ffc51d8f291a410292a517d5
Parents: 746ce78 4da5e29
Author: Artem SHutak <as...@gridgain.com>
Authored: Fri Jan 30 13:21:59 2015 +0300
Committer: Artem SHutak <as...@gridgain.com>
Committed: Fri Jan 30 13:21:59 2015 +0300

----------------------------------------------------------------------
 .../java/org/apache/ignite/messaging/GridMessagingSelfTest.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------



[48/50] [abbrv] incubator-ignite git commit: ignite-sql - renamings

Posted by se...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
index 4ba6149..40f4784 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
@@ -485,7 +485,7 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
                             cctx.localNode(),
                             "SQL query executed.",
                             EVT_CACHE_QUERY_EXECUTED,
-                            org.apache.ignite.cache.query.CacheQueryType.SQL,
+                            CacheQueryType.SQL,
                             cctx.namex(),
                             qry.queryClassName(),
                             qry.clause(),
@@ -507,7 +507,7 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
                             cctx.localNode(),
                             "Scan query executed.",
                             EVT_CACHE_QUERY_EXECUTED,
-                            org.apache.ignite.cache.query.CacheQueryType.SCAN,
+                            CacheQueryType.SCAN,
                             cctx.namex(),
                             null,
                             null,
@@ -528,7 +528,7 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
                             cctx.localNode(),
                             "Full text query executed.",
                             EVT_CACHE_QUERY_EXECUTED,
-                            org.apache.ignite.cache.query.CacheQueryType.FULL_TEXT,
+                            CacheQueryType.FULL_TEXT,
                             cctx.namex(),
                             qry.queryClassName(),
                             qry.clause(),
@@ -602,7 +602,7 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
                     cctx.localNode(),
                     "SQL fields query executed.",
                     EVT_CACHE_QUERY_EXECUTED,
-                    org.apache.ignite.cache.query.CacheQueryType.SQL_FIELDS,
+                    CacheQueryType.SQL_FIELDS,
                     cctx.namex(),
                     null,
                     qry.clause(),
@@ -634,7 +634,7 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
                     cctx.localNode(),
                     "SPI query executed.",
                     EVT_CACHE_QUERY_EXECUTED,
-                    org.apache.ignite.cache.query.CacheQueryType.SPI,
+                    CacheQueryType.SPI,
                     cctx.namex(),
                     null,
                     null,
@@ -1067,7 +1067,7 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
                             cctx.localNode(),
                             "SQL fields query result set row read.",
                             EVT_CACHE_QUERY_OBJECT_READ,
-                            org.apache.ignite.cache.query.CacheQueryType.SQL_FIELDS,
+                            CacheQueryType.SQL_FIELDS,
                             cctx.namex(),
                             null,
                             qry.clause(),
@@ -1254,7 +1254,7 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
                                     cctx.localNode(),
                                     "SQL query entry read.",
                                     EVT_CACHE_QUERY_OBJECT_READ,
-                                    org.apache.ignite.cache.query.CacheQueryType.SQL,
+                                    CacheQueryType.SQL,
                                     cctx.namex(),
                                     qry.queryClassName(),
                                     qry.clause(),
@@ -1277,7 +1277,7 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
                                     cctx.localNode(),
                                     "Full text query entry read.",
                                     EVT_CACHE_QUERY_OBJECT_READ,
-                                    org.apache.ignite.cache.query.CacheQueryType.FULL_TEXT,
+                                    CacheQueryType.FULL_TEXT,
                                     cctx.namex(),
                                     qry.queryClassName(),
                                     qry.clause(),
@@ -1300,7 +1300,7 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
                                     cctx.localNode(),
                                     "Scan query entry read.",
                                     EVT_CACHE_QUERY_OBJECT_READ,
-                                    org.apache.ignite.cache.query.CacheQueryType.SCAN,
+                                    CacheQueryType.SCAN,
                                     cctx.namex(),
                                     null,
                                     null,
@@ -1660,7 +1660,7 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
      *
      * @return Cache queries metrics.
      */
-    public CacheQueryMetrics metrics() {
+    public QueryMetrics metrics() {
         return metrics.copy();
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryMetricsAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryMetricsAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryMetricsAdapter.java
index ddff0cc..a98a7c4 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryMetricsAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryMetricsAdapter.java
@@ -23,9 +23,9 @@ import org.apache.ignite.internal.util.typedef.internal.*;
 import java.io.*;
 
 /**
- * Adapter for {@link org.apache.ignite.cache.query.CacheQueryMetrics}.
+ * Adapter for {@link org.apache.ignite.cache.query.QueryMetrics}.
  */
-public class GridCacheQueryMetricsAdapter implements CacheQueryMetrics, Externalizable {
+public class GridCacheQueryMetricsAdapter implements QueryMetrics, Externalizable {
     /** */
     private static final long serialVersionUID = 0L;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryType.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryType.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryType.java
index f7d45a5..5805725 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryType.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryType.java
@@ -21,8 +21,8 @@ import org.jetbrains.annotations.*;
 
 /**
  * Defines different cache query types. For more information on cache query types
- * and their usage see {@link org.apache.ignite.cache.query.CacheQuery} documentation.
- * @see org.apache.ignite.cache.query.CacheQuery
+ * and their usage see {@link CacheQuery} documentation.
+ * @see CacheQuery
  */
 public enum GridCacheQueryType {
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryHandler.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryHandler.java
index a6d0c60..09c3cf0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryHandler.java
@@ -24,6 +24,7 @@ import org.apache.ignite.cluster.*;
 import org.apache.ignite.events.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.cache.*;
+import org.apache.ignite.internal.processors.cache.query.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.internal.managers.deployment.*;
 import org.apache.ignite.internal.processors.continuous.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/jdbc/GridCacheQueryJdbcTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/jdbc/GridCacheQueryJdbcTask.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/jdbc/GridCacheQueryJdbcTask.java
index acd5051..2a45b66 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/jdbc/GridCacheQueryJdbcTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/jdbc/GridCacheQueryJdbcTask.java
@@ -19,7 +19,6 @@ package org.apache.ignite.internal.processors.cache.query.jdbc;
 
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
-import org.apache.ignite.cache.query.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.compute.*;
 import org.apache.ignite.internal.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
index b094250..8257f9b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
@@ -20,6 +20,7 @@ package org.apache.ignite.internal.processors.query;
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.*;
 import org.apache.ignite.internal.processors.cache.query.*;
@@ -66,16 +67,16 @@ public class GridQueryProcessor extends GridProcessorAdapter {
     private final GridQueryIndexing idx;
 
     /** Configuration-declared types. */
-    private final Map<TypeName, CacheQueryTypeMetadata> declaredTypesByName = new HashMap<>();
+    private final Map<TypeName,QueryTypeMetadata> declaredTypesByName = new HashMap<>();
 
     /** Configuration-declared types. */
-    private Map<TypeId, CacheQueryTypeMetadata> declaredTypesById;
+    private Map<TypeId,QueryTypeMetadata> declaredTypesById;
 
     /** Portable IDs. */
     private Map<Integer, String> portableIds;
 
     /** Type resolvers per space name. */
-    private Map<String, CacheQueryTypeResolver> typeResolvers = new HashMap<>();
+    private Map<String,QueryTypeResolver> typeResolvers = new HashMap<>();
 
     /**
      * @param ctx Kernal context.
@@ -102,11 +103,11 @@ public class GridQueryProcessor extends GridProcessorAdapter {
             idx.start(ctx);
 
             for (CacheConfiguration ccfg : ctx.config().getCacheConfiguration()){
-                CacheQueryConfiguration qryCfg = ccfg.getQueryConfiguration();
+                QueryConfiguration qryCfg = ccfg.getQueryConfiguration();
 
                 if (qryCfg != null) {
                     if (!F.isEmpty(qryCfg.getTypeMetadata())) {
-                        for (CacheQueryTypeMetadata meta : qryCfg.getTypeMetadata())
+                        for (QueryTypeMetadata meta : qryCfg.getTypeMetadata())
                             declaredTypesByName.put(new TypeName(ccfg.getName(), meta.getType()), meta);
                     }
 
@@ -279,7 +280,7 @@ public class GridQueryProcessor extends GridProcessorAdapter {
 
             TypeId id = null;
 
-            CacheQueryTypeResolver rslvr = typeResolvers.get(space);
+            QueryTypeResolver rslvr = typeResolvers.get(space);
 
             if (rslvr != null) {
                 String typeName = rslvr.resolveTypeName(key, val);
@@ -330,14 +331,14 @@ public class GridQueryProcessor extends GridProcessorAdapter {
                             String typeName = portableName(portableKey.typeId());
 
                             if (typeName != null) {
-                                CacheQueryTypeMetadata keyMeta = declaredType(space, portableKey.typeId());
+                                QueryTypeMetadata keyMeta = declaredType(space, portableKey.typeId());
 
                                 if (keyMeta != null)
                                     processPortableMeta(true, keyMeta, d);
                             }
                         }
                         else {
-                            CacheQueryTypeMetadata keyMeta = declaredType(space, keyCls.getName());
+                            QueryTypeMetadata keyMeta = declaredType(space, keyCls.getName());
 
                             if (keyMeta == null)
                                 processAnnotationsInClass(true, d.keyCls, d, null);
@@ -351,7 +352,7 @@ public class GridQueryProcessor extends GridProcessorAdapter {
                             String typeName = portableName(portableVal.typeId());
 
                             if (typeName != null) {
-                                CacheQueryTypeMetadata valMeta = declaredType(space, portableVal.typeId());
+                                QueryTypeMetadata valMeta = declaredType(space, portableVal.typeId());
 
                                 d.name(typeName);
 
@@ -364,7 +365,7 @@ public class GridQueryProcessor extends GridProcessorAdapter {
 
                             d.name(valTypeName);
 
-                            CacheQueryTypeMetadata typeMeta = declaredType(space, valCls.getName());
+                            QueryTypeMetadata typeMeta = declaredType(space, valCls.getName());
 
                             if (typeMeta == null)
                                 processAnnotationsInClass(false, d.valCls, d, null);
@@ -533,10 +534,10 @@ public class GridQueryProcessor extends GridProcessorAdapter {
             portableIds = new HashMap<>();
 
             for (CacheConfiguration ccfg : ctx.config().getCacheConfiguration()){
-                CacheQueryConfiguration qryCfg = ccfg.getQueryConfiguration();
+                QueryConfiguration qryCfg = ccfg.getQueryConfiguration();
 
                 if (qryCfg != null) {
-                    for (CacheQueryTypeMetadata meta : qryCfg.getTypeMetadata())
+                    for (QueryTypeMetadata meta : qryCfg.getTypeMetadata())
                         portableIds.put(ctx.portable().typeId(meta.getType()), meta.getType());
                 }
             }
@@ -552,17 +553,17 @@ public class GridQueryProcessor extends GridProcessorAdapter {
      * @param typeId Type ID.
      * @return Type meta data if it was declared in configuration.
      */
-    @Nullable private CacheQueryTypeMetadata declaredType(String space, int typeId) {
-        Map<TypeId, CacheQueryTypeMetadata> declaredTypesById = this.declaredTypesById;
+    @Nullable private QueryTypeMetadata declaredType(String space, int typeId) {
+        Map<TypeId,QueryTypeMetadata> declaredTypesById = this.declaredTypesById;
 
         if (declaredTypesById == null) {
             declaredTypesById = new HashMap<>();
 
             for (CacheConfiguration ccfg : ctx.config().getCacheConfiguration()){
-                CacheQueryConfiguration qryCfg = ccfg.getQueryConfiguration();
+                QueryConfiguration qryCfg = ccfg.getQueryConfiguration();
 
                 if (qryCfg != null) {
-                    for (CacheQueryTypeMetadata meta : qryCfg.getTypeMetadata())
+                    for (QueryTypeMetadata meta : qryCfg.getTypeMetadata())
                         declaredTypesById.put(new TypeId(ccfg.getName(), ctx.portable().typeId(meta.getType())), meta);
                 }
             }
@@ -578,7 +579,7 @@ public class GridQueryProcessor extends GridProcessorAdapter {
      * @param typeName Type name.
      * @return Type meta data if it was declared in configuration.
      */
-    @Nullable private CacheQueryTypeMetadata declaredType(String space, String typeName) {
+    @Nullable private QueryTypeMetadata declaredType(String space, String typeName) {
         return declaredTypesByName.get(new TypeName(space, typeName));
     }
 
@@ -742,28 +743,28 @@ public class GridQueryProcessor extends GridProcessorAdapter {
             throw new IgniteCheckedException("Recursive reference found in type: " + cls.getName());
 
         if (parent == null) { // Check class annotation at top level only.
-            CacheQueryTextField txtAnnCls = cls.getAnnotation(CacheQueryTextField.class);
+            QueryTextField txtAnnCls = cls.getAnnotation(QueryTextField.class);
 
             if (txtAnnCls != null)
                 type.valueTextIndex(true);
 
-            CacheQueryGroupIndex grpIdx = cls.getAnnotation(CacheQueryGroupIndex.class);
+            QueryGroupIndex grpIdx = cls.getAnnotation(QueryGroupIndex.class);
 
             if (grpIdx != null)
                 type.addIndex(grpIdx.name(), SORTED);
 
-            CacheQueryGroupIndex.List grpIdxList = cls.getAnnotation(CacheQueryGroupIndex.List.class);
+            QueryGroupIndex.List grpIdxList = cls.getAnnotation(QueryGroupIndex.List.class);
 
             if (grpIdxList != null && !F.isEmpty(grpIdxList.value())) {
-                for (CacheQueryGroupIndex idx : grpIdxList.value())
+                for (QueryGroupIndex idx : grpIdxList.value())
                     type.addIndex(idx.name(), SORTED);
             }
         }
 
         for (Class<?> c = cls; c != null && !c.equals(Object.class); c = c.getSuperclass()) {
             for (Field field : c.getDeclaredFields()) {
-                CacheQuerySqlField sqlAnn = field.getAnnotation(CacheQuerySqlField.class);
-                CacheQueryTextField txtAnn = field.getAnnotation(CacheQueryTextField.class);
+                QuerySqlField sqlAnn = field.getAnnotation(QuerySqlField.class);
+                QueryTextField txtAnn = field.getAnnotation(QueryTextField.class);
 
                 if (sqlAnn != null || txtAnn != null) {
                     ClassProperty prop = new ClassProperty(field);
@@ -777,8 +778,8 @@ public class GridQueryProcessor extends GridProcessorAdapter {
             }
 
             for (Method mtd : c.getDeclaredMethods()) {
-                CacheQuerySqlField sqlAnn = mtd.getAnnotation(CacheQuerySqlField.class);
-                CacheQueryTextField txtAnn = mtd.getAnnotation(CacheQueryTextField.class);
+                QuerySqlField sqlAnn = mtd.getAnnotation(QuerySqlField.class);
+                QueryTextField txtAnn = mtd.getAnnotation(QueryTextField.class);
 
                 if (sqlAnn != null || txtAnn != null) {
                     if (mtd.getParameterTypes().length != 0)
@@ -808,7 +809,7 @@ public class GridQueryProcessor extends GridProcessorAdapter {
      * @param desc Class description.
      * @throws IgniteCheckedException In case of error.
      */
-    static void processAnnotation(boolean key, CacheQuerySqlField sqlAnn, CacheQueryTextField txtAnn,
+    static void processAnnotation(boolean key, QuerySqlField sqlAnn, QueryTextField txtAnn,
         Class<?> cls, ClassProperty prop, TypeDescriptor desc) throws IgniteCheckedException {
         if (sqlAnn != null) {
             processAnnotationsInClass(key, cls, desc, prop);
@@ -816,7 +817,7 @@ public class GridQueryProcessor extends GridProcessorAdapter {
             if (!sqlAnn.name().isEmpty())
                 prop.name(sqlAnn.name());
 
-            if (sqlAnn.index() || sqlAnn.unique()) {
+            if (sqlAnn.index()) {
                 String idxName = prop.name() + "_idx";
 
                 desc.addIndex(idxName, isGeometryClass(prop.type()) ? GEO_SPATIAL : SORTED);
@@ -830,7 +831,7 @@ public class GridQueryProcessor extends GridProcessorAdapter {
             }
 
             if (!F.isEmpty(sqlAnn.orderedGroups())) {
-                for (CacheQuerySqlField.Group idx : sqlAnn.orderedGroups())
+                for (QuerySqlField.Group idx : sqlAnn.orderedGroups())
                     desc.addFieldToIndex(idx.name(), prop.name(), idx.order(), idx.descending());
             }
         }
@@ -848,7 +849,7 @@ public class GridQueryProcessor extends GridProcessorAdapter {
      * @param d Type descriptor.
      * @throws IgniteCheckedException If failed.
      */
-    static void processClassMeta(boolean key, Class<?> cls, CacheQueryTypeMetadata meta, TypeDescriptor d)
+    static void processClassMeta(boolean key, Class<?> cls, QueryTypeMetadata meta, TypeDescriptor d)
         throws IgniteCheckedException {
         for (Map.Entry<String, Class<?>> entry : meta.getAscendingFields().entrySet()) {
             ClassProperty prop = buildClassProperty(cls, entry.getKey(), entry.getValue());
@@ -921,7 +922,7 @@ public class GridQueryProcessor extends GridProcessorAdapter {
      * @param d Type descriptor.
      * @throws IgniteCheckedException If failed.
      */
-    static void processPortableMeta(boolean key, CacheQueryTypeMetadata meta, TypeDescriptor d)
+    static void processPortableMeta(boolean key, QueryTypeMetadata meta, TypeDescriptor d)
         throws IgniteCheckedException {
         for (Map.Entry<String, Class<?>> entry : meta.getAscendingFields().entrySet()) {
             PortableProperty prop = buildPortableProperty(entry.getKey(), entry.getValue());

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheQueryCommandHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheQueryCommandHandler.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheQueryCommandHandler.java
index 2ebea11..db0821f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheQueryCommandHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheQueryCommandHandler.java
@@ -19,7 +19,6 @@ package org.apache.ignite.internal.processors.rest.handlers.cache;
 
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
-import org.apache.ignite.cache.query.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.cache.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheQueryMetrics.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheQueryMetrics.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheQueryMetrics.java
index 0d22320..ea051e4 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheQueryMetrics.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheQueryMetrics.java
@@ -48,7 +48,7 @@ public class VisorCacheQueryMetrics implements Serializable {
      * @param m Cache query metrics.
      * @return Data transfer object for given cache metrics.
      */
-    public static VisorCacheQueryMetrics from(CacheQueryMetrics m) {
+    public static VisorCacheQueryMetrics from(QueryMetrics m) {
         VisorCacheQueryMetrics qm = new VisorCacheQueryMetrics();
 
         qm.minTime = m.minimumTime();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryTask.java
index 7b60a0e..492124f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryTask.java
@@ -19,7 +19,6 @@ package org.apache.ignite.internal.visor.query;
 
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
-import org.apache.ignite.cache.query.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.lang.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryUtils.java
index 190f6da..46f3669 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryUtils.java
@@ -18,7 +18,7 @@
 package org.apache.ignite.internal.visor.query;
 
 import org.apache.ignite.*;
-import org.apache.ignite.cache.query.*;
+import org.apache.ignite.internal.processors.cache.query.*;
 import org.apache.ignite.internal.util.*;
 import org.apache.ignite.lang.*;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/test/config/log4j-test.xml
----------------------------------------------------------------------
diff --git a/modules/core/src/test/config/log4j-test.xml b/modules/core/src/test/config/log4j-test.xml
index 984e973..d1ab0ed 100644
--- a/modules/core/src/test/config/log4j-test.xml
+++ b/modules/core/src/test/config/log4j-test.xml
@@ -84,6 +84,10 @@
     </category>
     -->
 
+    <category name="org.apache.ignite.internal.processors.query">
+        <level value="DEBUG"/>
+    </category>
+
     <!-- Enable Gridgain debugging.
      <category name="org.gridgain">
          <level value="DEBUG"/>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentTxMultiNodeTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentTxMultiNodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentTxMultiNodeTest.java
index 570c133..ab0ac07 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentTxMultiNodeTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentTxMultiNodeTest.java
@@ -22,11 +22,12 @@ import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.affinity.*;
 import org.apache.ignite.cache.datastructures.*;
 import org.apache.ignite.cache.eviction.lru.*;
-import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.compute.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.*;
+import org.apache.ignite.internal.processors.cache.query.*;
 import org.apache.ignite.internal.util.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.resources.*;
@@ -729,21 +730,21 @@ public class GridCacheConcurrentTxMultiNodeTest extends GridCommonAbstractTest {
     /**
      *
      */
-    @CacheQueryGroupIndex(name = "msg_tx", unique = true)
+    @QueryGroupIndex(name = "msg_tx")
     @SuppressWarnings({"UnusedDeclaration"})
     private static class Request implements Serializable {
         /** */
-        @CacheQuerySqlField(unique = true)
+        @QuerySqlField(index = true)
         private Long id;
 
         /** */
-        @CacheQuerySqlField(name = "messageId")
-        @CacheQuerySqlField.Group(name = "msg_tx", order = 3)
+        @QuerySqlField(name = "messageId")
+        @QuerySqlField.Group(name = "msg_tx", order = 3)
         private long msgId;
 
         /** */
-        @CacheQuerySqlField(name = "transactionId")
-        @CacheQuerySqlField.Group(name = "msg_tx", order = 1)
+        @QuerySqlField(name = "transactionId")
+        @QuerySqlField.Group(name = "msg_tx", order = 1)
         private long txId;
 
         /**
@@ -774,15 +775,15 @@ public class GridCacheConcurrentTxMultiNodeTest extends GridCommonAbstractTest {
     @SuppressWarnings({"UnusedDeclaration"})
     private static class Response implements Serializable {
         /** */
-        @CacheQuerySqlField(unique = true)
+        @QuerySqlField
         private Long id;
 
         /** */
-        @CacheQuerySqlField(name = "messageId")
+        @QuerySqlField(name = "messageId")
         private long msgId;
 
         /** */
-        @CacheQuerySqlField(name = "transactionId")
+        @QuerySqlField(name = "transactionId")
         private long txId;
 
         /**
@@ -805,7 +806,7 @@ public class GridCacheConcurrentTxMultiNodeTest extends GridCommonAbstractTest {
      */
     private static class Session implements Serializable {
         /** */
-        @CacheQuerySqlField(unique = true)
+        @QuerySqlField(index = true)
         private String terminalId;
 
         /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheFieldsQueryNoDataSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheFieldsQueryNoDataSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheFieldsQueryNoDataSelfTest.java
index 037fcb8..28ea1f9 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheFieldsQueryNoDataSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheFieldsQueryNoDataSelfTest.java
@@ -18,8 +18,8 @@
 package org.apache.ignite.internal.processors.cache;
 
 import org.apache.ignite.cache.*;
-import org.apache.ignite.cache.query.*;
 import org.apache.ignite.configuration.*;
+import org.apache.ignite.internal.processors.cache.query.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheFullTextQueryMultithreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheFullTextQueryMultithreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheFullTextQueryMultithreadedSelfTest.java
index 09d92d8..9e3fee0 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheFullTextQueryMultithreadedSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheFullTextQueryMultithreadedSelfTest.java
@@ -18,8 +18,9 @@
 package org.apache.ignite.internal.processors.cache;
 
 import org.apache.ignite.cache.*;
-import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.internal.*;
+import org.apache.ignite.internal.processors.cache.query.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 
@@ -131,7 +132,7 @@ public class GridCacheFullTextQueryMultithreadedSelfTest extends GridCacheAbstra
      */
     private static class H2TextValue {
         /** */
-        @CacheQueryTextField
+        @QueryTextField
         private final String val;
 
         /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLuceneQueryIndexTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLuceneQueryIndexTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLuceneQueryIndexTest.java
index 0530419..ad3b544 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLuceneQueryIndexTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLuceneQueryIndexTest.java
@@ -19,7 +19,7 @@ package org.apache.ignite.internal.processors.cache;
 
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
-import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.spi.discovery.tcp.*;
@@ -376,7 +376,7 @@ public class GridCacheLuceneQueryIndexTest extends GridCommonAbstractTest {
      */
     private static class ObjectValue implements Serializable {
         /** String value. */
-        @CacheQueryTextField
+        @QueryTextField
         private String strVal;
 
         /**
@@ -422,7 +422,7 @@ public class GridCacheLuceneQueryIndexTest extends GridCommonAbstractTest {
      */
     private static class ObjectKey implements Serializable {
         /** String key. */
-        @CacheQueryTextField
+        @QueryTextField
         private String strKey;
 
         /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapSelfTest.java
index 2ad1da1..f36013e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapSelfTest.java
@@ -20,6 +20,7 @@ package org.apache.ignite.internal.processors.cache;
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.events.*;
 import org.apache.ignite.lang.*;
@@ -582,7 +583,7 @@ public class GridCacheOffHeapSelfTest extends GridCommonAbstractTest {
      */
     private static class CacheValue {
         /** Value. */
-        @CacheQuerySqlField
+        @QuerySqlField
         private final int val;
 
         /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryEmbeddedValue.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryEmbeddedValue.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryEmbeddedValue.java
index 18e8e3d..7ecb950 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryEmbeddedValue.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryEmbeddedValue.java
@@ -18,6 +18,7 @@
 package org.apache.ignite.internal.processors.cache;
 
 import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 
 import java.io.*;
 
@@ -27,15 +28,15 @@ import java.io.*;
 @SuppressWarnings("unused")
 public class GridCacheQueryEmbeddedValue implements Serializable {
     /** Query embedded field. */
-    @CacheQuerySqlField
+    @QuerySqlField
     private int embeddedField1 = 55;
 
     /** Query embedded field. */
-    @CacheQuerySqlField(groups = {"grp1"})
+    @QuerySqlField(groups = {"grp1"})
     private int embeddedField2 = 11;
 
     /** */
-    @CacheQuerySqlField
+    @QuerySqlField
     private Val embeddedField3 = new Val();
 
     /**
@@ -43,7 +44,7 @@ public class GridCacheQueryEmbeddedValue implements Serializable {
     @SuppressWarnings("PublicInnerClass")
     public static class Val implements Serializable {
         /** */
-        @CacheQuerySqlField
+        @QuerySqlField
         private Long x = 3L;
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryIndexSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryIndexSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryIndexSelfTest.java
index dcd2acf..2b66871 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryIndexSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryIndexSelfTest.java
@@ -18,7 +18,8 @@
 package org.apache.ignite.internal.processors.cache;
 
 import org.apache.ignite.cache.*;
-import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
+import org.apache.ignite.internal.processors.cache.query.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 
 import java.util.*;
@@ -105,7 +106,7 @@ public class GridCacheQueryIndexSelfTest extends GridCacheAbstractSelfTest {
      * Test cache value.
      */
     private static class CacheValue {
-        @CacheQuerySqlField
+        @QuerySqlField
         private final int val;
 
         CacheValue(int val) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryIndexingDisabledSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryIndexingDisabledSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryIndexingDisabledSelfTest.java
index 76a2997..c1b68ae 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryIndexingDisabledSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryIndexingDisabledSelfTest.java
@@ -19,7 +19,7 @@ package org.apache.ignite.internal.processors.cache;
 
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
-import org.apache.ignite.cache.query.*;
+import org.apache.ignite.internal.processors.cache.query.*;
 import org.apache.ignite.testframework.*;
 
 import java.util.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestValue.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestValue.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestValue.java
index c782155..8be62e6 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestValue.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestValue.java
@@ -18,6 +18,7 @@
 package org.apache.ignite.internal.processors.cache;
 
 import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import java.io.*;
 
@@ -26,7 +27,7 @@ import java.io.*;
  */
 public class GridCacheTestValue implements Serializable, Cloneable {
     /** */
-    @CacheQuerySqlField(unique = true)
+    @QuerySqlField(index = true)
     private String val;
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestValue2.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestValue2.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestValue2.java
index e5bc01f..e8ea547 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestValue2.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestValue2.java
@@ -18,6 +18,7 @@
 package org.apache.ignite.internal.processors.cache;
 
 import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import java.io.*;
 
@@ -26,7 +27,7 @@ import java.io.*;
  */
 public class GridCacheTestValue2 implements Serializable {
     /** */
-    @CacheQuerySqlField
+    @QuerySqlField
     private String val;
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxMultiNodeAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxMultiNodeAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxMultiNodeAbstractTest.java
index 724929d..bd02106 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxMultiNodeAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxMultiNodeAbstractTest.java
@@ -20,10 +20,10 @@ package org.apache.ignite.internal.processors.cache;
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.affinity.*;
-import org.apache.ignite.cache.query.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.*;
+import org.apache.ignite.internal.processors.cache.query.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.resources.*;
 import org.apache.ignite.transactions.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedPreloadLifecycleSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedPreloadLifecycleSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedPreloadLifecycleSelfTest.java
index 7f68b6d..164b394 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedPreloadLifecycleSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedPreloadLifecycleSelfTest.java
@@ -19,9 +19,9 @@ package org.apache.ignite.internal.processors.cache.distributed.near;
 
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
-import org.apache.ignite.cache.query.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.processors.cache.distributed.*;
+import org.apache.ignite.internal.processors.cache.query.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.lifecycle.*;
 import org.apache.ignite.resources.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedQueryMultiThreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedQueryMultiThreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedQueryMultiThreadedSelfTest.java
index d2820ae..5be96c0 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedQueryMultiThreadedSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedQueryMultiThreadedSelfTest.java
@@ -19,9 +19,10 @@ package org.apache.ignite.internal.processors.cache.distributed.near;
 
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
-import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.*;
+import org.apache.ignite.internal.processors.cache.query.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
@@ -210,16 +211,16 @@ public class GridCachePartitionedQueryMultiThreadedSelfTest extends GridCommonAb
         private UUID id = UUID.randomUUID();
 
         /** */
-        @CacheQuerySqlField
+        @QuerySqlField
         private String name;
 
         /** */
-        @CacheQuerySqlField
+        @QuerySqlField
         private int salary;
 
         /** */
-        @CacheQuerySqlField
-        @CacheQueryTextField
+        @QuerySqlField
+        @QueryTextField
         private String degree;
 
         /** Required by {@link Externalizable}. */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadLifecycleSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadLifecycleSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadLifecycleSelfTest.java
index 266ba56..8902218 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadLifecycleSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadLifecycleSelfTest.java
@@ -19,9 +19,9 @@ package org.apache.ignite.internal.processors.cache.distributed.replicated.prelo
 
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
-import org.apache.ignite.cache.query.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.processors.cache.distributed.*;
+import org.apache.ignite.internal.processors.cache.query.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.lifecycle.*;
 import org.apache.ignite.resources.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/GridCacheSwapScanQueryAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/GridCacheSwapScanQueryAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/GridCacheSwapScanQueryAbstractSelfTest.java
index 0040e75..d221ec0 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/GridCacheSwapScanQueryAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/GridCacheSwapScanQueryAbstractSelfTest.java
@@ -18,7 +18,6 @@
 package org.apache.ignite.internal.processors.cache.query;
 
 import org.apache.ignite.cache.*;
-import org.apache.ignite.cache.query.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.marshaller.optimized.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
index 0111754..d0d7146 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
@@ -53,7 +53,7 @@ import static org.apache.ignite.cache.CacheDistributionMode.*;
 import static org.apache.ignite.cache.CacheMode.*;
 import static org.apache.ignite.cache.CachePreloadMode.*;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*;
-import static org.apache.ignite.cache.query.CacheQueryType.*;
+import static org.apache.ignite.internal.processors.cache.query.CacheQueryType.*;
 import static org.apache.ignite.events.IgniteEventType.*;
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/reducefields/GridCacheAbstractReduceFieldsQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/reducefields/GridCacheAbstractReduceFieldsQuerySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/reducefields/GridCacheAbstractReduceFieldsQuerySelfTest.java
index a9928b4..8b72bd8 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/reducefields/GridCacheAbstractReduceFieldsQuerySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/reducefields/GridCacheAbstractReduceFieldsQuerySelfTest.java
@@ -19,8 +19,9 @@ package org.apache.ignite.internal.processors.cache.query.reducefields;
 
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.affinity.*;
-import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.configuration.*;
+import org.apache.ignite.internal.processors.cache.query.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.marshaller.optimized.*;
 import org.apache.ignite.spi.discovery.*;
@@ -279,15 +280,15 @@ public abstract class GridCacheAbstractReduceFieldsQuerySelfTest extends GridCom
     @SuppressWarnings("UnusedDeclaration")
     private static class Person implements Serializable {
         /** Name. */
-        @CacheQuerySqlField(index = false)
+        @QuerySqlField(index = false)
         private final String name;
 
         /** Age. */
-        @CacheQuerySqlField(index = true)
+        @QuerySqlField(index = true)
         private final int age;
 
         /** Organization ID. */
-        @CacheQuerySqlField(index = true)
+        @QuerySqlField(index = true)
         private final int orgId;
 
         /**
@@ -336,11 +337,11 @@ public abstract class GridCacheAbstractReduceFieldsQuerySelfTest extends GridCom
     @SuppressWarnings("UnusedDeclaration")
     private static class Organization implements Serializable {
         /** ID. */
-        @CacheQuerySqlField
+        @QuerySqlField
         private final int id;
 
         /** Name. */
-        @CacheQuerySqlField(index = false)
+        @QuerySqlField(index = false)
         private final String name;
 
         /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/reducefields/GridCacheReduceFieldsQueryPartitionedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/reducefields/GridCacheReduceFieldsQueryPartitionedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/reducefields/GridCacheReduceFieldsQueryPartitionedSelfTest.java
index a2c3209..ae1adde 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/reducefields/GridCacheReduceFieldsQueryPartitionedSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/reducefields/GridCacheReduceFieldsQueryPartitionedSelfTest.java
@@ -18,7 +18,7 @@
 package org.apache.ignite.internal.processors.cache.query.reducefields;
 
 import org.apache.ignite.cache.*;
-import org.apache.ignite.cache.query.*;
+import org.apache.ignite.internal.processors.cache.query.*;
 import org.apache.ignite.lang.*;
 
 import java.util.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/test/java/org/apache/ignite/loadtests/mapper/TestObject.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/mapper/TestObject.java b/modules/core/src/test/java/org/apache/ignite/loadtests/mapper/TestObject.java
index 2a3c627..c2f0fd8 100644
--- a/modules/core/src/test/java/org/apache/ignite/loadtests/mapper/TestObject.java
+++ b/modules/core/src/test/java/org/apache/ignite/loadtests/mapper/TestObject.java
@@ -18,6 +18,7 @@
 package org.apache.ignite.loadtests.mapper;
 
 import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 
 import java.io.*;
 
@@ -26,11 +27,11 @@ import java.io.*;
  */
 public class TestObject implements Serializable {
     /** ID. */
-    @CacheQuerySqlField(unique = true)
+    @QuerySqlField(index = true)
     private int id;
 
     /** Text. */
-    @CacheQuerySqlField
+    @QuerySqlField
     private String txt;
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/test/webapp/META-INF/gg-config.xml
----------------------------------------------------------------------
diff --git a/modules/core/src/test/webapp/META-INF/gg-config.xml b/modules/core/src/test/webapp/META-INF/gg-config.xml
index 0b8d1fa..c3fab33 100644
--- a/modules/core/src/test/webapp/META-INF/gg-config.xml
+++ b/modules/core/src/test/webapp/META-INF/gg-config.xml
@@ -114,7 +114,7 @@
 
                     <!-- Allow to index primitive values. -->
                     <property name="queryConfiguration">
-                        <bean class="org.apache.ignite.cache.query.CacheQueryConfiguration">
+                        <bean class="org.apache.ignite.cache.query.QueryConfiguration">
                             <!-- Index primitives. -->
                             <property name="indexPrimitiveKey" value="true"/>
                         </bean>
@@ -163,7 +163,7 @@
 
                     <!-- Allow to index primitive values. -->
                     <property name="queryConfiguration">
-                        <bean class="org.apache.ignite.cache.query.CacheQueryConfiguration">
+                        <bean class="org.apache.ignite.cache.query.QueryConfiguration">
                             <!-- Index primitives. -->
                             <property name="indexPrimitiveKey" value="true"/>
                         </bean>
@@ -210,7 +210,7 @@
 
                     <!-- Allow to index primitive values. -->
                     <property name="queryConfiguration">
-                        <bean class="org.apache.ignite.cache.query.CacheQueryConfiguration">
+                        <bean class="org.apache.ignite.cache.query.QueryConfiguration">
                             <!-- Index primitives. -->
                             <property name="indexPrimitiveKey" value="true"/>
                         </bean>
@@ -239,7 +239,7 @@
 
                     <!-- Allow to index primitive values. -->
                     <property name="queryConfiguration">
-                        <bean class="org.apache.ignite.cache.query.CacheQueryConfiguration">
+                        <bean class="org.apache.ignite.cache.query.QueryConfiguration">
                             <!-- Index primitives. -->
                             <property name="indexPrimitiveKey" value="true"/>
                         </bean>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
index b89a05a..2a8c673 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
@@ -19,28 +19,28 @@ package org.apache.ignite.internal.processors.query.h2;
 
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
-import org.apache.ignite.cache.GridCache;
 import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.cache.*;
 import org.apache.ignite.internal.processors.cache.query.*;
+import org.apache.ignite.internal.processors.query.*;
+import org.apache.ignite.internal.processors.query.h2.opt.*;
 import org.apache.ignite.internal.processors.query.h2.sql.*;
 import org.apache.ignite.internal.processors.query.h2.twostep.*;
 import org.apache.ignite.internal.util.*;
-import org.apache.ignite.internal.util.future.GridFinishedFutureEx;
+import org.apache.ignite.internal.util.future.*;
+import org.apache.ignite.internal.util.lang.*;
+import org.apache.ignite.internal.util.offheap.unsafe.*;
+import org.apache.ignite.internal.util.typedef.*;
+import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.marshaller.*;
 import org.apache.ignite.marshaller.optimized.*;
 import org.apache.ignite.resources.*;
 import org.apache.ignite.spi.*;
 import org.apache.ignite.spi.indexing.*;
-import org.apache.ignite.internal.processors.query.*;
-import org.apache.ignite.internal.processors.query.h2.opt.*;
-import org.apache.ignite.internal.util.lang.*;
-import org.apache.ignite.internal.util.offheap.unsafe.*;
-import org.apache.ignite.internal.util.typedef.*;
-import org.apache.ignite.internal.util.typedef.internal.*;
 import org.h2.api.*;
 import org.h2.command.*;
 import org.h2.constant.*;
@@ -1251,7 +1251,7 @@ public class IgniteH2Indexing implements GridQueryIndexing {
 
         for (Class<?> cls : idxCustomFuncClss) {
             for (Method m : cls.getDeclaredMethods()) {
-                CacheQuerySqlFunction ann = m.getAnnotation(CacheQuerySqlFunction.class);
+                QuerySqlFunction ann = m.getAnnotation(QuerySqlFunction.class);
 
                 if (ann != null) {
                     int modifiers = m.getModifiers();
@@ -1334,7 +1334,7 @@ public class IgniteH2Indexing implements GridQueryIndexing {
      * @return {@code true} If primitive keys must be indexed.
      */
     public boolean isIndexPrimitiveKey(@Nullable String spaceName) {
-        CacheQueryConfiguration cfg = cacheQueryConfiguration(spaceName);
+        QueryConfiguration cfg = cacheQueryConfiguration(spaceName);
 
         return cfg != null && cfg.isIndexPrimitiveKey();
     }
@@ -1344,21 +1344,21 @@ public class IgniteH2Indexing implements GridQueryIndexing {
      * @return {@code true} If primitive values must be indexed.
      */
     public boolean isIndexPrimitiveValue(String spaceName) {
-        CacheQueryConfiguration cfg = cacheQueryConfiguration(spaceName);
+        QueryConfiguration cfg = cacheQueryConfiguration(spaceName);
 
         return cfg != null && cfg.isIndexPrimitiveValue();
     }
 
     /** {@inheritDoc} */
     public boolean isIndexFixedTyping(String spaceName) {
-        CacheQueryConfiguration cfg = cacheQueryConfiguration(spaceName);
+        QueryConfiguration cfg = cacheQueryConfiguration(spaceName);
 
         return cfg != null && cfg.isIndexFixedTyping();
     }
 
     /** {@inheritDoc} */
     public boolean isEscapeAll(String spaceName) {
-        CacheQueryConfiguration cfg = cacheQueryConfiguration(spaceName);
+        QueryConfiguration cfg = cacheQueryConfiguration(spaceName);
 
         return cfg != null && cfg.isEscapeAll();
     }
@@ -1367,7 +1367,7 @@ public class IgniteH2Indexing implements GridQueryIndexing {
      * @param spaceName Space name.
      * @return Cache query configuration.
      */
-    @Nullable private CacheQueryConfiguration cacheQueryConfiguration(String spaceName) {
+    @Nullable private QueryConfiguration cacheQueryConfiguration(String spaceName) {
         return ctx == null ? null : ctx.cache().internalCache(spaceName).configuration().getQueryConfiguration();
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2AbstractKeyValueRow.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2AbstractKeyValueRow.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2AbstractKeyValueRow.java
index 8b7e8d4..698f3c5 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2AbstractKeyValueRow.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2AbstractKeyValueRow.java
@@ -18,9 +18,9 @@
 package org.apache.ignite.internal.processors.query.h2.opt;
 
 import org.apache.ignite.*;
-import org.apache.ignite.spi.*;
 import org.apache.ignite.internal.processors.query.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.spi.*;
 import org.h2.message.*;
 import org.h2.result.*;
 import org.h2.value.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2IndexBase.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2IndexBase.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2IndexBase.java
index 1b53838..1c5fabf 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2IndexBase.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2IndexBase.java
@@ -17,10 +17,10 @@
 
 package org.apache.ignite.internal.processors.query.h2.opt;
 
-import org.apache.ignite.lang.*;
-import org.apache.ignite.spi.indexing.*;
 import org.apache.ignite.internal.util.lang.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.lang.*;
+import org.apache.ignite.spi.indexing.*;
 import org.h2.engine.*;
 import org.h2.index.*;
 import org.h2.message.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2KeyValueRowOffheap.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2KeyValueRowOffheap.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2KeyValueRowOffheap.java
index 04c1cce..8341233 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2KeyValueRowOffheap.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2KeyValueRowOffheap.java
@@ -19,8 +19,8 @@ package org.apache.ignite.internal.processors.query.h2.opt;
 
 import org.apache.ignite.*;
 import org.apache.ignite.internal.util.*;
-import org.apache.ignite.spi.*;
 import org.apache.ignite.internal.util.offheap.unsafe.*;
+import org.apache.ignite.spi.*;
 import org.h2.store.*;
 import org.h2.value.*;
 import org.jetbrains.annotations.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2SpatialIndex.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2SpatialIndex.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2SpatialIndex.java
index 1369378..d8586a5 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2SpatialIndex.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2SpatialIndex.java
@@ -19,8 +19,8 @@ package org.apache.ignite.internal.processors.query.h2.opt;
 
 import com.vividsolutions.jts.geom.*;
 import org.h2.engine.*;
-import org.h2.index.*;
 import org.h2.index.Cursor;
+import org.h2.index.*;
 import org.h2.message.*;
 import org.h2.mvstore.*;
 import org.h2.mvstore.rtree.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2TreeIndex.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2TreeIndex.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2TreeIndex.java
index 427b9ba..fb272e5 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2TreeIndex.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2TreeIndex.java
@@ -18,10 +18,10 @@
 package org.apache.ignite.internal.processors.query.h2.opt;
 
 import org.apache.ignite.internal.util.*;
-import org.apache.ignite.spi.indexing.*;
+import org.apache.ignite.internal.util.offheap.unsafe.*;
 import org.apache.ignite.internal.util.snaptree.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
-import org.apache.ignite.internal.util.offheap.unsafe.*;
+import org.apache.ignite.spi.indexing.*;
 import org.h2.engine.*;
 import org.h2.index.*;
 import org.h2.result.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridLuceneDirectory.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridLuceneDirectory.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridLuceneDirectory.java
index f2a4126..0b68e55 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridLuceneDirectory.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridLuceneDirectory.java
@@ -17,8 +17,8 @@
 
 package org.apache.ignite.internal.processors.query.h2.opt;
 
-import org.apache.lucene.store.*;
 import org.apache.ignite.internal.util.offheap.unsafe.*;
+import org.apache.lucene.store.*;
 
 import java.io.*;
 import java.util.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridLuceneIndex.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridLuceneIndex.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridLuceneIndex.java
index d1cee1a..45d336e 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridLuceneIndex.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridLuceneIndex.java
@@ -19,7 +19,11 @@ package org.apache.ignite.internal.processors.query.h2.opt;
 
 import org.apache.commons.codec.binary.*;
 import org.apache.ignite.*;
+import org.apache.ignite.internal.processors.query.*;
 import org.apache.ignite.internal.util.*;
+import org.apache.ignite.internal.util.lang.*;
+import org.apache.ignite.internal.util.offheap.unsafe.*;
+import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.marshaller.*;
 import org.apache.ignite.spi.indexing.*;
@@ -29,10 +33,6 @@ import org.apache.lucene.index.*;
 import org.apache.lucene.queryParser.*;
 import org.apache.lucene.search.*;
 import org.apache.lucene.util.*;
-import org.apache.ignite.internal.processors.query.*;
-import org.apache.ignite.internal.util.lang.*;
-import org.apache.ignite.internal.util.offheap.unsafe.*;
-import org.apache.ignite.internal.util.typedef.internal.*;
 import org.jetbrains.annotations.*;
 
 import java.io.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridLuceneInputStream.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridLuceneInputStream.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridLuceneInputStream.java
index da6438d..3e165a7 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridLuceneInputStream.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridLuceneInputStream.java
@@ -17,8 +17,8 @@
 
 package org.apache.ignite.internal.processors.query.h2.opt;
 
-import org.apache.lucene.store.*;
 import org.apache.ignite.internal.util.offheap.unsafe.*;
+import org.apache.lucene.store.*;
 
 import java.io.*;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridLuceneOutputStream.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridLuceneOutputStream.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridLuceneOutputStream.java
index 74df994..669903f 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridLuceneOutputStream.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridLuceneOutputStream.java
@@ -17,10 +17,11 @@
 
 package org.apache.ignite.internal.processors.query.h2.opt;
 
-import org.apache.lucene.store.*;
 import org.apache.ignite.internal.util.offheap.unsafe.*;
+import org.apache.lucene.store.DataInput;
+import org.apache.lucene.store.*;
 
-import java.io.IOException;
+import java.io.*;
 
 /**
  * A memory-resident {@link IndexOutput} implementation.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java
index 85ee409..d5f03e3 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java
@@ -15,10 +15,10 @@ import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.cache.*;
 import org.apache.ignite.internal.processors.cache.query.*;
 import org.apache.ignite.internal.processors.query.h2.*;
+import org.apache.ignite.internal.processors.query.h2.twostep.messages.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.spi.indexing.*;
-import org.apache.ignite.internal.processors.query.h2.twostep.messages.*;
 import org.h2.jdbc.*;
 import org.h2.result.*;
 import org.h2.value.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
index 7278eb8..521cc93 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
@@ -14,11 +14,11 @@ import org.apache.ignite.cluster.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.cache.query.*;
 import org.apache.ignite.internal.processors.query.h2.*;
+import org.apache.ignite.internal.processors.query.h2.twostep.messages.*;
 import org.apache.ignite.internal.util.future.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.lang.*;
-import org.apache.ignite.internal.processors.query.h2.twostep.messages.*;
 import org.jdk8.backport.*;
 
 import java.sql.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridResultPage.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridResultPage.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridResultPage.java
index 22a5dd9..1eba1b0 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridResultPage.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridResultPage.java
@@ -9,8 +9,8 @@
 
 package org.apache.ignite.internal.processors.query.h2.twostep;
 
-import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.internal.processors.query.h2.twostep.messages.*;
+import org.apache.ignite.internal.util.typedef.internal.*;
 
 /**
  * Page result.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFieldsQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFieldsQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFieldsQuerySelfTest.java
index 0364cab..3203d1e 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFieldsQuerySelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFieldsQuerySelfTest.java
@@ -21,16 +21,17 @@ import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.affinity.*;
 import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.configuration.*;
+import org.apache.ignite.internal.processors.cache.query.*;
+import org.apache.ignite.internal.processors.query.*;
+import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.marshaller.optimized.*;
 import org.apache.ignite.spi.discovery.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
-import org.apache.ignite.internal.processors.cache.query.*;
-import org.apache.ignite.internal.processors.query.*;
-import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.testframework.junits.common.*;
 import org.jetbrains.annotations.*;
 
@@ -93,7 +94,7 @@ public abstract class GridCacheAbstractFieldsQuerySelfTest extends GridCommonAbs
         cache.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
         cache.setPreloadMode(SYNC);
 
-        CacheQueryConfiguration qcfg = new CacheQueryConfiguration();
+        QueryConfiguration qcfg = new QueryConfiguration();
 
         qcfg.setIndexPrimitiveKey(true);
         qcfg.setIndexPrimitiveValue(true);
@@ -1167,7 +1168,7 @@ public abstract class GridCacheAbstractFieldsQuerySelfTest extends GridCommonAbs
     @SuppressWarnings("UnusedDeclaration")
     private static class PersonKey implements Serializable {
         /** ID. */
-        @CacheQuerySqlField
+        @QuerySqlField
         private final UUID id;
 
         /** @param id ID. */
@@ -1203,15 +1204,15 @@ public abstract class GridCacheAbstractFieldsQuerySelfTest extends GridCommonAbs
     @SuppressWarnings("UnusedDeclaration")
     private static class Person implements Serializable {
         /** Name. */
-        @CacheQuerySqlField(index = false)
+        @QuerySqlField(index = false)
         private final String name;
 
         /** Age. */
-        @CacheQuerySqlField(index = true)
+        @QuerySqlField(index = true)
         private final int age;
 
         /** Organization ID. */
-        @CacheQuerySqlField(index = true)
+        @QuerySqlField(index = true)
         private final int orgId;
 
         /**
@@ -1260,11 +1261,11 @@ public abstract class GridCacheAbstractFieldsQuerySelfTest extends GridCommonAbs
     @SuppressWarnings("UnusedDeclaration")
     private static class Organization implements Serializable {
         /** ID. */
-        @CacheQuerySqlField
+        @QuerySqlField
         private final int id;
 
         /** Name. */
-        @CacheQuerySqlField(index = false)
+        @QuerySqlField(index = false)
         private final String name;
 
         /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractQuerySelfTest.java
index 596a578..14d67bc 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractQuerySelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractQuerySelfTest.java
@@ -19,22 +19,22 @@ package org.apache.ignite.internal.processors.cache;
 
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
-import org.apache.ignite.cache.GridCache;
 import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.cache.store.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.events.*;
 import org.apache.ignite.internal.*;
+import org.apache.ignite.internal.processors.cache.query.*;
+import org.apache.ignite.internal.util.tostring.*;
+import org.apache.ignite.internal.util.typedef.*;
+import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.marshaller.optimized.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
 import org.apache.ignite.spi.swapspace.file.*;
-import org.apache.ignite.internal.processors.cache.query.*;
-import org.apache.ignite.internal.util.tostring.*;
-import org.apache.ignite.internal.util.typedef.*;
-import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.testframework.*;
 import org.apache.ignite.testframework.junits.common.*;
 import org.jdk8.backport.*;
@@ -47,13 +47,13 @@ import java.util.*;
 import java.util.concurrent.*;
 
 import static java.util.concurrent.TimeUnit.*;
-import static org.apache.ignite.cache.query.CacheQueryType.*;
-import static org.apache.ignite.events.IgniteEventType.*;
 import static org.apache.ignite.cache.CacheAtomicityMode.*;
 import static org.apache.ignite.cache.CacheDistributionMode.*;
 import static org.apache.ignite.cache.CacheMode.*;
 import static org.apache.ignite.cache.CachePreloadMode.*;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*;
+import static org.apache.ignite.internal.processors.cache.query.CacheQueryType.*;
+import static org.apache.ignite.events.IgniteEventType.*;
 import static org.junit.Assert.*;
 
 /**
@@ -138,7 +138,7 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
             cc.setSwapEnabled(true);
             cc.setEvictNearSynchronized(false);
 
-            CacheQueryConfiguration qcfg = new CacheQueryConfiguration();
+            QueryConfiguration qcfg = new QueryConfiguration();
 
             qcfg.setIndexPrimitiveKey(true);
             qcfg.setIndexFixedTyping(true);
@@ -373,7 +373,7 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
      */
     private static class Key {
         /** */
-        @CacheQuerySqlField
+        @QuerySqlField
         private final long id;
 
         /**
@@ -1152,7 +1152,7 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
         GridCache<Integer, Object> cache = ignite.cache(null);
 
         Object val = new Object() {
-            @CacheQuerySqlField
+            @QuerySqlField
             private int field1 = 10;
 
             @Override public String toString() {
@@ -1701,7 +1701,7 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
      */
     private static class ArrayObject implements Serializable {
         /** */
-        @CacheQuerySqlField
+        @QuerySqlField
         private Long[] arr;
 
         /**
@@ -1718,20 +1718,20 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
     public static class Person implements Externalizable {
         /** */
         @GridToStringExclude
-        @CacheQuerySqlField
+        @QuerySqlField
         private UUID id = UUID.randomUUID();
 
         /** */
-        @CacheQuerySqlField
-        @CacheQueryTextField
+        @QuerySqlField
+        @QueryTextField
         private String name;
 
         /** */
-        @CacheQuerySqlField
+        @QuerySqlField
         private int salary;
 
         /** */
-        @CacheQuerySqlField(index = true)
+        @QuerySqlField(index = true)
         private int fake$Field;
 
         /**
@@ -1818,11 +1818,11 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
     @SuppressWarnings("PublicInnerClass")
     public static class ObjectValue implements Serializable {
         /** String value. */
-        @CacheQueryTextField
+        @QueryTextField
         private String strVal;
 
         /** Integer value. */
-        @CacheQuerySqlField
+        @QuerySqlField
         private int intVal;
 
         /**
@@ -1882,7 +1882,7 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
      */
     private static class ObjectValueOther {
         /** Value. */
-        @CacheQueryTextField
+        @QueryTextField
         private String val;
 
         /**
@@ -1965,7 +1965,7 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
      */
     private static class BadHashKeyObject implements Serializable {
         /** */
-        @CacheQuerySqlField(index = false)
+        @QuerySqlField(index = false)
         private final String str;
 
         /**
@@ -2033,7 +2033,7 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
          * @param x Argument.
          * @return Square of given value.
          */
-        @CacheQuerySqlFunction
+        @QuerySqlFunction
         public static int square(int x) {
             return x * x;
         }
@@ -2042,7 +2042,7 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
          * @param x Argument.
          * @return Cube of given value.
          */
-        @CacheQuerySqlFunction(alias = "_cube_")
+        @QuerySqlFunction(alias = "_cube_")
         public static int cube(int x) {
             return x * x * x;
         }


[08/50] [abbrv] incubator-ignite git commit: Merge branch 'sprint-1' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into sprint-1

Posted by se...@apache.org.
Merge branch 'sprint-1' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into sprint-1


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

Branch: refs/heads/ignite-sql
Commit: 4009aaa35cba35752b80d39c03d3b5a87fdf4041
Parents: 9900ae4 7eebc7e
Author: ivasilinets <iv...@gridgain.com>
Authored: Thu Jan 29 18:14:21 2015 +0300
Committer: ivasilinets <iv...@gridgain.com>
Committed: Thu Jan 29 18:14:21 2015 +0300

----------------------------------------------------------------------
 ipc/shmem/Makefile.am                           |    2 +-
 ipc/shmem/Makefile.in                           |    2 +-
 ipc/shmem/configure                             |    4 +-
 ipc/shmem/configure.ac                          |    2 +-
 ipc/shmem/ggshmem/Makefile.am                   |   23 -
 ipc/shmem/ggshmem/Makefile.in                   |  589 --
 ..._util_ipc_shmem_GridIpcSharedMemoryUtils.cpp |  882 --
 ipc/shmem/igniteshmem/Makefile.am               |   23 +
 ipc/shmem/igniteshmem/Makefile.in               |  589 ++
 ...rnal_util_ipc_shmem_IpcSharedMemoryUtils.cpp |  882 ++
 ipc/shmem/include/Makefile.am                   |    2 +-
 ipc/shmem/include/Makefile.in                   |    2 +-
 ...ternal_util_ipc_shmem_IpcSharedMemoryUtils.h |  117 +
 ...id_util_ipc_shmem_GridIpcSharedMemoryUtils.h |  117 -
 ipc/shmem/readme.txt                            |    9 +-
 .../spi/checkpoint/s3/S3CheckpointSpi.java      |    4 +-
 .../ClientAbstractMultiThreadedSelfTest.java    |    2 +-
 .../ClientPropertiesConfigurationSelfTest.java  |    4 +-
 .../ClientAbstractMultiNodeSelfTest.java        |    4 +-
 .../rest/RestBinaryProtocolSelfTest.java        |    2 +-
 .../rest/TaskCommandHandlerSelfTest.java        |    2 +-
 .../java/META-INF/native/linux64/libggshmem.so  |  Bin 138023 -> 0 bytes
 .../META-INF/native/linux64/libigniteshmem.so   |  Bin 0 -> 138345 bytes
 .../java/META-INF/native/osx/libggshmem.dylib   |  Bin 32940 -> 0 bytes
 .../META-INF/native/osx/libigniteshmem.dylib    |  Bin 0 -> 33116 bytes
 .../apache/ignite/IgniteCheckedException.java   |    2 +-
 .../java/org/apache/ignite/IgniteException.java |    2 +-
 .../main/java/org/apache/ignite/Ignition.java   |   38 +-
 .../apache/ignite/cache/CachingProvider.java    |    2 +-
 .../ignite/fs/mapreduce/IgniteFsTask.java       |    2 +-
 .../ignite/internal/ClusterGroupAdapter.java    |    2 +-
 .../internal/ClusterNodeLocalMapImpl.java       |    2 +-
 .../java/org/apache/ignite/internal/GridEx.java |  143 -
 .../org/apache/ignite/internal/GridGainEx.java  | 2399 -----
 .../org/apache/ignite/internal/GridKernal.java  | 3322 -------
 .../ignite/internal/GridKernalContext.java      |    2 +-
 .../ignite/internal/GridKernalContextImpl.java  |    8 +-
 .../apache/ignite/internal/GridLoggerProxy.java |    2 +-
 .../ignite/internal/GridUpdateNotifier.java     |    2 +-
 .../ignite/internal/IgniteClusterAsyncImpl.java |    4 +-
 .../org/apache/ignite/internal/IgniteEx.java    |  143 +
 .../apache/ignite/internal/IgniteKernal.java    | 3322 +++++++
 .../org/apache/ignite/internal/IgnitionEx.java  | 2396 +++++
 .../processors/affinity/GridAffinityUtils.java  |    2 +-
 .../processors/cache/GridCacheAdapter.java      |    8 +-
 .../processors/cache/GridCacheContext.java      |    4 +-
 .../cache/GridCacheDeploymentManager.java       |    2 +-
 .../cache/GridCacheMvccCandidate.java           |    4 +-
 .../processors/cache/IgniteCacheProxy.java      |   22 +-
 .../GridCacheDataStructuresManager.java         |    4 +-
 .../cache/query/GridCacheQueryManager.java      |    2 +-
 .../jdbc/GridCacheQueryJdbcMetadataTask.java    |    2 +-
 .../query/jdbc/GridCacheQueryJdbcTask.java      |    2 +-
 .../dr/GridDrDataLoadCacheUpdater.java          |    2 +-
 .../internal/processors/fs/GridGgfsImpl.java    |    2 +-
 .../internal/processors/fs/GridGgfsServer.java  |   26 +-
 .../processors/fs/GridGgfsServerManager.java    |    8 +-
 .../processors/fs/IgniteFsNoopProcessor.java    |    2 +-
 .../processors/fs/IgniteFsProcessor.java        |    4 +-
 .../processors/fs/IgniteFsProcessorAdapter.java |    2 +-
 .../resource/GridResourceProcessor.java         |    2 +-
 .../resource/GridSpringResourceContext.java     |    2 +-
 .../handlers/cache/GridCacheCommandHandler.java |    6 +-
 .../handlers/task/GridTaskCommandHandler.java   |    2 +-
 .../service/GridServiceProcessor.java           |    2 +-
 .../processors/service/GridServiceProxy.java    |    2 +-
 .../apache/ignite/internal/util/GridUtils.java  | 9100 -----------------
 .../ignite/internal/util/IgniteUtils.java       | 9141 ++++++++++++++++++
 .../internal/util/ipc/GridIpcEndpoint.java      |   49 -
 .../util/ipc/GridIpcEndpointBindException.java  |   47 -
 .../util/ipc/GridIpcEndpointFactory.java        |   84 -
 .../internal/util/ipc/GridIpcEndpointType.java  |   29 -
 .../util/ipc/GridIpcServerEndpoint.java         |   73 -
 .../ipc/GridIpcServerEndpointDeserializer.java  |   66 -
 .../internal/util/ipc/GridIpcToNioAdapter.java  |  250 -
 .../ignite/internal/util/ipc/IpcEndpoint.java   |   49 +
 .../util/ipc/IpcEndpointBindException.java      |   47 +
 .../internal/util/ipc/IpcEndpointFactory.java   |   84 +
 .../internal/util/ipc/IpcEndpointType.java      |   29 +
 .../internal/util/ipc/IpcServerEndpoint.java    |   73 +
 .../util/ipc/IpcServerEndpointDeserializer.java |   66 +
 .../internal/util/ipc/IpcToNioAdapter.java      |  250 +
 .../ipc/loopback/GridIpcClientTcpEndpoint.java  |   87 -
 .../ipc/loopback/GridIpcServerTcpEndpoint.java  |  179 -
 .../util/ipc/loopback/IpcClientTcpEndpoint.java |   87 +
 .../util/ipc/loopback/IpcServerTcpEndpoint.java |  179 +
 .../GridIpcOutOfSystemResourcesException.java   |   59 -
 .../GridIpcSharedMemoryClientEndpoint.java      |  336 -
 .../shmem/GridIpcSharedMemoryInitRequest.java   |   67 -
 .../shmem/GridIpcSharedMemoryInitResponse.java  |  171 -
 .../shmem/GridIpcSharedMemoryInputStream.java   |   99 -
 .../shmem/GridIpcSharedMemoryNativeLoader.java  |  242 -
 ...cSharedMemoryOperationTimedoutException.java |   59 -
 .../shmem/GridIpcSharedMemoryOutputStream.java  |   80 -
 .../GridIpcSharedMemoryServerEndpoint.java      |  707 --
 .../ipc/shmem/GridIpcSharedMemorySpace.java     |  374 -
 .../ipc/shmem/GridIpcSharedMemoryUtils.java     |  242 -
 .../shmem/IpcOutOfSystemResourcesException.java |   59 +
 .../shmem/IpcSharedMemoryClientEndpoint.java    |  336 +
 .../ipc/shmem/IpcSharedMemoryInitRequest.java   |   67 +
 .../ipc/shmem/IpcSharedMemoryInitResponse.java  |  171 +
 .../ipc/shmem/IpcSharedMemoryInputStream.java   |   99 +
 .../ipc/shmem/IpcSharedMemoryNativeLoader.java  |  261 +
 ...cSharedMemoryOperationTimedoutException.java |   59 +
 .../ipc/shmem/IpcSharedMemoryOutputStream.java  |   80 +
 .../shmem/IpcSharedMemoryServerEndpoint.java    |  707 ++
 .../util/ipc/shmem/IpcSharedMemorySpace.java    |  374 +
 .../util/ipc/shmem/IpcSharedMemoryUtils.java    |  242 +
 .../util/nio/GridShmemCommunicationClient.java  |    4 +-
 .../internal/util/typedef/internal/U.java       |    4 +-
 .../apache/ignite/internal/visor/VisorJob.java  |    2 +-
 .../internal/visor/VisorMultiNodeTask.java      |    2 +-
 .../ignite/internal/visor/cache/VisorCache.java |    2 +-
 .../compute/VisorComputeMonitoringHolder.java   |   10 +-
 .../visor/misc/VisorResolveHostNameTask.java    |    2 +-
 .../visor/node/VisorBasicConfiguration.java     |    2 +-
 .../visor/node/VisorGridConfiguration.java      |    2 +-
 .../visor/node/VisorNodeDataCollectorJob.java   |    6 +-
 .../internal/visor/query/VisorQueryTask.java    |    2 +-
 .../internal/visor/query/VisorQueryUtils.java   |    4 +-
 .../ignite/lang/IgniteAsyncSupportAdapter.java  |   27 +-
 .../optimized/IgniteOptimizedMarshaller.java    |    2 +-
 .../communication/tcp/TcpCommunicationSpi.java  |   24 +-
 .../StreamerCacheAffinityEventRouter.java       |    2 +-
 .../ignite/GridExceptionHelpLinksSelfTest.java  |  106 -
 .../ignite/GridExternalizableAbstractTest.java  |   41 -
 .../IgniteExceptionHelpLinksSelfTest.java       |  105 +
 .../IgniteExternalizableAbstractTest.java       |   41 +
 ...CachePartitionFairAffinityNodesSelfTest.java |    6 +-
 ...CacheJdbcBlobStoreMultithreadedSelfTest.java |    2 +-
 .../fs/GridGgfsEventsAbstractSelfTest.java      |    2 +-
 .../ignite/fs/GridGgfsFragmentizerSelfTest.java |    2 +-
 .../internal/GridDiscoveryEventSelfTest.java    |    3 +-
 .../ignite/internal/GridDiscoverySelfTest.java  |    4 +-
 .../GridEventStorageCheckAllEventsSelfTest.java |    2 +-
 .../internal/GridExecutorServiceTest.java       |  315 -
 .../GridExplicitImplicitDeploymentSelfTest.java |  476 -
 .../ignite/internal/GridKernalTestUtils.java    |    3 +-
 .../internal/GridListenActorSelfTest.java       |    3 +-
 .../GridTopicExternalizableSelfTest.java        |    3 +-
 .../GridTopologyBuildVersionSelfTest.java       |    2 +-
 .../internal/GridUpdateNotifierSelfTest.java    |    3 +-
 .../internal/IgniteExecutorServiceTest.java     |  315 +
 ...gniteExplicitImplicitDeploymentSelfTest.java |  476 +
 .../GridCheckpointManagerAbstractSelfTest.java  |    2 +-
 .../GridCommunicationSendMessageSelfTest.java   |    4 +-
 .../GridDiscoveryManagerAliveCacheSelfTest.java |    2 +-
 .../discovery/GridDiscoveryManagerSelfTest.java |    6 +-
 .../swapspace/GridSwapSpaceManagerSelfTest.java |    2 +-
 .../GridAffinityProcessorAbstractSelfTest.java  |    6 +-
 .../cache/GridCacheAbstractFullApiSelfTest.java |    4 +-
 .../cache/GridCacheAbstractMetricsSelfTest.java |   10 +-
 .../cache/GridCacheAbstractSelfTest.java        |    2 +-
 .../cache/GridCacheAffinityApiSelfTest.java     |    4 +-
 .../GridCacheConcurrentTxMultiNodeTest.java     |    4 +-
 .../cache/GridCacheEntryVersionSelfTest.java    |    4 +-
 .../GridCacheFinishPartitionsSelfTest.java      |    4 +-
 .../GridCacheGroupLockAbstractSelfTest.java     |    4 +-
 .../processors/cache/GridCacheLeakTest.java     |    2 +-
 ...GridCacheMixedPartitionExchangeSelfTest.java |    2 +-
 .../cache/GridCacheMultiUpdateLockSelfTest.java |    2 +-
 .../cache/GridCacheMvccFlagsTest.java           |    4 +-
 .../cache/GridCacheMvccManagerSelfTest.java     |    4 +-
 .../cache/GridCacheMvccPartitionedSelfTest.java |    4 +-
 .../processors/cache/GridCacheMvccSelfTest.java |    4 +-
 .../cache/GridCacheNestedTxAbstractTest.java    |    2 +-
 .../cache/GridCacheObjectToStringSelfTest.java  |    2 +-
 .../GridCacheOrderedPreloadingSelfTest.java     |    2 +-
 .../cache/GridCacheP2PUndeploySelfTest.java     |    6 +-
 .../cache/GridCachePartitionedGetSelfTest.java  |    2 +-
 .../GridCachePreloadingEvictionsSelfTest.java   |    6 +-
 .../GridCacheQueryInternalKeysSelfTest.java     |    2 +-
 .../GridCacheReturnValueTransferSelfTest.java   |    2 +-
 .../cache/GridCacheSlowTxWarnTest.java          |    4 +-
 .../cache/GridCacheStoreValueBytesSelfTest.java |    4 +-
 .../cache/GridCacheSwapReloadSelfTest.java      |    2 +-
 .../cache/GridCacheTtlManagerLoadTest.java      |    2 +-
 .../cache/GridCacheTtlManagerSelfTest.java      |    2 +-
 .../IgniteCacheEntryListenerAbstractTest.java   |    2 +-
 .../cache/IgniteCacheInvokeAbstractTest.java    |    4 +-
 .../processors/cache/IgniteTxAbstractTest.java  |    2 +-
 .../IgniteTxConcurrentGetAbstractTest.java      |    3 +-
 .../IgniteTxExceptionAbstractSelfTest.java      |    2 +-
 .../cache/IgniteTxMultiNodeAbstractTest.java    |    6 +-
 .../IgniteTxStoreExceptionAbstractSelfTest.java |    2 +-
 ...actQueueFailoverDataConsistencySelfTest.java |    2 +-
 .../GridCacheCountDownLatchSelfTest.java        |    2 +-
 .../GridCacheQueueCleanupSelfTest.java          |    2 +-
 .../GridCacheSetAbstractSelfTest.java           |    8 +-
 .../GridCacheSetFailoverAbstractSelfTest.java   |    2 +-
 .../GridCacheAtomicTimeoutSelfTest.java         |    2 +-
 .../distributed/GridCacheEventAbstractTest.java |    2 +-
 ...heExpiredEntriesPreloadAbstractSelfTest.java |    2 +-
 .../GridCacheMultiNodeLockAbstractTest.java     |    2 +-
 ...iteTxConsistencyRestartAbstractSelfTest.java |    4 +-
 ...xOriginatingNodeFailureAbstractSelfTest.java |   10 +-
 ...cOriginatingNodeFailureAbstractSelfTest.java |   20 +-
 .../dht/GridCacheAtomicNearCacheSelfTest.java   |    2 +-
 .../dht/GridCacheColocatedDebugTest.java        |    6 +-
 .../dht/GridCacheDhtEntrySelfTest.java          |    2 +-
 ...GridCacheDhtEvictionNearReadersSelfTest.java |    4 +-
 .../dht/GridCacheDhtEvictionSelfTest.java       |    4 +-
 .../dht/GridCacheDhtMappingSelfTest.java        |    2 +-
 .../dht/GridCacheDhtPreloadDelayedSelfTest.java |    2 +-
 .../GridCacheDhtPreloadStartStopSelfTest.java   |    2 +-
 ...dCachePartitionedTopologyChangeSelfTest.java |   32 +-
 ...itionedTxOriginatingNodeFailureSelfTest.java |    8 +-
 ...eAtomicInvalidPartitionHandlingSelfTest.java |    2 +-
 .../atomic/GridCacheAtomicPreloadSelfTest.java  |    4 +-
 ...GridCacheValueConsistencyAtomicSelfTest.java |    2 +-
 .../near/GridCacheNearMultiNodeSelfTest.java    |    6 +-
 .../near/GridCacheNearReadersSelfTest.java      |    4 +-
 .../near/GridCacheNearTxMultiNodeSelfTest.java  |    2 +-
 .../GridCachePartitionedFullApiSelfTest.java    |    4 +-
 ...achePartitionedMultiNodeCounterSelfTest.java |    2 +-
 .../GridCachePartitionedProjectionSelfTest.java |    4 +-
 .../GridCachePartitionedTxSalvageSelfTest.java  |    2 +-
 .../IgniteCacheExpiryPolicyAbstractTest.java    |    2 +-
 ...ridCacheContinuousQueryAbstractSelfTest.java |    4 +-
 .../clock/GridTimeSyncProcessorSelfTest.java    |    6 +-
 .../continuous/GridEventConsumeSelfTest.java    |    2 +-
 .../processors/fs/GridGgfsAbstractSelfTest.java |    2 +-
 .../processors/fs/GridGgfsModesSelfTest.java    |    4 +-
 .../fs/GridGgfsProcessorSelfTest.java           |    2 +-
 ...IpcEndpointRegistrationAbstractSelfTest.java |    6 +-
 ...pcEndpointRegistrationOnWindowsSelfTest.java |    4 +-
 .../processors/fs/GridGgfsSizeSelfTest.java     |    8 +-
 .../cache/GridCacheCommandHandlerSelfTest.java  |   10 +-
 .../GridServiceReassignmentSelfTest.java        |    2 +-
 ...artupWithSpecifiedWorkDirectorySelfTest.java |    2 +-
 ...tartupWithUndefinedGridGainHomeSelfTest.java |    4 +-
 .../internal/util/GridTestClockTimer.java       |    6 +-
 .../ignite/internal/util/GridUtilsSelfTest.java |  717 --
 .../internal/util/IgniteUtilsSelfTest.java      |  728 ++
 .../util/future/GridFinishedFutureSelfTest.java |    2 +-
 ...idIpcServerEndpointDeserializerSelfTest.java |  160 -
 .../IpcServerEndpointDeserializerSelfTest.java  |  160 +
 .../ipc/shmem/GgfsSharedMemoryTestClient.java   |   76 +
 .../ipc/shmem/GgfsSharedMemoryTestServer.java   |   71 +
 .../shmem/GridGgfsSharedMemoryTestClient.java   |   76 -
 .../shmem/GridGgfsSharedMemoryTestServer.java   |   71 -
 ...idIpcSharedMemoryCrashDetectionSelfTest.java |  500 -
 .../shmem/GridIpcSharedMemoryFakeClient.java    |   36 -
 .../shmem/GridIpcSharedMemoryNodeStartup.java   |   87 -
 .../shmem/GridIpcSharedMemorySpaceSelfTest.java |  267 -
 .../shmem/GridIpcSharedMemoryUtilsSelfTest.java |   84 -
 .../IpcSharedMemoryCrashDetectionSelfTest.java  |  500 +
 .../ipc/shmem/IpcSharedMemoryFakeClient.java    |   36 +
 .../IpcSharedMemoryNativeLoaderSelfTest.java    |   78 +
 .../ipc/shmem/IpcSharedMemoryNodeStartup.java   |   87 +
 .../ipc/shmem/IpcSharedMemorySpaceSelfTest.java |  267 +
 .../ipc/shmem/IpcSharedMemoryUtilsSelfTest.java |   84 +
 .../LoadWithCorruptedLibFileTestRunner.java     |   65 +
 .../GridIpcSharedMemoryBenchmarkParty.java      |   35 -
 .../GridIpcSharedMemoryBenchmarkReader.java     |  133 -
 .../GridIpcSharedMemoryBenchmarkWriter.java     |  125 -
 .../IpcSharedMemoryBenchmarkParty.java          |   35 +
 .../IpcSharedMemoryBenchmarkReader.java         |  133 +
 .../IpcSharedMemoryBenchmarkWriter.java         |  125 +
 .../ignite/lang/GridSetWrapperSelfTest.java     |    2 +-
 .../cache/GridCachePutRemoveLoadTest.java       |    2 +-
 .../communication/GridIoManagerBenchmark.java   |   10 +-
 .../communication/GridIoManagerBenchmark0.java  |   12 +-
 .../ignite/loadtests/dsi/GridDsiPerfJob.java    |    2 +-
 .../marshaller/GridMarshallerAbstractTest.java  |    6 +-
 .../tcp/GridTcpDiscoveryMultiThreadedTest.java  |    2 +-
 .../discovery/tcp/GridTcpDiscoverySelfTest.java |   14 +-
 .../ignite/testframework/GridTestUtils.java     |    4 +-
 .../testframework/junits/GridAbstractTest.java  |   14 +-
 .../junits/GridTestKernalContext.java           |    2 +-
 .../junits/common/GridCommonAbstractTest.java   |   22 +-
 .../ignite/testsuites/IgniteBasicTestSuite.java |    2 +-
 .../testsuites/IgniteComputeGridTestSuite.java  |    4 +-
 .../ignite/testsuites/IgniteFsTestSuite.java    |    2 +-
 .../IgniteIpcSharedMemorySelfTestSuite.java     |    7 +-
 .../testsuites/IgniteUtilSelfTestSuite.java     |    2 +-
 .../internal/fs/hadoop/GridGgfsHadoopIpcIo.java |   10 +-
 .../GridHadoopDefaultMapReducePlanner.java      |    2 +-
 .../GridHadoopExternalCommunication.java        |   26 +-
 .../GridHadoopIpcToNioAdapter.java              |    6 +-
 ...doop20FileSystemLoopbackPrimarySelfTest.java |    2 +-
 ...sHadoop20FileSystemShmemPrimarySelfTest.java |    2 +-
 .../GridGgfsHadoopFileSystemClientSelfTest.java |    4 +-
 ...idGgfsHadoopFileSystemHandshakeSelfTest.java |    2 +-
 ...ridGgfsHadoopFileSystemIpcCacheSelfTest.java |    2 +-
 ...adoopFileSystemLoopbackAbstractSelfTest.java |    2 +-
 ...fsHadoopFileSystemShmemAbstractSelfTest.java |    8 +-
 .../fs/GridGgfsNearOnlyMultiNodeSelfTest.java   |    4 +-
 .../ignite/fs/IgniteFsEventsTestSuite.java      |    4 +-
 ...idHadoopDefaultMapReducePlannerSelfTest.java |    4 +-
 .../hadoop/GridHadoopJobTrackerSelfTest.java    |    2 +-
 .../cache/GridCacheAbstractQuerySelfTest.java   |    6 +-
 .../cache/GridCacheOffHeapAndSwapSelfTest.java  |    4 +-
 .../cache/GridCacheQueryLoadSelfTest.java       |    2 +-
 .../GridCacheQueryMultiThreadedSelfTest.java    |    8 +-
 .../GridCacheReplicatedFieldsQuerySelfTest.java |    2 +-
 .../GridCacheReplicatedQuerySelfTest.java       |    4 +-
 .../query/h2/sql/GridQueryParsingTest.java      |    2 +-
 .../tcp/GridOrderedMessageCancelSelfTest.java   |    2 +-
 .../GridTmLookupLifecycleAwareSelfTest.java     |    2 +-
 .../java/org/apache/ignite/IgniteSpring.java    |    8 +-
 .../cache/spring/SpringDynamicCacheManager.java |    2 +-
 .../ignite/visor/commands/VisorConsole.scala    |    6 +-
 .../commands/alert/VisorAlertCommand.scala      |    4 +-
 .../config/VisorConfigurationCommand.scala      |    6 +-
 .../commands/deploy/VisorDeployCommand.scala    |    4 +-
 .../commands/disco/VisorDiscoveryCommand.scala  |    4 +-
 .../commands/events/VisorEventsCommand.scala    |    4 +-
 .../visor/commands/node/VisorNodeCommand.scala  |    4 +-
 .../commands/start/VisorStartCommand.scala      |    4 +-
 .../commands/tasks/VisorTasksCommand.scala      |    4 +-
 .../commands/top/VisorTopologyCommand.scala     |    6 +-
 .../visor/commands/vvm/VisorVvmCommand.scala    |    8 +-
 .../scala/org/apache/ignite/visor/visor.scala   |   26 +-
 .../GridServletContextListenerStartup.java      |    4 +-
 .../startup/servlet/GridServletStartup.java     |    4 +-
 316 files changed, 23824 insertions(+), 23627 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4009aaa3/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4009aaa3/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
----------------------------------------------------------------------


[22/50] [abbrv] incubator-ignite git commit: Ignite-67 log fix

Posted by se...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a360ab77/modules/core/src/test/resources/log/gridgain.log.tst
----------------------------------------------------------------------
diff --git a/modules/core/src/test/resources/log/gridgain.log.tst b/modules/core/src/test/resources/log/gridgain.log.tst
index 7a825be..ea74097 100644
--- a/modules/core/src/test/resources/log/gridgain.log.tst
+++ b/modules/core/src/test/resources/log/gridgain.log.tst
@@ -1,10 +1,10 @@
-[14:14:22,515][INFO ][main][GridListenActorSelfTest]
+[14:14:22,515][INFO ][main][GridListenActorSelfTest] 
 
->>>   _____     _     _______      _
->>>  / ___/____(_)___/ / ___/___ _(_)___
->>> / (_ // __/ // _  / (_ // _ `/ // _ \
+>>>   _____     _     _______      _         
+>>>  / ___/____(_)___/ / ___/___ _(_)___     
+>>> / (_ // __/ // _  / (_ // _ `/ // _ \   
 >>> \___//_/ /_/ \_,_/\___/ \_,_/_//_//_/
->>>
+>>> 
 >>>  ---==++ IN-MEMORY BIG DATA ++==---
 >>>        ver. x.x.x-DDMMYYYY
 >>> Copyright (C) 2012 GridGain Systems
@@ -15,8 +15,8 @@
 [14:14:22,516][INFO ][main][GridListenActorSelfTest] Language runtime: Java Platform API Specification ver. 1.6
 [14:14:22,516][INFO ][main][GridListenActorSelfTest] JVM name: Java HotSpot(TM) 64-Bit Server VM
 [14:14:22,516][INFO ][main][GridListenActorSelfTest] Remote Management [restart: off, REST: on, JMX (remote: off)]
-[14:14:22,516][INFO ][main][GridListenActorSelfTest] IGNITE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2
-[14:14:22,516][INFO ][main][GridListenActorSelfTest] VM arguments: [-ea, -XX:MaxPermSize=128m, -Xms512m, -Xmx1024m, -Duser.name=bamboo, -DIGNITE_UPDATE_NOTIFIER=false, -DGRIDGAIN_DISABLED=true, -DIGNITE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_STABLE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_ROUTER_PREFER_REMOTE=true, -DIGNITE_NO_DISCO_ORDER=true, -DIGNITE_QUIET=false, -DGG_TEST_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.id=34324, -Dteamcity.buildType.id=bt5, -Dagent.ownPort=9090, -Dteamcity.build.checkoutDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.workingDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dagent.work.dir=/usr/local/TeamCityAgent/work, -Dagent.name=teamcity-4, -Dagent.home.dir=/usr/local/TeamCityAgent, -Dteamcity.runtime.props.file=/usr/local/TeamCityAgent/temp/agentTmp/ant2684847485530994862runtime]
+[14:14:22,516][INFO ][main][GridListenActorSelfTest] GRIDGAIN_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2
+[14:14:22,516][INFO ][main][GridListenActorSelfTest] VM arguments: [-ea, -XX:MaxPermSize=128m, -Xms512m, -Xmx1024m, -Duser.name=bamboo, -DGRIDGAIN_UPDATE_NOTIFIER=false, -DGRIDGAIN_DISABLED=true, -DGRIDGAIN_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_STABLE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_ROUTER_PREFER_REMOTE=true, -DGRIDGAIN_NO_DISCO_ORDER=true, -DGRIDGAIN_QUIET=false, -DGG_TEST_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.id=34324, -Dteamcity.buildType.id=bt5, -Dagent.ownPort=9090, -Dteamcity.build.checkoutDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.workingDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dagent.work.dir=/usr/local/TeamCityAgent/work, -Dagent.name=teamcity-4, -Dagent.home.dir=/usr/local/TeamCityAgent, -Dteamcity.runtime.props.file=/usr/local/TeamCityAgent/temp/agentTmp/ant2684847485530994862runtime]
 [14:14:22,517][WARN ][main][GridListenActorSelfTest] SMTP is not configured - email notifications are off.
 [14:14:22,517][WARN ][main][GridListenActorSelfTest] Cache is not configured - data grid is off.
 [14:14:22,521][INFO ][main][GridListenActorSelfTest] 3-rd party licenses can be found at: /usr/local/TeamCityAgent/work/d46fc9c3d71112c2/libs/licenses
@@ -36,7 +36,7 @@
 [14:14:24,721][INFO ][main][GridLicenseControllerImpl] Licensed to 'GridGain Systems, Internal Development Only' on Feb 3, 2011
 [14:14:24,721][INFO ][main][GridLicenseControllerImpl] License [ID=7D5CB773-225C-4165-8162-3BB67337894B, type=ENT]
 [14:14:24,721][INFO ][main][GridLicenseControllerImpl] License limits [expire-date: never]
-[14:14:24,740][INFO ][main][GridListenActorSelfTest]
+[14:14:24,740][INFO ][main][GridListenActorSelfTest] 
 
 >>> +--------------------------+
 >>> GridGain ver. x.x.x-DDMMYYYY
@@ -49,7 +49,7 @@
 >>> Grid name: kernal.GridListenActorSelfTest
 >>> Local node [ID=353D63B5-A2F0-41D1-A30E-37016F357233, order=1353320063496]
 >>> Local node addresses: [192.168.2.14]
->>> Local ports: TCP:8080 TCP:11211 TCP:45010 UDP:50001 TCP:55010
+>>> Local ports: TCP:8080 TCP:11211 TCP:45010 UDP:50001 TCP:55010 
 >>> GridGain documentation: http://www.gridgain.com/product.html
 
 [14:14:24,740][INFO ][main][GridListenActorSelfTest] >>> Starting test: testListenByClosure <<<
@@ -61,13 +61,13 @@
 [14:14:30,938][INFO ][main][GridListenActorSelfTest] >>> Starting test: testReceiveAll <<<
 [14:14:32,948][INFO ][main][GridListenActorSelfTest] >>> Stopping test: testReceiveAll in 2010 ms <<<
 [14:14:32,956][INFO ][main][GridListenActorSelfTest] >>> Starting test: testRespondToRemote <<<
-[14:14:32,960][INFO ][test-runner][GridListenActorSelfTest1]
+[14:14:32,960][INFO ][test-runner][GridListenActorSelfTest1] 
 
->>>   _____     _     _______      _
->>>  / ___/____(_)___/ / ___/___ _(_)___
->>> / (_ // __/ // _  / (_ // _ `/ // _ \
+>>>   _____     _     _______      _         
+>>>  / ___/____(_)___/ / ___/___ _(_)___     
+>>> / (_ // __/ // _  / (_ // _ `/ // _ \   
 >>> \___//_/ /_/ \_,_/\___/ \_,_/_//_//_/
->>>
+>>> 
 >>>  ---==++ IN-MEMORY BIG DATA ++==---
 >>>        ver. x.x.x-DDMMYYYY
 >>> Copyright (C) 2012 GridGain Systems
@@ -78,8 +78,8 @@
 [14:14:32,961][INFO ][test-runner][GridListenActorSelfTest1] Language runtime: Java Platform API Specification ver. 1.6
 [14:14:32,961][INFO ][test-runner][GridListenActorSelfTest1] JVM name: Java HotSpot(TM) 64-Bit Server VM
 [14:14:32,961][INFO ][test-runner][GridListenActorSelfTest1] Remote Management [restart: off, REST: on, JMX (remote: off)]
-[14:14:32,961][INFO ][test-runner][GridListenActorSelfTest1] IGNITE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2
-[14:14:32,961][INFO ][test-runner][GridListenActorSelfTest1] VM arguments: [-ea, -XX:MaxPermSize=128m, -Xms512m, -Xmx1024m, -Duser.name=bamboo, -DIGNITE_UPDATE_NOTIFIER=false, -DGRIDGAIN_DISABLED=true, -DIGNITE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_STABLE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_ROUTER_PREFER_REMOTE=true, -DIGNITE_NO_DISCO_ORDER=true, -DIGNITE_QUIET=false, -DGG_TEST_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.id=34324, -Dteamcity.buildType.id=bt5, -Dagent.ownPort=9090, -Dteamcity.build.checkoutDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.workingDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dagent.work.dir=/usr/local/TeamCityAgent/work, -Dagent.name=teamcity-4, -Dagent.home.dir=/usr/local/TeamCityAgent, -Dteamcity.runtime.props.file=/usr/local/TeamCityAgent/temp/agentTmp/ant2684847485530994862runtime]
+[14:14:32,961][INFO ][test-runner][GridListenActorSelfTest1] GRIDGAIN_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2
+[14:14:32,961][INFO ][test-runner][GridListenActorSelfTest1] VM arguments: [-ea, -XX:MaxPermSize=128m, -Xms512m, -Xmx1024m, -Duser.name=bamboo, -DGRIDGAIN_UPDATE_NOTIFIER=false, -DGRIDGAIN_DISABLED=true, -DGRIDGAIN_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_STABLE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_ROUTER_PREFER_REMOTE=true, -DGRIDGAIN_NO_DISCO_ORDER=true, -DGRIDGAIN_QUIET=false, -DGG_TEST_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.id=34324, -Dteamcity.buildType.id=bt5, -Dagent.ownPort=9090, -Dteamcity.build.checkoutDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.workingDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dagent.work.dir=/usr/local/TeamCityAgent/work, -Dagent.name=teamcity-4, -Dagent.home.dir=/usr/local/TeamCityAgent, -Dteamcity.runtime.props.file=/usr/local/TeamCityAgent/temp/agentTmp/ant2684847485530994862runtime]
 [14:14:32,961][WARN ][test-runner][GridListenActorSelfTest1] SMTP is not configured - email notifications are off.
 [14:14:32,961][WARN ][test-runner][GridListenActorSelfTest1] Cache is not configured - data grid is off.
 [14:14:32,964][INFO ][test-runner][GridListenActorSelfTest1] 3-rd party licenses can be found at: /usr/local/TeamCityAgent/work/d46fc9c3d71112c2/libs/licenses
@@ -103,7 +103,7 @@
 [14:14:35,652][INFO ][test-runner][GridLicenseControllerImpl] Licensed to 'GridGain Systems, Internal Development Only' on Feb 3, 2011
 [14:14:35,652][INFO ][test-runner][GridLicenseControllerImpl] License [ID=7D5CB773-225C-4165-8162-3BB67337894B, type=ENT]
 [14:14:35,652][INFO ][test-runner][GridLicenseControllerImpl] License limits [expire-date: never]
-[14:14:35,667][INFO ][test-runner][GridListenActorSelfTest1]
+[14:14:35,667][INFO ][test-runner][GridListenActorSelfTest1] 
 
 >>> +--------------------------+
 >>> GridGain ver. x.x.x-DDMMYYYY
@@ -116,7 +116,7 @@
 >>> Grid name: kernal.GridListenActorSelfTest1
 >>> Local node [ID=1F7E8040-8A17-4E14-A513-1709BEBE265B, order=1353320073559]
 >>> Local node addresses: [192.168.2.14]
->>> Local ports: TCP:45011 UDP:50001 TCP:55011
+>>> Local ports: TCP:45011 UDP:50001 TCP:55011 
 >>> GridGain documentation: http://www.gridgain.com/product.html
 
 [14:14:36,672][INFO ][test-runner][GridListenActorSelfTest] >>> Stopping grid [name=kernal.GridListenActorSelfTest1, id=1f7e8040-8a17-4e14-a513-1709bebe265b]
@@ -125,7 +125,7 @@
 [14:14:36,679][INFO ][disco-event-worker-#15%kernal.GridListenActorSelfTest%][GridDiscoveryManager] Node left topology: GridMulticastDiscoveryNode [id=1f7e8040-8a17-4e14-a513-1709bebe265b, state=LEFT, lastHeartbeat=1353320076673, addrs=[192.168.2.14], addr=/192.168.2.14, tcpPort=55011, startTime=1353320073559]
 [14:14:36,680][INFO ][disco-event-worker-#15%kernal.GridListenActorSelfTest%][GridDiscoveryManager] Topology snapshot [nodes=1, CPUs=4, hash=0x8C20EE0]
 [14:14:36,693][INFO ][test-runner][GridDeploymentLocalStore] Removed undeployed class: GridDeployment [ts=1353320075676, depMode=SHARED, clsLdr=sun.misc.Launcher$AppClassLoader@3326b249, clsLdrId=e4269281b31-1f7e8040-8a17-4e14-a513-1709bebe265b, userVer=0, loc=true, sampleCls=class java.lang.String, sampleClsName=java.lang.String, undeployed=true, pendingUndeploy=false, usage=0]
-[14:14:36,701][INFO ][test-runner][GridListenActorSelfTest1]
+[14:14:36,701][INFO ][test-runner][GridListenActorSelfTest1] 
 
 >>> +-------------------------------------+
 >>> GridGain ver. x.x.x-DDMMYYYY stopped OK
@@ -141,7 +141,7 @@
 [14:14:37,780][INFO ][main][GridJettyRestProtocol] Command protocol successfully stopped: Jetty REST
 [14:14:37,781][INFO ][main][GridTcpRestProtocol] Command protocol successfully stopped: TCP binary
 [14:14:37,794][INFO ][main][GridDeploymentLocalStore] Removed undeployed class: GridDeployment [ts=1353320064744, depMode=SHARED, clsLdr=sun.misc.Launcher$AppClassLoader@3326b249, clsLdrId=a2269281b31-353d63b5-a2f0-41d1-a30e-37016f357233, userVer=0, loc=true, sampleCls=class org.gridgain.grid.kernal.GridListenActorSelfTest$1, sampleClsName=org.gridgain.grid.kernal.GridListenActorSelfTest$1, undeployed=true, pendingUndeploy=false, usage=0]
-[14:14:37,799][INFO ][main][GridListenActorSelfTest]
+[14:14:37,799][INFO ][main][GridListenActorSelfTest] 
 
 >>> +-------------------------------------+
 >>> GridGain ver. x.x.x-DDMMYYYY stopped OK
@@ -150,13 +150,13 @@
 >>> Grid uptime: 00:00:13:57
 
 
-[14:14:37,814][INFO ][main][GridSessionCancelSiblingsFromFutureSelfTest]
+[14:14:37,814][INFO ][main][GridSessionCancelSiblingsFromFutureSelfTest] 
 
->>>   _____     _     _______      _
->>>  / ___/____(_)___/ / ___/___ _(_)___
->>> / (_ // __/ // _  / (_ // _ `/ // _ \
+>>>   _____     _     _______      _         
+>>>  / ___/____(_)___/ / ___/___ _(_)___     
+>>> / (_ // __/ // _  / (_ // _ `/ // _ \   
 >>> \___//_/ /_/ \_,_/\___/ \_,_/_//_//_/
->>>
+>>> 
 >>>  ---==++ IN-MEMORY BIG DATA ++==---
 >>>        ver. x.x.x-DDMMYYYY
 >>> Copyright (C) 2012 GridGain Systems
@@ -167,8 +167,8 @@
 [14:14:37,814][INFO ][main][GridSessionCancelSiblingsFromFutureSelfTest] Language runtime: Java Platform API Specification ver. 1.6
 [14:14:37,814][INFO ][main][GridSessionCancelSiblingsFromFutureSelfTest] JVM name: Java HotSpot(TM) 64-Bit Server VM
 [14:14:37,814][INFO ][main][GridSessionCancelSiblingsFromFutureSelfTest] Remote Management [restart: off, REST: on, JMX (remote: off)]
-[14:14:37,814][INFO ][main][GridSessionCancelSiblingsFromFutureSelfTest] IGNITE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2
-[14:14:37,814][INFO ][main][GridSessionCancelSiblingsFromFutureSelfTest] VM arguments: [-ea, -XX:MaxPermSize=128m, -Xms512m, -Xmx1024m, -Duser.name=bamboo, -DIGNITE_UPDATE_NOTIFIER=false, -DGRIDGAIN_DISABLED=true, -DIGNITE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_STABLE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_ROUTER_PREFER_REMOTE=true, -DIGNITE_NO_DISCO_ORDER=true, -DIGNITE_QUIET=false, -DGG_TEST_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.id=34324, -Dteamcity.buildType.id=bt5, -Dagent.ownPort=9090, -Dteamcity.build.checkoutDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.workingDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dagent.work.dir=/usr/local/TeamCityAgent/work, -Dagent.name=teamcity-4, -Dagent.home.dir=/usr/local/TeamCityAgent, -Dteamcity.runtime.props.file=/usr/local/TeamCityAgent/temp/agentTmp/ant2684847485530994862runtime]
+[14:14:37,814][INFO ][main][GridSessionCancelSiblingsFromFutureSelfTest] GRIDGAIN_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2
+[14:14:37,814][INFO ][main][GridSessionCancelSiblingsFromFutureSelfTest] VM arguments: [-ea, -XX:MaxPermSize=128m, -Xms512m, -Xmx1024m, -Duser.name=bamboo, -DGRIDGAIN_UPDATE_NOTIFIER=false, -DGRIDGAIN_DISABLED=true, -DGRIDGAIN_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_STABLE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_ROUTER_PREFER_REMOTE=true, -DGRIDGAIN_NO_DISCO_ORDER=true, -DGRIDGAIN_QUIET=false, -DGG_TEST_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.id=34324, -Dteamcity.buildType.id=bt5, -Dagent.ownPort=9090, -Dteamcity.build.checkoutDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.workingDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dagent.work.dir=/usr/local/TeamCityAgent/work, -Dagent.name=teamcity-4, -Dagent.home.dir=/usr/local/TeamCityAgent, -Dteamcity.runtime.props.file=/usr/local/TeamCityAgent/temp/agentTmp/ant2684847485530994862runtime]
 [14:14:37,814][WARN ][main][GridSessionCancelSiblingsFromFutureSelfTest] SMTP is not configured - email notifications are off.
 [14:14:37,815][WARN ][main][GridSessionCancelSiblingsFromFutureSelfTest] Cache is not configured - data grid is off.
 [14:14:37,815][INFO ][main][GridSessionCancelSiblingsFromFutureSelfTest] 3-rd party licenses can be found at: /usr/local/TeamCityAgent/work/d46fc9c3d71112c2/libs/licenses
@@ -188,7 +188,7 @@
 [14:14:39,448][INFO ][main][GridLicenseControllerImpl] Licensed to 'GridGain Systems, Internal Development Only' on Feb 3, 2011
 [14:14:39,448][INFO ][main][GridLicenseControllerImpl] License [ID=7D5CB773-225C-4165-8162-3BB67337894B, type=ENT]
 [14:14:39,448][INFO ][main][GridLicenseControllerImpl] License limits [expire-date: never]
-[14:14:39,468][INFO ][main][GridSessionCancelSiblingsFromFutureSelfTest]
+[14:14:39,468][INFO ][main][GridSessionCancelSiblingsFromFutureSelfTest] 
 
 >>> +--------------------------+
 >>> GridGain ver. x.x.x-DDMMYYYY
@@ -201,7 +201,7 @@
 >>> Grid name: session.GridSessionCancelSiblingsFromFutureSelfTest
 >>> Local node [ID=741AF89C-78C4-453D-83D5-86B9A66DCA08, order=1353320078398]
 >>> Local node addresses: [192.168.2.14]
->>> Local ports: TCP:8080 TCP:11211 TCP:45020 UDP:50002 TCP:55020
+>>> Local ports: TCP:8080 TCP:11211 TCP:45020 UDP:50002 TCP:55020 
 >>> GridGain documentation: http://www.gridgain.com/product.html
 
 [14:14:39,468][INFO ][main][GridSessionCancelSiblingsFromFutureSelfTest] >>> Starting test: testCancelSiblings <<<
@@ -381,7 +381,7 @@
 [14:14:40,676][INFO ][main][GridJettyRestProtocol] Command protocol successfully stopped: Jetty REST
 [14:14:40,677][INFO ][main][GridTcpRestProtocol] Command protocol successfully stopped: TCP binary
 [14:14:40,687][INFO ][main][GridDeploymentLocalStore] Removed undeployed class: GridDeployment [ts=1353320079467, depMode=SHARED, clsLdr=sun.misc.Launcher$AppClassLoader@3326b249, clsLdrId=95269281b31-741af89c-78c4-453d-83d5-86b9a66dca08, userVer=0, loc=true, sampleCls=class org.gridgain.grid.session.GridSessionCancelSiblingsFromFutureSelfTest$GridTaskSessionTestTask, sampleClsName=org.gridgain.grid.session.GridSessionCancelSiblingsFromFutureSelfTest$GridTaskSessionTestTask, undeployed=true, pendingUndeploy=false, usage=0]
-[14:14:40,691][INFO ][main][GridSessionCancelSiblingsFromFutureSelfTest]
+[14:14:40,691][INFO ][main][GridSessionCancelSiblingsFromFutureSelfTest] 
 
 >>> +-------------------------------------+
 >>> GridGain ver. x.x.x-DDMMYYYY stopped OK
@@ -390,13 +390,13 @@
 >>> Grid uptime: 00:00:01:228
 
 
-[14:14:40,706][INFO ][main][GridSessionCancelSiblingsFromJobSelfTest]
+[14:14:40,706][INFO ][main][GridSessionCancelSiblingsFromJobSelfTest] 
 
->>>   _____     _     _______      _
->>>  / ___/____(_)___/ / ___/___ _(_)___
->>> / (_ // __/ // _  / (_ // _ `/ // _ \
+>>>   _____     _     _______      _         
+>>>  / ___/____(_)___/ / ___/___ _(_)___     
+>>> / (_ // __/ // _  / (_ // _ `/ // _ \   
 >>> \___//_/ /_/ \_,_/\___/ \_,_/_//_//_/
->>>
+>>> 
 >>>  ---==++ IN-MEMORY BIG DATA ++==---
 >>>        ver. x.x.x-DDMMYYYY
 >>> Copyright (C) 2012 GridGain Systems
@@ -407,8 +407,8 @@
 [14:14:40,707][INFO ][main][GridSessionCancelSiblingsFromJobSelfTest] Language runtime: Java Platform API Specification ver. 1.6
 [14:14:40,707][INFO ][main][GridSessionCancelSiblingsFromJobSelfTest] JVM name: Java HotSpot(TM) 64-Bit Server VM
 [14:14:40,707][INFO ][main][GridSessionCancelSiblingsFromJobSelfTest] Remote Management [restart: off, REST: on, JMX (remote: off)]
-[14:14:40,707][INFO ][main][GridSessionCancelSiblingsFromJobSelfTest] IGNITE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2
-[14:14:40,707][INFO ][main][GridSessionCancelSiblingsFromJobSelfTest] VM arguments: [-ea, -XX:MaxPermSize=128m, -Xms512m, -Xmx1024m, -Duser.name=bamboo, -DIGNITE_UPDATE_NOTIFIER=false, -DGRIDGAIN_DISABLED=true, -DIGNITE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_STABLE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_ROUTER_PREFER_REMOTE=true, -DIGNITE_NO_DISCO_ORDER=true, -DIGNITE_QUIET=false, -DGG_TEST_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.id=34324, -Dteamcity.buildType.id=bt5, -Dagent.ownPort=9090, -Dteamcity.build.checkoutDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.workingDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dagent.work.dir=/usr/local/TeamCityAgent/work, -Dagent.name=teamcity-4, -Dagent.home.dir=/usr/local/TeamCityAgent, -Dteamcity.runtime.props.file=/usr/local/TeamCityAgent/temp/agentTmp/ant2684847485530994862runtime]
+[14:14:40,707][INFO ][main][GridSessionCancelSiblingsFromJobSelfTest] GRIDGAIN_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2
+[14:14:40,707][INFO ][main][GridSessionCancelSiblingsFromJobSelfTest] VM arguments: [-ea, -XX:MaxPermSize=128m, -Xms512m, -Xmx1024m, -Duser.name=bamboo, -DGRIDGAIN_UPDATE_NOTIFIER=false, -DGRIDGAIN_DISABLED=true, -DGRIDGAIN_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_STABLE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_ROUTER_PREFER_REMOTE=true, -DGRIDGAIN_NO_DISCO_ORDER=true, -DGRIDGAIN_QUIET=false, -DGG_TEST_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.id=34324, -Dteamcity.buildType.id=bt5, -Dagent.ownPort=9090, -Dteamcity.build.checkoutDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.workingDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dagent.work.dir=/usr/local/TeamCityAgent/work, -Dagent.name=teamcity-4, -Dagent.home.dir=/usr/local/TeamCityAgent, -Dteamcity.runtime.props.file=/usr/local/TeamCityAgent/temp/agentTmp/ant2684847485530994862runtime]
 [14:14:40,707][WARN ][main][GridSessionCancelSiblingsFromJobSelfTest] SMTP is not configured - email notifications are off.
 [14:14:40,707][WARN ][main][GridSessionCancelSiblingsFromJobSelfTest] Cache is not configured - data grid is off.
 [14:14:40,708][INFO ][main][GridSessionCancelSiblingsFromJobSelfTest] 3-rd party licenses can be found at: /usr/local/TeamCityAgent/work/d46fc9c3d71112c2/libs/licenses
@@ -428,7 +428,7 @@
 [14:14:42,296][INFO ][main][GridLicenseControllerImpl] Licensed to 'GridGain Systems, Internal Development Only' on Feb 3, 2011
 [14:14:42,296][INFO ][main][GridLicenseControllerImpl] License [ID=7D5CB773-225C-4165-8162-3BB67337894B, type=ENT]
 [14:14:42,296][INFO ][main][GridLicenseControllerImpl] License limits [expire-date: never]
-[14:14:42,301][INFO ][main][GridSessionCancelSiblingsFromJobSelfTest]
+[14:14:42,301][INFO ][main][GridSessionCancelSiblingsFromJobSelfTest] 
 
 >>> +--------------------------+
 >>> GridGain ver. x.x.x-DDMMYYYY
@@ -441,7 +441,7 @@
 >>> Grid name: session.GridSessionCancelSiblingsFromJobSelfTest
 >>> Local node [ID=8993B4E0-A3E8-4C20-A054-CF7C39915903, order=1353320081250]
 >>> Local node addresses: [192.168.2.14]
->>> Local ports: TCP:8080 TCP:11211 TCP:45030 UDP:50003 TCP:55030
+>>> Local ports: TCP:8080 TCP:11211 TCP:45030 UDP:50003 TCP:55030 
 >>> GridGain documentation: http://www.gridgain.com/product.html
 
 [14:14:42,301][INFO ][main][GridSessionCancelSiblingsFromJobSelfTest] >>> Starting test: testCancelSiblings <<<
@@ -581,7 +581,7 @@
 [14:14:43,460][INFO ][main][GridJettyRestProtocol] Command protocol successfully stopped: Jetty REST
 [14:14:43,461][INFO ][main][GridTcpRestProtocol] Command protocol successfully stopped: TCP binary
 [14:14:43,469][INFO ][main][GridDeploymentLocalStore] Removed undeployed class: GridDeployment [ts=1353320082296, depMode=SHARED, clsLdr=sun.misc.Launcher$AppClassLoader@3326b249, clsLdrId=71469281b31-8993b4e0-a3e8-4c20-a054-cf7c39915903, userVer=0, loc=true, sampleCls=class org.gridgain.grid.session.GridSessionCancelSiblingsFromJobSelfTest$GridTaskSessionTestTask, sampleClsName=org.gridgain.grid.session.GridSessionCancelSiblingsFromJobSelfTest$GridTaskSessionTestTask, undeployed=true, pendingUndeploy=false, usage=0]
-[14:14:43,473][INFO ][main][GridSessionCancelSiblingsFromJobSelfTest]
+[14:14:43,473][INFO ][main][GridSessionCancelSiblingsFromJobSelfTest] 
 
 >>> +-------------------------------------+
 >>> GridGain ver. x.x.x-DDMMYYYY stopped OK
@@ -590,13 +590,13 @@
 >>> Grid uptime: 00:00:01:170
 
 
-[14:14:43,487][INFO ][main][GridSessionCancelSiblingsFromTaskSelfTest]
+[14:14:43,487][INFO ][main][GridSessionCancelSiblingsFromTaskSelfTest] 
 
->>>   _____     _     _______      _
->>>  / ___/____(_)___/ / ___/___ _(_)___
->>> / (_ // __/ // _  / (_ // _ `/ // _ \
+>>>   _____     _     _______      _         
+>>>  / ___/____(_)___/ / ___/___ _(_)___     
+>>> / (_ // __/ // _  / (_ // _ `/ // _ \   
 >>> \___//_/ /_/ \_,_/\___/ \_,_/_//_//_/
->>>
+>>> 
 >>>  ---==++ IN-MEMORY BIG DATA ++==---
 >>>        ver. x.x.x-DDMMYYYY
 >>> Copyright (C) 2012 GridGain Systems
@@ -607,8 +607,8 @@
 [14:14:43,487][INFO ][main][GridSessionCancelSiblingsFromTaskSelfTest] Language runtime: Java Platform API Specification ver. 1.6
 [14:14:43,488][INFO ][main][GridSessionCancelSiblingsFromTaskSelfTest] JVM name: Java HotSpot(TM) 64-Bit Server VM
 [14:14:43,488][INFO ][main][GridSessionCancelSiblingsFromTaskSelfTest] Remote Management [restart: off, REST: on, JMX (remote: off)]
-[14:14:43,488][INFO ][main][GridSessionCancelSiblingsFromTaskSelfTest] IGNITE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2
-[14:14:43,488][INFO ][main][GridSessionCancelSiblingsFromTaskSelfTest] VM arguments: [-ea, -XX:MaxPermSize=128m, -Xms512m, -Xmx1024m, -Duser.name=bamboo, -DIGNITE_UPDATE_NOTIFIER=false, -DGRIDGAIN_DISABLED=true, -DIGNITE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_STABLE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_ROUTER_PREFER_REMOTE=true, -DIGNITE_NO_DISCO_ORDER=true, -DIGNITE_QUIET=false, -DGG_TEST_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.id=34324, -Dteamcity.buildType.id=bt5, -Dagent.ownPort=9090, -Dteamcity.build.checkoutDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.workingDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dagent.work.dir=/usr/local/TeamCityAgent/work, -Dagent.name=teamcity-4, -Dagent.home.dir=/usr/local/TeamCityAgent, -Dteamcity.runtime.props.file=/usr/local/TeamCityAgent/temp/agentTmp/ant2684847485530994862runtime]
+[14:14:43,488][INFO ][main][GridSessionCancelSiblingsFromTaskSelfTest] GRIDGAIN_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2
+[14:14:43,488][INFO ][main][GridSessionCancelSiblingsFromTaskSelfTest] VM arguments: [-ea, -XX:MaxPermSize=128m, -Xms512m, -Xmx1024m, -Duser.name=bamboo, -DGRIDGAIN_UPDATE_NOTIFIER=false, -DGRIDGAIN_DISABLED=true, -DGRIDGAIN_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_STABLE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_ROUTER_PREFER_REMOTE=true, -DGRIDGAIN_NO_DISCO_ORDER=true, -DGRIDGAIN_QUIET=false, -DGG_TEST_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.id=34324, -Dteamcity.buildType.id=bt5, -Dagent.ownPort=9090, -Dteamcity.build.checkoutDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.workingDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dagent.work.dir=/usr/local/TeamCityAgent/work, -Dagent.name=teamcity-4, -Dagent.home.dir=/usr/local/TeamCityAgent, -Dteamcity.runtime.props.file=/usr/local/TeamCityAgent/temp/agentTmp/ant2684847485530994862runtime]
 [14:14:43,488][WARN ][main][GridSessionCancelSiblingsFromTaskSelfTest] SMTP is not configured - email notifications are off.
 [14:14:43,488][WARN ][main][GridSessionCancelSiblingsFromTaskSelfTest] Cache is not configured - data grid is off.
 [14:14:43,488][INFO ][main][GridSessionCancelSiblingsFromTaskSelfTest] 3-rd party licenses can be found at: /usr/local/TeamCityAgent/work/d46fc9c3d71112c2/libs/licenses
@@ -628,7 +628,7 @@
 [14:14:45,082][INFO ][main][GridLicenseControllerImpl] Licensed to 'GridGain Systems, Internal Development Only' on Feb 3, 2011
 [14:14:45,082][INFO ][main][GridLicenseControllerImpl] License [ID=7D5CB773-225C-4165-8162-3BB67337894B, type=ENT]
 [14:14:45,082][INFO ][main][GridLicenseControllerImpl] License limits [expire-date: never]
-[14:14:45,087][INFO ][main][GridSessionCancelSiblingsFromTaskSelfTest]
+[14:14:45,087][INFO ][main][GridSessionCancelSiblingsFromTaskSelfTest] 
 
 >>> +--------------------------+
 >>> GridGain ver. x.x.x-DDMMYYYY
@@ -641,7 +641,7 @@
 >>> Grid name: session.GridSessionCancelSiblingsFromTaskSelfTest
 >>> Local node [ID=D7B39FFC-59FF-4354-B89A-F9F90A8D786C, order=1353320084041]
 >>> Local node addresses: [192.168.2.14]
->>> Local ports: TCP:8080 TCP:11211 TCP:45040 UDP:50004 TCP:55040
+>>> Local ports: TCP:8080 TCP:11211 TCP:45040 UDP:50004 TCP:55040 
 >>> GridGain documentation: http://www.gridgain.com/product.html
 
 [14:14:45,087][INFO ][main][GridSessionCancelSiblingsFromTaskSelfTest] >>> Starting test: testCancelSiblings <<<
@@ -781,7 +781,7 @@
 [14:14:46,233][INFO ][main][GridJettyRestProtocol] Command protocol successfully stopped: Jetty REST
 [14:14:46,233][INFO ][main][GridTcpRestProtocol] Command protocol successfully stopped: TCP binary
 [14:14:46,240][INFO ][main][GridDeploymentLocalStore] Removed undeployed class: GridDeployment [ts=1353320085087, depMode=SHARED, clsLdr=sun.misc.Launcher$AppClassLoader@3326b249, clsLdrId=bc569281b31-d7b39ffc-59ff-4354-b89a-f9f90a8d786c, userVer=0, loc=true, sampleCls=class org.gridgain.grid.session.GridSessionCancelSiblingsFromTaskSelfTest$GridTaskSessionTestTask, sampleClsName=org.gridgain.grid.session.GridSessionCancelSiblingsFromTaskSelfTest$GridTaskSessionTestTask, undeployed=true, pendingUndeploy=false, usage=0]
-[14:14:46,243][INFO ][main][GridSessionCancelSiblingsFromTaskSelfTest]
+[14:14:46,243][INFO ][main][GridSessionCancelSiblingsFromTaskSelfTest] 
 
 >>> +-------------------------------------+
 >>> GridGain ver. x.x.x-DDMMYYYY stopped OK
@@ -790,13 +790,13 @@
 >>> Grid uptime: 00:00:01:159
 
 
-[14:14:46,257][INFO ][main][GridSessionSetFutureAttributeSelfTest]
+[14:14:46,257][INFO ][main][GridSessionSetFutureAttributeSelfTest] 
 
->>>   _____     _     _______      _
->>>  / ___/____(_)___/ / ___/___ _(_)___
->>> / (_ // __/ // _  / (_ // _ `/ // _ \
+>>>   _____     _     _______      _         
+>>>  / ___/____(_)___/ / ___/___ _(_)___     
+>>> / (_ // __/ // _  / (_ // _ `/ // _ \   
 >>> \___//_/ /_/ \_,_/\___/ \_,_/_//_//_/
->>>
+>>> 
 >>>  ---==++ IN-MEMORY BIG DATA ++==---
 >>>        ver. x.x.x-DDMMYYYY
 >>> Copyright (C) 2012 GridGain Systems
@@ -807,8 +807,8 @@
 [14:14:46,258][INFO ][main][GridSessionSetFutureAttributeSelfTest] Language runtime: Java Platform API Specification ver. 1.6
 [14:14:46,258][INFO ][main][GridSessionSetFutureAttributeSelfTest] JVM name: Java HotSpot(TM) 64-Bit Server VM
 [14:14:46,258][INFO ][main][GridSessionSetFutureAttributeSelfTest] Remote Management [restart: off, REST: on, JMX (remote: off)]
-[14:14:46,258][INFO ][main][GridSessionSetFutureAttributeSelfTest] IGNITE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2
-[14:14:46,258][INFO ][main][GridSessionSetFutureAttributeSelfTest] VM arguments: [-ea, -XX:MaxPermSize=128m, -Xms512m, -Xmx1024m, -Duser.name=bamboo, -DIGNITE_UPDATE_NOTIFIER=false, -DGRIDGAIN_DISABLED=true, -DIGNITE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_STABLE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_ROUTER_PREFER_REMOTE=true, -DIGNITE_NO_DISCO_ORDER=true, -DIGNITE_QUIET=false, -DGG_TEST_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.id=34324, -Dteamcity.buildType.id=bt5, -Dagent.ownPort=9090, -Dteamcity.build.checkoutDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.workingDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dagent.work.dir=/usr/local/TeamCityAgent/work, -Dagent.name=teamcity-4, -Dagent.home.dir=/usr/local/TeamCityAgent, -Dteamcity.runtime.props.file=/usr/local/TeamCityAgent/temp/agentTmp/ant2684847485530994862runtime]
+[14:14:46,258][INFO ][main][GridSessionSetFutureAttributeSelfTest] GRIDGAIN_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2
+[14:14:46,258][INFO ][main][GridSessionSetFutureAttributeSelfTest] VM arguments: [-ea, -XX:MaxPermSize=128m, -Xms512m, -Xmx1024m, -Duser.name=bamboo, -DGRIDGAIN_UPDATE_NOTIFIER=false, -DGRIDGAIN_DISABLED=true, -DGRIDGAIN_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_STABLE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_ROUTER_PREFER_REMOTE=true, -DGRIDGAIN_NO_DISCO_ORDER=true, -DGRIDGAIN_QUIET=false, -DGG_TEST_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.id=34324, -Dteamcity.buildType.id=bt5, -Dagent.ownPort=9090, -Dteamcity.build.checkoutDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.workingDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dagent.work.dir=/usr/local/TeamCityAgent/work, -Dagent.name=teamcity-4, -Dagent.home.dir=/usr/local/TeamCityAgent, -Dteamcity.runtime.props.file=/usr/local/TeamCityAgent/temp/agentTmp/ant2684847485530994862runtime]
 [14:14:46,259][WARN ][main][GridSessionSetFutureAttributeSelfTest] SMTP is not configured - email notifications are off.
 [14:14:46,259][WARN ][main][GridSessionSetFutureAttributeSelfTest] Cache is not configured - data grid is off.
 [14:14:46,260][INFO ][main][GridSessionSetFutureAttributeSelfTest] 3-rd party licenses can be found at: /usr/local/TeamCityAgent/work/d46fc9c3d71112c2/libs/licenses
@@ -828,7 +828,7 @@
 [14:14:47,838][INFO ][main][GridLicenseControllerImpl] Licensed to 'GridGain Systems, Internal Development Only' on Feb 3, 2011
 [14:14:47,838][INFO ][main][GridLicenseControllerImpl] License [ID=7D5CB773-225C-4165-8162-3BB67337894B, type=ENT]
 [14:14:47,838][INFO ][main][GridLicenseControllerImpl] License limits [expire-date: never]
-[14:14:47,847][INFO ][main][GridSessionSetFutureAttributeSelfTest]
+[14:14:47,847][INFO ][main][GridSessionSetFutureAttributeSelfTest] 
 
 >>> +--------------------------+
 >>> GridGain ver. x.x.x-DDMMYYYY
@@ -841,7 +841,7 @@
 >>> Grid name: session.GridSessionSetFutureAttributeSelfTest
 >>> Local node [ID=19A0735F-3E28-48E1-AA00-737D4BBE7953, order=1353320086800]
 >>> Local node addresses: [192.168.2.14]
->>> Local ports: TCP:8080 TCP:11211 TCP:45050 UDP:50005 TCP:55050
+>>> Local ports: TCP:8080 TCP:11211 TCP:45050 UDP:50005 TCP:55050 
 >>> GridGain documentation: http://www.gridgain.com/product.html
 
 [14:14:47,847][INFO ][main][GridSessionSetFutureAttributeSelfTest] >>> Starting test: testMultiThreaded <<<
@@ -931,7 +931,7 @@
 [14:14:49,005][INFO ][main][GridJettyRestProtocol] Command protocol successfully stopped: Jetty REST
 [14:14:49,006][INFO ][main][GridTcpRestProtocol] Command protocol successfully stopped: TCP binary
 [14:14:49,013][INFO ][main][GridDeploymentLocalStore] Removed undeployed class: GridDeployment [ts=1353320087847, depMode=SHARED, clsLdr=sun.misc.Launcher$AppClassLoader@3326b249, clsLdrId=f7769281b31-19a0735f-3e28-48e1-aa00-737d4bbe7953, userVer=0, loc=true, sampleCls=class org.gridgain.grid.session.GridSessionSetFutureAttributeSelfTest$GridTaskSessionTestTask, sampleClsName=org.gridgain.grid.session.GridSessionSetFutureAttributeSelfTest$GridTaskSessionTestTask, undeployed=true, pendingUndeploy=false, usage=0]
-[14:14:49,018][INFO ][main][GridSessionSetFutureAttributeSelfTest]
+[14:14:49,018][INFO ][main][GridSessionSetFutureAttributeSelfTest] 
 
 >>> +-------------------------------------+
 >>> GridGain ver. x.x.x-DDMMYYYY stopped OK
@@ -940,13 +940,13 @@
 >>> Grid uptime: 00:00:01:177
 
 
-[14:14:49,033][INFO ][main][GridSessionSetFutureAttributeWaitListenerSelfTest]
+[14:14:49,033][INFO ][main][GridSessionSetFutureAttributeWaitListenerSelfTest] 
 
->>>   _____     _     _______      _
->>>  / ___/____(_)___/ / ___/___ _(_)___
->>> / (_ // __/ // _  / (_ // _ `/ // _ \
+>>>   _____     _     _______      _         
+>>>  / ___/____(_)___/ / ___/___ _(_)___     
+>>> / (_ // __/ // _  / (_ // _ `/ // _ \   
 >>> \___//_/ /_/ \_,_/\___/ \_,_/_//_//_/
->>>
+>>> 
 >>>  ---==++ IN-MEMORY BIG DATA ++==---
 >>>        ver. x.x.x-DDMMYYYY
 >>> Copyright (C) 2012 GridGain Systems
@@ -957,8 +957,8 @@
 [14:14:49,034][INFO ][main][GridSessionSetFutureAttributeWaitListenerSelfTest] Language runtime: Java Platform API Specification ver. 1.6
 [14:14:49,034][INFO ][main][GridSessionSetFutureAttributeWaitListenerSelfTest] JVM name: Java HotSpot(TM) 64-Bit Server VM
 [14:14:49,035][INFO ][main][GridSessionSetFutureAttributeWaitListenerSelfTest] Remote Management [restart: off, REST: on, JMX (remote: off)]
-[14:14:49,035][INFO ][main][GridSessionSetFutureAttributeWaitListenerSelfTest] IGNITE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2
-[14:14:49,035][INFO ][main][GridSessionSetFutureAttributeWaitListenerSelfTest] VM arguments: [-ea, -XX:MaxPermSize=128m, -Xms512m, -Xmx1024m, -Duser.name=bamboo, -DIGNITE_UPDATE_NOTIFIER=false, -DGRIDGAIN_DISABLED=true, -DIGNITE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_STABLE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_ROUTER_PREFER_REMOTE=true, -DIGNITE_NO_DISCO_ORDER=true, -DIGNITE_QUIET=false, -DGG_TEST_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.id=34324, -Dteamcity.buildType.id=bt5, -Dagent.ownPort=9090, -Dteamcity.build.checkoutDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.workingDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dagent.work.dir=/usr/local/TeamCityAgent/work, -Dagent.name=teamcity-4, -Dagent.home.dir=/usr/local/TeamCityAgent, -Dteamcity.runtime.props.file=/usr/local/TeamCityAgent/temp/agentTmp/ant2684847485530994862runtime]
+[14:14:49,035][INFO ][main][GridSessionSetFutureAttributeWaitListenerSelfTest] GRIDGAIN_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2
+[14:14:49,035][INFO ][main][GridSessionSetFutureAttributeWaitListenerSelfTest] VM arguments: [-ea, -XX:MaxPermSize=128m, -Xms512m, -Xmx1024m, -Duser.name=bamboo, -DGRIDGAIN_UPDATE_NOTIFIER=false, -DGRIDGAIN_DISABLED=true, -DGRIDGAIN_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_STABLE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_ROUTER_PREFER_REMOTE=true, -DGRIDGAIN_NO_DISCO_ORDER=true, -DGRIDGAIN_QUIET=false, -DGG_TEST_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.id=34324, -Dteamcity.buildType.id=bt5, -Dagent.ownPort=9090, -Dteamcity.build.checkoutDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.workingDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dagent.work.dir=/usr/local/TeamCityAgent/work, -Dagent.name=teamcity-4, -Dagent.home.dir=/usr/local/TeamCityAgent, -Dteamcity.runtime.props.file=/usr/local/TeamCityAgent/temp/agentTmp/ant2684847485530994862runtime]
 [14:14:49,035][WARN ][main][GridSessionSetFutureAttributeWaitListenerSelfTest] SMTP is not configured - email notifications are off.
 [14:14:49,035][WARN ][main][GridSessionSetFutureAttributeWaitListenerSelfTest] Cache is not configured - data grid is off.
 [14:14:49,036][INFO ][main][GridSessionSetFutureAttributeWaitListenerSelfTest] 3-rd party licenses can be found at: /usr/local/TeamCityAgent/work/d46fc9c3d71112c2/libs/licenses
@@ -978,7 +978,7 @@
 [14:14:50,611][INFO ][main][GridLicenseControllerImpl] Licensed to 'GridGain Systems, Internal Development Only' on Feb 3, 2011
 [14:14:50,611][INFO ][main][GridLicenseControllerImpl] License [ID=7D5CB773-225C-4165-8162-3BB67337894B, type=ENT]
 [14:14:50,611][INFO ][main][GridLicenseControllerImpl] License limits [expire-date: never]
-[14:14:50,619][INFO ][main][GridSessionSetFutureAttributeWaitListenerSelfTest]
+[14:14:50,619][INFO ][main][GridSessionSetFutureAttributeWaitListenerSelfTest] 
 
 >>> +--------------------------+
 >>> GridGain ver. x.x.x-DDMMYYYY
@@ -991,7 +991,7 @@
 >>> Grid name: session.GridSessionSetFutureAttributeWaitListenerSelfTest
 >>> Local node [ID=F07B5F6E-FB13-4C51-B228-BE1F37F7ECDB, order=1353320089568]
 >>> Local node addresses: [192.168.2.14]
->>> Local ports: TCP:8080 TCP:11211 TCP:45060 UDP:50006 TCP:55060
+>>> Local ports: TCP:8080 TCP:11211 TCP:45060 UDP:50006 TCP:55060 
 >>> GridGain documentation: http://www.gridgain.com/product.html
 
 [14:14:50,620][INFO ][main][GridSessionSetFutureAttributeWaitListenerSelfTest] >>> Starting test: testSetAttribute <<<
@@ -1008,7 +1008,7 @@
 [14:14:51,692][INFO ][main][GridJettyRestProtocol] Command protocol successfully stopped: Jetty REST
 [14:14:51,692][INFO ][main][GridTcpRestProtocol] Command protocol successfully stopped: TCP binary
 [14:14:51,699][INFO ][main][GridDeploymentLocalStore] Removed undeployed class: GridDeployment [ts=1353320090615, depMode=SHARED, clsLdr=sun.misc.Launcher$AppClassLoader@3326b249, clsLdrId=51969281b31-f07b5f6e-fb13-4c51-b228-be1f37f7ecdb, userVer=0, loc=true, sampleCls=class org.gridgain.grid.session.GridSessionSetFutureAttributeWaitListenerSelfTest$GridTaskSessionTestTask, sampleClsName=org.gridgain.grid.session.GridSessionSetFutureAttributeWaitListenerSelfTest$GridTaskSessionTestTask, undeployed=true, pendingUndeploy=false, usage=0]
-[14:14:51,702][INFO ][main][GridSessionSetFutureAttributeWaitListenerSelfTest]
+[14:14:51,702][INFO ][main][GridSessionSetFutureAttributeWaitListenerSelfTest] 
 
 >>> +-------------------------------------+
 >>> GridGain ver. x.x.x-DDMMYYYY stopped OK
@@ -1017,13 +1017,13 @@
 >>> Grid uptime: 00:00:01:79
 
 
-[14:14:51,713][INFO ][main][GridSessionSetJobAttributeWaitListenerSelfTest]
+[14:14:51,713][INFO ][main][GridSessionSetJobAttributeWaitListenerSelfTest] 
 
->>>   _____     _     _______      _
->>>  / ___/____(_)___/ / ___/___ _(_)___
->>> / (_ // __/ // _  / (_ // _ `/ // _ \
+>>>   _____     _     _______      _         
+>>>  / ___/____(_)___/ / ___/___ _(_)___     
+>>> / (_ // __/ // _  / (_ // _ `/ // _ \   
 >>> \___//_/ /_/ \_,_/\___/ \_,_/_//_//_/
->>>
+>>> 
 >>>  ---==++ IN-MEMORY BIG DATA ++==---
 >>>        ver. x.x.x-DDMMYYYY
 >>> Copyright (C) 2012 GridGain Systems
@@ -1034,8 +1034,8 @@
 [14:14:51,714][INFO ][main][GridSessionSetJobAttributeWaitListenerSelfTest] Language runtime: Java Platform API Specification ver. 1.6
 [14:14:51,714][INFO ][main][GridSessionSetJobAttributeWaitListenerSelfTest] JVM name: Java HotSpot(TM) 64-Bit Server VM
 [14:14:51,714][INFO ][main][GridSessionSetJobAttributeWaitListenerSelfTest] Remote Management [restart: off, REST: on, JMX (remote: off)]
-[14:14:51,714][INFO ][main][GridSessionSetJobAttributeWaitListenerSelfTest] IGNITE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2
-[14:14:51,714][INFO ][main][GridSessionSetJobAttributeWaitListenerSelfTest] VM arguments: [-ea, -XX:MaxPermSize=128m, -Xms512m, -Xmx1024m, -Duser.name=bamboo, -DIGNITE_UPDATE_NOTIFIER=false, -DGRIDGAIN_DISABLED=true, -DIGNITE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_STABLE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_ROUTER_PREFER_REMOTE=true, -DIGNITE_NO_DISCO_ORDER=true, -DIGNITE_QUIET=false, -DGG_TEST_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.id=34324, -Dteamcity.buildType.id=bt5, -Dagent.ownPort=9090, -Dteamcity.build.checkoutDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.workingDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dagent.work.dir=/usr/local/TeamCityAgent/work, -Dagent.name=teamcity-4, -Dagent.home.dir=/usr/local/TeamCityAgent, -Dteamcity.runtime.props.file=/usr/local/TeamCityAgent/temp/agentTmp/ant2684847485530994862runtime]
+[14:14:51,714][INFO ][main][GridSessionSetJobAttributeWaitListenerSelfTest] GRIDGAIN_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2
+[14:14:51,714][INFO ][main][GridSessionSetJobAttributeWaitListenerSelfTest] VM arguments: [-ea, -XX:MaxPermSize=128m, -Xms512m, -Xmx1024m, -Duser.name=bamboo, -DGRIDGAIN_UPDATE_NOTIFIER=false, -DGRIDGAIN_DISABLED=true, -DGRIDGAIN_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_STABLE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_ROUTER_PREFER_REMOTE=true, -DGRIDGAIN_NO_DISCO_ORDER=true, -DGRIDGAIN_QUIET=false, -DGG_TEST_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.id=34324, -Dteamcity.buildType.id=bt5, -Dagent.ownPort=9090, -Dteamcity.build.checkoutDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.workingDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dagent.work.dir=/usr/local/TeamCityAgent/work, -Dagent.name=teamcity-4, -Dagent.home.dir=/usr/local/TeamCityAgent, -Dteamcity.runtime.props.file=/usr/local/TeamCityAgent/temp/agentTmp/ant2684847485530994862runtime]
 [14:14:51,714][WARN ][main][GridSessionSetJobAttributeWaitListenerSelfTest] SMTP is not configured - email notifications are off.
 [14:14:51,714][WARN ][main][GridSessionSetJobAttributeWaitListenerSelfTest] Cache is not configured - data grid is off.
 [14:14:51,715][INFO ][main][GridSessionSetJobAttributeWaitListenerSelfTest] 3-rd party licenses can be found at: /usr/local/TeamCityAgent/work/d46fc9c3d71112c2/libs/licenses
@@ -1055,7 +1055,7 @@
 [14:14:53,295][INFO ][main][GridLicenseControllerImpl] Licensed to 'GridGain Systems, Internal Development Only' on Feb 3, 2011
 [14:14:53,295][INFO ][main][GridLicenseControllerImpl] License [ID=7D5CB773-225C-4165-8162-3BB67337894B, type=ENT]
 [14:14:53,295][INFO ][main][GridLicenseControllerImpl] License limits [expire-date: never]
-[14:14:53,300][INFO ][main][GridSessionSetJobAttributeWaitListenerSelfTest]
+[14:14:53,300][INFO ][main][GridSessionSetJobAttributeWaitListenerSelfTest] 
 
 >>> +--------------------------+
 >>> GridGain ver. x.x.x-DDMMYYYY
@@ -1068,7 +1068,7 @@
 >>> Grid name: session.GridSessionSetJobAttributeWaitListenerSelfTest
 >>> Local node [ID=A31FA636-CFFE-4737-8BE5-A303AA1C4507, order=1353320092248]
 >>> Local node addresses: [192.168.2.14]
->>> Local ports: TCP:8080 TCP:11211 TCP:45070 UDP:50007 TCP:55070
+>>> Local ports: TCP:8080 TCP:11211 TCP:45070 UDP:50007 TCP:55070 
 >>> GridGain documentation: http://www.gridgain.com/product.html
 
 [14:14:53,300][INFO ][main][GridSessionSetJobAttributeWaitListenerSelfTest] >>> Starting test: testSetAttribute <<<
@@ -1244,7 +1244,7 @@
 [14:16:34,407][INFO ][main][GridJettyRestProtocol] Command protocol successfully stopped: Jetty REST
 [14:16:34,408][INFO ][main][GridTcpRestProtocol] Command protocol successfully stopped: TCP binary
 [14:16:34,416][INFO ][main][GridDeploymentLocalStore] Removed undeployed class: GridDeployment [ts=1353320093295, depMode=SHARED, clsLdr=sun.misc.Launcher$AppClassLoader@3326b249, clsLdrId=34969281b31-a31fa636-cffe-4737-8be5-a303aa1c4507, userVer=0, loc=true, sampleCls=class org.gridgain.grid.session.GridSessionSetJobAttributeWaitListenerSelfTest$GridTaskSessionTestTask, sampleClsName=org.gridgain.grid.session.GridSessionSetJobAttributeWaitListenerSelfTest$GridTaskSessionTestTask, undeployed=true, pendingUndeploy=false, usage=0]
-[14:16:34,419][INFO ][main][GridSessionSetJobAttributeWaitListenerSelfTest]
+[14:16:34,419][INFO ][main][GridSessionSetJobAttributeWaitListenerSelfTest] 
 
 >>> +-------------------------------------+
 >>> GridGain ver. x.x.x-DDMMYYYY stopped OK
@@ -1253,13 +1253,13 @@
 >>> Grid uptime: 00:01:41:116
 
 
-[14:16:34,433][INFO ][main][GridSessionSetJobAttributeSelfTest]
+[14:16:34,433][INFO ][main][GridSessionSetJobAttributeSelfTest] 
 
->>>   _____     _     _______      _
->>>  / ___/____(_)___/ / ___/___ _(_)___
->>> / (_ // __/ // _  / (_ // _ `/ // _ \
+>>>   _____     _     _______      _         
+>>>  / ___/____(_)___/ / ___/___ _(_)___     
+>>> / (_ // __/ // _  / (_ // _ `/ // _ \   
 >>> \___//_/ /_/ \_,_/\___/ \_,_/_//_//_/
->>>
+>>> 
 >>>  ---==++ IN-MEMORY BIG DATA ++==---
 >>>        ver. x.x.x-DDMMYYYY
 >>> Copyright (C) 2012 GridGain Systems
@@ -1270,8 +1270,8 @@
 [14:16:34,434][INFO ][main][GridSessionSetJobAttributeSelfTest] Language runtime: Java Platform API Specification ver. 1.6
 [14:16:34,434][INFO ][main][GridSessionSetJobAttributeSelfTest] JVM name: Java HotSpot(TM) 64-Bit Server VM
 [14:16:34,434][INFO ][main][GridSessionSetJobAttributeSelfTest] Remote Management [restart: off, REST: on, JMX (remote: off)]
-[14:16:34,434][INFO ][main][GridSessionSetJobAttributeSelfTest] IGNITE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2
-[14:16:34,434][INFO ][main][GridSessionSetJobAttributeSelfTest] VM arguments: [-ea, -XX:MaxPermSize=128m, -Xms512m, -Xmx1024m, -Duser.name=bamboo, -DIGNITE_UPDATE_NOTIFIER=false, -DGRIDGAIN_DISABLED=true, -DIGNITE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_STABLE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_ROUTER_PREFER_REMOTE=true, -DIGNITE_NO_DISCO_ORDER=true, -DIGNITE_QUIET=false, -DGG_TEST_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.id=34324, -Dteamcity.buildType.id=bt5, -Dagent.ownPort=9090, -Dteamcity.build.checkoutDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.workingDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dagent.work.dir=/usr/local/TeamCityAgent/work, -Dagent.name=teamcity-4, -Dagent.home.dir=/usr/local/TeamCityAgent, -Dteamcity.runtime.props.file=/usr/local/TeamCityAgent/temp/agentTmp/ant2684847485530994862runtime]
+[14:16:34,434][INFO ][main][GridSessionSetJobAttributeSelfTest] GRIDGAIN_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2
+[14:16:34,434][INFO ][main][GridSessionSetJobAttributeSelfTest] VM arguments: [-ea, -XX:MaxPermSize=128m, -Xms512m, -Xmx1024m, -Duser.name=bamboo, -DGRIDGAIN_UPDATE_NOTIFIER=false, -DGRIDGAIN_DISABLED=true, -DGRIDGAIN_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_STABLE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_ROUTER_PREFER_REMOTE=true, -DGRIDGAIN_NO_DISCO_ORDER=true, -DGRIDGAIN_QUIET=false, -DGG_TEST_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.id=34324, -Dteamcity.buildType.id=bt5, -Dagent.ownPort=9090, -Dteamcity.build.checkoutDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.workingDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dagent.work.dir=/usr/local/TeamCityAgent/work, -Dagent.name=teamcity-4, -Dagent.home.dir=/usr/local/TeamCityAgent, -Dteamcity.runtime.props.file=/usr/local/TeamCityAgent/temp/agentTmp/ant2684847485530994862runtime]
 [14:16:34,434][WARN ][main][GridSessionSetJobAttributeSelfTest] SMTP is not configured - email notifications are off.
 [14:16:34,434][WARN ][main][GridSessionSetJobAttributeSelfTest] Cache is not configured - data grid is off.
 [14:16:34,438][INFO ][main][GridSessionSetJobAttributeSelfTest] 3-rd party licenses can be found at: /usr/local/TeamCityAgent/work/d46fc9c3d71112c2/libs/licenses
@@ -1291,7 +1291,7 @@
 [14:16:36,021][INFO ][main][GridLicenseControllerImpl] Licensed to 'GridGain Systems, Internal Development Only' on Feb 3, 2011
 [14:16:36,021][INFO ][main][GridLicenseControllerImpl] License [ID=7D5CB773-225C-4165-8162-3BB67337894B, type=ENT]
 [14:16:36,021][INFO ][main][GridLicenseControllerImpl] License limits [expire-date: never]
-[14:16:36,025][INFO ][main][GridSessionSetJobAttributeSelfTest]
+[14:16:36,025][INFO ][main][GridSessionSetJobAttributeSelfTest] 
 
 >>> +--------------------------+
 >>> GridGain ver. x.x.x-DDMMYYYY
@@ -1304,7 +1304,7 @@
 >>> Grid name: session.GridSessionSetJobAttributeSelfTest
 >>> Local node [ID=46924B92-D354-4A08-87EA-5C8D6271E515, order=1353320194964]
 >>> Local node addresses: [192.168.2.14]
->>> Local ports: TCP:8080 TCP:11211 TCP:45080 UDP:50008 TCP:55080
+>>> Local ports: TCP:8080 TCP:11211 TCP:45080 UDP:50008 TCP:55080 
 >>> GridGain documentation: http://www.gridgain.com/product.html
 
 [14:16:36,025][INFO ][main][GridSessionSetJobAttributeSelfTest] >>> Starting test: testMultiThreaded <<<
@@ -1434,7 +1434,7 @@
 [14:16:37,133][INFO ][main][GridJettyRestProtocol] Command protocol successfully stopped: Jetty REST
 [14:16:37,134][INFO ][main][GridTcpRestProtocol] Command protocol successfully stopped: TCP binary
 [14:16:37,140][INFO ][main][GridDeploymentLocalStore] Removed undeployed class: GridDeployment [ts=1353320196025, depMode=SHARED, clsLdr=sun.misc.Launcher$AppClassLoader@3326b249, clsLdrId=88a69281b31-46924b92-d354-4a08-87ea-5c8d6271e515, userVer=0, loc=true, sampleCls=class org.gridgain.grid.session.GridSessionSetJobAttributeSelfTest$GridTaskSessionTestTask, sampleClsName=org.gridgain.grid.session.GridSessionSetJobAttributeSelfTest$GridTaskSessionTestTask, undeployed=true, pendingUndeploy=false, usage=0]
-[14:16:37,143][INFO ][main][GridSessionSetJobAttributeSelfTest]
+[14:16:37,143][INFO ][main][GridSessionSetJobAttributeSelfTest] 
 
 >>> +-------------------------------------+
 >>> GridGain ver. x.x.x-DDMMYYYY stopped OK
@@ -1444,13 +1444,13 @@
 
 
 [14:16:37,151][INFO ][main][GridSessionSetJobAttribute2SelfTest] >>> Starting test: testJobSetAttribute <<<
-[14:16:37,157][INFO ][test-runner][GridSessionSetJobAttribute2SelfTest1]
+[14:16:37,157][INFO ][test-runner][GridSessionSetJobAttribute2SelfTest1] 
 
->>>   _____     _     _______      _
->>>  / ___/____(_)___/ / ___/___ _(_)___
->>> / (_ // __/ // _  / (_ // _ `/ // _ \
+>>>   _____     _     _______      _         
+>>>  / ___/____(_)___/ / ___/___ _(_)___     
+>>> / (_ // __/ // _  / (_ // _ `/ // _ \   
 >>> \___//_/ /_/ \_,_/\___/ \_,_/_//_//_/
->>>
+>>> 
 >>>  ---==++ IN-MEMORY BIG DATA ++==---
 >>>        ver. x.x.x-DDMMYYYY
 >>> Copyright (C) 2012 GridGain Systems
@@ -1461,8 +1461,8 @@
 [14:16:37,157][INFO ][test-runner][GridSessionSetJobAttribute2SelfTest1] Language runtime: Java Platform API Specification ver. 1.6
 [14:16:37,158][INFO ][test-runner][GridSessionSetJobAttribute2SelfTest1] JVM name: Java HotSpot(TM) 64-Bit Server VM
 [14:16:37,158][INFO ][test-runner][GridSessionSetJobAttribute2SelfTest1] Remote Management [restart: off, REST: on, JMX (remote: off)]
-[14:16:37,158][INFO ][test-runner][GridSessionSetJobAttribute2SelfTest1] IGNITE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2
-[14:16:37,158][INFO ][test-runner][GridSessionSetJobAttribute2SelfTest1] VM arguments: [-ea, -XX:MaxPermSize=128m, -Xms512m, -Xmx1024m, -Duser.name=bamboo, -DIGNITE_UPDATE_NOTIFIER=false, -DGRIDGAIN_DISABLED=true, -DIGNITE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_STABLE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_ROUTER_PREFER_REMOTE=true, -DIGNITE_NO_DISCO_ORDER=true, -DIGNITE_QUIET=false, -DGG_TEST_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.id=34324, -Dteamcity.buildType.id=bt5, -Dagent.ownPort=9090, -Dteamcity.build.checkoutDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.workingDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dagent.work.dir=/usr/local/TeamCityAgent/work, -Dagent.name=teamcity-4, -Dagent.home.dir=/usr/local/TeamCityAgent, -Dteamcity.runtime.props.file=/usr/local/TeamCityAgent/temp/agentTmp/ant2684847485530994862runtime]
+[14:16:37,158][INFO ][test-runner][GridSessionSetJobAttribute2SelfTest1] GRIDGAIN_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2
+[14:16:37,158][INFO ][test-runner][GridSessionSetJobAttribute2SelfTest1] VM arguments: [-ea, -XX:MaxPermSize=128m, -Xms512m, -Xmx1024m, -Duser.name=bamboo, -DGRIDGAIN_UPDATE_NOTIFIER=false, -DGRIDGAIN_DISABLED=true, -DGRIDGAIN_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_STABLE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_ROUTER_PREFER_REMOTE=true, -DGRIDGAIN_NO_DISCO_ORDER=true, -DGRIDGAIN_QUIET=false, -DGG_TEST_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.id=34324, -Dteamcity.buildType.id=bt5, -Dagent.ownPort=9090, -Dteamcity.build.checkoutDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.workingDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dagent.work.dir=/usr/local/TeamCityAgent/work, -Dagent.name=teamcity-4, -Dagent.home.dir=/usr/local/TeamCityAgent, -Dteamcity.runtime.props.file=/usr/local/TeamCityAgent/temp/agentTmp/ant2684847485530994862runtime]
 [14:16:37,158][WARN ][test-runner][GridSessionSetJobAttribute2SelfTest1] SMTP is not configured - email notifications are off.
 [14:16:37,158][WARN ][test-runner][GridSessionSetJobAttribute2SelfTest1] Cache is not configured - data grid is off.
 [14:16:37,159][INFO ][test-runner][GridSessionSetJobAttribute2SelfTest1] 3-rd party licenses can be found at: /usr/local/TeamCityAgent/work/d46fc9c3d71112c2/libs/licenses
@@ -1482,7 +1482,7 @@
 [14:16:38,723][INFO ][test-runner][GridLicenseControllerImpl] Licensed to 'GridGain Systems, Internal Development Only' on Feb 3, 2011
 [14:16:38,723][INFO ][test-runner][GridLicenseControllerImpl] License [ID=7D5CB773-225C-4165-8162-3BB67337894B, type=ENT]
 [14:16:38,723][INFO ][test-runner][GridLicenseControllerImpl] License limits [expire-date: never]
-[14:16:38,728][INFO ][test-runner][GridSessionSetJobAttribute2SelfTest1]
+[14:16:38,728][INFO ][test-runner][GridSessionSetJobAttribute2SelfTest1] 
 
 >>> +--------------------------+
 >>> GridGain ver. x.x.x-DDMMYYYY
@@ -1495,16 +1495,16 @@
 >>> Grid name: session.GridSessionSetJobAttribute2SelfTest1
 >>> Local node [ID=EF330C54-275E-44C5-BB30-FFD93D498E2F, order=1353320197688]
 >>> Local node addresses: [192.168.2.14]
->>> Local ports: TCP:8080 TCP:11211 TCP:45090 UDP:50009 TCP:55090
+>>> Local ports: TCP:8080 TCP:11211 TCP:45090 UDP:50009 TCP:55090 
 >>> GridGain documentation: http://www.gridgain.com/product.html
 
-[14:16:38,729][INFO ][test-runner][GridSessionSetJobAttribute2SelfTest2]
+[14:16:38,729][INFO ][test-runner][GridSessionSetJobAttribute2SelfTest2] 
 
->>>   _____     _     _______      _
->>>  / ___/____(_)___/ / ___/___ _(_)___
->>> / (_ // __/ // _  / (_ // _ `/ // _ \
+>>>   _____     _     _______      _         
+>>>  / ___/____(_)___/ / ___/___ _(_)___     
+>>> / (_ // __/ // _  / (_ // _ `/ // _ \   
 >>> \___//_/ /_/ \_,_/\___/ \_,_/_//_//_/
->>>
+>>> 
 >>>  ---==++ IN-MEMORY BIG DATA ++==---
 >>>        ver. x.x.x-DDMMYYYY
 >>> Copyright (C) 2012 GridGain Systems
@@ -1515,8 +1515,8 @@
 [14:16:38,729][INFO ][test-runner][GridSessionSetJobAttribute2SelfTest2] Language runtime: Java Platform API Specification ver. 1.6
 [14:16:38,729][INFO ][test-runner][GridSessionSetJobAttribute2SelfTest2] JVM name: Java HotSpot(TM) 64-Bit Server VM
 [14:16:38,729][INFO ][test-runner][GridSessionSetJobAttribute2SelfTest2] Remote Management [restart: off, REST: on, JMX (remote: off)]
-[14:16:38,730][INFO ][test-runner][GridSessionSetJobAttribute2SelfTest2] IGNITE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2
-[14:16:38,730][INFO ][test-runner][GridSessionSetJobAttribute2SelfTest2] VM arguments: [-ea, -XX:MaxPermSize=128m, -Xms512m, -Xmx1024m, -Duser.name=bamboo, -DIGNITE_UPDATE_NOTIFIER=false, -DGRIDGAIN_DISABLED=true, -DIGNITE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_STABLE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_ROUTER_PREFER_REMOTE=true, -DIGNITE_NO_DISCO_ORDER=true, -DIGNITE_QUIET=false, -DGG_TEST_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.id=34324, -Dteamcity.buildType.id=bt5, -Dagent.ownPort=9090, -Dteamcity.build.checkoutDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.workingDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dagent.work.dir=/usr/local/TeamCityAgent/work, -Dagent.name=teamcity-4, -Dagent.home.dir=/usr/local/TeamCityAgent, -Dteamcity.runtime.props.file=/usr/local/TeamCityAgent/temp/agentTmp/ant2684847485530994862runtime]
+[14:16:38,730][INFO ][test-runner][GridSessionSetJobAttribute2SelfTest2] GRIDGAIN_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2
+[14:16:38,730][INFO ][test-runner][GridSessionSetJobAttribute2SelfTest2] VM arguments: [-ea, -XX:MaxPermSize=128m, -Xms512m, -Xmx1024m, -Duser.name=bamboo, -DGRIDGAIN_UPDATE_NOTIFIER=false, -DGRIDGAIN_DISABLED=true, -DGRIDGAIN_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_STABLE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_ROUTER_PREFER_REMOTE=true, -DGRIDGAIN_NO_DISCO_ORDER=true, -DGRIDGAIN_QUIET=false, -DGG_TEST_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.id=34324, -Dteamcity.buildType.id=bt5, -Dagent.ownPort=9090, -Dteamcity.build.checkoutDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.workingDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dagent.work.dir=/usr/local/TeamCityAgent/work, -Dagent.name=teamcity-4, -Dagent.home.dir=/usr/local/TeamCityAgent, -Dteamcity.runtime.props.file=/usr/local/TeamCityAgent/temp/agentTmp/ant2684847485530994862runtime]
 [14:16:38,730][WARN ][test-runner][GridSessionSetJobAttribute2SelfTest2] SMTP is not configured - email notifications are off.
 [14:16:38,730][WARN ][test-runner][GridSessionSetJobAttribute2SelfTest2] Cache is not configured - data grid is off.
 [14:16:38,730][INFO ][test-runner][GridSessionSetJobAttribute2SelfTest2] 3-rd party licenses can be found at: /usr/local/TeamCityAgent/work/d46fc9c3d71112c2/libs/licenses
@@ -1540,7 +1540,7 @@
 [14:16:41,369][INFO ][test-runner][GridLicenseControllerImpl] Licensed to 'GridGain Systems, Internal Development Only' on Feb 3, 2011
 [14:16:41,369][INFO ][test-runner][GridLicenseControllerImpl] License [ID=7D5CB773-225C-4165-8162-3BB67337894B, type=ENT]
 [14:16:41,369][INFO ][test-runner][GridLicenseControllerImpl] License limits [expire-date: never]
-[14:16:41,377][INFO ][test-runner][GridSessionSetJobAttribute2SelfTest2]
+[14:16:41,377][INFO ][test-runner][GridSessionSetJobAttribute2SelfTest2] 
 
 >>> +--------------------------+
 >>> GridGain ver. x.x.x-DDMMYYYY
@@ -1553,7 +1553,7 @@
 >>> Grid name: session.GridSessionSetJobAttribute2SelfTest2
 >>> Local node [ID=50A69295-104F-4E04-90B2-F70E331E9A21, order=1353320199270]
 >>> Local node addresses: [192.168.2.14]
->>> Local ports: TCP:45091 UDP:50009 TCP:55091
+>>> Local ports: TCP:45091 UDP:50009 TCP:55091 
 >>> GridGain documentation: http://www.gridgain.com/product.html
 
 [14:16:41,496][INFO ][test-runner][GridSessionSetJobAttribute2SelfTest] >>> Stopping grid [name=session.GridSessionSetJobAttribute2SelfTest1, id=ef330c54-275e-44c5-bb30-ffd93d498e2f]
@@ -1562,7 +1562,7 @@
 [14:16:42,555][INFO ][disco-event-worker-#685%session.GridSessionSetJobAttribute2SelfTest2%][GridDiscoveryManager] Node left topology: GridMulticastDiscoveryNode [id=ef330c54-275e-44c5-bb30-ffd93d498e2f, state=LEFT, lastHeartbeat=1353320202554, addrs=[192.168.2.14], addr=/192.168.2.14, tcpPort=55090, startTime=1353320197688]
 [14:16:42,556][INFO ][disco-event-worker-#685%session.GridSessionSetJobAttribute2SelfTest2%][GridDiscoveryManager] Topology snapshot [nodes=1, CPUs=4, hash=0x7C68505C]
 [14:16:42,559][INFO ][test-runner][GridDeploymentLocalStore] Removed undeployed class: GridDeployment [ts=1353320201375, depMode=SHARED, clsLdr=sun.misc.Launcher$AppClassLoader@3326b249, clsLdrId=c2c69281b31-ef330c54-275e-44c5-bb30-ffd93d498e2f, userVer=0, loc=true, sampleCls=class org.gridgain.grid.session.GridSessionSetJobAttribute2SelfTest$SessionTestTask, sampleClsName=org.gridgain.grid.session.GridSessionSetJobAttribute2SelfTest$SessionTestTask, undeployed=true, pendingUndeploy=false, usage=0]
-[14:16:42,561][INFO ][test-runner][GridSessionSetJobAttribute2SelfTest1]
+[14:16:42,561][INFO ][test-runner][GridSessionSetJobAttribute2SelfTest1] 
 
 >>> +-------------------------------------+
 >>> GridGain ver. x.x.x-DDMMYYYY stopped OK
@@ -1575,7 +1575,7 @@
 [14:16:42,562][INFO ][test-runner][GridJettyRestProtocol] Command protocol successfully stopped: Jetty REST
 [14:16:42,562][INFO ][test-runner][GridTcpRestProtocol] Command protocol successfully stopped: TCP binary
 [14:16:42,568][INFO ][test-runner][GridDeploymentLocalStore] Removed undeployed class: GridDeployment [ts=1353320201385, depMode=SHARED, clsLdr=sun.misc.Launcher$AppClassLoader@3326b249, clsLdrId=23c69281b31-50a69295-104f-4e04-90b2-f70e331e9a21, userVer=0, loc=true, sampleCls=class org.gridgain.grid.session.GridSessionSetJobAttribute2SelfTest$SessionTestTask, sampleClsName=org.gridgain.grid.session.GridSessionSetJobAttribute2SelfTest$SessionTestTask, undeployed=true, pendingUndeploy=false, usage=0]
-[14:16:42,570][INFO ][test-runner][GridSessionSetJobAttribute2SelfTest2]
+[14:16:42,570][INFO ][test-runner][GridSessionSetJobAttribute2SelfTest2] 
 
 >>> +-------------------------------------+
 >>> GridGain ver. x.x.x-DDMMYYYY stopped OK
@@ -1585,13 +1585,13 @@
 
 
 [14:16:42,571][INFO ][main][GridSessionSetJobAttribute2SelfTest] >>> Stopping test: testJobSetAttribute in 5420 ms <<<
-[14:16:42,580][INFO ][main][GridSessionJobWaitTaskAttributeSelfTest]
+[14:16:42,580][INFO ][main][GridSessionJobWaitTaskAttributeSelfTest] 
 
->>>   _____     _     _______      _
->>>  / ___/____(_)___/ / ___/___ _(_)___
->>> / (_ // __/ // _  / (_ // _ `/ // _ \
+>>>   _____     _     _______      _         
+>>>  / ___/____(_)___/ / ___/___ _(_)___     
+>>> / (_ // __/ // _  / (_ // _ `/ // _ \   
 >>> \___//_/ /_/ \_,_/\___/ \_,_/_//_//_/
->>>
+>>> 
 >>>  ---==++ IN-MEMORY BIG DATA ++==---
 >>>        ver. x.x.x-DDMMYYYY
 >>> Copyright (C) 2012 GridGain Systems
@@ -1602,8 +1602,8 @@
 [14:16:42,581][INFO ][main][GridSessionJobWaitTaskAttributeSelfTest] Language runtime: Java Platform API Specification ver. 1.6
 [14:16:42,581][INFO ][main][GridSessionJobWaitTaskAttributeSelfTest] JVM name: Java HotSpot(TM) 64-Bit Server VM
 [14:16:42,581][INFO ][main][GridSessionJobWaitTaskAttributeSelfTest] Remote Management [restart: off, REST: on, JMX (remote: off)]
-[14:16:42,581][INFO ][main][GridSessionJobWaitTaskAttributeSelfTest] IGNITE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2
-[14:16:42,581][INFO ][main][GridSessionJobWaitTaskAttributeSelfTest] VM arguments: [-ea, -XX:MaxPermSize=128m, -Xms512m, -Xmx1024m, -Duser.name=bamboo, -DIGNITE_UPDATE_NOTIFIER=false, -DGRIDGAIN_DISABLED=true, -DIGNITE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_STABLE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_ROUTER_PREFER_REMOTE=true, -DIGNITE_NO_DISCO_ORDER=true, -DIGNITE_QUIET=false, -DGG_TEST_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.id=34324, -Dteamcity.buildType.id=bt5, -Dagent.ownPort=9090, -Dteamcity.build.checkoutDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.workingDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dagent.work.dir=/usr/local/TeamCityAgent/work, -Dagent.name=teamcity-4, -Dagent.home.dir=/usr/local/TeamCityAgent, -Dteamcity.runtime.props.file=/usr/local/TeamCityAgent/temp/agentTmp/ant2684847485530994862runtime]
+[14:16:42,581][INFO ][main][GridSessionJobWaitTaskAttributeSelfTest] GRIDGAIN_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2
+[14:16:42,581][INFO ][main][GridSessionJobWaitTaskAttributeSelfTest] VM arguments: [-ea, -XX:MaxPermSize=128m, -Xms512m, -Xmx1024m, -Duser.name=bamboo, -DGRIDGAIN_UPDATE_NOTIFIER=false, -DGRIDGAIN_DISABLED=true, -DGRIDGAIN_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_STABLE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_ROUTER_PREFER_REMOTE=true, -DGRIDGAIN_NO_DISCO_ORDER=true, -DGRIDGAIN_QUIET=false, -DGG_TEST_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.id=34324, -Dteamcity.buildType.id=bt5, -Dagent.ownPort=9090, -Dteamcity.build.checkoutDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.workingDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dagent.work.dir=/usr/local/TeamCityAgent/work, -Dagent.name=teamcity-4, -Dagent.home.dir=/usr/local/TeamCityAgent, -Dteamcity.runtime.props.file=/usr/local/TeamCityAgent/temp/agentTmp/ant2684847485530994862runtime]
 [14:16:42,582][WARN ][main][GridSessionJobWaitTaskAttributeSelfTest] SMTP is not configured - email notifications are off.
 [14:16:42,582][WARN ][main][GridSessionJobWaitTaskAttributeSelfTest] Cache is not configured - data grid is off.
 [14:16:42,583][INFO ][main][GridSessionJobWaitTaskAttributeSelfTest] 3-rd party licenses can be found at: /usr/local/TeamCityAgent/work/d46fc9c3d71112c2/libs/licenses
@@ -1623,7 +1623,7 @@
 [14:16:44,144][INFO ][main][GridLicenseControllerImpl] Licensed to 'GridGain Systems, Internal Development Only' on Feb 3, 2011
 [14:16:44,144][INFO ][main][GridLicenseControllerImpl] License [ID=7D5CB773-225C-4165-8162-3BB67337894B, type=ENT]
 [14:16:44,144][INFO ][main][GridLicenseControllerImpl] License limits [expire-date: never]
-[14:16:44,148][INFO ][main][GridSessionJobWaitTaskAttributeSelfTest]
+[14:16:44,148][INFO ][main][GridSessionJobWaitTaskAttributeSelfTest] 
 
 >>> +--------------------------+
 >>> GridGain ver. x.x.x-DDMMYYYY
@@ -1636,7 +1636,7 @@
 >>> Grid name: session.GridSessionJobWaitTaskAttributeSelfTest
 >>> Local node [ID=B39CEE3B-7910-40D6-97BF-85D584DA07C8, order=1353320203107]
 >>> Local node addresses: [192.168.2.14]
->>> Local ports: TCP:8080 TCP:11211 TCP:45100 UDP:50010 TCP:55100
+>>> Local ports: TCP:8080 TCP:11211 TCP:45100 UDP:50010 TCP:55100 
 >>> GridGain documentation: http://www.gridgain.com/product.html
 
 [14:16:44,148][INFO ][main][GridSessionJobWaitTaskAttributeSelfTest] >>> Starting test: testMultiThreaded <<<
@@ -1856,7 +1856,7 @@
 [14:16:45,285][INFO ][main][GridJettyRestProtocol] Command protocol successfully stopped: Jetty REST
 [14:16:45,285][INFO ][main][GridTcpRestProtocol] Command protocol successfully stopped: TCP binary
 [14:16:45,291][INFO ][main][GridDeploymentLocalStore] Removed undeployed class: GridDeployment [ts=1353320204144, depMode=SHARED, clsLdr=sun.misc.Launcher$AppClassLoader@3326b249, clsLdrId=44c69281b31-b39cee3b-7910-40d6-97bf-85d584da07c8, userVer=0, loc=true, sampleCls=class org.gridgain.grid.session.GridSessionJobWaitTaskAttributeSelfTest$GridTaskSessionTestTask, sampleClsName=org.gridgain.grid.session.GridSessionJobWaitTaskAttributeSelfTest$GridTaskSessionTestTask, undeployed=true, pendingUndeploy=false, usage=0]
-[14:16:45,294][INFO ][main][GridSessionJobWaitTaskAttributeSelfTest]
+[14:16:45,294][INFO ][main][GridSessionJobWaitTaskAttributeSelfTest] 
 
 >>> +-------------------------------------+
 >>> GridGain ver. x.x.x-DDMMYYYY stopped OK
@@ -1865,13 +1865,13 @@
 >>> Grid uptime: 00:00:01:141
 
 
-[14:16:45,307][INFO ][main][GridSessionSetTaskAttributeSelfTest]
+[14:16:45,307][INFO ][main][GridSessionSetTaskAttributeSelfTest] 
 
->>>   _____     _     _______      _
->>>  / ___/____(_)___/ / ___/___ _(_)___
->>> / (_ // __/ // _  / (_ // _ `/ // _ \
+>>>   _____     _     _______      _         
+>>>  / ___/____(_)___/ / ___/___ _(_)___     
+>>> / (_ // __/ // _  / (_ // _ `/ // _ \   
 >>> \___//_/ /_/ \_,_/\___/ \_,_/_//_//_/
->>>
+>>> 
 >>>  ---==++ IN-MEMORY BIG DATA ++==---
 >>>        ver. x.x.x-DDMMYYYY
 >>> Copyright (C) 2012 GridGain Systems
@@ -1882,8 +1882,8 @@
 [14:16:45,307][INFO ][main][GridSessionSetTaskAttributeSelfTest] Language runtime: Java Platform API Specification ver. 1.6
 [14:16:45,307][INFO ][main][GridSessionSetTaskAttributeSelfTest] JVM name: Java HotSpot(TM) 64-Bit Server VM
 [14:16:45,307][INFO ][main][GridSessionSetTaskAttributeSelfTest] Remote Management [restart: off, REST: on, JMX (remote: off)]
-[14:16:45,307][INFO ][main][GridSessionSetTaskAttributeSelfTest] IGNITE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2
-[14:16:45,307][INFO ][main][GridSessionSetTaskAttributeSelfTest] VM arguments: [-ea, -XX:MaxPermSize=128m, -Xms512m, -Xmx1024m, -Duser.name=bamboo, -DIGNITE_UPDATE_NOTIFIER=false, -DGRIDGAIN_DISABLED=true, -DIGNITE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_STABLE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_ROUTER_PREFER_REMOTE=true, -DIGNITE_NO_DISCO_ORDER=true, -DIGNITE_QUIET=false, -DGG_TEST_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.id=34324, -Dteamcity.buildType.id=bt5, -Dagent.ownPort=9090, -Dteamcity.build.checkoutDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.workingDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dagent.work.dir=/usr/local/TeamCityAgent/work, -Dagent.name=teamcity-4, -Dagent.home.dir=/usr/local/TeamCityAgent, -Dteamcity.runtime.props.file=/usr/local/TeamCityAgent/temp/agentTmp/ant2684847485530994862runtime]
+[14:16:45,307][INFO ][main][GridSessionSetTaskAttributeSelfTest] GRIDGAIN_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2
+[14:16:45,307][INFO ][main][GridSessionSetTaskAttributeSelfTest] VM arguments: [-ea, -XX:MaxPermSize=128m, -Xms512m, -Xmx1024m, -Duser.name=bamboo, -DGRIDGAIN_UPDATE_NOTIFIER=false, -DGRIDGAIN_DISABLED=true, -DGRIDGAIN_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_STABLE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_ROUTER_PREFER_REMOTE=true, -DGRIDGAIN_NO_DISCO_ORDER=true, -DGRIDGAIN_QUIET=false, -DGG_TEST_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.id=34324, -Dteamcity.buildType.id=bt5, -Dagent.ownPort=9090, -Dteamcity.build.checkoutDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.workingDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dagent.work.dir=/usr/local/TeamCityAgent/work, -Dagent.name=teamcity-4, -Dagent.home.dir=/usr/local/TeamCityAgent, -Dteamcity.runtime.props.file=/usr/local/TeamCityAgent/temp/agentTmp/ant2684847485530994862runtime]
 [14:16:45,307][WARN ][main][GridSessionSetTaskAttributeSelfTest] SMTP is not configured - email notifications are off.
 [14:16:45,307][WARN ][main][GridSessionSetTaskAttributeSelfTest] Cache is not configured - data grid is off.
 [14:16:45,308][INFO ][main][GridSessionSetTaskAttributeSelfTest] 3-rd party licenses can be found at: /usr/local/TeamCityAgent/work/d46fc9c3d71112c2/libs/licenses
@@ -1903,7 +1903,7 @@
 [14:16:46,878][INFO ][main][GridLicenseControllerImpl] Licensed to 'GridGain Systems, Internal Development Only' on Feb 3, 2011
 [14:16:46,879][INFO ][main][GridLicenseControllerImpl] License [ID=7D5CB773-225C-4165-8162-3BB67337894B, type=ENT]
 [14:16:46,879][INFO ][main][GridLicenseControllerImpl] License limits [expire-date: never]
-[14:16:46,883][INFO ][main][GridSessionSetTaskAttributeSelfTest]
+[14:16:46,883][INFO ][main][GridSessionSetTaskAttributeSelfTest] 
 
 >>> +--------------------------+
 >>> GridGain ver. x.x.x-DDMMYYYY
@@ -1916,7 +1916,7 @@
 >>> Grid name: session.GridSessionSetTaskAttributeSelfTest
 >>> Local node [ID=B9710CC2-6190-44C8-9214-43AC2125C016, order=1353320205839]
 >>> Local node addresses: [192.168.2.14]
->>> Local ports: TCP:8080 TCP:11211 TCP:45110 UDP:50011 TCP:55110
+>>> Local ports: TCP:8080 TCP:11211 TCP:45110 UDP:50011 TCP:55110 
 >>> GridGain documentation: http://www.gridgain.com/product.html
 
 [14:16:46,883][INFO ][main][GridSessionSetTaskAttributeSelfTest] >>> Starting test: testMultiThreaded <<<
@@ -2106,7 +2106,7 @@
 [14:16:47,991][INFO ][main][GridJettyRestProtocol] Command protocol successfully stopped: Jetty REST
 [14:16:47,991][INFO ][main][GridTcpRestProtocol] Command protocol successfully stopped: TCP binary
 [14:16:47,997][INFO ][main][GridDeploymentLocalStore] Removed undeployed class: GridDeployment [ts=1353320206876, depMode=SHARED, clsLdr=sun.misc.Launcher$AppClassLoader@3326b249, clsLdrId=add69281b31-b9710cc2-6190-44c8-9214-43ac2125c016, userVer=0, loc=true, sampleCls=class org.gridgain.grid.session.GridSessionSetTaskAttributeSelfTest$GridTaskSessionTestTask, sampleClsName=org.gridgain.grid.session.GridSessionSetTaskAttributeSelfTest$GridTaskSessionTestTask, undeployed=true, pendingUndeploy=false, usage=0]
-[14:16:47,999][INFO ][main][GridSessionSetTaskAttributeSelfTest]
+[14:16:47,999][INFO ][main][GridSessionSetTaskAttributeSelfTest] 
 
 >>> +-------------------------------------+
 >>> GridGain ver. x.x.x-DDMMYYYY stopped OK
@@ -2115,13 +2115,13 @@
 >>> Grid uptime: 00:00:01:118
 
 
-[14:16:48,012][INFO ][main][GridSessionFutureWaitTaskAttributeSelfTest]
+[14:16:48,012][INFO ][main][GridSessionFutureWaitTaskAttributeSelfTest] 
 
->>>   _____     _     _______      _
->>>  / ___/____(_)___/ / ___/___ _(_)___
->>> / (_ // __/ // _  / (_ // _ `/ // _ \
+>>>   _____     _     _______      _         
+>>>  / ___/____(_)___/ / ___/___ _(_)___     
+>>> / (_ // __/ // _  / (_ // _ `/ // _ \   
 >>> \___//_/ /_/ \_,_/\___/ \_,_/_//_//_/
->>>
+>>> 
 >>>  ---==++ IN-MEMORY BIG DATA ++==---
 >>>        ver. x.x.x-DDMMYYYY
 >>> Copyright (C) 2012 GridGain Systems
@@ -2132,8 +2132,8 @@
 [14:16:48,013][INFO ][main][GridSessionFutureWaitTaskAttributeSelfTest] Language runtime: Java Platform API Specification ver. 1.6
 [14:16:48,013][INFO ][main][GridSessionFutureWaitTaskAttributeSelfTest] JVM name: Java HotSpot(TM) 64-Bit Server VM
 [14:16:48,013][INFO ][main][GridSessionFutureWaitTaskAttributeSelfTest] Remote Management [restart: off, REST: on, JMX (remote: off)]
-[14:16:48,013][INFO ][main][GridSessionFutureWaitTaskAttributeSelfTest] IGNITE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2
-[14:16:48,013][INFO ][main][GridSessionFutureWaitTaskAttributeSelfTest] VM arguments: [-ea, -XX:MaxPermSize=128m, -Xms512m, -Xmx1024m, -Duser.name=bamboo, -DIGNITE_UPDATE_NOTIFIER=false, -DGRIDGAIN_DISABLED=true, -DIGNITE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_STABLE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_ROUTER_PREFER_REMOTE=true, -DIGNITE_NO_DISCO_ORDER=true, -DIGNITE_QUIET=false, -DGG_TEST_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.id=34324, -Dteamcity.buildType.id=bt5, -Dagent.ownPort=9090, -Dteamcity.build.checkoutDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.workingDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dagent.work.dir=/usr/local/TeamCityAgent/work, -Dagent.name=teamcity-4, -Dagent.home.dir=/usr/local/TeamCityAgent, -Dteamcity.runtime.props.file=/usr/local/TeamCityAgent/temp/agentTmp/ant2684847485530994862runtime]
+[14:16:48,013][INFO ][main][GridSessionFutureWaitTaskAttributeSelfTest] GRIDGAIN_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2
+[14:16:48,013][INFO ][main][GridSessionFutureWaitTaskAttributeSelfTest] VM arguments: [-ea, -XX:MaxPermSize=128m, -Xms512m, -Xmx1024m, -Duser.name=bamboo, -DGRIDGAIN_UPDATE_NOTIFIER=false, -DGRIDGAIN_DISABLED=true, -DGRIDGAIN_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_STABLE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_ROUTER_PREFER_REMOTE=true, -DGRIDGAIN_NO_DISCO_ORDER=true, -DGRIDGAIN_QUIET=false, -DGG_TEST_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.id=34324, -Dteamcity.buildType.id=bt5, -Dagent.ownPort=9090, -Dteamcity.build.checkoutDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.workingDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dagent.work.dir=/usr/local/TeamCityAgent/work, -Dagent.name=teamcity-4, -Dagent.home.dir=/usr/local/TeamCityAgent, -Dteamcity.runtime.props.file=/usr/local/TeamCityAgent/temp/agentTmp/ant2684847485530994862runtime]
 [14:16:48,013][WARN ][main][GridSessionFutureWaitTaskAttributeSelfTest] SMTP is not configured - email notifications are off.
 [14:16:48,014][WARN ][main][GridSessionFutureWaitTaskAttributeSelfTest] Cache is not configured - data grid is off.
 [14:16:48,014][INFO ][main][GridSessionFutureWaitTaskAttributeSelfTest] 3-rd party licenses can be found at: /usr/local/TeamCityAgent/work/d46fc9c3d71112c2/libs/licenses
@@ -2153,7 +2153,7 @@
 [14:16:49,596][INFO ][main][GridLicenseControllerImpl] Licensed to 'GridGain Systems, Internal Development Only' on Feb 3, 2011
 [14:16:49,596][INFO ][main][GridLicenseControllerImpl] License [ID=7D5CB773-225C-4165-8162-3BB67337894B, type=ENT]
 [14:16:49,596][INFO ][main][GridLicenseControllerImpl] License limits [expire-date: never]
-[14:16:49,604][INFO ][main][GridSessionFutureWaitTaskAttributeSelfTest]
+[14:16:49,604][INFO ][main][GridSessionFutureWaitTaskAttributeSelfTest] 
 
 >>> +--------------------------+
 >>> GridGain ver. x.x.x-DDMMYYYY
@@ -2166,7 +2166,7 @@
 >>> Grid name: session.GridSessionFutureWaitTaskAttributeSelfTest
 >>> Local node [ID=16566258-770B-4ECF-962F-A6A9D4076A69, order=1353320208548]
 >>> Local node addresses: [192.168.2.14]
->>> Local ports: TCP:8080 TCP:11211 TCP:45120 UDP:50012 TCP:55120
+>>> Local ports: TCP:8080 TCP:11211 TCP:45120 UDP:50012 TCP:55120 
 >>> GridGain documentation: http://www.gridgain.com/product.html
 
 [14:16:49,604][INFO ][main][GridSessionFutureWaitTaskAttributeSelfTest] >>> Starting test: testMultiThreaded <<<
@@ -2306,7 +2306,7 @@
 [14:16:50,720][INFO ][main][GridJettyRestProtocol] Command protocol successfully stopped: Jetty REST
 [14:16:50,721][INFO ][main][GridTcpRestProtocol] Command protocol successfully stopped: TCP binary
 [14:16:50,726][INFO ][main][GridDeploymentLocalStore] Removed undeployed class: GridDeployment [ts=1353320209606, depMode=SHARED, clsLdr=sun.misc.Launcher$AppClassLoader@3326b249, clsLdrId=07f69281b31-16566258-770b-4ecf-962f-a6a9d4076a69, userVer=0, loc=true, sampleCls=class org.gridgain.grid.session.GridSessionFutureWaitTaskAttributeSelfTest$GridTaskSessionTestTask, sampleClsName=org.gridgain.grid.session.GridSessionFutureWaitTaskAttributeSelfTest$GridTaskSessionTestTask, undeployed=true, pendingUndeploy=false, usage=0]
-[14:16:50,729][INFO ][main][GridSessionFutureWaitTaskAttributeSelfTest]
+[14:16:50,729][INFO ][main][GridSessionFutureWaitTaskAttributeSelfTest] 
 
 >>> +-------------------------------------+
 >>> GridGain ver. x.x.x-DDMMYYYY stopped OK
@@ -2315,13 +2315,13 @@
 >>> Grid uptime: 00:00:01:129
 
 
-[14:16:50,744][INFO ][main][GridSessionFutureWaitJobAttributeSelfTest]
+[14:16:50,744][INFO ][main][GridSessionFutureWaitJobAttributeSelfTest] 
 
->>>   _____     _     _______      _
->>>  / ___/____(_)___/ / ___/___ _(_)___
->>> / (_ // __/ // _  / (_ // _ `/ // _ \
+>>>   _____     _     _______      _         
+>>>  / ___/____(_)___/ / ___/___ _(_)___     
+>>> / (_ // __/ // _  / (_ // _ `/ // _ \   
 >>> \___//_/ /_/ \_,_/\___/ \_,_/_//_//_/
->>>
+>>> 
 >>>  ---==++ IN-MEMORY BIG DATA ++==---
 >>>        ver. x.x.x-DDMMYYYY
 >>> Copyright (C) 2012 GridGain Systems
@@ -2332,8 +2332,8 @@
 [14:16:50,744][INFO ][main][GridSessionFutureWaitJobAttributeSelfTest] Language runtime: Java Platform API Specification ver. 1.6
 [14:16:50,745][INFO ][main][GridSessionFutureWaitJobAttributeSelfTest] JVM name: Java HotSpot(TM) 64-Bit Server VM
 [14:16:50,745][INFO ][main][GridSessionFutureWaitJobAttributeSelfTest] Remote Management [restart: off, REST: on, JMX (remote: off)]
-[14:16:50,745][INFO ][main][GridSessionFutureWaitJobAttributeSelfTest] IGNITE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2
-[14:16:50,745][INFO ][main][GridSessionFutureWaitJobAttributeSelfTest] VM arguments: [-ea, -XX:MaxPermSize=128m, -Xms512m, -Xmx1024m, -Duser.name=bamboo, -DIGNITE_UPDATE_NOTIFIER=false, -DGRIDGAIN_DISABLED=true, -DIGNITE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_STABLE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_ROUTER_PREFER_REMOTE=true, -DIGNITE_NO_DISCO_ORDER=true, -DIGNITE_QUIET=false, -DGG_TEST_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.id=34324, -Dteamcity.buildType.id=bt5, -Dagent.ownPort=9090, -Dteamcity.build.checkoutDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.workingDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dagent.work.dir=/usr/local/TeamCityAgent/work, -Dagent.name=teamcity-4, -Dagent.home.dir=/usr/local/TeamCityAgent, -Dteamcity.runtime.props.file=/usr/local/TeamCityAgent/temp/agentTmp/ant2684847485530994862runtime]
+[14:16:50,745][INFO ][main][GridSessionFutureWaitJobAttributeSelfTest] GRIDGAIN_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2
+[14:16:50,745][INFO ][main][GridSessionFutureWaitJobAttributeSelfTest] VM arguments: [-ea, -XX:MaxPermSize=128m, -Xms512m, -Xmx1024m, -Duser.name=bamboo, -DGRIDGAIN_UPDATE_NOTIFIER=false, -DGRIDGAIN_DISABLED=true, -DGRIDGAIN_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_STABLE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_ROUTER_PREFER_REMOTE=true, -DGRIDGAIN_NO_DISCO_ORDER=true, -DGRIDGAIN_QUIET=false, -DGG_TEST_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.id=34324, -Dteamcity.buildType.id=bt5, -Dagent.ownPort=9090, -Dteamcity.build.checkoutDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.workingDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dagent.work.dir=/usr/local/TeamCityAgent/work, -Dagent.name=teamcity-4, -Dagent.home.dir=/usr/local/TeamCityAgent, -Dteamcity.runtime.props.file=/usr/local/TeamCityAgent/temp/agentTmp/ant2684847485530994862runtime]
 [14:16:50,745][WARN ][main][GridSessionFutureWaitJobAttributeSelfTest] SMTP is not configured - email notifications are off.
 [14:16:50,745][WARN ][main][GridSessionFutureWaitJobAttributeSelfTest] Cache is not configured - data grid is off.
 [14:16:50,746][INFO ][main][GridSessionFutureWaitJobAttributeSelfTest] 3-rd party licenses can be found at: /usr/local/TeamCityAgent/work/d46fc9c3d71112c2/libs/licenses
@@ -2353,7 +2353,7 @@
 [14:16:52,314][INFO ][main][GridLicenseControllerImpl] Licensed to 'GridGain Systems, Internal Development Only' on Feb 3, 2011
 [14:16:52,314][INFO ][main][GridLicenseControllerImpl] License [ID=7D5CB773-225C-4165-8162-3BB67337894B, type=ENT]
 [14:16:52,314][INFO ][main][GridLicenseControllerImpl] License limits [expire-date: never]
-[14:16:52,322][INFO ][main][GridSessionFutureWaitJobAttributeSelfTest]
+[14:16:52,322][INFO ][main][GridSessionFutureWaitJobAttributeSelfTest] 
 
 >>> +--------------------------+
 >>> GridGain ver. x.x.x-DDMMYYYY
@@ -2366,7 +2366,7 @@
 >>> Grid name: session.GridSessionFutureWaitJobAttributeSelfTest
 >>> Local node [ID=6CB9A71D-90AF-4C65-B212-2D3AE90802F4, order=1353320211278]
 >>> Local node addresses: [192.168.2.14]
->>> Local ports: TCP:8080 TCP:11211 TCP:45130 UDP:50013 TCP:55130
+>>> Local ports: TCP:8080 TCP:11211 TCP:45130 UDP:50013 TCP:55130 
 >>> GridGain documentation: http://www.gridgain.com/product.html
 
 [14:16:52,322][INFO ][main][GridSessionFutureWaitJobAttributeSelfTest] >>> Starting test: testMultiThreaded <<<
@@ -3026,7 +3026,7 @@
 [14:16:53,553][INFO ][main][GridJettyRestProtocol] Command protocol successfully stopped: Jetty REST
 [14:16:53,553][INFO ][main][GridTcpRestProtocol] Command protocol successfully stopped: TCP binary
 [14:16:53,558][INFO ][main][GridDeploymentLocalStore] Removed undeployed class: GridDeployment [ts=1353320212315, depMode=SHARED, clsLdr=sun.misc.Launcher$AppClassLoader@3326b249, clsLdrId=e2179281b31-6cb9a71d-90af-4c65-b212-2d3ae90802f4, userVer=0, loc=true, sampleCls=class org.gridgain.grid.session.GridSessionFutureWaitJobAttributeSelfTest$GridTaskSessionTestTask, sampleClsName=org.gridgain.grid.session.GridSessionFutureWaitJobAttributeSelfTest$GridTaskSessionTestTask, undeployed=true, pendingUndeploy=false, usage=0]
-[14:16:53,561][INFO ][main][GridSessionFutureWaitJobAttributeSelfTest]
+[14:16:53,561][INFO ][main][GridSessionFutureWaitJobAttributeSelfTest] 
 
 >>> +-------------------------------------+
 >>> GridGain ver. x.x.x-DDMMYYYY stopped OK
@@ -3035,13 +3035,13 @@
 >>> Grid uptime: 00:00:01:238
 
 
-[14:16:53,575][INFO ][main][GridSessionTaskWaitJobAttributeSelfTest]
+[14:16:53,575][INFO ][main][GridSessionTaskWaitJobAttributeSelfTest] 
 
->>>   _____     _     _______      _
->>>  / ___/____(_)___/ / ___/___ _(_)___
->>> / (_ // __/ // _  / (_ // _ `/ // _ \
+>>>   _____     _     _______      _         
+>>>  / ___/____(_)___/ / ___/___ _(_)___     
+>>> / (_ // __/ // _  / (_ // _ `/ // _ \   
 >>> \___//_/ /_/ \_,_/\___/ \_,_/_//_//_/
->>>
+>>> 
 >>>  ---==++ IN-MEMORY BIG DATA ++==---
 >>>        ver. x.x.x-DDMMYYYY
 >>> Copyright (C) 2012 GridGain Systems
@@ -3052,8 +3052,8 @@
 [14:16:53,575][INFO ][main][GridSessionTaskWaitJobAttributeSelfTest] Language runtime: Java Platform API Specification ver. 1.6
 [14:16:53,575][INFO ][main][GridSessionTaskWaitJobAttributeSelfTest] JVM name: Java HotSpot(TM) 64-Bit Server VM
 [14:16:53,576][INFO ][main][GridSessionTaskWaitJobAttributeSelfTest] Remote Management [restart: off, REST: on, JMX (remote: off)]
-[14:16:53,576][INFO ][main][GridSessionTaskWaitJobAttributeSelfTest] IGNITE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2
-[14:16:53,576][INFO ][main][GridSessionTaskWaitJobAttributeSelfTest] VM arguments: [-ea, -XX:MaxPermSize=128m, -Xms512m, -Xmx1024m, -Duser.name=bamboo, -DIGNITE_UPDATE_NOTIFIER=false, -DGRIDGAIN_DISABLED=true, -DIGNITE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_STABLE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_ROUTER_PREFER_REMOTE=true, -DIGNITE_NO_DISCO_ORDER=true, -DIGNITE_QUIET=false, -DGG_TEST_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.id=34324, -Dteamcity.buildType.id=bt5, -Dagent.ownPort=9090, -Dteamcity.build.checkoutDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.workingDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dagent.work.dir=/usr/local/TeamCityAgent/work, -Dagent.name=teamcity-4, -Dagent.home.dir=/usr/local/TeamCityAgent, -Dteamcity.runtime.props.file=/usr/local/TeamCityAgent/temp/agentTmp/ant2684847485530994862runtime]
+[14:16:53,576][INFO ][main][GridSessionTaskWaitJobAttributeSelfTest] GRIDGAIN_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2
+[14:16:53,576][INFO ][main][GridSessionTaskWaitJobAttributeSelfTest] VM arguments: [-ea, -XX:MaxPermSize=128m, -Xms512m, -Xmx1024m, -Duser.name=bamboo, -DGRIDGAIN_UPDATE_NOTIFIER=false, -DGRIDGAIN_DISABLED=true, -DGRIDGAIN_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_STABLE_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -DGRIDGAIN_ROUTER_PREFER_REMOTE=true, -DGRIDGAIN_NO_DISCO_ORDER=true, -DGRIDGAIN_QUIET=false, -DGG_TEST_HOME=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.id=34324, -Dteamcity.buildType.id=bt5, -Dagent.ownPort=9090, -Dteamcity.build.checkoutDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dteamcity.build.workingDir=/usr/local/TeamCityAgent/work/d46fc9c3d71112c2, -Dagent.work.dir=/usr/local/TeamCityAgent/work, -Dagent.name=teamcity-4, -Dagent.home.dir=/usr/local/TeamCityAgent, -Dteamcity.runtime.props.file=/usr/local/TeamCityAgent/temp/agentTmp/ant2684847485530994862runtime]
 [14:16:53,576][WARN ][main][GridSessionTaskWaitJobAttributeSelfTest] SMTP is not configured - email notifications are off.
 [14:16:53,576][WARN ][main][GridSessionTaskWaitJobAttributeSelfTest] Cache is not configured - data grid is off.
 [14:16:53,577][INFO ][main][GridSessionTaskWaitJobA

<TRUNCATED>

[49/50] [abbrv] incubator-ignite git commit: ignite-sql - renamings

Posted by se...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQuerySqlField.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQuerySqlField.java b/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQuerySqlField.java
deleted file mode 100644
index c5560a5..0000000
--- a/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQuerySqlField.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.cache.query;
-
-import java.lang.annotation.*;
-
-/**
- * Annotates fields for SQL queries. All fields that will be involved in SQL clauses must have
- * this annotation. For more information about cache queries see {@link CacheQuery} documentation.
- * @see CacheQuery
- */
-@Documented
-@Retention(RetentionPolicy.RUNTIME)
-@Target({ElementType.METHOD, ElementType.FIELD})
-public @interface CacheQuerySqlField {
-    /**
-     * Specifies whether cache should maintain an index for this field or not.
-     * Just like with databases, field indexing may require additional overhead
-     * during updates, but makes select operations faster.
-     * <p>
-     * When indexing SPI and indexed field is
-     * of type {@code com.vividsolutions.jts.geom.Geometry} (or any subclass of this class) then GridGain will
-     * consider this index as spatial providing performance boost for spatial queries.
-     *
-     * @return {@code True} if index must be created for this field in database.
-     */
-    boolean index() default false;
-
-    /**
-     * Specifies whether index should be unique or not. This property only
-     * makes sense if {@link #index()} property is set to {@code true}.
-     *
-     * @return {@code True} if field index should be unique.
-     * @deprecated No longer supported, will be ignored.
-     */
-    @Deprecated
-    boolean unique() default false;
-
-    /**
-     * Specifies whether index should be in descending order or not. This property only
-     * makes sense if {@link #index()} property is set to {@code true}.
-     *
-     * @return {@code True} if field index should be in descending order.
-     */
-    boolean descending() default false;
-
-    /**
-     * Array of index groups this field belongs to. Groups are used for compound indexes,
-     * whenever index should be created on more than one field. All fields within the same
-     * group will belong to the same index.
-     * <p>
-     * Group indexes are needed because SQL engine can utilize only one index per table occurrence in a query.
-     * For example if we have two separate indexes on fields {@code a} and {@code b} of type {@code X} then
-     * query {@code select * from X where a = ? and b = ?} will use for filtering either index on field {@code a}
-     * or {@code b} but not both. For more effective query execution here it is preferable to have a single
-     * group index on both fields.
-     * <p>
-     * For more complex scenarios please refer to {@link CacheQuerySqlField.Group} documentation.
-     *
-     * @return Array of group names.
-     */
-    String[] groups() default {};
-
-    /**
-     * Array of ordered index groups this field belongs to. For more information please refer to
-     * {@linkplain CacheQuerySqlField.Group} documentation.
-     *
-     * @return Array of ordered group indexes.
-     * @see #groups()
-     */
-    Group[] orderedGroups() default {};
-
-    /**
-     * Property name. If not provided then field name will be used.
-     *
-     * @return Name of property.
-     */
-    String name() default "";
-
-    /**
-     * Describes group of index and position of field in this group.
-     * <p>
-     * Opposite to {@link #groups()} this annotation gives control over order of fields in a group index.
-     * This can be needed in scenarios when we have a query like
-     * {@code select * from X where a = ? and b = ? order by b desc}. If we have index {@code (a asc, b asc)}
-     * sorting on {@code b} will be performed. Here it is preferable to have index {@code (b desc, a asc)}
-     * which will still allow query to search on index using both fields and avoid sorting because index
-     * is already sorted in needed way.
-     *
-     * @see #groups()
-     * @see #orderedGroups()
-     */
-    @Retention(RetentionPolicy.RUNTIME)
-    @Target({ElementType.METHOD, ElementType.FIELD})
-    @SuppressWarnings("PublicInnerClass")
-    public static @interface Group {
-        /**
-         * Group index name where this field participate.
-         *
-         * @return Group index name
-         */
-        String name();
-
-        /**
-         * Fields in this group index will be sorted on this attribute.
-         *
-         * @return Order number.
-         */
-        int order();
-
-        /**
-         * Defines sorting order for this field in group.
-         *
-         * @return True if field will be in descending order.
-         */
-        boolean descending() default false;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQuerySqlFunction.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQuerySqlFunction.java b/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQuerySqlFunction.java
deleted file mode 100644
index 2fd11f4..0000000
--- a/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQuerySqlFunction.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.cache.query;
-
-import java.lang.annotation.*;
-
-/**
- * Annotates public static methods in classes to be used in SQL queries as custom functions.
- * Annotated class must be registered in H2 indexing SPI using following method
- * {@link org.apache.ignite.configuration.IgniteQueryConfiguration#setIndexCustomFunctionClasses(Class[])}.
- * <p>
- * Example usage:
- * <pre name="code" class="java">
- *     public class MyFunctions {
- *         &#64;CacheQuerySqlFunction
- *         public static int sqr(int x) {
- *             return x * x;
- *         }
- *     }
- *
- *     // Register.
- *     indexing.setIndexCustomFunctionClasses(MyFunctions.class);
- *
- *     // And use in queries.
- *     cache.queries().createSqlFieldsQuery("select sqr(2) where sqr(1) = 1");
- * </pre>
- * <p>
- * For more information about H2 custom functions please refer to
- * <a href="http://www.h2database.com/html/features.html#user_defined_functions">H2 documentation</a>.
- */
-@Documented
-@Retention(RetentionPolicy.RUNTIME)
-@Target(ElementType.METHOD)
-public @interface CacheQuerySqlFunction {
-    /**
-     * Specifies alias for the function to be used form SQL queries.
-     * If no alias provided method name will be used.
-     *
-     * @return Alias for function.
-     */
-    String alias() default "";
-
-    /**
-     * Specifies if the function is deterministic (result depends only on input parameters).
-     * <p>
-     * Deterministic function is a function which always returns the same result
-     * assuming that input parameters are the same.
-     *
-     * @return {@code true} If function is deterministic, {@code false} otherwise.
-     */
-    boolean deterministic() default false;
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueryTextField.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueryTextField.java b/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueryTextField.java
deleted file mode 100644
index d48cc23..0000000
--- a/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueryTextField.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.cache.query;
-
-import java.lang.annotation.*;
-
-/**
- * Annotation for fields or getters to be indexed for full text
- * search using {@code H2 TEXT} indexing. For more information
- * refer to {@link CacheQuery} documentation.
- * @see CacheQuery
- */
-@Documented
-@Retention(RetentionPolicy.RUNTIME)
-@Target({ElementType.METHOD, ElementType.FIELD, ElementType.TYPE})
-public @interface CacheQueryTextField {
-    // No-op.
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueryType.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueryType.java b/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueryType.java
deleted file mode 100644
index a418cfd..0000000
--- a/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueryType.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.cache.query;
-
-/**
- * Cache query type.
- * <p>
- * Used in {@link org.apache.ignite.events.IgniteCacheQueryExecutedEvent} and {@link org.apache.ignite.events.IgniteCacheQueryReadEvent}
- * to identify the type of query for which an event was fired.
- *
- * @see org.apache.ignite.events.IgniteCacheQueryExecutedEvent#queryType()
- * @see org.apache.ignite.events.IgniteCacheQueryReadEvent#queryType()
- */
-public enum CacheQueryType {
-    /** SQL query. */
-    SQL,
-
-    /** SQL fields query. */
-    SQL_FIELDS,
-
-    /** Full text query. */
-    FULL_TEXT,
-
-    /** Scan query. */
-    SCAN,
-
-    /** Continuous query. */
-    CONTINUOUS,
-
-    /** SPI query. */
-    SPI
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueryTypeMetadata.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueryTypeMetadata.java b/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueryTypeMetadata.java
deleted file mode 100644
index 7b0afff..0000000
--- a/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueryTypeMetadata.java
+++ /dev/null
@@ -1,196 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.cache.query;
-
-import org.apache.ignite.lang.*;
-import org.apache.ignite.internal.util.tostring.*;
-import org.apache.ignite.internal.util.typedef.internal.*;
-
-import java.util.*;
-
-/**
- * Cache query type metadata.
- */
-public class CacheQueryTypeMetadata {
-    /** Type name, e.g. class name. */
-    @GridToStringInclude
-    private String type;
-
-    /** Fields to be queried, in addition to indexed fields. */
-    @GridToStringInclude
-    private Map<String, Class<?>> qryFlds = new HashMap<>();
-
-    /** Fields to index in ascending order. */
-    @GridToStringInclude
-    private Map<String, Class<?>> ascFlds = new HashMap<>();
-
-    /** Fields to index in descending order. */
-    @GridToStringInclude
-    private Map<String, Class<?>> descFlds = new HashMap<>();
-
-    /** Fields to index as text. */
-    @GridToStringInclude
-    private Collection<String> txtFlds = new LinkedHashSet<>();
-
-    /** Fields to create group indexes for. */
-    @GridToStringInclude
-    private Map<String, LinkedHashMap<String, IgniteBiTuple<Class<?>, Boolean>>> grps;
-
-    /**
-     * Default constructor.
-     */
-    public CacheQueryTypeMetadata() {
-        // No-op.
-    }
-
-    /**
-     *
-     */
-    public CacheQueryTypeMetadata(CacheQueryTypeMetadata src) {
-        type = src.getType();
-
-        qryFlds = new HashMap<>(src.getQueryFields());
-        ascFlds = new HashMap<>(src.getAscendingFields());
-        descFlds = new HashMap<>(src.getDescendingFields());
-        txtFlds = new HashSet<>(src.getTextFields());
-
-        grps = new HashMap<>(src.getGroups());
-    }
-
-    /**
-     * Gets type (e.g. class name).
-     *
-     * @return Type name.
-     */
-    public String getType() {
-        return type;
-    }
-
-    /**
-     * Sets type.
-     *
-     * @param cls Type class.
-     */
-    public void setType(Class<?> cls) {
-        setType(cls.getName());
-    }
-
-    /**
-     * Sets type.
-     *
-     * @param type Type name.
-     */
-    public void setType(String type) {
-        this.type = type;
-    }
-
-    /**
-     * Gets query-enabled fields.
-     *
-     * @return Collection of fields available for query.
-     */
-    public Map<String, Class<?>> getQueryFields() {
-        return qryFlds;
-    }
-
-    /**
-     * Sets query fields map.
-     *
-     * @param qryFlds Query fields.
-     */
-    public void setQueryFields(Map<String, Class<?>> qryFlds) {
-        this.qryFlds = qryFlds;
-    }
-
-    /**
-     * Gets ascending-indexed fields.
-     *
-     * @return Map of ascending-indexed fields.
-     */
-    public Map<String, Class<?>> getAscendingFields() {
-        return ascFlds;
-    }
-
-    /**
-     * Sets ascending-indexed fields.
-     *
-     * @param ascFlds Map of ascending-indexed fields.
-     */
-    public void setAscendingFields(Map<String, Class<?>> ascFlds) {
-        this.ascFlds = ascFlds;
-    }
-
-    /**
-     * Gets descending-indexed fields.
-     *
-     * @return Map of descending-indexed fields.
-     */
-    public Map<String, Class<?>> getDescendingFields() {
-        return descFlds;
-    }
-
-    /**
-     * Sets descending-indexed fields.
-     *
-     * @param descFlds Map of descending-indexed fields.
-     */
-    public void setDescendingFields(Map<String, Class<?>> descFlds) {
-        this.descFlds = descFlds;
-    }
-
-    /**
-     * Gets text-indexed fields.
-     *
-     * @return Collection of text indexed fields.
-     */
-    public Collection<String> getTextFields() {
-        return txtFlds;
-    }
-
-    /**
-     * Sets text-indexed fields.
-     *
-     * @param txtFlds Text-indexed fields.
-     */
-    public void setTextFields(Collection<String> txtFlds) {
-        this.txtFlds = txtFlds;
-    }
-
-    /**
-     * Gets group-indexed fields.
-     *
-     * @return Map of group-indexed fields.
-     */
-    public Map<String, LinkedHashMap<String, IgniteBiTuple<Class<?>, Boolean>>> getGroups() {
-        return grps;
-    }
-
-    /**
-     * Sets group-indexed fields.
-     *
-     * @param grps Map of group-indexed fields from index name to index fields.
-     */
-    public void setGroups(Map<String, LinkedHashMap<String, IgniteBiTuple<Class<?>, Boolean>>> grps) {
-        this.grps = grps;
-    }
-
-    /** {@inheritDoc} */
-    @Override public String toString() {
-        return S.toString(CacheQueryTypeMetadata.class, this);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueryTypeResolver.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueryTypeResolver.java b/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueryTypeResolver.java
deleted file mode 100644
index 9fea55e..0000000
--- a/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueryTypeResolver.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.cache.query;
-
-/**
- * Interface allowing to override table name for portable objects stored in cache.
- */
-public interface CacheQueryTypeResolver {
-    /**
-     * Allows to override type name for portable objects being stored in cache.
-     *
-     * @param key Key.
-     * @param val Value.
-     * @return Type name.
-     */
-    public String resolveTypeName(Object key, Object val);
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/main/java/org/apache/ignite/cache/query/QueryConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/query/QueryConfiguration.java b/modules/core/src/main/java/org/apache/ignite/cache/query/QueryConfiguration.java
new file mode 100644
index 0000000..960c729
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/cache/query/QueryConfiguration.java
@@ -0,0 +1,203 @@
+/*
+ * 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.cache.query;
+
+import java.io.*;
+import java.util.*;
+
+/**
+ * Query configuration object.
+ */
+public class QueryConfiguration implements Serializable {
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /** Collection of query type metadata. */
+    private Collection<QueryTypeMetadata> typeMeta;
+
+    /** Query type resolver. */
+    private QueryTypeResolver typeRslvr;
+
+    /** */
+    private boolean idxPrimitiveKey;
+
+    /** */
+    private boolean idxPrimitiveVal;
+
+    /** */
+    private boolean idxFixedTyping;
+
+    /** */
+    private boolean escapeAll;
+
+    /**
+     * Default constructor.
+     */
+    public QueryConfiguration() {
+        // No-op.
+    }
+
+    /**
+     * @param cfg Configuration to copy.
+     */
+    public QueryConfiguration(QueryConfiguration cfg) {
+        typeMeta = cfg.getTypeMetadata();
+        typeRslvr = cfg.getTypeResolver();
+        idxPrimitiveKey = cfg.isIndexPrimitiveKey();
+        idxPrimitiveVal = cfg.isIndexPrimitiveValue();
+        idxFixedTyping = cfg.isIndexFixedTyping();
+        escapeAll = cfg.isEscapeAll();
+    }
+
+    /**
+     * Gets collection of query type metadata objects.
+     *
+     * @return Collection of query type metadata.
+     */
+    public Collection<QueryTypeMetadata> getTypeMetadata() {
+        return typeMeta;
+    }
+
+    /**
+     * Sets collection of query type metadata objects.
+     *
+     * @param typeMeta Collection of query type metadata.
+     */
+    public void setTypeMetadata(Collection<QueryTypeMetadata> typeMeta) {
+        this.typeMeta = typeMeta;
+    }
+
+    /**
+     * Gets query type resolver.
+     *
+     * @return Query type resolver.
+     */
+    public QueryTypeResolver getTypeResolver() {
+        return typeRslvr;
+    }
+
+    /**
+     * Sets query type resolver.
+     *
+     * @param typeRslvr Query type resolver.
+     */
+    public void setTypeResolver(QueryTypeResolver typeRslvr) {
+        this.typeRslvr = typeRslvr;
+    }
+
+    /**
+     * Gets flag indicating whether SQL engine should index by key in cases
+     * where key is primitive type
+     *
+     * @return {@code True} if primitive keys should be indexed.
+     */
+    public boolean isIndexPrimitiveKey() {
+        return idxPrimitiveKey;
+    }
+
+    /**
+     * Sets flag indicating whether SQL engine should index by key in cases
+     * where key is primitive type.
+     *
+     * @param idxPrimitiveKey {@code True} if primitive keys should be indexed.
+     */
+    public void setIndexPrimitiveKey(boolean idxPrimitiveKey) {
+        this.idxPrimitiveKey = idxPrimitiveKey;
+    }
+
+    /**
+     * Gets flag indicating whether SQL engine should index by value in cases
+     * where value is primitive type
+     *
+     * @return {@code True} if primitive values should be indexed.
+     */
+    public boolean isIndexPrimitiveValue() {
+        return idxPrimitiveVal;
+    }
+
+    /**
+     * Sets flag indexing whether SQL engine should index by value in cases
+     * where value is primitive type.
+     *
+     * @param idxPrimitiveVal {@code True} if primitive values should be indexed.
+     */
+    public void setIndexPrimitiveValue(boolean idxPrimitiveVal) {
+        this.idxPrimitiveVal = idxPrimitiveVal;
+    }
+
+    /**
+     * This flag essentially controls whether all values of the same type have
+     * identical key type.
+     * <p>
+     * If {@code false}, SQL engine will store all keys in BINARY form to make it possible to store
+     * the same value type with different key types. If {@code true}, key type will be converted
+     * to respective SQL type if it is possible, hence, improving performance of queries.
+     * <p>
+     * Setting this value to {@code false} also means that {@code '_key'} column cannot be indexed and
+     * cannot participate in query where clauses. The behavior of using '_key' column in where
+     * clauses with this flag set to {@code false} is undefined.
+     *
+     * @return {@code True} if SQL engine should try to convert values to their respective SQL
+     *      types for better performance.
+     */
+    public boolean isIndexFixedTyping() {
+        return idxFixedTyping;
+    }
+
+    /**
+     * This flag essentially controls whether key type is going to be identical
+     * for all values of the same type.
+     * <p>
+     * If false, SQL engine will store all keys in BINARY form to make it possible to store
+     * the same value type with different key types. If true, key type will be converted
+     * to respective SQL type if it is possible, which may provide significant performance
+     * boost.
+     *
+     * @param idxFixedTyping {@code True} if SQL engine should try to convert values to their respective SQL
+     *      types for better performance.
+     */
+    public void setIndexFixedTyping(boolean idxFixedTyping) {
+        this.idxFixedTyping = idxFixedTyping;
+    }
+
+    /**
+     * If {@code true}, then table name and all column names in 'create table' SQL
+     * generated for SQL engine are escaped with double quotes. This flag should be set if table name of
+     * column name is H2 reserved word or is not valid H2 identifier (e.g. contains space or hyphen).
+     * <p>
+     * Note if this flag is set then table and column name in SQL queries also must be escaped with double quotes.
+
+     * @return Flag value.
+     */
+    public boolean isEscapeAll() {
+        return escapeAll;
+    }
+
+    /**
+     * If {@code true}, then table name and all column names in 'create table' SQL
+     * generated for SQL engine are escaped with double quotes. This flag should be set if table name of
+     * column name is H2 reserved word or is not valid H2 identifier (e.g. contains space or hyphen).
+     * <p>
+     * Note if this flag is set then table and column name in SQL queries also must be escaped with double quotes.
+
+     * @param escapeAll Flag value.
+     */
+    public void setEscapeAll(boolean escapeAll) {
+        this.escapeAll = escapeAll;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/main/java/org/apache/ignite/cache/query/QueryContinuousPredicate.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/query/QueryContinuousPredicate.java b/modules/core/src/main/java/org/apache/ignite/cache/query/QueryContinuousPredicate.java
index eca11c3..ad96b35 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/query/QueryContinuousPredicate.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/query/QueryContinuousPredicate.java
@@ -104,7 +104,7 @@ import javax.cache.event.*;
  * qry.cancel();
  * </pre>
  * Note that one query instance can be executed only once. After it's cancelled, it's non-operational.
- * If you need to repeat execution, use {@link CacheQueries#createContinuousQuery()} method to create
+ * If you need to repeat execution, use {@link org.apache.ignite.internal.processors.cache.query.CacheQueries#createContinuousQuery()} method to create
  * new query.
  */
 // TODO: make class.
@@ -197,7 +197,7 @@ public final class QueryContinuousPredicate<K, V> extends QueryPredicate<K, V> i
     /**
      * Stops continuous query execution. <p> Note that one query instance can be executed only once. After it's
      * cancelled, it's non-operational. If you need to repeat execution, use {@link
-     * CacheQueries#createContinuousQuery()} method to create new query.
+     * org.apache.ignite.internal.processors.cache.query.CacheQueries#createContinuousQuery()} method to create new query.
      *
      * @throws IgniteCheckedException In case of error.
      */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/main/java/org/apache/ignite/cache/query/QueryMetrics.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/query/QueryMetrics.java b/modules/core/src/main/java/org/apache/ignite/cache/query/QueryMetrics.java
new file mode 100644
index 0000000..94e890c
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/cache/query/QueryMetrics.java
@@ -0,0 +1,60 @@
+/*
+ * 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.cache.query;
+
+/**
+ * Cache query metrics used to obtain statistics on query. You can get metrics for
+ * particular query via {@link org.apache.ignite.internal.processors.cache.query.CacheQuery#metrics()} method or accumulated metrics
+ * for all queries via {@link org.apache.ignite.internal.processors.cache.query.CacheQueries#metrics()}.
+ */
+public interface QueryMetrics {
+    /**
+     * Gets minimum execution time of query.
+     *
+     * @return Minimum execution time of query.
+     */
+    public long minimumTime();
+
+    /**
+     * Gets maximum execution time of query.
+     *
+     * @return Maximum execution time of query.
+     */
+    public long maximumTime();
+
+    /**
+     * Gets average execution time of query.
+     *
+     * @return Average execution time of query.
+     */
+    public double averageTime();
+
+    /**
+     * Gets total number execution of query.
+     *
+     * @return Number of executions.
+     */
+    public int executions();
+
+    /**
+     * Gets total number of times a query execution failed.
+     *
+     * @return Total number of times a query execution failed.
+     */
+    public int fails();
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/main/java/org/apache/ignite/cache/query/QueryReducer.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/query/QueryReducer.java b/modules/core/src/main/java/org/apache/ignite/cache/query/QueryReducer.java
index a01f4a9..376cd77 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/query/QueryReducer.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/query/QueryReducer.java
@@ -18,13 +18,24 @@
 package org.apache.ignite.cache.query;
 
 /**
- * TODO: Add class description.
- *
- * @author @java.author
- * @version @java.version
+ * Remote query result reducer. Collects data entries and can produce multiple
+ * results.
  */
 public interface QueryReducer<T, R> {
+    /**
+     * Collect next data entry.
+     *
+     * @param entry Data entry.
+     * @return {@code -1} If iteration over data set must be stopped and no result must be asked from the reducer,
+     *  {@code 0} if one of intermediate result is ready but iteration must continue if more data available,
+     *  {@code 1} if result is not ready and iteration must continue if more data available.
+     */
     public int collect(T entry);
 
+    /**
+     * Get reduce result (possibly intermediate).
+     *
+     * @return Result of reduction.
+     */
     public R reduce();
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/main/java/org/apache/ignite/cache/query/QueryTypeMetadata.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/query/QueryTypeMetadata.java b/modules/core/src/main/java/org/apache/ignite/cache/query/QueryTypeMetadata.java
new file mode 100644
index 0000000..51c7736
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/cache/query/QueryTypeMetadata.java
@@ -0,0 +1,196 @@
+/*
+ * 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.cache.query;
+
+import org.apache.ignite.lang.*;
+import org.apache.ignite.internal.util.tostring.*;
+import org.apache.ignite.internal.util.typedef.internal.*;
+
+import java.util.*;
+
+/**
+ * Cache query type metadata.
+ */
+public class QueryTypeMetadata {
+    /** Type name, e.g. class name. */
+    @GridToStringInclude
+    private String type;
+
+    /** Fields to be queried, in addition to indexed fields. */
+    @GridToStringInclude
+    private Map<String, Class<?>> qryFlds = new HashMap<>();
+
+    /** Fields to index in ascending order. */
+    @GridToStringInclude
+    private Map<String, Class<?>> ascFlds = new HashMap<>();
+
+    /** Fields to index in descending order. */
+    @GridToStringInclude
+    private Map<String, Class<?>> descFlds = new HashMap<>();
+
+    /** Fields to index as text. */
+    @GridToStringInclude
+    private Collection<String> txtFlds = new LinkedHashSet<>();
+
+    /** Fields to create group indexes for. */
+    @GridToStringInclude
+    private Map<String, LinkedHashMap<String, IgniteBiTuple<Class<?>, Boolean>>> grps;
+
+    /**
+     * Default constructor.
+     */
+    public QueryTypeMetadata() {
+        // No-op.
+    }
+
+    /**
+     *
+     */
+    public QueryTypeMetadata(QueryTypeMetadata src) {
+        type = src.getType();
+
+        qryFlds = new HashMap<>(src.getQueryFields());
+        ascFlds = new HashMap<>(src.getAscendingFields());
+        descFlds = new HashMap<>(src.getDescendingFields());
+        txtFlds = new HashSet<>(src.getTextFields());
+
+        grps = new HashMap<>(src.getGroups());
+    }
+
+    /**
+     * Gets type (e.g. class name).
+     *
+     * @return Type name.
+     */
+    public String getType() {
+        return type;
+    }
+
+    /**
+     * Sets type.
+     *
+     * @param cls Type class.
+     */
+    public void setType(Class<?> cls) {
+        setType(cls.getName());
+    }
+
+    /**
+     * Sets type.
+     *
+     * @param type Type name.
+     */
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    /**
+     * Gets query-enabled fields.
+     *
+     * @return Collection of fields available for query.
+     */
+    public Map<String, Class<?>> getQueryFields() {
+        return qryFlds;
+    }
+
+    /**
+     * Sets query fields map.
+     *
+     * @param qryFlds Query fields.
+     */
+    public void setQueryFields(Map<String, Class<?>> qryFlds) {
+        this.qryFlds = qryFlds;
+    }
+
+    /**
+     * Gets ascending-indexed fields.
+     *
+     * @return Map of ascending-indexed fields.
+     */
+    public Map<String, Class<?>> getAscendingFields() {
+        return ascFlds;
+    }
+
+    /**
+     * Sets ascending-indexed fields.
+     *
+     * @param ascFlds Map of ascending-indexed fields.
+     */
+    public void setAscendingFields(Map<String, Class<?>> ascFlds) {
+        this.ascFlds = ascFlds;
+    }
+
+    /**
+     * Gets descending-indexed fields.
+     *
+     * @return Map of descending-indexed fields.
+     */
+    public Map<String, Class<?>> getDescendingFields() {
+        return descFlds;
+    }
+
+    /**
+     * Sets descending-indexed fields.
+     *
+     * @param descFlds Map of descending-indexed fields.
+     */
+    public void setDescendingFields(Map<String, Class<?>> descFlds) {
+        this.descFlds = descFlds;
+    }
+
+    /**
+     * Gets text-indexed fields.
+     *
+     * @return Collection of text indexed fields.
+     */
+    public Collection<String> getTextFields() {
+        return txtFlds;
+    }
+
+    /**
+     * Sets text-indexed fields.
+     *
+     * @param txtFlds Text-indexed fields.
+     */
+    public void setTextFields(Collection<String> txtFlds) {
+        this.txtFlds = txtFlds;
+    }
+
+    /**
+     * Gets group-indexed fields.
+     *
+     * @return Map of group-indexed fields.
+     */
+    public Map<String, LinkedHashMap<String, IgniteBiTuple<Class<?>, Boolean>>> getGroups() {
+        return grps;
+    }
+
+    /**
+     * Sets group-indexed fields.
+     *
+     * @param grps Map of group-indexed fields from index name to index fields.
+     */
+    public void setGroups(Map<String, LinkedHashMap<String, IgniteBiTuple<Class<?>, Boolean>>> grps) {
+        this.grps = grps;
+    }
+
+    /** {@inheritDoc} */
+    @Override public String toString() {
+        return S.toString(QueryTypeMetadata.class, this);
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/main/java/org/apache/ignite/cache/query/QueryTypeResolver.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/query/QueryTypeResolver.java b/modules/core/src/main/java/org/apache/ignite/cache/query/QueryTypeResolver.java
new file mode 100644
index 0000000..f8bb017
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/cache/query/QueryTypeResolver.java
@@ -0,0 +1,32 @@
+/*
+ * 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.cache.query;
+
+/**
+ * Interface allowing to override table name for portable objects stored in cache.
+ */
+public interface QueryTypeResolver {
+    /**
+     * Allows to override type name for portable objects being stored in cache.
+     *
+     * @param key Key.
+     * @param val Value.
+     * @return Type name.
+     */
+    public String resolveTypeName(Object key, Object val);
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/main/java/org/apache/ignite/cache/query/annotations/QueryGroupIndex.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/query/annotations/QueryGroupIndex.java b/modules/core/src/main/java/org/apache/ignite/cache/query/annotations/QueryGroupIndex.java
index a4a8dfc..9c756c4 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/query/annotations/QueryGroupIndex.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/query/annotations/QueryGroupIndex.java
@@ -33,15 +33,6 @@ public @interface QueryGroupIndex {
     String name();
 
     /**
-     * If this index is unique.
-     *
-     * @return True if this index is unique, false otherwise.
-     * @deprecated No longer supported, will be ignored.
-     */
-    @Deprecated
-    boolean unique() default false;
-
-    /**
      * List of group indexes for type.
      */
     @SuppressWarnings("PublicInnerClass")

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/main/java/org/apache/ignite/cache/query/annotations/QuerySqlField.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/query/annotations/QuerySqlField.java b/modules/core/src/main/java/org/apache/ignite/cache/query/annotations/QuerySqlField.java
index c5f858b..0dfa7de 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/query/annotations/QuerySqlField.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/query/annotations/QuerySqlField.java
@@ -21,8 +21,8 @@ import java.lang.annotation.*;
 
 /**
  * Annotates fields for SQL queries. All fields that will be involved in SQL clauses must have
- * this annotation. For more information about cache queries see {@link org.apache.ignite.cache.query.CacheQuery} documentation.
- * @see org.apache.ignite.cache.query.CacheQuery
+ * this annotation. For more information about cache queries see {@link org.apache.ignite.internal.processors.cache.query.CacheQuery} documentation.
+ * @see org.apache.ignite.internal.processors.cache.query.CacheQuery
  */
 @Documented
 @Retention(RetentionPolicy.RUNTIME)
@@ -42,16 +42,6 @@ public @interface QuerySqlField {
     boolean index() default false;
 
     /**
-     * Specifies whether index should be unique or not. This property only
-     * makes sense if {@link #index()} property is set to {@code true}.
-     *
-     * @return {@code True} if field index should be unique.
-     * @deprecated No longer supported, will be ignored.
-     */
-    @Deprecated
-    boolean unique() default false;
-
-    /**
      * Specifies whether index should be in descending order or not. This property only
      * makes sense if {@link #index()} property is set to {@code true}.
      *

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/main/java/org/apache/ignite/cache/query/annotations/QueryTextField.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/query/annotations/QueryTextField.java b/modules/core/src/main/java/org/apache/ignite/cache/query/annotations/QueryTextField.java
index 3015073..dbc6e22 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/query/annotations/QueryTextField.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/query/annotations/QueryTextField.java
@@ -22,8 +22,8 @@ import java.lang.annotation.*;
 /**
  * Annotation for fields or getters to be indexed for full text
  * search using {@code H2 TEXT} indexing. For more information
- * refer to {@link org.apache.ignite.cache.query.CacheQuery} documentation.
- * @see org.apache.ignite.cache.query.CacheQuery
+ * refer to {@link org.apache.ignite.internal.processors.cache.query.CacheQuery} documentation.
+ * @see org.apache.ignite.internal.processors.cache.query.CacheQuery
  */
 @Documented
 @Retention(RetentionPolicy.RUNTIME)

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/main/java/org/apache/ignite/configuration/IgniteQueryConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/IgniteQueryConfiguration.java b/modules/core/src/main/java/org/apache/ignite/configuration/IgniteQueryConfiguration.java
index d4a5e2f..0f2630d 100644
--- a/modules/core/src/main/java/org/apache/ignite/configuration/IgniteQueryConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/configuration/IgniteQueryConfiguration.java
@@ -123,7 +123,7 @@ public class IgniteQueryConfiguration {
     }
 
     /**
-     * Sets classes with methods annotated by {@link org.apache.ignite.cache.query.CacheQuerySqlFunction}
+     * Sets classes with methods annotated by {@link org.apache.ignite.cache.query.QuerySqlFunction}
      * to be used as user-defined functions from SQL queries.
      *
      * @param idxCustomFuncClss List of classes.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/main/java/org/apache/ignite/events/IgniteCacheQueryExecutedEvent.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/events/IgniteCacheQueryExecutedEvent.java b/modules/core/src/main/java/org/apache/ignite/events/IgniteCacheQueryExecutedEvent.java
index c580e51..476a5fc 100644
--- a/modules/core/src/main/java/org/apache/ignite/events/IgniteCacheQueryExecutedEvent.java
+++ b/modules/core/src/main/java/org/apache/ignite/events/IgniteCacheQueryExecutedEvent.java
@@ -19,6 +19,7 @@ package org.apache.ignite.events;
 
 import org.apache.ignite.cache.query.*;
 import org.apache.ignite.cluster.*;
+import org.apache.ignite.internal.processors.cache.query.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.internal.util.tostring.*;
 import org.apache.ignite.internal.util.typedef.internal.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/main/java/org/apache/ignite/events/IgniteCacheQueryReadEvent.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/events/IgniteCacheQueryReadEvent.java b/modules/core/src/main/java/org/apache/ignite/events/IgniteCacheQueryReadEvent.java
index dbf0b25..b872e85 100644
--- a/modules/core/src/main/java/org/apache/ignite/events/IgniteCacheQueryReadEvent.java
+++ b/modules/core/src/main/java/org/apache/ignite/events/IgniteCacheQueryReadEvent.java
@@ -19,6 +19,7 @@ package org.apache.ignite.events;
 
 import org.apache.ignite.cache.query.*;
 import org.apache.ignite.cluster.*;
+import org.apache.ignite.internal.processors.cache.query.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.internal.util.tostring.*;
 import org.apache.ignite.internal.util.typedef.internal.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheWeakQueryIteratorsHolder.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheWeakQueryIteratorsHolder.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheWeakQueryIteratorsHolder.java
index 902cf12..df96a5e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheWeakQueryIteratorsHolder.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheWeakQueryIteratorsHolder.java
@@ -18,7 +18,7 @@
 package org.apache.ignite.internal.processors.cache;
 
 import org.apache.ignite.*;
-import org.apache.ignite.cache.query.*;
+import org.apache.ignite.internal.processors.cache.query.*;
 import org.apache.ignite.internal.util.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import org.jdk8.backport.*;
@@ -34,7 +34,7 @@ public class CacheWeakQueryIteratorsHolder<V> {
     private final ReferenceQueue<WeakQueryFutureIterator> refQueue = new ReferenceQueue<>();
 
     /** Iterators futures. */
-    private final Map<WeakReference<WeakQueryFutureIterator>, CacheQueryFuture<V>> futs =
+    private final Map<WeakReference<WeakQueryFutureIterator>,CacheQueryFuture<V>> futs =
         new ConcurrentHashMap8<>();
 
     /** Logger. */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
index 3ed56c5..c6eaabb 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
@@ -21,7 +21,6 @@ import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.affinity.*;
 import org.apache.ignite.cache.datastructures.*;
-import org.apache.ignite.cache.query.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.compute.*;
 import org.apache.ignite.configuration.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
index 72b2505..fcf71a0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
@@ -19,7 +19,6 @@ package org.apache.ignite.internal.processors.cache;
 
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
-import org.apache.ignite.cache.query.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.cache.version.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
index a5b73dc..52c83ce 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
@@ -21,7 +21,6 @@ import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.affinity.*;
 import org.apache.ignite.cache.datastructures.*;
-import org.apache.ignite.cache.query.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.cache.version.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
index 33bc571..95da898 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
@@ -987,6 +987,12 @@ public class IgniteCacheProxy<K, V> extends IgniteAsyncSupportAdapter<IgniteCach
     }
 
     /** {@inheritDoc} */
+    @Override public QueryMetrics queryMetrics() {
+        // TODO IGNITE-1.
+        throw new UnsupportedOperationException();
+    }
+
+    /** {@inheritDoc} */
     @Override protected IgniteCache<K, V> createAsyncInstance() {
         return new IgniteCacheProxy<>(ctx, delegate, prj, true);
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetImpl.java
index 2bb679b..0b78b50 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetImpl.java
@@ -21,7 +21,6 @@ import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.affinity.*;
 import org.apache.ignite.cache.datastructures.*;
-import org.apache.ignite.cache.query.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.internal.processors.cache.*;
 import org.apache.ignite.internal.util.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQueries.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQueries.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQueries.java
new file mode 100644
index 0000000..ceac0f5
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQueries.java
@@ -0,0 +1,153 @@
+/*
+ * 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.cache.query;
+
+import org.apache.ignite.cache.query.*;
+import org.apache.ignite.internal.*;
+import org.apache.ignite.lang.*;
+import org.jetbrains.annotations.*;
+
+import java.util.*;
+
+/**
+ * Facade for creating distributed queries. It contains various {@code 'createXxxQuery(..)'}
+ * methods for {@code SQL}, {@code TEXT}, and {@code SCAN} query creation (see {@link CacheQuery}
+ * for more information).
+ * <p>
+ * Instance of {@code CacheQueries} is obtained from cache projection as follows:
+ * <pre name="code" class="java">
+ * CacheQueries q = GridGain.grid().cache("myCache").queries();
+ * </pre>
+ */
+public interface CacheQueries<K, V> {
+    /**
+     * Creates user's SQL query, queried class, and query clause which is generally
+     * a where clause. For more information refer to {@link CacheQuery} documentation.
+     *
+     * @param cls Query class.
+     * @param clause Query clause.
+     * @return Created query.
+     */
+    public CacheQuery<Map.Entry<K, V>> createSqlQuery(Class<?> cls, String clause);
+
+    /**
+     * Creates user's SQL query, queried class, and query clause which is generally
+     * a where clause. For more information refer to {@link CacheQuery} documentation.
+     *
+     * @param clsName Query class name.
+     * @param clause Query clause.
+     * @return Created query.
+     */
+    public CacheQuery<Map.Entry<K, V>> createSqlQuery(String clsName, String clause);
+
+    /**
+     * Creates user's SQL fields query for given clause. For more information refer to
+     * {@link CacheQuery} documentation.
+     *
+     * @param qry Query.
+     * @return Created query.
+     */
+    public CacheQuery<List<?>> createSqlFieldsQuery(String qry);
+
+    /**
+     * Creates user's full text query, queried class, and query clause.
+     * For more information refer to {@link CacheQuery} documentation.
+     *
+     * @param clsName Query class name.
+     * @param search Search clause.
+     * @return Created query.
+     */
+    public CacheQuery<Map.Entry<K, V>> createFullTextQuery(String clsName, String search);
+
+    /**
+     * Creates user's full text query, queried class, and query clause.
+     * For more information refer to {@link CacheQuery} documentation.
+     *
+     * @param cls Query class.
+     * @param search Search clause.
+     * @return Created query.
+     */
+    public CacheQuery<Map.Entry<K, V>> createFullTextQuery(Class<?> cls, String search);
+
+    /**
+     * Creates user's predicate based scan query.
+     *
+     * @param filter Scan filter.
+     * @return Created query.
+     */
+    public CacheQuery<Map.Entry<K, V>> createScanQuery(@Nullable IgniteBiPredicate<K, V> filter);
+
+    /**
+     * Creates new continuous query.
+     * <p>
+     * For more information refer to {@link org.apache.ignite.cache.query.CacheContinuousQuery} documentation.
+     *
+     * @return Created continuous query.
+     * @see org.apache.ignite.cache.query.CacheContinuousQuery
+     */
+    public CacheContinuousQuery<K, V> createContinuousQuery();
+
+    /**
+     * Forces this cache to rebuild all search indexes of given value type. Sometimes indexes
+     * may hold references to objects that have already been removed from cache. Although
+     * not affecting query results, these objects may consume extra memory. Rebuilding
+     * indexes will remove any redundant references that may have temporarily got stuck
+     * inside in-memory index.
+     *
+     * @param cls Value type to rebuild indexes for.
+     *
+     * @return Future that will be completed when rebuilding of all indexes is finished.
+     */
+    public IgniteInternalFuture<?> rebuildIndexes(Class<?> cls);
+
+    /**
+     * Forces this cache to rebuild all search indexes of given value type. Sometimes indexes
+     * may hold references to objects that have already been removed from cache. Although
+     * not affecting query results, these objects may consume extra memory. Rebuilding
+     * indexes will remove any redundant references that may have temporarily got stuck
+     * inside in-memory index.
+     *
+     * @param typeName Value type name to rebuild indexes for.
+     *
+     * @return Future that will be completed when rebuilding of all indexes is finished.
+     */
+    public IgniteInternalFuture<?> rebuildIndexes(String typeName);
+
+    /**
+     * Forces this cache to rebuild search indexes of all types. Sometimes indexes
+     * may hold references to objects that have already been removed from cache. Although
+     * not affecting query results, these objects may consume extra memory. Rebuilding
+     * indexes will remove any redundant references that may have temporarily got stuck
+     * inside in-memory index.
+     *
+     * @return Future that will be completed when rebuilding of all indexes is finished.
+     */
+    public IgniteInternalFuture<?> rebuildAllIndexes();
+
+    /**
+     * Accumulated metrics for all queries executed for this cache.
+     *
+     * @return Cache query metrics.
+     */
+    public QueryMetrics metrics();
+
+    /**
+     * Resets accumulated metrics.
+     */
+    public void resetMetrics();
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQuery.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQuery.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQuery.java
new file mode 100644
index 0000000..0468b93
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQuery.java
@@ -0,0 +1,295 @@
+/*
+ * 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.cache.query;
+
+import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cluster.*;
+import org.apache.ignite.lang.*;
+import org.jetbrains.annotations.*;
+
+/**
+ * Main API for configuring and executing cache queries.
+ * <p>
+ * Cache queries are created from {@link CacheQueries} API via any of the available
+ * {@code createXXXQuery(...)} methods.
+ * <h1 class="header">SQL Queries</h1>
+ * {@code SQL} query allows to execute distributed cache
+ * queries using standard SQL syntax. All values participating in where clauses
+ * or joins must be annotated with {@link QuerySqlField} annotation. Query can be created
+ * with {@link CacheQueries#createSqlQuery(Class, String)} method.
+ * <h2 class="header">Field Queries</h2>
+ * By default {@code select} clause is ignored as query result contains full objects.
+ * If it is needed to select individual fields, use {@link CacheQueries#createSqlFieldsQuery(String)} method.
+ * This type of query replaces full objects with individual fields. Note that selected fields
+ * must be annotated with {@link QuerySqlField} annotation.
+ * <h2 class="header">Cross-Cache Queries</h2>
+ * You are allowed to query data from several caches. Cache that this query was created on is
+ * treated as default schema in this case. Other caches can be referenced by their names.
+ * <p>
+ * Note that cache name is case sensitive and has to always be specified in double quotes.
+ * Here is an example of cross cache query (note that 'replicated' and 'partitioned' are
+ * cache names for replicated and partitioned caches accordingly):
+ * <pre name="code" class="java">
+ * CacheQuery&lt;Map.Entry&lt;Integer, FactPurchase&gt;&gt; storePurchases = cache.queries().createSqlQuery(
+ *     Purchase.class,
+ *     "from \"replicated\".Store, \"partitioned\".Purchase where Store.id=Purchase.storeId and Store.id=?");
+ * </pre>
+ * <h2 class="header">Custom functions in SQL queries.</h2>
+ * It is possible to write custom Java methods and call then form SQL queries. These methods must be public static
+ * and annotated with {@link QuerySqlFunction}. Classes containing these methods must be registered in
+ * {@link org.apache.ignite.configuration.IgniteQueryConfiguration#setIndexCustomFunctionClasses(Class[])}.
+ * <h1 class="header">Full Text Queries</h1>
+ * GridGain supports full text queries based on Apache Lucene engine. This queries are created by
+ * {@link CacheQueries#createFullTextQuery(Class, String)} method. Note that all fields that
+ * are expected to show up in text query results must be annotated with {@link QueryTextField}
+ * annotation.
+ * <h1 class="header">Scan Queries</h1>
+ * Sometimes when it is known in advance that SQL query will cause a full data scan, or whenever data set
+ * is relatively small, the full scan query may be used. This query will iterate over all cache
+ * entries, skipping over entries that don't pass the optionally provided key-value filter
+ * (see {@link CacheQueries#createScanQuery(org.apache.ignite.lang.IgniteBiPredicate)} method).
+ * <h2 class="header">Limitations</h2>
+ * Data in GridGain cache is usually distributed across several nodes,
+ * so some queries may not work as expected. Keep in mind following limitations
+ * (not applied if data is queried from one node only):
+ * <ul>
+ *     <li>
+ *         {@code Group by} and {@code sort by} statements are applied separately
+ *         on each node, so result set will likely be incorrectly grouped or sorted
+ *         after results from multiple remote nodes are grouped together.
+ *     </li>
+ *     <li>
+ *         Aggregation functions like {@code sum}, {@code max}, {@code avg}, etc.
+ *         are also applied on each node. Therefore you will get several results
+ *         containing aggregated values, one for each node.
+ *     </li>
+ *     <li>
+ *         Joins will work correctly only if joined objects are stored in
+ *         collocated mode or at least one side of the join is stored in
+ *         {@link org.apache.ignite.cache.CacheMode#REPLICATED} cache. Refer to
+ *         {@link org.apache.ignite.cache.affinity.CacheAffinityKey} javadoc for more information about colocation.
+ *     </li>
+ * </ul>
+ * <h1 class="header">Query usage</h1>
+ * As an example, suppose we have data model consisting of {@code 'Employee'} and {@code 'Organization'}
+ * classes defined as follows:
+ * <pre name="code" class="java">
+ * public class Organization {
+ *     // Indexed field.
+ *     &#64;CacheQuerySqlField(index = true)
+ *     private long id;
+ *
+ *     // Indexed field.
+ *     &#64;CacheQuerySqlField(index = true)
+ *     private String name;
+ *     ...
+ * }
+ *
+ * public class Person {
+ *     // Indexed field.
+ *     &#64;CacheQuerySqlField(index = true)
+ *     private long id;
+ *
+ *     // Indexed field (Organization ID, used as a foreign key).
+ *     &#64;CacheQuerySqlField(index = true)
+ *     private long orgId;
+ *
+ *     // Without SQL field annotation, this field cannot be used in queries.
+ *     private String name;
+ *
+ *     // Not indexed field.
+ *     &#64;CacheQuerySqlField
+ *     private double salary;
+ *
+ *     // Index for text search.
+ *     &#64;CacheQueryTextField
+ *     private String resume;
+ *     ...
+ * }
+ * </pre>
+ * Then you can create and execute queries that check various salary ranges like so:
+ * <pre name="code" class="java">
+ * Cache&lt;Long, Person&gt; cache = G.grid().cache();
+ * ...
+ * // Create query which selects salaries based on range for all employees
+ * // that work for a certain company.
+ * CacheQuery&lt;Map.Entry&lt;Long, Person&gt;&gt; qry = cache.queries().createSqlQuery(Person.class,
+ *     "from Person, Organization where Person.orgId = Organization.id " +
+ *         "and Organization.name = ? and Person.salary &gt; ? and Person.salary &lt;= ?");
+ *
+ * // Query all nodes to find all cached GridGain employees
+ * // with salaries less than 1000.
+ * qry.execute("GridGain", 0, 1000);
+ *
+ * // Query only remote nodes to find all remotely cached GridGain employees
+ * // with salaries greater than 1000 and less than 2000.
+ * qry.projection(grid.remoteProjection()).execute("GridGain", 1000, 2000);
+ * </pre>
+ * Here is a possible query that will use Lucene text search to scan all resumes to
+ * check if employees have {@code Master} degree:
+ * <pre name="code" class="java">
+ * CacheQuery&lt;Map.Entry&lt;Long, Person&gt;&gt; mastersQry =
+ *     cache.queries().createFullTextQuery(Person.class, "Master");
+ *
+ * // Query all cache nodes.
+ * mastersQry.execute();
+ * </pre>
+ * <h1 class="header">Geo-Spatial Indexes and Queries</h1>
+ * GridGain also support <b>Geo-Spatial Indexes</b>. Here is an example of geo-spatial index:
+ * <pre name="code" class="java">
+ * private class MapPoint implements Serializable {
+ *     // Geospatial index.
+ *     &#64;CacheQuerySqlField(index = true)
+ *     private com.vividsolutions.jts.geom.Point location;
+ *
+ *     // Not indexed field.
+ *     &#64;CacheQuerySqlField
+ *     private String name;
+ *
+ *     public MapPoint(com.vividsolutions.jts.geom.Point location, String name) {
+ *         this.location = location;
+ *         this.name = name;
+ *     }
+ * }
+ * </pre>
+ * Example of spatial query on the geo-indexed field from above:
+ * <pre name="code" class="java">
+ * com.vividsolutions.jts.geom.GeometryFactory factory = new com.vividsolutions.jts.geom.GeometryFactory();
+ *
+ * com.vividsolutions.jts.geom.Polygon square = factory.createPolygon(new Coordinate[] {
+ *     new com.vividsolutions.jts.geom.Coordinate(0, 0),
+ *     new com.vividsolutions.jts.geom.Coordinate(0, 100),
+ *     new com.vividsolutions.jts.geom.Coordinate(100, 100),
+ *     new com.vividsolutions.jts.geom.Coordinate(100, 0),
+ *     new com.vividsolutions.jts.geom.Coordinate(0, 0)
+ * });
+ *
+ * Map.Entry<String, UserData> records = cache.queries().createSqlQuery(MapPoint.class, "select * from MapPoint where location && ?")
+ *     .queryArguments(square)
+ *     .execute()
+ *     .get();
+ * </pre>
+ */
+public interface CacheQuery<T> {
+    /** Default query page size. */
+    public static final int DFLT_PAGE_SIZE = 1024;
+
+    /**
+     * Sets result page size. If not provided, {@link #DFLT_PAGE_SIZE} will be used.
+     * Results are returned from queried nodes one page at a tme.
+     *
+     * @param pageSize Page size.
+     * @return {@code this} query instance for chaining.
+     */
+    public CacheQuery<T> pageSize(int pageSize);
+
+    /**
+     * Sets query timeout. {@code 0} means there is no timeout (this
+     * is a default value).
+     *
+     * @param timeout Query timeout.
+     * @return {@code this} query instance for chaining.
+     */
+    public CacheQuery<T> timeout(long timeout);
+
+    /**
+     * Sets whether or not to keep all query results local. If not - only the current page
+     * is kept locally. Default value is {@code true}.
+     *
+     * @param keepAll Keep results or not.
+     * @return {@code this} query instance for chaining.
+     */
+    public CacheQuery<T> keepAll(boolean keepAll);
+
+    /**
+     * Sets whether or not to include backup entries into query result. This flag
+     * is {@code false} by default.
+     *
+     * @param incBackups Query {@code includeBackups} flag.
+     * @return {@code this} query instance for chaining.
+     */
+    public CacheQuery<T> includeBackups(boolean incBackups);
+
+    /**
+     * Sets whether or not to deduplicate query result set. If this flag is {@code true}
+     * then query result will not contain some key more than once even if several nodes
+     * returned entries with the same keys. Default value is {@code false}.
+     *
+     * @param dedup Query {@code enableDedup} flag.
+     * @return {@code this} query instance for chaining.
+     */
+    public CacheQuery<T> enableDedup(boolean dedup);
+
+    /**
+     * Sets optional grid projection to execute this query on.
+     *
+     * @param prj Projection.
+     * @return {@code this} query instance for chaining.
+     */
+    public CacheQuery<T> projection(ClusterGroup prj);
+
+    /**
+     * Executes the query and returns the query future. Caller may decide to iterate
+     * over the returned future directly in which case the iterator may block until
+     * the next value will become available, or wait for the whole query to finish
+     * by calling any of the {@code 'get(..)'} methods on the returned future. If
+     * {@link #keepAll(boolean)} flag is set to {@code false}, then {@code 'get(..)'}
+     * methods will only return the last page received, otherwise all pages will be
+     * accumulated and returned to user as a collection.
+     * <p>
+     * Note that if the passed in grid projection is a local node, then query
+     * will be executed locally without distribution to other nodes.
+     * <p>
+     * Also note that query state cannot be changed (clause, timeout etc.), except
+     * arguments, if this method was called at least once.
+     *
+     * @param args Optional arguments.
+     * @return Future for the query result.
+     */
+    public CacheQueryFuture<T> execute(@Nullable Object... args);
+
+    /**
+     * Executes the query the same way as {@link #execute(Object...)} method but reduces result remotely.
+     *
+     * @param rmtReducer Remote reducer.
+     * @param args Optional arguments.
+     * @return Future for the query result.
+     */
+    public <R> CacheQueryFuture<R> execute(IgniteReducer<T, R> rmtReducer, @Nullable Object... args);
+
+    /**
+     * Executes the query the same way as {@link #execute(Object...)} method but transforms result remotely.
+     *
+     * @param rmtTransform Remote transformer.
+     * @param args Optional arguments.
+     * @return Future for the query result.
+     */
+    public <R> CacheQueryFuture<R> execute(IgniteClosure<T, R> rmtTransform, @Nullable Object... args);
+
+    /**
+     * Gets metrics for this query.
+     *
+     * @return Query metrics.
+     */
+    public QueryMetrics metrics();
+
+    /**
+     * Resets metrics for this query.
+     */
+    public void resetMetrics();
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQueryFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQueryFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQueryFuture.java
new file mode 100644
index 0000000..b81f2e2
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQueryFuture.java
@@ -0,0 +1,66 @@
+/*
+ * 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.cache.query;
+
+import org.apache.ignite.*;
+import org.apache.ignite.internal.*;
+import org.jetbrains.annotations.*;
+
+import java.util.*;
+
+/**
+ * Cache query future returned by query execution.
+ * Refer to {@link CacheQuery} documentation for more information.
+ */
+public interface CacheQueryFuture<T> extends IgniteInternalFuture<Collection<T>> {
+    /**
+     * Returns number of elements that are already fetched and can
+     * be returned from {@link #next()} method without blocking.
+     *
+     * @return Number of fetched elements which are available immediately.
+     * @throws IgniteCheckedException In case of error.
+     */
+    public int available() throws IgniteCheckedException;
+
+    /**
+     * Returns next element from result set.
+     * <p>
+     * This is a blocking call which will wait if there are no
+     * elements available immediately.
+     *
+     * @return Next fetched element or {@code null} if all the elements have been fetched.
+     * @throws IgniteCheckedException If failed.
+     */
+    @Nullable public T next() throws IgniteCheckedException;
+
+    /**
+     * Checks if all data is fetched by the query.
+     *
+     * @return {@code True} if all data is fetched, {@code false} otherwise.
+     */
+    @Override public boolean isDone();
+
+    /**
+     * Cancels this query future and stop receiving any further results for the query
+     * associated with this future.
+     *
+     * @return {@inheritDoc}
+     * @throws IgniteCheckedException {@inheritDoc}
+     */
+    @Override public boolean cancel() throws IgniteCheckedException;
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQueryType.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQueryType.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQueryType.java
new file mode 100644
index 0000000..eab3e6d
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQueryType.java
@@ -0,0 +1,47 @@
+/*
+ * 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.cache.query;
+
+/**
+ * Cache query type.
+ * <p>
+ * Used in {@link org.apache.ignite.events.IgniteCacheQueryExecutedEvent} and {@link org.apache.ignite.events.IgniteCacheQueryReadEvent}
+ * to identify the type of query for which an event was fired.
+ *
+ * @see org.apache.ignite.events.IgniteCacheQueryExecutedEvent#queryType()
+ * @see org.apache.ignite.events.IgniteCacheQueryReadEvent#queryType()
+ */
+public enum CacheQueryType {
+    /** SQL query. */
+    SQL,
+
+    /** SQL fields query. */
+    SQL_FIELDS,
+
+    /** Full text query. */
+    FULL_TEXT,
+
+    /** Scan query. */
+    SCAN,
+
+    /** Continuous query. */
+    CONTINUOUS,
+
+    /** SPI query. */
+    SPI
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheDistributedQueryManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheDistributedQueryManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheDistributedQueryManager.java
index cb7e9eb..3cd724c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheDistributedQueryManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheDistributedQueryManager.java
@@ -19,7 +19,6 @@ package org.apache.ignite.internal.processors.cache.query;
 
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
-import org.apache.ignite.cache.query.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.events.*;
 import org.apache.ignite.internal.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheLocalQueryManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheLocalQueryManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheLocalQueryManager.java
index 077e1c9..9e1af79 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheLocalQueryManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheLocalQueryManager.java
@@ -18,7 +18,6 @@
 package org.apache.ignite.internal.processors.cache.query;
 
 import org.apache.ignite.*;
-import org.apache.ignite.cache.query.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.internal.processors.query.*;
 import org.jetbrains.annotations.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesEx.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesEx.java
index 4f39316..8d3c2be 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesEx.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesEx.java
@@ -18,7 +18,6 @@
 package org.apache.ignite.internal.processors.cache.query;
 
 import org.apache.ignite.*;
-import org.apache.ignite.cache.query.*;
 import org.apache.ignite.internal.*;
 
 import java.util.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesImpl.java
index 1d215b2..4d6a63d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesImpl.java
@@ -33,7 +33,7 @@ import java.util.*;
 import static org.apache.ignite.internal.processors.cache.query.GridCacheQueryType.*;
 
 /**
- * {@link org.apache.ignite.cache.query.CacheQueries} implementation.
+ * {@link CacheQueries} implementation.
  */
 public class GridCacheQueriesImpl<K, V> implements GridCacheQueriesEx<K, V>, Externalizable {
     /** */
@@ -206,7 +206,7 @@ public class GridCacheQueriesImpl<K, V> implements GridCacheQueriesEx<K, V>, Ext
     }
 
     /** {@inheritDoc} */
-    @Override public CacheQueryMetrics metrics() {
+    @Override public QueryMetrics metrics() {
         return ctx.queries().metrics();
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesProxy.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesProxy.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesProxy.java
index 0266629..60b2e16 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesProxy.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesProxy.java
@@ -235,7 +235,7 @@ public class GridCacheQueriesProxy<K, V> implements GridCacheQueriesEx<K, V>, Ex
     }
 
     /** {@inheritDoc} */
-    @Override public CacheQueryMetrics metrics() {
+    @Override public QueryMetrics metrics() {
         GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
 
         try {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryAdapter.java
index d35d215..5ff160a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryAdapter.java
@@ -391,7 +391,7 @@ public class GridCacheQueryAdapter<T> implements CacheQuery<T> {
         return execute(null, rmtTransform, args);
     }
 
-    @Override public CacheQueryMetrics metrics() {
+    @Override public QueryMetrics metrics() {
         return metrics.copy();
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryErrorFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryErrorFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryErrorFuture.java
index dd385d1..f4fcb37 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryErrorFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryErrorFuture.java
@@ -18,7 +18,6 @@
 package org.apache.ignite.internal.processors.cache.query;
 
 import org.apache.ignite.*;
-import org.apache.ignite.cache.query.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.util.future.*;
 import org.jetbrains.annotations.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa0ee770/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryFutureAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryFutureAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryFutureAdapter.java
index 4202c99..0c6b184 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryFutureAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryFutureAdapter.java
@@ -18,7 +18,6 @@
 package org.apache.ignite.internal.processors.cache.query;
 
 import org.apache.ignite.*;
-import org.apache.ignite.cache.query.*;
 import org.apache.ignite.internal.processors.cache.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.internal.processors.timeout.*;


[39/50] [abbrv] incubator-ignite git commit: Merge branch 'ignite-113' into sprint-1

Posted by se...@apache.org.
Merge branch 'ignite-113' into sprint-1


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

Branch: refs/heads/ignite-sql
Commit: 5203363e7b1cd297032da02611f81f24cbe60e6c
Parents: 57f55f6 9e74899
Author: Artem SHutak <as...@gridgain.com>
Authored: Fri Jan 30 18:15:14 2015 +0300
Committer: Artem SHutak <as...@gridgain.com>
Committed: Fri Jan 30 18:15:14 2015 +0300

----------------------------------------------------------------------
 examples/config/servlet/WEB-INF/web.xml         |    2 +-
 .../main/java/org/apache/ignite/Ignition.java   |    6 +-
 .../apache/ignite/cache/query/CacheQuery.java   |    3 +-
 .../cache/query/CacheQuerySqlFunction.java      |    4 +-
 .../cache/query/annotations/QuerySqlField.java  |    2 +-
 .../query/annotations/QuerySqlFunction.java     |    2 +-
 .../apache/ignite/cache/store/CacheStore.java   |    2 +-
 .../ignite/compute/gridify/GridifySetToSet.java |    2 +-
 .../compute/gridify/GridifySetToValue.java      |    2 +-
 .../configuration/GridQueryConfiguration.java   |  201 ---
 .../configuration/IgniteConfiguration.java      |    8 +-
 .../configuration/IgniteQueryConfiguration.java |  201 +++
 .../ignite/spi/checkpoint/CheckpointSpi.java    |    2 +-
 .../ignite/spi/deployment/DeploymentSpi.java    |    2 +-
 .../spi/discovery/tcp/TcpDiscoverySpi.java      |    2 +-
 .../apache/ignite/transactions/IgniteTx.java    |    2 +-
 modules/core/src/test/webapp/WEB-INF/web.xml    |    2 +-
 .../hibernate/CacheHibernateBlobStore.java      |  593 ++++++++
 .../CacheHibernateBlobStoreEntry.hbm.xml        |   29 +
 .../hibernate/CacheHibernateBlobStoreEntry.java |   86 ++
 .../hibernate/GridCacheHibernateBlobStore.java  |  593 --------
 .../GridCacheHibernateBlobStoreEntry.hbm.xml    |   29 -
 .../GridCacheHibernateBlobStoreEntry.java       |   86 --
 ...idHibernateL2CacheTransactionalSelfTest.java |    2 +-
 .../CacheHibernateBlobStoreSelfTest.java        |  108 ++
 .../GridCacheHibernateBlobStoreSelfTest.java    |  108 --
 .../cache/store/hibernate/hibernate.cfg.xml     |    2 +-
 .../testsuites/IgniteHibernateTestSuite.java    |    2 +-
 .../processors/query/h2/IgniteH2Indexing.java   |    6 +-
 .../cache/GridCacheAbstractQuerySelfTest.java   |    2 +-
 .../GridCacheQueryMultiThreadedSelfTest.java    |    2 +-
 .../query/h2/sql/GridQueryParsingTest.java      |    2 +-
 .../apache/ignite/cache/jta/CacheTmLookup.java  |   50 +
 .../ignite/cache/jta/GridCacheTmLookup.java     |   50 -
 .../cache/jta/jndi/CacheJndiTmLookup.java       |   74 +
 .../cache/jta/jndi/GridCacheJndiTmLookup.java   |   74 -
 .../jta/reflect/CacheReflectionTmLookup.java    |  115 ++
 .../reflect/GridCacheReflectionTmLookup.java    |  115 --
 .../processors/cache/jta/CacheJtaManager.java   |    4 +-
 ...CacheJtaConfigurationValidationSelfTest.java |    2 +-
 .../processors/cache/GridCacheJtaSelfTest.java  |    2 +-
 .../GridTmLookupLifecycleAwareSelfTest.java     |    4 +-
 .../ignite/cache/spring/SpringCacheManager.java |    2 +-
 .../ignite/tools/javadoc/GridLinkTaglet.java    |  165 ---
 .../ignite/tools/javadoc/IgniteLinkTaglet.java  |  165 +++
 .../uri/GridUriDeploymentFileProcessor.java     |    2 +-
 .../deployment/uri/GridUriDeploymentSpi.java    | 1367 ------------------
 .../uri/GridUriDeploymentSpiMBean.java          |   53 -
 .../spi/deployment/uri/UriDeploymentSpi.java    | 1367 ++++++++++++++++++
 .../deployment/uri/UriDeploymentSpiMBean.java   |   53 +
 .../GridTaskUriDeploymentDeadlockSelfTest.java  |    2 +-
 .../ignite/p2p/GridP2PDisabledSelfTest.java     |    2 +-
 .../uri/GridUriDeploymentAbstractSelfTest.java  |    2 +-
 .../GridUriDeploymentClassLoaderSelfTest.java   |    2 +-
 ...riDeploymentClassloaderRegisterSelfTest.java |    4 +-
 .../uri/GridUriDeploymentConfigSelfTest.java    |   10 +-
 .../GridUriDeploymentFileProcessorSelfTest.java |    2 +-
 .../uri/GridUriDeploymentMd5CheckSelfTest.java  |    2 +-
 ...loymentMultiScannersErrorThrottlingTest.java |    2 +-
 .../GridUriDeploymentMultiScannersSelfTest.java |    2 +-
 .../uri/GridUriDeploymentSimpleSelfTest.java    |   10 +-
 .../file/GridFileDeploymentSelfTest.java        |    2 +-
 .../GridFileDeploymentUndeploySelfTest.java     |    8 +-
 .../uri/scanners/ftp/GridFtpDeploymentTest.java |    2 +-
 .../http/GridHttpDeploymentSelfTest.java        |    2 +-
 .../IgniteUriDeploymentTestSuite.java           |    3 +-
 .../cache/websession/GridWebSessionFilter.java  |    4 +-
 .../GridServletContextListenerStartup.java      |  181 ---
 .../startup/servlet/GridServletStartup.java     |  187 ---
 .../IgniteServletContextListenerStartup.java    |  181 +++
 .../startup/servlet/IgniteServletStartup.java   |  187 +++
 pom.xml                                         |    6 +-
 72 files changed, 3279 insertions(+), 3283 deletions(-)
----------------------------------------------------------------------



[26/50] [abbrv] incubator-ignite git commit: Merge remote-tracking branch 'remotes/origin/sprint-1' into ignite-67

Posted by se...@apache.org.
Merge remote-tracking branch 'remotes/origin/sprint-1' into ignite-67


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

Branch: refs/heads/ignite-sql
Commit: ac05bb9c8089895506126591a2b04766588a25e1
Parents: a360ab7 9550905
Author: avinogradov <av...@gridgain.com>
Authored: Fri Jan 30 12:29:32 2015 +0300
Committer: avinogradov <av...@gridgain.com>
Committed: Fri Jan 30 12:29:32 2015 +0300

----------------------------------------------------------------------
 assembly/release-hadoop.xml                     |    6 +-
 ipc/shmem/Makefile.am                           |    2 +-
 ipc/shmem/Makefile.in                           |    2 +-
 ipc/shmem/configure                             |    4 +-
 ipc/shmem/configure.ac                          |    2 +-
 ipc/shmem/ggshmem/Makefile.am                   |   23 -
 ipc/shmem/ggshmem/Makefile.in                   |  589 --
 ..._util_ipc_shmem_GridIpcSharedMemoryUtils.cpp |  882 --
 ipc/shmem/igniteshmem/Makefile.am               |   23 +
 ipc/shmem/igniteshmem/Makefile.in               |  589 ++
 ...rnal_util_ipc_shmem_IpcSharedMemoryUtils.cpp |  882 ++
 ipc/shmem/include/Makefile.am                   |    2 +-
 ipc/shmem/include/Makefile.in                   |    2 +-
 ...ternal_util_ipc_shmem_IpcSharedMemoryUtils.h |  117 +
 ...id_util_ipc_shmem_GridIpcSharedMemoryUtils.h |  117 -
 ipc/shmem/readme.txt                            |    9 +-
 .../spi/checkpoint/s3/S3CheckpointSpi.java      |    4 +-
 .../ClientPropertiesConfigurationSelfTest.java  |    4 +-
 .../java/META-INF/native/linux64/libggshmem.so  |  Bin 138023 -> 0 bytes
 .../META-INF/native/linux64/libigniteshmem.so   |  Bin 0 -> 138345 bytes
 .../java/META-INF/native/osx/libggshmem.dylib   |  Bin 32940 -> 0 bytes
 .../META-INF/native/osx/libigniteshmem.dylib    |  Bin 0 -> 33116 bytes
 .../apache/ignite/IgniteCheckedException.java   |    2 +-
 .../java/org/apache/ignite/IgniteException.java |    2 +-
 .../processors/cache/GridCacheAdapter.java      |   16 +-
 .../cache/GridCacheDeploymentManager.java       |    2 +-
 .../cache/GridCacheMvccCandidate.java           |    4 +-
 .../processors/cache/GridCacheStoreManager.java |   25 +-
 .../processors/cache/IgniteCacheProxy.java      |   24 +-
 .../transactions/IgniteTxLocalAdapter.java      |   42 +-
 .../internal/processors/fs/GridGgfsServer.java  |   26 +-
 .../processors/fs/GridGgfsServerManager.java    |    8 +-
 .../processors/fs/IgniteFsNoopProcessor.java    |    2 +-
 .../processors/fs/IgniteFsProcessor.java        |    4 +-
 .../processors/fs/IgniteFsProcessorAdapter.java |    2 +-
 .../service/GridServiceProcessor.java           |    2 +-
 .../apache/ignite/internal/util/GridUtils.java  | 9100 -----------------
 .../ignite/internal/util/IgniteUtils.java       | 9141 ++++++++++++++++++
 .../internal/util/ipc/GridIpcEndpoint.java      |   49 -
 .../util/ipc/GridIpcEndpointBindException.java  |   47 -
 .../util/ipc/GridIpcEndpointFactory.java        |   84 -
 .../internal/util/ipc/GridIpcEndpointType.java  |   29 -
 .../util/ipc/GridIpcServerEndpoint.java         |   73 -
 .../ipc/GridIpcServerEndpointDeserializer.java  |   66 -
 .../internal/util/ipc/GridIpcToNioAdapter.java  |  250 -
 .../ignite/internal/util/ipc/IpcEndpoint.java   |   49 +
 .../util/ipc/IpcEndpointBindException.java      |   47 +
 .../internal/util/ipc/IpcEndpointFactory.java   |   84 +
 .../internal/util/ipc/IpcEndpointType.java      |   29 +
 .../internal/util/ipc/IpcServerEndpoint.java    |   73 +
 .../util/ipc/IpcServerEndpointDeserializer.java |   66 +
 .../internal/util/ipc/IpcToNioAdapter.java      |  250 +
 .../ipc/loopback/GridIpcClientTcpEndpoint.java  |   87 -
 .../ipc/loopback/GridIpcServerTcpEndpoint.java  |  179 -
 .../util/ipc/loopback/IpcClientTcpEndpoint.java |   87 +
 .../util/ipc/loopback/IpcServerTcpEndpoint.java |  179 +
 .../GridIpcOutOfSystemResourcesException.java   |   59 -
 .../GridIpcSharedMemoryClientEndpoint.java      |  336 -
 .../shmem/GridIpcSharedMemoryInitRequest.java   |   67 -
 .../shmem/GridIpcSharedMemoryInitResponse.java  |  171 -
 .../shmem/GridIpcSharedMemoryInputStream.java   |   99 -
 .../shmem/GridIpcSharedMemoryNativeLoader.java  |  242 -
 ...cSharedMemoryOperationTimedoutException.java |   59 -
 .../shmem/GridIpcSharedMemoryOutputStream.java  |   80 -
 .../GridIpcSharedMemoryServerEndpoint.java      |  707 --
 .../ipc/shmem/GridIpcSharedMemorySpace.java     |  374 -
 .../ipc/shmem/GridIpcSharedMemoryUtils.java     |  242 -
 .../shmem/IpcOutOfSystemResourcesException.java |   59 +
 .../shmem/IpcSharedMemoryClientEndpoint.java    |  336 +
 .../ipc/shmem/IpcSharedMemoryInitRequest.java   |   67 +
 .../ipc/shmem/IpcSharedMemoryInitResponse.java  |  171 +
 .../ipc/shmem/IpcSharedMemoryInputStream.java   |   99 +
 .../ipc/shmem/IpcSharedMemoryNativeLoader.java  |  261 +
 ...cSharedMemoryOperationTimedoutException.java |   59 +
 .../ipc/shmem/IpcSharedMemoryOutputStream.java  |   80 +
 .../shmem/IpcSharedMemoryServerEndpoint.java    |  707 ++
 .../util/ipc/shmem/IpcSharedMemorySpace.java    |  374 +
 .../util/ipc/shmem/IpcSharedMemoryUtils.java    |  242 +
 .../util/nio/GridShmemCommunicationClient.java  |    4 +-
 .../internal/util/typedef/internal/U.java       |    4 +-
 .../visor/misc/VisorResolveHostNameTask.java    |    2 +-
 .../visor/node/VisorNodeDataCollectorJob.java   |    4 +-
 .../internal/visor/query/VisorQueryUtils.java   |    4 +-
 .../ignite/lang/IgniteAsyncSupportAdapter.java  |   27 +-
 .../optimized/IgniteOptimizedMarshaller.java    |    2 +-
 .../communication/tcp/TcpCommunicationSpi.java  |   24 +-
 .../IgniteExceptionHelpLinksSelfTest.java       |    3 +-
 .../GridEventStorageCheckAllEventsSelfTest.java |    2 +-
 .../cache/GridCacheAbstractMetricsSelfTest.java |   10 +-
 .../GridCacheAbstractProjectionSelfTest.java    |   50 +
 .../GridCacheReturnValueTransferSelfTest.java   |    2 +-
 .../cache/IgniteCacheInvokeAbstractTest.java    |    4 +-
 .../IgniteCrossCacheTxStoreSelfTest.java        |  288 +
 ...GridCacheValueConsistencyAtomicSelfTest.java |    2 +-
 .../IgniteCacheTxStoreSessionTest.java          |   11 +-
 ...IpcEndpointRegistrationAbstractSelfTest.java |    4 +-
 ...pcEndpointRegistrationOnWindowsSelfTest.java |    4 +-
 .../cache/GridCacheCommandHandlerSelfTest.java  |    4 +-
 ...artupWithSpecifiedWorkDirectorySelfTest.java |    2 +-
 ...tartupWithUndefinedGridGainHomeSelfTest.java |    4 +-
 .../internal/util/GridTestClockTimer.java       |    6 +-
 .../ignite/internal/util/GridUtilsSelfTest.java |  717 --
 .../internal/util/IgniteUtilsSelfTest.java      |  728 ++
 ...idIpcServerEndpointDeserializerSelfTest.java |  160 -
 .../IpcServerEndpointDeserializerSelfTest.java  |  160 +
 .../ipc/shmem/GgfsSharedMemoryTestClient.java   |   76 +
 .../ipc/shmem/GgfsSharedMemoryTestServer.java   |   71 +
 .../shmem/GridGgfsSharedMemoryTestClient.java   |   76 -
 .../shmem/GridGgfsSharedMemoryTestServer.java   |   71 -
 ...idIpcSharedMemoryCrashDetectionSelfTest.java |  500 -
 .../shmem/GridIpcSharedMemoryFakeClient.java    |   36 -
 .../shmem/GridIpcSharedMemoryNodeStartup.java   |   87 -
 .../shmem/GridIpcSharedMemorySpaceSelfTest.java |  267 -
 .../shmem/GridIpcSharedMemoryUtilsSelfTest.java |   84 -
 .../IpcSharedMemoryCrashDetectionSelfTest.java  |  500 +
 .../ipc/shmem/IpcSharedMemoryFakeClient.java    |   36 +
 .../IpcSharedMemoryNativeLoaderSelfTest.java    |   78 +
 .../ipc/shmem/IpcSharedMemoryNodeStartup.java   |   87 +
 .../ipc/shmem/IpcSharedMemorySpaceSelfTest.java |  267 +
 .../ipc/shmem/IpcSharedMemoryUtilsSelfTest.java |   84 +
 .../LoadWithCorruptedLibFileTestRunner.java     |   65 +
 .../GridIpcSharedMemoryBenchmarkParty.java      |   35 -
 .../GridIpcSharedMemoryBenchmarkReader.java     |  133 -
 .../GridIpcSharedMemoryBenchmarkWriter.java     |  125 -
 .../IpcSharedMemoryBenchmarkParty.java          |   35 +
 .../IpcSharedMemoryBenchmarkReader.java         |  133 +
 .../IpcSharedMemoryBenchmarkWriter.java         |  125 +
 .../ignite/lang/GridSetWrapperSelfTest.java     |    2 +-
 .../ignite/testsuites/IgniteCacheTestSuite.java |    1 +
 .../ignite/testsuites/IgniteFsTestSuite.java    |    2 +-
 .../IgniteIpcSharedMemorySelfTestSuite.java     |    7 +-
 .../testsuites/IgniteUtilSelfTestSuite.java     |    2 +-
 .../internal/fs/hadoop/GridGgfsHadoopIpcIo.java |   10 +-
 .../GridHadoopExternalCommunication.java        |   26 +-
 .../GridHadoopIpcToNioAdapter.java              |    6 +-
 ...doop20FileSystemLoopbackPrimarySelfTest.java |    2 +-
 ...sHadoop20FileSystemShmemPrimarySelfTest.java |    2 +-
 .../GridGgfsHadoopFileSystemClientSelfTest.java |    2 +-
 ...idGgfsHadoopFileSystemHandshakeSelfTest.java |    2 +-
 ...ridGgfsHadoopFileSystemIpcCacheSelfTest.java |    2 +-
 ...adoopFileSystemLoopbackAbstractSelfTest.java |    2 +-
 ...fsHadoopFileSystemShmemAbstractSelfTest.java |    8 +-
 .../fs/GridGgfsNearOnlyMultiNodeSelfTest.java   |    4 +-
 .../ignite/fs/IgniteFsEventsTestSuite.java      |    4 +-
 .../ignite/visor/commands/VisorConsole.scala    |    6 +-
 .../commands/alert/VisorAlertCommand.scala      |    2 +-
 .../config/VisorConfigurationCommand.scala      |    6 +-
 .../commands/deploy/VisorDeployCommand.scala    |    4 +-
 .../commands/disco/VisorDiscoveryCommand.scala  |    4 +-
 .../commands/events/VisorEventsCommand.scala    |    4 +-
 .../visor/commands/gc/VisorGcCommand.scala      |   13 +-
 .../visor/commands/node/VisorNodeCommand.scala  |    4 +-
 .../commands/start/VisorStartCommand.scala      |    4 +-
 .../commands/tasks/VisorTasksCommand.scala      |    4 +-
 .../commands/top/VisorTopologyCommand.scala     |    6 +-
 .../visor/commands/vvm/VisorVvmCommand.scala    |    8 +-
 .../scala/org/apache/ignite/visor/visor.scala   |   20 +-
 .../visor/commands/gc/VisorGcCommandSpec.scala  |   25 +-
 158 files changed, 17135 insertions(+), 16542 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ac05bb9c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ac05bb9c/modules/core/src/main/java/org/apache/ignite/internal/processors/fs/IgniteFsProcessor.java
----------------------------------------------------------------------


[13/50] [abbrv] incubator-ignite git commit: # ignite-sprint-1.

Posted by se...@apache.org.
# ignite-sprint-1.


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

Branch: refs/heads/ignite-sql
Commit: bdebb406d6f58e7c6c4b334f6ea1a8be2b4ad7c8
Parents: 9502c0d
Author: AKuznetsov <ak...@gridgain.com>
Authored: Fri Jan 30 09:38:18 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Fri Jan 30 09:38:18 2015 +0700

----------------------------------------------------------------------
 .../visor/commands/gc/VisorGcCommand.scala      | 13 ++++------
 .../visor/commands/gc/VisorGcCommandSpec.scala  | 25 +++++++++++---------
 2 files changed, 19 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bdebb406/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/gc/VisorGcCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/gc/VisorGcCommand.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/gc/VisorGcCommand.scala
index ef1a241..713247c 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/gc/VisorGcCommand.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/gc/VisorGcCommand.scala
@@ -17,17 +17,14 @@
 
 package org.apache.ignite.visor.commands.gc
 
-import org.apache.ignite.internal.visor.node.VisorNodeGcTask
-
 import org.apache.ignite._
 import org.apache.ignite.cluster.{ClusterGroupEmptyException, ClusterNode}
-
-import java.lang.{Boolean => JavaBoolean}
-import java.util.{UUID, HashSet => JavaHashSet}
-
+import org.apache.ignite.internal.visor.node.VisorNodeGcTask
 import org.apache.ignite.visor.VisorTag
 import org.apache.ignite.visor.commands.{VisorConsoleCommand, VisorTextTable}
-import visor.visor._
+import org.apache.ignite.visor.visor._
+
+import java.util.UUID
 
 import scala.collection.JavaConversions._
 import scala.language.{implicitConversions, reflectiveCalls}
@@ -240,5 +237,5 @@ object VisorGcCommand {
      *
      * @param vs Visor tagging trait.
      */
-    implicit def fromGc2Visor(vs: VisorTag) = cmd
+    implicit def fromGc2Visor(vs: VisorTag): VisorGcCommand = cmd
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bdebb406/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/gc/VisorGcCommandSpec.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/gc/VisorGcCommandSpec.scala b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/gc/VisorGcCommandSpec.scala
index 5e6f1c3..1a59274 100644
--- a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/gc/VisorGcCommandSpec.scala
+++ b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/gc/VisorGcCommandSpec.scala
@@ -17,26 +17,29 @@
 
 package org.apache.ignite.visor.commands.gc
 
-import org.apache.ignite.visor.visor
-import org.scalatest._
-
+import org.apache.ignite.configuration.IgniteConfiguration
 import org.apache.ignite.visor.commands.gc.VisorGcCommand._
-import org.apache.ignite.visor.commands.top.VisorTopologyCommand._
+import org.apache.ignite.visor.{VisorRuntimeBaseSpec, visor}
 
 /**
  * Unit test for 'gc' command.
  */
-class VisorGcCommandSpec extends FlatSpec with Matchers with BeforeAndAfterAll {
+class VisorGcCommandSpec extends VisorRuntimeBaseSpec(1) {
     behavior of "A 'gc' visor command"
 
-    override def beforeAll() {
-        visor.open("-d")
+    /**
+     * Creates grid configuration for provided grid host.
+     *
+     * @param name Grid name.
+     * @return Grid configuration.
+     */
+    override def config(name: String): IgniteConfiguration = {
+        val cfg = new IgniteConfiguration
 
-        visor.top()
-    }
+        cfg.setGridName(name)
+        cfg.setLifeCycleEmailNotification(false)
 
-    override def afterAll() {
-        visor.close()
+        cfg
     }
 
     it should "run GC on all nodes" in {


[11/50] [abbrv] incubator-ignite git commit: Merge remote-tracking branch 'origin/sprint-1' into sprint-1

Posted by se...@apache.org.
Merge remote-tracking branch 'origin/sprint-1' into sprint-1


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

Branch: refs/heads/ignite-sql
Commit: 580c36e66625ad203dfa18e830649c64e3e531f0
Parents: 14ad3ea f30d79d
Author: AKuznetsov <ak...@gridgain.com>
Authored: Thu Jan 29 22:31:25 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Thu Jan 29 22:31:25 2015 +0700

----------------------------------------------------------------------
 .../processors/cache/GridCacheAdapter.java      | 16 ++-----
 .../processors/cache/IgniteCacheProxy.java      |  2 +-
 .../GridCacheAbstractProjectionSelfTest.java    | 50 ++++++++++++++++++++
 .../commands/alert/VisorAlertCommand.scala      |  2 +-
 4 files changed, 55 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/580c36e6/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/alert/VisorAlertCommand.scala
----------------------------------------------------------------------


[24/50] [abbrv] incubator-ignite git commit: Merge remote-tracking branch 'remotes/origin/sprint-1' into ignite-67

Posted by se...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ac05bb9c/modules/core/src/main/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryServerEndpoint.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryServerEndpoint.java
index 0000000,d22f2c9..679fec1
mode 000000,100644..100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryServerEndpoint.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryServerEndpoint.java
@@@ -1,0 -1,707 +1,707 @@@
+ /*
+  * 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.util.ipc.shmem;
+ 
+ import org.apache.ignite.*;
+ import org.apache.ignite.internal.util.*;
+ import org.apache.ignite.resources.*;
+ import org.apache.ignite.thread.*;
+ import org.apache.ignite.internal.processors.resource.*;
+ import org.apache.ignite.internal.util.typedef.*;
+ import org.apache.ignite.internal.util.typedef.internal.*;
+ import org.apache.ignite.internal.util.ipc.*;
+ import org.apache.ignite.internal.util.lang.*;
+ import org.apache.ignite.internal.util.tostring.*;
+ import org.apache.ignite.internal.util.worker.*;
+ import org.jetbrains.annotations.*;
+ 
+ import java.io.*;
+ import java.net.*;
+ import java.nio.channels.*;
+ import java.util.*;
+ import java.util.concurrent.atomic.*;
+ 
+ /**
+  * Server shared memory IPC endpoint.
+  */
+ public class IpcSharedMemoryServerEndpoint implements IpcServerEndpoint {
+     /** Troubleshooting public wiki page. */
+     public static final String TROUBLESHOOTING_URL = "http://bit.ly/GridGain-Troubleshooting";
+ 
+     /** IPC error message. */
+     public static final String OUT_OF_RESOURCES_MSG = "Failed to allocate shared memory segment " +
+         "(for troubleshooting see " + TROUBLESHOOTING_URL + ')';
+ 
+     /** Default endpoint port number. */
+     public static final int DFLT_IPC_PORT = 10500;
+ 
+     /** Default shared memory space in bytes. */
+     public static final int DFLT_SPACE_SIZE = 256 * 1024;
+ 
+     /**
 -     * Default token directory. Note that this path is relative to {@code GRIDGAIN_HOME/work} folder
 -     * if {@code GRIDGAIN_HOME} system or environment variable specified, otherwise it is relative to
++     * Default token directory. Note that this path is relative to {@code IGNITE_HOME/work} folder
++     * if {@code IGNITE_HOME} system or environment variable specified, otherwise it is relative to
+      * {@code work} folder under system {@code java.io.tmpdir} folder.
+      *
+      * @see org.apache.ignite.configuration.IgniteConfiguration#getWorkDirectory()
+      */
+     public static final String DFLT_TOKEN_DIR_PATH = "ipc/shmem";
+ 
+     /**
+      * Shared memory token file name prefix.
+      *
+      * Token files are created and stored in the following manner: [tokDirPath]/[nodeId]-[current
+      * PID]/gg-shmem-space-[auto_idx]-[other_party_pid]-[size]
+      */
+     public static final String TOKEN_FILE_NAME = "gg-shmem-space-";
+ 
+     /** Default lock file name. */
+     private static final String LOCK_FILE_NAME = "lock.file";
+ 
+     /** GC frequency. */
+     private static final long GC_FREQ = 10000;
+ 
+     /** ID generator. */
+     private static final AtomicLong tokIdxGen = new AtomicLong();
+ 
+     /** Port to bind socket to. */
+     private int port = DFLT_IPC_PORT;
+ 
+     /** Prefix. */
+     private String tokDirPath = DFLT_TOKEN_DIR_PATH;
+ 
+     /** Space size. */
+     private int size = DFLT_SPACE_SIZE;
+ 
+     /** Server socket. */
+     @GridToStringExclude
+     private ServerSocket srvSock;
+ 
+     /** Token directory. */
+     private File tokDir;
+ 
+     /** Logger. */
+     @IgniteLoggerResource
+     private IgniteLogger log;
+ 
+     /** Local node ID. */
+     private UUID locNodeId;
+ 
+     /** Grid name. */
+     private String gridName;
+ 
+     /** Flag allowing not to print out of resources warning. */
+     private boolean omitOutOfResourcesWarn;
+ 
+     /** GC worker. */
+     private GridWorker gcWorker;
+ 
+     /** Pid of the current process. */
+     private int pid;
+ 
+     /** Closed flag. */
+     private volatile boolean closed;
+ 
+     /** Spaces opened on with this endpoint. */
+     private final Collection<IpcSharedMemoryClientEndpoint> endpoints =
+         new GridConcurrentHashSet<>();
+ 
+     /** Use this constructor when dependencies could be injected with {@link GridResourceProcessor#injectGeneric(Object)}. */
+     public IpcSharedMemoryServerEndpoint() {
+         // No-op.
+     }
+ 
+     /**
+      * Constructor to set dependencies explicitly.
+      *
+      * @param log Log.
+      * @param locNodeId Node id.
+      * @param gridName Grid name.
+      */
+     public IpcSharedMemoryServerEndpoint(IgniteLogger log, UUID locNodeId, String gridName) {
+         this.log = log;
+         this.locNodeId = locNodeId;
+         this.gridName = gridName;
+     }
+ 
+     /** @param omitOutOfResourcesWarn If {@code true}, out of resources warning will not be printed by server. */
+     public void omitOutOfResourcesWarning(boolean omitOutOfResourcesWarn) {
+         this.omitOutOfResourcesWarn = omitOutOfResourcesWarn;
+     }
+ 
+     /** {@inheritDoc} */
+     @Override public void start() throws IgniteCheckedException {
+         IpcSharedMemoryNativeLoader.load();
+ 
+         pid = IpcSharedMemoryUtils.pid();
+ 
+         if (pid == -1)
+             throw new IpcEndpointBindException("Failed to get PID of the current process.");
+ 
+         if (size <= 0)
+             throw new IpcEndpointBindException("Space size should be positive: " + size);
+ 
+         String tokDirPath = this.tokDirPath;
+ 
+         if (F.isEmpty(tokDirPath))
+             throw new IpcEndpointBindException("Token directory path is empty.");
+ 
+         tokDirPath = tokDirPath + '/' + locNodeId.toString() + '-' + IpcSharedMemoryUtils.pid();
+ 
+         tokDir = U.resolveWorkDirectory(tokDirPath, false);
+ 
+         if (port <= 0 || port >= 0xffff)
+             throw new IpcEndpointBindException("Port value is illegal: " + port);
+ 
+         try {
+             srvSock = new ServerSocket();
+ 
+             // Always bind to loopback.
+             srvSock.bind(new InetSocketAddress("127.0.0.1", port));
+         }
+         catch (IOException e) {
+             // Although empty socket constructor never throws exception, close it just in case.
+             U.closeQuiet(srvSock);
+ 
+             throw new IpcEndpointBindException("Failed to bind shared memory IPC endpoint (is port already " +
+                 "in use?): " + port, e);
+         }
+ 
+         gcWorker = new GcWorker(gridName, "ipc-shmem-gc", log);
+ 
+         new IgniteThread(gcWorker).start();
+ 
+         if (log.isInfoEnabled())
+             log.info("IPC shared memory server endpoint started [port=" + port +
+                 ", tokDir=" + tokDir.getAbsolutePath() + ']');
+     }
+ 
+     /** {@inheritDoc} */
+     @SuppressWarnings("ErrorNotRethrown")
+     @Override public IpcEndpoint accept() throws IgniteCheckedException {
+         while (!Thread.currentThread().isInterrupted()) {
+             Socket sock = null;
+ 
+             boolean accepted = false;
+ 
+             try {
+                 sock = srvSock.accept();
+ 
+                 accepted = true;
+ 
+                 InputStream inputStream = sock.getInputStream();
+                 ObjectInputStream in = new ObjectInputStream(inputStream);
+ 
+                 ObjectOutputStream out = new ObjectOutputStream(sock.getOutputStream());
+ 
+                 IpcSharedMemorySpace inSpace = null;
+ 
+                 IpcSharedMemorySpace outSpace = null;
+ 
+                 boolean err = true;
+ 
+                 try {
+                     IpcSharedMemoryInitRequest req = (IpcSharedMemoryInitRequest)in.readObject();
+ 
+                     if (log.isDebugEnabled())
+                         log.debug("Processing request: " + req);
+ 
+                     IgnitePair<String> p = inOutToken(req.pid(), size);
+ 
+                     String file1 = p.get1();
+                     String file2 = p.get2();
+ 
+                     assert file1 != null;
+                     assert file2 != null;
+ 
+                     // Create tokens.
+                     new File(file1).createNewFile();
+                     new File(file2).createNewFile();
+ 
+                     if (log.isDebugEnabled())
+                         log.debug("Created token files: " + p);
+ 
+                     inSpace = new IpcSharedMemorySpace(
+                         file1,
+                         req.pid(),
+                         pid,
+                         size,
+                         true,
+                         log);
+ 
+                     outSpace = new IpcSharedMemorySpace(
+                         file2,
+                         pid,
+                         req.pid(),
+                         size,
+                         false,
+                         log);
+ 
+                     IpcSharedMemoryClientEndpoint ret = new IpcSharedMemoryClientEndpoint(inSpace, outSpace,
+                         log);
+ 
+                     out.writeObject(new IpcSharedMemoryInitResponse(file2, outSpace.sharedMemoryId(),
+                         file1, inSpace.sharedMemoryId(), pid, size));
+ 
+                     err = !in.readBoolean();
+ 
+                     endpoints.add(ret);
+ 
+                     return ret;
+                 }
+                 catch (UnsatisfiedLinkError e) {
+                     throw IpcSharedMemoryUtils.linkError(e);
+                 }
+                 catch (IOException e) {
+                     if (log.isDebugEnabled())
+                         log.debug("Failed to process incoming connection " +
+                             "(was connection closed by another party):" + e.getMessage());
+                 }
+                 catch (ClassNotFoundException e) {
+                     U.error(log, "Failed to process incoming connection.", e);
+                 }
+                 catch (ClassCastException e) {
+                     String msg = "Failed to process incoming connection (most probably, shared memory " +
+                         "rest endpoint has been configured by mistake).";
+ 
+                     LT.warn(log, null, msg);
+ 
+                     sendErrorResponse(out, e);
+                 }
+                 catch (IpcOutOfSystemResourcesException e) {
+                     if (!omitOutOfResourcesWarn)
+                         LT.warn(log, null, OUT_OF_RESOURCES_MSG);
+ 
+                     sendErrorResponse(out, e);
+                 }
+                 catch (IgniteCheckedException e) {
+                     LT.error(log, e, "Failed to process incoming shared memory connection.");
+ 
+                     sendErrorResponse(out, e);
+                 }
+                 finally {
+                     // Exception has been thrown, need to free system resources.
+                     if (err) {
+                         if (inSpace != null)
+                             inSpace.forceClose();
+ 
+                         // Safety.
+                         if (outSpace != null)
+                             outSpace.forceClose();
+                     }
+                 }
+             }
+             catch (IOException e) {
+                 if (!Thread.currentThread().isInterrupted() && !accepted)
+                     throw new IgniteCheckedException("Failed to accept incoming connection.", e);
+ 
+                 if (!closed)
+                     LT.error(log, null, "Failed to process incoming shared memory connection: " + e.getMessage());
+             }
+             finally {
+                 U.closeQuiet(sock);
+             }
+         } // while
+ 
+         throw new IgniteInterruptedException("Socket accept was interrupted.");
+     }
+ 
+     /**
+      * Injects resources.
+      *
+      * @param ignite Ignite
+      */
+     @IgniteInstanceResource
+     private void injectResources(Ignite ignite){
+         if (ignite != null) {
+             // Inject resources.
+             gridName = ignite.name();
+             locNodeId = ignite.configuration().getNodeId();
+         }
+         else {
+             // Cleanup resources.
+             gridName = null;
+             locNodeId = null;
+         }
+     }
+ 
+     /**
+      * @param out Output stream.
+      * @param err Error cause.
+      */
+     private void sendErrorResponse(ObjectOutput out, Exception err) {
+         try {
+             out.writeObject(new IpcSharedMemoryInitResponse(err));
+         }
+         catch (IOException e) {
+             U.error(log, "Failed to send error response to client.", e);
+         }
+     }
+ 
+     /**
+      * @param pid PID of the other party.
+      * @param size Size of the space.
+      * @return Token pair.
+      */
+     private IgnitePair<String> inOutToken(int pid, int size) {
+         while (true) {
+             long idx = tokIdxGen.get();
+ 
+             if (tokIdxGen.compareAndSet(idx, idx + 2))
+                 return F.pair(new File(tokDir, TOKEN_FILE_NAME + idx + "-" + pid + "-" + size).getAbsolutePath(),
+                     new File(tokDir, TOKEN_FILE_NAME + (idx + 1) + "-" + pid + "-" + size).getAbsolutePath());
+         }
+     }
+ 
+     /** {@inheritDoc} */
+     @Override public int getPort() {
+         return port;
+     }
+ 
+     /** {@inheritDoc} */
+     @Nullable @Override public String getHost() {
+         return null;
+     }
+ 
+     /**
+      * {@inheritDoc}
+      *
+      * @return {@code false} as shared memory endpoints can not be used for management.
+      */
+     @Override public boolean isManagement() {
+         return false;
+     }
+ 
+     /**
+      * Sets port endpoint will be bound to.
+      *
+      * @param port Port number.
+      */
+     public void setPort(int port) {
+         this.port = port;
+     }
+ 
+     /**
+      * Gets token directory path.
+      *
+      * @return Token directory path.
+      */
+     public String getTokenDirectoryPath() {
+         return tokDirPath;
+     }
+ 
+     /**
+      * Sets token directory path.
+      *
+      * @param tokDirPath Token directory path.
+      */
+     public void setTokenDirectoryPath(String tokDirPath) {
+         this.tokDirPath = tokDirPath;
+     }
+ 
+     /**
+      * Gets size of shared memory spaces that are created by the endpoint.
+      *
+      * @return Size of shared memory space.
+      */
+     public int getSize() {
+         return size;
+     }
+ 
+     /**
+      * Sets size of shared memory spaces that are created by the endpoint.
+      *
+      * @param size Size of shared memory space.
+      */
+     public void setSize(int size) {
+         this.size = size;
+     }
+ 
+     /** {@inheritDoc} */
+     @Override public void close() {
+         closed = true;
+ 
+         U.closeQuiet(srvSock);
+ 
+         if (gcWorker != null) {
+             U.cancel(gcWorker);
+ 
+             // This method may be called from already interrupted thread.
+             // Need to ensure cleaning on close.
+             boolean interrupted = Thread.interrupted();
+ 
+             try {
+                 U.join(gcWorker);
+             }
+             catch (IgniteInterruptedException e) {
+                 U.warn(log, "Interrupted when stopping GC worker.", e);
+             }
+             finally {
+                 if (interrupted)
+                     Thread.currentThread().interrupt();
+             }
+         }
+     }
+ 
+     /** {@inheritDoc} */
+     @Override public String toString() {
+         return S.toString(IpcSharedMemoryServerEndpoint.class, this);
+     }
+ 
+     /**
+      * Sets configuration properties from the map.
+      *
+      * @param endpointCfg Map of properties.
+      * @throws IgniteCheckedException If invalid property name or value.
+      */
+     public void setupConfiguration(Map<String, String> endpointCfg) throws IgniteCheckedException {
+         for (Map.Entry<String,String> e : endpointCfg.entrySet()) {
+             try {
+                 switch (e.getKey()) {
+                     case "type":
+                     case "host":
+                     case "management":
+                         //Ignore these properties
+                         break;
+ 
+                     case "port":
+                         setPort(Integer.parseInt(e.getValue()));
+                         break;
+ 
+                     case "size":
+                         setSize(Integer.parseInt(e.getValue()));
+                         break;
+ 
+                     case "tokenDirectoryPath":
+                         setTokenDirectoryPath(e.getValue());
+                         break;
+ 
+                     default:
+                         throw new IgniteCheckedException("Invalid property '" + e.getKey() + "' of " + getClass().getSimpleName());
+                 }
+             }
+             catch (Throwable t) {
+                 if (t instanceof IgniteCheckedException)
+                     throw t;
+ 
+                 throw new IgniteCheckedException("Invalid value '" + e.getValue() + "' of the property '" + e.getKey() + "' in " +
+                         getClass().getSimpleName(), t);
+             }
+         }
+     }
+ 
+     /**
+      *
+      */
+     private class GcWorker extends GridWorker {
+         /**
+          * @param gridName Grid name.
+          * @param name Name.
+          * @param log Log.
+          */
+         protected GcWorker(@Nullable String gridName, String name, IgniteLogger log) {
+             super(gridName, name, log);
+         }
+ 
+         /** {@inheritDoc} */
+         @Override protected void body() throws InterruptedException, IgniteInterruptedException {
+             if (log.isDebugEnabled())
+                 log.debug("GC worker started.");
+ 
+             File workTokDir = tokDir.getParentFile();
+ 
+             assert workTokDir != null;
+ 
+             while (!isCancelled()) {
+                 U.sleep(GC_FREQ);
+ 
+                 if (log.isDebugEnabled())
+                     log.debug("Starting GC iteration.");
+ 
+                 RandomAccessFile lockFile = null;
+ 
+                 FileLock lock = null;
+ 
+                 try {
+                     lockFile = new RandomAccessFile(new File(workTokDir, LOCK_FILE_NAME), "rw");
+ 
+                     lock = lockFile.getChannel().lock();
+ 
+                     if (lock != null)
+                         processTokenDirectory(workTokDir);
+                     else if (log.isDebugEnabled())
+                         log.debug("Token directory is being processed concurrently: " + workTokDir.getAbsolutePath());
+                 }
+                 catch (OverlappingFileLockException ignored) {
+                     if (log.isDebugEnabled())
+                         log.debug("Token directory is being processed concurrently: " + workTokDir.getAbsolutePath());
+                 }
+                 catch (IOException e) {
+                     U.error(log, "Failed to process directory: " + workTokDir.getAbsolutePath(), e);
+                 }
+                 finally {
+                     U.releaseQuiet(lock);
+                     U.closeQuiet(lockFile);
+                 }
+ 
+                 // Process spaces created by this endpoint.
+                 if (log.isDebugEnabled())
+                     log.debug("Processing local spaces.");
+ 
+                 for (IpcSharedMemoryClientEndpoint e : endpoints) {
+                     if (log.isDebugEnabled())
+                         log.debug("Processing endpoint: " + e);
+ 
+                     if (!e.checkOtherPartyAlive()) {
+                         endpoints.remove(e);
+ 
+                         if (log.isDebugEnabled())
+                             log.debug("Removed endpoint: " + e);
+                     }
+                 }
+             }
+         }
+ 
+         /** @param workTokDir Token directory (common for multiple nodes). */
+         private void processTokenDirectory(File workTokDir) {
+             for (File f : workTokDir.listFiles()) {
+                 if (!f.isDirectory()) {
+                     if (!f.getName().equals(LOCK_FILE_NAME)) {
+                         if (log.isDebugEnabled())
+                             log.debug("Unexpected file: " + f.getName());
+                     }
+ 
+                     continue;
+                 }
+ 
+                 if (f.equals(tokDir)) {
+                     if (log.isDebugEnabled())
+                         log.debug("Skipping own token directory: " + tokDir.getName());
+ 
+                     continue;
+                 }
+ 
+                 String name = f.getName();
+ 
+                 int pid;
+ 
+                 try {
+                     pid = Integer.parseInt(name.substring(name.lastIndexOf('-') + 1));
+                 }
+                 catch (NumberFormatException ignored) {
+                     if (log.isDebugEnabled())
+                         log.debug("Failed to parse file name: " + name);
+ 
+                     continue;
+                 }
+ 
+                 // Is process alive?
+                 if (IpcSharedMemoryUtils.alive(pid)) {
+                     if (log.isDebugEnabled())
+                         log.debug("Skipping alive node: " + pid);
+ 
+                     continue;
+                 }
+ 
+                 if (log.isDebugEnabled())
+                     log.debug("Possibly stale token folder: " + f);
+ 
+                 // Process each token under stale token folder.
+                 File[] shmemToks = f.listFiles();
+ 
+                 if (shmemToks == null)
+                     // Although this is strange, but is reproducible sometimes on linux.
+                     return;
+ 
+                 int rmvCnt = 0;
+ 
+                 try {
+                     for (File f0 : shmemToks) {
+                         if (log.isDebugEnabled())
+                             log.debug("Processing token file: " + f0.getName());
+ 
+                         if (f0.isDirectory()) {
+                             if (log.isDebugEnabled())
+                                 log.debug("Unexpected directory: " + f0.getName());
+                         }
+ 
+                         // Token file format: gg-shmem-space-[auto_idx]-[other_party_pid]-[size]
+                         String[] toks = f0.getName().split("-");
+ 
+                         if (toks.length != 6) {
+                             if (log.isDebugEnabled())
+                                 log.debug("Unrecognized token file: " + f0.getName());
+ 
+                             continue;
+                         }
+ 
+                         int pid0;
+                         int size;
+ 
+                         try {
+                             pid0 = Integer.parseInt(toks[4]);
+                             size = Integer.parseInt(toks[5]);
+                         }
+                         catch (NumberFormatException ignored) {
+                             if (log.isDebugEnabled())
+                                 log.debug("Failed to parse file name: " + name);
+ 
+                             continue;
+                         }
+ 
+                         if (IpcSharedMemoryUtils.alive(pid0)) {
+                             if (log.isDebugEnabled())
+                                 log.debug("Skipping alive process: " + pid0);
+ 
+                             continue;
+                         }
+ 
+                         if (log.isDebugEnabled())
+                             log.debug("Possibly stale token file: " + f0);
+ 
+                         IpcSharedMemoryUtils.freeSystemResources(f0.getAbsolutePath(), size);
+ 
+                         if (f0.delete()) {
+                             if (log.isDebugEnabled())
+                                 log.debug("Deleted file: " + f0.getName());
+ 
+                             rmvCnt++;
+                         }
+                         else if (!f0.exists()) {
+                             if (log.isDebugEnabled())
+                                 log.debug("File has been concurrently deleted: " + f0.getName());
+ 
+                             rmvCnt++;
+                         }
+                         else if (log.isDebugEnabled())
+                             log.debug("Failed to delete file: " + f0.getName());
+                     }
+                 }
+                 finally {
+                     // Assuming that no new files can appear, since
+                     if (rmvCnt == shmemToks.length) {
+                         U.delete(f);
+ 
+                         if (log.isDebugEnabled())
+                             log.debug("Deleted empty token directory: " + f.getName());
+                     }
+                 }
+             }
+         }
+     }
+ }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ac05bb9c/modules/core/src/main/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemorySpace.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemorySpace.java
index 0000000,ba4be48..249d995
mode 000000,100644..100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemorySpace.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemorySpace.java
@@@ -1,0 -1,374 +1,374 @@@
+ /*
+  * 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.util.ipc.shmem;
+ 
+ import org.apache.ignite.*;
+ import org.apache.ignite.internal.util.typedef.internal.*;
+ 
+ import java.io.*;
+ import java.nio.*;
+ import java.util.concurrent.atomic.*;
+ import java.util.concurrent.locks.*;
+ 
+ import static org.apache.ignite.IgniteSystemProperties.*;
+ 
+ /**
+  *
+  */
+ @SuppressWarnings({"PointlessBooleanExpression", "ConstantConditions"})
+ public class IpcSharedMemorySpace implements Closeable {
+     /** Debug flag (enable for testing). */
 -    private static final boolean DEBUG = Boolean.getBoolean(GG_IPC_SHMEM_SPACE_DEBUG);
++    private static final boolean DEBUG = Boolean.getBoolean(IGNITE_IPC_SHMEM_SPACE_DEBUG);
+ 
+     /** Shared memory segment size (operable). */
+     private final int opSize;
+ 
+     /** Shared memory native pointer. */
+     private final long shmemPtr;
+ 
+     /** Shared memory ID. */
+     private final int shmemId;
+ 
+     /** Semaphore set ID. */
+     private final int semId;
+ 
+     /** Local closed flag. */
+     private final AtomicBoolean closed = new AtomicBoolean();
+ 
+     /** {@code True} if space has been closed. */
+     private final boolean isReader;
+ 
+     /** Lock to protect readers and writers from concurrent close. */
+     private final ReadWriteLock lock = new ReentrantReadWriteLock();
+ 
+     /** */
+     private final int writerPid;
+ 
+     /** */
+     private final int readerPid;
+ 
+     /** */
+     private final String tokFileName;
+ 
+     /** */
+     private final IgniteLogger log;
+ 
+     /**
+      * This will allocate system resources for the space.
+      *
+      * @param tokFileName Token filename.
+      * @param writerPid Writer PID.
+      * @param readerPid Reader PID.
+      * @param size Size in bytes.
+      * @param reader {@code True} if reader.
+      * @param parent Parent logger.
+      * @throws IgniteCheckedException If failed.
+      */
+     public IpcSharedMemorySpace(String tokFileName, int writerPid, int readerPid, int size, boolean reader,
+                                 IgniteLogger parent) throws IgniteCheckedException {
+         assert size > 0 : "Size cannot be less than 1 byte";
+ 
+         log = parent.getLogger(IpcSharedMemorySpace.class);
+ 
+         opSize = size;
+ 
+         shmemPtr = IpcSharedMemoryUtils.allocateSystemResources(tokFileName, size, DEBUG && log.isDebugEnabled());
+ 
+         shmemId = IpcSharedMemoryUtils.sharedMemoryId(shmemPtr);
+         semId = IpcSharedMemoryUtils.semaphoreId(shmemPtr);
+ 
+         isReader = reader;
+ 
+         this.tokFileName = tokFileName;
+         this.readerPid = readerPid;
+         this.writerPid = writerPid;
+ 
+         if (DEBUG && log.isDebugEnabled())
+             log.debug("Shared memory space has been created: " + this);
+     }
+ 
+     /**
+      * This should be called in order to attach to already allocated system resources.
+      *
+      * @param tokFileName Token file name (for proper cleanup).
+      * @param writerPid Writer PID.
+      * @param readerPid Reader PID.
+      * @param size Size.
+      * @param reader Reader flag.
+      * @param shmemId Shared memory ID.
+      * @param parent Logger.
+      * @throws IgniteCheckedException If failed.
+      */
+     public IpcSharedMemorySpace(String tokFileName, int writerPid, int readerPid, int size, boolean reader,
+                                 int shmemId, IgniteLogger parent) throws IgniteCheckedException {
+         assert size > 0 : "Size cannot be less than 1 byte";
+ 
+         log = parent.getLogger(IpcSharedMemorySpace.class);
+ 
+         opSize = size;
+         isReader = reader;
+         this.shmemId = shmemId;
+         this.writerPid = writerPid;
+         this.readerPid = readerPid;
+         this.tokFileName = tokFileName;
+ 
+         shmemPtr = IpcSharedMemoryUtils.attach(shmemId, DEBUG && log.isDebugEnabled());
+ 
+         semId = IpcSharedMemoryUtils.semaphoreId(shmemPtr);
+     }
+ 
+     /**
+      * @param buf Buffer.
+      * @param off Offset.
+      * @param len Length.
+      * @param timeout Operation timeout in milliseconds ({@code 0} to wait forever).
+      * @throws IgniteCheckedException If space has been closed.
+      * @throws IpcSharedMemoryOperationTimedoutException If operation times out.
+      */
+     public void write(byte[] buf, int off, int len, long timeout) throws IgniteCheckedException,
+             IpcSharedMemoryOperationTimedoutException {
+         assert buf != null;
+         assert len > 0;
+         assert buf.length >= off + len;
+         assert timeout >= 0;
+ 
+         assert !isReader;
+ 
+         lock.readLock().lock();
+ 
+         try {
+             if (closed.get())
+                 throw new IgniteCheckedException("Shared memory segment has been closed: " + this);
+ 
+             IpcSharedMemoryUtils.writeSharedMemory(shmemPtr, buf, off, len, timeout);
+         }
+         finally {
+             lock.readLock().unlock();
+         }
+     }
+ 
+     /**
+      * @param buf Buffer.
+      * @param off Offset.
+      * @param len Length.
+      * @param timeout Operation timeout in milliseconds ({@code 0} to wait forever).
+      * @throws IgniteCheckedException If space has been closed.
+      * @throws IpcSharedMemoryOperationTimedoutException If operation times out.
+      */
+     public void write(ByteBuffer buf, int off, int len, long timeout) throws IgniteCheckedException,
+             IpcSharedMemoryOperationTimedoutException {
+         assert buf != null;
+         assert len > 0;
+         assert buf.limit() >= off + len;
+         assert timeout >= 0;
+         assert !isReader;
+ 
+         lock.readLock().lock();
+ 
+         try {
+             if (closed.get())
+                 throw new IgniteCheckedException("Shared memory segment has been closed: " + this);
+ 
+             IpcSharedMemoryUtils.writeSharedMemoryByteBuffer(shmemPtr, buf, off, len, timeout);
+         }
+         finally {
+             lock.readLock().unlock();
+         }
+     }
+ 
+     /**
+      * Blocks until at least 1 byte is read.
+      *
+      * @param buf Buffer.
+      * @param off Offset.
+      * @param len Length.
+      * @param timeout Operation timeout in milliseconds ({@code 0} to wait forever).
+      * @return Read bytes count.
+      * @throws IgniteCheckedException If space has been closed.
+      * @throws IpcSharedMemoryOperationTimedoutException If operation times out.
+      */
+     public int read(byte[] buf, int off, int len, long timeout) throws IgniteCheckedException,
+             IpcSharedMemoryOperationTimedoutException {
+         assert buf != null;
+         assert len > 0;
+         assert buf.length >= off + len;
+ 
+         assert isReader;
+ 
+         lock.readLock().lock();
+ 
+         try {
+             if (closed.get())
+                 throw new IgniteCheckedException("Shared memory segment has been closed: " + this);
+ 
+             return (int) IpcSharedMemoryUtils.readSharedMemory(shmemPtr, buf, off, len, timeout);
+         }
+         finally {
+             lock.readLock().unlock();
+         }
+     }
+ 
+     /**
+      * Blocks until at least 1 byte is read.
+      *
+      * @param buf Buffer.
+      * @param off Offset.
+      * @param len Length.
+      * @param timeout Operation timeout in milliseconds ({@code 0} to wait forever).
+      * @return Read bytes count.
+      * @throws IgniteCheckedException If space has been closed.
+      * @throws IpcSharedMemoryOperationTimedoutException If operation times out.
+      */
+     public int read(ByteBuffer buf, int off, int len, long timeout) throws IgniteCheckedException,
+             IpcSharedMemoryOperationTimedoutException {
+         assert buf != null;
+         assert len > 0;
+         assert buf.capacity() >= off + len;
+         assert isReader;
+ 
+         lock.readLock().lock();
+ 
+         try {
+             if (closed.get())
+                 throw new IgniteCheckedException("Shared memory segment has been closed: " + this);
+ 
+             return (int) IpcSharedMemoryUtils.readSharedMemoryByteBuffer(shmemPtr, buf, off, len, timeout);
+         }
+         finally {
+             lock.readLock().unlock();
+         }
+     }
+ 
+     /** {@inheritDoc} */
+     @Override public void close() {
+         close0(false);
+     }
+ 
+     /**
+      * Forcibly closes the space and frees all system resources.
+      * <p>
+      * This method should be called with caution as it may result to the other-party
+      * process crash. It is intended to call when there was an IO error during handshake
+      * and other party has not yet attached to the space.
+      */
+     public void forceClose() {
+         close0(true);
+     }
+ 
+     /**
+      * @return Shared memory ID.
+      */
+     public int sharedMemoryId() {
+         return shmemId;
+     }
+ 
+     /**
+      * @return Semaphore set ID.
+      */
+     public int semaphoreId() {
+         return semId;
+     }
+ 
+     /**
+      * @param force {@code True} to close the space.
+      */
+     private void close0(boolean force) {
+         if (!closed.compareAndSet(false, true))
+             return;
+ 
+         IpcSharedMemoryUtils.ipcClose(shmemPtr);
+ 
+         // Wait all readers and writes to leave critical section.
+         lock.writeLock().lock();
+ 
+         try {
+             IpcSharedMemoryUtils.freeSystemResources(tokFileName, shmemPtr, force);
+         }
+         finally {
+             lock.writeLock().unlock();
+         }
+ 
+         if (DEBUG && log.isDebugEnabled())
+             log.debug("Shared memory space has been closed: " + this);
+     }
+ 
+     /**
+      * @return Bytes available for read.
+      * @throws IgniteCheckedException If failed.
+      */
+     public int unreadCount() throws IgniteCheckedException {
+         lock.readLock().lock();
+ 
+         try {
+             if (closed.get())
+                 throw new IgniteCheckedException("Shared memory segment has been closed: " + this);
+ 
+             return IpcSharedMemoryUtils.unreadCount(shmemPtr);
+         }
+         finally {
+             lock.readLock().unlock();
+         }
+     }
+ 
+     /**
+      * @return Shared memory pointer.
+      */
+     public long sharedMemPointer() {
+         return shmemPtr;
+     }
+ 
+     /**
+      * @return Reader PID.
+      */
+     public int readerPid() {
+         return readerPid;
+     }
+ 
+     /**
+      * @return Writer PID.
+      */
+     public int writerPid() {
+         return writerPid;
+     }
+ 
+     /**
+      * @return Vis-a-vis PID.
+      */
+     public int otherPartyPid() {
+         return isReader ? writerPid : readerPid;
+     }
+ 
+     /**
+      * @return Token file name used to create shared memory space.
+      */
+     public String tokenFileName() {
+         return tokFileName;
+     }
+ 
+     /**
+      * @return Space size.
+      */
+     public int size() {
+         return opSize;
+     }
+ 
+     /** {@inheritDoc} */
+     @Override public String toString() {
+         return S.toString(IpcSharedMemorySpace.class, this, "closed", closed.get());
+     }
+ }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ac05bb9c/modules/core/src/main/java/org/apache/ignite/marshaller/optimized/IgniteOptimizedMarshaller.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ac05bb9c/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ac05bb9c/modules/core/src/test/java/org/apache/ignite/internal/util/GridStartupWithSpecifiedWorkDirectorySelfTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ac05bb9c/modules/core/src/test/java/org/apache/ignite/internal/util/GridStartupWithUndefinedGridGainHomeSelfTest.java
----------------------------------------------------------------------
diff --cc modules/core/src/test/java/org/apache/ignite/internal/util/GridStartupWithUndefinedGridGainHomeSelfTest.java
index 095bd2d,a56f8b2..8fae702
--- a/modules/core/src/test/java/org/apache/ignite/internal/util/GridStartupWithUndefinedGridGainHomeSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/util/GridStartupWithUndefinedGridGainHomeSelfTest.java
@@@ -29,10 -29,10 +29,10 @@@ import org.apache.ignite.internal.util.
  import org.apache.ignite.testframework.junits.common.*;
  
  import static org.apache.ignite.IgniteSystemProperties.*;
- import static org.apache.ignite.internal.util.GridUtils.*;
+ import static org.apache.ignite.internal.util.IgniteUtils.*;
  
  /**
 - * Checks that node can be started without operations with undefined GRIDGAIN_HOME.
 + * Checks that node can be started without operations with undefined IGNITE_HOME.
   * <p>
   * Notes:
   * 1. The test intentionally extends JUnit {@link TestCase} class to make the test

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ac05bb9c/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/deploy/VisorDeployCommand.scala
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ac05bb9c/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/start/VisorStartCommand.scala
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ac05bb9c/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala
----------------------------------------------------------------------


[10/50] [abbrv] incubator-ignite git commit: # sprint-1 Fixed typo after auto renaming.

Posted by se...@apache.org.
# sprint-1 Fixed typo after auto renaming.


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

Branch: refs/heads/ignite-sql
Commit: 14ad3ea5c988ab0a034fbfb389b9274f9631fd69
Parents: 7eebc7e
Author: AKuznetsov <ak...@gridgain.com>
Authored: Thu Jan 29 22:30:51 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Thu Jan 29 22:30:51 2015 +0700

----------------------------------------------------------------------
 .../org/apache/ignite/visor/commands/alert/VisorAlertCommand.scala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/14ad3ea5/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/alert/VisorAlertCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/alert/VisorAlertCommand.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/alert/VisorAlertCommand.scala
index 1899ca4..837b424 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/alert/VisorAlertCommand.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/alert/VisorAlertCommand.scala
@@ -278,7 +278,7 @@ class VisorAlertCommand {
                             // Grid-wide metrics (not node specific).
                             case "cc" if v != null => gf = makeGridFilter(v, gf, grid.metrics().getTotalCpus)
                             case "nc" if v != null => gf = makeGridFilter(v, gf, grid.nodes().size)
-                            case "hc" if v != null => gf = makeGridFilter(v, gf, IgniteUtils.neighborhood(grid.nodes()).size)
+                            case "hc" if v != null => gf = makeGridFilter(v, gf, U.neighborhood(grid.nodes()).size)
                             case "cl" if v != null => gf = makeGridFilter(v, gf,
                                 () => (grid.metrics().getAverageCpuLoad * 100).toLong)
 


[38/50] [abbrv] incubator-ignite git commit: #Tests: Fix GridCachePutAllFailoverSelfTest.

Posted by se...@apache.org.
#Tests: Fix GridCachePutAllFailoverSelfTest.


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

Branch: refs/heads/ignite-sql
Commit: 57f55f6dfba2a6661f46ca5184131e6689c20dd1
Parents: ff01e66
Author: ivasilinets <iv...@gridgain.com>
Authored: Fri Jan 30 15:39:25 2015 +0300
Committer: ivasilinets <iv...@gridgain.com>
Committed: Fri Jan 30 15:39:25 2015 +0300

----------------------------------------------------------------------
 .../processors/cache/GridCachePutAllFailoverSelfTest.java        | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/57f55f6d/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePutAllFailoverSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePutAllFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePutAllFailoverSelfTest.java
index 80f62d3..86c2c05 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePutAllFailoverSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePutAllFailoverSelfTest.java
@@ -51,7 +51,7 @@ public class GridCachePutAllFailoverSelfTest extends GridCommonAbstractTest {
     private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
 
     /** Size of the test map. */
-    private static final int TEST_MAP_SIZE = 100000;
+    private static final int TEST_MAP_SIZE = 30000;
 
     /** Cache name. */
     private static final String CACHE_NAME = "partitioned";
@@ -327,7 +327,7 @@ public class GridCachePutAllFailoverSelfTest extends GridCommonAbstractTest {
 
             if (!failedWait && !absentKeys.isEmpty()) {
                 // Give some time to preloader.
-                U.sleep(15000);
+                U.sleep(20000);
 
                 absentKeys = findAbsentKeys(runningWorkers.get(0), testKeys);
             }


[14/50] [abbrv] incubator-ignite git commit: # ignite-sprint-1 fixed build.

Posted by se...@apache.org.
# ignite-sprint-1 fixed build.


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

Branch: refs/heads/ignite-sql
Commit: 4fe57d44373294700dcdeb42206bd525ce84475a
Parents: bdebb40
Author: AKuznetsov <ak...@gridgain.com>
Authored: Fri Jan 30 09:55:21 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Fri Jan 30 09:55:21 2015 +0700

----------------------------------------------------------------------
 assembly/release-hadoop.xml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4fe57d44/assembly/release-hadoop.xml
----------------------------------------------------------------------
diff --git a/assembly/release-hadoop.xml b/assembly/release-hadoop.xml
index 7dbd5ea..576425c 100644
--- a/assembly/release-hadoop.xml
+++ b/assembly/release-hadoop.xml
@@ -39,15 +39,15 @@
             <outputDirectory>/docs</outputDirectory>
         </file>
         <file>
-            <source>docs/core-site.gridgain.xml</source>
+            <source>docs/core-site.ignite.xml</source>
             <outputDirectory>/docs</outputDirectory>
         </file>
         <file>
-            <source>docs/mapred-site.gridgain.xml</source>
+            <source>docs/mapred-site.ignite.xml</source>
             <outputDirectory>/docs</outputDirectory>
         </file>
         <file>
-            <source>docs/hive-site.gridgain.xml</source>
+            <source>docs/hive-site.ignite.xml</source>
             <outputDirectory>/docs</outputDirectory>
         </file>
     </files>


[27/50] [abbrv] incubator-ignite git commit: Tests: Fix GridMessagingSelfTest.

Posted by se...@apache.org.
Tests: Fix GridMessagingSelfTest.


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

Branch: refs/heads/ignite-sql
Commit: 4da5e29a5f4d7e47cf42fdc2daf53370efe0eb6b
Parents: b6eb388
Author: ivasilinets <iv...@gridgain.com>
Authored: Fri Jan 30 13:05:59 2015 +0300
Committer: ivasilinets <iv...@gridgain.com>
Committed: Fri Jan 30 13:05:59 2015 +0300

----------------------------------------------------------------------
 .../java/org/apache/ignite/messaging/GridMessagingSelfTest.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4da5e29a/modules/core/src/test/java/org/apache/ignite/messaging/GridMessagingSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/messaging/GridMessagingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/messaging/GridMessagingSelfTest.java
index 125a438..dea2172 100644
--- a/modules/core/src/test/java/org/apache/ignite/messaging/GridMessagingSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/messaging/GridMessagingSelfTest.java
@@ -67,7 +67,7 @@ public class GridMessagingSelfTest extends GridCommonAbstractTest {
     private static final Integer I_TOPIC_2 = 2;
 
     /** */
-    public static final String EXT_RESOURCE_CLS_NAME = "org.apache.ignite.tests.p2p.GridP2PAwareTestUserResource";
+    public static final String EXT_RESOURCE_CLS_NAME = "org.apache.ignite.tests.p2p.TestUserResource";
 
     /** Shared IP finder. */
     private final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);


[28/50] [abbrv] incubator-ignite git commit: Fix IpcSharedMemoryNativeLoaderSelfTest # testLoadWithCorruptedLibFile (add classpath)

Posted by se...@apache.org.
Fix IpcSharedMemoryNativeLoaderSelfTest # testLoadWithCorruptedLibFile (add classpath)


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

Branch: refs/heads/ignite-sql
Commit: 746ce78ac39f63374dfe76129bd226b1fa3b2c75
Parents: b6eb388
Author: Artem SHutak <as...@gridgain.com>
Authored: Fri Jan 30 13:21:26 2015 +0300
Committer: Artem SHutak <as...@gridgain.com>
Committed: Fri Jan 30 13:21:26 2015 +0300

----------------------------------------------------------------------
 .../util/ipc/shmem/IpcSharedMemoryNativeLoaderSelfTest.java        | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/746ce78a/modules/core/src/test/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryNativeLoaderSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryNativeLoaderSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryNativeLoaderSelfTest.java
index e70c207..65fa543 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryNativeLoaderSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryNativeLoaderSelfTest.java
@@ -46,7 +46,7 @@ public class IpcSharedMemoryNativeLoaderSelfTest extends TestCase {
             null,
             null,
             Collections.<String>emptyList(),
-            null
+            System.getProperty("surefire.test.class.path")
         ).getProcess();
 
         readStreams(ps);


[03/50] [abbrv] incubator-ignite git commit: GridUtils -> IgniteUtils

Posted by se...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fc768b83/modules/core/src/main/java/org/apache/ignite/internal/util/GridUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/GridUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/util/GridUtils.java
deleted file mode 100644
index b3627fc..0000000
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/GridUtils.java
+++ /dev/null
@@ -1,9141 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.util;
-
-import org.apache.ignite.*;
-import org.apache.ignite.cache.*;
-import org.apache.ignite.cluster.*;
-import org.apache.ignite.compute.*;
-import org.apache.ignite.configuration.*;
-import org.apache.ignite.events.*;
-import org.apache.ignite.internal.*;
-import org.apache.ignite.internal.mxbean.*;
-import org.apache.ignite.internal.processors.cache.*;
-import org.apache.ignite.internal.processors.cache.version.*;
-import org.apache.ignite.lang.*;
-import org.apache.ignite.lifecycle.*;
-import org.apache.ignite.portables.*;
-import org.apache.ignite.spi.*;
-import org.apache.ignite.internal.managers.deployment.*;
-import org.apache.ignite.internal.processors.streamer.*;
-import org.apache.ignite.spi.discovery.*;
-import org.apache.ignite.internal.util.io.*;
-import org.apache.ignite.internal.util.lang.*;
-import org.apache.ignite.internal.util.typedef.*;
-import org.apache.ignite.internal.util.typedef.internal.*;
-import org.apache.ignite.internal.util.worker.*;
-import org.jdk8.backport.*;
-import org.jetbrains.annotations.*;
-import sun.misc.*;
-
-import javax.management.*;
-import javax.naming.*;
-import javax.net.ssl.*;
-import java.io.*;
-import java.lang.annotation.Annotation;
-import java.lang.management.*;
-import java.lang.reflect.Array;
-import java.lang.reflect.*;
-import java.math.*;
-import java.net.*;
-import java.nio.*;
-import java.nio.channels.*;
-import java.nio.channels.spi.*;
-import java.nio.charset.*;
-import java.security.*;
-import java.security.cert.*;
-import java.sql.*;
-import java.sql.Timestamp;
-import java.text.*;
-import java.util.*;
-import java.util.Date;
-import java.util.concurrent.*;
-import java.util.concurrent.atomic.*;
-import java.util.concurrent.locks.*;
-import java.util.jar.*;
-import java.util.logging.*;
-import java.util.regex.*;
-import java.util.zip.*;
-
-import static org.apache.ignite.IgniteSystemProperties.*;
-import static org.apache.ignite.events.IgniteEventType.*;
-import static org.apache.ignite.internal.GridNodeAttributes.*;
-
-/**
- * Collection of utility methods used throughout the system.
- */
-@SuppressWarnings({"UnusedReturnValue", "UnnecessaryFullyQualifiedName"})
-public abstract class GridUtils {
-    /** Unsafe. */
-    private static final Unsafe UNSAFE = GridUnsafe.unsafe();
-
-    /** {@code True} if {@code unsafe} should be used for array copy. */
-    private static final boolean UNSAFE_BYTE_ARR_CP = unsafeByteArrayCopyAvailable();
-
-    /** Offset. */
-    private static final int BYTE_ARRAY_DATA_OFFSET = UNSAFE.arrayBaseOffset(byte[].class);
-
-    /** Sun-specific JDK constructor factory for objects that don't have empty constructor. */
-    private static final Method CTOR_FACTORY;
-
-    /** Sun JDK reflection factory. */
-    private static final Object SUN_REFLECT_FACTORY;
-
-    /** Public {@code java.lang.Object} no-argument constructor. */
-    private static final Constructor OBJECT_CTOR;
-
-    /** All grid event names. */
-    private static final Map<Integer, String> GRID_EVT_NAMES = new HashMap<>();
-
-    /** All grid events. */
-    private static final int[] GRID_EVTS;
-
-    /** Empty integers array. */
-    private static final int[] EMPTY_INTS = new int[0];
-
-    /** Empty  longs. */
-    private static final long[] EMPTY_LONGS = new long[0];
-
-    /** System line separator. */
-    private static final String NL = System.getProperty("line.separator");
-
-    /** Default user version. */
-    public static final String DFLT_USER_VERSION = "0";
-
-    /** Cache for {@link GridPeerDeployAware} fields to speed up reflection. */
-    private static final ConcurrentMap<String, IgniteBiTuple<Class<?>, Collection<Field>>> p2pFields =
-        new ConcurrentHashMap8<>();
-
-    /** Secure socket protocol to use. */
-    private static final String HTTPS_PROTOCOL = "TLS";
-
-    /** Project home directory. */
-    private static volatile GridTuple<String> ggHome;
-
-    /** Project work directory. */
-    private static volatile String ggWork;
-
-    /** OS JDK string. */
-    private static String osJdkStr;
-
-    /** OS string. */
-    private static String osStr;
-
-    /** JDK string. */
-    private static String jdkStr;
-
-    /** Indicates whether current OS is Windows 95. */
-    private static boolean win95;
-
-    /** Indicates whether current OS is Windows 98. */
-    private static boolean win98;
-
-    /** Indicates whether current OS is Windows NT. */
-    private static boolean winNt;
-
-    /** Indicates whether current OS is Windows Vista. */
-    private static boolean winVista;
-
-    /** Indicates whether current OS is Windows 7. */
-    private static boolean win7;
-
-    /** Indicates whether current OS is Windows 8. */
-    private static boolean win8;
-
-    /** Indicates whether current OS is Windows 8.1. */
-    private static boolean win81;
-
-    /** Indicates whether current OS is some version of Windows. */
-    private static boolean unknownWin;
-
-    /** Indicates whether current OS is Windows 2000. */
-    private static boolean win2k;
-
-    /** Indicates whether current OS is Windows XP. */
-    private static boolean winXp;
-
-    /** Indicates whether current OS is Windows Server 2003. */
-    private static boolean win2003;
-
-    /** Indicates whether current OS is Windows Server 2008. */
-    private static boolean win2008;
-
-    /** Indicates whether current OS is UNIX flavor. */
-    private static boolean unix;
-
-    /** Indicates whether current OS is Solaris. */
-    private static boolean solaris;
-
-    /** Indicates whether current OS is Linux flavor. */
-    private static boolean linux;
-
-    /** Indicates whether current OS is NetWare. */
-    private static boolean netware;
-
-    /** Indicates whether current OS is Mac OS. */
-    private static boolean mac;
-
-    /** Indicates whether current OS architecture is Sun Sparc. */
-    private static boolean sparc;
-
-    /** Indicates whether current OS architecture is Intel X86. */
-    private static boolean x86;
-
-    /** Name of the underlying OS. */
-    private static String osName;
-
-    /** Version of the underlying OS. */
-    private static String osVer;
-
-    /** CPU architecture of the underlying OS. */
-    private static String osArch;
-
-    /** Name of the Java Runtime. */
-    private static String javaRtName;
-
-    /** Name of the Java Runtime version. */
-    private static String javaRtVer;
-
-    /** Name of the JDK vendor. */
-    private static String jdkVendor;
-
-    /** Name of the JDK. */
-    private static String jdkName;
-
-    /** Version of the JDK. */
-    private static String jdkVer;
-
-    /** Name of JVM specification. */
-    private static String jvmSpecName;
-
-    /** Version of JVM implementation. */
-    private static String jvmImplVer;
-
-    /** Vendor's name of JVM implementation. */
-    private static String jvmImplVendor;
-
-    /** Name of the JVM implementation. */
-    private static String jvmImplName;
-
-    /** JMX domain as 'xxx.gridgain'. */
-    public static final String JMX_DOMAIN = GridUtils.class.getName().substring(0, GridUtils.class.getName().
-        indexOf('.', GridUtils.class.getName().indexOf('.') + 1));
-
-    /** Network packet header. */
-    public static final byte[] GG_HEADER = U.intToBytes(0x00004747);
-
-    /** Default buffer size = 4K. */
-    private static final int BUF_SIZE = 4096;
-
-    /** Byte bit-mask. */
-    private static final int MASK = 0xf;
-
-    /** Long date format pattern for log messages. */
-    private static final SimpleDateFormat LONG_DATE_FMT = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss");
-
-    /**
-     * Short date format pattern for log messages in "quiet" mode.
-     * Only time is included since we don't expect "quiet" mode to be used
-     * for longer runs.
-     */
-    private static final SimpleDateFormat SHORT_DATE_FMT = new SimpleDateFormat("HH:mm:ss");
-
-    /** Debug date format. */
-    private static final SimpleDateFormat DEBUG_DATE_FMT = new SimpleDateFormat("HH:mm:ss,SSS");
-
-    /** Cached local host address to make sure that every time the same local host is returned. */
-    private static InetAddress locHost;
-
-    /** */
-    static volatile long curTimeMillis = System.currentTimeMillis();
-
-    /** Primitive class map. */
-    private static final Map<String, Class<?>> primitiveMap = new HashMap<>(16, .5f);
-
-    /** Boxed class map. */
-    private static final Map<Class<?>, Class<?>> boxedClsMap = new HashMap<>(16, .5f);
-
-    /** Class loader used to load GridGain. */
-    private static final ClassLoader gridClassLoader = GridUtils.class.getClassLoader();
-
-    /** MAC OS invalid argument socket error message. */
-    public static final String MAC_INVALID_ARG_MSG = "On MAC OS you may have too many file descriptors open " +
-        "(simple restart usually solves the issue)";
-
-    /** Default help pages. */
-    public static final List<String> DFLT_HELP_LINKS = Arrays.asList(
-        "Troubleshooting:      http://bit.ly/GridGain-Troubleshooting",
-        "Documentation Center: http://bit.ly/GridGain-Documentation");
-
-    /** Portable classes. */
-    private static final Collection<Class<?>> PORTABLE_CLS = new HashSet<>();
-
-    /** GridGain Logging Directory. */
-    public static final String GRIDGAIN_LOG_DIR = System.getenv(GG_LOG_DIR);
-
-    /** GridGain Work Directory. */
-    public static final String GRIDGAIN_WORK_DIR = System.getenv(GG_WORK_DIR);
-
-    /** Clock timer. */
-    private static Thread timer;
-
-    /** Grid counter. */
-    private static int gridCnt;
-
-    /** Mutex. */
-    private static final Object mux = new Object();
-
-    /**
-     * Initializes enterprise check.
-     */
-    static {
-        String osName = System.getProperty("os.name");
-
-        String osLow = osName.toLowerCase();
-
-        // OS type detection.
-        if (osLow.contains("win")) {
-            if (osLow.contains("95"))
-                win95 = true;
-            else if (osLow.contains("98"))
-                win98 = true;
-            else if (osLow.contains("nt"))
-                winNt = true;
-            else if (osLow.contains("2000"))
-                win2k = true;
-            else if (osLow.contains("vista"))
-                winVista = true;
-            else if (osLow.contains("xp"))
-                winXp = true;
-            else if (osLow.contains("2003"))
-                win2003 = true;
-            else if (osLow.contains("2008"))
-                win2008 = true;
-            else if (osLow.contains("7"))
-                win7 = true;
-            else if (osLow.contains("8.1"))
-                win81 = true;
-            else if (osLow.contains("8"))
-                win8 = true;
-            else
-                unknownWin = true;
-        }
-        else if (osLow.contains("netware"))
-            netware = true;
-        else if (osLow.contains("mac os"))
-            mac = true;
-        else {
-            // UNIXs flavors tokens.
-            for (CharSequence os : new String[]{"ix", "inux", "olaris", "un", "ux", "sco", "bsd", "att"})
-                if (osLow.contains(os)) {
-                    unix = true;
-
-                    break;
-                }
-
-            // UNIX name detection.
-            if (osLow.contains("olaris"))
-                solaris = true;
-            else if (osLow.contains("inux"))
-                linux = true;
-        }
-
-        String osArch = System.getProperty("os.arch");
-
-        String archStr = osArch.toLowerCase();
-
-        // OS architecture detection.
-        if (archStr.contains("x86"))
-            x86 = true;
-        else if (archStr.contains("sparc"))
-            sparc = true;
-
-        String javaRtName = System.getProperty("java.runtime.name");
-        String javaRtVer = System.getProperty("java.runtime.version");
-        String jdkVendor = System.getProperty("java.specification.vendor");
-        String jdkName = System.getProperty("java.specification.name");
-        String jdkVer = System.getProperty("java.specification.version");
-        String osVer = System.getProperty("os.version");
-        String jvmSpecName = System.getProperty("java.vm.specification.name");
-        String jvmImplVer = System.getProperty("java.vm.version");
-        String jvmImplVendor = System.getProperty("java.vm.vendor");
-        String jvmImplName = System.getProperty("java.vm.name");
-
-        String jdkStr = javaRtName + ' ' + javaRtVer + ' ' + jvmImplVendor + ' ' + jvmImplName + ' ' +
-            jvmImplVer;
-
-        osStr = osName + ' ' + osVer + ' ' + osArch;
-        osJdkStr = osLow + ", " + jdkStr;
-
-        // Copy auto variables to static ones.
-        GridUtils.osName = osName;
-        GridUtils.jdkName = jdkName;
-        GridUtils.jdkVendor = jdkVendor;
-        GridUtils.jdkVer = jdkVer;
-        GridUtils.jdkStr = jdkStr;
-        GridUtils.osVer = osVer;
-        GridUtils.osArch = osArch;
-        GridUtils.jvmSpecName = jvmSpecName;
-        GridUtils.jvmImplVer = jvmImplVer;
-        GridUtils.jvmImplVendor = jvmImplVendor;
-        GridUtils.jvmImplName = jvmImplName;
-        GridUtils.javaRtName = javaRtName;
-        GridUtils.javaRtVer = javaRtVer;
-
-        primitiveMap.put("byte", byte.class);
-        primitiveMap.put("short", short.class);
-        primitiveMap.put("int", int.class);
-        primitiveMap.put("long", long.class);
-        primitiveMap.put("float", float.class);
-        primitiveMap.put("double", double.class);
-        primitiveMap.put("char", char.class);
-        primitiveMap.put("boolean", boolean.class);
-
-        boxedClsMap.put(byte.class, Byte.class);
-        boxedClsMap.put(short.class, Short.class);
-        boxedClsMap.put(int.class, Integer.class);
-        boxedClsMap.put(long.class, Long.class);
-        boxedClsMap.put(float.class, Float.class);
-        boxedClsMap.put(double.class, Double.class);
-        boxedClsMap.put(char.class, Character.class);
-        boxedClsMap.put(boolean.class, Boolean.class);
-
-        try {
-            OBJECT_CTOR = Object.class.getConstructor();
-        }
-        catch (NoSuchMethodException e) {
-            throw withCause(new AssertionError("Object class does not have empty constructor (is JDK corrupted?)."), e);
-        }
-
-        // Constructor factory.
-        Method ctorFac = null;
-        Object refFac = null;
-
-        try {
-            Class<?> refFactoryCls = Class.forName("sun.reflect.ReflectionFactory");
-
-            refFac = refFactoryCls.getMethod("getReflectionFactory").invoke(null);
-
-            ctorFac = refFac.getClass().getMethod("newConstructorForSerialization", Class.class,
-                Constructor.class);
-        }
-        catch (NoSuchMethodException | ClassNotFoundException | IllegalAccessException | InvocationTargetException ignored) {
-            // No-op.
-        }
-
-        CTOR_FACTORY = ctorFac;
-        SUN_REFLECT_FACTORY = refFac;
-
-        // Disable hostname SSL verification for development and testing with self-signed certificates.
-        if (Boolean.parseBoolean(System.getProperty(GG_DISABLE_HOSTNAME_VERIFIER))) {
-            HttpsURLConnection.setDefaultHostnameVerifier(new HostnameVerifier() {
-                @Override public boolean verify(String hostname, SSLSession sslSes) {
-                    return true;
-                }
-            });
-        }
-
-        // Event names initialization.
-        for (Field field : IgniteEventType.class.getFields()) {
-            if (field.getType().equals(int.class)) {
-                try {
-                    assert field.getName().startsWith("EVT_") : "Invalid event name (should start with 'EVT_': " +
-                        field.getName();
-
-                    int type = field.getInt(null);
-
-                    String prev = GRID_EVT_NAMES.put(type, field.getName().substring(4));
-
-                    // Check for duplicate event types.
-                    assert prev == null : "Duplicate event [type=" + type + ", name1=" + prev +
-                        ", name2=" + field.getName() + ']';
-                }
-                catch (IllegalAccessException e) {
-                    throw new IgniteException(e);
-                }
-            }
-        }
-
-        // Event array initialization.
-        GRID_EVTS = toIntArray(GRID_EVT_NAMES.keySet());
-
-        // Sort for fast event lookup.
-        Arrays.sort(GRID_EVTS);
-
-        // We need to re-initialize EVTS_ALL and EVTS_ALL_MINUS_METRIC_UPDATE
-        // because they may have been initialized to null before GRID_EVTS were initialized.
-        if (EVTS_ALL == null || EVTS_ALL_MINUS_METRIC_UPDATE == null) {
-            try {
-                Field f1 = IgniteEventType.class.getDeclaredField("EVTS_ALL");
-                Field f2 = IgniteEventType.class.getDeclaredField("EVTS_ALL_MINUS_METRIC_UPDATE");
-
-                assert f1 != null;
-                assert f2 != null;
-
-                // We use unsafe operations to update static fields on interface because
-                // they are treated as static final and cannot be updated via standard reflection.
-                UNSAFE.putObjectVolatile(UNSAFE.staticFieldBase(f1), UNSAFE.staticFieldOffset(f1), gridEvents());
-                UNSAFE.putObjectVolatile(UNSAFE.staticFieldBase(f2), UNSAFE.staticFieldOffset(f2),
-                    gridEvents(EVT_NODE_METRICS_UPDATED));
-
-                assert EVTS_ALL != null;
-                assert EVTS_ALL.length == GRID_EVTS.length;
-
-                assert EVTS_ALL_MINUS_METRIC_UPDATE != null;
-                assert EVTS_ALL_MINUS_METRIC_UPDATE.length == GRID_EVTS.length - 1;
-
-                // Validate correctness.
-                for (int type : GRID_EVTS) {
-                    assert containsIntArray(EVTS_ALL, type);
-
-                    if (type != EVT_NODE_METRICS_UPDATED)
-                        assert containsIntArray(EVTS_ALL_MINUS_METRIC_UPDATE, type);
-                }
-
-                assert !containsIntArray(EVTS_ALL_MINUS_METRIC_UPDATE, EVT_NODE_METRICS_UPDATED);
-            }
-            catch (NoSuchFieldException e) {
-                throw new IgniteException(e);
-            }
-        }
-
-        PORTABLE_CLS.add(Byte.class);
-        PORTABLE_CLS.add(Short.class);
-        PORTABLE_CLS.add(Integer.class);
-        PORTABLE_CLS.add(Long.class);
-        PORTABLE_CLS.add(Float.class);
-        PORTABLE_CLS.add(Double.class);
-        PORTABLE_CLS.add(Character.class);
-        PORTABLE_CLS.add(Boolean.class);
-        PORTABLE_CLS.add(String.class);
-        PORTABLE_CLS.add(UUID.class);
-        PORTABLE_CLS.add(Date.class);
-        PORTABLE_CLS.add(Timestamp.class);
-        PORTABLE_CLS.add(byte[].class);
-        PORTABLE_CLS.add(short[].class);
-        PORTABLE_CLS.add(int[].class);
-        PORTABLE_CLS.add(long[].class);
-        PORTABLE_CLS.add(float[].class);
-        PORTABLE_CLS.add(double[].class);
-        PORTABLE_CLS.add(char[].class);
-        PORTABLE_CLS.add(boolean[].class);
-        PORTABLE_CLS.add(String[].class);
-        PORTABLE_CLS.add(UUID[].class);
-        PORTABLE_CLS.add(Date[].class);
-        PORTABLE_CLS.add(Timestamp[].class);
-    }
-
-    /**
-     * @return System time approximated by 10 ms.
-     */
-    public static long currentTimeMillis() {
-        return curTimeMillis;
-    }
-
-    /**
-     * @return Value of {@link System#nanoTime()} in microseconds.
-     */
-    public static long microTime() {
-        return System.nanoTime() / 1000;
-    }
-
-    /**
-     * Gets nearest power of 2 larger or equal than v.
-     *
-     * @param v Value.
-     * @return Nearest power of 2.
-     */
-    public static int ceilPow2(int v) {
-        v--;
-
-        v |= v >> 1;
-        v |= v >> 2;
-        v |= v >> 4;
-        v |= v >> 8;
-        v |= v >> 16;
-
-        return ++v;
-    }
-
-    /**
-     * @param i Value.
-     * @return {@code true} If the given value is power of 2 (0 is not power of 2).
-     */
-    public static boolean isPow2(int i) {
-        return i > 0 && (i & (i - 1)) == 0;
-    }
-
-    /**
-     * Return SUN specific constructor factory.
-     *
-     * @return SUN specific constructor factory.
-     */
-    @Nullable public static Method ctorFactory() {
-        return CTOR_FACTORY;
-    }
-
-    /**
-     * @return Empty constructor for object class.
-     */
-    public static Constructor objectConstructor() {
-        return OBJECT_CTOR;
-    }
-
-    /**
-     * SUN JDK specific reflection factory for objects without public constructor.
-     *
-     * @return Reflection factory for objects without public constructor.
-     */
-    @Nullable public static Object sunReflectionFactory() {
-        return SUN_REFLECT_FACTORY;
-    }
-
-    /**
-     * Gets name for given grid event type.
-     *
-     * @param type Event type.
-     * @return Event name.
-     */
-    public static String gridEventName(int type) {
-        String name = GRID_EVT_NAMES.get(type);
-
-        return name != null ? name : Integer.toString(type);
-    }
-
-    /**
-     * Gets all event types.
-     *
-     * @param excl Optional exclude events.
-     * @return All events minus excluded ones.
-     */
-    public static int[] gridEvents(final int... excl) {
-        if (F.isEmpty(excl))
-            return GRID_EVTS;
-
-        List<Integer> evts = toIntList(GRID_EVTS, new P1<Integer>() {
-            @Override
-            public boolean apply(Integer i) {
-                return !containsIntArray(excl, i);
-            }
-        });
-
-        return toIntArray(evts);
-    }
-
-    /**
-     * @param discoSpi Discovery SPI.
-     * @return {@code True} if ordering is supported.
-     */
-    public static boolean discoOrdered(DiscoverySpi discoSpi) {
-        DiscoverySpiOrderSupport ann = U.getAnnotation(discoSpi.getClass(), DiscoverySpiOrderSupport.class);
-
-        return ann != null && ann.value();
-    }
-
-    /**
-     * @return Checks if disco ordering should be enforced.
-     */
-    public static boolean relaxDiscoveryOrdered() {
-        return "true".equalsIgnoreCase(System.getProperty(GG_NO_DISCO_ORDER));
-    }
-
-    /**
-     * This method should be used for adding quick debug statements in code
-     * while debugging. Calls to this method should never be committed to master.
-     *
-     * @param msg Message to debug.
-     * @deprecated Calls to this method should never be committed to master.
-     */
-    @Deprecated
-    public static void debug(Object msg) {
-        X.println(debugPrefix() + msg);
-    }
-
-    /**
-     * This method should be used for adding quick debug statements in code
-     * while debugging. Calls to this method should never be committed to master.
-     *
-     * @param msg Message to debug.
-     * @deprecated Calls to this method should never be committed to master.
-     */
-    @Deprecated
-    public static void debugx(String msg) {
-        X.printerrln(debugPrefix() + msg);
-    }
-
-    /**
-     * This method should be used for adding quick debug statements in code
-     * while debugging. Calls to this method should never be committed to master.
-     *
-     * @param log Logger.
-     * @param msg Message to debug.
-     *
-     * @deprecated Calls to this method should never be committed to master.
-     */
-    @Deprecated
-    public static void debug(IgniteLogger log, String msg) {
-        log.info(msg);
-    }
-
-    /**
-     * Prints stack trace of the current thread to {@code System.out}.
-     *
-     * @deprecated Calls to this method should never be committed to master.
-     */
-    @SuppressWarnings("deprecation")
-    @Deprecated
-    public static void dumpStack() {
-        dumpStack("Dumping stack.");
-    }
-
-    /**
-     * Prints stack trace of the current thread to {@code System.out}.
-     *
-     * @param msg Message to print with the stack.
-     *
-     * @deprecated Calls to this method should never be committed to master.
-     */
-    @Deprecated
-    public static void dumpStack(String msg) {
-        new Exception(debugPrefix() + msg).printStackTrace(System.out);
-    }
-
-    /**
-     * @param log Logger.
-     * @param msg Message.
-     */
-    public static void dumpStack(@Nullable IgniteLogger log, String msg) {
-        U.error(log, "Dumping stack.", new Exception(msg));
-    }
-
-    /**
-     * Prints stack trace of the current thread to provided output stream.
-     *
-     * @param msg Message to print with the stack.
-     * @param out Output to dump stack to.
-     *
-     * @deprecated Calls to this method should never be committed to master.
-     */
-    @Deprecated
-    public static void dumpStack(String msg, PrintStream out) {
-        new Exception(msg).printStackTrace(out);
-    }
-
-    /**
-     * Prints stack trace of the current thread to provided logger.
-     *
-     * @param log Logger.
-     * @param msg Message to print with the stack.
-     *
-     * @deprecated Calls to this method should never be committed to master.
-     */
-    @Deprecated
-    public static void debugStack(IgniteLogger log, String msg) {
-        log.error(msg, new Exception(debugPrefix() + msg));
-    }
-
-    /**
-     * @return Common prefix for debug messages.
-     */
-    private static String debugPrefix() {
-        return '<' + DEBUG_DATE_FMT.format(new Date(System.currentTimeMillis())) + "><DEBUG><" +
-            Thread.currentThread().getName() + '>' + ' ';
-    }
-
-    /**
-     * Prints heap usage.
-     */
-    public static void debugHeapUsage() {
-        System.gc();
-
-        Runtime runtime = Runtime.getRuntime();
-
-        X.println('<' + DEBUG_DATE_FMT.format(new Date(System.currentTimeMillis())) + "><DEBUG><" +
-            Thread.currentThread().getName() + "> Heap stats [free=" + runtime.freeMemory() / (1024 * 1024) +
-            "M, total=" + runtime.totalMemory() / (1024 * 1024) + "M]");
-    }
-
-    /**
-     * Gets heap size in GB rounded to specified precision.
-     *
-     * @param node Node.
-     * @param precision Precision.
-     * @return Heap size in GB.
-     */
-    public static double heapSize(ClusterNode node, int precision) {
-        return heapSize(Collections.singleton(node), precision);
-    }
-
-    /**
-     * Gets total heap size in GB rounded to specified precision.
-     *
-     * @param nodes Nodes.
-     * @param precision Precision.
-     * @return Total heap size in GB.
-     */
-    public static double heapSize(Iterable<ClusterNode> nodes, int precision) {
-        // In bytes.
-        double heap = 0.0;
-
-        for (ClusterNode n : nodesPerJvm(nodes)) {
-            ClusterMetrics m = n.metrics();
-
-            heap += Math.max(m.getHeapMemoryInitialized(), m.getHeapMemoryMaximum());
-        }
-
-        return roundedHeapSize(heap, precision);
-    }
-
-    /**
-     * Returns one representative node for each JVM.
-     *
-     * @param nodes Nodes.
-     * @return Collection which contains only one representative node for each JVM.
-     */
-    private static Iterable<ClusterNode> nodesPerJvm(Iterable<ClusterNode> nodes) {
-        Map<String, ClusterNode> grpMap = new HashMap<>();
-
-        // Group by mac addresses and pid.
-        for (ClusterNode node : nodes) {
-            String grpId = node.attribute(ATTR_MACS) + "|" + node.attribute(ATTR_JVM_PID);
-
-            if (!grpMap.containsKey(grpId))
-                grpMap.put(grpId, node);
-        }
-
-        return grpMap.values();
-    }
-
-    /**
-     * Returns current JVM maxMemory in the same format as {@link #heapSize(org.apache.ignite.cluster.ClusterNode, int)}.
-     *
-     * @param precision Precision.
-     * @return Maximum memory size in GB.
-     */
-    public static double heapSize(int precision) {
-        return roundedHeapSize(Runtime.getRuntime().maxMemory(), precision);
-    }
-
-    /**
-     * Rounded heap size in gigabytes.
-     *
-     * @param heap Heap.
-     * @param precision Precision.
-     * @return Rounded heap size.
-     */
-    private static double roundedHeapSize(double heap, int precision) {
-        double rounded = new BigDecimal(heap / (1024 * 1024 * 1024d)).round(new MathContext(precision)).doubleValue();
-
-        return rounded < 0.1 ? 0.1 : rounded;
-    }
-
-    /**
-     * Performs thread dump and prints all available info to the given log.
-     *
-     * @param log Logger.
-     */
-    public static void dumpThreads(@Nullable IgniteLogger log) {
-        ThreadMXBean mxBean = ManagementFactory.getThreadMXBean();
-
-        ThreadInfo[] threadInfos =
-            mxBean.dumpAllThreads(mxBean.isObjectMonitorUsageSupported(), mxBean.isSynchronizerUsageSupported());
-
-        GridStringBuilder sb = new GridStringBuilder("Thread dump at ")
-            .a(new SimpleDateFormat("yyyy/MM/dd HH:mm:ss z").format(new Date(U.currentTimeMillis()))).a(NL);
-
-        for (ThreadInfo info : threadInfos) {
-            printThreadInfo(info, sb);
-
-            sb.a(NL);
-
-            if (info.getLockedSynchronizers() != null && info.getLockedSynchronizers().length > 0) {
-                printSynchronizersInfo(info.getLockedSynchronizers(), sb);
-
-                sb.a(NL);
-            }
-        }
-
-        sb.a(NL);
-
-        warn(log, sb.toString());
-    }
-
-    /**
-     * Prints single thread info to a buffer.
-     *
-     * @param threadInfo Thread info.
-     * @param sb Buffer.
-     */
-    private static void printThreadInfo(ThreadInfo threadInfo, GridStringBuilder sb) {
-        sb.a("Thread [name=\"").a(threadInfo.getThreadName())
-            .a("\", id=").a(threadInfo.getThreadId())
-            .a(", state=").a(threadInfo.getThreadState())
-            .a(", blockCnt=").a(threadInfo.getBlockedCount())
-            .a(", waitCnt=").a(threadInfo.getWaitedCount()).a("]").a(NL);
-
-        LockInfo lockInfo = threadInfo.getLockInfo();
-
-        if (lockInfo != null) {
-            sb.a("    Lock [object=").a(lockInfo)
-                .a(", ownerName=").a(threadInfo.getLockOwnerName())
-                .a(", ownerId=").a(threadInfo.getLockOwnerId()).a("]").a(NL);
-        }
-
-        MonitorInfo[] monitors = threadInfo.getLockedMonitors();
-        StackTraceElement[] elements = threadInfo.getStackTrace();
-
-        for (int i = 0; i < elements.length; i++) {
-            StackTraceElement e = elements[i];
-
-            sb.a("        at ").a(e.toString());
-
-            for (MonitorInfo monitor : monitors) {
-                if (monitor.getLockedStackDepth() == i)
-                    sb.a(NL).a("        - locked ").a(monitor);
-            }
-
-            sb.a(NL);
-        }
-    }
-
-    /**
-     * Prints Synchronizers info to a buffer.
-     *
-     * @param syncs Synchronizers info.
-     * @param sb Buffer.
-     */
-    private static void printSynchronizersInfo(LockInfo[] syncs, GridStringBuilder sb) {
-        sb.a("    Locked synchronizers:");
-
-        for (LockInfo info : syncs)
-            sb.a(NL).a("        ").a(info);
-    }
-
-    /**
-     * Gets empty constructor for class even if the class does not have empty constructor
-     * declared. This method is guaranteed to work with SUN JDK and other JDKs still need
-     * to be tested.
-     *
-     * @param cls Class to get empty constructor for.
-     * @return Empty constructor if one could be found or {@code null} otherwise.
-     * @throws IgniteCheckedException If failed.
-     */
-    @Nullable public static Constructor<?> forceEmptyConstructor(Class<?> cls) throws IgniteCheckedException {
-        Constructor<?> ctor = null;
-
-        try {
-            return cls.getDeclaredConstructor();
-        }
-        catch (Exception ignore) {
-            Method ctorFac = U.ctorFactory();
-            Object sunRefFac = U.sunReflectionFactory();
-
-            if (ctorFac != null && sunRefFac != null)
-                try {
-                    ctor = (Constructor)ctorFac.invoke(sunRefFac, cls, U.objectConstructor());
-                }
-                catch (IllegalAccessException | InvocationTargetException e) {
-                    throw new IgniteCheckedException("Failed to get object constructor for class: " + cls, e);
-                }
-        }
-
-        return ctor;
-    }
-
-    /**
-     * Creates new instance of a class only if it has an empty constructor (can be non-public).
-     *
-     * @param cls Class name.
-     * @return Instance.
-     * @throws IgniteCheckedException If failed.
-     */
-    @Nullable public static <T> T newInstance(String cls) throws IgniteCheckedException {
-        Class<?> cls0;
-
-        try {
-            cls0 = Class.forName(cls);
-        }
-        catch (Exception e) {
-            throw new IgniteCheckedException(e);
-        }
-
-        return (T)newInstance(cls0);
-    }
-
-    /**
-     * Creates new instance of a class only if it has an empty constructor (can be non-public).
-     *
-     * @param cls Class to instantiate.
-     * @return New instance of the class or {@code null} if empty constructor could not be assigned.
-     * @throws IgniteCheckedException If failed.
-     */
-    @Nullable public static <T> T newInstance(Class<T> cls) throws IgniteCheckedException {
-        boolean set = false;
-
-        Constructor<T> ctor = null;
-
-        try {
-            ctor = cls.getDeclaredConstructor();
-
-            if (ctor == null)
-                return null;
-
-            if (!ctor.isAccessible()) {
-                ctor.setAccessible(true);
-
-                set = true;
-            }
-
-            return ctor.newInstance();
-        }
-        catch (NoSuchMethodException e) {
-            throw new IgniteCheckedException("Failed to find empty constructor for class: " + cls, e);
-        }
-        catch (InstantiationException | InvocationTargetException | IllegalAccessException e) {
-            throw new IgniteCheckedException("Failed to create new instance for class: " + cls, e);
-        } finally {
-            if (ctor != null && set)
-                ctor.setAccessible(false);
-        }
-    }
-
-    /**
-     * Creates new instance of a class even if it does not have public constructor.
-     *
-     * @param cls Class to instantiate.
-     * @return New instance of the class or {@code null} if empty constructor could not be assigned.
-     * @throws IgniteCheckedException If failed.
-     */
-    @SuppressWarnings({"unchecked"})
-    @Nullable public static <T> T forceNewInstance(Class<?> cls) throws IgniteCheckedException {
-        Constructor ctor = forceEmptyConstructor(cls);
-
-        if (ctor == null)
-            return null;
-
-        boolean set = false;
-
-        try {
-
-            if (!ctor.isAccessible()) {
-                ctor.setAccessible(true);
-
-                set = true;
-            }
-
-            return (T)ctor.newInstance();
-        }
-        catch (InstantiationException | InvocationTargetException | IllegalAccessException e) {
-            throw new IgniteCheckedException("Failed to create new instance for class: " + cls, e);
-        } finally {
-            if (set)
-                ctor.setAccessible(false);
-        }
-    }
-
-    /**
-     * Pretty-formatting for minutes.
-     *
-     * @param mins Minutes to format.
-     * @return Formatted presentation of minutes.
-     */
-    public static String formatMins(long mins) {
-        assert mins >= 0;
-
-        if (mins == 0)
-            return "< 1 min";
-
-        SB sb = new SB();
-
-        long dd = mins / 1440; // 1440 mins = 60 mins * 24 hours
-
-        if (dd > 0)
-            sb.a(dd).a(dd == 1 ? " day " : " days ");
-
-        mins %= 1440;
-
-        long hh = mins / 60;
-
-        if (hh > 0)
-            sb.a(hh).a(hh == 1 ? " hour " : " hours ");
-
-        mins %= 60;
-
-        if (mins > 0)
-            sb.a(mins).a(mins == 1 ? " min " : " mins ");
-
-        return sb.toString().trim();
-    }
-
-    /**
-     * Gets 8-character substring of UUID (for terse logging).
-     *
-     * @param id Input ID.
-     * @return 8-character ID substring.
-     */
-    public static String id8(UUID id) {
-        return id.toString().substring(0, 8);
-    }
-
-    /**
-     * Gets 8-character substring of {@link org.apache.ignite.lang.IgniteUuid} (for terse logging).
-     * The ID8 will be constructed as follows:
-     * <ul>
-     * <li>Take first 4 digits for global ID, i.e. {@code GridUuid.globalId()}.</li>
-     * <li>Take last 4 digits for local ID, i.e. {@code GridUuid.localId()}.</li>
-     * </ul>
-     *
-     * @param id Input ID.
-     * @return 8-character representation of {@code GridUuid}.
-     */
-    public static String id8(IgniteUuid id) {
-        String s = id.toString();
-
-        return s.substring(0, 4) + s.substring(s.length() - 4);
-    }
-
-    /**
-     *
-     * @param len Number of characters to fill in.
-     * @param ch Character to fill with.
-     * @return String.
-     */
-    public static String filler(int len, char ch) {
-        char[] a = new char[len];
-
-        Arrays.fill(a, ch);
-
-        return new String(a);
-    }
-
-    /**
-     * Writes array to output stream.
-     *
-     * @param out Output stream.
-     * @param arr Array to write.
-     * @param <T> Array type.
-     * @throws IOException If failed.
-     */
-    public static <T> void writeArray(ObjectOutput out, T[] arr) throws IOException {
-        int len = arr == null ? 0 : arr.length;
-
-        out.writeInt(len);
-
-        if (arr != null && arr.length > 0)
-            for (T t : arr)
-                out.writeObject(t);
-    }
-
-    /**
-     * Reads array from input stream.
-     *
-     * @param in Input stream.
-     * @return Deserialized array.
-     * @throws IOException If failed.
-     * @throws ClassNotFoundException If class not found.
-     */
-    @Nullable public static Object[] readArray(ObjectInput in) throws IOException, ClassNotFoundException {
-        int len = in.readInt();
-
-        Object[] arr = null;
-
-        if (len > 0) {
-            arr = new Object[len];
-
-            for (int i = 0; i < len; i++)
-                arr[i] = in.readObject();
-        }
-
-        return arr;
-    }
-
-    /**
-     * Reads array from input stream.
-     *
-     * @param in Input stream.
-     * @return Deserialized array.
-     * @throws IOException If failed.
-     * @throws ClassNotFoundException If class not found.
-     */
-    @Nullable public static Class<?>[] readClassArray(ObjectInput in) throws IOException, ClassNotFoundException {
-        int len = in.readInt();
-
-        Class<?>[] arr = null;
-
-        if (len > 0) {
-            arr = new Class<?>[len];
-
-            for (int i = 0; i < len; i++)
-                arr[i] = (Class<?>)in.readObject();
-        }
-
-        return arr;
-    }
-
-    /**
-     * Reads array from input stream.
-     *
-     * @param in Input stream.
-     * @return Deserialized array.
-     * @throws IOException If failed.
-     * @throws ClassNotFoundException If class not found.
-     */
-    @SuppressWarnings("unchecked")
-    @Nullable public static <K, V> IgnitePredicate<CacheEntry<K, V>>[] readEntryFilterArray(ObjectInput in)
-        throws IOException, ClassNotFoundException {
-        int len = in.readInt();
-
-        IgnitePredicate<CacheEntry<K, V>>[] arr = null;
-
-        if (len > 0) {
-            arr = new IgnitePredicate[len];
-
-            for (int i = 0; i < len; i++)
-                arr[i] = (IgnitePredicate<CacheEntry<K, V>>)in.readObject();
-        }
-
-        return arr;
-    }
-
-    /**
-     *
-     * @param out Output.
-     * @param col Set to write.
-     * @throws IOException If write failed.
-     */
-    public static void writeCollection(ObjectOutput out, Collection<?> col) throws IOException {
-        if (col != null) {
-            out.writeInt(col.size());
-
-            for (Object o : col)
-                out.writeObject(o);
-        }
-        else
-            out.writeInt(-1);
-    }
-
-    /**
-     * Writes collection of byte arrays to data output.
-     *
-     * @param out Output to write to.
-     * @param bytes Collection with byte arrays.
-     * @throws IOException If write failed.
-     */
-    public static void writeBytesCollection(DataOutput out, Collection<byte[]> bytes) throws IOException {
-        if (bytes != null) {
-            out.writeInt(bytes.size());
-
-            for (byte[] b : bytes)
-                writeByteArray(out, b);
-        }
-        else
-            out.writeInt(-1);
-    }
-
-    /**
-     * Reads collection of byte arrays from data input.
-     *
-     * @param in Data input to read from.
-     * @return List of byte arrays.
-     * @throws IOException If read failed.
-     */
-    public static List<byte[]> readBytesList(DataInput in) throws IOException {
-        int size = in.readInt();
-
-        if (size < 0)
-            return null;
-
-        List<byte[]> res = new ArrayList<>(size);
-
-        for (int i = 0; i < size; i++)
-            res.add(readByteArray(in));
-
-        return res;
-    }
-
-    /**
-     *
-     * @param out Output.
-     * @param col Set to write.
-     * @throws IOException If write failed.
-     */
-    public static void writeIntCollection(DataOutput out, Collection<Integer> col) throws IOException {
-        if (col != null) {
-            out.writeInt(col.size());
-
-            for (Integer i : col)
-                out.writeInt(i);
-        }
-        else
-            out.writeInt(-1);
-    }
-
-    /**
-     * @param in Input.
-     * @return Deserialized set.
-     * @throws IOException If deserialization failed.
-     * @throws ClassNotFoundException If deserialized class could not be found.
-     */
-    @Nullable public static <E> Collection<E> readCollection(ObjectInput in)
-        throws IOException, ClassNotFoundException {
-        return readList(in);
-    }
-
-    /**
-     * @param in Input.
-     * @return Deserialized set.
-     * @throws IOException If deserialization failed.
-     */
-    @Nullable public static Collection<Integer> readIntCollection(DataInput in) throws IOException {
-        int size = in.readInt();
-
-        // Check null flag.
-        if (size == -1)
-            return null;
-
-        Collection<Integer> col = new ArrayList<>(size);
-
-        for (int i = 0; i < size; i++)
-            col.add(in.readInt());
-
-        return col;
-    }
-
-    /**
-     *
-     * @param m Map to copy.
-     * @param <K> Key type.
-     * @param <V> Value type
-     * @return Copied map.
-     */
-    public static <K, V> Map<K, V> copyMap(Map<K, V> m) {
-        return new HashMap<>(m);
-    }
-
-    /**
-     *
-     * @param m Map to seal.
-     * @param <K> Key type.
-     * @param <V> Value type
-     * @return Sealed map.
-     */
-    public static <K, V> Map<K, V> sealMap(Map<K, V> m) {
-        assert m != null;
-
-        return Collections.unmodifiableMap(new HashMap<>(m));
-    }
-
-    /**
-     * Seal collection.
-     *
-     * @param c Collection to seal.
-     * @param <E> Entry type
-     * @return Sealed collection.
-     */
-    public static <E> List<E> sealList(Collection<E> c) {
-        return Collections.unmodifiableList(new ArrayList<>(c));
-    }
-
-    /**
-     * Convert array to seal list.
-     *
-     * @param a Array for convert to seal list.
-     * @param <E> Entry type
-     * @return Sealed collection.
-     */
-    public static <E> List<E> sealList(E... a) {
-        return Collections.unmodifiableList(Arrays.asList(a));
-    }
-
-    /**
-     * Gets display name of the network interface this IP address belongs to.
-     *
-     * @param addr IP address for which to find network interface name.
-     * @return Network interface name or {@code null} if can't be found.
-     */
-    @Nullable public static String getNetworkInterfaceName(String addr) {
-        assert addr != null;
-
-        try {
-            InetAddress inetAddr = InetAddress.getByName(addr);
-
-            for (NetworkInterface itf : asIterable(NetworkInterface.getNetworkInterfaces()))
-                for (InetAddress itfAddr : asIterable(itf.getInetAddresses()))
-                    if (itfAddr.equals(inetAddr))
-                        return itf.getDisplayName();
-        }
-        catch (UnknownHostException ignore) {
-            return null;
-        }
-        catch (SocketException ignore) {
-            return null;
-        }
-
-        return null;
-    }
-
-    /**
-     * Tries to resolve host by name, returning local host if input is empty.
-     * This method reflects how {@link org.apache.ignite.configuration.IgniteConfiguration#getLocalHost()} should
-     * be handled in most places.
-     *
-     * @param hostName Hostname or {@code null} if local host should be returned.
-     * @return Address of given host or of localhost.
-     * @throws IOException If attempt to get local host failed.
-     */
-    public static InetAddress resolveLocalHost(@Nullable String hostName) throws IOException {
-        return F.isEmpty(hostName) ?
-            // Should default to InetAddress#anyLocalAddress which is package-private.
-            new InetSocketAddress(0).getAddress() :
-            InetAddress.getByName(hostName);
-    }
-
-    /**
-     * Determines whether current local host is different from previously cached.
-     *
-     * @return {@code true} or {@code false} depending on whether or not local host
-     *      has changed from the cached value.
-     * @throws IOException If attempt to get local host failed.
-     */
-    public static synchronized boolean isLocalHostChanged() throws IOException {
-        InetAddress locHost0 = locHost;
-
-        return locHost0 != null && !resetLocalHost().equals(locHost0);
-    }
-
-    /**
-     * Returns host names consistent with {@link #resolveLocalHost(String)}. So when it returns
-     * a common address this method returns single host name, and when a wildcard address passed
-     * this method tries to collect addresses of all available interfaces.
-     *
-     * @param locAddr Local address to resolve.
-     * @return Resolved available addresses of given local address.
-     * @throws IOException If failed.
-     * @throws IgniteCheckedException If no network interfaces found.
-     */
-    public static IgniteBiTuple<Collection<String>, Collection<String>> resolveLocalAddresses(InetAddress locAddr)
-        throws IOException, IgniteCheckedException {
-        assert locAddr != null;
-
-        Collection<String> addrs = new ArrayList<>();
-        Collection<String> hostNames = new ArrayList<>();
-
-        if (locAddr.isAnyLocalAddress()) {
-            // It should not take longer than 2 seconds to reach
-            // local address on any network.
-            int reachTimeout = 2000;
-
-            for (NetworkInterface itf : asIterable(NetworkInterface.getNetworkInterfaces())) {
-                for (InetAddress addr : asIterable(itf.getInetAddresses())) {
-                    if (!addr.isLinkLocalAddress() && reachable(itf, addr, reachTimeout))
-                        addresses(addr, addrs, hostNames);
-                }
-            }
-
-            if (F.isEmpty(addrs))
-                throw new IgniteCheckedException("No network addresses found (is networking enabled?).");
-        }
-        else
-            addresses(locAddr, addrs, hostNames);
-
-        return F.t(addrs, hostNames);
-    }
-
-    /**
-     * @param addr Address.
-     * @param addrs Addresses.
-     * @param hostNames Host names.
-     */
-    private static void addresses(InetAddress addr, Collection<String> addrs, Collection<String> hostNames) {
-        String hostName = addr.getHostName();
-
-        String ipAddr = addr.getHostAddress();
-
-        hostName = F.isEmpty(hostName) || hostName.equals(ipAddr) || addr.isLoopbackAddress() ? "" : hostName;
-
-        addrs.add(ipAddr);
-        hostNames.add(hostName);
-    }
-
-    /**
-     * Gets local host. Implementation will first attempt to get a non-loopback
-     * address. If that fails, then loopback address will be returned.
-     * <p>
-     * Note that this method is synchronized to make sure that local host
-     * initialization happens only once.
-     *
-     * @return Address representing local host.
-     * @throws IOException If attempt to get local host failed.
-     */
-    public static synchronized InetAddress getLocalHost() throws IOException {
-        if (locHost == null)
-            // Cache it.
-            resetLocalHost();
-
-        return locHost;
-    }
-
-    /**
-     * @return Local host.
-     * @throws IOException If attempt to get local host failed.
-     */
-    private static synchronized InetAddress resetLocalHost() throws IOException {
-        locHost = null;
-
-        String sysLocHost = IgniteSystemProperties.getString(GG_LOCAL_HOST);
-
-        if (sysLocHost != null)
-            sysLocHost = sysLocHost.trim();
-
-        if (!F.isEmpty(sysLocHost))
-            locHost = InetAddress.getByName(sysLocHost);
-        else {
-            List<NetworkInterface> itfs = new ArrayList<>();
-
-            for (NetworkInterface itf : asIterable(NetworkInterface.getNetworkInterfaces()))
-                itfs.add(itf);
-
-            Collections.sort(itfs, new Comparator<NetworkInterface>() {
-                @Override public int compare(NetworkInterface itf1, NetworkInterface itf2) {
-                    // Interfaces whose name starts with 'e' should go first.
-                    return itf1.getName().compareTo(itf2.getName());
-                }
-            });
-
-            // It should not take longer than 2 seconds to reach
-            // local address on any network.
-            int reachTimeout = 2000;
-
-            for (NetworkInterface itf : itfs) {
-                boolean found = false;
-
-                for (InetAddress addr : asIterable(itf.getInetAddresses())) {
-                    if (!addr.isLoopbackAddress() && !addr.isLinkLocalAddress() && reachable(itf, addr, reachTimeout)) {
-                        locHost = addr;
-
-                        found = true;
-
-                        break;
-                    }
-                }
-
-                if (found)
-                    break;
-            }
-        }
-
-        if (locHost == null)
-            locHost = InetAddress.getLocalHost();
-
-        return locHost;
-    }
-
-    /**
-     * Checks if address can be reached using three argument InetAddress.isReachable() version.
-     *
-     * @param itf Network interface to use for test.
-     * @param addr Address to check.
-     * @param reachTimeout Timeout for the check.
-     * @return {@code True} if address is reachable.
-     */
-    public static boolean reachable(NetworkInterface itf, InetAddress addr, int reachTimeout) {
-        try {
-            return addr.isReachable(itf, 0, reachTimeout);
-        }
-        catch (IOException ignore) {
-            return false;
-        }
-    }
-
-    /**
-     * Checks if address can be reached using one argument InetAddress.isReachable() version.
-     *
-     * @param addr Address to check.
-     * @param reachTimeout Timeout for the check.
-     * @return {@code True} if address is reachable.
-     */
-    public static boolean reachable(InetAddress addr, int reachTimeout) {
-        try {
-            return addr.isReachable(reachTimeout);
-        }
-        catch (IOException ignore) {
-            return false;
-        }
-    }
-
-    /**
-     * @param loc Local node.
-     * @param rmt Remote node.
-     * @return Whether given nodes have the same macs.
-     */
-    public static boolean sameMacs(ClusterNode loc, ClusterNode rmt) {
-        assert loc != null;
-        assert rmt != null;
-
-        String locMacs = loc.attribute(GridNodeAttributes.ATTR_MACS);
-        String rmtMacs = rmt.attribute(GridNodeAttributes.ATTR_MACS);
-
-        return locMacs != null && locMacs.equals(rmtMacs);
-    }
-
-    /**
-     * Gets a list of all local non-loopback IPs known to this JVM.
-     * Note that this will include both IPv4 and IPv6 addresses (even if one "resolves"
-     * into another). Loopbacks will be skipped.
-     *
-     * @return List of all known local IPs (empty list if no addresses available).
-     */
-    public static synchronized Collection<String> allLocalIps() {
-        List<String> ips = new ArrayList<>(4);
-
-        try {
-            Enumeration<NetworkInterface> itfs = NetworkInterface.getNetworkInterfaces();
-
-            if (itfs != null) {
-                for (NetworkInterface itf : asIterable(itfs)) {
-                    if (!itf.isLoopback()) {
-                        Enumeration<InetAddress> addrs = itf.getInetAddresses();
-
-                        if (addrs != null) {
-                            for (InetAddress addr : asIterable(addrs)) {
-                                String hostAddr = addr.getHostAddress();
-
-                                if (!addr.isLoopbackAddress() && !ips.contains(hostAddr))
-                                    ips.add(hostAddr);
-                            }
-                        }
-                    }
-                }
-            }
-        }
-        catch (SocketException ignore) {
-            return Collections.emptyList();
-        }
-
-        Collections.sort(ips);
-
-        return ips;
-    }
-
-    /**
-     * Gets a list of all local enabled MACs known to this JVM. It
-     * is using hardware address of the network interface that is not guaranteed to be
-     * MAC addresses (but in most cases it is).
-     * <p>
-     * Note that if network interface is disabled - its MAC won't be included. All
-     * local network interfaces are probed including loopbacks. Virtual interfaces
-     * (sub-interfaces) are skipped.
-     * <p>
-     * Note that on linux getHardwareAddress() can return null from time to time
-     * if NetworkInterface.getHardwareAddress() method is called from many threads.
-     *
-     * @return List of all known enabled local MACs or empty list
-     *      if no MACs could be found.
-     */
-    public static synchronized Collection<String> allLocalMACs() {
-        List<String> macs = new ArrayList<>(3);
-
-        try {
-            Enumeration<NetworkInterface> itfs = NetworkInterface.getNetworkInterfaces();
-
-            if (itfs != null) {
-                for (NetworkInterface itf : asIterable(itfs)) {
-                    byte[] hwAddr = itf.getHardwareAddress();
-
-                    // Loopback produces empty MAC.
-                    if (hwAddr != null && hwAddr.length > 0) {
-                        String mac = byteArray2HexString(hwAddr);
-
-                        if (!macs.contains(mac))
-                            macs.add(mac);
-                    }
-                }
-            }
-        }
-        catch (SocketException ignore) {
-            return Collections.emptyList();
-        }
-
-        Collections.sort(macs);
-
-        return macs;
-    }
-
-    /**
-     * Downloads resource by URL.
-     *
-     * @param url URL to download.
-     * @param file File where downloaded resource should be stored.
-     * @return File where downloaded resource should be stored.
-     * @throws IOException If error occurred.
-     */
-    public static File downloadUrl(URL url, File file) throws IOException {
-        assert url != null;
-        assert file != null;
-
-        InputStream in = null;
-        OutputStream out = null;
-
-        try {
-            URLConnection conn = url.openConnection();
-
-            if (conn instanceof HttpsURLConnection) {
-                HttpsURLConnection https = (HttpsURLConnection)conn;
-
-                https.setHostnameVerifier(new DeploymentHostnameVerifier());
-
-                SSLContext ctx = SSLContext.getInstance(HTTPS_PROTOCOL);
-
-                ctx.init(null, getTrustManagers(), null);
-
-                // Initialize socket factory.
-                https.setSSLSocketFactory(ctx.getSocketFactory());
-            }
-
-            in = conn.getInputStream();
-
-            if (in == null)
-                throw new IOException("Failed to open connection: " + url.toString());
-
-            out = new BufferedOutputStream(new FileOutputStream(file));
-
-            copy(in, out);
-        }
-        catch (NoSuchAlgorithmException | KeyManagementException e) {
-            throw new IOException("Failed to open HTTPs connection [url=" + url.toString() + ", msg=" + e + ']', e);
-        } finally {
-            close(in, null);
-            close(out, null);
-        }
-
-        return file;
-    }
-
-    /**
-     * Construct array with one trust manager which don't reject input certificates.
-     *
-     * @return Array with one X509TrustManager implementation of trust manager.
-     */
-    private static TrustManager[] getTrustManagers() {
-        return new TrustManager[]{
-            new X509TrustManager() {
-                @Nullable @Override public X509Certificate[] getAcceptedIssuers() {
-                    return null;
-                }
-
-                @Override public void checkClientTrusted(X509Certificate[] certs, String authType) {
-                    /* No-op. */
-                }
-
-                @Override public void checkServerTrusted(X509Certificate[] certs, String authType) {
-                    /* No-op. */
-                }
-            }
-        };
-    }
-
-    /**
-     * Replace password in URI string with a single '*' character.
-     * <p>
-     * Parses given URI by applying &quot;.*://(.*:.*)@.*&quot;
-     * regular expression pattern and than if URI matches it
-     * replaces password strings between '/' and '@' with '*'.
-     *
-     * @param uri URI which password should be replaced.
-     * @return Converted URI string
-     */
-    @Nullable public static String hidePassword(@Nullable String uri) {
-        if (uri == null)
-            return null;
-
-        if (Pattern.matches(".*://(.*:.*)@.*", uri)) {
-            int userInfoLastIdx = uri.indexOf('@');
-
-            assert userInfoLastIdx != -1;
-
-            String str = uri.substring(0, userInfoLastIdx);
-
-            int userInfoStartIdx = str.lastIndexOf('/');
-
-            str = str.substring(userInfoStartIdx + 1);
-
-            String[] params = str.split(";");
-
-            StringBuilder builder = new StringBuilder();
-
-            for (int i = 0; i < params.length; i++) {
-                int idx;
-
-                if ((idx = params[i].indexOf(':')) != -1)
-                    params[i] = params[i].substring(0, idx + 1) + '*';
-
-                builder.append(params[i]);
-
-                if (i != params.length - 1)
-                    builder.append(';');
-            }
-
-            return new StringBuilder(uri).replace(userInfoStartIdx + 1, userInfoLastIdx,
-                builder.toString()).toString();
-        }
-
-        return uri;
-    }
-
-    /**
-     * @return Class loader used to load GridGain itself.
-     */
-    public static ClassLoader gridClassLoader() {
-        return gridClassLoader;
-    }
-
-    /**
-     * @param parent Parent to find.
-     * @param ldr Loader to check.
-     * @return {@code True} if parent found.
-     */
-    public static boolean hasParent(@Nullable ClassLoader parent, ClassLoader ldr) {
-        if (parent != null) {
-            for (; ldr != null; ldr = ldr.getParent()) {
-                if (ldr.equals(parent))
-                    return true;
-            }
-
-            return false;
-        }
-
-        return true;
-    }
-
-    /**
-     * Verifier always returns successful result for any host.
-     */
-    private static class DeploymentHostnameVerifier implements HostnameVerifier {
-        /** {@inheritDoc} */
-        @Override public boolean verify(String hostname, SSLSession ses) {
-            // Remote host trusted by default.
-            return true;
-        }
-    }
-
-    /**
-     * Makes a {@code '+---+'} dash line.
-     *
-     * @param len Length of the dash line to make.
-     * @return Dash line.
-     */
-    public static String dash(int len) {
-        char[] dash = new char[len];
-
-        Arrays.fill(dash, '-');
-
-        dash[0] = dash[len - 1] = '+';
-
-        return new String(dash);
-    }
-
-    /**
-     * Creates space filled string of given length.
-     *
-     * @param len Number of spaces.
-     * @return Space filled string of given length.
-     */
-    public static String pad(int len) {
-        char[] dash = new char[len];
-
-        Arrays.fill(dash, ' ');
-
-        return new String(dash);
-    }
-
-    /**
-     * Formats system time in milliseconds for printing in logs.
-     *
-     * @param sysTime System time.
-     * @return Formatted time string.
-     */
-    public static String format(long sysTime) {
-        return LONG_DATE_FMT.format(new java.util.Date(sysTime));
-    }
-
-    /**
-     * Takes given collection, shuffles it and returns iterable instance.
-     *
-     * @param <T> Type of elements to create iterator for.
-     * @param col Collection to shuffle.
-     * @return Iterable instance over randomly shuffled collection.
-     */
-    public static <T> Iterable<T> randomIterable(Collection<T> col) {
-        List<T> list = new ArrayList<>(col);
-
-        Collections.shuffle(list);
-
-        return list;
-    }
-
-    /**
-     * Converts enumeration to iterable so it can be used in {@code foreach} construct.
-     *
-     * @param <T> Types of instances for iteration.
-     * @param e Enumeration to convert.
-     * @return Iterable over the given enumeration.
-     */
-    public static <T> Iterable<T> asIterable(final Enumeration<T> e) {
-        return new Iterable<T>() {
-            @Override public Iterator<T> iterator() {
-                return new Iterator<T>() {
-                    @Override public boolean hasNext() {
-                        return e.hasMoreElements();
-                    }
-
-                    @SuppressWarnings({"IteratorNextCanNotThrowNoSuchElementException"})
-                    @Override public T next() {
-                        return e.nextElement();
-                    }
-
-                    @Override public void remove() {
-                        throw new UnsupportedOperationException();
-                    }
-                };
-            }
-        };
-    }
-
-    /**
-     * Copy source file (or folder) to destination file (or folder). Supported source & destination:
-     * <ul>
-     * <li>File to File</li>
-     * <li>File to Folder</li>
-     * <li>Folder to Folder (Copy the content of the directory and not the directory itself)</li>
-     * </ul>
-     *
-     * @param src Source file or folder.
-     * @param dest Destination file or folder.
-     * @param overwrite Whether or not overwrite existing files and folders.
-     * @throws IOException Thrown if an I/O error occurs.
-     */
-    public static void copy(File src, File dest, boolean overwrite) throws IOException {
-        assert src != null;
-        assert dest != null;
-
-        /*
-         * Supported source & destination:
-         * ===============================
-         * 1. File -> File
-         * 2. File -> Directory
-         * 3. Directory -> Directory
-         */
-
-        // Source must exist.
-        if (!src.exists())
-            throw new FileNotFoundException("Source can't be found: " + src);
-
-        // Check that source and destination are not the same.
-        if (src.getAbsoluteFile().equals(dest.getAbsoluteFile()))
-            throw new IOException("Source and destination are the same [src=" + src + ", dest=" + dest + ']');
-
-        if (dest.exists()) {
-            if (!dest.isDirectory() && !overwrite)
-                throw new IOException("Destination already exists: " + dest);
-
-            if (!dest.canWrite())
-                throw new IOException("Destination is not writable:" + dest);
-        }
-        else {
-            File parent = dest.getParentFile();
-
-            if (parent != null && !parent.exists())
-                // Ignore any errors here.
-                // We will get errors when we'll try to open the file stream.
-                //noinspection ResultOfMethodCallIgnored
-                parent.mkdirs();
-
-            // If source is a directory, we should create destination directory.
-            if (src.isDirectory())
-                //noinspection ResultOfMethodCallIgnored
-                dest.mkdir();
-        }
-
-        if (src.isDirectory()) {
-            // In this case we have Directory -> Directory.
-            // Note that we copy the content of the directory and not the directory itself.
-
-            File[] files = src.listFiles();
-
-            for (File file : files) {
-                if (file.isDirectory()) {
-                    File dir = new File(dest, file.getName());
-
-                    if (!dir.exists() && !dir.mkdirs())
-                        throw new IOException("Can't create directory: " + dir);
-
-                    copy(file, dir, overwrite);
-                }
-                else
-                    copy(file, dest, overwrite);
-            }
-        }
-        else {
-            // In this case we have File -> File or File -> Directory.
-            File file = dest.exists() && dest.isDirectory() ? new File(dest, src.getName()) : dest;
-
-            if (!overwrite && file.exists())
-                throw new IOException("Destination already exists: " + file);
-
-            FileInputStream in = null;
-            FileOutputStream out = null;
-
-            try {
-                in = new FileInputStream(src);
-                out = new FileOutputStream(file);
-
-                copy(in, out);
-            }
-            finally {
-                if (in != null)
-                    in.close();
-
-                if (out != null) {
-                    out.getFD().sync();
-
-                    out.close();
-                }
-            }
-        }
-    }
-
-    /**
-     * Starts clock timer if grid is first.
-     */
-    public static void onGridStart() {
-        synchronized (mux) {
-            if (gridCnt == 0) {
-                timer = new Thread(new Runnable() {
-                    @SuppressWarnings({"BusyWait", "InfiniteLoopStatement"})
-                    @Override public void run() {
-                        while (true) {
-                            curTimeMillis = System.currentTimeMillis();
-
-                            try {
-                                Thread.sleep(10);
-                            }
-                            catch (InterruptedException ignored) {
-                                U.log(null, "Timer thread has been interrupted.");
-
-                                break;
-                            }
-                        }
-                    }
-                }, "gridgain-clock");
-
-                timer.setDaemon(true);
-
-                timer.setPriority(10);
-
-                timer.start();
-            }
-
-            ++gridCnt;
-        }
-    }
-
-    /**
-     * Stops clock timer if all nodes into JVM were stopped.
-     */
-    public static void onGridStop(){
-        synchronized (mux) {
-            assert gridCnt > 0 : gridCnt;
-
-            --gridCnt;
-
-            if (gridCnt == 0 && timer != null) {
-                timer.interrupt();
-
-                timer = null;
-            }
-        }
-    }
-
-    /**
-     * Copies input byte stream to output byte stream.
-     *
-     * @param in Input byte stream.
-     * @param out Output byte stream.
-     * @return Number of the copied bytes.
-     * @throws IOException Thrown if an I/O error occurs.
-     */
-    public static int copy(InputStream in, OutputStream out) throws IOException {
-        assert in != null;
-        assert out != null;
-
-        byte[] buf = new byte[BUF_SIZE];
-
-        int cnt = 0;
-
-        for (int n; (n = in.read(buf)) > 0;) {
-            out.write(buf, 0, n);
-
-            cnt += n;
-        }
-
-        return cnt;
-    }
-
-    /**
-     * Copies input character stream to output character stream.
-     *
-     * @param in Input character stream.
-     * @param out Output character stream.
-     * @return Number of the copied characters.
-     * @throws IOException Thrown if an I/O error occurs.
-     */
-    public static int copy(Reader in, Writer out) throws IOException {
-        assert in != null;
-        assert out != null;
-
-        char[] buf = new char[BUF_SIZE];
-
-        int cnt = 0;
-
-        for (int n; (n = in.read(buf)) > 0;) {
-            out.write(buf, 0, n);
-
-            cnt += n;
-        }
-
-        return cnt;
-    }
-
-    /**
-     * Writes string to file.
-     *
-     * @param file File.
-     * @param s String to write.
-     * @throws IOException Thrown if an I/O error occurs.
-     */
-    public static void writeStringToFile(File file, String s) throws IOException {
-        writeStringToFile(file, s, Charset.defaultCharset().toString(), false);
-    }
-
-    /**
-     * Writes string to file.
-     *
-     * @param file File.
-     * @param s String to write.
-     * @param charset Encoding.
-     * @throws IOException Thrown if an I/O error occurs.
-     */
-    public static void writeStringToFile(File file, String s, String charset) throws IOException {
-        writeStringToFile(file, s, charset, false);
-    }
-
-    /**
-     * Reads file to string using specified charset.
-     *
-     * @param fileName File name.
-     * @param charset File charset.
-     * @return File content.
-     * @throws IOException If error occurred.
-     */
-    public static String readFileToString(String fileName, String charset) throws IOException {
-        Reader input = new InputStreamReader(new FileInputStream(fileName), charset);
-
-        StringWriter output = new StringWriter();
-
-        char[] buf = new char[4096];
-
-        int n;
-
-        while ((n = input.read(buf)) != -1)
-            output.write(buf, 0, n);
-
-        return output.toString();
-    }
-
-    /**
-     * Writes string to file.
-     *
-     * @param file File.
-     * @param s String to write.
-     * @param charset Encoding.
-     * @param append If {@code true}, then specified string will be added to the end of the file.
-     * @throws IOException Thrown if an I/O error occurs.
-     */
-    public static void writeStringToFile(File file, String s, String charset, boolean append) throws IOException {
-        if (s == null)
-            return;
-
-        OutputStream out = null;
-
-        try {
-            out = new FileOutputStream(file, append);
-
-            if (s != null)
-                out.write(s.getBytes(charset));
-        } finally {
-            closeQuiet(out);
-        }
-    }
-
-    /**
-     * Utility method that sets cause into exception and returns it.
-     *
-     * @param e Exception to set cause to and return.
-     * @param cause Optional cause to set (if not {@code null}).
-     * @param <E> Type of the exception.
-     * @return Passed in exception with optionally set cause.
-     */
-    public static <E extends Throwable> E withCause(E e, @Nullable Throwable cause) {
-        assert e != null;
-
-        if (cause != null)
-            e.initCause(cause);
-
-        return e;
-    }
-
-    /**
-     * Deletes file or directory with all sub-directories and files.
-     *
-     * @param file File or directory to delete.
-     * @return {@code true} if and only if the file or directory is successfully deleted,
-     *      {@code false} otherwise
-     */
-    public static boolean delete(File file) {
-        assert file != null;
-
-        boolean res = true;
-
-        if (file.isDirectory()) {
-            File[] files = file.listFiles();
-
-            if (files != null && files.length > 0)
-                for (File file1 : files)
-                    if (file1.isDirectory())
-                        res &= delete(file1);
-                    else if (file1.getName().endsWith("jar"))
-                        try {
-                            // Why do we do this?
-                            new JarFile(file1, false).close();
-
-                            res &= file1.delete();
-                        }
-                        catch (IOException ignore) {
-                            // Ignore it here...
-                        }
-                    else
-                        res &= file1.delete();
-
-            res &= file.delete();
-        }
-        else
-            res = file.delete();
-
-        return res;
-    }
-
-    /**
-     * @param dir Directory to create along with all non-existent parent directories.
-     * @return {@code True} if directory exists (has been created or already existed),
-     *      {@code false} if has not been created and does not exist.
-     */
-    public static boolean mkdirs(File dir) {
-        assert dir != null;
-
-        return dir.mkdirs() || dir.exists();
-    }
-
-    /**
-     * Resolve project home directory based on source code base.
-     *
-     * @return Project home directory (or {@code null} if it cannot be resolved).
-     */
-    @Nullable private static String resolveProjectHome() {
-        assert Thread.holdsLock(GridUtils.class);
-
-        // Resolve GridGain home via environment variables.
-        String ggHome0 = IgniteSystemProperties.getString(GG_HOME);
-
-        if (!F.isEmpty(ggHome0))
-            return ggHome0;
-
-        String appWorkDir = System.getProperty("user.dir");
-
-        if (appWorkDir != null) {
-            ggHome0 = findProjectHome(new File(appWorkDir));
-
-            if (ggHome0 != null)
-                return ggHome0;
-        }
-
-        URI uri;
-
-        Class<GridUtils> cls = GridUtils.class;
-
-        try {
-            ProtectionDomain domain = cls.getProtectionDomain();
-
-            // Should not happen, but to make sure our code is not broken.
-            if (domain == null || domain.getCodeSource() == null || domain.getCodeSource().getLocation() == null) {
-                logResolveFailed(cls, null);
-
-                return null;
-            }
-
-            // Resolve path to class-file.
-            uri = domain.getCodeSource().getLocation().toURI();
-
-            // Overcome UNC path problem on Windows (http://www.tomergabel.com/JavaMishandlesUNCPathsOnWindows.aspx)
-            if (isWindows() && uri.getAuthority() != null)
-                uri = new URI(uri.toString().replace("file://", "file:/"));
-        }
-        catch (URISyntaxException | SecurityException e) {
-            logResolveFailed(cls, e);
-
-            return null;
-        }
-
-        return findProjectHome(new File(uri));
-    }
-
-    /**
-     * Tries to find project home starting from specified directory and moving to root.
-     *
-     * @param startDir First directory in search hierarchy.
-     * @return Project home path or {@code null} if it wasn't found.
-     */
-    private static String findProjectHome(File startDir) {
-        for (File cur = startDir.getAbsoluteFile(); cur != null; cur = cur.getParentFile()) {
-            // Check 'cur' is project home directory.
-            if (!new File(cur, "bin").isDirectory() ||
-                !new File(cur, "libs").isDirectory() ||
-                !new File(cur, "config").isDirectory())
-                continue;
-
-            return cur.getPath();
-        }
-
-        return null;
-    }
-
-    /**
-     * @param cls Class.
-     * @param e Exception.
-     */
-    private static void logResolveFailed(Class cls, Exception e) {
-        warn(null, "Failed to resolve GRIDGAIN_HOME automatically for class codebase " +
-            "[class=" + cls + (e == null ? "" : ", e=" + e.getMessage()) + ']');
-    }
-
-    /**
-     * Retrieves {@code GRIDGAIN_HOME} property. The property is retrieved from system
-     * properties or from environment in that order.
-     *
-     * @return {@code GRIDGAIN_HOME} property.
-     */
-    @Nullable public static String getGridGainHome() {
-        GridTuple<String> ggHomeTup = ggHome;
-
-        String ggHome0;
-
-        if (ggHomeTup == null) {
-            synchronized (GridUtils.class) {
-                // Double check.
-                ggHomeTup = ggHome;
-
-                if (ggHomeTup == null) {
-                    // Resolve GridGain installation home directory.
-                    ggHome = F.t(ggHome0 = resolveProjectHome());
-
-                    if (ggHome0 != null)
-                        System.setProperty(GG_HOME, ggHome0);
-                }
-                else
-                    ggHome0 = ggHomeTup.get();
-            }
-        }
-        else
-            ggHome0 = ggHomeTup.get();
-
-        return ggHome0;
-    }
-
-    /**
-     * @param path GridGain home. May be {@code null}.
-     */
-    public static void setGridGainHome(@Nullable String path) {
-        GridTuple<String> ggHomeTup = ggHome;
-
-        String ggHome0;
-
-        if (ggHomeTup == null) {
-            synchronized (GridUtils.class) {
-                // Double check.
-                ggHomeTup = ggHome;
-
-                if (ggHomeTup == null) {
-                    if (F.isEmpty(path))
-                        System.clearProperty(GG_HOME);
-                    else
-                        System.setProperty(GG_HOME, path);
-
-                    ggHome = F.t(path);
-
-                    return;
-                }
-                else
-                    ggHome0 = ggHomeTup.get();
-            }
-        }
-        else
-            ggHome0 = ggHomeTup.get();
-
-        if (ggHome0 != null && !ggHome0.equals(path))
-            throw new IgniteException("Failed to set GRIDGAIN_HOME after it has been already resolved " +
-                "[ggHome=" + ggHome0 + ", newGgHome=" + path + ']');
-    }
-
-    /**
-     * Gets file associated with path.
-     * <p>
-     * First check if path is relative to {@code GRIDGAIN_HOME}.
-     * If not, check if path is absolute.
-     * If all checks fail, then {@code null} is returned.
-     * <p>
-     * See {@link #getGridGainHome()} for information on how {@code GRIDGAIN_HOME} is retrieved.
-     *
-     * @param path Path to resolve.
-     * @return Resolved path as file, or {@code null} if path cannot be resolved.
-     */
-    @Nullable public static File resolveGridGainPath(String path) {
-        assert path != null;
-
-        /*
-         * 1. Check relative to GRIDGAIN_HOME specified in configuration, if any.
-         */
-
-        String home = getGridGainHome();
-
-        if (home != null) {
-            File file = new File(home, path);
-
-            if (file.exists())
-                return file;
-        }
-
-        /*
-         * 2. Check given path as absolute.
-         */
-
-        File file = new File(path);
-
-        if (file.exists())
-            return file;
-
-        /*
-         * 3. Check development path.
-         */
-
-        if (home != null)
-            file = new File(home, "os/" + path);
-
-        return file.exists() ? file : null;
-    }
-
-    /**
-     * Gets URL representing the path passed in. First the check is made if path is absolute.
-     * If not, then the check is made if path is relative to {@code META-INF} folder in classpath.
-     * If not, then the check is made if path is relative to ${GRIDGAIN_HOME}.
-     * If all checks fail,
-     * then {@code null} is returned, otherwise URL representing path is returned.
-     * <p>
-     * See {@link #getGridGainHome()} for information on how {@code GRIDGAIN_HOME} is retrieved.
-     *
-     * @param path Path to resolve.
-     * @return Resolved path as URL, or {@code null} if path cannot be resolved.
-     * @see #getGridGainHome()
-     */
-    @Nullable public static URL resolveGridGainUrl(String path) {
-        return resolveGridGainUrl(path, true);
-    }
-
-    /**
-     * Gets URL representing the path passed in. First the check is made if path is absolute.
-     * If not, then the check is made if path is relative to {@code META-INF} folder in classpath.
-     * If not, then the check is made if path is relative to ${GRIDGAIN_HOME}.
-     * If all checks fail,
-     * then {@code null} is returned, otherwise URL representing path is returned.
-     * <p>
-     * See {@link #getGridGainHome()} for information on how {@code GRIDGAIN_HOME} is retrieved.
-     *
-     * @param path Path to resolve.
-     * @param metaInf Flag to indicate whether META-INF folder should be checked or class path root.
-     * @return Resolved path as URL, or {@code null} if path cannot be resolved.
-     * @see #getGridGainHome()
-     */
-    @SuppressWarnings({"UnusedCatchParameter"})
-    @Nullable public static URL resolveGridGainUrl(String path, boolean metaInf) {
-        File f = resolveGridGainPath(path);
-
-        if (f == null)
-            f = resolveGridGainPath("os/" + path);
-
-        if (f != null) {
-            try {
-                // Note: we use that method's chain instead of File.getURL() with due
-                // Sun bug http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6179468
-                return f.toURI().toURL();
-            }
-            catch (MalformedURLException e) {
-                // No-op.
-            }
-        }
-
-        String locPath = (metaInf ? "META-INF/" : "") + path.replaceAll("\\\\", "/");
-
-        return Thread.currentThread().getContextClassLoader().getResource(locPath);
-    }
-
-    /**
-     * Join byte arrays into single one.
-     *
-     * @param bufs list of byte arrays to concatenate.
-     * @return Concatenated byte's array.
-     */
-    public static byte[] join(byte[]... bufs) {
-        int size = 0;
-        for (byte[] buf : bufs) {
-            size += buf.length;
-        }
-
-        byte[] res = new byte[size];
-        int position = 0;
-        for (byte[] buf : bufs) {
-            arrayCopy(buf, 0, res, position, buf.length);
-            position += buf.length;
-        }
-
-        return res;
-    }
-
-    /**
-     * Converts byte array to formatted string. If calling:
-     * <pre name="code" class="java">
-     * ...
-     * byte[] data = {10, 20, 30, 40, 50, 60, 70, 80, 90};
-     *
-     * U.byteArray2String(data, "0x%02X", ",0x%02X")
-     * ...
-     * </pre>
-     * the result will be:
-     * <pre name="code" class="java">
-     * ...
-     * 0x0A, 0x14, 0x1E, 0x28, 0x32, 0x3C, 0x46, 0x50, 0x5A
-     * ...
-     * </pre>
-     *
-     * @param arr Array of byte.
-     * @param hdrFmt C-style string format for the first element.
-     * @param bodyFmt C-style string format for second and following elements, if any.
-     * @return String with converted bytes.
-     */
-    public static String byteArray2String(byte[] arr, String hdrFmt, String bodyFmt) {
-        assert arr != null;
-        assert hdrFmt != null;
-        assert bodyFmt != null;
-
-        SB sb = new SB();
-
-        sb.a('{');
-
-        boolean first = true;
-
-        for (byte b : arr)
-            if (first) {
-                sb.a(String.format(hdrFmt, b));
-
-                first = false;
-            }
-            else
-                sb.a(String.format(bodyFmt, b));
-
-        sb.a('}');
-
-        return sb.toString();
-    }
-
-    /**
-     * Converts byte array to hex string.
-     *
-     * @param arr Array of bytes.
-     * @return Hex string.
-     */
-    public static String byteArray2HexString(byte[] arr) {
-        SB sb = new SB(arr.length << 1);
-
-        for (byte b : arr)
-            sb.a(Integer.toHexString(MASK & b >>> 4)).a(Integer.toHexString(MASK & b));
-
-        return sb.toString().toUpperCase();
-    }
-
-    /**
-     * Convert string with hex values to byte array.
-     *
-     * @param hex Hexadecimal string to convert.
-     * @return array of bytes defined as hex in string.
-     * @throws IllegalArgumentException If input character differs from certain hex characters.
-     */
-    public static byte[] hexString2ByteArray(String hex) throws IllegalArgumentException {
-        // If Hex string has odd character length.
-        if (hex.length() % 2 != 0)
-            hex = '0' + hex;
-
-        char[] chars = hex.toCharArray();
-
-        byte[] bytes = new byte[chars.length / 2];
-
-        int byteCnt = 0;
-
-        for (int i = 0; i < chars.length; i += 2) {
-            int newByte = 0;
-
-            newByte |= hexCharToByte(chars[i]);
-
-            newByte <<= 4;
-
-            newByte |= hexCharToByte(chars[i + 1]);
-
-            bytes[byteCnt] = (byte)newByte;
-
-            byteCnt++;
-        }
-
-        return bytes;
-    }
-
-    /**
-     * Return byte value for certain character.
-     *
-     * @param ch Character
-     * @return Byte value.
-     * @throws IllegalArgumentException If input character differ from certain hex characters.
-     */
-    @SuppressWarnings({"UnnecessaryFullyQualifiedName", "fallthrough"})
-    private static byte hexCharToByte(char ch) throws IllegalArgumentException {
-        switch (ch) {
-            case '0':
-            case '1':
-            case '2':
-            case '3':
-            case '4':
-            case '5':
-            case '6':
-            case '7':
-            case '8':
-            case '9':
-                return (byte)(ch - '0');
-
-            case 'a':
-            case 'A':
-                return 0xa;
-
-            case 'b':
-            case 'B':
-                return 0xb;
-
-            case 'c':
-            case 'C':
-                return 0xc;
-
-            case 'd':
-            case 'D':
-                return 0xd;
-
-            case 'e':
-            case 'E':
-                return 0xe;
-
-            case 'f':
-            case 'F':
-                return 0xf;
-
-            default:
-                throw new IllegalArgumentException("Hex decoding wrong input character [character=" + ch + ']');
-        }
-    }
-
-    /**
-     * Converts primitive double to byte array.
-     *
-     * @param d Double to convert.
-     * @return Byte array.
-     */
-    public static byte[] doubleToBytes(double d) {
-        return longToBytes(Double.doubleToLongBits(d));
-    }
-
-    /**
-     * Converts primitive {@code double} type to byte array and stores
-     * it in the specified byte array.
-     *
-     * @param d Double to convert.
-     * @param bytes Array of bytes.
-     * @param off Offset.
-     * @return New offset.
-     */
-    public static int doubleToBytes(double d, byte[] bytes, int off) {
-        return longToBytes(Double.doubleToLongBits(d), bytes, off);
-    }
-
-    /**
-     * Converts primitive float to byte array.
-     *
-     * @param f Float to convert.
-     * @return Array of bytes.
-     */
-    public static byte[] floatToBytes(float f) {
-        return intToBytes(Float.floatToIntBits(f));
-    }
-
-    /**
-     * Converts primitive float to byte array.
-     *
-     * @param f Float to convert.
-     * @param bytes Array of bytes.
-     * @param off Offset.
-     * @return New offset.
-     */
-    public static int floatToBytes(float f, byte[] bytes, int off) {
-        return intToBytes(Float.floatToIntBits(f), bytes, off);
-    }
-
-    /**
-     * Converts primitive {@code long} type to byte array.
-     *
-     * @param l Long value.
-     * @return Array of bytes.
-     */
-    public static byte[] longToBytes(long l) {
-        return GridClientByteUtils.longToBytes(l);
-    }
-
-    /**
-     * Converts primitive {@code long} type to byte array and stores it in specified
-     * byte array.
-     *
-     * @param l Long value.
-     * @param bytes Array of bytes.
-     * @param off Offset in {@code bytes} array.
-     * @return Number of bytes overwritten in {@code bytes} array.
-     

<TRUNCATED>

[25/50] [abbrv] incubator-ignite git commit: Merge remote-tracking branch 'remotes/origin/sprint-1' into ignite-67

Posted by se...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ac05bb9c/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
index 0000000,fedf24b..013367f
mode 000000,100644..100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
@@@ -1,0 -1,9141 +1,9141 @@@
+ /*
+  * 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.util;
+ 
+ import org.apache.ignite.*;
+ import org.apache.ignite.cache.*;
+ import org.apache.ignite.cluster.*;
+ import org.apache.ignite.compute.*;
+ import org.apache.ignite.configuration.*;
+ import org.apache.ignite.events.*;
+ import org.apache.ignite.internal.*;
+ import org.apache.ignite.internal.mxbean.*;
+ import org.apache.ignite.internal.processors.cache.*;
+ import org.apache.ignite.internal.processors.cache.version.*;
+ import org.apache.ignite.lang.*;
+ import org.apache.ignite.lifecycle.*;
+ import org.apache.ignite.portables.*;
+ import org.apache.ignite.spi.*;
+ import org.apache.ignite.internal.managers.deployment.*;
+ import org.apache.ignite.internal.processors.streamer.*;
+ import org.apache.ignite.spi.discovery.*;
+ import org.apache.ignite.internal.util.io.*;
+ import org.apache.ignite.internal.util.lang.*;
+ import org.apache.ignite.internal.util.typedef.*;
+ import org.apache.ignite.internal.util.typedef.internal.*;
+ import org.apache.ignite.internal.util.worker.*;
+ import org.jdk8.backport.*;
+ import org.jetbrains.annotations.*;
+ import sun.misc.*;
+ 
+ import javax.management.*;
+ import javax.naming.*;
+ import javax.net.ssl.*;
+ import java.io.*;
+ import java.lang.annotation.Annotation;
+ import java.lang.management.*;
+ import java.lang.reflect.Array;
+ import java.lang.reflect.*;
+ import java.math.*;
+ import java.net.*;
+ import java.nio.*;
+ import java.nio.channels.*;
+ import java.nio.channels.spi.*;
+ import java.nio.charset.*;
+ import java.security.*;
+ import java.security.cert.*;
+ import java.sql.*;
+ import java.sql.Timestamp;
+ import java.text.*;
+ import java.util.*;
+ import java.util.Date;
+ import java.util.concurrent.*;
+ import java.util.concurrent.atomic.*;
+ import java.util.concurrent.locks.*;
+ import java.util.jar.*;
+ import java.util.logging.*;
+ import java.util.regex.*;
+ import java.util.zip.*;
+ 
+ import static org.apache.ignite.IgniteSystemProperties.*;
+ import static org.apache.ignite.events.IgniteEventType.*;
+ import static org.apache.ignite.internal.GridNodeAttributes.*;
+ 
+ /**
+  * Collection of utility methods used throughout the system.
+  */
+ @SuppressWarnings({"UnusedReturnValue", "UnnecessaryFullyQualifiedName"})
+ public abstract class IgniteUtils {
+     /** Unsafe. */
+     private static final Unsafe UNSAFE = GridUnsafe.unsafe();
+ 
+     /** {@code True} if {@code unsafe} should be used for array copy. */
+     private static final boolean UNSAFE_BYTE_ARR_CP = unsafeByteArrayCopyAvailable();
+ 
+     /** Offset. */
+     private static final int BYTE_ARRAY_DATA_OFFSET = UNSAFE.arrayBaseOffset(byte[].class);
+ 
+     /** Sun-specific JDK constructor factory for objects that don't have empty constructor. */
+     private static final Method CTOR_FACTORY;
+ 
+     /** Sun JDK reflection factory. */
+     private static final Object SUN_REFLECT_FACTORY;
+ 
+     /** Public {@code java.lang.Object} no-argument constructor. */
+     private static final Constructor OBJECT_CTOR;
+ 
+     /** All grid event names. */
+     private static final Map<Integer, String> GRID_EVT_NAMES = new HashMap<>();
+ 
+     /** All grid events. */
+     private static final int[] GRID_EVTS;
+ 
+     /** Empty integers array. */
+     private static final int[] EMPTY_INTS = new int[0];
+ 
+     /** Empty  longs. */
+     private static final long[] EMPTY_LONGS = new long[0];
+ 
+     /** System line separator. */
+     private static final String NL = System.getProperty("line.separator");
+ 
+     /** Default user version. */
+     public static final String DFLT_USER_VERSION = "0";
+ 
+     /** Cache for {@link GridPeerDeployAware} fields to speed up reflection. */
+     private static final ConcurrentMap<String, IgniteBiTuple<Class<?>, Collection<Field>>> p2pFields =
+         new ConcurrentHashMap8<>();
+ 
+     /** Secure socket protocol to use. */
+     private static final String HTTPS_PROTOCOL = "TLS";
+ 
+     /** Project home directory. */
+     private static volatile GridTuple<String> ggHome;
+ 
+     /** Project work directory. */
+     private static volatile String ggWork;
+ 
+     /** OS JDK string. */
+     private static String osJdkStr;
+ 
+     /** OS string. */
+     private static String osStr;
+ 
+     /** JDK string. */
+     private static String jdkStr;
+ 
+     /** Indicates whether current OS is Windows 95. */
+     private static boolean win95;
+ 
+     /** Indicates whether current OS is Windows 98. */
+     private static boolean win98;
+ 
+     /** Indicates whether current OS is Windows NT. */
+     private static boolean winNt;
+ 
+     /** Indicates whether current OS is Windows Vista. */
+     private static boolean winVista;
+ 
+     /** Indicates whether current OS is Windows 7. */
+     private static boolean win7;
+ 
+     /** Indicates whether current OS is Windows 8. */
+     private static boolean win8;
+ 
+     /** Indicates whether current OS is Windows 8.1. */
+     private static boolean win81;
+ 
+     /** Indicates whether current OS is some version of Windows. */
+     private static boolean unknownWin;
+ 
+     /** Indicates whether current OS is Windows 2000. */
+     private static boolean win2k;
+ 
+     /** Indicates whether current OS is Windows XP. */
+     private static boolean winXp;
+ 
+     /** Indicates whether current OS is Windows Server 2003. */
+     private static boolean win2003;
+ 
+     /** Indicates whether current OS is Windows Server 2008. */
+     private static boolean win2008;
+ 
+     /** Indicates whether current OS is UNIX flavor. */
+     private static boolean unix;
+ 
+     /** Indicates whether current OS is Solaris. */
+     private static boolean solaris;
+ 
+     /** Indicates whether current OS is Linux flavor. */
+     private static boolean linux;
+ 
+     /** Indicates whether current OS is NetWare. */
+     private static boolean netware;
+ 
+     /** Indicates whether current OS is Mac OS. */
+     private static boolean mac;
+ 
+     /** Indicates whether current OS architecture is Sun Sparc. */
+     private static boolean sparc;
+ 
+     /** Indicates whether current OS architecture is Intel X86. */
+     private static boolean x86;
+ 
+     /** Name of the underlying OS. */
+     private static String osName;
+ 
+     /** Version of the underlying OS. */
+     private static String osVer;
+ 
+     /** CPU architecture of the underlying OS. */
+     private static String osArch;
+ 
+     /** Name of the Java Runtime. */
+     private static String javaRtName;
+ 
+     /** Name of the Java Runtime version. */
+     private static String javaRtVer;
+ 
+     /** Name of the JDK vendor. */
+     private static String jdkVendor;
+ 
+     /** Name of the JDK. */
+     private static String jdkName;
+ 
+     /** Version of the JDK. */
+     private static String jdkVer;
+ 
+     /** Name of JVM specification. */
+     private static String jvmSpecName;
+ 
+     /** Version of JVM implementation. */
+     private static String jvmImplVer;
+ 
+     /** Vendor's name of JVM implementation. */
+     private static String jvmImplVendor;
+ 
+     /** Name of the JVM implementation. */
+     private static String jvmImplName;
+ 
+     /** JMX domain as 'xxx.gridgain'. */
+     public static final String JMX_DOMAIN = IgniteUtils.class.getName().substring(0, IgniteUtils.class.getName().
+         indexOf('.', IgniteUtils.class.getName().indexOf('.') + 1));
+ 
+     /** Network packet header. */
 -    public static final byte[] GG_HEADER = U.intToBytes(0x00004747);
++    public static final byte[] IGNITE_HEADER = U.intToBytes(0x00004747);
+ 
+     /** Default buffer size = 4K. */
+     private static final int BUF_SIZE = 4096;
+ 
+     /** Byte bit-mask. */
+     private static final int MASK = 0xf;
+ 
+     /** Long date format pattern for log messages. */
+     private static final SimpleDateFormat LONG_DATE_FMT = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss");
+ 
+     /**
+      * Short date format pattern for log messages in "quiet" mode.
+      * Only time is included since we don't expect "quiet" mode to be used
+      * for longer runs.
+      */
+     private static final SimpleDateFormat SHORT_DATE_FMT = new SimpleDateFormat("HH:mm:ss");
+ 
+     /** Debug date format. */
+     private static final SimpleDateFormat DEBUG_DATE_FMT = new SimpleDateFormat("HH:mm:ss,SSS");
+ 
+     /** Cached local host address to make sure that every time the same local host is returned. */
+     private static InetAddress locHost;
+ 
+     /** */
+     static volatile long curTimeMillis = System.currentTimeMillis();
+ 
+     /** Primitive class map. */
+     private static final Map<String, Class<?>> primitiveMap = new HashMap<>(16, .5f);
+ 
+     /** Boxed class map. */
+     private static final Map<Class<?>, Class<?>> boxedClsMap = new HashMap<>(16, .5f);
+ 
+     /** Class loader used to load GridGain. */
+     private static final ClassLoader gridClassLoader = IgniteUtils.class.getClassLoader();
+ 
+     /** MAC OS invalid argument socket error message. */
+     public static final String MAC_INVALID_ARG_MSG = "On MAC OS you may have too many file descriptors open " +
+         "(simple restart usually solves the issue)";
+ 
+     /** Default help pages. */
+     public static final List<String> DFLT_HELP_LINKS = Arrays.asList(
+         "Troubleshooting:      http://bit.ly/GridGain-Troubleshooting",
+         "Documentation Center: http://bit.ly/GridGain-Documentation");
+ 
+     /** Portable classes. */
+     private static final Collection<Class<?>> PORTABLE_CLS = new HashSet<>();
+ 
+     /** GridGain Logging Directory. */
 -    public static final String GRIDGAIN_LOG_DIR = System.getenv(GG_LOG_DIR);
++    public static final String IGNITE_LOG_DIR = System.getenv(IgniteSystemProperties.IGNITE_LOG_DIR);
+ 
+     /** GridGain Work Directory. */
 -    public static final String GRIDGAIN_WORK_DIR = System.getenv(GG_WORK_DIR);
++    public static final String IGNITE_WORK_DIR = System.getenv(IgniteSystemProperties.IGNITE_WORK_DIR);
+ 
+     /** Clock timer. */
+     private static Thread timer;
+ 
+     /** Grid counter. */
+     private static int gridCnt;
+ 
+     /** Mutex. */
+     private static final Object mux = new Object();
+ 
+     /**
+      * Initializes enterprise check.
+      */
+     static {
+         String osName = System.getProperty("os.name");
+ 
+         String osLow = osName.toLowerCase();
+ 
+         // OS type detection.
+         if (osLow.contains("win")) {
+             if (osLow.contains("95"))
+                 win95 = true;
+             else if (osLow.contains("98"))
+                 win98 = true;
+             else if (osLow.contains("nt"))
+                 winNt = true;
+             else if (osLow.contains("2000"))
+                 win2k = true;
+             else if (osLow.contains("vista"))
+                 winVista = true;
+             else if (osLow.contains("xp"))
+                 winXp = true;
+             else if (osLow.contains("2003"))
+                 win2003 = true;
+             else if (osLow.contains("2008"))
+                 win2008 = true;
+             else if (osLow.contains("7"))
+                 win7 = true;
+             else if (osLow.contains("8.1"))
+                 win81 = true;
+             else if (osLow.contains("8"))
+                 win8 = true;
+             else
+                 unknownWin = true;
+         }
+         else if (osLow.contains("netware"))
+             netware = true;
+         else if (osLow.contains("mac os"))
+             mac = true;
+         else {
+             // UNIXs flavors tokens.
+             for (CharSequence os : new String[]{"ix", "inux", "olaris", "un", "ux", "sco", "bsd", "att"})
+                 if (osLow.contains(os)) {
+                     unix = true;
+ 
+                     break;
+                 }
+ 
+             // UNIX name detection.
+             if (osLow.contains("olaris"))
+                 solaris = true;
+             else if (osLow.contains("inux"))
+                 linux = true;
+         }
+ 
+         String osArch = System.getProperty("os.arch");
+ 
+         String archStr = osArch.toLowerCase();
+ 
+         // OS architecture detection.
+         if (archStr.contains("x86"))
+             x86 = true;
+         else if (archStr.contains("sparc"))
+             sparc = true;
+ 
+         String javaRtName = System.getProperty("java.runtime.name");
+         String javaRtVer = System.getProperty("java.runtime.version");
+         String jdkVendor = System.getProperty("java.specification.vendor");
+         String jdkName = System.getProperty("java.specification.name");
+         String jdkVer = System.getProperty("java.specification.version");
+         String osVer = System.getProperty("os.version");
+         String jvmSpecName = System.getProperty("java.vm.specification.name");
+         String jvmImplVer = System.getProperty("java.vm.version");
+         String jvmImplVendor = System.getProperty("java.vm.vendor");
+         String jvmImplName = System.getProperty("java.vm.name");
+ 
+         String jdkStr = javaRtName + ' ' + javaRtVer + ' ' + jvmImplVendor + ' ' + jvmImplName + ' ' +
+             jvmImplVer;
+ 
+         osStr = osName + ' ' + osVer + ' ' + osArch;
+         osJdkStr = osLow + ", " + jdkStr;
+ 
+         // Copy auto variables to static ones.
+         IgniteUtils.osName = osName;
+         IgniteUtils.jdkName = jdkName;
+         IgniteUtils.jdkVendor = jdkVendor;
+         IgniteUtils.jdkVer = jdkVer;
+         IgniteUtils.jdkStr = jdkStr;
+         IgniteUtils.osVer = osVer;
+         IgniteUtils.osArch = osArch;
+         IgniteUtils.jvmSpecName = jvmSpecName;
+         IgniteUtils.jvmImplVer = jvmImplVer;
+         IgniteUtils.jvmImplVendor = jvmImplVendor;
+         IgniteUtils.jvmImplName = jvmImplName;
+         IgniteUtils.javaRtName = javaRtName;
+         IgniteUtils.javaRtVer = javaRtVer;
+ 
+         primitiveMap.put("byte", byte.class);
+         primitiveMap.put("short", short.class);
+         primitiveMap.put("int", int.class);
+         primitiveMap.put("long", long.class);
+         primitiveMap.put("float", float.class);
+         primitiveMap.put("double", double.class);
+         primitiveMap.put("char", char.class);
+         primitiveMap.put("boolean", boolean.class);
+ 
+         boxedClsMap.put(byte.class, Byte.class);
+         boxedClsMap.put(short.class, Short.class);
+         boxedClsMap.put(int.class, Integer.class);
+         boxedClsMap.put(long.class, Long.class);
+         boxedClsMap.put(float.class, Float.class);
+         boxedClsMap.put(double.class, Double.class);
+         boxedClsMap.put(char.class, Character.class);
+         boxedClsMap.put(boolean.class, Boolean.class);
+ 
+         try {
+             OBJECT_CTOR = Object.class.getConstructor();
+         }
+         catch (NoSuchMethodException e) {
+             throw withCause(new AssertionError("Object class does not have empty constructor (is JDK corrupted?)."), e);
+         }
+ 
+         // Constructor factory.
+         Method ctorFac = null;
+         Object refFac = null;
+ 
+         try {
+             Class<?> refFactoryCls = Class.forName("sun.reflect.ReflectionFactory");
+ 
+             refFac = refFactoryCls.getMethod("getReflectionFactory").invoke(null);
+ 
+             ctorFac = refFac.getClass().getMethod("newConstructorForSerialization", Class.class,
+                 Constructor.class);
+         }
+         catch (NoSuchMethodException | ClassNotFoundException | IllegalAccessException | InvocationTargetException ignored) {
+             // No-op.
+         }
+ 
+         CTOR_FACTORY = ctorFac;
+         SUN_REFLECT_FACTORY = refFac;
+ 
+         // Disable hostname SSL verification for development and testing with self-signed certificates.
 -        if (Boolean.parseBoolean(System.getProperty(GG_DISABLE_HOSTNAME_VERIFIER))) {
++        if (Boolean.parseBoolean(System.getProperty(IGNITE_DISABLE_HOSTNAME_VERIFIER))) {
+             HttpsURLConnection.setDefaultHostnameVerifier(new HostnameVerifier() {
+                 @Override public boolean verify(String hostname, SSLSession sslSes) {
+                     return true;
+                 }
+             });
+         }
+ 
+         // Event names initialization.
+         for (Field field : IgniteEventType.class.getFields()) {
+             if (field.getType().equals(int.class)) {
+                 try {
+                     assert field.getName().startsWith("EVT_") : "Invalid event name (should start with 'EVT_': " +
+                         field.getName();
+ 
+                     int type = field.getInt(null);
+ 
+                     String prev = GRID_EVT_NAMES.put(type, field.getName().substring(4));
+ 
+                     // Check for duplicate event types.
+                     assert prev == null : "Duplicate event [type=" + type + ", name1=" + prev +
+                         ", name2=" + field.getName() + ']';
+                 }
+                 catch (IllegalAccessException e) {
+                     throw new IgniteException(e);
+                 }
+             }
+         }
+ 
+         // Event array initialization.
+         GRID_EVTS = toIntArray(GRID_EVT_NAMES.keySet());
+ 
+         // Sort for fast event lookup.
+         Arrays.sort(GRID_EVTS);
+ 
+         // We need to re-initialize EVTS_ALL and EVTS_ALL_MINUS_METRIC_UPDATE
+         // because they may have been initialized to null before GRID_EVTS were initialized.
+         if (EVTS_ALL == null || EVTS_ALL_MINUS_METRIC_UPDATE == null) {
+             try {
+                 Field f1 = IgniteEventType.class.getDeclaredField("EVTS_ALL");
+                 Field f2 = IgniteEventType.class.getDeclaredField("EVTS_ALL_MINUS_METRIC_UPDATE");
+ 
+                 assert f1 != null;
+                 assert f2 != null;
+ 
+                 // We use unsafe operations to update static fields on interface because
+                 // they are treated as static final and cannot be updated via standard reflection.
+                 UNSAFE.putObjectVolatile(UNSAFE.staticFieldBase(f1), UNSAFE.staticFieldOffset(f1), gridEvents());
+                 UNSAFE.putObjectVolatile(UNSAFE.staticFieldBase(f2), UNSAFE.staticFieldOffset(f2),
+                     gridEvents(EVT_NODE_METRICS_UPDATED));
+ 
+                 assert EVTS_ALL != null;
+                 assert EVTS_ALL.length == GRID_EVTS.length;
+ 
+                 assert EVTS_ALL_MINUS_METRIC_UPDATE != null;
+                 assert EVTS_ALL_MINUS_METRIC_UPDATE.length == GRID_EVTS.length - 1;
+ 
+                 // Validate correctness.
+                 for (int type : GRID_EVTS) {
+                     assert containsIntArray(EVTS_ALL, type);
+ 
+                     if (type != EVT_NODE_METRICS_UPDATED)
+                         assert containsIntArray(EVTS_ALL_MINUS_METRIC_UPDATE, type);
+                 }
+ 
+                 assert !containsIntArray(EVTS_ALL_MINUS_METRIC_UPDATE, EVT_NODE_METRICS_UPDATED);
+             }
+             catch (NoSuchFieldException e) {
+                 throw new IgniteException(e);
+             }
+         }
+ 
+         PORTABLE_CLS.add(Byte.class);
+         PORTABLE_CLS.add(Short.class);
+         PORTABLE_CLS.add(Integer.class);
+         PORTABLE_CLS.add(Long.class);
+         PORTABLE_CLS.add(Float.class);
+         PORTABLE_CLS.add(Double.class);
+         PORTABLE_CLS.add(Character.class);
+         PORTABLE_CLS.add(Boolean.class);
+         PORTABLE_CLS.add(String.class);
+         PORTABLE_CLS.add(UUID.class);
+         PORTABLE_CLS.add(Date.class);
+         PORTABLE_CLS.add(Timestamp.class);
+         PORTABLE_CLS.add(byte[].class);
+         PORTABLE_CLS.add(short[].class);
+         PORTABLE_CLS.add(int[].class);
+         PORTABLE_CLS.add(long[].class);
+         PORTABLE_CLS.add(float[].class);
+         PORTABLE_CLS.add(double[].class);
+         PORTABLE_CLS.add(char[].class);
+         PORTABLE_CLS.add(boolean[].class);
+         PORTABLE_CLS.add(String[].class);
+         PORTABLE_CLS.add(UUID[].class);
+         PORTABLE_CLS.add(Date[].class);
+         PORTABLE_CLS.add(Timestamp[].class);
+     }
+ 
+     /**
+      * @return System time approximated by 10 ms.
+      */
+     public static long currentTimeMillis() {
+         return curTimeMillis;
+     }
+ 
+     /**
+      * @return Value of {@link System#nanoTime()} in microseconds.
+      */
+     public static long microTime() {
+         return System.nanoTime() / 1000;
+     }
+ 
+     /**
+      * Gets nearest power of 2 larger or equal than v.
+      *
+      * @param v Value.
+      * @return Nearest power of 2.
+      */
+     public static int ceilPow2(int v) {
+         v--;
+ 
+         v |= v >> 1;
+         v |= v >> 2;
+         v |= v >> 4;
+         v |= v >> 8;
+         v |= v >> 16;
+ 
+         return ++v;
+     }
+ 
+     /**
+      * @param i Value.
+      * @return {@code true} If the given value is power of 2 (0 is not power of 2).
+      */
+     public static boolean isPow2(int i) {
+         return i > 0 && (i & (i - 1)) == 0;
+     }
+ 
+     /**
+      * Return SUN specific constructor factory.
+      *
+      * @return SUN specific constructor factory.
+      */
+     @Nullable public static Method ctorFactory() {
+         return CTOR_FACTORY;
+     }
+ 
+     /**
+      * @return Empty constructor for object class.
+      */
+     public static Constructor objectConstructor() {
+         return OBJECT_CTOR;
+     }
+ 
+     /**
+      * SUN JDK specific reflection factory for objects without public constructor.
+      *
+      * @return Reflection factory for objects without public constructor.
+      */
+     @Nullable public static Object sunReflectionFactory() {
+         return SUN_REFLECT_FACTORY;
+     }
+ 
+     /**
+      * Gets name for given grid event type.
+      *
+      * @param type Event type.
+      * @return Event name.
+      */
+     public static String gridEventName(int type) {
+         String name = GRID_EVT_NAMES.get(type);
+ 
+         return name != null ? name : Integer.toString(type);
+     }
+ 
+     /**
+      * Gets all event types.
+      *
+      * @param excl Optional exclude events.
+      * @return All events minus excluded ones.
+      */
+     public static int[] gridEvents(final int... excl) {
+         if (F.isEmpty(excl))
+             return GRID_EVTS;
+ 
+         List<Integer> evts = toIntList(GRID_EVTS, new P1<Integer>() {
+             @Override
+             public boolean apply(Integer i) {
+                 return !containsIntArray(excl, i);
+             }
+         });
+ 
+         return toIntArray(evts);
+     }
+ 
+     /**
+      * @param discoSpi Discovery SPI.
+      * @return {@code True} if ordering is supported.
+      */
+     public static boolean discoOrdered(DiscoverySpi discoSpi) {
+         DiscoverySpiOrderSupport ann = U.getAnnotation(discoSpi.getClass(), DiscoverySpiOrderSupport.class);
+ 
+         return ann != null && ann.value();
+     }
+ 
+     /**
+      * @return Checks if disco ordering should be enforced.
+      */
+     public static boolean relaxDiscoveryOrdered() {
 -        return "true".equalsIgnoreCase(System.getProperty(GG_NO_DISCO_ORDER));
++        return "true".equalsIgnoreCase(System.getProperty(IGNITE_NO_DISCO_ORDER));
+     }
+ 
+     /**
+      * This method should be used for adding quick debug statements in code
+      * while debugging. Calls to this method should never be committed to master.
+      *
+      * @param msg Message to debug.
+      * @deprecated Calls to this method should never be committed to master.
+      */
+     @Deprecated
+     public static void debug(Object msg) {
+         X.println(debugPrefix() + msg);
+     }
+ 
+     /**
+      * This method should be used for adding quick debug statements in code
+      * while debugging. Calls to this method should never be committed to master.
+      *
+      * @param msg Message to debug.
+      * @deprecated Calls to this method should never be committed to master.
+      */
+     @Deprecated
+     public static void debugx(String msg) {
+         X.printerrln(debugPrefix() + msg);
+     }
+ 
+     /**
+      * This method should be used for adding quick debug statements in code
+      * while debugging. Calls to this method should never be committed to master.
+      *
+      * @param log Logger.
+      * @param msg Message to debug.
+      *
+      * @deprecated Calls to this method should never be committed to master.
+      */
+     @Deprecated
+     public static void debug(IgniteLogger log, String msg) {
+         log.info(msg);
+     }
+ 
+     /**
+      * Prints stack trace of the current thread to {@code System.out}.
+      *
+      * @deprecated Calls to this method should never be committed to master.
+      */
+     @SuppressWarnings("deprecation")
+     @Deprecated
+     public static void dumpStack() {
+         dumpStack("Dumping stack.");
+     }
+ 
+     /**
+      * Prints stack trace of the current thread to {@code System.out}.
+      *
+      * @param msg Message to print with the stack.
+      *
+      * @deprecated Calls to this method should never be committed to master.
+      */
+     @Deprecated
+     public static void dumpStack(String msg) {
+         new Exception(debugPrefix() + msg).printStackTrace(System.out);
+     }
+ 
+     /**
+      * @param log Logger.
+      * @param msg Message.
+      */
+     public static void dumpStack(@Nullable IgniteLogger log, String msg) {
+         U.error(log, "Dumping stack.", new Exception(msg));
+     }
+ 
+     /**
+      * Prints stack trace of the current thread to provided output stream.
+      *
+      * @param msg Message to print with the stack.
+      * @param out Output to dump stack to.
+      *
+      * @deprecated Calls to this method should never be committed to master.
+      */
+     @Deprecated
+     public static void dumpStack(String msg, PrintStream out) {
+         new Exception(msg).printStackTrace(out);
+     }
+ 
+     /**
+      * Prints stack trace of the current thread to provided logger.
+      *
+      * @param log Logger.
+      * @param msg Message to print with the stack.
+      *
+      * @deprecated Calls to this method should never be committed to master.
+      */
+     @Deprecated
+     public static void debugStack(IgniteLogger log, String msg) {
+         log.error(msg, new Exception(debugPrefix() + msg));
+     }
+ 
+     /**
+      * @return Common prefix for debug messages.
+      */
+     private static String debugPrefix() {
+         return '<' + DEBUG_DATE_FMT.format(new Date(System.currentTimeMillis())) + "><DEBUG><" +
+             Thread.currentThread().getName() + '>' + ' ';
+     }
+ 
+     /**
+      * Prints heap usage.
+      */
+     public static void debugHeapUsage() {
+         System.gc();
+ 
+         Runtime runtime = Runtime.getRuntime();
+ 
+         X.println('<' + DEBUG_DATE_FMT.format(new Date(System.currentTimeMillis())) + "><DEBUG><" +
+             Thread.currentThread().getName() + "> Heap stats [free=" + runtime.freeMemory() / (1024 * 1024) +
+             "M, total=" + runtime.totalMemory() / (1024 * 1024) + "M]");
+     }
+ 
+     /**
+      * Gets heap size in GB rounded to specified precision.
+      *
+      * @param node Node.
+      * @param precision Precision.
+      * @return Heap size in GB.
+      */
+     public static double heapSize(ClusterNode node, int precision) {
+         return heapSize(Collections.singleton(node), precision);
+     }
+ 
+     /**
+      * Gets total heap size in GB rounded to specified precision.
+      *
+      * @param nodes Nodes.
+      * @param precision Precision.
+      * @return Total heap size in GB.
+      */
+     public static double heapSize(Iterable<ClusterNode> nodes, int precision) {
+         // In bytes.
+         double heap = 0.0;
+ 
+         for (ClusterNode n : nodesPerJvm(nodes)) {
+             ClusterMetrics m = n.metrics();
+ 
+             heap += Math.max(m.getHeapMemoryInitialized(), m.getHeapMemoryMaximum());
+         }
+ 
+         return roundedHeapSize(heap, precision);
+     }
+ 
+     /**
+      * Returns one representative node for each JVM.
+      *
+      * @param nodes Nodes.
+      * @return Collection which contains only one representative node for each JVM.
+      */
+     private static Iterable<ClusterNode> nodesPerJvm(Iterable<ClusterNode> nodes) {
+         Map<String, ClusterNode> grpMap = new HashMap<>();
+ 
+         // Group by mac addresses and pid.
+         for (ClusterNode node : nodes) {
+             String grpId = node.attribute(ATTR_MACS) + "|" + node.attribute(ATTR_JVM_PID);
+ 
+             if (!grpMap.containsKey(grpId))
+                 grpMap.put(grpId, node);
+         }
+ 
+         return grpMap.values();
+     }
+ 
+     /**
+      * Returns current JVM maxMemory in the same format as {@link #heapSize(org.apache.ignite.cluster.ClusterNode, int)}.
+      *
+      * @param precision Precision.
+      * @return Maximum memory size in GB.
+      */
+     public static double heapSize(int precision) {
+         return roundedHeapSize(Runtime.getRuntime().maxMemory(), precision);
+     }
+ 
+     /**
+      * Rounded heap size in gigabytes.
+      *
+      * @param heap Heap.
+      * @param precision Precision.
+      * @return Rounded heap size.
+      */
+     private static double roundedHeapSize(double heap, int precision) {
+         double rounded = new BigDecimal(heap / (1024 * 1024 * 1024d)).round(new MathContext(precision)).doubleValue();
+ 
+         return rounded < 0.1 ? 0.1 : rounded;
+     }
+ 
+     /**
+      * Performs thread dump and prints all available info to the given log.
+      *
+      * @param log Logger.
+      */
+     public static void dumpThreads(@Nullable IgniteLogger log) {
+         ThreadMXBean mxBean = ManagementFactory.getThreadMXBean();
+ 
+         ThreadInfo[] threadInfos =
+             mxBean.dumpAllThreads(mxBean.isObjectMonitorUsageSupported(), mxBean.isSynchronizerUsageSupported());
+ 
+         GridStringBuilder sb = new GridStringBuilder("Thread dump at ")
+             .a(new SimpleDateFormat("yyyy/MM/dd HH:mm:ss z").format(new Date(U.currentTimeMillis()))).a(NL);
+ 
+         for (ThreadInfo info : threadInfos) {
+             printThreadInfo(info, sb);
+ 
+             sb.a(NL);
+ 
+             if (info.getLockedSynchronizers() != null && info.getLockedSynchronizers().length > 0) {
+                 printSynchronizersInfo(info.getLockedSynchronizers(), sb);
+ 
+                 sb.a(NL);
+             }
+         }
+ 
+         sb.a(NL);
+ 
+         warn(log, sb.toString());
+     }
+ 
+     /**
+      * Prints single thread info to a buffer.
+      *
+      * @param threadInfo Thread info.
+      * @param sb Buffer.
+      */
+     private static void printThreadInfo(ThreadInfo threadInfo, GridStringBuilder sb) {
+         sb.a("Thread [name=\"").a(threadInfo.getThreadName())
+             .a("\", id=").a(threadInfo.getThreadId())
+             .a(", state=").a(threadInfo.getThreadState())
+             .a(", blockCnt=").a(threadInfo.getBlockedCount())
+             .a(", waitCnt=").a(threadInfo.getWaitedCount()).a("]").a(NL);
+ 
+         LockInfo lockInfo = threadInfo.getLockInfo();
+ 
+         if (lockInfo != null) {
+             sb.a("    Lock [object=").a(lockInfo)
+                 .a(", ownerName=").a(threadInfo.getLockOwnerName())
+                 .a(", ownerId=").a(threadInfo.getLockOwnerId()).a("]").a(NL);
+         }
+ 
+         MonitorInfo[] monitors = threadInfo.getLockedMonitors();
+         StackTraceElement[] elements = threadInfo.getStackTrace();
+ 
+         for (int i = 0; i < elements.length; i++) {
+             StackTraceElement e = elements[i];
+ 
+             sb.a("        at ").a(e.toString());
+ 
+             for (MonitorInfo monitor : monitors) {
+                 if (monitor.getLockedStackDepth() == i)
+                     sb.a(NL).a("        - locked ").a(monitor);
+             }
+ 
+             sb.a(NL);
+         }
+     }
+ 
+     /**
+      * Prints Synchronizers info to a buffer.
+      *
+      * @param syncs Synchronizers info.
+      * @param sb Buffer.
+      */
+     private static void printSynchronizersInfo(LockInfo[] syncs, GridStringBuilder sb) {
+         sb.a("    Locked synchronizers:");
+ 
+         for (LockInfo info : syncs)
+             sb.a(NL).a("        ").a(info);
+     }
+ 
+     /**
+      * Gets empty constructor for class even if the class does not have empty constructor
+      * declared. This method is guaranteed to work with SUN JDK and other JDKs still need
+      * to be tested.
+      *
+      * @param cls Class to get empty constructor for.
+      * @return Empty constructor if one could be found or {@code null} otherwise.
+      * @throws IgniteCheckedException If failed.
+      */
+     @Nullable public static Constructor<?> forceEmptyConstructor(Class<?> cls) throws IgniteCheckedException {
+         Constructor<?> ctor = null;
+ 
+         try {
+             return cls.getDeclaredConstructor();
+         }
+         catch (Exception ignore) {
+             Method ctorFac = U.ctorFactory();
+             Object sunRefFac = U.sunReflectionFactory();
+ 
+             if (ctorFac != null && sunRefFac != null)
+                 try {
+                     ctor = (Constructor)ctorFac.invoke(sunRefFac, cls, U.objectConstructor());
+                 }
+                 catch (IllegalAccessException | InvocationTargetException e) {
+                     throw new IgniteCheckedException("Failed to get object constructor for class: " + cls, e);
+                 }
+         }
+ 
+         return ctor;
+     }
+ 
+     /**
+      * Creates new instance of a class only if it has an empty constructor (can be non-public).
+      *
+      * @param cls Class name.
+      * @return Instance.
+      * @throws IgniteCheckedException If failed.
+      */
+     @Nullable public static <T> T newInstance(String cls) throws IgniteCheckedException {
+         Class<?> cls0;
+ 
+         try {
+             cls0 = Class.forName(cls);
+         }
+         catch (Exception e) {
+             throw new IgniteCheckedException(e);
+         }
+ 
+         return (T)newInstance(cls0);
+     }
+ 
+     /**
+      * Creates new instance of a class only if it has an empty constructor (can be non-public).
+      *
+      * @param cls Class to instantiate.
+      * @return New instance of the class or {@code null} if empty constructor could not be assigned.
+      * @throws IgniteCheckedException If failed.
+      */
+     @Nullable public static <T> T newInstance(Class<T> cls) throws IgniteCheckedException {
+         boolean set = false;
+ 
+         Constructor<T> ctor = null;
+ 
+         try {
+             ctor = cls.getDeclaredConstructor();
+ 
+             if (ctor == null)
+                 return null;
+ 
+             if (!ctor.isAccessible()) {
+                 ctor.setAccessible(true);
+ 
+                 set = true;
+             }
+ 
+             return ctor.newInstance();
+         }
+         catch (NoSuchMethodException e) {
+             throw new IgniteCheckedException("Failed to find empty constructor for class: " + cls, e);
+         }
+         catch (InstantiationException | InvocationTargetException | IllegalAccessException e) {
+             throw new IgniteCheckedException("Failed to create new instance for class: " + cls, e);
+         } finally {
+             if (ctor != null && set)
+                 ctor.setAccessible(false);
+         }
+     }
+ 
+     /**
+      * Creates new instance of a class even if it does not have public constructor.
+      *
+      * @param cls Class to instantiate.
+      * @return New instance of the class or {@code null} if empty constructor could not be assigned.
+      * @throws IgniteCheckedException If failed.
+      */
+     @SuppressWarnings({"unchecked"})
+     @Nullable public static <T> T forceNewInstance(Class<?> cls) throws IgniteCheckedException {
+         Constructor ctor = forceEmptyConstructor(cls);
+ 
+         if (ctor == null)
+             return null;
+ 
+         boolean set = false;
+ 
+         try {
+ 
+             if (!ctor.isAccessible()) {
+                 ctor.setAccessible(true);
+ 
+                 set = true;
+             }
+ 
+             return (T)ctor.newInstance();
+         }
+         catch (InstantiationException | InvocationTargetException | IllegalAccessException e) {
+             throw new IgniteCheckedException("Failed to create new instance for class: " + cls, e);
+         } finally {
+             if (set)
+                 ctor.setAccessible(false);
+         }
+     }
+ 
+     /**
+      * Pretty-formatting for minutes.
+      *
+      * @param mins Minutes to format.
+      * @return Formatted presentation of minutes.
+      */
+     public static String formatMins(long mins) {
+         assert mins >= 0;
+ 
+         if (mins == 0)
+             return "< 1 min";
+ 
+         SB sb = new SB();
+ 
+         long dd = mins / 1440; // 1440 mins = 60 mins * 24 hours
+ 
+         if (dd > 0)
+             sb.a(dd).a(dd == 1 ? " day " : " days ");
+ 
+         mins %= 1440;
+ 
+         long hh = mins / 60;
+ 
+         if (hh > 0)
+             sb.a(hh).a(hh == 1 ? " hour " : " hours ");
+ 
+         mins %= 60;
+ 
+         if (mins > 0)
+             sb.a(mins).a(mins == 1 ? " min " : " mins ");
+ 
+         return sb.toString().trim();
+     }
+ 
+     /**
+      * Gets 8-character substring of UUID (for terse logging).
+      *
+      * @param id Input ID.
+      * @return 8-character ID substring.
+      */
+     public static String id8(UUID id) {
+         return id.toString().substring(0, 8);
+     }
+ 
+     /**
+      * Gets 8-character substring of {@link org.apache.ignite.lang.IgniteUuid} (for terse logging).
+      * The ID8 will be constructed as follows:
+      * <ul>
+      * <li>Take first 4 digits for global ID, i.e. {@code GridUuid.globalId()}.</li>
+      * <li>Take last 4 digits for local ID, i.e. {@code GridUuid.localId()}.</li>
+      * </ul>
+      *
+      * @param id Input ID.
+      * @return 8-character representation of {@code GridUuid}.
+      */
+     public static String id8(IgniteUuid id) {
+         String s = id.toString();
+ 
+         return s.substring(0, 4) + s.substring(s.length() - 4);
+     }
+ 
+     /**
+      *
+      * @param len Number of characters to fill in.
+      * @param ch Character to fill with.
+      * @return String.
+      */
+     public static String filler(int len, char ch) {
+         char[] a = new char[len];
+ 
+         Arrays.fill(a, ch);
+ 
+         return new String(a);
+     }
+ 
+     /**
+      * Writes array to output stream.
+      *
+      * @param out Output stream.
+      * @param arr Array to write.
+      * @param <T> Array type.
+      * @throws IOException If failed.
+      */
+     public static <T> void writeArray(ObjectOutput out, T[] arr) throws IOException {
+         int len = arr == null ? 0 : arr.length;
+ 
+         out.writeInt(len);
+ 
+         if (arr != null && arr.length > 0)
+             for (T t : arr)
+                 out.writeObject(t);
+     }
+ 
+     /**
+      * Reads array from input stream.
+      *
+      * @param in Input stream.
+      * @return Deserialized array.
+      * @throws IOException If failed.
+      * @throws ClassNotFoundException If class not found.
+      */
+     @Nullable public static Object[] readArray(ObjectInput in) throws IOException, ClassNotFoundException {
+         int len = in.readInt();
+ 
+         Object[] arr = null;
+ 
+         if (len > 0) {
+             arr = new Object[len];
+ 
+             for (int i = 0; i < len; i++)
+                 arr[i] = in.readObject();
+         }
+ 
+         return arr;
+     }
+ 
+     /**
+      * Reads array from input stream.
+      *
+      * @param in Input stream.
+      * @return Deserialized array.
+      * @throws IOException If failed.
+      * @throws ClassNotFoundException If class not found.
+      */
+     @Nullable public static Class<?>[] readClassArray(ObjectInput in) throws IOException, ClassNotFoundException {
+         int len = in.readInt();
+ 
+         Class<?>[] arr = null;
+ 
+         if (len > 0) {
+             arr = new Class<?>[len];
+ 
+             for (int i = 0; i < len; i++)
+                 arr[i] = (Class<?>)in.readObject();
+         }
+ 
+         return arr;
+     }
+ 
+     /**
+      * Reads array from input stream.
+      *
+      * @param in Input stream.
+      * @return Deserialized array.
+      * @throws IOException If failed.
+      * @throws ClassNotFoundException If class not found.
+      */
+     @SuppressWarnings("unchecked")
+     @Nullable public static <K, V> IgnitePredicate<CacheEntry<K, V>>[] readEntryFilterArray(ObjectInput in)
+         throws IOException, ClassNotFoundException {
+         int len = in.readInt();
+ 
+         IgnitePredicate<CacheEntry<K, V>>[] arr = null;
+ 
+         if (len > 0) {
+             arr = new IgnitePredicate[len];
+ 
+             for (int i = 0; i < len; i++)
+                 arr[i] = (IgnitePredicate<CacheEntry<K, V>>)in.readObject();
+         }
+ 
+         return arr;
+     }
+ 
+     /**
+      *
+      * @param out Output.
+      * @param col Set to write.
+      * @throws IOException If write failed.
+      */
+     public static void writeCollection(ObjectOutput out, Collection<?> col) throws IOException {
+         if (col != null) {
+             out.writeInt(col.size());
+ 
+             for (Object o : col)
+                 out.writeObject(o);
+         }
+         else
+             out.writeInt(-1);
+     }
+ 
+     /**
+      * Writes collection of byte arrays to data output.
+      *
+      * @param out Output to write to.
+      * @param bytes Collection with byte arrays.
+      * @throws IOException If write failed.
+      */
+     public static void writeBytesCollection(DataOutput out, Collection<byte[]> bytes) throws IOException {
+         if (bytes != null) {
+             out.writeInt(bytes.size());
+ 
+             for (byte[] b : bytes)
+                 writeByteArray(out, b);
+         }
+         else
+             out.writeInt(-1);
+     }
+ 
+     /**
+      * Reads collection of byte arrays from data input.
+      *
+      * @param in Data input to read from.
+      * @return List of byte arrays.
+      * @throws IOException If read failed.
+      */
+     public static List<byte[]> readBytesList(DataInput in) throws IOException {
+         int size = in.readInt();
+ 
+         if (size < 0)
+             return null;
+ 
+         List<byte[]> res = new ArrayList<>(size);
+ 
+         for (int i = 0; i < size; i++)
+             res.add(readByteArray(in));
+ 
+         return res;
+     }
+ 
+     /**
+      *
+      * @param out Output.
+      * @param col Set to write.
+      * @throws IOException If write failed.
+      */
+     public static void writeIntCollection(DataOutput out, Collection<Integer> col) throws IOException {
+         if (col != null) {
+             out.writeInt(col.size());
+ 
+             for (Integer i : col)
+                 out.writeInt(i);
+         }
+         else
+             out.writeInt(-1);
+     }
+ 
+     /**
+      * @param in Input.
+      * @return Deserialized set.
+      * @throws IOException If deserialization failed.
+      * @throws ClassNotFoundException If deserialized class could not be found.
+      */
+     @Nullable public static <E> Collection<E> readCollection(ObjectInput in)
+         throws IOException, ClassNotFoundException {
+         return readList(in);
+     }
+ 
+     /**
+      * @param in Input.
+      * @return Deserialized set.
+      * @throws IOException If deserialization failed.
+      */
+     @Nullable public static Collection<Integer> readIntCollection(DataInput in) throws IOException {
+         int size = in.readInt();
+ 
+         // Check null flag.
+         if (size == -1)
+             return null;
+ 
+         Collection<Integer> col = new ArrayList<>(size);
+ 
+         for (int i = 0; i < size; i++)
+             col.add(in.readInt());
+ 
+         return col;
+     }
+ 
+     /**
+      *
+      * @param m Map to copy.
+      * @param <K> Key type.
+      * @param <V> Value type
+      * @return Copied map.
+      */
+     public static <K, V> Map<K, V> copyMap(Map<K, V> m) {
+         return new HashMap<>(m);
+     }
+ 
+     /**
+      *
+      * @param m Map to seal.
+      * @param <K> Key type.
+      * @param <V> Value type
+      * @return Sealed map.
+      */
+     public static <K, V> Map<K, V> sealMap(Map<K, V> m) {
+         assert m != null;
+ 
+         return Collections.unmodifiableMap(new HashMap<>(m));
+     }
+ 
+     /**
+      * Seal collection.
+      *
+      * @param c Collection to seal.
+      * @param <E> Entry type
+      * @return Sealed collection.
+      */
+     public static <E> List<E> sealList(Collection<E> c) {
+         return Collections.unmodifiableList(new ArrayList<>(c));
+     }
+ 
+     /**
+      * Convert array to seal list.
+      *
+      * @param a Array for convert to seal list.
+      * @param <E> Entry type
+      * @return Sealed collection.
+      */
+     public static <E> List<E> sealList(E... a) {
+         return Collections.unmodifiableList(Arrays.asList(a));
+     }
+ 
+     /**
+      * Gets display name of the network interface this IP address belongs to.
+      *
+      * @param addr IP address for which to find network interface name.
+      * @return Network interface name or {@code null} if can't be found.
+      */
+     @Nullable public static String getNetworkInterfaceName(String addr) {
+         assert addr != null;
+ 
+         try {
+             InetAddress inetAddr = InetAddress.getByName(addr);
+ 
+             for (NetworkInterface itf : asIterable(NetworkInterface.getNetworkInterfaces()))
+                 for (InetAddress itfAddr : asIterable(itf.getInetAddresses()))
+                     if (itfAddr.equals(inetAddr))
+                         return itf.getDisplayName();
+         }
+         catch (UnknownHostException ignore) {
+             return null;
+         }
+         catch (SocketException ignore) {
+             return null;
+         }
+ 
+         return null;
+     }
+ 
+     /**
+      * Tries to resolve host by name, returning local host if input is empty.
+      * This method reflects how {@link org.apache.ignite.configuration.IgniteConfiguration#getLocalHost()} should
+      * be handled in most places.
+      *
+      * @param hostName Hostname or {@code null} if local host should be returned.
+      * @return Address of given host or of localhost.
+      * @throws IOException If attempt to get local host failed.
+      */
+     public static InetAddress resolveLocalHost(@Nullable String hostName) throws IOException {
+         return F.isEmpty(hostName) ?
+             // Should default to InetAddress#anyLocalAddress which is package-private.
+             new InetSocketAddress(0).getAddress() :
+             InetAddress.getByName(hostName);
+     }
+ 
+     /**
+      * Determines whether current local host is different from previously cached.
+      *
+      * @return {@code true} or {@code false} depending on whether or not local host
+      *      has changed from the cached value.
+      * @throws IOException If attempt to get local host failed.
+      */
+     public static synchronized boolean isLocalHostChanged() throws IOException {
+         InetAddress locHost0 = locHost;
+ 
+         return locHost0 != null && !resetLocalHost().equals(locHost0);
+     }
+ 
+     /**
+      * Returns host names consistent with {@link #resolveLocalHost(String)}. So when it returns
+      * a common address this method returns single host name, and when a wildcard address passed
+      * this method tries to collect addresses of all available interfaces.
+      *
+      * @param locAddr Local address to resolve.
+      * @return Resolved available addresses of given local address.
+      * @throws IOException If failed.
+      * @throws IgniteCheckedException If no network interfaces found.
+      */
+     public static IgniteBiTuple<Collection<String>, Collection<String>> resolveLocalAddresses(InetAddress locAddr)
+         throws IOException, IgniteCheckedException {
+         assert locAddr != null;
+ 
+         Collection<String> addrs = new ArrayList<>();
+         Collection<String> hostNames = new ArrayList<>();
+ 
+         if (locAddr.isAnyLocalAddress()) {
+             // It should not take longer than 2 seconds to reach
+             // local address on any network.
+             int reachTimeout = 2000;
+ 
+             for (NetworkInterface itf : asIterable(NetworkInterface.getNetworkInterfaces())) {
+                 for (InetAddress addr : asIterable(itf.getInetAddresses())) {
+                     if (!addr.isLinkLocalAddress() && reachable(itf, addr, reachTimeout))
+                         addresses(addr, addrs, hostNames);
+                 }
+             }
+ 
+             if (F.isEmpty(addrs))
+                 throw new IgniteCheckedException("No network addresses found (is networking enabled?).");
+         }
+         else
+             addresses(locAddr, addrs, hostNames);
+ 
+         return F.t(addrs, hostNames);
+     }
+ 
+     /**
+      * @param addr Address.
+      * @param addrs Addresses.
+      * @param hostNames Host names.
+      */
+     private static void addresses(InetAddress addr, Collection<String> addrs, Collection<String> hostNames) {
+         String hostName = addr.getHostName();
+ 
+         String ipAddr = addr.getHostAddress();
+ 
+         hostName = F.isEmpty(hostName) || hostName.equals(ipAddr) || addr.isLoopbackAddress() ? "" : hostName;
+ 
+         addrs.add(ipAddr);
+         hostNames.add(hostName);
+     }
+ 
+     /**
+      * Gets local host. Implementation will first attempt to get a non-loopback
+      * address. If that fails, then loopback address will be returned.
+      * <p>
+      * Note that this method is synchronized to make sure that local host
+      * initialization happens only once.
+      *
+      * @return Address representing local host.
+      * @throws IOException If attempt to get local host failed.
+      */
+     public static synchronized InetAddress getLocalHost() throws IOException {
+         if (locHost == null)
+             // Cache it.
+             resetLocalHost();
+ 
+         return locHost;
+     }
+ 
+     /**
+      * @return Local host.
+      * @throws IOException If attempt to get local host failed.
+      */
+     private static synchronized InetAddress resetLocalHost() throws IOException {
+         locHost = null;
+ 
 -        String sysLocHost = IgniteSystemProperties.getString(GG_LOCAL_HOST);
++        String sysLocHost = IgniteSystemProperties.getString(IGNITE_LOCAL_HOST);
+ 
+         if (sysLocHost != null)
+             sysLocHost = sysLocHost.trim();
+ 
+         if (!F.isEmpty(sysLocHost))
+             locHost = InetAddress.getByName(sysLocHost);
+         else {
+             List<NetworkInterface> itfs = new ArrayList<>();
+ 
+             for (NetworkInterface itf : asIterable(NetworkInterface.getNetworkInterfaces()))
+                 itfs.add(itf);
+ 
+             Collections.sort(itfs, new Comparator<NetworkInterface>() {
+                 @Override public int compare(NetworkInterface itf1, NetworkInterface itf2) {
+                     // Interfaces whose name starts with 'e' should go first.
+                     return itf1.getName().compareTo(itf2.getName());
+                 }
+             });
+ 
+             // It should not take longer than 2 seconds to reach
+             // local address on any network.
+             int reachTimeout = 2000;
+ 
+             for (NetworkInterface itf : itfs) {
+                 boolean found = false;
+ 
+                 for (InetAddress addr : asIterable(itf.getInetAddresses())) {
+                     if (!addr.isLoopbackAddress() && !addr.isLinkLocalAddress() && reachable(itf, addr, reachTimeout)) {
+                         locHost = addr;
+ 
+                         found = true;
+ 
+                         break;
+                     }
+                 }
+ 
+                 if (found)
+                     break;
+             }
+         }
+ 
+         if (locHost == null)
+             locHost = InetAddress.getLocalHost();
+ 
+         return locHost;
+     }
+ 
+     /**
+      * Checks if address can be reached using three argument InetAddress.isReachable() version.
+      *
+      * @param itf Network interface to use for test.
+      * @param addr Address to check.
+      * @param reachTimeout Timeout for the check.
+      * @return {@code True} if address is reachable.
+      */
+     public static boolean reachable(NetworkInterface itf, InetAddress addr, int reachTimeout) {
+         try {
+             return addr.isReachable(itf, 0, reachTimeout);
+         }
+         catch (IOException ignore) {
+             return false;
+         }
+     }
+ 
+     /**
+      * Checks if address can be reached using one argument InetAddress.isReachable() version.
+      *
+      * @param addr Address to check.
+      * @param reachTimeout Timeout for the check.
+      * @return {@code True} if address is reachable.
+      */
+     public static boolean reachable(InetAddress addr, int reachTimeout) {
+         try {
+             return addr.isReachable(reachTimeout);
+         }
+         catch (IOException ignore) {
+             return false;
+         }
+     }
+ 
+     /**
+      * @param loc Local node.
+      * @param rmt Remote node.
+      * @return Whether given nodes have the same macs.
+      */
+     public static boolean sameMacs(ClusterNode loc, ClusterNode rmt) {
+         assert loc != null;
+         assert rmt != null;
+ 
+         String locMacs = loc.attribute(GridNodeAttributes.ATTR_MACS);
+         String rmtMacs = rmt.attribute(GridNodeAttributes.ATTR_MACS);
+ 
+         return locMacs != null && locMacs.equals(rmtMacs);
+     }
+ 
+     /**
+      * Gets a list of all local non-loopback IPs known to this JVM.
+      * Note that this will include both IPv4 and IPv6 addresses (even if one "resolves"
+      * into another). Loopbacks will be skipped.
+      *
+      * @return List of all known local IPs (empty list if no addresses available).
+      */
+     public static synchronized Collection<String> allLocalIps() {
+         List<String> ips = new ArrayList<>(4);
+ 
+         try {
+             Enumeration<NetworkInterface> itfs = NetworkInterface.getNetworkInterfaces();
+ 
+             if (itfs != null) {
+                 for (NetworkInterface itf : asIterable(itfs)) {
+                     if (!itf.isLoopback()) {
+                         Enumeration<InetAddress> addrs = itf.getInetAddresses();
+ 
+                         if (addrs != null) {
+                             for (InetAddress addr : asIterable(addrs)) {
+                                 String hostAddr = addr.getHostAddress();
+ 
+                                 if (!addr.isLoopbackAddress() && !ips.contains(hostAddr))
+                                     ips.add(hostAddr);
+                             }
+                         }
+                     }
+                 }
+             }
+         }
+         catch (SocketException ignore) {
+             return Collections.emptyList();
+         }
+ 
+         Collections.sort(ips);
+ 
+         return ips;
+     }
+ 
+     /**
+      * Gets a list of all local enabled MACs known to this JVM. It
+      * is using hardware address of the network interface that is not guaranteed to be
+      * MAC addresses (but in most cases it is).
+      * <p>
+      * Note that if network interface is disabled - its MAC won't be included. All
+      * local network interfaces are probed including loopbacks. Virtual interfaces
+      * (sub-interfaces) are skipped.
+      * <p>
+      * Note that on linux getHardwareAddress() can return null from time to time
+      * if NetworkInterface.getHardwareAddress() method is called from many threads.
+      *
+      * @return List of all known enabled local MACs or empty list
+      *      if no MACs could be found.
+      */
+     public static synchronized Collection<String> allLocalMACs() {
+         List<String> macs = new ArrayList<>(3);
+ 
+         try {
+             Enumeration<NetworkInterface> itfs = NetworkInterface.getNetworkInterfaces();
+ 
+             if (itfs != null) {
+                 for (NetworkInterface itf : asIterable(itfs)) {
+                     byte[] hwAddr = itf.getHardwareAddress();
+ 
+                     // Loopback produces empty MAC.
+                     if (hwAddr != null && hwAddr.length > 0) {
+                         String mac = byteArray2HexString(hwAddr);
+ 
+                         if (!macs.contains(mac))
+                             macs.add(mac);
+                     }
+                 }
+             }
+         }
+         catch (SocketException ignore) {
+             return Collections.emptyList();
+         }
+ 
+         Collections.sort(macs);
+ 
+         return macs;
+     }
+ 
+     /**
+      * Downloads resource by URL.
+      *
+      * @param url URL to download.
+      * @param file File where downloaded resource should be stored.
+      * @return File where downloaded resource should be stored.
+      * @throws IOException If error occurred.
+      */
+     public static File downloadUrl(URL url, File file) throws IOException {
+         assert url != null;
+         assert file != null;
+ 
+         InputStream in = null;
+         OutputStream out = null;
+ 
+         try {
+             URLConnection conn = url.openConnection();
+ 
+             if (conn instanceof HttpsURLConnection) {
+                 HttpsURLConnection https = (HttpsURLConnection)conn;
+ 
+                 https.setHostnameVerifier(new DeploymentHostnameVerifier());
+ 
+                 SSLContext ctx = SSLContext.getInstance(HTTPS_PROTOCOL);
+ 
+                 ctx.init(null, getTrustManagers(), null);
+ 
+                 // Initialize socket factory.
+                 https.setSSLSocketFactory(ctx.getSocketFactory());
+             }
+ 
+             in = conn.getInputStream();
+ 
+             if (in == null)
+                 throw new IOException("Failed to open connection: " + url.toString());
+ 
+             out = new BufferedOutputStream(new FileOutputStream(file));
+ 
+             copy(in, out);
+         }
+         catch (NoSuchAlgorithmException | KeyManagementException e) {
+             throw new IOException("Failed to open HTTPs connection [url=" + url.toString() + ", msg=" + e + ']', e);
+         } finally {
+             close(in, null);
+             close(out, null);
+         }
+ 
+         return file;
+     }
+ 
+     /**
+      * Construct array with one trust manager which don't reject input certificates.
+      *
+      * @return Array with one X509TrustManager implementation of trust manager.
+      */
+     private static TrustManager[] getTrustManagers() {
+         return new TrustManager[]{
+             new X509TrustManager() {
+                 @Nullable @Override public X509Certificate[] getAcceptedIssuers() {
+                     return null;
+                 }
+ 
+                 @Override public void checkClientTrusted(X509Certificate[] certs, String authType) {
+                     /* No-op. */
+                 }
+ 
+                 @Override public void checkServerTrusted(X509Certificate[] certs, String authType) {
+                     /* No-op. */
+                 }
+             }
+         };
+     }
+ 
+     /**
+      * Replace password in URI string with a single '*' character.
+      * <p>
+      * Parses given URI by applying &quot;.*://(.*:.*)@.*&quot;
+      * regular expression pattern and than if URI matches it
+      * replaces password strings between '/' and '@' with '*'.
+      *
+      * @param uri URI which password should be replaced.
+      * @return Converted URI string
+      */
+     @Nullable public static String hidePassword(@Nullable String uri) {
+         if (uri == null)
+             return null;
+ 
+         if (Pattern.matches(".*://(.*:.*)@.*", uri)) {
+             int userInfoLastIdx = uri.indexOf('@');
+ 
+             assert userInfoLastIdx != -1;
+ 
+             String str = uri.substring(0, userInfoLastIdx);
+ 
+             int userInfoStartIdx = str.lastIndexOf('/');
+ 
+             str = str.substring(userInfoStartIdx + 1);
+ 
+             String[] params = str.split(";");
+ 
+             StringBuilder builder = new StringBuilder();
+ 
+             for (int i = 0; i < params.length; i++) {
+                 int idx;
+ 
+                 if ((idx = params[i].indexOf(':')) != -1)
+                     params[i] = params[i].substring(0, idx + 1) + '*';
+ 
+                 builder.append(params[i]);
+ 
+                 if (i != params.length - 1)
+                     builder.append(';');
+             }
+ 
+             return new StringBuilder(uri).replace(userInfoStartIdx + 1, userInfoLastIdx,
+                 builder.toString()).toString();
+         }
+ 
+         return uri;
+     }
+ 
+     /**
+      * @return Class loader used to load GridGain itself.
+      */
+     public static ClassLoader gridClassLoader() {
+         return gridClassLoader;
+     }
+ 
+     /**
+      * @param parent Parent to find.
+      * @param ldr Loader to check.
+      * @return {@code True} if parent found.
+      */
+     public static boolean hasParent(@Nullable ClassLoader parent, ClassLoader ldr) {
+         if (parent != null) {
+             for (; ldr != null; ldr = ldr.getParent()) {
+                 if (ldr.equals(parent))
+                     return true;
+             }
+ 
+             return false;
+         }
+ 
+         return true;
+     }
+ 
+     /**
+      * Verifier always returns successful result for any host.
+      */
+     private static class DeploymentHostnameVerifier implements HostnameVerifier {
+         /** {@inheritDoc} */
+         @Override public boolean verify(String hostname, SSLSession ses) {
+             // Remote host trusted by default.
+             return true;
+         }
+     }
+ 
+     /**
+      * Makes a {@code '+---+'} dash line.
+      *
+      * @param len Length of the dash line to make.
+      * @return Dash line.
+      */
+     public static String dash(int len) {
+         char[] dash = new char[len];
+ 
+         Arrays.fill(dash, '-');
+ 
+         dash[0] = dash[len - 1] = '+';
+ 
+         return new String(dash);
+     }
+ 
+     /**
+      * Creates space filled string of given length.
+      *
+      * @param len Number of spaces.
+      * @return Space filled string of given length.
+      */
+     public static String pad(int len) {
+         char[] dash = new char[len];
+ 
+         Arrays.fill(dash, ' ');
+ 
+         return new String(dash);
+     }
+ 
+     /**
+      * Formats system time in milliseconds for printing in logs.
+      *
+      * @param sysTime System time.
+      * @return Formatted time string.
+      */
+     public static String format(long sysTime) {
+         return LONG_DATE_FMT.format(new java.util.Date(sysTime));
+     }
+ 
+     /**
+      * Takes given collection, shuffles it and returns iterable instance.
+      *
+      * @param <T> Type of elements to create iterator for.
+      * @param col Collection to shuffle.
+      * @return Iterable instance over randomly shuffled collection.
+      */
+     public static <T> Iterable<T> randomIterable(Collection<T> col) {
+         List<T> list = new ArrayList<>(col);
+ 
+         Collections.shuffle(list);
+ 
+         return list;
+     }
+ 
+     /**
+      * Converts enumeration to iterable so it can be used in {@code foreach} construct.
+      *
+      * @param <T> Types of instances for iteration.
+      * @param e Enumeration to convert.
+      * @return Iterable over the given enumeration.
+      */
+     public static <T> Iterable<T> asIterable(final Enumeration<T> e) {
+         return new Iterable<T>() {
+             @Override public Iterator<T> iterator() {
+                 return new Iterator<T>() {
+                     @Override public boolean hasNext() {
+                         return e.hasMoreElements();
+                     }
+ 
+                     @SuppressWarnings({"IteratorNextCanNotThrowNoSuchElementException"})
+                     @Override public T next() {
+                         return e.nextElement();
+                     }
+ 
+                     @Override public void remove() {
+                         throw new UnsupportedOperationException();
+                     }
+                 };
+             }
+         };
+     }
+ 
+     /**
+      * Copy source file (or folder) to destination file (or folder). Supported source & destination:
+      * <ul>
+      * <li>File to File</li>
+      * <li>File to Folder</li>
+      * <li>Folder to Folder (Copy the content of the directory and not the directory itself)</li>
+      * </ul>
+      *
+      * @param src Source file or folder.
+      * @param dest Destination file or folder.
+      * @param overwrite Whether or not overwrite existing files and folders.
+      * @throws IOException Thrown if an I/O error occurs.
+      */
+     public static void copy(File src, File dest, boolean overwrite) throws IOException {
+         assert src != null;
+         assert dest != null;
+ 
+         /*
+          * Supported source & destination:
+          * ===============================
+          * 1. File -> File
+          * 2. File -> Directory
+          * 3. Directory -> Directory
+          */
+ 
+         // Source must exist.
+         if (!src.exists())
+             throw new FileNotFoundException("Source can't be found: " + src);
+ 
+         // Check that source and destination are not the same.
+         if (src.getAbsoluteFile().equals(dest.getAbsoluteFile()))
+             throw new IOException("Source and destination are the same [src=" + src + ", dest=" + dest + ']');
+ 
+         if (dest.exists()) {
+             if (!dest.isDirectory() && !overwrite)
+                 throw new IOException("Destination already exists: " + dest);
+ 
+             if (!dest.canWrite())
+                 throw new IOException("Destination is not writable:" + dest);
+         }
+         else {
+             File parent = dest.getParentFile();
+ 
+             if (parent != null && !parent.exists())
+                 // Ignore any errors here.
+                 // We will get errors when we'll try to open the file stream.
+                 //noinspection ResultOfMethodCallIgnored
+                 parent.mkdirs();
+ 
+             // If source is a directory, we should create destination directory.
+             if (src.isDirectory())
+                 //noinspection ResultOfMethodCallIgnored
+                 dest.mkdir();
+         }
+ 
+         if (src.isDirectory()) {
+             // In this case we have Directory -> Directory.
+             // Note that we copy the content of the directory and not the directory itself.
+ 
+             File[] files = src.listFiles();
+ 
+             for (File file : files) {
+                 if (file.isDirectory()) {
+                     File dir = new File(dest, file.getName());
+ 
+                     if (!dir.exists() && !dir.mkdirs())
+                         throw new IOException("Can't create directory: " + dir);
+ 
+                     copy(file, dir, overwrite);
+                 }
+                 else
+                     copy(file, dest, overwrite);
+             }
+         }
+         else {
+             // In this case we have File -> File or File -> Directory.
+             File file = dest.exists() && dest.isDirectory() ? new File(dest, src.getName()) : dest;
+ 
+             if (!overwrite && file.exists())
+                 throw new IOException("Destination already exists: " + file);
+ 
+             FileInputStream in = null;
+             FileOutputStream out = null;
+ 
+             try {
+                 in = new FileInputStream(src);
+                 out = new FileOutputStream(file);
+ 
+                 copy(in, out);
+             }
+             finally {
+                 if (in != null)
+                     in.close();
+ 
+                 if (out != null) {
+                     out.getFD().sync();
+ 
+                     out.close();
+                 }
+             }
+         }
+     }
+ 
+     /**
+      * Starts clock timer if grid is first.
+      */
+     public static void onGridStart() {
+         synchronized (mux) {
+             if (gridCnt == 0) {
+                 timer = new Thread(new Runnable() {
+                     @SuppressWarnings({"BusyWait", "InfiniteLoopStatement"})
+                     @Override public void run() {
+                         while (true) {
+                             curTimeMillis = System.currentTimeMillis();
+ 
+                             try {
+                                 Thread.sleep(10);
+                             }
+                             catch (InterruptedException ignored) {
+                                 U.log(null, "Timer thread has been interrupted.");
+ 
+                                 break;
+                             }
+                         }
+                     }
+                 }, "gridgain-clock");
+ 
+                 timer.setDaemon(true);
+ 
+                 timer.setPriority(10);
+ 
+                 timer.start();
+             }
+ 
+             ++gridCnt;
+         }
+     }
+ 
+     /**
+      * Stops clock timer if all nodes into JVM were stopped.
+      */
+     public static void onGridStop(){
+         synchronized (mux) {
+             assert gridCnt > 0 : gridCnt;
+ 
+             --gridCnt;
+ 
+             if (gridCnt == 0 && timer != null) {
+                 timer.interrupt();
+ 
+                 timer = null;
+             }
+         }
+     }
+ 
+     /**
+      * Copies input byte stream to output byte stream.
+      *
+      * @param in Input byte stream.
+      * @param out Output byte stream.
+      * @return Number of the copied bytes.
+      * @throws IOException Thrown if an I/O error occurs.
+      */
+     public static int copy(InputStream in, OutputStream out) throws IOException {
+         assert in != null;
+         assert out != null;
+ 
+         byte[] buf = new byte[BUF_SIZE];
+ 
+         int cnt = 0;
+ 
+         for (int n; (n = in.read(buf)) > 0;) {
+             out.write(buf, 0, n);
+ 
+             cnt += n;
+         }
+ 
+         return cnt;
+     }
+ 
+     /**
+      * Copies input character stream to output character stream.
+      *
+      * @param in Input character stream.
+      * @param out Output character stream.
+      * @return Number of the copied characters.
+      * @throws IOException Thrown if an I/O error occurs.
+      */
+     public static int copy(Reader in, Writer out) throws IOException {
+         assert in != null;
+         assert out != null;
+ 
+         char[] buf = new char[BUF_SIZE];
+ 
+         int cnt = 0;
+ 
+         for (int n; (n = in.read(buf)) > 0;) {
+             out.write(buf, 0, n);
+ 
+             cnt += n;
+         }
+ 
+         return cnt;
+     }
+ 
+     /**
+      * Writes string to file.
+      *
+      * @param file File.
+      * @param s String to write.
+      * @throws IOException Thrown if an I/O error occurs.
+      */
+     public static void writeStringToFile(File file, String s) throws IOException {
+         writeStringToFile(file, s, Charset.defaultCharset().toString(), false);
+     }
+ 
+     /**
+      * Writes string to file.
+      *
+      * @param file File.
+      * @param s String to write.
+      * @param charset Encoding.
+      * @throws IOException Thrown if an I/O error occurs.
+      */
+     public static void writeStringToFile(File file, String s, String charset) throws IOException {
+         writeStringToFile(file, s, charset, false);
+     }
+ 
+     /**
+      * Reads file to string using specified charset.
+      *
+      * @param fileName File name.
+      * @param charset File charset.
+      * @return File content.
+      * @throws IOException If error occurred.
+      */
+     public static String readFileToString(String fileName, String charset) throws IOException {
+         Reader input = new InputStreamReader(new FileInputStream(fileName), charset);
+ 
+         StringWriter output = new StringWriter();
+ 
+         char[] buf = new char[4096];
+ 
+         int n;
+ 
+         while ((n = input.read(buf)) != -1)
+             output.write(buf, 0, n);
+ 
+         return output.toString();
+     }
+ 
+     /**
+      * Writes string to file.
+      *
+      * @param file File.
+      * @param s String to write.
+      * @param charset Encoding.
+      * @param append If {@code true}, then specified string will be added to the end of the file.
+      * @throws IOException Thrown if an I/O error occurs.
+      */
+     public static void writeStringToFile(File file, String s, String charset, boolean append) throws IOException {
+         if (s == null)
+             return;
+ 
+         OutputStream out = null;
+ 
+         try {
+             out = new FileOutputStream(file, append);
+ 
+             if (s != null)
+                 out.write(s.getBytes(charset));
+         } finally {
+             closeQuiet(out);
+         }
+     }
+ 
+     /**
+      * Utility method that sets cause into exception and returns it.
+      *
+      * @param e Exception to set cause to and return.
+      * @param cause Optional cause to set (if not {@code null}).
+      * @param <E> Type of the exception.
+      * @return Passed in exception with optionally set cause.
+      */
+     public static <E extends Throwable> E withCause(E e, @Nullable Throwable cause) {
+         assert e != null;
+ 
+         if (cause != null)
+             e.initCause(cause);
+ 
+         return e;
+     }
+ 
+     /**
+      * Deletes file or directory with all sub-directories and files.
+      *
+      * @param file File or directory to delete.
+      * @return {@code true} if and only if the file or directory is successfully deleted,
+      *      {@code false} otherwise
+      */
+     public static boolean delete(File file) {
+         assert file != null;
+ 
+         boolean res = true;
+ 
+         if (file.isDirectory()) {
+             File[] files = file.listFiles();
+ 
+             if (files != null && files.length > 0)
+                 for (File file1 : files)
+                     if (file1.isDirectory())
+                         res &= delete(file1);
+                     else if (file1.getName().endsWith("jar"))
+                         try {
+                             // Why do we do this?
+                             new JarFile(file1, false).close();
+ 
+                             res &= file1.delete();
+                         }
+                         catch (IOException ignore) {
+                             // Ignore it here...
+                         }
+                     else
+                         res &= file1.delete();
+ 
+             res &= file.delete();
+         }
+         else
+             res = file.delete();
+ 
+         return res;
+     }
+ 
+     /**
+      * @param dir Directory to create along with all non-existent parent directories.
+      * @return {@code True} if directory exists (has been created or already existed),
+      *      {@code false} if has not been created and does not exist.
+      */
+     public static boolean mkdirs(File dir) {
+         assert dir != null;
+ 
+         return dir.mkdirs() || dir.exists();
+     }
+ 
+     /**
+      * Resolve project home directory based on source code base.
+      *
+      * @return Project home directory (or {@code null} if it cannot be resolved).
+      */
+     @Nullable private static String resolveProjectHome() {
+         assert Thread.holdsLock(IgniteUtils.class);
+ 
+         // Resolve GridGain home via environment variables.
 -        String ggHome0 = IgniteSystemProperties.getString(GG_HOME);
++        String ggHome0 = IgniteSystemProperties.getString(IGNITE_HOME);
+ 
+         if (!F.isEmpty(ggHome0))
+             return ggHome0;
+ 
+         String appWorkDir = System.getProperty("user.dir");
+ 
+         if (appWorkDir != null) {
+             ggHome0 = findProjectHome(new File(appWorkDir));
+ 
+             if (ggHome0 != null)
+                 return ggHome0;
+         }
+ 
+         URI uri;
+ 
+         Class<IgniteUtils> cls = IgniteUtils.class;
+ 
+         try {
+             ProtectionDomain domain = cls.getProtectionDomain();
+ 
+             // Should not happen, but to make sure our code is not broken.
+             if (domain == null || domain.getCodeSource() == null || domain.getCodeSource().getLocation() == null) {
+                 logResolveFailed(cls, null);
+ 
+                 return null;
+             }
+ 
+             // Resolve path to class-file.
+             uri = domain.getCodeSource().getLocation().toURI();
+ 
+             // Overcome UNC path problem on Windows (http://www.tomergabel.com/JavaMishandlesUNCPathsOnWindows.aspx)
+             if (isWindows() && uri.getAuthority() != null)
+                 uri = new URI(uri.toString().replace("file://", "file:/"));
+         }
+         catch (URISyntaxException | SecurityException e) {
+             logResolveFailed(cls, e);
+ 
+             return null;
+         }
+ 
+         return findProjectHome(new File(uri));
+     }
+ 
+     /**
+      * Tries to find project home starting from specified directory and moving to root.
+      *
+      * @param startDir First directory in search hierarchy.
+      * @return Project home path or {@code null} if it wasn't found.
+      */
+     private static String findProjectHome(File startDir) {
+         for (File cur = startDir.getAbsoluteFile(); cur != null; cur = cur.getParentFile()) {
+             // Check 'cur' is project home directory.
+             if (!new File(cur, "bin").isDirectory() ||
+                 !new File(cur, "libs").isDirectory() ||
+                 !new File(cur, "config").isDirectory())
+                 continue;
+ 
+             return cur.getPath();
+         }
+ 
+         return null;
+     }
+ 
+     /**
+      * @param cls Class.
+      * @param e Exception.
+      */
+     private static void logResolveFailed(Class cls, Exception e) {
 -        warn(null, "Failed to resolve GRIDGAIN_HOME automatically for class codebase " +
++        warn(null, "Failed to resolve IGNITE_HOME automatically for class codebase " +
+             "[class=" + cls + (e == null ? "" : ", e=" + e.getMessage()) + ']');
+     }
+ 
+     /**
 -     * Retrieves {@code GRIDGAIN_HOME} property. The property is retrieved from system
++     * Retrieves {@code IGNITE_HOME} property. The property is retrieved from system
+      * properties or from environment in that order.
+      *
 -     * @return {@code GRIDGAIN_HOME} property.
++     * @return {@code IGNITE_HOME} property.
+      */
+     @Nullable public static String getGridGainHome() {
+         GridTuple<String> ggHomeTup = ggHome;
+ 
+         String ggHome0;
+ 
+         if (ggHomeTup == null) {
+             synchronized (IgniteUtils.class) {
+                 // Double check.
+                 ggHomeTup = ggHome;
+ 
+                 if (ggHomeTup == null) {
+                     // Resolve GridGain installation home directory.
+                     ggHome = F.t(ggHome0 = resolveProjectHome());
+ 
+                     if (ggHome0 != null)
 -                        System.setProperty(GG_HOME, ggHome0);
++                        System.setProperty(IGNITE_HOME, ggHome0);
+                 }
+                 else
+                     ggHome0 = ggHomeTup.get();
+             }
+         }
+         else
+             ggHome0 = ggHomeTup.get();
+ 
+         return ggHome0;
+     }
+ 
+     /**
+      * @param path GridGain home. May be {@code null}.
+      */
+     public static void setGridGainHome(@Nullable String path) {
+         GridTuple<String> ggHomeTup = ggHome;
+ 
+         String ggHome0;
+ 
+         if (ggHomeTup == null) {
+             synchronized (IgniteUtils.class) {
+                 // Double check.
+                 ggHomeTup = ggHome;
+ 
+                 if (ggHomeTup == null) {
+                     if (F.isEmpty(path))
 -                        System.clearProperty(GG_HOME);
++                        System.clearProperty(IGNITE_HOME);
+                     else
 -                        System.setProperty(GG_HOME, path);
++                        System.setProperty(IGNITE_HOME, path);
+ 
+                     ggHome = F.t(path);
+ 
+                     return;
+                 }
+                 else
+                     ggHome0 = ggHomeTup.get();
+             }
+         }
+         else
+             ggHome0 = ggHomeTup.get();
+ 
+         if (ggHome0 != null && !ggHome0.equals(path))
 -            throw new IgniteException("Failed to set GRIDGAIN_HOME after it has been already resolved " +
++            throw new IgniteException("Failed to set IGNITE_HOME after it has been already resolved " +
+                 "[ggHome=" + ggHome0 + ", newGgHome=" + path + ']');
+     }
+ 
+     /**
+      * Gets file associated with path.
+      * <p>
 -     * First check if path is relative to {@code GRIDGAIN_HOME}.
++     * First check if path is relative to {@code IGNITE_HOME}.
+      * If not, check if path is absolute.
+      * If all checks fail, then {@code null} is returned.
+      * <p>
 -     * See {@link #getGridGainHome()} for information on how {@code GRIDGAIN_HOME} is retrieved.
++     * See {@link #getGridGainHome()} for information on how {@code IGNITE_HOME} is retrieved.
+      *
+      * @param path Path to resolve.
+      * @return Resolved path as file, or {@code null} if path cannot be resolved.
+      */
+     @Nullable public static File resolveGridGainPath(String path) {
+         assert path != null;
+ 
+         /*
 -         * 1. Check relative to GRIDGAIN_HOME specified in configuration, if any.
++         * 1. Check relative to IGNITE_HOME specified in configuration, if any.
+          */
+ 
+         String home = getGridGainHome();
+ 
+         if (home != null) {
+             File file = new File(home, path);
+ 
+             if (file.exists())
+                 return file;
+         }
+ 
+         /*
+          * 2. Check given path as absolute.
+          */
+ 
+         File file = new File(path);
+ 
+         if (file.exists())
+             return file;
+ 
+         /*
+          * 3. Check development path.
+          */
+ 
+         if (home != null)
+             file = new File(home, "os/" + path);
+ 
+         return file.exists() ? file : null;
+     }
+ 
+     /**
+      * Gets URL representing the path passed in. First the check is made if path is absolute.
+      * If not, then the check is made if path is relative to {@code META-INF} folder in classpath.
 -     * If not, then the check is made if path is relative to ${GRIDGAIN_HOME}.
++     * If not, then the check is made if path is relative to ${IGNITE_HOME}.
+      * If all checks fail,
+      * then {@code null} is returned, otherwise URL representing path is returned.
+      * <p>
 -     * See {@link #getGridGainHome()} for information on how {@code GRIDGAIN_HOME} is retrieved.
++     * See {@link #getGridGainHome()} for information on how {@code IGNITE_HOME} is retrieved.
+      *
+      * @param path Path to resolve.
+      * @return Resolved path as URL, or {@code null} if path cannot be resolved.
+      * @see #getGridGainHome()
+      */
+     @Nullable public static URL resolveGridGainUrl(String path) {
+         return resolveGridGainUrl(path, true);
+     }
+ 
+     /**
+      * Gets URL representing the path passed in. First the check is made if path is absolute.
+      * If not, then the check is made if path is relative to {@code META-INF} folder in classpath.
 -     * If not, then the check is made if path is relative to ${GRIDGAIN_HOME}.
++     * If not, then the check is made if path is relative to ${IGNITE_HOME}.
+      * If all checks fail,
+      * then {@code null} is returned, otherwise URL representing path is returned.
+      * <p>
 -     * See {@link #getGridGainHome()} for information on how {@code GRIDGAIN_HOME} is retrieved.
++     * See {@link #getGridGainHome()} for information on how {@code IGNITE_HOME} is retrieved.
+      *
+      * @param path Path to resolve.
+      * @param metaInf Flag to indicate whether META-INF folder should be checked or class path root.
+      * @return Resolved path as URL, or {@code null} if path cannot be resolved.
+      * @see #getGridGainHome()
+      */
+     @SuppressWarnings({"UnusedCatchParameter"})
+     @Nullable public static URL resolveGridGainUrl(String path, boolean metaInf) {
+         File f = resolveGridGainPath(path);
+ 
+         if (f == null)
+             f = resolveGridGainPath("os/" + path);
+ 
+         if (f != null) {
+             try {
+                 // Note: we use that method's chain instead of File.getURL() with due
+                 // Sun bug http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6179468
+                 return f.toURI().toURL();
+             }
+             catch (MalformedURLException e) {
+                 // No-op.
+             }
+         }
+ 
+         String locPath = (metaInf ? "META-INF/" : "") + path.replaceAll("\\\\", "/");
+ 
+         return Thread.currentThread().getContextClassLoader().getResource(locPath);
+     }
+ 
+     /**
+      * Join byte arrays into single one.
+      *
+      * @param bufs list of byte arrays to concatenate.
+      * @return Concatenated byte's array.
+      */
+     public static byte[] join(byte[]... bufs) {
+         int size = 0;
+         for (byte[] buf : bufs) {
+             size += buf.length;
+         }
+ 
+         byte[] res = new byte[size];
+         int position = 0;
+         for (byte[] buf : bufs) {
+             arrayCopy(buf, 0, res, position, buf.length);
+             position += buf.length;
+         }
+ 
+         return res;
+     }
+ 
+     /**
+      * Converts byte array to formatted string. If calling:
+      * <pre name="code" class="java">
+      * ...
+      * byte[] data = {10, 20, 30, 40, 50, 60, 70, 80, 90};
+      *
+      * U.byteArray2String(data, "0x%02X", ",0x%02X")
+      * ...
+      * </pre>
+      * the result will be:
+      * <pre name="code" class="java">
+      * ...
+      * 0x0A, 0x14, 0x1E, 0x28, 0x32, 0x3C, 0x46, 0x50, 0x5A
+      * ...
+      * </pre>
+      *
+      * @param arr Array of byte.
+      * @param hdrFmt C-style string format for the first element.
+      * @param bodyFmt C-style string format for second and following elements, if any.
+      * @return String with converted bytes.
+      */
+     public static String byteArray2String(byte[] arr, String hdrFmt, String bodyFmt) {
+         assert arr != null;
+         assert hdrFmt != null;
+         assert bodyFmt != null;
+ 
+         SB sb = new SB();
+ 
+         sb.a('{');
+ 
+         boolean first = true;
+ 
+         for (byte b : arr)
+             if (first) {
+                 sb.a(String.format(hdrFmt, b));
+ 
+                 first = false;
+             }
+             else
+                 sb.a(String.format(bodyFmt, b));
+ 
+         sb.a('}');
+ 
+         return sb.toString();
+     }
+ 
+     /**
+      * Converts byte array to hex string.
+      *
+      * @param arr Array of bytes.
+      * @return Hex string

<TRUNCATED>

[15/50] [abbrv] incubator-ignite git commit: IGNITE-109 - Merge branch 'ignite-109' into sprint-1

Posted by se...@apache.org.
IGNITE-109 - Merge branch 'ignite-109' into sprint-1


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

Branch: refs/heads/ignite-sql
Commit: 61a9f986a918052aae159e21ca37693491d34382
Parents: 4fe57d4 e4cd632
Author: Alexey Goncharuk <ag...@gridgain.com>
Authored: Thu Jan 29 19:04:38 2015 -0800
Committer: Alexey Goncharuk <ag...@gridgain.com>
Committed: Thu Jan 29 19:04:38 2015 -0800

----------------------------------------------------------------------
 .../processors/cache/GridCacheStoreManager.java |  25 +-
 .../transactions/IgniteTxLocalAdapter.java      |  42 ++-
 .../IgniteCrossCacheTxStoreSelfTest.java        | 288 +++++++++++++++++++
 .../IgniteCacheTxStoreSessionTest.java          |  11 +-
 .../ignite/testsuites/IgniteCacheTestSuite.java |   1 +
 5 files changed, 357 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/61a9f986/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
----------------------------------------------------------------------


[37/50] [abbrv] incubator-ignite git commit: Merge remote-tracking branch 'remotes/origin/sprint-1' into ignite-72-1

Posted by se...@apache.org.
Merge remote-tracking branch 'remotes/origin/sprint-1' into ignite-72-1


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

Branch: refs/heads/ignite-sql
Commit: ae740876f39f7d937ffc7da07609d73ae5547730
Parents: e19655d ff01e66
Author: avinogradov <av...@gridgain.com>
Authored: Fri Jan 30 15:14:01 2015 +0300
Committer: avinogradov <av...@gridgain.com>
Committed: Fri Jan 30 15:14:01 2015 +0300

----------------------------------------------------------------------
 .../util/ipc/shmem/IpcSharedMemoryNativeLoaderSelfTest.java    | 2 +-
 .../org/apache/ignite/messaging/GridMessagingSelfTest.java     | 2 +-
 .../internal/processors/hadoop/GridHadoopClassLoader.java      | 4 ++--
 .../marshaller/optimized/OptimizedClassNamesGenerator.java     | 6 +++---
 .../src/main/scala/org/apache/ignite/visor/visor.scala         | 1 -
 5 files changed, 7 insertions(+), 8 deletions(-)
----------------------------------------------------------------------



[43/50] [abbrv] incubator-ignite git commit: gg*{sh, bat} renamed to ignite*{sh, bat}

Posted by se...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/core/src/test/config/benchmark/spring-cache-client-benchmark-1.xml
----------------------------------------------------------------------
diff --git a/modules/core/src/test/config/benchmark/spring-cache-client-benchmark-1.xml b/modules/core/src/test/config/benchmark/spring-cache-client-benchmark-1.xml
index 0103f7c..ba632f3 100644
--- a/modules/core/src/test/config/benchmark/spring-cache-client-benchmark-1.xml
+++ b/modules/core/src/test/config/benchmark/spring-cache-client-benchmark-1.xml
@@ -21,7 +21,7 @@
     GridGain Spring configuration file to startup grid cache.
 
     When starting a standalone GridGain node, you need to execute the following command:
-    {IGNITE_HOME}/bin/ggstart.{bat|sh} path-to-this-file/example-cache.xml
+    {IGNITE_HOME}/bin/ignite.{bat|sh} path-to-this-file/example-cache.xml
 
     When starting GridGain from Java IDE, pass path to this file into GridGain:
     GridGain.start("path-to-this-file/example-benchmark.xml");

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/core/src/test/config/benchmark/spring-cache-client-benchmark-2.xml
----------------------------------------------------------------------
diff --git a/modules/core/src/test/config/benchmark/spring-cache-client-benchmark-2.xml b/modules/core/src/test/config/benchmark/spring-cache-client-benchmark-2.xml
index 5a2aece..f22430e 100644
--- a/modules/core/src/test/config/benchmark/spring-cache-client-benchmark-2.xml
+++ b/modules/core/src/test/config/benchmark/spring-cache-client-benchmark-2.xml
@@ -21,7 +21,7 @@
     GridGain Spring configuration file to startup grid cache.
 
     When starting a standalone GridGain node, you need to execute the following command:
-    {IGNITE_HOME}/bin/ggstart.{bat|sh} path-to-this-file/example-cache.xml
+    {IGNITE_HOME}/bin/ignite.{bat|sh} path-to-this-file/example-cache.xml
 
     When starting GridGain from Java IDE, pass path to this file into GridGain:
     GridGain.start("path-to-this-file/example-benchmark.xml");

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/core/src/test/config/benchmark/spring-cache-client-benchmark-3.xml
----------------------------------------------------------------------
diff --git a/modules/core/src/test/config/benchmark/spring-cache-client-benchmark-3.xml b/modules/core/src/test/config/benchmark/spring-cache-client-benchmark-3.xml
index 041a003..25078bc 100644
--- a/modules/core/src/test/config/benchmark/spring-cache-client-benchmark-3.xml
+++ b/modules/core/src/test/config/benchmark/spring-cache-client-benchmark-3.xml
@@ -21,7 +21,7 @@
     GridGain Spring configuration file to startup grid cache.
 
     When starting a standalone GridGain node, you need to execute the following command:
-    {IGNITE_HOME}/bin/ggstart.{bat|sh} path-to-this-file/example-cache.xml
+    {IGNITE_HOME}/bin/ignite.{bat|sh} path-to-this-file/example-cache.xml
 
     When starting GridGain from Java IDE, pass path to this file into GridGain:
     GridGain.start("path-to-this-file/example-benchmark.xml");

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/core/src/test/config/example-cache.xml
----------------------------------------------------------------------
diff --git a/modules/core/src/test/config/example-cache.xml b/modules/core/src/test/config/example-cache.xml
index 0382d07..2217994 100644
--- a/modules/core/src/test/config/example-cache.xml
+++ b/modules/core/src/test/config/example-cache.xml
@@ -21,7 +21,7 @@
     GridGain Spring configuration file to startup grid cache.
 
     When starting a standalone GridGain node, you need to execute the following command:
-    {IGNITE_HOME}/bin/ggstart.{bat|sh} examples/config/example-cache.xml
+    {IGNITE_HOME}/bin/ignite.{bat|sh} examples/config/example-cache.xml
 
     When starting GridGain from Java IDE, pass path to this file to GridGain:
     GridGain.start("examples/config/example-cache.xml");

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/core/src/test/config/ggfs-loopback.xml
----------------------------------------------------------------------
diff --git a/modules/core/src/test/config/ggfs-loopback.xml b/modules/core/src/test/config/ggfs-loopback.xml
index d736e31..94cab9a 100644
--- a/modules/core/src/test/config/ggfs-loopback.xml
+++ b/modules/core/src/test/config/ggfs-loopback.xml
@@ -21,7 +21,7 @@
     GridGain Spring configuration file to startup grid cache.
 
     When starting a standalone GridGain node, you need to execute the following command:
-    {IGNITE_HOME}/bin/ggstart.{bat|sh} path-to-this-file/example-ggfs-loopback.xml
+    {IGNITE_HOME}/bin/ignite.{bat|sh} path-to-this-file/example-ggfs-loopback.xml
 
     When starting GridGain from Java IDE, pass path to this file into GridGain:
     GridGain.start("path-to-this-file/example-ggfs-loopback.xml");

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/core/src/test/config/ggfs-shmem.xml
----------------------------------------------------------------------
diff --git a/modules/core/src/test/config/ggfs-shmem.xml b/modules/core/src/test/config/ggfs-shmem.xml
index 535b363..48a1ca1 100644
--- a/modules/core/src/test/config/ggfs-shmem.xml
+++ b/modules/core/src/test/config/ggfs-shmem.xml
@@ -21,7 +21,7 @@
     GridGain Spring configuration file to startup grid cache.
 
     When starting a standalone GridGain node, you need to execute the following command:
-    {IGNITE_HOME}/bin/ggstart.{bat|sh} path-to-this-file/example-ggfs-shmem.xml
+    {IGNITE_HOME}/bin/ignite.{bat|sh} path-to-this-file/example-ggfs-shmem.xml
 
     When starting GridGain from Java IDE, pass path to this file into GridGain:
     GridGain.start("path-to-this-file/example-ggfs-shmem.xml");

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/core/src/test/config/spring-cache-load.xml
----------------------------------------------------------------------
diff --git a/modules/core/src/test/config/spring-cache-load.xml b/modules/core/src/test/config/spring-cache-load.xml
index 687a4c0..05f6c53 100644
--- a/modules/core/src/test/config/spring-cache-load.xml
+++ b/modules/core/src/test/config/spring-cache-load.xml
@@ -21,7 +21,7 @@
     GridGain Spring configuration file to startup grid cache.
 
     When starting a standalone GridGain node, you need to execute the following command:
-    {IGNITE_HOME}/bin/ggstart.{bat|sh} path-to-this-file/example-cache.xml
+    {IGNITE_HOME}/bin/ignite.{bat|sh} path-to-this-file/example-cache.xml
 
     When starting GridGain from Java IDE, pass path to this file into GridGain:
     GridGain.start("path-to-this-file/example-benchmark.xml");

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/core/src/test/config/spring-multicache.xml
----------------------------------------------------------------------
diff --git a/modules/core/src/test/config/spring-multicache.xml b/modules/core/src/test/config/spring-multicache.xml
index f11b24f..c5261ff 100644
--- a/modules/core/src/test/config/spring-multicache.xml
+++ b/modules/core/src/test/config/spring-multicache.xml
@@ -21,7 +21,7 @@
     GridGain Spring configuration file to startup grid cache.
 
     When starting a standalone GridGain node, you need to execute the following command:
-    {IGNITE_HOME}/bin/ggstart.{bat|sh} path-to-this-file/example-cache.xml
+    {IGNITE_HOME}/bin/ignite.{bat|sh} path-to-this-file/example-cache.xml
 
     When starting GridGain from Java IDE, pass path to this file into GridGain:
     GridGain.start("path-to-this-file/example-benchmark.xml");

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/core/src/test/config/streamer/average/spring-streamer-average-base.xml
----------------------------------------------------------------------
diff --git a/modules/core/src/test/config/streamer/average/spring-streamer-average-base.xml b/modules/core/src/test/config/streamer/average/spring-streamer-average-base.xml
index 6675989..5f90c9f 100644
--- a/modules/core/src/test/config/streamer/average/spring-streamer-average-base.xml
+++ b/modules/core/src/test/config/streamer/average/spring-streamer-average-base.xml
@@ -21,7 +21,7 @@
     GridGain Spring configuration file to startup grid cache.
 
     When starting a standalone GridGain node, you need to execute the following command:
-    {IGNITE_HOME}/bin/ggstart.{bat|sh} examples/config/example-cache.xml
+    {IGNITE_HOME}/bin/ignite.{bat|sh} examples/config/example-cache.xml
 
     When starting GridGain from Java IDE, pass path to this file into GridGain:
     GridGain.start("examples/config/example-cache.xml");

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/core/src/test/config/streamer/average/spring-streamer-average-local.xml
----------------------------------------------------------------------
diff --git a/modules/core/src/test/config/streamer/average/spring-streamer-average-local.xml b/modules/core/src/test/config/streamer/average/spring-streamer-average-local.xml
index aa9facd..8db31aa 100644
--- a/modules/core/src/test/config/streamer/average/spring-streamer-average-local.xml
+++ b/modules/core/src/test/config/streamer/average/spring-streamer-average-local.xml
@@ -21,7 +21,7 @@
     GridGain Spring configuration file to startup grid cache.
 
     When starting a standalone GridGain node, you need to execute the following command:
-    {IGNITE_HOME}/bin/ggstart.{bat|sh} examples/config/example-cache.xml
+    {IGNITE_HOME}/bin/ignite.{bat|sh} examples/config/example-cache.xml
 
     When starting GridGain from Java IDE, pass path to this file into GridGain:
     GridGain.start("examples/config/example-cache.xml");

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/core/src/test/config/streamer/average/spring-streamer-average-random.xml
----------------------------------------------------------------------
diff --git a/modules/core/src/test/config/streamer/average/spring-streamer-average-random.xml b/modules/core/src/test/config/streamer/average/spring-streamer-average-random.xml
index 53925db..463820a 100644
--- a/modules/core/src/test/config/streamer/average/spring-streamer-average-random.xml
+++ b/modules/core/src/test/config/streamer/average/spring-streamer-average-random.xml
@@ -21,7 +21,7 @@
     GridGain Spring configuration file to startup grid cache.
 
     When starting a standalone GridGain node, you need to execute the following command:
-    {IGNITE_HOME}/bin/ggstart.{bat|sh} examples/config/example-cache.xml
+    {IGNITE_HOME}/bin/ignite.{bat|sh} examples/config/example-cache.xml
 
     When starting GridGain from Java IDE, pass path to this file into GridGain:
     GridGain.start("examples/config/example-cache.xml");

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/core/src/test/config/streamer/spring-streamer-base.xml
----------------------------------------------------------------------
diff --git a/modules/core/src/test/config/streamer/spring-streamer-base.xml b/modules/core/src/test/config/streamer/spring-streamer-base.xml
index 326124f..3cfe8cb 100644
--- a/modules/core/src/test/config/streamer/spring-streamer-base.xml
+++ b/modules/core/src/test/config/streamer/spring-streamer-base.xml
@@ -21,7 +21,7 @@
     GridGain Spring configuration file to startup grid cache.
 
     When starting a standalone GridGain node, you need to execute the following command:
-    {IGNITE_HOME}/bin/ggstart.{bat|sh} examples/config/example-cache.xml
+    {IGNITE_HOME}/bin/ignite.{bat|sh} examples/config/example-cache.xml
 
     When starting GridGain from Java IDE, pass path to this file into GridGain:
     GridGain.start("examples/config/example-cache.xml");

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheMultiNodeDataStructureTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheMultiNodeDataStructureTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheMultiNodeDataStructureTest.java
index b739318..a265a51 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheMultiNodeDataStructureTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheMultiNodeDataStructureTest.java
@@ -25,8 +25,8 @@ import org.apache.ignite.internal.util.typedef.*;
 /**
  * Starts up an node with cache configuration.
  * You can also must start a stand-alone GridGain instance by passing the path
- * to configuration file to {@code 'ggstart.{sh|bat}'} script, like so:
- * {@code 'ggstart.sh examples/config/example-cache.xml'}.
+ * to configuration file to {@code 'ignite.{sh|bat}'} script, like so:
+ * {@code 'ignite.sh examples/config/example-cache.xml'}.
  */
 public class GridCacheMultiNodeDataStructureTest {
     /** Ensure singleton. */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/core/src/test/java/org/apache/ignite/loadtests/capacity/spring-capacity-cache.xml
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/capacity/spring-capacity-cache.xml b/modules/core/src/test/java/org/apache/ignite/loadtests/capacity/spring-capacity-cache.xml
index 00b787c..6374e35 100644
--- a/modules/core/src/test/java/org/apache/ignite/loadtests/capacity/spring-capacity-cache.xml
+++ b/modules/core/src/test/java/org/apache/ignite/loadtests/capacity/spring-capacity-cache.xml
@@ -21,7 +21,7 @@
     GridGain Spring configuration file to startup grid cache.
 
     When starting a standalone GridGain node, you need to execute the following command:
-    {IGNITE_HOME}/bin/ggstart.{bat|sh} path-to-this-file/example-cache.xml
+    {IGNITE_HOME}/bin/ignite.{bat|sh} path-to-this-file/example-cache.xml
 
     When starting GridGain from Java IDE, pass path to this file into GridGain:
     GridGain.start("path-to-this-file/example-benchmark.xml");

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/core/src/test/java/org/apache/ignite/loadtests/colocation/spring-colocation.xml
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/colocation/spring-colocation.xml b/modules/core/src/test/java/org/apache/ignite/loadtests/colocation/spring-colocation.xml
index 2d8a89d..7592340 100644
--- a/modules/core/src/test/java/org/apache/ignite/loadtests/colocation/spring-colocation.xml
+++ b/modules/core/src/test/java/org/apache/ignite/loadtests/colocation/spring-colocation.xml
@@ -21,7 +21,7 @@
     GridGain Spring configuration file to startup grid cache.
 
     When starting a standalone GridGain node, you need to execute the following command:
-    {IGNITE_HOME}/bin/ggstart.{bat|sh} path-to-this-file/example-cache.xml
+    {IGNITE_HOME}/bin/ignite.{bat|sh} path-to-this-file/example-cache.xml
 
     When starting GridGain from Java IDE, pass path to this file into GridGain:
     GridGain.start("path-to-this-file/example-benchmark.xml");

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/core/src/test/java/org/apache/ignite/loadtests/mapper/GridNodeStartup.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/mapper/GridNodeStartup.java b/modules/core/src/test/java/org/apache/ignite/loadtests/mapper/GridNodeStartup.java
index 22f906f..1fb7d71 100644
--- a/modules/core/src/test/java/org/apache/ignite/loadtests/mapper/GridNodeStartup.java
+++ b/modules/core/src/test/java/org/apache/ignite/loadtests/mapper/GridNodeStartup.java
@@ -25,8 +25,8 @@ import javax.swing.*;
 /**
  * Starts up an empty node with cache configuration.
  * You can also start a stand-alone GridGain instance by passing the path
- * to configuration file to {@code 'ggstart.{sh|bat}'} script, like so:
- * {@code 'ggstart.sh examples/config/example-cache.xml'}.
+ * to configuration file to {@code 'ignite.{sh|bat}'} script, like so:
+ * {@code 'ignite.sh examples/config/example-cache.xml'}.
  * <p>
  * The difference is that running this class from IDE adds all example classes to classpath
  * but running from command line doesn't.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/core/src/test/java/org/apache/ignite/startup/GridRandomCommandLineLoader.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/startup/GridRandomCommandLineLoader.java b/modules/core/src/test/java/org/apache/ignite/startup/GridRandomCommandLineLoader.java
index f8629d6..b8c24f8 100644
--- a/modules/core/src/test/java/org/apache/ignite/startup/GridRandomCommandLineLoader.java
+++ b/modules/core/src/test/java/org/apache/ignite/startup/GridRandomCommandLineLoader.java
@@ -125,7 +125,7 @@ public final class GridRandomCommandLineLoader {
         if (errMsg != null)
             echo("ERROR: " + errMsg);
 
-        String runner = System.getProperty(IGNITE_PROG_NAME, "randggstart.{sh|bat}");
+        String runner = System.getProperty(IGNITE_PROG_NAME, "randignite.{sh|bat}");
 
         int space = runner.indexOf(' ');
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/core/src/test/java/org/apache/ignite/startup/GridVmNodesStarter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/startup/GridVmNodesStarter.java b/modules/core/src/test/java/org/apache/ignite/startup/GridVmNodesStarter.java
index 16c8f80..e02ae4a 100644
--- a/modules/core/src/test/java/org/apache/ignite/startup/GridVmNodesStarter.java
+++ b/modules/core/src/test/java/org/apache/ignite/startup/GridVmNodesStarter.java
@@ -99,7 +99,7 @@ public final class GridVmNodesStarter {
         if (errMsg != null)
             echo("ERROR: " + errMsg);
 
-        String runner = System.getProperty(IGNITE_PROG_NAME, "randggstart.{sh|bat}");
+        String runner = System.getProperty(IGNITE_PROG_NAME, "randignite.{sh|bat}");
 
         int space = runner.indexOf(' ');
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/core/src/test/webapp/META-INF/gg-config.xml
----------------------------------------------------------------------
diff --git a/modules/core/src/test/webapp/META-INF/gg-config.xml b/modules/core/src/test/webapp/META-INF/gg-config.xml
index aa6bb69..0b8d1fa 100644
--- a/modules/core/src/test/webapp/META-INF/gg-config.xml
+++ b/modules/core/src/test/webapp/META-INF/gg-config.xml
@@ -21,7 +21,7 @@
     GridGain Spring configuration file to startup grid cache.
 
     When starting a standalone GridGain node, you need to execute the following command:
-    {IGNITE_HOME}/bin/ggstart.{bat|sh} examples/config/spring-cache.xml
+    {IGNITE_HOME}/bin/ignite.{bat|sh} examples/config/spring-cache.xml
 
     When starting GridGain from Java IDE, pass path to this file into GridGain:
     GridGain.start("examples/config/spring-cache.xml");

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/email/readme.txt
----------------------------------------------------------------------
diff --git a/modules/email/readme.txt b/modules/email/readme.txt
index 9fd9108..2e434de 100644
--- a/modules/email/readme.txt
+++ b/modules/email/readme.txt
@@ -6,7 +6,7 @@ expiration or fatal system errors (this should be also configured via 'GridConfi
 configuration properties).
 
 To enable email module when starting a standalone node, move 'optional/ignite-email' folder to
-'libs' folder before running 'ggstart.{sh|bat}' script. The content of the module folder will
+'libs' folder before running 'ignite.{sh|bat}' script. The content of the module folder will
 be added to classpath in this case.
 
 Importing email Module In Maven Project

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/hadoop/readme.txt
----------------------------------------------------------------------
diff --git a/modules/hadoop/readme.txt b/modules/hadoop/readme.txt
index 0212371..37b7a65 100644
--- a/modules/hadoop/readme.txt
+++ b/modules/hadoop/readme.txt
@@ -5,7 +5,7 @@ Apache Ignite Hadoop module provides In-Memory MapReduce engine and driver to us
 which are 100% compatible with HDFS and YARN.
 
 To enable Hadoop module when starting a standalone node, move 'optional/ignite-hadoop' folder to
-'libs' folder before running 'ggstart.{sh|bat}' script. The content of the module folder will
+'libs' folder before running 'ignite.{sh|bat}' script. The content of the module folder will
 be added to classpath in this case.
 
 Importing Hadoop Module In Maven Project

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/hibernate/readme.txt
----------------------------------------------------------------------
diff --git a/modules/hibernate/readme.txt b/modules/hibernate/readme.txt
index 7b4b70a..5a33622 100644
--- a/modules/hibernate/readme.txt
+++ b/modules/hibernate/readme.txt
@@ -5,7 +5,7 @@ Apache Ignite Hibernate module provides Hibernate second-level cache (L2 cache)
 on Apache Ignite In-Memory Data Grid.
 
 To enable Hibernate module when starting a standalone node, move 'optional/ignite-hibernate' folder to
-'libs' folder before running 'ggstart.{sh|bat}' script. The content of the module folder will
+'libs' folder before running 'ignite.{sh|bat}' script. The content of the module folder will
 be added to classpath in this case.
 
 Importing Hibernate Module In Maven Project

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/indexing/readme.txt
----------------------------------------------------------------------
diff --git a/modules/indexing/readme.txt b/modules/indexing/readme.txt
index 699b2ee..f0ea6ba 100644
--- a/modules/indexing/readme.txt
+++ b/modules/indexing/readme.txt
@@ -5,7 +5,7 @@ Apache Ignite indexing module provides capabilities to index cache context and r
 individual field queries against these indexes.
 
 To enable indexing module when starting a standalone node, move 'optional/ignite-indexing' folder to
-'libs' folder before running 'ggstart.{sh|bat}' script. The content of the module folder will
+'libs' folder before running 'ignite.{sh|bat}' script. The content of the module folder will
 be added to classpath in this case.
 
 Importing indexing Module In Maven Project

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/jcl/readme.txt
----------------------------------------------------------------------
diff --git a/modules/jcl/readme.txt b/modules/jcl/readme.txt
index 0f713dc..ac37421 100644
--- a/modules/jcl/readme.txt
+++ b/modules/jcl/readme.txt
@@ -5,7 +5,7 @@ Apache Ignite JCL module provides GridLogger implementation that can delegate to
 on Jakarta Commons Logging (JCL).
 
 To enable JCL module when starting a standalone node, move 'optional/ignite-jcl' folder to
-'libs' folder before running 'ggstart.{sh|bat}' script. The content of the module folder will
+'libs' folder before running 'ignite.{sh|bat}' script. The content of the module folder will
 be added to classpath in this case.
 
 Importing JCL Module In Maven Project

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/jta/readme.txt
----------------------------------------------------------------------
diff --git a/modules/jta/readme.txt b/modules/jta/readme.txt
index 5893824..c6c08b2 100644
--- a/modules/jta/readme.txt
+++ b/modules/jta/readme.txt
@@ -4,7 +4,7 @@ Apache Ignite JTA Module
 Apache Ignite JTA module provides capabilities to integrate Apache Ignite cache transactions with JTA.
 
 To enable JTA module when starting a standalone node, move 'optional/ignite-jta' folder to
-'libs' folder before running 'ggstart.{sh|bat}' script. The content of the module folder will
+'libs' folder before running 'ignite.{sh|bat}' script. The content of the module folder will
 be added to classpath in this case.
 
 Importing JTA Module In Maven Project

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/log4j/readme.txt
----------------------------------------------------------------------
diff --git a/modules/log4j/readme.txt b/modules/log4j/readme.txt
index 8d8ff4f..9ca3c55 100644
--- a/modules/log4j/readme.txt
+++ b/modules/log4j/readme.txt
@@ -4,7 +4,7 @@ Apache Ignite Log4J Module
 Apache Ignite Log4J module provides GridLogger implementation based on Apache Log4J.
 
 To enable Log4J module when starting a standalone node, move 'optional/ignite-log4j' folder to
-'libs' folder before running 'ggstart.{sh|bat}' script. The content of the module folder will
+'libs' folder before running 'ignite.{sh|bat}' script. The content of the module folder will
 be added to classpath in this case.
 
 Importing Log4J Module In Maven Project

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/rest-http/readme.txt
----------------------------------------------------------------------
diff --git a/modules/rest-http/readme.txt b/modules/rest-http/readme.txt
index 139f287..0df2cf5 100644
--- a/modules/rest-http/readme.txt
+++ b/modules/rest-http/readme.txt
@@ -5,7 +5,7 @@ Apache Ignite REST-HTTP module provides Jetty-based server which can be used to
 in grid using REST approach via HTTP protocol.
 
 To enable REST-HTTP module when starting a standalone node, move 'optional/ignite-rest-http' folder to
-'libs' folder before running 'ggstart.{sh|bat}' script. The content of the module folder will
+'libs' folder before running 'ignite.{sh|bat}' script. The content of the module folder will
 be added to classpath in this case.
 
 Importing REST-HTTP Module In Maven Project

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/scalar/readme.txt
----------------------------------------------------------------------
diff --git a/modules/scalar/readme.txt b/modules/scalar/readme.txt
index 88bb921..38c5879 100644
--- a/modules/scalar/readme.txt
+++ b/modules/scalar/readme.txt
@@ -4,7 +4,7 @@ Apache Ignite Scalar Module
 Apache Ignite Scalar module provides Scala-based DSL with extensions and shortcuts for Apache Ignite API.
 
 To enable Scalar module when starting a standalone node, move 'optional/ignite-scalar' folder to
-'libs' folder before running 'ggstart.{sh|bat}' script. The content of the module folder will
+'libs' folder before running 'ignite.{sh|bat}' script. The content of the module folder will
 be added to classpath in this case.
 
 Importing Scalar Module In Maven Project

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/schedule/readme.txt
----------------------------------------------------------------------
diff --git a/modules/schedule/readme.txt b/modules/schedule/readme.txt
index ba51203..4ca7ac8 100644
--- a/modules/schedule/readme.txt
+++ b/modules/schedule/readme.txt
@@ -4,7 +4,7 @@ Apache Ignite Schedule Module
 Apache Ignite Schedule module provides functionality for scheduling jobs locally using UNIX cron-based syntax.
 
 To enable Schedule module when starting a standalone node, move 'optional/ignite-schedule' folder to
-'libs' folder before running 'ggstart.{sh|bat}' script. The content of the module folder will
+'libs' folder before running 'ignite.{sh|bat}' script. The content of the module folder will
 be added to classpath in this case.
 
 Importing Schedule Module In Maven Project

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/slf4j/readme.txt
----------------------------------------------------------------------
diff --git a/modules/slf4j/readme.txt b/modules/slf4j/readme.txt
index c6fadc3..2583ce3 100644
--- a/modules/slf4j/readme.txt
+++ b/modules/slf4j/readme.txt
@@ -4,7 +4,7 @@ Apache Ignite SLF4J Module
 Apache Ignite SLF4J module provides GridLogger implementation based on SLF4J.
 
 To enable SLF4J module when starting a standalone node, move 'optional/ignite-slf4j' folder to
-'libs' folder before running 'ggstart.{sh|bat}' script. The content of the module folder will
+'libs' folder before running 'ignite.{sh|bat}' script. The content of the module folder will
 be added to classpath in this case.
 
 Importing SLF4J Module In Maven Project

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/spring/readme.txt
----------------------------------------------------------------------
diff --git a/modules/spring/readme.txt b/modules/spring/readme.txt
index 93eade9..24718b7 100644
--- a/modules/spring/readme.txt
+++ b/modules/spring/readme.txt
@@ -5,7 +5,7 @@ Apache Ignite Spring module provides resources injection capabilities and parser
 configuration XML files.
 
 To enable Spring module when starting a standalone node, move 'optional/ignite-spring' folder to
-'libs' folder before running 'ggstart.{sh|bat}' script. The content of the module folder will
+'libs' folder before running 'ignite.{sh|bat}' script. The content of the module folder will
 be added to classpath in this case.
 
 Importing Spring Module In Maven Project

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/spring/src/main/java/org/apache/ignite/cache/spring/SpringCacheManager.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/main/java/org/apache/ignite/cache/spring/SpringCacheManager.java b/modules/spring/src/main/java/org/apache/ignite/cache/spring/SpringCacheManager.java
index e7f2a46..bd13e60 100644
--- a/modules/spring/src/main/java/org/apache/ignite/cache/spring/SpringCacheManager.java
+++ b/modules/spring/src/main/java/org/apache/ignite/cache/spring/SpringCacheManager.java
@@ -125,7 +125,7 @@ import java.util.*;
  * <h1>Starting Remote Nodes</h1>
  * Remember that the node started inside your application is an entry point
  * to the whole topology it connects to. You can start as many remote standalone
- * nodes as you need using {@code bin/ggstart.{sh|bat}} scripts provided in
+ * nodes as you need using {@code bin/ignite.{sh|bat}} scripts provided in
  * GridGain distribution, and all these nodes will participate
  * in caching data.
  */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/ssh/readme.txt
----------------------------------------------------------------------
diff --git a/modules/ssh/readme.txt b/modules/ssh/readme.txt
index e69c896..a0876e7 100644
--- a/modules/ssh/readme.txt
+++ b/modules/ssh/readme.txt
@@ -4,7 +4,7 @@ Apache Ignite SSH Module
 Apache Ignite SSH module provides capabilities to start Apache Ignite nodes on remote machines via SSH.
 
 To enable SSH module when starting a standalone node, move 'optional/ignite-ssh' folder to
-'libs' folder before running 'ggstart.{sh|bat}' script. The content of the module folder will
+'libs' folder before running 'ignite.{sh|bat}' script. The content of the module folder will
 be added to classpath in this case.
 
 Importing SSH Module In Maven Project

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/ssh/src/main/java/org/apache/ignite/internal/util/nodestart/GridNodeCallableImpl.java
----------------------------------------------------------------------
diff --git a/modules/ssh/src/main/java/org/apache/ignite/internal/util/nodestart/GridNodeCallableImpl.java b/modules/ssh/src/main/java/org/apache/ignite/internal/util/nodestart/GridNodeCallableImpl.java
index 77f3f96..0d80430 100644
--- a/modules/ssh/src/main/java/org/apache/ignite/internal/util/nodestart/GridNodeCallableImpl.java
+++ b/modules/ssh/src/main/java/org/apache/ignite/internal/util/nodestart/GridNodeCallableImpl.java
@@ -41,10 +41,10 @@ public class GridNodeCallableImpl implements GridNodeCallable {
     private static final String DFLT_IGNITE_HOME_LINUX = "$IGNITE_HOME";
 
     /** Default start script path for Windows. */
-    private static final String DFLT_SCRIPT_WIN = "bin\\ggstart.bat -v -np";
+    private static final String DFLT_SCRIPT_WIN = "bin\\ignite.bat -v -np";
 
     /** Default start script path for Linux. */
-    private static final String DFLT_SCRIPT_LINUX = "bin/ggstart.sh -v";
+    private static final String DFLT_SCRIPT_LINUX = "bin/ignite.sh -v";
 
     /**
      * Logs folder for Windows.
@@ -301,11 +301,11 @@ public class GridNodeCallableImpl implements GridNodeCallable {
     }
 
     /**
-     * Builds ggstart.sh attributes to set up SSH username and password and log directory for started node.
+     * Builds ignite.sh attributes to set up SSH username and password and log directory for started node.
      *
      * @param username SSH user name.
      * @param host Host.
-     * @return {@code ggstart.sh} script arguments.
+     * @return {@code ignite.sh} script arguments.
      */
     private String buildRemoteLogArguments(String username, String host) {
         assert username != null;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/urideploy/readme.txt
----------------------------------------------------------------------
diff --git a/modules/urideploy/readme.txt b/modules/urideploy/readme.txt
index a641ddf..a2cdb62 100644
--- a/modules/urideploy/readme.txt
+++ b/modules/urideploy/readme.txt
@@ -5,7 +5,7 @@ Apache Ignite URI Deploy module provides capabilities to deploy tasks from diffe
 File System, HTTP, FTP, or even Email.
 
 To enable URI Deploy module when starting a standalone node, move 'optional/ignite-urideploy' folder to
-'libs' folder before running 'ggstart.{sh|bat}' script. The content of the module folder will
+'libs' folder before running 'ignite.{sh|bat}' script. The content of the module folder will
 be added to classpath in this case.
 
 Importing URI Deploy Module In Maven Project

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/visor-console/src/main/scala/org/apache/ignite/visor/Packet.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/Packet.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/Packet.scala
index b389df5..3aefa2a 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/Packet.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/Packet.scala
@@ -31,7 +31,7 @@ package org.apache.ignite
  * Visor console provides monitoring capabilities for GridGain.
  *
  * ==Usage==
- * GridGain ships with `IGNITE_HOME/bin/ggvisorcmd.{sh|bat}` script that starts Visor console.
+ * GridGain ships with `IGNITE_HOME/bin/ignitevisorcmd.{sh|bat}` script that starts Visor console.
  *
  * Just type:<ex>help</ex> in Visor console to get help and get started.
  */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/start/Packet.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/start/Packet.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/start/Packet.scala
index 8d3edf7..457f201 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/start/Packet.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/start/Packet.scala
@@ -66,8 +66,8 @@ package org.apache.ignite.visor.commands
  *         If not provided, default GridGain configuration is used.
  *     -s=<path>
  *         Path to start script (relative to GridGain home).
- *         Default is "bin/ggstart.sh" for Unix or
- *         "bin\ggstart.bat" for Windows.
+ *         Default is "bin/ignite.sh" for Unix or
+ *         "bin\ignite.bat" for Windows.
  *     -m=<num>
  *         Defines maximum number of nodes that can be started in parallel on one host.
  *         This actually means number of parallel SSH connections to each SSH server.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/start/VisorStartCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/start/VisorStartCommand.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/start/VisorStartCommand.scala
index b6592c3..d4affc1 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/start/VisorStartCommand.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/start/VisorStartCommand.scala
@@ -92,8 +92,8 @@ private case class Result(
  *         If not provided, default GridGain configuration is used.
  *     -s=<path>
  *         Path to start script (relative to GridGain home).
- *         Default is "bin/ggstart.sh" for Unix or
- *         "bin\ggstart.bat" for Windows.
+ *         Default is "bin/ignite.sh" for Unix or
+ *         "bin\ignite.bat" for Windows.
  *     -m=<num>
  *         Defines maximum number of nodes that can be started in parallel on one host.
  *         This actually means number of parallel SSH connections to each SSH server.
@@ -384,8 +384,8 @@ object VisorStartCommand {
             ),
             "-s=<path>" -> List(
                 "Path to start script (relative to GridGain home).",
-                "Default is \"bin/ggstart.sh\" for Unix or",
-                "\"bin\\ggstart.bat\" for Windows."
+                "Default is \"bin/ignite.sh\" for Unix or",
+                "\"bin\\ignite.bat\" for Windows."
             ),
             "-m=<num>" -> List(
                 "Defines maximum number of nodes that can be started in parallel on one host.",

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala
index e69d7ee..476714e 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala
@@ -115,7 +115,7 @@ trait VisorTag
  * Visor console provides monitoring capabilities for GridGain.
  *
  * ==Usage==
- * GridGain ships with `IGNITE_HOME/bin/ggvisorcmd.{sh|bat}` script that starts Visor console.
+ * GridGain ships with `IGNITE_HOME/bin/ignitevisorcmd.{sh|bat}` script that starts Visor console.
  *
  * Just type:<ex>help</ex> in Visor console to get help and get started.
  */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e8ea4f1/modules/web/readme.txt
----------------------------------------------------------------------
diff --git a/modules/web/readme.txt b/modules/web/readme.txt
index 5acdf40..68f62b3 100644
--- a/modules/web/readme.txt
+++ b/modules/web/readme.txt
@@ -6,7 +6,7 @@ which allow to start Apache Ignite inside any web container. Additionally this m
 capabilities to cache web sessions in Apache Ignite cache.
 
 To enable Web module when starting a standalone node, move 'optional/ignite-web' folder to
-'libs' folder before running 'ggstart.{sh|bat}' script. The content of the module folder will
+'libs' folder before running 'ignite.{sh|bat}' script. The content of the module folder will
 be added to classpath in this case.
 
 Importing Web Module In Maven Project


[06/50] [abbrv] incubator-ignite git commit: IGNITE-146 (remove async instance caching inside Async support adapter and always create new instance)

Posted by se...@apache.org.
IGNITE-146 (remove async instance caching inside Async support adapter and always create new instance)


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

Branch: refs/heads/ignite-sql
Commit: 25fb8e5ca42d8137c37ce513868bd246a5cc146a
Parents: fc768b8
Author: sevdokimov <se...@gridgain.com>
Authored: Thu Jan 29 13:05:20 2015 +0300
Committer: sevdokimov <se...@gridgain.com>
Committed: Thu Jan 29 17:22:35 2015 +0300

----------------------------------------------------------------------
 .../ignite/lang/IgniteAsyncSupportAdapter.java  | 27 +++-----------------
 1 file changed, 4 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/25fb8e5c/modules/core/src/main/java/org/apache/ignite/lang/IgniteAsyncSupportAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/lang/IgniteAsyncSupportAdapter.java b/modules/core/src/main/java/org/apache/ignite/lang/IgniteAsyncSupportAdapter.java
index e9ab2a1..3d8e14c 100644
--- a/modules/core/src/main/java/org/apache/ignite/lang/IgniteAsyncSupportAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/lang/IgniteAsyncSupportAdapter.java
@@ -24,15 +24,9 @@ import org.apache.ignite.internal.*;
  * Adapter for {@link IgniteAsyncSupport}.
  */
 public class IgniteAsyncSupportAdapter<T extends IgniteAsyncSupport> implements IgniteAsyncSupport {
-    /** */
-    private static final Object mux = new Object();
-
     /** Future for previous asynchronous operation. */
     protected ThreadLocal<IgniteInternalFuture<?>> curFut;
 
-    /** */
-    private volatile T asyncInstance;
-
     /**
      * Default constructor.
      */
@@ -44,29 +38,16 @@ public class IgniteAsyncSupportAdapter<T extends IgniteAsyncSupport> implements
      * @param async Async enabled flag.
      */
     public IgniteAsyncSupportAdapter(boolean async) {
-        if (async) {
+        if (async)
             curFut = new ThreadLocal<>();
-
-            asyncInstance = (T)this;
-        }
     }
 
     /** {@inheritDoc} */
     @Override public T withAsync() {
-        T res = asyncInstance;
-
-        if (res == null) {
-            res = createAsyncInstance();
-
-            synchronized (mux) {
-                if (asyncInstance != null)
-                    return asyncInstance;
-
-                asyncInstance = res;
-            }
-        }
+        if (isAsync())
+            return (T)this;
 
-        return res;
+        return createAsyncInstance();
     }
 
     /**


[05/50] [abbrv] incubator-ignite git commit: ignite-146 changes to flags

Posted by se...@apache.org.
ignite-146 changes to flags


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

Branch: refs/heads/ignite-sql
Commit: 7eebc7e0878e7cb7687315e0bdc4467ec1bdc26d
Parents: 25fb8e5
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Thu Jan 29 15:56:51 2015 +0300
Committer: sevdokimov <se...@gridgain.com>
Committed: Thu Jan 29 17:22:35 2015 +0300

----------------------------------------------------------------------
 .../processors/cache/IgniteCacheProxy.java      | 22 +++++++++++++-------
 .../service/GridServiceProcessor.java           |  2 +-
 .../GridCacheReturnValueTransferSelfTest.java   |  2 +-
 .../cache/IgniteCacheInvokeAbstractTest.java    |  4 ++--
 ...GridCacheValueConsistencyAtomicSelfTest.java |  2 +-
 .../cache/GridCacheCommandHandlerSelfTest.java  |  4 ++--
 6 files changed, 21 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7eebc7e0/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
index 743e5b9..dd7b781 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
@@ -143,7 +143,7 @@ public class IgniteCacheProxy<K, V> extends IgniteAsyncSupportAdapter<IgniteCach
 
     /** {@inheritDoc} */
     @Override public IgniteCache<K, V> withSkipStore() {
-        return flagsOn(CacheFlag.SKIP_STORE);
+        return flagOn(CacheFlag.SKIP_STORE);
     }
 
     /** {@inheritDoc} */
@@ -1018,21 +1018,27 @@ public class IgniteCacheProxy<K, V> extends IgniteAsyncSupportAdapter<IgniteCach
     }
 
     /**
-     * @param flags Flags to turn on (if empty, then no-op).
+     * @param flag Flag to turn on.
      * @return Cache with given flags enabled.
      */
-    public IgniteCache<K, V> flagsOn(@Nullable CacheFlag... flags) {
+    public IgniteCache<K, V> flagOn(CacheFlag flag) {
         GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
 
         try {
-            Set<CacheFlag> res = EnumSet.noneOf(CacheFlag.class);
+            Set<CacheFlag> res;
 
-            Set<CacheFlag> flags0 = prj !=null ? prj.flags() : null;
+            Set<CacheFlag> flags0 = prj != null ? prj.flags() : null;
 
-            if (flags0 != null && !flags0.isEmpty())
-                res.addAll(flags0);
+            if (flags0 != null) {
+                if (flags0.contains(flag))
+                    return this;
 
-            res.addAll(EnumSet.copyOf(F.asList(flags)));
+                res = EnumSet.copyOf(flags0);
+            }
+            else
+                res = EnumSet.noneOf(CacheFlag.class);
+
+            res.add(flag);
 
             GridCacheProjectionImpl<K, V> prj0 = new GridCacheProjectionImpl<>(
                 (prj != null ? prj : delegate),

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7eebc7e0/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
index 8db40b9..4bcad37 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
@@ -481,7 +481,7 @@ public class GridServiceProcessor extends GridProcessorAdapter {
             ManagedServiceDescriptorImpl desc = new ManagedServiceDescriptorImpl(dep);
 
             try {
-                GridServiceAssignments assigns = (GridServiceAssignments)cache.//flagsOn(CacheFlag.GET_PRIMARY).
+                GridServiceAssignments assigns = (GridServiceAssignments)cache.//flagOn(CacheFlag.GET_PRIMARY).
                     get(new GridServiceAssignmentsKey(dep.configuration().getName()));
 
                 if (assigns != null) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7eebc7e0/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReturnValueTransferSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReturnValueTransferSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReturnValueTransferSelfTest.java
index 7657842..d70bc82 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReturnValueTransferSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReturnValueTransferSelfTest.java
@@ -141,7 +141,7 @@ public class GridCacheReturnValueTransferSelfTest extends GridCommonAbstractTest
             IgniteCache<Integer, TestObject> cache = grid(2).jcache(null);
 
             if (backups > 0 && atomicityMode == ATOMIC)
-                cache = ((IgniteCacheProxy<Integer, TestObject>)cache).flagsOn(FORCE_TRANSFORM_BACKUP);
+                cache = ((IgniteCacheProxy<Integer, TestObject>)cache).flagOn(FORCE_TRANSFORM_BACKUP);
 
             for (int i = 0; i < 100; i++)
                 cache.put(i, new TestObject());

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7eebc7e0/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeAbstractTest.java
index 784bd38..ca760e9 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeAbstractTest.java
@@ -57,7 +57,7 @@ public abstract class IgniteCacheInvokeAbstractTest extends IgniteCacheAbstractT
             invoke(cache, OPTIMISTIC);
         }
         else if (gridCount() > 1) {
-            cache = ((IgniteCacheProxy<Integer, Integer>)cache).flagsOn(FORCE_TRANSFORM_BACKUP);
+            cache = ((IgniteCacheProxy<Integer, Integer>)cache).flagOn(FORCE_TRANSFORM_BACKUP);
 
             invoke(cache, null);
         }
@@ -186,7 +186,7 @@ public abstract class IgniteCacheInvokeAbstractTest extends IgniteCacheAbstractT
             invokeAll(cache, OPTIMISTIC);
         }
         else if (gridCount() > 1) {
-            cache = ((IgniteCacheProxy<Integer, Integer>)cache).flagsOn(FORCE_TRANSFORM_BACKUP);
+            cache = ((IgniteCacheProxy<Integer, Integer>)cache).flagOn(FORCE_TRANSFORM_BACKUP);
 
             invokeAll(cache, null);
         }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7eebc7e0/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheValueConsistencyAtomicSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheValueConsistencyAtomicSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheValueConsistencyAtomicSelfTest.java
index 41fb81d..0ea0852 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheValueConsistencyAtomicSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheValueConsistencyAtomicSelfTest.java
@@ -74,7 +74,7 @@ public class GridCacheValueConsistencyAtomicSelfTest extends GridCacheValueConsi
 
                             IgniteCache<Integer, Integer> cache = grid(idx).jcache(null);
 
-                            cache = ((IgniteCacheProxy<Integer, Integer>)cache).flagsOn(FORCE_TRANSFORM_BACKUP);
+                            cache = ((IgniteCacheProxy<Integer, Integer>)cache).flagOn(FORCE_TRANSFORM_BACKUP);
 
                             cache.invoke(i, new Transformer(i));
                         }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7eebc7e0/modules/core/src/test/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandlerSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandlerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandlerSelfTest.java
index d36726c..7a1765b 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandlerSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandlerSelfTest.java
@@ -248,8 +248,8 @@ public class GridCacheCommandHandlerSelfTest extends GridCommonAbstractTest {
 
                             return fut;
                         }
-                        // Rewriting flagsOn result to keep intercepting invocations after it.
-                        else if ("flagsOn".equals(mtd.getName()))
+                        // Rewriting flagOn result to keep intercepting invocations after it.
+                        else if ("flagOn".equals(mtd.getName()))
                             return proxy;
                         else if ("forSubjectId".equals(mtd.getName()))
                             return proxy;


[32/50] [abbrv] incubator-ignite git commit: Merge branch 'sprint-1' into ignite-113

Posted by se...@apache.org.
Merge branch 'sprint-1' into ignite-113


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

Branch: refs/heads/ignite-sql
Commit: 9e748990ace4c836a8ea834af7ad999f1a53f060
Parents: b5631df c98118f
Author: Artem SHutak <as...@gridgain.com>
Authored: Fri Jan 30 13:37:16 2015 +0300
Committer: Artem SHutak <as...@gridgain.com>
Committed: Fri Jan 30 13:37:16 2015 +0300

----------------------------------------------------------------------
 assembly/release-hadoop.xml                     |    6 +-
 .../spi/checkpoint/s3/S3CheckpointSpi.java      |    4 +-
 .../ClientPropertiesConfigurationSelfTest.java  |    4 +-
 .../apache/ignite/IgniteCheckedException.java   |    2 +-
 .../java/org/apache/ignite/IgniteException.java |    2 +-
 .../processors/cache/GridCacheAdapter.java      |   16 +-
 .../cache/GridCacheDeploymentManager.java       |    2 +-
 .../cache/GridCacheMvccCandidate.java           |    4 +-
 .../processors/cache/GridCacheStoreManager.java |   25 +-
 .../processors/cache/IgniteCacheProxy.java      |   24 +-
 .../transactions/IgniteTxLocalAdapter.java      |   42 +-
 .../service/GridServiceProcessor.java           |    2 +-
 .../apache/ignite/internal/util/GridUtils.java  | 9141 ------------------
 .../ignite/internal/util/IgniteUtils.java       | 9141 ++++++++++++++++++
 .../internal/util/typedef/internal/U.java       |    4 +-
 .../visor/misc/VisorResolveHostNameTask.java    |    2 +-
 .../internal/visor/query/VisorQueryUtils.java   |    4 +-
 .../ignite/lang/IgniteAsyncSupportAdapter.java  |   27 +-
 .../optimized/IgniteOptimizedMarshaller.java    |    2 +-
 .../IgniteExceptionHelpLinksSelfTest.java       |    3 +-
 .../GridEventStorageCheckAllEventsSelfTest.java |    2 +-
 .../cache/GridCacheAbstractMetricsSelfTest.java |   10 +-
 .../GridCacheAbstractProjectionSelfTest.java    |   50 +
 .../GridCacheReturnValueTransferSelfTest.java   |    2 +-
 .../cache/IgniteCacheInvokeAbstractTest.java    |    4 +-
 .../IgniteCrossCacheTxStoreSelfTest.java        |  288 +
 ...GridCacheValueConsistencyAtomicSelfTest.java |    2 +-
 .../IgniteCacheTxStoreSessionTest.java          |   11 +-
 .../cache/GridCacheCommandHandlerSelfTest.java  |    4 +-
 ...artupWithSpecifiedWorkDirectorySelfTest.java |    2 +-
 ...tartupWithUndefinedGridGainHomeSelfTest.java |    4 +-
 .../internal/util/GridTestClockTimer.java       |    6 +-
 .../ignite/internal/util/GridUtilsSelfTest.java |  728 --
 .../internal/util/IgniteUtilsSelfTest.java      |  728 ++
 .../IpcSharedMemoryNativeLoaderSelfTest.java    |    2 +-
 .../ignite/lang/GridSetWrapperSelfTest.java     |    2 +-
 .../ignite/messaging/GridMessagingSelfTest.java |    2 +-
 .../ignite/testsuites/IgniteCacheTestSuite.java |    1 +
 .../testsuites/IgniteUtilSelfTestSuite.java     |    2 +-
 .../hadoop/GridHadoopClassLoader.java           |    4 +-
 .../ignite/visor/commands/VisorConsole.scala    |    6 +-
 .../commands/alert/VisorAlertCommand.scala      |    2 +-
 .../config/VisorConfigurationCommand.scala      |    6 +-
 .../commands/deploy/VisorDeployCommand.scala    |    4 +-
 .../commands/disco/VisorDiscoveryCommand.scala  |    4 +-
 .../commands/events/VisorEventsCommand.scala    |    4 +-
 .../visor/commands/gc/VisorGcCommand.scala      |   13 +-
 .../visor/commands/node/VisorNodeCommand.scala  |    4 +-
 .../commands/start/VisorStartCommand.scala      |    4 +-
 .../commands/tasks/VisorTasksCommand.scala      |    4 +-
 .../commands/top/VisorTopologyCommand.scala     |    6 +-
 .../visor/commands/vvm/VisorVvmCommand.scala    |    8 +-
 .../scala/org/apache/ignite/visor/visor.scala   |   21 +-
 .../visor/commands/gc/VisorGcCommandSpec.scala  |   25 +-
 54 files changed, 10396 insertions(+), 10026 deletions(-)
----------------------------------------------------------------------



[16/50] [abbrv] incubator-ignite git commit: IGNITE-109 - Merge branch 'ignite-109' into sprint-1

Posted by se...@apache.org.
IGNITE-109 - Merge branch 'ignite-109' into sprint-1


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

Branch: refs/heads/ignite-sql
Commit: 9550905e62dad06717ab666330c1d5b6523adc02
Parents: 61a9f98
Author: Alexey Goncharuk <ag...@gridgain.com>
Authored: Thu Jan 29 19:04:43 2015 -0800
Committer: Alexey Goncharuk <ag...@gridgain.com>
Committed: Thu Jan 29 19:04:43 2015 -0800

----------------------------------------------------------------------
 .../cache/distributed/IgniteCrossCacheTxStoreSelfTest.java     | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9550905e/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCrossCacheTxStoreSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCrossCacheTxStoreSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCrossCacheTxStoreSelfTest.java
index 7df7619..f80549c 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCrossCacheTxStoreSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCrossCacheTxStoreSelfTest.java
@@ -108,7 +108,7 @@ public class IgniteCrossCacheTxStoreSelfTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testWriteThrough() throws Exception {
-        GridEx grid = grid(0);
+        IgniteEx grid = grid(0);
 
         TestStore firstStore = (TestStore)grid(0).configuration().getCacheConfiguration()[1].getCacheStoreFactory().create();
 
@@ -153,7 +153,7 @@ public class IgniteCrossCacheTxStoreSelfTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testIncompatibleCaches1() throws Exception {
-        GridEx grid = grid(0);
+        IgniteEx grid = grid(0);
 
         try (IgniteTx ignored = grid.transactions().txStart()) {
             GridCache<Object, Object> cacheA = grid.cache("cacheA");
@@ -174,7 +174,7 @@ public class IgniteCrossCacheTxStoreSelfTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testIncompatibleCaches2() throws Exception {
-        GridEx grid = grid(0);
+        IgniteEx grid = grid(0);
 
         try (IgniteTx ignored = grid.transactions().txStart()) {
             GridCache<Object, Object> cacheA = grid.cache("cacheA");


[46/50] [abbrv] incubator-ignite git commit: ignite-sql - order by, top, offset, limit, having

Posted by se...@apache.org.
ignite-sql - order by, top, offset, limit, having


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

Branch: refs/heads/ignite-sql
Commit: fb4a74c30865bbc111c1b4d0aab5fd8fd3f3b8d6
Parents: 7e8ea4f
Author: S.Vladykin <sv...@gridgain.com>
Authored: Mon Feb 2 03:31:34 2015 +0300
Committer: S.Vladykin <sv...@gridgain.com>
Committed: Mon Feb 2 03:31:34 2015 +0300

----------------------------------------------------------------------
 .../processors/query/h2/IgniteH2Indexing.java   |   9 +-
 .../processors/query/h2/sql/GridSqlColumn.java  |   6 ++
 .../processors/query/h2/sql/GridSqlElement.java |  25 ++++-
 .../query/h2/sql/GridSqlQueryParser.java        |  27 +++--
 .../query/h2/sql/GridSqlQuerySplitter.java      |  92 +++++++++++------
 .../processors/query/h2/sql/GridSqlSelect.java  | 100 +++++++++++++++++--
 .../query/h2/sql/GridSqlSortColumn.java         |  76 ++++++++++++++
 .../cache/GridCacheCrossCacheQuerySelfTest.java |  60 ++++++++++-
 .../query/h2/sql/GridQueryParsingTest.java      |   1 +
 9 files changed, 343 insertions(+), 53 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fb4a74c3/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
index 94d154c..b89a05a 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
@@ -262,7 +262,7 @@ public class IgniteH2Indexing implements GridQueryIndexing {
                 stmt.executeUpdate("SET SCHEMA \"" + schema + '"');
 
                 if (log.isDebugEnabled())
-                    log.debug("Initialized H2 schema for queries on space: " + schema);
+                    log.debug("Set schema: " + schema);
 
                 c.schema(schema);
             }
@@ -768,7 +768,12 @@ public class IgniteH2Indexing implements GridQueryIndexing {
             return new GridFinishedFutureEx<>(e);
         }
 
-        return queryTwoStep(space, GridSqlQuerySplitter.split(c, sqlQry, params));
+        GridCacheTwoStepQuery twoStepQry = GridSqlQuerySplitter.split(c, sqlQry, params);
+
+        if (log.isDebugEnabled())
+            log.debug("Parsed query: `" + sqlQry + "` into two step query: " + twoStepQry);
+
+        return queryTwoStep(space, twoStepQry);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fb4a74c3/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlColumn.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlColumn.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlColumn.java
index 31acbe0..c334629 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlColumn.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlColumn.java
@@ -35,6 +35,12 @@ public class GridSqlColumn extends GridSqlElement implements GridSqlValue {
         this.sqlText = sqlText;
     }
 
+    /**
+     * @return Simple unqualified column with only name.
+     */
+    public GridSqlColumn simplify() {
+        return new GridSqlColumn(null, colName, colName);
+    }
 
     /**
      * @return Column name.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fb4a74c3/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlElement.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlElement.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlElement.java
index 35140b5..698cc16 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlElement.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlElement.java
@@ -29,6 +29,14 @@ public abstract class GridSqlElement implements Cloneable {
     }
 
     /**
+     * Clears all children.
+     */
+    public void clearChildren() {
+        if (size() != 0)
+            children = new ArrayList<>();
+    }
+
+    /**
      * @param expr Expr.
      * @return {@code this}.
      */
@@ -58,7 +66,7 @@ public abstract class GridSqlElement implements Cloneable {
 
     /** {@inheritDoc} */
     @SuppressWarnings({"CloneCallsConstructors", "CloneDoesntDeclareCloneNotSupportedException"})
-    @Override protected GridSqlElement clone() {
+    @Override public GridSqlElement clone() {
         try {
             GridSqlElement res = (GridSqlElement)super.clone();
 
@@ -70,4 +78,19 @@ public abstract class GridSqlElement implements Cloneable {
             throw new IllegalStateException(e);
         }
     }
+
+    /**
+     * @param idx Index.
+     * @param child New child.
+     */
+    public void child(int idx, GridSqlElement child) {
+        children.set(idx, child);
+    }
+
+    /**
+     * @return Number of children.
+     */
+    public int size() {
+        return children.size();
+    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fb4a74c3/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQueryParser.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQueryParser.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQueryParser.java
index 7a7c0e6..2865db9 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQueryParser.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQueryParser.java
@@ -193,7 +193,7 @@ public class GridSqlQueryParser {
         Expression where = CONDITION.get(select);
         res.where(parseExpression(where));
 
-        Set<TableFilter> allFilers = new HashSet<>(select.getTopFilters());
+        Set<TableFilter> allFilters = new HashSet<>(select.getTopFilters());
 
         GridSqlElement from = null;
 
@@ -209,7 +209,7 @@ public class GridSqlQueryParser {
 
             from = from == null ? gridFilter : new GridSqlJoin(from, gridFilter);
 
-            allFilers.remove(filter);
+            allFilters.remove(filter);
 
             filter = filter.getJoin();
         }
@@ -217,7 +217,7 @@ public class GridSqlQueryParser {
 
         res.from(from);
 
-        assert allFilers.isEmpty();
+        assert allFilters.isEmpty();
 
         ArrayList<Expression> expressions = select.getExpressions();
 
@@ -233,12 +233,13 @@ public class GridSqlQueryParser {
                 res.addGroupExpression(parseExpression(expressions.get(idx)));
         }
 
-        assert0(select.getHaving() == null, select);
-
         int havingIdx = HAVING_INDEX.get(select);
 
-        if (havingIdx >= 0)
+        if (havingIdx >= 0) {
+            res.havingColumn(havingIdx);
+
             res.having(parseExpression(expressions.get(havingIdx)));
+        }
 
         for (int i = 0; i < select.getColumnCount(); i++)
             res.addSelectExpression(parseExpression(expressions.get(i)));
@@ -249,10 +250,20 @@ public class GridSqlQueryParser {
             int[] indexes = sortOrder.getQueryColumnIndexes();
             int[] sortTypes = sortOrder.getSortTypes();
 
-            for (int i = 0; i < indexes.length; i++)
-                res.addSort(parseExpression(expressions.get(indexes[i])), sortTypes[i]);
+            for (int i = 0; i < indexes.length; i++) {
+                int colIdx = indexes[i];
+                int type = sortTypes[i];
+
+                res.addSort(parseExpression(expressions.get(colIdx)), new GridSqlSortColumn(colIdx,
+                    (type & SortOrder.DESCENDING) == 0,
+                    (type & SortOrder.NULLS_FIRST) != 0,
+                    (type & SortOrder.NULLS_LAST) != 0));
+            }
         }
 
+        res.limit(parseExpression(select.getLimit()));
+        res.offset(parseExpression(select.getOffset()));
+
         return res;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fb4a74c3/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQuerySplitter.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQuerySplitter.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQuerySplitter.java
index cc40f9e..c04cce2 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQuerySplitter.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQuerySplitter.java
@@ -50,56 +50,75 @@ public class GridSqlQuerySplitter {
      * @return Two step query.
      */
     public static GridCacheTwoStepQuery split(Connection conn, String query, Object[] params) {
-        // TODO possibly get column types from query.
         GridSqlSelect srcQry = GridSqlQueryParser.parse(conn, query);
 
-        if (srcQry.groups().isEmpty()) { // Simple case.
-            String tbl0 = table(0);
+        final String mergeTable = table(0);
 
-            GridCacheTwoStepQuery res = new GridCacheTwoStepQuery("select * from " + tbl0);
-
-            res.addMapQuery(tbl0, srcQry.getSQL(), params);
-
-            return res;
-        }
+        GridSqlSelect mapQry = srcQry.clone();
+        GridSqlSelect rdcQry = new GridSqlSelect().from(table(mergeTable));
 
         // Split all select expressions into map-reduce parts.
         List<GridSqlElement> mapExps = new ArrayList<>(srcQry.allExpressions());
-
         GridSqlElement[] rdcExps = new GridSqlElement[srcQry.select().size()];
 
-        for (int i = 0, len = mapExps.size(); i < len; i++)
+        for (int i = 0, len = mapExps.size(); i < len; i++) // Remember len because mapExps list can grow.
             splitSelectExpression(mapExps, rdcExps, i);
 
-        // Build map query.
-        GridSqlSelect mapQry = srcQry.clone();
-
+        // Fill select expressions.
         mapQry.clearSelect();
 
         for (GridSqlElement exp : mapExps)
             mapQry.addSelectExpression(exp);
 
-        mapQry.clearGroups();
+        for (GridSqlElement rdcExp : rdcExps)
+            rdcQry.addSelectExpression(rdcExp);
+
+        // -- GROUP BY
+        if (!srcQry.groups().isEmpty()) {
+            mapQry.clearGroups();
 
-        for (int col : srcQry.groupColumns())
-            mapQry.addGroupExpression(column(((GridSqlAlias)mapExps.get(col)).alias()));
+            for (int col : srcQry.groupColumns())
+                mapQry.addGroupExpression(column(((GridSqlAlias)mapExps.get(col)).alias()));
 
-        // TODO sort support
+            for (int col : srcQry.groupColumns())
+                rdcQry.addGroupExpression(column(((GridSqlAlias)mapExps.get(col)).alias()));
+        }
 
-        // Reduce query.
-        GridSqlSelect rdcQry = new GridSqlSelect();
+        // -- HAVING
+        if (srcQry.having() != null) {
+            // TODO Find aggregate functions in HAVING clause.
+            rdcQry.whereAnd(column(columnName(srcQry.havingColumn())));
 
-        for (GridSqlElement rdcExp : rdcExps)
-            rdcQry.addSelectExpression(rdcExp);
+            mapQry.having(null);
+        }
+
+        // -- ORDER BY
+        if (!srcQry.sort().isEmpty()) {
+            for (GridSqlSortColumn sortCol : srcQry.sort().values())
+                rdcQry.addSort(column(((GridSqlAlias)mapExps.get(sortCol.column())).alias()), sortCol);
+        }
+
+        // -- LIMIT
+        if (srcQry.limit() != null)
+            rdcQry.limit(srcQry.limit());
 
-        rdcQry.from(new GridSqlTable(null, table(0)));
+        // -- OFFSET
+        if (srcQry.offset() != null) {
+            mapQry.offset(null);
 
-        for (int col : srcQry.groupColumns())
-            rdcQry.addGroupExpression(column(((GridSqlAlias)mapExps.get(col)).alias()));
+            rdcQry.offset(srcQry.offset());
+        }
+
+        // -- DISTINCT
+        if (srcQry.distinct()) {
+            mapQry.distinct(false);
+            rdcQry.distinct(true);
+        }
 
+        // Build resulting two step query.
         GridCacheTwoStepQuery res = new GridCacheTwoStepQuery(rdcQry.getSQL());
 
-        res.addMapQuery(table(0), mapQry.getSQL(), params);
+        res.addMapQuery(mergeTable, mapQry.getSQL(), params);
 
         return res;
     }
@@ -127,7 +146,7 @@ public class GridSqlQuerySplitter {
             String mapAggAlias = columnName(idx);
 
             switch (agg.type()) {
-                case AVG: // SUM( AVG(CAST(x AS DECIMAL))*COUNT(x) )/SUM( COUNT(x) ).
+                case AVG: // SUM( AVG(CAST(x AS DOUBLE))*COUNT(x) )/SUM( COUNT(x) ).
                     //-- COUNT(x) map
                     GridSqlElement cntMapAgg = aggregate(agg.distinct(), COUNT).addChild(agg.child());
 
@@ -139,9 +158,9 @@ public class GridSqlQuerySplitter {
 
                     mapSelect.add(cntMapAgg);
 
-                    //-- AVG(CAST(x AS DECIMAL)) map
+                    //-- AVG(CAST(x AS DOUBLE)) map
                     mapAgg = aggregate(agg.distinct(), AVG).addChild( // Add function argument.
-                        function(CAST).setCastType("DECIMAL").addChild(agg.child()));
+                        function(CAST).setCastType("DOUBLE").addChild(agg.child()));
 
                     //-- SUM( AVG(x)*COUNT(x) )/SUM( COUNT(x) ) reduce
                     GridSqlElement sumUpRdc = aggregate(false, SUM).addChild(
@@ -196,7 +215,12 @@ public class GridSqlQuerySplitter {
         }
         else {
             if (alias == null) { // Generate alias if none.
-                alias = alias(columnName(idx), mapSelect.get(idx));
+                GridSqlElement expr = mapSelect.get(idx);
+
+                String aliasName = expr instanceof GridSqlColumn ? ((GridSqlColumn)expr).columnName() :
+                    columnName(idx);
+
+                alias = alias(aliasName, expr);
 
                 mapSelect.set(idx, alias);
             }
@@ -249,4 +273,12 @@ public class GridSqlQuerySplitter {
     private static GridSqlFunction function(GridSqlFunctionType type) {
         return new GridSqlFunction(type);
     }
+
+    /**
+     * @param name Table name.
+     * @return Table.
+     */
+    private static GridSqlTable table(String name) {
+        return new GridSqlTable(null, name);
+    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fb4a74c3/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlSelect.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlSelect.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlSelect.java
index ee4d6c8..e8da8f5 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlSelect.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlSelect.java
@@ -9,7 +9,6 @@
 
 package org.apache.ignite.internal.processors.query.h2.sql;
 
-import org.h2.result.*;
 import org.h2.util.*;
 
 import java.util.*;
@@ -43,7 +42,44 @@ public class GridSqlSelect implements Cloneable {
     private GridSqlElement having;
 
     /** */
-    private Map<GridSqlElement, Integer> sort = new LinkedHashMap<>();
+    private int havingCol = -1;
+
+    /** */
+    private Map<GridSqlElement,GridSqlSortColumn> sort = new LinkedHashMap<>();
+
+    /** */
+    private GridSqlElement offset;
+
+    /** */
+    private GridSqlElement limit;
+
+    /**
+     * @return Offset.
+     */
+    public GridSqlElement offset() {
+        return offset;
+    }
+
+    /**
+     * @param offset Offset.
+     */
+    public void offset(GridSqlElement offset) {
+        this.offset = offset;
+    }
+
+    /**
+     * @param limit Limit.
+     */
+    public void limit(GridSqlElement limit) {
+        this.limit = limit;
+    }
+
+    /**
+     * @return Limit.
+     */
+    public GridSqlElement limit() {
+        return limit;
+    }
 
     /**
      * @return Distinct.
@@ -102,7 +138,7 @@ public class GridSqlSelect implements Cloneable {
 
             buff.resetCount();
 
-            for (Map.Entry<GridSqlElement, Integer> entry : sort.entrySet()) {
+            for (Map.Entry<GridSqlElement,GridSqlSortColumn> entry : sort.entrySet()) {
                 buff.appendExceptFirst(", ");
 
                 GridSqlElement expression = entry.getKey();
@@ -114,18 +150,24 @@ public class GridSqlSelect implements Cloneable {
                 else
                     buff.append('=').append(StringUtils.unEnclose(expression.getSQL()));
 
-                int type = entry.getValue();
+                GridSqlSortColumn type = entry.getValue();
 
-                if ((type & SortOrder.DESCENDING) != 0)
+                if (!type.asc())
                     buff.append(" DESC");
 
-                if ((type & SortOrder.NULLS_FIRST) != 0)
+                if (type.nullsFirst())
                     buff.append(" NULLS FIRST");
-                else if ((type & SortOrder.NULLS_LAST) != 0)
+                else if (type.nullsLast())
                     buff.append(" NULLS LAST");
             }
         }
 
+        if (limit != null)
+            buff.append(" LIMIT ").append(StringUtils.unEnclose(limit.getSQL()));
+
+        if (offset != null)
+            buff.append(" OFFSET ").append(StringUtils.unEnclose(offset.getSQL()));
+
         return buff.toString();
     }
 
@@ -164,6 +206,9 @@ public class GridSqlSelect implements Cloneable {
      * @param expression Expression.
      */
     public void addSelectExpression(GridSqlElement expression) {
+        if (expression == null)
+            throw new NullPointerException();
+
         select.add(expression);
     }
 
@@ -186,6 +231,9 @@ public class GridSqlSelect implements Cloneable {
      * @param expression Expression.
      */
     public void addGroupExpression(GridSqlElement expression) {
+        if (expression == null)
+            throw new NullPointerException();
+
         groups.add(expression);
     }
 
@@ -212,9 +260,12 @@ public class GridSqlSelect implements Cloneable {
 
     /**
      * @param from From element.
+     * @return {@code this}.
      */
-    public void from(GridSqlElement from) {
+    public GridSqlSelect from(GridSqlElement from) {
         this.from = from;
+
+        return this;
     }
 
     /**
@@ -232,6 +283,21 @@ public class GridSqlSelect implements Cloneable {
     }
 
     /**
+     * @param condition Adds new WHERE condition using AND operator.
+     * @return {@code this}.
+     */
+    public GridSqlSelect whereAnd(GridSqlElement condition) {
+        if (condition == null)
+            throw new NullPointerException();
+
+        GridSqlElement old = where();
+
+        where(old == null ? condition : new GridSqlOperation(GridSqlOperationType.AND, old, condition));
+
+        return this;
+    }
+
+    /**
      * @return Having.
      */
     public GridSqlElement having() {
@@ -246,9 +312,23 @@ public class GridSqlSelect implements Cloneable {
     }
 
     /**
+     * @param col Index of HAVING column.
+     */
+    public void havingColumn(int col) {
+        this.havingCol = col;
+    }
+
+    /**
+     * @return Index of HAVING column.
+     */
+    public int havingColumn() {
+        return havingCol;
+    }
+
+    /**
      * @return Sort.
      */
-    public Map<GridSqlElement, Integer> sort() {
+    public Map<GridSqlElement,GridSqlSortColumn> sort() {
         return sort;
     }
 
@@ -263,7 +343,7 @@ public class GridSqlSelect implements Cloneable {
      * @param expression Expression.
      * @param sortType The sort type bit mask (SortOrder.DESCENDING, SortOrder.NULLS_FIRST, SortOrder.NULLS_LAST).
      */
-    public void addSort(GridSqlElement expression, int sortType) {
+    public void addSort(GridSqlElement expression, GridSqlSortColumn sortType) {
         sort.put(expression, sortType);
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fb4a74c3/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlSortColumn.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlSortColumn.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlSortColumn.java
new file mode 100644
index 0000000..4a3384c
--- /dev/null
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlSortColumn.java
@@ -0,0 +1,76 @@
+/*
+ * 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.query.h2.sql;
+
+/**
+ * Sort order for ORDER BY clause.
+ */
+public class GridSqlSortColumn {
+    /** */
+    private final int col;
+
+    /** */
+    private final boolean asc;
+
+    /** */
+    private final boolean nullsFirst;
+
+    /** */
+    private final boolean nullsLast;
+
+    /**
+     * @param col Column index.
+     * @param asc Ascending.
+     * @param nullsFirst Nulls go first.
+     * @param nullsLast Nulls go last.
+     */
+    public GridSqlSortColumn(int col, boolean asc, boolean nullsFirst, boolean nullsLast) {
+        this.col = col;
+        this.asc = asc;
+        this.nullsFirst = nullsFirst;
+        this.nullsLast = nullsLast;
+    }
+
+    /**
+     * @return Column index.
+     */
+    public int column() {
+        return col;
+    }
+
+    /**
+     * @return {@code true} For ASC order.
+     */
+    public boolean asc() {
+        return asc;
+    }
+
+    /**
+     * @return {@code true} If {@code null}s must go first.
+     */
+    public boolean nullsFirst() {
+        return nullsFirst;
+    }
+
+    /**
+     * @return {@code true} If {@code null}s must go last.
+     */
+    public boolean nullsLast() {
+        return nullsLast;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fb4a74c3/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheCrossCacheQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheCrossCacheQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheCrossCacheQuerySelfTest.java
index 42d1bf7..1211301 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheCrossCacheQuerySelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheCrossCacheQuerySelfTest.java
@@ -114,7 +114,7 @@ public class GridCacheCrossCacheQuerySelfTest extends GridCommonAbstractTest {
 
         GridCacheTwoStepQuery q = new GridCacheTwoStepQuery("select cast(sum(x) as long) from _cnts_ where ? = ?", 1, 1);
 
-        q.addMapQuery("_cnts_", "select count(*) x from \"partitioned\".FactPurchase where ? = ?", 2 ,2);
+        q.addMapQuery("_cnts_", "select count(*) x from \"partitioned\".FactPurchase where ? = ?", 2, 2);
 
         Object cnt = qx.execute(cache, q).get().iterator().next().get(0);
 
@@ -155,7 +155,9 @@ public class GridCacheCrossCacheQuerySelfTest extends GridCommonAbstractTest {
         assertFalse(set1.isEmpty());
         assertEquals(set0, set1);
 
-        X.println("___ AVG MIN MAX SUM COUNT(*) COUNT(x)");
+        X.println("___ GROUP BY AVG MIN MAX SUM COUNT(*) COUNT(x)");
+
+        Set<String> names = new HashSet<>();
 
         for (List<?> o : qx.executeTwoStepQuery("partitioned",
             "select p.name, avg(f.price), min(f.price), max(f.price), sum(f.price), count(*), " +
@@ -164,7 +166,61 @@ public class GridCacheCrossCacheQuerySelfTest extends GridCommonAbstractTest {
                 "where p.id = f.productId " +
                 "group by f.productId, p.name").get()) {
             X.println("___ -> " + o);
+
+            assertTrue(names.add((String)o.get(0)));
+            assertEquals(i(o, 4), i(o, 2) + i(o, 3));
         }
+
+        X.println("___ SUM HAVING");
+
+        for (List<?> o : qx.executeTwoStepQuery("partitioned",
+            "select p.name, sum(f.price) s " +
+                "from FactPurchase f, \"replicated\".DimProduct p " +
+                "where p.id = f.productId " +
+                "group by f.productId, p.name " +
+                "having s >= 15").get()) {
+            X.println("___ -> " + o);
+
+            assertTrue(i(o, 1) >= 15);
+        }
+
+        X.println("___ DISTINCT ORDER BY TOP");
+
+        int top = 6;
+
+        for (List<?> o : qx.executeTwoStepQuery("partitioned",
+            "select top 3 distinct productId " +
+                "from FactPurchase f " +
+                "order by productId desc ").get()) {
+            X.println("___ -> " + o);
+
+            assertEquals(top--, o.get(0));
+        }
+
+        X.println("___ DISTINCT ORDER BY OFFSET LIMIT");
+
+        top = 5;
+
+        for (List<?> o : qx.executeTwoStepQuery("partitioned",
+            "select distinct productId " +
+                "from FactPurchase f " +
+                "order by productId desc " +
+                "limit 2 offset 1").get()) {
+            X.println("___ -> " + o);
+
+            assertEquals(top--, o.get(0));
+        }
+
+        assertEquals(3, top);
+    }
+
+    /**
+     * @param l List.
+     * @param idx Index.
+     * @return Int.
+     */
+    private static int i(List<?> l, int idx){
+        return ((Number)l.get(idx)).intValue();
     }
 
     /** @throws Exception If failed. */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fb4a74c3/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/GridQueryParsingTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/GridQueryParsingTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/GridQueryParsingTest.java
index d31ec34..49ce6d3 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/GridQueryParsingTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/GridQueryParsingTest.java
@@ -113,6 +113,7 @@ public class GridQueryParsingTest extends GridCommonAbstractTest {
         checkQuery("select p.*, street from Person p, Address a");
         checkQuery("select p.name, a.street from Person p, Address a");
         checkQuery("select distinct p.name, a.street from Person p, Address a");
+        checkQuery("select distinct name, street from Person, Address group by old");
         checkQuery("select distinct name, street from Person, Address");
         checkQuery("select p1.name, a2.street from Person p1, Address a1, Person p2, Address a2");
 


[40/50] [abbrv] incubator-ignite git commit: Merge remote-tracking branches 'remotes/origin/ignite-69', 'remotes/origin/ignite-71' and 'remotes/origin/ignite-72-1' into sprint-1

Posted by se...@apache.org.
Merge remote-tracking branches 'remotes/origin/ignite-69', 'remotes/origin/ignite-71' and 'remotes/origin/ignite-72-1' into sprint-1


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

Branch: refs/heads/ignite-sql
Commit: f64485ba826858addfb68943db8fcf1b146af2e8
Parents: 5203363 43d54c2 8df3ac4 ae74087
Author: Anton Vinogradov <av...@gridgain.com>
Authored: Fri Jan 30 21:01:27 2015 +0300
Committer: Anton Vinogradov <av...@gridgain.com>
Committed: Fri Jan 30 21:01:27 2015 +0300

----------------------------------------------------------------------
 assembly/release-base.xml                       |     2 +-
 config/gridgain-log4j.xml                       |   152 -
 config/ignite-log4j.xml                         |   152 +
 config/java.util.logging.properties             |    14 +-
 .../apache/ignite/examples/ComputeExample.java  |    59 +
 .../ignite/examples/MessagingExample.java       |   166 +
 .../org/gridgain/examples/ComputeExample.java   |    59 -
 .../org/gridgain/examples/MessagingExample.java |   166 -
 .../integration/ClientAbstractSelfTest.java     |     2 +-
 .../rest/RestBinaryProtocolSelfTest.java        |     2 +-
 .../java/org/apache/ignite/IgniteLogger.java    |     2 +-
 .../impl/GridRouterCommandLineStartup.java      |     2 +-
 .../apache/ignite/internal/GridProductImpl.java |     2 +-
 .../apache/ignite/internal/IgniteKernal.java    |     8 +-
 .../org/apache/ignite/internal/IgnitionEx.java  |     6 +-
 .../handlers/log/GridLogCommandHandler.java     |     2 +-
 .../java/IgniteJavaLoggerFileHandler.java       |     2 +-
 .../ignite/thread/IgniteThreadFactory.java      |     2 +-
 modules/core/src/test/config/log4j-test.xml     |     2 +-
 .../loadtests/nio/GridNioBenchmarkTest.java     |     2 +-
 .../startup/GridRandomCommandLineLoader.java    |     2 +-
 .../testframework/junits/GridAbstractTest.java  |     2 +-
 .../logger/GridLog4jRollingFileAppender.java    |     2 +-
 .../junits/logger/GridTestLog4jLogger.java      |     2 +-
 .../src/test/resources/log/gridgain.log.tst     | 13706 -----------------
 .../core/src/test/resources/log/ignite.log.tst  | 13706 +++++++++++++++++
 .../child/GridHadoopExternalProcessStarter.java |     2 +-
 .../apache/ignite/logger/jcl/GridJclLogger.java |     4 +-
 .../ignite/logger/log4j/IgniteLog4jLogger.java  |     2 +-
 .../logger/log4j/IgniteLog4jNodeIdFilePath.java |     4 +-
 .../log4j/GridLog4jCorrectFileNameTest.java     |     4 +-
 .../rest/protocols/http/jetty/rest.html         |     6 +-
 modules/scalar/pom.xml                          |     6 +-
 .../util/nodestart/GridNodeCallableImpl.java    |     2 +-
 pom.xml                                         |    10 +-
 35 files changed, 14132 insertions(+), 14132 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f64485ba/modules/scalar/pom.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f64485ba/pom.xml
----------------------------------------------------------------------


[42/50] [abbrv] incubator-ignite git commit: Merge remote-tracking branch 'remotes/origin/ignite-67' into sprint-1

Posted by se...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-67' into sprint-1

Conflicts:
	config/ignite-log4j.xml
	config/java.util.logging.properties
	modules/core/src/test/config/log4j-test.xml
	modules/log4j/src/main/java/org/apache/ignite/logger/log4j/IgniteLog4jNodeIdFilePath.java


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

Branch: refs/heads/ignite-sql
Commit: 115f59799edf7038475002553891700d77c0ce03
Parents: f64485b ac05bb9
Author: Anton Vinogradov <av...@gridgain.com>
Authored: Fri Jan 30 22:01:50 2015 +0300
Committer: Anton Vinogradov <av...@gridgain.com>
Committed: Fri Jan 30 22:01:50 2015 +0300

----------------------------------------------------------------------
 bin/ggrouter.sh                                 |  10 +-
 bin/ggstart.bat                                 |  42 ++--
 bin/ggstart.sh                                  |  36 ++--
 bin/ggvisorcmd.bat                              |  36 ++--
 bin/ggvisorcmd.sh                               |  22 +--
 bin/include/functions.sh                        |  42 ++--
 bin/include/hadoop-classpath.bat                |   2 +-
 bin/include/hadoop-classpath.sh                 |   4 +-
 bin/include/parseargs.bat                       |   2 +-
 bin/include/parseargs.sh                        |   6 +-
 bin/include/service.sh                          |  12 +-
 bin/include/setenv.bat                          |  28 +--
 bin/include/setenv.sh                           |  34 ++--
 bin/include/target-classpath.bat                |   8 +-
 bin/include/target-classpath.sh                 |  14 +-
 bin/setup-hadoop.sh                             |  10 +-
 config/hadoop/default-config.xml                |   2 +-
 config/ignite-log4j.xml                         |   4 +-
 config/java.util.logging.properties             |   2 +-
 config/router/default-router.xml                |   2 +-
 docs/mapred-site.ignite.xml                     |   2 +-
 examples/config/example-cache.xml               |   2 +-
 examples/config/example-streamer.xml            |   8 +-
 examples/config/filesystem/example-ggfs.xml     |   2 +-
 examples/config/servlet/WEB-INF/web.xml         |   2 +-
 examples/rest/http-rest-example.php             |   2 +-
 examples/rest/memcache-rest-example.php         |   2 +-
 .../hibernate/HibernateL2CacheExample.java      |   2 +-
 .../streaming/StreamingCheckInExample.java      |   6 +-
 .../StreamingPopularNumbersExample.java         |   6 +-
 .../streaming/StreamingPriceBarsExample.java    |   6 +-
 .../StreamingRunningAverageExample.java         |   6 +-
 .../scalar/examples/ScalarPrimeExample.scala    |   2 +-
 .../GridMonteCarloExamplesSelfTest.java         |   4 +-
 .../testsuites/IgniteExamplesSelfTestSuite.java |   2 +-
 .../ScalarExamplesSelfTestSuite.scala           |   2 +-
 .../GridifySetToXXXNonSpringAopSelfTest.java    |  20 +-
 .../GridifySetToXXXSpringAopSelfTest.java       |  20 +-
 .../ignite/gridify/NonSpringAopSelfTest.java    |  20 +-
 .../optimized/OptimizedMarshallerAopTest.java   |   4 +-
 .../testsuites/IgniteAopSelfTestSuite.java      |   2 +-
 .../gridify/ExternalNonSpringAopSelfTest.java   |  20 +-
 modules/clients/src/test/bin/start-nodes-ssh.sh |   2 +-
 modules/clients/src/test/bin/start-nodes.cmd    |  24 +--
 modules/clients/src/test/bin/start-nodes.sh     |  26 +--
 .../client/ClientDefaultCacheSelfTest.java      |   4 +-
 .../client/ClientTopologyCacheSelfTest.java     |   2 +-
 .../integration/ClientAbstractSelfTest.java     |   4 +-
 .../client/router/ClientFailedInitSelfTest.java |   4 +-
 .../client/router/RouterFactorySelfTest.java    |   4 +-
 .../JettyRestProcessorAbstractSelfTest.java     |   4 +-
 .../rest/TaskCommandHandlerSelfTest.java        |   4 +-
 .../protocols/tcp/TcpRestParserSelfTest.java    |   6 +-
 .../src/test/resources/jetty/rest-jetty-ssl.xml |  10 +-
 .../src/test/resources/jetty/rest-jetty.xml     |   8 +-
 .../test/resources/jetty/router-jetty-ssl.xml   |   8 +-
 .../src/test/resources/jetty/router-jetty.xml   |   8 +-
 modules/clients/src/test/resources/log4j.xml    |   4 +-
 .../clients/src/test/resources/spring-cache.xml |   2 +-
 .../src/test/resources/spring-router-ssl.xml    |   4 +-
 .../src/test/resources/spring-router.xml        |   4 +-
 .../src/test/resources/spring-server-node.xml   |   2 +-
 .../test/resources/spring-server-ssl-node.xml   |   2 +-
 .../apache/ignite/IgniteBasicWarmupClosure.java |   6 +-
 .../java/org/apache/ignite/IgniteCluster.java   |   2 +-
 .../java/org/apache/ignite/IgniteLogger.java    |   4 +-
 .../apache/ignite/IgniteSystemProperties.java   | 190 +++++++++----------
 .../main/java/org/apache/ignite/Ignition.java   |   6 +-
 .../apache/ignite/cache/CacheConfiguration.java |   3 +-
 .../CacheConsistentHashAffinityFunction.java    |   2 +-
 .../apache/ignite/client/GridClientCompute.java |   8 +-
 .../ignite/client/router/GridRouterFactory.java |   4 +-
 .../impl/GridRouterCommandLineStartup.java      |   2 +-
 .../router/impl/GridTcpRouterNioParser.java     |   4 +-
 .../apache/ignite/compute/gridify/Gridify.java  |   2 +-
 .../ignite/compute/gridify/GridifySetToSet.java |   2 +-
 .../compute/gridify/GridifySetToValue.java      |   2 +-
 .../ClientConnectionConfiguration.java          |  16 +-
 .../configuration/IgniteConfiguration.java      |  72 +++----
 .../configuration/IgniteDeploymentMode.java     |   4 +-
 .../apache/ignite/fs/IgniteFsConfiguration.java |   2 +-
 .../ignite/internal/GridKernalContextImpl.java  |   2 +-
 .../apache/ignite/internal/GridLoggerProxy.java |   4 +-
 .../internal/GridPerformanceSuggestions.java    |   4 +-
 .../ignite/internal/IgniteInternalFuture.java   |   8 +-
 .../apache/ignite/internal/IgniteKernal.java    |  20 +-
 .../org/apache/ignite/internal/IgnitionEx.java  |  46 ++---
 .../processors/cache/GridCacheAdapter.java      |   2 +-
 .../GridCachePartitionExchangeManager.java      |   2 +-
 .../processors/cache/GridCacheProcessor.java    |   4 +-
 .../processors/cache/GridCacheUtils.java        |   2 +-
 .../distributed/dht/GridDhtLocalPartition.java  |   2 +-
 .../dht/GridPartitionedGetFuture.java           |   2 +-
 .../dht/atomic/GridDhtAtomicCache.java          |   4 +-
 .../distributed/near/GridNearAtomicCache.java   |   2 +-
 .../distributed/near/GridNearGetFuture.java     |   2 +-
 .../cache/transactions/IgniteTxManager.java     |  10 +-
 .../processors/fs/IgniteFsProcessor.java        |   8 +-
 .../processors/job/GridJobProcessor.java        |   2 +-
 .../jobmetrics/GridJobMetricsProcessor.java     |   4 +-
 .../handlers/log/GridLogCommandHandler.java     |   2 +-
 .../handlers/task/GridTaskCommandHandler.java   |   2 +-
 .../protocols/tcp/GridClientPacketType.java     |   4 +-
 .../protocols/tcp/GridMemcachedMessage.java     |   4 +-
 .../rest/protocols/tcp/GridTcpRestParser.java   |  18 +-
 .../streamer/GridStreamProcessor.java           |   6 +-
 .../internal/util/GridConcurrentFactory.java    |   3 +-
 .../internal/util/GridConfigurationFinder.java  |   4 +-
 .../internal/util/GridReflectionCache.java      |   3 +-
 .../ignite/internal/util/IgniteUtils.java       |  50 ++---
 .../util/future/GridFinishedFuture.java         |   2 +-
 .../internal/util/future/GridFutureAdapter.java |   4 +-
 .../internal/util/io/GridUnsafeDataInput.java   |   2 +-
 .../internal/util/io/GridUnsafeDataOutput.java  |   2 +-
 .../shmem/IpcSharedMemoryServerEndpoint.java    |   4 +-
 .../util/ipc/shmem/IpcSharedMemorySpace.java    |   2 +-
 .../internal/util/nio/GridBufferedParser.java   |   2 +-
 .../nio/GridConnectionBytesVerifyFilter.java    |  18 +-
 .../util/nodestart/GridNodeStartUtils.java      |  10 +-
 .../util/offheap/unsafe/GridUnsafeMemory.java   |   2 +-
 .../util/portscanner/GridJmxPortFinder.java     |   4 +-
 .../apache/ignite/internal/util/typedef/X.java  |   4 +-
 .../visor/node/VisorBasicConfiguration.java     |  26 +--
 .../visor/node/VisorEmailConfiguration.java     |  14 +-
 .../visor/node/VisorLifecycleConfiguration.java |   2 +-
 .../visor/node/VisorRestConfiguration.java      |   4 +-
 .../apache/ignite/jdbc/IgniteJdbcDriver.java    |   2 +-
 .../apache/ignite/lifecycle/LifecycleBean.java  |   4 +-
 .../ignite/logger/java/IgniteJavaLogger.java    |   4 +-
 .../java/IgniteJavaLoggerFileHandler.java       |   2 +-
 .../optimized/IgniteOptimizedMarshaller.java    |   2 +-
 .../org/apache/ignite/spi/IgniteSpiAdapter.java |   4 +-
 .../ignite/spi/IgniteSpiManagementMBean.java    |   2 +-
 .../sharedfs/SharedFsCheckpointSpi.java         |   6 +-
 .../communication/tcp/TcpCommunicationSpi.java  |  12 +-
 .../spi/discovery/tcp/TcpDiscoverySpi.java      |   2 +-
 .../discovery/tcp/TcpDiscoverySpiAdapter.java   |   2 +-
 .../TcpDiscoveryMulticastIpFinder.java          |  18 +-
 .../sharedfs/TcpDiscoverySharedFsIpFinder.java  |   2 +-
 .../tcp/ipfinder/vm/TcpDiscoveryVmIpFinder.java |   2 +-
 .../spi/swapspace/file/FileSwapSpaceSpi.java    |   4 +-
 .../ignite/startup/BasicWarmupClosure.java      |   6 +-
 .../startup/cmdline/CommandLineStartup.java     |  12 +-
 .../startup/cmdline/CommandLineTransformer.java |   2 +-
 .../spring-cache-client-benchmark-1.xml         |   2 +-
 .../spring-cache-client-benchmark-2.xml         |   2 +-
 .../spring-cache-client-benchmark-3.xml         |   2 +-
 modules/core/src/test/config/example-cache.xml  |   2 +-
 modules/core/src/test/config/ggfs-loopback.xml  |   2 +-
 modules/core/src/test/config/ggfs-shmem.xml     |   2 +-
 modules/core/src/test/config/log4j-test.xml     |   2 +-
 .../core/src/test/config/spring-cache-load.xml  |   2 +-
 .../core/src/test/config/spring-multicache.xml  |   2 +-
 .../average/spring-streamer-average-base.xml    |   2 +-
 .../average/spring-streamer-average-local.xml   |   2 +-
 .../average/spring-streamer-average-random.xml  |   2 +-
 .../config/streamer/spring-streamer-base.xml    |   2 +-
 modules/core/src/test/config/tests.properties   |  10 +-
 .../internal/GridFactoryVmShutdownTest.java     |   2 +-
 .../ignite/internal/GridHomePathSelfTest.java   |   2 +-
 .../GridNodeVisorAttributesSelfTest.java        |   4 +-
 .../ignite/internal/GridStartStopSelfTest.java  |   2 +-
 .../ignite/internal/GridVersionSelfTest.java    |   8 +-
 .../GridCacheAbstractRemoveFailureTest.java     |   6 +-
 .../GridCacheMissingCommitVersionSelfTest.java  |   6 +-
 .../cache/GridCacheSlowTxWarnTest.java          |   2 +-
 ...idCacheValueConsistencyAbstractSelfTest.java |   6 +-
 .../GridCacheNodeFailureAbstractTest.java       |   2 +-
 .../GridCachePartitionedTxSalvageSelfTest.java  |   6 +-
 ...artupWithSpecifiedWorkDirectorySelfTest.java |   2 +-
 ...tartupWithUndefinedGridGainHomeSelfTest.java |   6 +-
 ...GridUnsafeDataOutputArraySizingSelfTest.java |   2 +-
 .../loadtest/GridSingleExecutionTest.java       |   4 +-
 .../cache/GridCacheAbstractLoadTest.java        |   2 +-
 .../cache/GridCacheDataStructuresLoadTest.java  |   2 +-
 .../loadtests/cache/GridCacheLoadTest.java      |   2 +-
 .../capacity/spring-capacity-cache.xml          |   2 +-
 .../loadtests/colocation/spring-colocation.xml  |   2 +-
 .../GridContinuousOperationsLoadTest.java       |  18 +-
 .../streamer/GridStreamerIndexLoadTest.java     |   2 +-
 .../ignite/loadtests/util/GridLoadTestArgs.java |   8 +-
 .../startup/GridRandomCommandLineLoader.java    |   8 +-
 .../ignite/startup/GridVmNodesStarter.java      |   8 +-
 .../GridCommandLineTransformerSelfTest.java     |   6 +-
 .../ignite/testframework/GridTestUtils.java     |  10 +-
 .../config/GridTestProperties.java              |  16 +-
 .../testframework/junits/GridAbstractTest.java  |   2 +-
 .../logger/GridLog4jRollingFileAppender.java    |   2 +-
 .../junits/logger/GridTestLog4jLogger.java      |   6 +-
 .../core/src/test/webapp/META-INF/gg-config.xml |   2 +-
 .../fs/hadoop/v1/GridGgfsHadoopFileSystem.java  |   6 +-
 .../fs/hadoop/v2/GridGgfsHadoopFileSystem.java  |   6 +-
 .../apache/ignite/hadoop/GridHadoopSetup.java   |  16 +-
 .../GridHadoopExternalTaskExecutor.java         |   2 +-
 .../hadoop/GridHadoopPopularWordsTest.java      |   6 +-
 .../processors/query/h2/IgniteH2Indexing.java   |   2 +-
 .../ignite/logger/log4j/IgniteLog4jLogger.java  |   6 +-
 .../logger/log4j/IgniteLog4jNodeIdFilePath.java |   6 +-
 .../http/jetty/GridJettyRestProtocol.java       |  16 +-
 .../processors/schedule/ScheduleFutureImpl.java |   4 +-
 .../java/org/apache/ignite/IgniteSpring.java    |   2 +-
 .../ignite/cache/spring/SpringCacheManager.java |   2 +-
 .../spring/IgniteSpringProcessorImpl.java       |  10 +-
 .../ignite/internal/GridFactorySelfTest.java    |   2 +-
 .../util/nodestart/GridNodeCallableImpl.java    |  10 +-
 .../internal/GridNodeStartUtilsSelfTest.java    |   6 +-
 .../GridProjectionStartStopRestartSelfTest.java |   4 +-
 .../optimized/OptimizedClassNamesGenerator.java |  12 +-
 .../spi/deployment/uri/UriDeploymentSpi.java    |   8 +-
 .../file/GridFileDeploymentSelfTest.java        |   4 +-
 .../scala/org/apache/ignite/visor/Packet.scala  |   2 +-
 .../ignite/visor/commands/deploy/Packet.scala   |   4 +-
 .../commands/deploy/VisorDeployCommand.scala    |  18 +-
 .../ignite/visor/commands/start/Packet.scala    |   2 +-
 .../commands/start/VisorStartCommand.scala      |   4 +-
 .../scala/org/apache/ignite/visor/visor.scala   |  14 +-
 .../testsuites/VisorConsoleSelfTestSuite.scala  |   2 +-
 .../cache/websession/GridWebSessionFilter.java  |  22 +--
 .../IgniteServletContextListenerStartup.java    |  18 +-
 .../startup/servlet/IgniteServletStartup.java   |   6 +-
 .../internal/websession/WebSessionSelfTest.java |   8 +-
 .../websession/WebSessionServerStart.java       |   2 +-
 pom.xml                                         |  10 +-
 223 files changed, 883 insertions(+), 896 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/115f5979/config/ignite-log4j.xml
----------------------------------------------------------------------
diff --cc config/ignite-log4j.xml
index d8fefb7,0000000..3f171bf
mode 100644,000000..100644
--- a/config/ignite-log4j.xml
+++ b/config/ignite-log4j.xml
@@@ -1,152 -1,0 +1,152 @@@
 +<?xml version="1.0" encoding="UTF-8"?>
 +
 +<!--
 +  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.
 +  -->
 +
 +<!DOCTYPE log4j:configuration PUBLIC "-//APACHE//DTD LOG4J 1.2//EN"
 +    "http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/xml/doc-files/log4j.dtd">
 +
 +<!--
 +    Default log4j configuration for GridGain.
 +-->
 +<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
 +    <!--
 +        Logs System.out messages to console.
 +
 +        Note, this appender is disabled by default.
 +        To enable, uncomment the section below and also CONSOLE appender in the <root> element.
 +    -->
 +    <!--
 +    <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
 +        <param name="Target" value="System.out"/>
 +
 +        <param name="Threshold" value="DEBUG"/>
 +
 +        <layout class="org.apache.log4j.PatternLayout">
 +            <param name="ConversionPattern" value="[%d{ABSOLUTE}][%-5p][%t][%c{1}] %m%n"/>
 +        </layout>
 +
 +        <filter class="org.apache.log4j.varia.LevelRangeFilter">
 +            <param name="levelMin" value="DEBUG"/>
 +            <param name="levelMax" value="WARN"/>
 +        </filter>
 +    </appender>
 +    -->
 +
 +    <!--
 +        Logs all ERROR messages to console.
 +    -->
 +    <appender name="CONSOLE_ERR" class="org.apache.log4j.ConsoleAppender">
 +        <!-- Log to STDERR. -->
 +        <param name="Target" value="System.err"/>
 +
 +        <!-- Log from ERROR and higher (change to WARN if needed). -->
 +        <param name="Threshold" value="ERROR"/>
 +
 +        <!-- The default pattern: Date Priority [Category] Message\n -->
 +        <layout class="org.apache.log4j.PatternLayout">
 +            <param name="ConversionPattern" value="[%d{ABSOLUTE}][%-5p][%t][%c{1}] %m%n"/>
 +        </layout>
 +    </appender>
 +
 +    <!--
 +        Logs all output to specified file.
-         By default, the logging goes to GRIDGAIN_HOME/work/log folder
++        By default, the logging goes to IGNITE_HOME/work/log folder
 +    -->
 +    <appender name="FILE" class="org.gridgain.grid.logger.log4j.GridLog4jRollingFileAppender">
 +        <param name="Threshold" value="DEBUG"/>
-         <param name="File" value="${GRIDGAIN_HOME}/work/log/ignite.log"/>
++        <param name="File" value="${IGNITE_HOME}/work/log/ignite.log"/>
 +        <param name="Append" value="true"/>
 +        <param name="MaxFileSize" value="10MB"/>
 +        <param name="MaxBackupIndex" value="10"/>
 +        <layout class="org.apache.log4j.PatternLayout">
 +            <param name="ConversionPattern" value="[%d{ABSOLUTE}][%-5p][%t][%c{1}] %m%n"/>
 +        </layout>
 +    </appender>
 +
 +    <!--
 +    <category name="org.gridgain">
 +        <level value="DEBUG"/>
 +    </category>
 +    -->
 +
 +    <!--
 +        Uncomment this category to enable cache
 +        query execution tracing.
 +    -->
 +    <!--
 +    <category name="org.gridgain.cache.queries">
 +        <level value="DEBUG"/>
 +    </category>
 +    -->
 +
 +    <!--
 +        Uncomment to enable DGC tracing.
 +    -->
 +    <!--
 +    <category name="org.gridgain.grid.kernal.processors.cache.GridCacheDgcManager.trace">
 +        <level value="DEBUG"/>
 +    </category>
 +    -->
 +
 +    <!--
 +        Uncomment to disable courtesy notices, such as SPI configuration
 +        consistency warnings.
 +    -->
 +    <!--
 +    <category name="org.gridgain.grid.CourtesyConfigNotice">
 +        <level value="OFF"/>
 +    </category>
 +    -->
 +
 +    <category name="org.springframework">
 +        <level value="WARN"/>
 +    </category>
 +
 +    <category name="org.eclipse.jetty">
 +        <level value="WARN"/>
 +    </category>
 +
 +    <!--
 +        Avoid warnings about failed bind attempt when multiple nodes running on the same host.
 +    -->
 +    <category name="org.eclipse.jetty.util.log">
 +        <level value="ERROR"/>
 +    </category>
 +
 +    <category name="org.eclipse.jetty.util.component">
 +        <level value="ERROR"/>
 +    </category>
 +
 +    <category name="com.amazonaws">
 +        <level value="WARN"/>
 +    </category>
 +
 +    <!-- Default settings. -->
 +    <root>
 +        <!-- Print out all info by default. -->
 +        <level value="INFO"/>
 +
 +        <!-- Uncomment to enable logging to console. -->
 +        <!--
 +        <appender-ref ref="CONSOLE"/>
 +        -->
 +
 +        <appender-ref ref="CONSOLE_ERR"/>
 +        <appender-ref ref="FILE"/>
 +    </root>
 +</log4j:configuration>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/115f5979/config/java.util.logging.properties
----------------------------------------------------------------------
diff --cc config/java.util.logging.properties
index 19dddb4,3e11d63..f30e028
--- a/config/java.util.logging.properties
+++ b/config/java.util.logging.properties
@@@ -64,11 -64,11 +64,11 @@@ java.util.logging.ConsoleHandler.format
  java.util.logging.ConsoleHandler.level=INFO
  
  #
 -# File handler logs all messages into files with pattern `gridgain-%{id8}.%g.log`
 +# File handler logs all messages into files with pattern `ignite-%{id8}.%g.log`
- # under `$GRIDGAIN_HOME/work/log/` directory. The placeholder `%{id8}` is a truncated node ID.
+ # under `$IGNITE_HOME/work/log/` directory. The placeholder `%{id8}` is a truncated node ID.
  #
 -org.gridgain.grid.logger.java.GridJavaLoggerFileHandler.formatter=org.apache.ignite.logger.java.IgniteJavaLoggerFormatter
 -org.gridgain.grid.logger.java.GridJavaLoggerFileHandler.pattern=gridgain-%{id8}.%g.log
 -org.gridgain.grid.logger.java.GridJavaLoggerFileHandler.level=INFO
 -org.gridgain.grid.logger.java.GridJavaLoggerFileHandler.limit=10485760
 -org.gridgain.grid.logger.java.GridJavaLoggerFileHandler.count=10
 +org.apache.ignite.logger.java.IgniteJavaLoggerFileHandler.formatter=org.apache.ignite.logger.java.IgniteJavaLoggerFormatter
 +org.apache.ignite.logger.java.IgniteJavaLoggerFileHandler.pattern=ignite-%{id8}.%g.log
 +org.apache.ignite.logger.java.IgniteJavaLoggerFileHandler.level=INFO
 +org.apache.ignite.logger.java.IgniteJavaLoggerFileHandler.limit=10485760
 +org.apache.ignite.logger.java.IgniteJavaLoggerFileHandler.count=10

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/115f5979/examples/config/servlet/WEB-INF/web.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/115f5979/modules/clients/src/test/java/org/apache/ignite/client/integration/ClientAbstractSelfTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/115f5979/modules/core/src/main/java/org/apache/ignite/IgniteLogger.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/115f5979/modules/core/src/main/java/org/apache/ignite/Ignition.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/115f5979/modules/core/src/main/java/org/apache/ignite/client/router/impl/GridRouterCommandLineStartup.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/115f5979/modules/core/src/main/java/org/apache/ignite/compute/gridify/GridifySetToSet.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/115f5979/modules/core/src/main/java/org/apache/ignite/compute/gridify/GridifySetToValue.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/115f5979/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/115f5979/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/115f5979/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/115f5979/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/log/GridLogCommandHandler.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/115f5979/modules/core/src/main/java/org/apache/ignite/logger/java/IgniteJavaLoggerFileHandler.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/115f5979/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/115f5979/modules/core/src/test/config/log4j-test.xml
----------------------------------------------------------------------
diff --cc modules/core/src/test/config/log4j-test.xml
index 0f29c37,a1332f3..984e973
--- a/modules/core/src/test/config/log4j-test.xml
+++ b/modules/core/src/test/config/log4j-test.xml
@@@ -66,7 -66,7 +66,7 @@@
      -->
      <appender name="FILE" class="org.apache.log4j.RollingFileAppender">
          <param name="Threshold" value="DEBUG"/>
-         <param name="File" value="${GRIDGAIN_HOME}/work/log/ignite.log"/>
 -        <param name="File" value="${IGNITE_HOME}/work/log/gridgain.log"/>
++        <param name="File" value="${IGNITE_HOME}/work/log/ignite.log"/>
          <param name="Append" value="true"/>
          <param name="MaxFileSize" value="10MB"/>
          <param name="MaxBackupIndex" value="10"/>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/115f5979/modules/core/src/test/java/org/apache/ignite/startup/GridRandomCommandLineLoader.java
----------------------------------------------------------------------
diff --cc modules/core/src/test/java/org/apache/ignite/startup/GridRandomCommandLineLoader.java
index d959f55,aa5808e..f8629d6
--- a/modules/core/src/test/java/org/apache/ignite/startup/GridRandomCommandLineLoader.java
+++ b/modules/core/src/test/java/org/apache/ignite/startup/GridRandomCommandLineLoader.java
@@@ -47,10 -47,10 +47,10 @@@ import static org.apache.ignite.IgniteS
   */
  public final class GridRandomCommandLineLoader {
      /** Name of the system property defining name of command line program. */
-     private static final String GRIDGAIN_PROG_NAME = "GRIDGAIN_PROG_NAME";
+     private static final String IGNITE_PROG_NAME = "IGNITE_PROG_NAME";
  
      /** Copyright text. Ant processed. */
 -    private static final String COPYRIGHT = "Copyright (C) 2014 GridGain Systems.";
 +    private static final String COPYRIGHT = "2015 Copyright(C) Apache Software Foundation.";
  
      /** Version. Ant processed. */
      private static final String VER = "x.x.x";

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/115f5979/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/115f5979/modules/core/src/test/java/org/apache/ignite/testframework/junits/logger/GridLog4jRollingFileAppender.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/115f5979/modules/core/src/test/java/org/apache/ignite/testframework/junits/logger/GridTestLog4jLogger.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/115f5979/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/115f5979/modules/log4j/src/main/java/org/apache/ignite/logger/log4j/IgniteLog4jLogger.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/115f5979/modules/log4j/src/main/java/org/apache/ignite/logger/log4j/IgniteLog4jNodeIdFilePath.java
----------------------------------------------------------------------
diff --cc modules/log4j/src/main/java/org/apache/ignite/logger/log4j/IgniteLog4jNodeIdFilePath.java
index 63945a0,a12bf5e..4423ace
--- a/modules/log4j/src/main/java/org/apache/ignite/logger/log4j/IgniteLog4jNodeIdFilePath.java
+++ b/modules/log4j/src/main/java/org/apache/ignite/logger/log4j/IgniteLog4jNodeIdFilePath.java
@@@ -46,10 -46,10 +46,10 @@@ class IgniteLog4jNodeIdFilePath impleme
  
      /** {@inheritDoc} */
      @Override public String apply(String oldPath) {
-         if (!F.isEmpty(U.GRIDGAIN_LOG_DIR))
-             return U.nodeIdLogFileName(nodeId, new File(U.GRIDGAIN_LOG_DIR, "ignite.log").getAbsolutePath());
+         if (!F.isEmpty(U.IGNITE_LOG_DIR))
 -            return U.nodeIdLogFileName(nodeId, new File(U.IGNITE_LOG_DIR, "gridgain.log").getAbsolutePath());
++            return U.nodeIdLogFileName(nodeId, new File(U.IGNITE_LOG_DIR, "ignite.log").getAbsolutePath());
  
-         if (oldPath != null) // fileName could be null if GRIDGAIN_HOME is not defined.
+         if (oldPath != null) // fileName could be null if IGNITE_HOME is not defined.
              return U.nodeIdLogFileName(nodeId, oldPath);
  
          String tmpDir = IgniteSystemProperties.getString("java.io.tmpdir");

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/115f5979/modules/spring/src/main/java/org/apache/ignite/cache/spring/SpringCacheManager.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/115f5979/modules/ssh/src/main/java/org/apache/ignite/internal/util/nodestart/GridNodeCallableImpl.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/115f5979/modules/tools/src/main/java/org/apache/ignite/tools/marshaller/optimized/OptimizedClassNamesGenerator.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/115f5979/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/UriDeploymentSpi.java
----------------------------------------------------------------------
diff --cc modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/UriDeploymentSpi.java
index e25752b,0000000..7c72243
mode 100644,000000..100644
--- a/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/UriDeploymentSpi.java
+++ b/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/UriDeploymentSpi.java
@@@ -1,1367 -1,0 +1,1367 @@@
 +/*
 + * 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.spi.deployment.uri;
 +
 +import org.apache.ignite.*;
 +import org.apache.ignite.compute.*;
 +import org.apache.ignite.lang.*;
 +import org.apache.ignite.resources.*;
 +import org.apache.ignite.spi.*;
 +import org.apache.ignite.spi.deployment.*;
 +import org.apache.ignite.spi.deployment.uri.scanners.*;
 +import org.apache.ignite.spi.deployment.uri.scanners.file.*;
 +import org.apache.ignite.spi.deployment.uri.scanners.ftp.*;
 +import org.apache.ignite.spi.deployment.uri.scanners.http.*;
 +import org.apache.ignite.internal.util.typedef.*;
 +import org.apache.ignite.internal.util.typedef.internal.*;
 +import org.jetbrains.annotations.*;
 +
 +import java.io.*;
 +import java.net.*;
 +import java.util.*;
 +import java.util.Map.*;
 +
 +/**
 + * Implementation of {@link org.apache.ignite.spi.deployment.DeploymentSpi} which can deploy tasks from
 + * different sources like file system folders, FTP, email and HTTP.
 + * There are different ways to deploy tasks in grid and every deploy method
 + * depends on selected source protocol. This SPI is configured to work
 + * with a list of URI's. Every URI contains all data about protocol/transport
 + * plus configuration parameters like credentials, scan frequency, and others.
 + * <p>
 + * When SPI establishes a connection with an URI, it downloads deployable units
 + * to the temporary directory in order to prevent it from any changes while
 + * scanning. Use method {@link #setTemporaryDirectoryPath(String) setTemporaryDirectoryPath(String)})
 + * to set custom temporary folder for downloaded deployment units. SPI will
 + * create folder under the path with name identical to local node ID.
 + * <p>
 + * SPI tracks all changes of every given URI. This means that if any file is
 + * changed or deleted, SPI will re-deploy or delete corresponding tasks.
 + * Note that the very first apply to {@link #findResource(String)} findClassLoader(String)}
 + * is blocked until SPI finishes scanning all URI's at least once.
 + * <p>
 + * There are several deployable unit types supported:
 + * <ul>
 + * <li>GAR file.</li>
 + * <li>Local disk folder with structure of unpacked GAR file.</li>
 + * <li>Local disk folder containing only compiled Java classes.</li>
 + * </ul>
 + * <h1 class="header">GAR file</h1>
 + * GAR file is a deployable unit. GAR file is based on <a href="http://www.gzip.org/zlib/">ZLIB</a>
 + * compression format like simple JAR file and its structure is similar to WAR archive.
 + * GAR file has {@code '.gar'} extension.
 + * <p>
 + * GAR file structure (file or directory ending with {@code '.gar'}):
 + *   <pre class="snippet">
 + *      META-INF/
 + *              |
 + *               - gridgain.xml
 + *               - ...
 + *      lib/
 + *         |
 + *          -some-lib.jar
 + *          - ...
 + *      xyz.class
 + *      ...</pre>
 + * <ul>
 + * <li>
 + * {@code META-INF/} entry may contain {@code gridgain.xml} file which is a
 + * task descriptor file. The purpose of task descriptor XML file is to specify
 + * all tasks to be deployed. This file is a regular
 + * <a href="http://www.springframework.org/documentation">Spring</a> XML
 + * definition file.  {@code META-INF/} entry may also contain any other file
 + * specified by JAR format.
 + * </li>
 + * <li>
 + * {@code lib/} entry contains all library dependencies.
 + * </li>
 + * <li>Compiled Java classes must be placed in the root of a GAR file.</li>
 + * </ul>
 + * GAR file may be deployed without descriptor file. If there is no descriptor file, SPI
 + * will scan all classes in archive and instantiate those that implement
 + * {@link org.apache.ignite.compute.ComputeTask} interface. In that case, all grid task classes must have a
 + * public no-argument constructor. Use {@link org.apache.ignite.compute.ComputeTaskAdapter} adapter for
 + * convenience when creating grid tasks.
 + * <p>
 + * By default, all downloaded GAR files that have digital signature in {@code META-INF}
 + * folder will be verified and deployed only if signature is valid.
 + * <p>
 + * <h1 class="header">URI</h1>
 + * This SPI uses a hierarchical URI definition. For more information about standard URI
 + * syntax refer to {@link URI java.net.URI} documentation.
 + * <blockquote class="snippet">
 + * [<i>scheme</i><tt><b>:</b></tt>][<tt><b>//</b></tt><i>authority</i>][<i>path</i>][<tt><b>?</b></tt><i>query</i>][<tt><b>#</b></tt><i>fragment</i>]
 + * </blockquote>
 + * <p>
 + * Every URI defines its own deployment repository which will be scanned for any changes.
 + * URI itself has all information about protocol, connectivity, scan intervals and other
 + * parameters.
 + * <p>
 + * URI's may contain special characters, like spaces. If {@code encodeUri}
 + * flag is set to {@code true} (see {@link #setEncodeUri(boolean)}), then
 + * URI 'path' field will be automatically encoded. By default this flag is
 + * set to {@code true}.
 + * <p>
 + * <h1 class="header">Configuration</h1>
 + * {@code UriDeploymentSpi} has the following optional configuration
 + * parameters (there are no mandatory parameters):
 + * <ul>
 + * <li>
 + * Temporary directory path where scanned GAR files and directories are
 + * copied to (see {@link #setTemporaryDirectoryPath(String) setTemporaryDirectoryPath(String)}).
 + * </li>
 + * <li>
 + * List of URIs to scan (see {@link #setUriList(List)}). If not
 + * specified, then URI specified by {@link #DFLT_DEPLOY_DIR DFLT_DEPLOY_DIR} is used.
 + * </li>
 + * <li>
 + * Flag to control encoding of the {@code 'path'} portion of URI
 + * (see {@link #setEncodeUri(boolean) setEncodeUri(boolean)}).
 + * </li>
 + * </ul>
 + * <h1 class="header">Protocols</h1>
 + * Following protocols are supported in SPI:
 + * <ul>
 + * <li><a href="#file">file://</a> - File protocol</li>
 + * <li><a href="#classes">classes://</a> - Custom File protocol.</li>
 + * <li><a href="#ftp">ftp://</a> - File transfer protocol</li>
 + * <li><a href="#http">http://</a> - HTTP protocol</li>
 + * <li><a href="#http">https://</a> - Secure HTTP protocol</li>
 + * </ul>
 + * In addition to SPI configuration parameters, all necessary configuration
 + * parameters for selected URI should be defined in URI. Different protocols
 + * have different configuration parameters described below. Parameters are
 + * separated by '{@code ;}' character.
 + * <p>
 + * <a name="file"></a>
 + * <h1 class="header">File</h1>
 + * For this protocol SPI will scan folder specified by URI on file system and
 + * download any GAR files or directories that end with .gar from source
 + * directory defined in URI. For file system URI must have scheme equal to {@code file}.
 + * <p>
 + * Following parameters are supported for FILE protocol:
 + * <table class="doctable">
 + *  <tr>
 + *      <th>Parameter</th>
 + *      <th>Description</th>
 + *      <th>Optional</th>
 + *      <th>Default</th>
 + *  </tr>
 + *  <tr>
 + *      <td>freq</td>
 + *      <td>File directory scan frequency in milliseconds.</td>
 + *      <td>Yes</td>
 + *      <td>{@code 5000} ms specified in {@link #DFLT_DISK_SCAN_FREQUENCY DFLT_DISK_SCAN_FREQUENCY}.</td>
 + *  </tr>
 + * </table>
 + * <h2 class="header">File URI Example</h2>
 + * The following example will scan {@code 'c:/Program files/gridgain/deployment'}
 + * folder on local box every {@code '5000'} milliseconds. Note that since path
 + * has spaces, {@link #setEncodeUri(boolean) setEncodeUri(boolean)} parameter must
 + * be set to {@code true} (which is default behavior).
 + * <blockquote class="snippet">
 + * {@code file://freq=5000@localhost/c:/Program files/gridgain/deployment}
 + * </blockquote>
 + * <a name="classes"></a>
 + * <h1 class="header">Classes</h1>
 + * For this protocol SPI will scan folder specified by URI on file system
 + * looking for compiled classes that implement {@link org.apache.ignite.compute.ComputeTask} interface.
 + * This protocol comes very handy during development, as it allows developer
 + * to specify IDE compilation output folder as URI and all task classes
 + * in that folder will be deployed automatically.
 + * <p>
 + * Following parameters are supported for CLASSES protocol:
 + * <table class="doctable">
 + *  <tr>
 + *      <th>Parameter</th>
 + *      <th>Description</th>
 + *      <th>Optional</th>
 + *      <th>Default</th>
 + *  </tr>
 + *  <tr>
 + *      <td>freq</td>
 + *      <td>File directory scan frequency in milliseconds.</td>
 + *      <td>Yes</td>
 + *      <td>{@code 5000} ms specified in {@link #DFLT_DISK_SCAN_FREQUENCY DFLT_DISK_SCAN_FREQUENCY}.</td>
 + *  </tr>
 + * </table>
 + * <h2 class="header">Classes URI Example</h2>
 + * The following example will scan {@code 'c:/Program files/gridgain/deployment'}
 + * folder on local box every {@code '5000'} milliseconds. Note that since path
 + * has spaces, {@link #setEncodeUri(boolean) setEncodeUri(boolean)} parameter must
 + * be set to {@code true} (which is default behavior).
 + * <blockquote class="snippet">
 + * {@code classes://freq=5000@localhost/c:/Program files/gridgain/deployment}
 + * </blockquote>
 + * <a name="ftp"></a>
 + * <h1 class="header">FTP</h1>
 + * For FTP protocol SPI will scan and download only GAR files from source
 + * directory defined in URI. SPI doesn't scan FTP folders recursively.
 + * The following parameters are supported for FTP protocol:
 + * <table class="doctable">
 + *  <tr>
 + *      <th>Parameter</th>
 + *      <th>Description</th>
 + *      <th>Optional</th>
 + *      <th>Default</th>
 + *  </tr>
 + *  <tr>
 + *      <td>freq</td>
 + *      <td>FTP location scan frequency in milliseconds.</td>
 + *      <td>Yes</td>
 + *      <td>{@code 300000} ms specified in {@link #DFLT_FTP_SCAN_FREQUENCY DFLT_FTP_SCAN_FREQUENCY}.</td>
 + *  </tr>
 + *  <tr>
 + *      <td>username:password</td>
 + *      <td>
 + *          FTP username and password specified in standard URI server-based
 + *          authority format.
 + *      </td>
 + *      <td>No</td>
 + *      <td>---</td>
 + *  </tr>
 + * </table>
 + * <h2 class="header">FTP URI Example</h2>
 + * Here is an example of an FTP URI that connects identified as
 + * {@code username:password} to {@code 'localhost'} on port {@code '21'},
 + * with initial path set to {@code 'gridgain/deployment'}
 + * <blockquote class="snippet">
 + * ftp://username:password;freq=10000@localhost:21/gridgain/deployment
 + * </blockquote>
 + * <p>
 + * <h2 class="header">HTTP URI Example</h2>
 + * The following example will scan {@code 'gridgain/deployment'} folder with
 + * on site {@code 'www.mysite.com'} using authentication
 + * {@code 'username:password'} every {@code '10000'} milliseconds.
 + * <blockquote class="snippet">
 + * {@code http://username:password;freq=10000@www.mysite.com:110/gridgain/deployment}
 + * </blockquote>
 + * <h2 class="header">Java Example</h2>
 + * UriDeploymentSpi needs to be explicitly configured to override default local deployment SPI.
 + * <pre name="code" class="java">
 + * UriDeploymentSpi deploySpi = new UriDeploymentSpi();
 + *
 + * GridConfiguration cfg = new GridConfiguration();
 + *
 + * List&lt;String&gt; uris = new ArrayList&lt;String&gt;(5);
 + *
 + * uris.add("http://www.site.com/tasks");
 + * uris.add("ftp://ftpuser:password;freq=10000@localhost:21/gg-test/deployment");
 + * uris.add("file://freq=20000@localhost/c:/Program files/gg-deployment");
 + * uris.add("classes:///c:/Java_Projects/myproject/out");
 + *
 + * // Set URIs.
 + * deploySpi.setUriList(uris);
 + *
 + * // Override temporary directory path.
 + * deploySpi.setTemporaryDirectoryPath("c:/tmp/grid");
 + *
 + * //  Override default deployment SPI.
 + * cfg.setDeploymentSpi(deploySpi);
 + *
 + * //  Start grid.
 + * G.start(cfg);
 + * </pre>
 + * <p>
 + * <h2 class="header">Spring Example</h2>
 + * UriDeploymentSpi can be configured from Spring XML configuration file:
 + * <pre name="code" class="xml">
 + * &lt;bean id="grid.custom.cfg" class="org.gridgain.grid.GridConfiguration" singleton="true"&gt;
 + *         ...
 + *         &lt;property name="deploymentSpi"&gt;
 + *             &lt;bean class="org.gridgain.grid.spi.deployment.uri.UriDeploymentSpi"&gt;
 + *                 &lt;property name="temporaryDirectoryPath" value="c:/tmp/grid"/&gt;
 + *                 &lt;property name="uriList"&gt;
 + *                     &lt;list&gt;
 + *                         &lt;value&gt;http://www.site.com/tasks&lt;/value&gt;
 + *                         &lt;value&gt;ftp://ftpuser:password;freq=10000@localhost:21/gg-test/deployment&lt;/value&gt;
 + *                         &lt;value&gt;file://freq=20000@localhost/c:/Program files/gg-deployment&lt;/value&gt;
 + *                         &lt;value&gt;classes:///c:/Java_Projects/myproject/out&lt;/value&gt;
 + *                     &lt;/list&gt;
 + *                 &lt;/property&gt;
 + *             &lt;/bean&gt;
 + *         &lt;/property&gt;
 + *         ...
 + * &lt;/bean&gt;
 + * </pre>
 + * <p>
 + * <img src="http://www.gridgain.com/images/spring-small.png">
 + * <br>
 + * For information about Spring framework visit <a href="http://www.springframework.org/">www.springframework.org</a>
 + * @see org.apache.ignite.spi.deployment.DeploymentSpi
 + */
 +@IgniteSpiMultipleInstancesSupport(true)
 +@IgniteSpiConsistencyChecked(optional = false)
 +@SuppressWarnings({"FieldAccessedSynchronizedAndUnsynchronized"})
 +public class UriDeploymentSpi extends IgniteSpiAdapter implements DeploymentSpi, UriDeploymentSpiMBean {
 +    /**
 +     * Default deployment directory where SPI will pick up GAR files. Note that this path is relative to
-      * {@code GRIDGAIN_HOME/work} folder if {@code GRIDGAIN_HOME} system or environment variable specified,
++     * {@code IGNITE_HOME/work} folder if {@code IGNITE_HOME} system or environment variable specified,
 +     * otherwise it is relative to {@code work} folder under system {@code java.io.tmpdir} folder.
 +     *
 +     * @see org.apache.ignite.configuration.IgniteConfiguration#getWorkDirectory()
 +     */
 +    public static final String DFLT_DEPLOY_DIR = "deployment/file";
 +
 +    /** Default scan frequency for {@code file://} and {@code classes://} protocols (value is {@code 5000}). */
 +    public static final int DFLT_DISK_SCAN_FREQUENCY = 5000;
 +
 +    /** Default scan frequency for {@code ftp://} protocol (value is {@code 300000}). */
 +    public static final int DFLT_FTP_SCAN_FREQUENCY = 300000;
 +
 +    /** Default scan frequency for {@code http://} protocol (value is {@code 300000}). */
 +    public static final int DFLT_HTTP_SCAN_FREQUENCY = 300000;
 +
 +    /** Default task description file path and name (value is {@code META-INF/gridgain.xml}). */
 +    public static final String XML_DESCRIPTOR_PATH = "META-INF/gridgain.xml";
 +
 +    /**
 +     * Default temporary directory name relative to file path
 +     * {@link #setTemporaryDirectoryPath(String)}} (value is {@code gg.uri.deployment.tmp}).
 +     */
 +    public static final String DEPLOY_TMP_ROOT_NAME = "gg.uri.deployment.tmp";
 +
 +    /** Temporary directory name. */
 +    private String tmpDirPath;
 +
 +    /** Sub-folder of 'tmpDirPath'. */
 +    private String deployTmpDirPath;
 +
 +    /** List of URIs to be scanned. */
 +    private List<String> uriList = new ArrayList<>();
 +
 +    /** List of encoded URIs. */
 +    private Collection<URI> uriEncodedList = new ArrayList<>();
 +
 +    /** Indicates whether md5 digest should be checked by this SPI before file deployment. */
 +    private boolean checkMd5;
 +
 +    /** */
 +    @SuppressWarnings({"CollectionDeclaredAsConcreteClass"})
 +    private final LinkedList<GridUriDeploymentUnitDescriptor> unitLoaders =
 +        new LinkedList<>();
 +
 +    /** */
 +    @SuppressWarnings({"TypeMayBeWeakened"})
 +    private final LastTimeUnitDescriptorComparator unitComp = new LastTimeUnitDescriptorComparator();
 +
 +    /** List of scanners. Every URI has it's own scanner. */
 +    private final Collection<GridUriDeploymentScanner> scanners = new ArrayList<>();
 +
 +    /** Whether URIs should be encoded or not. */
 +    private boolean encodeUri = true;
 +
 +    /** Whether first scan cycle is completed or not. */
 +    private int firstScanCntr;
 +
 +    /** Deployment listener which processes all notifications from scanners. */
 +    private volatile DeploymentListener lsnr;
 +
 +    /** */
 +    private final Object mux = new Object();
 +
 +    /** */
 +    @IgniteLoggerResource
 +    private IgniteLogger log;
 +
 +    /** NOTE: flag for test purposes only. */
 +    @SuppressWarnings("UnusedDeclaration")
 +    private boolean delayOnNewOrUpdatedFile;
 +
 +    /**
 +     * Sets absolute path to temporary directory which will be used by
 +     * deployment SPI to keep all deployed classes in.
 +     * <p>
 +     * If not provided, default value is {@code java.io.tmpdir} system property value.
 +     *
 +     * @param tmpDirPath Temporary directory path.
 +     */
 +    @IgniteSpiConfiguration(optional = true)
 +    public void setTemporaryDirectoryPath(String tmpDirPath) {
 +        this.tmpDirPath = tmpDirPath;
 +    }
 +
 +    /**
 +     * Sets list of URI which point to GAR file and which should be
 +     * scanned by SPI for the new tasks.
 +     * <p>
 +     * If not provided, default value is list with
-      * {@code file://${GRIDGAIN_HOME}/work/deployment/file} element.
-      * Note that system property {@code GRIDGAIN_HOME} must be set.
-      * For unknown {@code GRIDGAIN_HOME} list of URI must be provided explicitly.
++     * {@code file://${IGNITE_HOME}/work/deployment/file} element.
++     * Note that system property {@code IGNITE_HOME} must be set.
++     * For unknown {@code IGNITE_HOME} list of URI must be provided explicitly.
 +     *
 +     * @param uriList GAR file URIs.
 +     */
 +    @IgniteSpiConfiguration(optional = true)
 +    public void setUriList(List<String> uriList) {
 +        this.uriList = uriList;
 +    }
 +
 +    /**
 +     * If set to {@code true} then SPI should exclude files with same md5s from deployment.
 +     * Otherwise it should try to load new unit regardless to possible file duplication.
 +     *
 +     * @param checkMd5 new value for the property
 +     */
 +    @IgniteSpiConfiguration(optional = true)
 +    public void setCheckMd5(boolean checkMd5) {
 +        this.checkMd5 = checkMd5;
 +    }
 +
 +    /**
 +     * Gets {@code checkMd5} property.
 +     *
 +     * @return value of the {@code checkMd5} property.
 +     */
 +    @Override public boolean isCheckMd5() {
 +        return checkMd5;
 +    }
 +
 +    /**
 +     * Indicates that URI must be encoded before usage. Encoding means replacing
 +     * all occurrences of space with '%20', percent sign with '%25'
 +     * and semicolon with '%3B'.
 +     * <p>
 +     * If not provided, default value is {@code true}.
 +     *
 +     * @param encodeUri {@code true} if every URI should be encoded and
 +     *      {@code false} otherwise.
 +     */
 +    @IgniteSpiConfiguration(optional = true)
 +    public void setEncodeUri(boolean encodeUri) {
 +        this.encodeUri = encodeUri;
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public String getTemporaryDirectoryPath() {
 +        return tmpDirPath;
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public List<String> getUriList() {
 +        return Collections.unmodifiableList(uriList);
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public void setListener(@Nullable DeploymentListener lsnr) {
 +        this.lsnr = lsnr;
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public void spiStop() throws IgniteSpiException {
 +        for (GridUriDeploymentScanner scanner : scanners)
 +            scanner.cancel();
 +
 +        for (GridUriDeploymentScanner scanner : scanners)
 +            scanner.join();
 +
 +        // Clear inner collections.
 +        uriEncodedList.clear();
 +        scanners.clear();
 +
 +        List<ClassLoader> tmpClsLdrs;
 +
 +        // Release all class loaders.
 +        synchronized (mux) {
 +            tmpClsLdrs = new ArrayList<>(unitLoaders.size());
 +
 +            for (GridUriDeploymentUnitDescriptor desc : unitLoaders)
 +                tmpClsLdrs.add(desc.getClassLoader());
 +        }
 +
 +        for (ClassLoader ldr : tmpClsLdrs)
 +            onUnitReleased(ldr);
 +
 +        // Delete temp directory.
 +        if (deployTmpDirPath != null)
 +            U.delete(new File(deployTmpDirPath));
 +
 +        unregisterMBean();
 +
 +        // Ack ok stop.
 +        if (log.isDebugEnabled())
 +            log.debug(stopInfo());
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public void spiStart(String gridName) throws IgniteSpiException {
 +        // Start SPI start stopwatch.
 +        startStopwatch();
 +
 +        assertParameter(uriList != null, "uriList != null");
 +
 +        initializeUriList();
 +
 +        if (uriEncodedList.isEmpty())
 +            addDefaultUri();
 +
 +        initializeTemporaryDirectoryPath();
 +
 +        registerMBean(gridName, this, UriDeploymentSpiMBean.class);
 +
 +        FilenameFilter filter = new FilenameFilter() {
 +            @Override public boolean accept(File dir, String name) {
 +                assert name != null;
 +
 +                return name.toLowerCase().endsWith(".gar");
 +            }
 +        };
 +
 +        firstScanCntr = 0;
 +
 +        GridUriDeploymentScannerListener lsnr = new GridUriDeploymentScannerListener() {
 +            @Override public void onNewOrUpdatedFile(File file, String uri, long tstamp) {
 +                if (log.isInfoEnabled())
 +                    log.info("Found new or updated GAR units [uri=" + U.hidePassword(uri) +
 +                        ", file=" + file.getAbsolutePath() + ", tstamp=" + tstamp + ']');
 +
 +                if (delayOnNewOrUpdatedFile) {
 +                    U.warn(log, "Delaying onNewOrUpdatedFile() by 10000 ms since 'delayOnNewOrUpdatedFile' " +
 +                        "is set to true (is this intentional?).");
 +
 +                    try {
 +                        U.sleep(10000);
 +                    }
 +                    catch (IgniteInterruptedException ignored) {
 +                        // No-op
 +                    }
 +
 +                    U.warn(log, "Delay finished.");
 +                }
 +
 +                try {
 +                    GridUriDeploymentFileProcessorResult fileRes = GridUriDeploymentFileProcessor.processFile(file, uri,
 +                        new File(deployTmpDirPath), log);
 +
 +                    if (fileRes != null)
 +                        newUnitReceived(uri, fileRes.getFile(), tstamp, fileRes.getClassLoader(),
 +                            fileRes.getTaskClasses(), fileRes.getMd5());
 +                }
 +                catch (IgniteSpiException e) {
 +                    U.error(log, "Error when processing file: " + file.getAbsolutePath(), e);
 +                }
 +            }
 +
 +            /** {@inheritDoc} */
 +            @Override public void onDeletedFiles(List<String> uris) {
 +                if (log.isInfoEnabled()) {
 +                    List<String> uriList = null;
 +
 +                    if (uris != null) {
 +                        uriList = new ArrayList<>();
 +
 +                        for (String uri : uris)
 +                            uriList.add(U.hidePassword(uri));
 +                    }
 +
 +                    log.info("Found deleted GAR units [uris=" + uriList + ']');
 +                }
 +
 +                processDeletedFiles(uris);
 +            }
 +
 +            /** {@inheritDoc} */
 +            @Override public void onFirstScanFinished() {
 +                synchronized (mux) {
 +                    firstScanCntr++;
 +
 +                    if (isFirstScanFinished(firstScanCntr))
 +                        mux.notifyAll();
 +                }
 +            }
 +        };
 +
 +        for (URI uri : uriEncodedList) {
 +            String proto = uri.getScheme();
 +
 +            File file = new File(deployTmpDirPath);
 +
 +            long freq = -1;
 +
 +            try {
 +                freq = getFrequencyFromUri(uri);
 +            }
 +            catch (NumberFormatException e) {
 +                U.error(log, "Error parsing parameter value for frequency.", e);
 +            }
 +
 +            assert proto != null;
 +
 +            GridUriDeploymentScanner scanner;
 +
 +            switch (proto) {
 +                case "file":
 +                    scanner = new GridUriDeploymentFileScanner(gridName, uri, file, freq > 0 ? freq :
 +                        DFLT_DISK_SCAN_FREQUENCY, filter, lsnr, log);
 +                    break;
 +
 +                case "http":
 +                case "https":
 +                    scanner = new GridUriDeploymentHttpScanner(gridName, uri, file, freq > 0 ? freq :
 +                        DFLT_HTTP_SCAN_FREQUENCY, filter, lsnr, log);
 +                    break;
 +
 +                case "ftp":
 +                    scanner = new GridUriDeploymentFtpScanner(gridName, uri, file, freq > 0 ? freq :
 +                        DFLT_FTP_SCAN_FREQUENCY, filter, lsnr, log);
 +                    break;
 +
 +                default:
 +                    throw new IgniteSpiException("Unsupported protocol: " + proto);
 +            }
 +
 +            scanners.add(scanner);
 +
 +            scanner.start();
 +        }
 +
 +        // Ack parameters.
 +        if (log.isDebugEnabled()) {
 +            log.debug(configInfo("tmpDirPath", tmpDirPath));
 +            log.debug(configInfo("uriList", uriList));
 +            log.debug(configInfo("encodeUri", encodeUri));
 +            log.debug(configInfo("scanners", scanners));
 +        }
 +
 +        // Ack ok start.
 +        if (log.isDebugEnabled())
 +            log.debug(startInfo());
 +    }
 +
 +    /**
 +     * Gets URI refresh frequency.
 +     * URI is parsed and {@code freq} parameter value returned.
 +     *
 +     * @param uri URI to be parsed.
 +     * @return {@code -1} if there if no {@code freq} parameter otherwise
 +     *      returns frequency.
 +     * @throws NumberFormatException Thrown if {@code freq} parameter value
 +     *      is not a number.
 +     */
 +    private long getFrequencyFromUri(URI uri) throws NumberFormatException {
 +        assert uri != null;
 +
 +        String userInfo = uri.getUserInfo();
 +
 +        if (userInfo != null) {
 +            String[] arr = userInfo.split(";");
 +
 +            if (arr != null && arr.length > 0)
 +                for (String el : arr)
 +                    if (el.startsWith("freq="))
 +                        return Long.parseLong(el.substring(5));
 +        }
 +
 +        return -1;
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Nullable
 +    @Override public DeploymentResource findResource(String rsrcName) {
 +        assert rsrcName != null;
 +
 +        // Wait until all scanners finish their first scanning.
 +        try {
 +            synchronized (mux) {
 +                while (!isFirstScanFinished(firstScanCntr))
 +                    mux.wait(5000);
 +            }
 +        }
 +        catch (InterruptedException e) {
 +            U.error(log, "Failed to wait while all scanners finish their first scanning.", e);
 +
 +            Thread.currentThread().interrupt();
 +
 +            return null;
 +        }
 +
 +        synchronized (mux) {
 +            // Last updated class loader has highest priority in search.
 +            for (GridUriDeploymentUnitDescriptor unitDesc : unitLoaders) {
 +                // Try to find resource for current class loader.
 +                String clsName = rsrcName;
 +                Class<?> clsByAlias = unitDesc.getResourcesByAlias().get(rsrcName);
 +
 +                if (clsByAlias != null)
 +                    clsName = clsByAlias.getName();
 +
 +                try {
 +                    ClassLoader ldr = unitDesc.getClassLoader();
 +
 +                    Class<?> cls = ldr instanceof GridUriDeploymentClassLoader ?
 +                        ((GridUriDeploymentClassLoader)ldr).loadClassGarOnly(clsName) :
 +                        ldr.loadClass(clsName);
 +
 +                    assert cls != null;
 +
 +                    IgniteBiTuple<Class<?>, String> rsrc = unitDesc.findResource(rsrcName);
 +
 +                    if (rsrc != null) {
 +                        // Recalculate resource name in case if access is performed by
 +                        // class name and not the resource name.
 +                        String alias = rsrc.get2();
 +
 +                        return new DeploymentResourceAdapter(
 +                            alias != null ? alias : rsrcName,
 +                            cls,
 +                            unitDesc.getClassLoader());
 +                    }
 +                    // Ignore invalid tasks.
 +                    else if (!ComputeTask.class.isAssignableFrom(cls)) {
 +                        unitDesc.addResource(cls);
 +
 +                        return new DeploymentResourceAdapter(rsrcName, cls, unitDesc.getClassLoader());
 +                    }
 +                }
 +                catch (ClassNotFoundException ignored) {
 +                    // No-op.
 +                }
 +            }
 +
 +            return null;
 +        }
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public boolean register(ClassLoader ldr, Class<?> rsrc) throws IgniteSpiException {
 +        A.notNull(ldr, "ldr");
 +        A.notNull(rsrc, "rsrc");
 +
 +        long tstamp = U.currentTimeMillis();
 +
 +        Collection<ClassLoader> rmvClsLdrs = new ArrayList<>();
 +
 +        Map<String, String> newRsrcs;
 +
 +        synchronized (mux) {
 +            GridUriDeploymentUnitDescriptor desc = null;
 +
 +            // Find existing class loader.
 +            for (GridUriDeploymentUnitDescriptor unitDesc : unitLoaders)
 +                if (unitDesc.getClassLoader().equals(ldr)) {
 +                    desc = unitDesc;
 +
 +                    break;
 +                }
 +
 +            if (desc == null) {
 +                desc = new GridUriDeploymentUnitDescriptor(tstamp, ldr);
 +
 +                // New unit has largest timestamp.
 +                assert unitLoaders.size() <= 0 || unitComp.compare(desc, unitLoaders.getFirst()) <= 0;
 +
 +                unitLoaders.addFirst(desc);
 +            }
 +
 +            newRsrcs = addResources(ldr, desc, new Class<?>[]{rsrc});
 +
 +            if (!F.isEmpty(newRsrcs))
 +                removeResources(ldr, newRsrcs, rmvClsLdrs);
 +        }
 +
 +        for (ClassLoader cldLdr : rmvClsLdrs)
 +            onUnitReleased(cldLdr);
 +
 +        return !F.isEmpty(newRsrcs);
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public boolean unregister(String rsrcName) {
 +        assert rsrcName != null;
 +
 +        Collection<ClassLoader> rmvClsLdrs = new ArrayList<>();
 +
 +        boolean rmv;
 +
 +        synchronized (mux) {
 +            Map<String, String> rsrcs = U.newHashMap(1);
 +
 +            rsrcs.put(rsrcName, rsrcName);
 +
 +            rmv = removeResources(null, rsrcs, rmvClsLdrs);
 +        }
 +
 +        for (ClassLoader cldLdr : rmvClsLdrs)
 +            onUnitReleased(cldLdr);
 +
 +        return rmv;
 +    }
 +
 +    /**
 +     * Add new classes in class loader resource map.
 +     * Note that resource map may contain two entries for one added class:
 +     * task name -> class name and class name -> class name.
 +     *
 +     * @param ldr Registered class loader.
 +     * @param desc Deployment descriptor.
 +     * @param clss Registered classes array.
 +     * @return Map of new resources added for registered class loader.
 +     * @throws org.apache.ignite.spi.IgniteSpiException If resource already registered. Exception thrown
 +     * if registered resources conflicts with rule when all task classes must be
 +     * annotated with different task names.
 +     */
 +    @Nullable
 +    private Map<String, String> addResources(ClassLoader ldr, GridUriDeploymentUnitDescriptor desc, Class<?>[] clss)
 +        throws IgniteSpiException {
 +        assert ldr != null;
 +        assert desc != null;
 +        assert clss != null;
 +
 +        // Maps resources to classes.
 +        // Map may contain 2 entries for one class.
 +        Map<String, Class<?>> alias2Cls = new HashMap<>(clss.length * 2, 1.0f);
 +
 +        // Check alias collision between added classes.
 +        for (Class<?> cls : clss) {
 +            String alias = null;
 +
 +            if (ComputeTask.class.isAssignableFrom(cls)) {
 +                ComputeTaskName nameAnn = U.getAnnotation(cls, ComputeTaskName.class);
 +
 +                if (nameAnn != null)
 +                    alias = nameAnn.value();
 +            }
 +
 +            // If added classes maps to one alias.
 +            if (alias != null && alias2Cls.containsKey(alias) && !alias2Cls.get(alias).equals(cls))
 +                throw new IgniteSpiException("Failed to register resources with given task name " +
 +                    "(found another class with same task name) [taskName=" + alias +
 +                    ", cls1=" + cls.getName() + ", cls2=" + alias2Cls.get(alias).getName() + ", ldr=" + ldr + ']');
 +
 +            if (alias != null) {
 +                alias2Cls.put(alias, cls);
 +
 +                desc.addResource(alias, cls);
 +            }
 +            else
 +                desc.addResource(cls);
 +        }
 +
 +        Map<String, String> newRsrcs = null;
 +
 +        // Check collisions between added and exist classes.
 +        for (Entry<String, Class<?>> entry : alias2Cls.entrySet()) {
 +            String newAlias = entry.getKey();
 +            String newName = entry.getValue().getName();
 +            Class<?> cls = desc.getResourceByAlias(newAlias);
 +
 +            if (cls != null) {
 +                // Different classes for the same resource name.
 +                if (!cls.getName().equals(newName))
 +                    throw new IgniteSpiException("Failed to register resources with given task name " +
 +                        "(found another class with same task name in the same class loader) [taskName=" + newAlias +
 +                        ", existingCls=" + cls.getName() + ", newCls=" + newName + ", ldr=" + ldr + ']');
 +            }
 +            // Add resources that should be removed for another class loaders.
 +            else {
 +                if (newRsrcs == null)
 +                    newRsrcs = U.newHashMap(alias2Cls.size() + clss.length);
 +
 +                newRsrcs.put(newAlias, newName);
 +                newRsrcs.put(newName, newName);
 +            }
 +        }
 +
 +        return newRsrcs;
 +    }
 +
 +    /**
 +     * Remove resources for all class loaders except {@code ignoreClsLdr}.
 +     *
 +     * @param ignoreClsLdr Ignored class loader or {@code null} to remove for all class loaders.
 +     * @param rsrcs Resources that should be used in search for class loader to remove.
 +     * @param rmvClsLdrs Class loaders to remove.
 +     * @return {@code True} if resource was removed.
 +     */
 +    private boolean removeResources(@Nullable ClassLoader ignoreClsLdr, Map<String, String> rsrcs,
 +        Collection<ClassLoader> rmvClsLdrs) {
 +        assert Thread.holdsLock(mux);
 +        assert rsrcs != null;
 +
 +        boolean res = false;
 +
 +        for (Iterator<GridUriDeploymentUnitDescriptor> iter = unitLoaders.iterator(); iter.hasNext();) {
 +            GridUriDeploymentUnitDescriptor desc = iter.next();
 +            ClassLoader ldr = desc.getClassLoader();
 +
 +            if (ignoreClsLdr == null || !ldr.equals(ignoreClsLdr)) {
 +                boolean isRmv = false;
 +
 +                // Check class loader's registered resources.
 +                for (String rsrcName : rsrcs.keySet()) {
 +                    IgniteBiTuple<Class<?>, String> rsrc = desc.findResource(rsrcName);
 +
 +                    // Remove class loader if resource found.
 +                    if (rsrc != null) {
 +                        iter.remove();
 +
 +                        // Add class loaders in collection to notify listener outside synchronization block.
 +                        rmvClsLdrs.add(ldr);
 +
 +                        isRmv = true;
 +                        res = true;
 +
 +                        break;
 +                    }
 +                }
 +
 +                if (isRmv)
 +                    continue;
 +
 +                // Check is possible to load resources with classloader.
 +                for (Entry<String, String> entry : rsrcs.entrySet()) {
 +                    // Check classes with class loader only when classes points to classes to avoid redundant check.
 +                    // Resources map contains two entries for class with task name(alias).
 +                    if (entry.getKey().equals(entry.getValue()) && isResourceExist(ldr, entry.getKey())) {
 +                        iter.remove();
 +
 +                        // Add class loaders in collection to notify listener outside synchronization block.
 +                        rmvClsLdrs.add(ldr);
 +
 +                        res = true;
 +
 +                        break;
 +                    }
 +                }
 +            }
 +        }
 +
 +        return res;
 +    }
 +
 +    /**
 +     * Gets resource name for a given class name.
 +     *
 +     * @param clsName Class name.
 +     * @param rsrcs Map of resources.
 +     * @return Resource name.
 +     */
 +    private String getResourceName(String clsName, Map<String, String> rsrcs) {
 +        assert Thread.holdsLock(mux);
 +
 +        String rsrcName = clsName;
 +
 +        for (Entry<String, String> e : rsrcs.entrySet())
 +            if (e.getValue().equals(clsName) && !e.getKey().equals(clsName)) {
 +                rsrcName = e.getKey();
 +
 +                break;
 +            }
 +
 +        return rsrcName;
 +    }
 +
 +    /**
 +     * Check is class can be reached.
 +     *
 +     * @param ldr Class loader.
 +     * @param clsName Class name.
 +     * @return {@code true} if class can be loaded.
 +     */
 +    private boolean isResourceExist(ClassLoader ldr, String clsName) {
 +        String rsrc = clsName.replaceAll("\\.", "/") + ".class";
 +
 +        InputStream in = null;
 +
 +        try {
 +            in = ldr instanceof GridUriDeploymentClassLoader ?
 +                ((GridUriDeploymentClassLoader)ldr).getResourceAsStreamGarOnly(rsrc) :
 +                ldr.getResourceAsStream(rsrc);
 +
 +            return in != null;
 +        }
 +        finally {
 +            U.close(in, log);
 +        }
 +    }
 +
 +    /**
 +     * Tests whether first scan is finished or not.
 +     *
 +     * @param cntr Number of already scanned URIs.
 +     * @return {@code true} if all URIs have been scanned at least once and
 +     *      {@code false} otherwise.
 +     */
 +    private boolean isFirstScanFinished(int cntr) {
 +        assert uriEncodedList != null;
 +
 +        return cntr >= uriEncodedList.size();
 +    }
 +
 +    /**
 +     * Fills in list of URIs with all available URIs and encodes them if
 +     * encoding is enabled.
 +     *
 +     * @throws org.apache.ignite.spi.IgniteSpiException Thrown if at least one URI has incorrect syntax.
 +     */
 +    private void initializeUriList() throws IgniteSpiException {
 +        for (String uri : uriList) {
 +            assertParameter(uri != null, "uriList.get(X) != null");
 +
 +            assert uri != null;
 +
 +            String encUri = encodeUri(uri.replaceAll("\\\\", "/"));
 +
 +            URI uriObj;
 +
 +            try {
 +                uriObj = new URI(encUri);
 +            }
 +            catch (URISyntaxException e) {
 +                throw new IgniteSpiException("Failed to parse URI [uri=" + U.hidePassword(uri) +
 +                    ", encodedUri=" + U.hidePassword(encUri) + ']', e);
 +            }
 +
 +            if (uriObj.getScheme() == null || uriObj.getScheme().trim().isEmpty())
 +                throw new IgniteSpiException("Failed to get 'scheme' from URI [uri=" +
 +                    U.hidePassword(uri) +
 +                    ", encodedUri=" + U.hidePassword(encUri) + ']');
 +
 +            uriEncodedList.add(uriObj);
 +        }
 +    }
 +
 +    /**
 +     * Add configuration for file scanner {@link GridUriDeploymentFileScanner}.
 +     *
 +     * @throws org.apache.ignite.spi.IgniteSpiException Thrown if default URI syntax is incorrect.
 +     */
 +    private void addDefaultUri() throws IgniteSpiException {
 +        assert uriEncodedList != null;
 +
 +        URI uri;
 +
 +        try {
 +            uri = U.resolveWorkDirectory(DFLT_DEPLOY_DIR, false).toURI();
 +        }
 +        catch (IgniteCheckedException e) {
 +            throw new IgniteSpiException("Failed to initialize default file scanner", e);
 +        }
 +
 +        uriEncodedList.add(uri);
 +    }
 +
 +    /**
 +     * Encode URI path if encoding is enabled. Set of encoded characters
 +     * in path is (' ', ';', '%').
 +     *
 +     * @param path URI which should be encoded.
 +     * @return Either encoded URI if encoding is enabled or given one
 +     *      if encoding is disabled.
 +     */
 +    private String encodeUri(String path) {
 +        return encodeUri ? new GridUriDeploymentUriParser(path).parse() : path;
 +    }
 +
 +    /**
 +     * Initializes temporary directory path. Path consists of base path
 +     * (either {@link #tmpDirPath} value or {@code java.io.tmpdir}
 +     * system property value if first is {@code null}) and path relative
 +     * to base one - {@link #DEPLOY_TMP_ROOT_NAME}/{@code local node ID}.
 +     *
 +     * @throws org.apache.ignite.spi.IgniteSpiException Thrown if temporary directory could not be created.
 +     */
 +    private void initializeTemporaryDirectoryPath() throws IgniteSpiException {
 +        String tmpDirPath = this.tmpDirPath == null ? System.getProperty("java.io.tmpdir") : this.tmpDirPath;
 +
 +        if (tmpDirPath == null)
 +            throw new IgniteSpiException("Error initializing temporary deployment directory.");
 +
 +        File dir = new File(tmpDirPath + File.separator + DEPLOY_TMP_ROOT_NAME + File.separator +
 +            ignite.configuration().getNodeId());
 +
 +        if (!U.mkdirs(dir))
 +            throw new IgniteSpiException("Error initializing temporary deployment directory: " + dir);
 +
 +        if (!dir.isDirectory())
 +            throw new IgniteSpiException("Temporary deployment directory path is not a valid directory: " + dir);
 +
 +        if (!dir.canRead() || !dir.canWrite())
 +            throw new IgniteSpiException("Can not write to or read from temporary deployment directory: " + dir);
 +
 +        this.tmpDirPath = tmpDirPath;
 +
 +        deployTmpDirPath = dir.getPath();
 +    }
 +
 +    /**
 +     * Deploys all tasks that correspond to given descriptor.
 +     * First method checks tasks versions and stops processing tasks that
 +     * have both versioned and unversioned instances.
 +     * <p>
 +     * Than it deletes tasks with lower version and deploys newest tasks.
 +     *
 +     * @param newDesc Tasks deployment descriptor.
 +     * @param clss Registered classes.
 +     */
 +    private void newUnitReceived(GridUriDeploymentUnitDescriptor newDesc, Collection<Class<?>> clss) {
 +        assert newDesc != null;
 +        assert newDesc.getType() == GridUriDeploymentUnitDescriptor.Type.FILE;
 +
 +        if (clss != null && !clss.isEmpty()) {
 +            try {
 +                addResources(newDesc.getClassLoader(), newDesc, clss.toArray(new Class<?>[clss.size()]));
 +            }
 +            catch (IgniteSpiException e) {
 +                U.warn(log, "Failed to register GAR class loader [newDesc=" + newDesc +
 +                    ", msg=" + e.getMessage() + ']');
 +            }
 +        }
 +
 +        Collection<ClassLoader> rmvClsLdrs = new ArrayList<>();
 +
 +        synchronized (mux) {
 +            if (checkMd5 && unitDeployed(newDesc.getMd5())) {
 +                if (log.isInfoEnabled())
 +                    LT.info(log, "Skipping new deployment unit because of md5 match " +
 +                        "[uri='" + U.hidePassword(newDesc.getUri()) +
 +                        "', file=" + (newDesc.getFile() == null ? "N/A" : newDesc.getFile()) + ']');
 +
 +                return;
 +            }
 +
 +            boolean isAdded = false;
 +            boolean ignoreNewUnit = false;
 +
 +            for (ListIterator<GridUriDeploymentUnitDescriptor> iter = unitLoaders.listIterator();
 +                 iter.hasNext();) {
 +                GridUriDeploymentUnitDescriptor desc = iter.next();
 +
 +                assert !newDesc.getClassLoader().equals(desc.getClassLoader()) :
 +                    "Uri scanners always create new class loader for every GAR file: " + newDesc;
 +
 +                // Only for GAR files. Undeploy all for overwritten GAR files.
 +                if (desc.getType() == GridUriDeploymentUnitDescriptor.Type.FILE &&
 +                    newDesc.getUri().equals(desc.getUri()) && !newDesc.getFile().equals(desc.getFile())) {
 +                    // Remove descriptor.
 +                    iter.remove();
 +
 +                    // Add class loaders in collection to notify listener outside synchronization block.
 +                    rmvClsLdrs.add(desc.getClassLoader());
 +
 +                    // Last descriptor.
 +                    if (!iter.hasNext())
 +                        // New descriptor will be added after loop.
 +                        break;
 +
 +                    continue;
 +                }
 +
 +                if (!isAdded) {
 +                    // Unit with largest timestamp win.
 +                    // Insert it before current element.
 +                    if (unitComp.compare(newDesc, desc) <= 0) {
 +                        // Remove current class loader if found collisions.
 +                        if (checkUnitCollision(desc, newDesc)) {
 +                            iter.remove();
 +                            iter.add(newDesc);
 +
 +                            // Add class loaders in collection to notify listener outside synchronization block.
 +                            rmvClsLdrs.add(desc.getClassLoader());
 +                        }
 +                        // Or add new class loader before current class loader.
 +                        else {
 +                            iter.set(newDesc);
 +                            iter.add(desc);
 +                        }
 +
 +                        isAdded = true;
 +                    }
 +                    else if (checkUnitCollision(newDesc, desc)) {
 +                        // Don't add new unit if found collisions with latest class loader.
 +                        ignoreNewUnit = true;
 +                        break;
 +                    }
 +                }
 +                // New descriptor already added and we need to check other class loaders for collisions.
 +                else if (checkUnitCollision(newDesc, desc)) {
 +                    iter.remove();
 +
 +                    // Add class loaders in collection to notify listener outside synchronization block.
 +                    rmvClsLdrs.add(desc.getClassLoader());
 +                }
 +            }
 +
 +            if (!ignoreNewUnit) {
 +                if (!isAdded)
 +                    unitLoaders.add(newDesc);
 +
 +                if (log.isDebugEnabled())
 +                    LT.info(log, "Class loader (re)registered [clsLdr=" + newDesc.getClassLoader() +
 +                        ", tstamp=" + newDesc.getTimestamp() +
 +                        ", uri='" + U.hidePassword(newDesc.getUri()) +
 +                        "', file=" + (newDesc.getFile() == null ? "N/A" : newDesc.getFile()) + ']');
 +            }
 +        }
 +
 +        for (ClassLoader cldLdr : rmvClsLdrs)
 +            onUnitReleased(cldLdr);
 +    }
 +
 +    /**
 +     * Check task resource collisions in added descriptor {@code newDesc} with another
 +     * descriptor {@code existDesc}.
 +     *
 +     * @param newDesc New added descriptor.
 +     * @param existDesc Exist descriptor.
 +     * @return {@code True} if collisions found.
 +     */
 +    private boolean checkUnitCollision(GridUriDeploymentUnitDescriptor newDesc,
 +        GridUriDeploymentUnitDescriptor existDesc) {
 +        assert newDesc != null;
 +        assert existDesc != null;
 +
 +        Map<String, Class<?>> rsrcsByAlias = newDesc.getResourcesByAlias();
 +
 +        for (Entry<String, Class<?>> entry : existDesc.getResourcesByAlias().entrySet()) {
 +            String rsrcName = entry.getKey();
 +
 +            if (rsrcsByAlias.containsKey(rsrcName)) {
 +                U.warn(log, "Found collision with task name in different GAR files. " +
 +                    "Class loader will be removed [taskName=" + rsrcName + ", cls1=" + rsrcsByAlias.get(rsrcName) +
 +                    ", cls2=" + entry.getValue() + ", newDesc=" + newDesc + ", existDesc=" + existDesc + ']');
 +
 +                return true;
 +            }
 +        }
 +
 +        for (Class<?> rsrcCls : existDesc.getResources()) {
 +            if (!ComputeTask.class.isAssignableFrom(rsrcCls) &&
 +                isResourceExist(newDesc.getClassLoader(), rsrcCls.getName())) {
 +                U.warn(log, "Found collision with task class in different GAR files. " +
 +                    "Class loader will be removed [taskCls=" + rsrcCls +
 +                    ", removedDesc=" + newDesc + ", existDesc=" + existDesc + ']');
 +
 +                return true;
 +            }
 +        }
 +
 +        return false;
 +    }
 +
 +    /**
 +     * Deploys or redeploys given tasks.
 +     *
 +     * @param uri GAR file deployment URI.
 +     * @param file GAR file.
 +     * @param tstamp File modification date.
 +     * @param ldr Class loader.
 +     * @param clss List of tasks which were found in GAR file.
 +     * @param md5 md5 of the new unit.
 +     */
 +    private void newUnitReceived(String uri, File file, long tstamp, ClassLoader ldr,
 +        Collection<Class<? extends ComputeTask<?, ?>>> clss, @Nullable String md5) {
 +        assert uri != null;
 +        assert file != null;
 +        assert tstamp > 0;
 +
 +        // To avoid units with incorrect timestamp.
 +        tstamp = Math.min(tstamp, U.currentTimeMillis());
 +
 +        // Create descriptor.
 +        GridUriDeploymentUnitDescriptor desc = new GridUriDeploymentUnitDescriptor(uri, file, tstamp, ldr, md5);
 +
 +        newUnitReceived(desc, clss != null && !clss.isEmpty() ? new ArrayList<Class<?>>(clss) : null);
 +    }
 +
 +    /**
 +     * Removes all tasks that belong to GAR files which are on list
 +     * of removed files.
 +     *
 +     * @param uris List of removed files.
 +     */
 +    @SuppressWarnings({"TypeMayBeWeakened"})
 +    private void processDeletedFiles(List<String> uris) {
 +        assert uris != null;
 +
 +        if (uris.isEmpty())
 +            return;
 +
 +        synchronized (mux) {
 +            Set<String> uriSet = new HashSet<>(uris);
 +
 +            for (Iterator<GridUriDeploymentUnitDescriptor> iter = unitLoaders.iterator(); iter.hasNext();) {
 +                GridUriDeploymentUnitDescriptor desc = iter.next();
 +
 +                if (desc.getType() == GridUriDeploymentUnitDescriptor.Type.FILE && uriSet.contains(desc.getUri())) {
 +                    // Remove descriptor.
 +                    iter.remove();
 +
 +                    onUnitReleased(desc.getClassLoader());
 +                }
 +            }
 +        }
 +    }
 +
 +    /**
 +     * Notifies listener about released class loader.
 +     *
 +     * @param clsLdr Released class loader.
 +     */
 +    private void onUnitReleased(ClassLoader clsLdr) {
 +        // Make sure we don't remove system class loader.
 +        if (!clsLdr.equals(getClass().getClassLoader()))
 +            GridUriDeploymentFileProcessor.cleanupUnit(clsLdr, log);
 +
 +        DeploymentListener tmp = lsnr;
 +
 +        if (tmp != null)
 +            tmp.onUnregistered(clsLdr);
 +    }
 +
 +    /**
 +     * Checks if a nut with the same md5 ai already deployed with this SPI.
 +     *
 +     * @param md5 md5 of a new unit.
 +     * @return {@code true} if this unit deployed, {@code false} otherwise.
 +     */
 +    private boolean unitDeployed(String md5) {
 +        assert Thread.holdsLock(mux);
 +
 +        if (md5 != null) {
 +            for (GridUriDeploymentUnitDescriptor d: unitLoaders)
 +                if (md5.equals(d.getMd5()))
 +                    return true;
 +        }
 +
 +        return false;
 +    }
 +
 +    /**
 +     * Task deployment descriptor comparator.
 +     * The greater descriptor is those one that has less timestamp.
 +     */
 +    private static class LastTimeUnitDescriptorComparator implements Comparator<GridUriDeploymentUnitDescriptor>,
 +        Serializable {
 +        /** */
 +        private static final long serialVersionUID = 0L;
 +
 +        /** {@inheritDoc} */
 +        @Override public int compare(GridUriDeploymentUnitDescriptor o1, GridUriDeploymentUnitDescriptor o2) {
 +            if (o1.getTimestamp() < o2.getTimestamp())
 +                return 1;
 +
 +            return o1.getTimestamp() == o2.getTimestamp() ? 0 : -1;
 +        }
 +    }
 +
 +    /** {@inheritDoc} */
 +    @Override public String toString() {
 +        return S.toString(UriDeploymentSpi.class, this);
 +    }
 +}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/115f5979/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/scanners/file/GridFileDeploymentSelfTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/115f5979/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/115f5979/modules/web/src/main/java/org/apache/ignite/cache/websession/GridWebSessionFilter.java
----------------------------------------------------------------------


[30/50] [abbrv] incubator-ignite git commit: # sprint-1: removed unused import.

Posted by se...@apache.org.
# sprint-1: removed unused import.


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

Branch: refs/heads/ignite-sql
Commit: 2ec1cb2be1ea27a10d524da984bddf306c4de862
Parents: 9550905
Author: AKuznetsov <ak...@gridgain.com>
Authored: Fri Jan 30 17:35:28 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Fri Jan 30 17:35:28 2015 +0700

----------------------------------------------------------------------
 .../src/main/scala/org/apache/ignite/visor/visor.scala              | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2ec1cb2b/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala
index 764a347..fef1aff 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala
@@ -42,7 +42,6 @@ import org.apache.ignite.lang.{IgniteNotPeerDeployable, IgnitePredicate}
 import org.apache.ignite.lifecycle.IgniteListener
 import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi
 import org.apache.ignite.thread.IgniteThreadPoolExecutor
-import org.apache.ignite.visor.VisorTag
 import org.apache.ignite.visor.commands.{VisorConsoleCommand, VisorTextTable}
 import org.apache.ignite.{IgniteState, IgniteSystemProperties, Ignition, _}
 import org.jetbrains.annotations.Nullable