You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ag...@apache.org on 2015/04/10 03:44:08 UTC

[01/50] [abbrv] incubator-ignite git commit: Merge remote-tracking branch 'remotes/origin/ignite-sprint-3' into ignite-30

Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-674 151f970c9 -> 6cba5507d


Merge remote-tracking branch 'remotes/origin/ignite-sprint-3' into ignite-30


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

Branch: refs/heads/ignite-674
Commit: c31dbd2a20f0a2715dfa158102e1b879bfee657b
Parents: cb21533 7eef373
Author: sevdokimov <se...@gridgain.com>
Authored: Wed Apr 8 18:25:27 2015 +0300
Committer: sevdokimov <se...@gridgain.com>
Committed: Wed Apr 8 18:25:27 2015 +0300

----------------------------------------------------------------------
 bin/ignite.bat                                  |   2 +-
 bin/ignite.sh                                   |   2 +-
 bin/include/service.sh                          |   8 +-
 config/hadoop/default-config.xml                |  15 +-
 .../streaming/StreamTransformerExample.java     |   3 +-
 .../src/main/java/org/apache/ignite/Ignite.java |  15 +
 .../apache/ignite/internal/IgniteKernal.java    |  55 ++-
 .../org/apache/ignite/internal/IgnitionEx.java  | 171 +++-----
 .../internal/managers/GridManagerAdapter.java   |  34 +-
 .../cache/DynamicCacheChangeRequest.java        |  17 +
 .../cache/DynamicCacheDescriptor.java           |  17 +-
 .../processors/cache/GridCacheIoManager.java    |   2 +-
 .../processors/cache/GridCacheProcessor.java    | 350 +++++++++++++--
 .../dht/GridClientPartitionTopology.java        |   6 +-
 .../distributed/dht/GridDhtLockFuture.java      |  10 +-
 .../dht/GridDhtPartitionTopologyImpl.java       |   6 +-
 .../distributed/dht/GridDhtTxLocalAdapter.java  |  49 ++-
 .../distributed/dht/GridDhtTxPrepareFuture.java |   2 +-
 .../GridDhtPartitionsExchangeFuture.java        |   1 +
 .../cache/transactions/IgniteTxManager.java     |   6 +-
 .../ipc/shmem/IpcSharedMemoryNativeLoader.java  |  48 ++-
 .../ignite/internal/util/lang/GridFunc.java     |  33 ++
 .../ignite/internal/visor/cache/VisorCache.java |   2 +-
 .../cache/VisorCacheAggregatedMetrics.java      |  38 +-
 .../visor/cache/VisorCacheConfiguration.java    |  17 +-
 .../internal/visor/cache/VisorCacheMetrics.java |  53 ++-
 .../cache/VisorCacheMetricsCollectorTask.java   |  59 ++-
 .../visor/cache/VisorCacheStopTask.java         |  69 +++
 .../org/apache/ignite/spi/IgniteSpiAdapter.java |  24 +-
 .../communication/tcp/TcpCommunicationSpi.java  |  14 +-
 .../discovery/tcp/TcpClientDiscoverySpi.java    |  47 +--
 .../spi/discovery/tcp/TcpDiscoverySpi.java      |  78 ++--
 .../discovery/tcp/TcpDiscoverySpiAdapter.java   |   8 +-
 .../spi/swapspace/file/FileSwapSpaceSpi.java    |   4 +-
 .../resources/META-INF/classnames.properties    |  19 +-
 ...eCacheConfigurationTemplateNotFoundTest.java | 114 +++++
 .../IgniteCacheConfigurationTemplateTest.java   | 364 ++++++++++++++++
 .../cache/IgniteDynamicCacheStartSelfTest.java  |  23 +
 ...ePartitionedBasicStoreMultiNodeSelfTest.java | 110 +----
 ...ridCacheFifoBatchEvictionPolicySelfTest.java |   3 +-
 .../GridAbstractCommunicationSelfTest.java      |   3 +-
 .../GridTcpCommunicationSpiAbstractTest.java    |   5 +-
 ...mmunicationSpiConcurrentConnectSelfTest.java |   3 +-
 ...cpCommunicationSpiMultithreadedSelfTest.java |   3 +-
 ...dTcpCommunicationSpiRecoveryAckSelfTest.java |   3 +-
 ...GridTcpCommunicationSpiRecoverySelfTest.java |   2 +-
 .../ignite/testframework/junits/IgniteMock.java |  10 +
 .../IgniteCacheEvictionSelfTestSuite.java       |   1 +
 .../ignite/testsuites/IgniteCacheTestSuite.java |   5 +-
 .../processors/query/h2/sql/GridSqlElement.java |   8 -
 .../processors/query/h2/sql/GridSqlQuery.java   | 183 ++++++++
 .../query/h2/sql/GridSqlQueryParser.java        |  97 +++--
 .../query/h2/sql/GridSqlQuerySplitter.java      | 111 ++++-
 .../processors/query/h2/sql/GridSqlSelect.java  | 209 +++------
 .../query/h2/sql/GridSqlSubquery.java           |   8 +-
 .../processors/query/h2/sql/GridSqlUnion.java   | 134 ++++++
 .../h2/twostep/GridReduceQueryExecutor.java     |   2 +-
 .../query/h2/sql/GridQueryParsingTest.java      |  26 +-
 .../query/h2/sql/IgniteVsH2QueryTest.java       |  27 +-
 .../org/apache/ignite/IgniteSpringBean.java     |  14 +
 .../commands/cache/VisorCacheClearCommand.scala |   3 +-
 .../commands/cache/VisorCacheCommand.scala      | 423 +++++++++++--------
 .../commands/cache/VisorCacheStopCommand.scala  | 145 +++++++
 .../scala/org/apache/ignite/visor/visor.scala   |  12 +-
 parent/pom.xml                                  |   2 +-
 pom.xml                                         |   2 +
 66 files changed, 2474 insertions(+), 865 deletions(-)
----------------------------------------------------------------------



[20/50] [abbrv] incubator-ignite git commit: #ignite-180: fix comments after review.

Posted by ag...@apache.org.
#ignite-180: fix comments after review.


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

Branch: refs/heads/ignite-674
Commit: 8b2324f11738b1f04d04b27aa5edee369e948d90
Parents: 963af29
Author: ivasilinets <iv...@gridgain.com>
Authored: Thu Apr 9 11:58:25 2015 +0300
Committer: ivasilinets <iv...@gridgain.com>
Committed: Thu Apr 9 11:58:25 2015 +0300

----------------------------------------------------------------------
 .../processors/datastructures/DataStructuresProcessor.java        | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8b2324f1/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java
index c8e1d93..5a9693c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java
@@ -54,7 +54,7 @@ public final class DataStructuresProcessor extends GridProcessorAdapter {
         new CacheDataStructuresConfigurationKey();
 
     /** */
-    public static final CacheDataStructuresCacheKey DATA_STRUCTURES_CACHE_KEY =
+    private static final CacheDataStructuresCacheKey DATA_STRUCTURES_CACHE_KEY =
         new CacheDataStructuresCacheKey();
 
     /** Initial capacity. */
@@ -1109,6 +1109,7 @@ public final class DataStructuresProcessor extends GridProcessorAdapter {
         @Nullable final CollectionConfiguration cfg)
         throws IgniteCheckedException {
         A.notNull(name, "name");
+
         String cacheName = null;
 
         if (cfg != null)


[31/50] [abbrv] incubator-ignite git commit: ignite-705: clear h2 objects after test and simple refactoring

Posted by ag...@apache.org.
ignite-705: clear h2 objects after test and simple refactoring


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

Branch: refs/heads/ignite-674
Commit: 59d937422562182da712baf85e2788f21ae923ee
Parents: 5fcb072
Author: Artem Shutak <as...@gridgain.com>
Authored: Thu Apr 9 13:54:12 2015 +0300
Committer: Artem Shutak <as...@gridgain.com>
Committed: Thu Apr 9 13:54:12 2015 +0300

----------------------------------------------------------------------
 .../h2/sql/AbstractH2CompareQueryTest.java      | 13 ++++++-
 .../query/h2/sql/BaseH2CompareQueryTest.java    | 25 +++++++++----
 .../query/h2/sql/H2CompareBigQueryTest.java     | 38 +++-----------------
 3 files changed, 34 insertions(+), 42 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/59d93742/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/AbstractH2CompareQueryTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/AbstractH2CompareQueryTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/AbstractH2CompareQueryTest.java
index c74493f..2caeab8 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/AbstractH2CompareQueryTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/AbstractH2CompareQueryTest.java
@@ -119,7 +119,11 @@ public abstract class AbstractH2CompareQueryTest extends GridCommonAbstractTest
     /** {@inheritDoc} */
     @Override protected void afterTestsStopped() throws Exception {
         super.afterTestsStopped();
+
+        Statement st = conn.createStatement();
         
+        st.execute("DROP ALL OBJECTS");
+
         conn.close();
         
         stopAllGrids();
@@ -140,7 +144,14 @@ public abstract class AbstractH2CompareQueryTest extends GridCommonAbstractTest
      *
      * @throws SQLException If exception.
      */
-    protected abstract void initializeH2Schema() throws SQLException;
+    protected Statement initializeH2Schema() throws SQLException {
+        Statement st = conn.createStatement();
+
+        st.execute("CREATE SCHEMA \"part\"");
+        st.execute("CREATE SCHEMA \"repl\"");
+
+        return st;
+    }
 
     /**
      * Gets connection from a pool.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/59d93742/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/BaseH2CompareQueryTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/BaseH2CompareQueryTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/BaseH2CompareQueryTest.java
index eea834d..3cafab2 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/BaseH2CompareQueryTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/BaseH2CompareQueryTest.java
@@ -160,9 +160,9 @@ public class BaseH2CompareQueryTest extends AbstractH2CompareQueryTest {
     }
 
     /**
-     * *
      * @throws Exception
      */
+    // TODO: IGNITE-705
     public void testAllExamples() throws Exception {
 //        compareQueryRes0("select ? limit ? offset ?");
 
@@ -280,6 +280,18 @@ public class BaseH2CompareQueryTest extends AbstractH2CompareQueryTest {
 
         compareQueryRes0("select 'foo' as bar union select 'foo' as bar");
         compareQueryRes0("select 'foo' as bar union all select 'foo' as bar");
+
+//        compareQueryRes0("select count(*) as a from Person union select count(*) as a from Address");
+//        compareQueryRes0("select old, count(*) as a from Person group by old union select 1, count(*) as a from Address");
+//        compareQueryRes0("select name from Person MINUS select street from Address");
+//        compareQueryRes0("select name from Person EXCEPT select street from Address");
+//        compareQueryRes0("select name from Person INTERSECT select street from Address");
+//        compareQueryRes0("select name from Person UNION select street from Address limit 5");
+//        compareQueryRes0("select name from Person UNION select street from Address limit ?");
+//        compareQueryRes0("select name from Person UNION select street from Address limit ? offset ?");
+//        compareQueryRes0("(select name from Person limit 4) UNION (select street from Address limit 1) limit ? offset ?");
+//        compareQueryRes0("(select 2 a) union all (select 1) order by 1");
+//        compareQueryRes0("(select 2 a) union all (select 1) order by a desc nulls first limit ? offset ?");
     }
 
     /**
@@ -407,12 +419,9 @@ public class BaseH2CompareQueryTest extends AbstractH2CompareQueryTest {
     }
 
     /** {@inheritDoc} */
-    @Override protected void initializeH2Schema() throws SQLException {
-        Statement st = conn.createStatement();
-
-        st.execute("CREATE SCHEMA \"part\"");
-        st.execute("CREATE SCHEMA \"repl\"");
-
+    @Override protected Statement initializeH2Schema() throws SQLException {
+        Statement st = super.initializeH2Schema();
+        
         st.execute("create table \"part\".ORGANIZATION" +
             "  (_key int not null," +
             "  _val other not null," +
@@ -453,6 +462,8 @@ public class BaseH2CompareQueryTest extends AbstractH2CompareQueryTest {
             "  street varchar(255))");
 
         conn.commit();
+        
+        return st;
     }
     
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/59d93742/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/H2CompareBigQueryTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/H2CompareBigQueryTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/H2CompareBigQueryTest.java
index c5a2cad..9cff4b5 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/H2CompareBigQueryTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/H2CompareBigQueryTest.java
@@ -225,35 +225,6 @@ public class H2CompareBigQueryTest extends AbstractH2CompareQueryTest {
     /**
      * @throws Exception If failed.
      */
-    public void testUnionAllOrders() throws Exception {
-        compareQueryRes0(
-            "   select  date, orderId, rootOrderId " +
-                "   from \"part\".CustOrder where alias='CUSTOM'");
-                
-        compareQueryRes0(
-                "   select  date, orderId, rootOrderId " +
-                "   from \"part\".ReplaceOrder where alias='CUSTOM'");
-        
-        compareQueryRes0(
-            "   select 10" +
-
-                "   union all" +
-
-                "   select  20");
-        
-        compareQueryRes0(
-            "   select  date, orderId, rootOrderId " +
-                "   from \"part\".CustOrder where alias='CUSTOM'" +
-
-                "   union all" +
-
-                "   select  date, orderId, rootOrderId " +
-                "   from \"part\".ReplaceOrder where alias='CUSTOM'");
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
     public void testBigQuery() throws Exception {
         List<List<?>> res = compareQueryRes0(bigQry);
         
@@ -261,11 +232,8 @@ public class H2CompareBigQueryTest extends AbstractH2CompareQueryTest {
     }
     
     /** {@inheritDoc} */
-    @Override protected void initializeH2Schema() throws SQLException {
-        Statement st = conn.createStatement();
-
-        st.execute("CREATE SCHEMA \"part\"");
-        st.execute("CREATE SCHEMA \"repl\"");
+    @Override protected Statement initializeH2Schema() throws SQLException {
+        Statement st = super.initializeH2Schema();
 
         st.execute("create table \"part\".CustOrder" +
             "  (" +
@@ -323,6 +291,8 @@ public class H2CompareBigQueryTest extends AbstractH2CompareQueryTest {
             "  )");
         
         conn.commit();
+        
+        return st;
     }
 
     /**


[30/50] [abbrv] incubator-ignite git commit: Merge remote-tracking branch 'remotes/origin/ignite-sprint-3' into ignite-707

Posted by ag...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-sprint-3' into ignite-707


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

Branch: refs/heads/ignite-674
Commit: 2793bd975eb78346a41c4e3a596ec6d82ac47c86
Parents: 5d1815e fd9cdff
Author: sboikov <sb...@gridgain.com>
Authored: Thu Apr 9 13:19:06 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Thu Apr 9 13:19:06 2015 +0300

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



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

Posted by ag...@apache.org.
Merge remote-tracking branch 'origin/ignite-sprint-3' into ignite-sprint-3


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

Branch: refs/heads/ignite-674
Commit: 2f458d28ac965da64ec6e30918bba3541cde9bc1
Parents: 7f4c5ee 7eef373
Author: Artem Shutak <as...@gridgain.com>
Authored: Wed Apr 8 18:27:39 2015 +0300
Committer: Artem Shutak <as...@gridgain.com>
Committed: Wed Apr 8 18:27:39 2015 +0300

----------------------------------------------------------------------
 .../java/org/apache/ignite/internal/IgniteKernal.java    | 11 ++++++++++-
 .../internal/processors/cache/GridCacheProcessor.java    | 11 ++++++-----
 2 files changed, 16 insertions(+), 6 deletions(-)
----------------------------------------------------------------------



[28/50] [abbrv] incubator-ignite git commit: sprint-3 version rollback

Posted by ag...@apache.org.
sprint-3 version rollback


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

Branch: refs/heads/ignite-674
Commit: fd9cdff66f2f3022f2028900d4a019aa0e3c7d21
Parents: ca568f5
Author: Anton Vinogradov <av...@gridgain.com>
Authored: Thu Apr 9 13:01:43 2015 +0300
Committer: Anton Vinogradov <av...@gridgain.com>
Committed: Thu Apr 9 13:01:43 2015 +0300

----------------------------------------------------------------------
 examples/pom.xml              | 2 +-
 modules/aop/pom.xml           | 2 +-
 modules/aws/pom.xml           | 2 +-
 modules/clients/pom.xml       | 2 +-
 modules/codegen/pom.xml       | 2 +-
 modules/core/pom.xml          | 2 +-
 modules/extdata/p2p/pom.xml   | 2 +-
 modules/extdata/uri/pom.xml   | 2 +-
 modules/geospatial/pom.xml    | 2 +-
 modules/hadoop/pom.xml        | 2 +-
 modules/hibernate/pom.xml     | 2 +-
 modules/indexing/pom.xml      | 2 +-
 modules/jcl/pom.xml           | 2 +-
 modules/jta/pom.xml           | 2 +-
 modules/log4j/pom.xml         | 2 +-
 modules/rest-http/pom.xml     | 2 +-
 modules/scalar/pom.xml        | 2 +-
 modules/schedule/pom.xml      | 2 +-
 modules/schema-import/pom.xml | 2 +-
 modules/slf4j/pom.xml         | 2 +-
 modules/spring/pom.xml        | 2 +-
 modules/ssh/pom.xml           | 2 +-
 modules/tools/pom.xml         | 2 +-
 modules/urideploy/pom.xml     | 2 +-
 modules/visor-console/pom.xml | 2 +-
 modules/visor-plugins/pom.xml | 2 +-
 modules/web/pom.xml           | 2 +-
 modules/yardstick/pom.xml     | 2 +-
 pom.xml                       | 2 +-
 29 files changed, 29 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fd9cdff6/examples/pom.xml
----------------------------------------------------------------------
diff --git a/examples/pom.xml b/examples/pom.xml
index c25a00d..08f44eb 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -28,7 +28,7 @@
     </parent>
 
     <artifactId>ignite-examples</artifactId>
-    <version>1.0.1-RC2-SNAPSHOT</version>
+    <version>1.0.1-RC1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fd9cdff6/modules/aop/pom.xml
----------------------------------------------------------------------
diff --git a/modules/aop/pom.xml b/modules/aop/pom.xml
index d8223ac..917ccc6 100644
--- a/modules/aop/pom.xml
+++ b/modules/aop/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-aop</artifactId>
-    <version>1.0.1-RC2-SNAPSHOT</version>
+    <version>1.0.1-RC1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fd9cdff6/modules/aws/pom.xml
----------------------------------------------------------------------
diff --git a/modules/aws/pom.xml b/modules/aws/pom.xml
index 5b05476..b738450 100644
--- a/modules/aws/pom.xml
+++ b/modules/aws/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-aws</artifactId>
-    <version>1.0.1-RC2-SNAPSHOT</version>
+    <version>1.0.1-RC1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fd9cdff6/modules/clients/pom.xml
----------------------------------------------------------------------
diff --git a/modules/clients/pom.xml b/modules/clients/pom.xml
index f18171f..29250f4 100644
--- a/modules/clients/pom.xml
+++ b/modules/clients/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-clients</artifactId>
-    <version>1.0.1-RC2-SNAPSHOT</version>
+    <version>1.0.1-RC1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fd9cdff6/modules/codegen/pom.xml
----------------------------------------------------------------------
diff --git a/modules/codegen/pom.xml b/modules/codegen/pom.xml
index 5bd781f..2990330 100644
--- a/modules/codegen/pom.xml
+++ b/modules/codegen/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-codegen</artifactId>
-    <version>1.0.1-RC2-SNAPSHOT</version>
+    <version>1.0.1-RC1-SNAPSHOT</version>
 
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fd9cdff6/modules/core/pom.xml
----------------------------------------------------------------------
diff --git a/modules/core/pom.xml b/modules/core/pom.xml
index 3877801..466ccb9 100644
--- a/modules/core/pom.xml
+++ b/modules/core/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-core</artifactId>
-    <version>1.0.1-RC2-SNAPSHOT</version>
+    <version>1.0.1-RC1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fd9cdff6/modules/extdata/p2p/pom.xml
----------------------------------------------------------------------
diff --git a/modules/extdata/p2p/pom.xml b/modules/extdata/p2p/pom.xml
index 93a825c..c8f0d63 100644
--- a/modules/extdata/p2p/pom.xml
+++ b/modules/extdata/p2p/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-extdata-p2p</artifactId>
-    <version>1.0.1-RC2-SNAPSHOT</version>
+    <version>1.0.1-RC1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fd9cdff6/modules/extdata/uri/pom.xml
----------------------------------------------------------------------
diff --git a/modules/extdata/uri/pom.xml b/modules/extdata/uri/pom.xml
index 3dde312..ed7bff5 100644
--- a/modules/extdata/uri/pom.xml
+++ b/modules/extdata/uri/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-extdata-uri</artifactId>
-    <version>1.0.1-RC2-SNAPSHOT</version>
+    <version>1.0.1-RC1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fd9cdff6/modules/geospatial/pom.xml
----------------------------------------------------------------------
diff --git a/modules/geospatial/pom.xml b/modules/geospatial/pom.xml
index 3bdaa5b..d0ae253 100644
--- a/modules/geospatial/pom.xml
+++ b/modules/geospatial/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-geospatial</artifactId>
-    <version>1.0.1-RC2-SNAPSHOT</version>
+    <version>1.0.1-RC1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fd9cdff6/modules/hadoop/pom.xml
----------------------------------------------------------------------
diff --git a/modules/hadoop/pom.xml b/modules/hadoop/pom.xml
index 8c3a133..69d5294 100644
--- a/modules/hadoop/pom.xml
+++ b/modules/hadoop/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-hadoop</artifactId>
-    <version>1.0.1-RC2-SNAPSHOT</version>
+    <version>1.0.1-RC1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fd9cdff6/modules/hibernate/pom.xml
----------------------------------------------------------------------
diff --git a/modules/hibernate/pom.xml b/modules/hibernate/pom.xml
index 2930c84..eba98b5 100644
--- a/modules/hibernate/pom.xml
+++ b/modules/hibernate/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-hibernate</artifactId>
-    <version>1.0.1-RC2-SNAPSHOT</version>
+    <version>1.0.1-RC1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fd9cdff6/modules/indexing/pom.xml
----------------------------------------------------------------------
diff --git a/modules/indexing/pom.xml b/modules/indexing/pom.xml
index 0890931..5851e66 100644
--- a/modules/indexing/pom.xml
+++ b/modules/indexing/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-indexing</artifactId>
-    <version>1.0.1-RC2-SNAPSHOT</version>
+    <version>1.0.1-RC1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fd9cdff6/modules/jcl/pom.xml
----------------------------------------------------------------------
diff --git a/modules/jcl/pom.xml b/modules/jcl/pom.xml
index 84e5030..c2d1851 100644
--- a/modules/jcl/pom.xml
+++ b/modules/jcl/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-jcl</artifactId>
-    <version>1.0.1-RC2-SNAPSHOT</version>
+    <version>1.0.1-RC1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fd9cdff6/modules/jta/pom.xml
----------------------------------------------------------------------
diff --git a/modules/jta/pom.xml b/modules/jta/pom.xml
index 35393c1..dbf4eac 100644
--- a/modules/jta/pom.xml
+++ b/modules/jta/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-jta</artifactId>
-    <version>1.0.1-RC2-SNAPSHOT</version>
+    <version>1.0.1-RC1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fd9cdff6/modules/log4j/pom.xml
----------------------------------------------------------------------
diff --git a/modules/log4j/pom.xml b/modules/log4j/pom.xml
index c180539..6f88587 100644
--- a/modules/log4j/pom.xml
+++ b/modules/log4j/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-log4j</artifactId>
-    <version>1.0.1-RC2-SNAPSHOT</version>
+    <version>1.0.1-RC1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fd9cdff6/modules/rest-http/pom.xml
----------------------------------------------------------------------
diff --git a/modules/rest-http/pom.xml b/modules/rest-http/pom.xml
index b81d77c..cbade02 100644
--- a/modules/rest-http/pom.xml
+++ b/modules/rest-http/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-rest-http</artifactId>
-    <version>1.0.1-RC2-SNAPSHOT</version>
+    <version>1.0.1-RC1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fd9cdff6/modules/scalar/pom.xml
----------------------------------------------------------------------
diff --git a/modules/scalar/pom.xml b/modules/scalar/pom.xml
index b7cd39d..83de256 100644
--- a/modules/scalar/pom.xml
+++ b/modules/scalar/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-scalar</artifactId>
-    <version>1.0.1-RC2-SNAPSHOT</version>
+    <version>1.0.1-RC1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fd9cdff6/modules/schedule/pom.xml
----------------------------------------------------------------------
diff --git a/modules/schedule/pom.xml b/modules/schedule/pom.xml
index bd4ebf2..fe11f3f 100644
--- a/modules/schedule/pom.xml
+++ b/modules/schedule/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-schedule</artifactId>
-    <version>1.0.1-RC2-SNAPSHOT</version>
+    <version>1.0.1-RC1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fd9cdff6/modules/schema-import/pom.xml
----------------------------------------------------------------------
diff --git a/modules/schema-import/pom.xml b/modules/schema-import/pom.xml
index 441479f..9eb95c1 100644
--- a/modules/schema-import/pom.xml
+++ b/modules/schema-import/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-schema-import</artifactId>
-    <version>1.0.1-RC2-SNAPSHOT</version>
+    <version>1.0.1-RC1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fd9cdff6/modules/slf4j/pom.xml
----------------------------------------------------------------------
diff --git a/modules/slf4j/pom.xml b/modules/slf4j/pom.xml
index 3527591..9feba39 100644
--- a/modules/slf4j/pom.xml
+++ b/modules/slf4j/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-slf4j</artifactId>
-    <version>1.0.1-RC2-SNAPSHOT</version>
+    <version>1.0.1-RC1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fd9cdff6/modules/spring/pom.xml
----------------------------------------------------------------------
diff --git a/modules/spring/pom.xml b/modules/spring/pom.xml
index 49b97ae..533c1f2 100644
--- a/modules/spring/pom.xml
+++ b/modules/spring/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-spring</artifactId>
-    <version>1.0.1-RC2-SNAPSHOT</version>
+    <version>1.0.1-RC1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fd9cdff6/modules/ssh/pom.xml
----------------------------------------------------------------------
diff --git a/modules/ssh/pom.xml b/modules/ssh/pom.xml
index 528bf1d..1f70406 100644
--- a/modules/ssh/pom.xml
+++ b/modules/ssh/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-ssh</artifactId>
-    <version>1.0.1-RC2-SNAPSHOT</version>
+    <version>1.0.1-RC1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fd9cdff6/modules/tools/pom.xml
----------------------------------------------------------------------
diff --git a/modules/tools/pom.xml b/modules/tools/pom.xml
index d1f91a7..68b1fb9 100644
--- a/modules/tools/pom.xml
+++ b/modules/tools/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-tools</artifactId>
-    <version>1.0.1-RC2-SNAPSHOT</version>
+    <version>1.0.1-RC1-SNAPSHOT</version>
 
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fd9cdff6/modules/urideploy/pom.xml
----------------------------------------------------------------------
diff --git a/modules/urideploy/pom.xml b/modules/urideploy/pom.xml
index 82e87e6..d8a9aa1 100644
--- a/modules/urideploy/pom.xml
+++ b/modules/urideploy/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-urideploy</artifactId>
-    <version>1.0.1-RC2-SNAPSHOT</version>
+    <version>1.0.1-RC1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fd9cdff6/modules/visor-console/pom.xml
----------------------------------------------------------------------
diff --git a/modules/visor-console/pom.xml b/modules/visor-console/pom.xml
index 4fff01d..bd1d20c 100644
--- a/modules/visor-console/pom.xml
+++ b/modules/visor-console/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-visor-console</artifactId>
-    <version>1.0.1-RC2-SNAPSHOT</version>
+    <version>1.0.1-RC1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fd9cdff6/modules/visor-plugins/pom.xml
----------------------------------------------------------------------
diff --git a/modules/visor-plugins/pom.xml b/modules/visor-plugins/pom.xml
index f05a68b..a63289d 100644
--- a/modules/visor-plugins/pom.xml
+++ b/modules/visor-plugins/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-visor-plugins</artifactId>
-    <version>1.0.1-RC2-SNAPSHOT</version>
+    <version>1.0.1-RC1-SNAPSHOT</version>
 
     <dependencies>
         <!-- Ignite dependencies -->

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fd9cdff6/modules/web/pom.xml
----------------------------------------------------------------------
diff --git a/modules/web/pom.xml b/modules/web/pom.xml
index 09bdbfa..eeeec39 100644
--- a/modules/web/pom.xml
+++ b/modules/web/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-web</artifactId>
-    <version>1.0.1-RC2-SNAPSHOT</version>
+    <version>1.0.1-RC1-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fd9cdff6/modules/yardstick/pom.xml
----------------------------------------------------------------------
diff --git a/modules/yardstick/pom.xml b/modules/yardstick/pom.xml
index 61406b7..0d2e81a 100644
--- a/modules/yardstick/pom.xml
+++ b/modules/yardstick/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-yardstick</artifactId>
-    <version>1.0.1-RC2-SNAPSHOT</version>
+    <version>1.0.1-RC1-SNAPSHOT</version>
 
     <properties>
         <yardstick.version>0.7.0</yardstick.version>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fd9cdff6/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 38d2303..c9dfce4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -32,7 +32,7 @@
 
     <groupId>org.apache.ignite</groupId>
     <artifactId>incubator-ignite</artifactId>
-    <version>1.0.1-RC2-SNAPSHOT</version>
+    <version>1.0.1-RC1-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <properties>


[46/50] [abbrv] incubator-ignite git commit: ignite-696 IgniteCache.size() should return primary key size by default

Posted by ag...@apache.org.
ignite-696 IgniteCache.size() should return primary key size by default


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

Branch: refs/heads/ignite-674
Commit: c6877a7cb1a76f8030ec8551f30ae473511bd6d6
Parents: a60f47d
Author: Andrey Gura <ag...@gridgain.com>
Authored: Wed Apr 8 22:42:16 2015 +0300
Committer: Andrey Gura <ag...@gridgain.com>
Committed: Thu Apr 9 20:49:10 2015 +0300

----------------------------------------------------------------------
 .../java/org/apache/ignite/IgniteCache.java     |  6 ++-
 .../processors/cache/GridCacheAdapter.java      | 25 +++++++-----
 .../cache/GridCacheAbstractFullApiSelfTest.java | 13 ++++---
 .../GridCacheAbstractIteratorsSelfTest.java     |  3 +-
 .../cache/GridCacheAbstractSelfTest.java        | 10 ++---
 .../cache/GridCacheClearAllSelfTest.java        |  2 +-
 .../cache/GridCacheDeploymentSelfTest.java      |  9 +++--
 .../GridCachePreloadingEvictionsSelfTest.java   | 23 +++++------
 .../cache/GridCacheSwapPreloadSelfTest.java     |  5 ++-
 .../cache/IgniteCachePeekModesAbstractTest.java | 40 ++++++++++----------
 .../GridCacheMultiNodeAbstractTest.java         | 13 ++++---
 .../dht/GridCacheDhtEntrySelfTest.java          | 12 +++---
 .../dht/GridCacheDhtPreloadUnloadSelfTest.java  |  2 +-
 .../near/GridCacheNearMultiNodeSelfTest.java    | 26 ++++++-------
 ...idCacheNearOnlyMultiNodeFullApiSelfTest.java |  2 +-
 ...achePartitionedMultiNodeFullApiSelfTest.java |  6 +--
 .../near/IgniteCacheNearReadCommittedTest.java  |  4 +-
 ...CacheReplicatedPreloadLifecycleSelfTest.java |  5 ++-
 .../GridCacheReplicatedPreloadSelfTest.java     | 23 ++++++-----
 .../cache/ttl/CacheTtlAbstractSelfTest.java     | 14 +++----
 20 files changed, 131 insertions(+), 112 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c6877a7c/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 5c5bb25..959ec1a 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
@@ -260,7 +260,8 @@ public interface IgniteCache<K, V> extends javax.cache.Cache<K, V>, IgniteAsyncS
     public void localPromote(Set<? extends K> keys) throws CacheException;
 
     /**
-     * Gets the number of all entries cached across all nodes.
+     * Gets the number of all entries cached across all nodes. By default, if {@code peekModes} value isn't defined
+     * size across all primary copies of partitioned cache will be returned (for all configured storages).
      * <p>
      * NOTE: this operation is distributed and will query all participating nodes for their cache sizes.
      *
@@ -271,7 +272,8 @@ public interface IgniteCache<K, V> extends javax.cache.Cache<K, V>, IgniteAsyncS
     public int size(CachePeekMode... peekModes) throws CacheException;
 
     /**
-     * Gets the number of all entries cached on this node.
+     * Gets the number of all entries cached on this node. By default, if {@code peekModes} value isn't defined
+     * size of primary copy of partitioned cache will be returned (for all configured storages).
      *
      * @param peekModes Optional peek modes. If not provided, then total cache size is returned.
      * @return Cache size on this node.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c6877a7c/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 9281976..45c449b 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
@@ -626,7 +626,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
 
         ctx.checkSecurity(GridSecurityPermission.CACHE_READ);
 
-        PeekModes modes = parsePeekModes(peekModes);
+        PeekModes modes = parsePeekModes(peekModes, false);
 
         Collection<Iterator<Cache.Entry<K, V>>> its = new ArrayList<>();
 
@@ -687,7 +687,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
 
         ctx.checkSecurity(GridSecurityPermission.CACHE_READ);
 
-        PeekModes modes = parsePeekModes(peekModes);
+        PeekModes modes = parsePeekModes(peekModes, false);
 
         try {
             KeyCacheObject cacheKey = ctx.toCacheKeyObject(key);
@@ -3737,7 +3737,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
     @Override public IgniteInternalFuture<Integer> sizeAsync(CachePeekMode[] peekModes) {
         assert peekModes != null;
 
-        PeekModes modes = parsePeekModes(peekModes);
+        PeekModes modes = parsePeekModes(peekModes, true);
 
         IgniteClusterEx cluster = ctx.grid().cluster();
 
@@ -3769,7 +3769,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
     /** {@inheritDoc} */
     @SuppressWarnings("ForLoopReplaceableByForEach")
     @Override public int localSize(CachePeekMode[] peekModes) throws IgniteCheckedException {
-        PeekModes modes = parsePeekModes(peekModes);
+        PeekModes modes = parsePeekModes(peekModes, true);
 
         int size = 0;
 
@@ -4920,15 +4920,19 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
 
     /**
      * @param peekModes Cache peek modes array.
+     * @param primary Defines the default behavior if affinity flags are not specified.
      * @return Peek modes flags.
      */
-    private static PeekModes parsePeekModes(CachePeekMode[] peekModes) {
+    private static PeekModes parsePeekModes(CachePeekMode[] peekModes, boolean primary) {
         PeekModes modes = new PeekModes();
 
         if (F.isEmpty(peekModes)) {
-            modes.near = true;
             modes.primary = true;
-            modes.backup = true;
+
+            if (!primary) {
+                modes.backup = true;
+                modes.near = true;
+            }
 
             modes.heap = true;
             modes.offheap = true;
@@ -4994,8 +4998,11 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
 
         if (!(modes.primary || modes.backup || modes.near)) {
             modes.primary = true;
-            modes.backup = true;
-            modes.near = true;
+
+            if (!primary) {
+                modes.backup = true;
+                modes.near = true;
+            }
         }
 
         assert modes.heap || modes.offheap || modes.swap;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c6877a7c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
index 1238565..30c2515 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
@@ -287,7 +287,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
                 if (ctx.affinity().localNode(key, new AffinityTopologyVersion(ctx.discovery().topologyVersion())))
                     sum++;
 
-            assertEquals("Incorrect key size on cache #" + i, sum, jcache(i).localSize());
+            assertEquals("Incorrect key size on cache #" + i, sum, jcache(i).localSize(CachePeekMode.ALL));
         }
 
         for (int i = 0; i < gridCount(); i++) {
@@ -312,7 +312,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
         int globalSize = globalPrimarySize * times;
 
         for (int i = 0; i < gridCount(); i++)
-            assertEquals(globalSize, jcache(i).size());
+            assertEquals(globalSize, jcache(i).size(CachePeekMode.ALL));
     }
 
     /**
@@ -3731,7 +3731,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
      */
     protected void checkSize(Collection<String> keys) throws Exception {
         if (nearEnabled())
-            assertEquals(keys.size(), jcache().localSize());
+            assertEquals(keys.size(), jcache().localSize(CachePeekMode.ALL));
         else {
             for (int i = 0; i < gridCount(); i++) {
                 GridCacheContext<String, Integer> ctx = context(i);
@@ -3753,7 +3753,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
                     }
                 }
 
-                assertEquals("Incorrect size on cache #" + i, size, jcache(i).localSize());
+                assertEquals("Incorrect size on cache #" + i, size, jcache(i).localSize(CachePeekMode.ALL));
             }
         }
     }
@@ -3764,7 +3764,8 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
      */
     protected void checkKeySize(Collection<String> keys) throws Exception {
         if (nearEnabled())
-            assertEquals("Invalid key size: " + jcache().localSize(), keys.size(), jcache().localSize());
+            assertEquals("Invalid key size: " + jcache().localSize(CachePeekMode.ALL),
+                keys.size(), jcache().localSize(CachePeekMode.ALL));
         else {
             for (int i = 0; i < gridCount(); i++) {
                 GridCacheContext<String, Integer> ctx = context(i);
@@ -3775,7 +3776,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
                     if (ctx.affinity().localNode(key, ctx.discovery().topologyVersionEx()))
                         size++;
 
-                assertEquals("Incorrect key size on cache #" + i, size, jcache(i).localSize());
+                assertEquals("Incorrect key size on cache #" + i, size, jcache(i).localSize(CachePeekMode.ALL));
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c6877a7c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractIteratorsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractIteratorsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractIteratorsSelfTest.java
index 46d053b..b6cf3dd 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractIteratorsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractIteratorsSelfTest.java
@@ -17,6 +17,7 @@
 
 package org.apache.ignite.internal.processors.cache;
 
+import org.apache.ignite.cache.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.testframework.*;
@@ -95,7 +96,7 @@ public abstract class GridCacheAbstractIteratorsSelfTest extends GridCacheAbstra
      * @throws Exception If failed.
      */
     public void testEntrySetIterator() throws Exception {
-        assert jcache().localSize() == entryCount();
+        assert jcache().localSize(CachePeekMode.ALL) == entryCount();
 
         int cnt = 0;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c6877a7c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java
index aa0b3d4..342eb5a 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java
@@ -112,7 +112,7 @@ public abstract class GridCacheAbstractSelfTest extends GridCommonAbstractTest {
                     final int fi = i;
 
                     assertTrue(
-                        "Cache is not empty: " + " localSize = " + jcache(fi).localSize()
+                        "Cache is not empty: " + " localSize = " + jcache(fi).localSize(CachePeekMode.ALL)
                         + ", local entries " + entrySet(jcache(fi).localEntries()),
                         GridTestUtils.waitForCondition(
                             // Preloading may happen as nodes leave, so we need to wait.
@@ -120,12 +120,12 @@ public abstract class GridCacheAbstractSelfTest extends GridCommonAbstractTest {
                                 @Override public boolean applyx() throws IgniteCheckedException {
                                     jcache(fi).removeAll();
 
-                                    if (jcache(fi).size() > 0) {
+                                    if (jcache(fi).size(CachePeekMode.ALL) > 0) {
                                         for (Cache.Entry<String, ?> k : jcache(fi).localEntries())
                                             jcache(fi).remove(k.getKey());
                                     }
 
-                                    return jcache(fi).localSize() == 0;
+                                    return jcache(fi).localSize(CachePeekMode.ALL) == 0;
                                 }
                             },
                             getTestTimeout()));
@@ -145,7 +145,7 @@ public abstract class GridCacheAbstractSelfTest extends GridCommonAbstractTest {
                         ", entrySet=" + jcache(i).localEntries() + ']');
 
                     assertEquals("Cache is not empty [idx=" + i + ", entrySet=" + jcache(i).localEntries() + ']',
-                        0, jcache(i).localSize());
+                        0, jcache(i).localSize(CachePeekMode.ALL));
 
                     break;
                 }
@@ -165,7 +165,7 @@ public abstract class GridCacheAbstractSelfTest extends GridCommonAbstractTest {
         }
 
         assert jcache().unwrap(Ignite.class).transactions().tx() == null;
-        assertEquals("Cache is not empty", 0, jcache().localSize());
+        assertEquals("Cache is not empty", 0, jcache().localSize(CachePeekMode.ALL));
 
         resetStore();
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c6877a7c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheClearAllSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheClearAllSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheClearAllSelfTest.java
index 353f4e3..b4d385a 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheClearAllSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheClearAllSelfTest.java
@@ -159,7 +159,7 @@ public class GridCacheClearAllSelfTest extends GridCommonAbstractTest {
         for (int i = 0; i < GRID_CNT - 1; i++) {
             IgniteCache<Object, Object> cache = grid(i).cache(CACHE_NAME);
 
-            assertEquals("Key set [i=" + i + ']', KEY_CNT, cache.localSize());
+            assertEquals("Key set [i=" + i + ']', KEY_CNT, cache.localSize(CachePeekMode.ALL));
         }
 
         assert grid(GRID_CNT - 1).cache(CACHE_NAME_OTHER).localSize() == KEY_CNT_OTHER;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c6877a7c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentSelfTest.java
index 7184a97..9d4298d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentSelfTest.java
@@ -18,6 +18,7 @@
 package org.apache.ignite.internal.processors.cache;
 
 import org.apache.ignite.*;
+import org.apache.ignite.cache.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.util.typedef.*;
@@ -247,11 +248,11 @@ public class GridCacheDeploymentSelfTest extends GridCommonAbstractTest {
 
             stopGrid(GRID_NAME);
 
-            assert g1.cache(null).localSize() == 1;
-            assert g1.cache(null).localSize() == 1;
+            assert g1.cache(null).localSize(CachePeekMode.ALL) == 1;
+            assert g1.cache(null).localSize(CachePeekMode.ALL) == 1;
 
-            assert g2.cache(null).localSize() == 1;
-            assert g2.cache(null).localSize() == 1;
+            assert g2.cache(null).localSize(CachePeekMode.ALL) == 1;
+            assert g2.cache(null).localSize(CachePeekMode.ALL) == 1;
 
             startGrid(3);
         }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c6877a7c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePreloadingEvictionsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePreloadingEvictionsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePreloadingEvictionsSelfTest.java
index 89646e9..b79d4d7 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePreloadingEvictionsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePreloadingEvictionsSelfTest.java
@@ -50,6 +50,7 @@ import static org.apache.ignite.events.EventType.*;
 public class GridCachePreloadingEvictionsSelfTest extends GridCommonAbstractTest {
     /** */
     private static final String VALUE = createValue();
+    public static final CachePeekMode[] ALL_PEEK_MODES = new CachePeekMode[]{CachePeekMode.ALL};
 
     /** */
     private final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
@@ -111,7 +112,7 @@ public class GridCachePreloadingEvictionsSelfTest extends GridCommonAbstractTest
 
             final CountDownLatch startLatch = new CountDownLatch(1);
 
-            int oldSize = cache1.localSize();
+            int oldSize = cache1.localSize(CachePeekMode.ALL);
 
             IgniteInternalFuture fut = multithreadedAsync(
                 new Callable<Object>() {
@@ -156,7 +157,7 @@ public class GridCachePreloadingEvictionsSelfTest extends GridCommonAbstractTest
 
             checkCachesConsistency(ignite1, ignite2);
 
-            oldSize = cache1.size();
+            oldSize = cache1.size(CachePeekMode.ALL);
 
             info("Evicting on constant topology.");
 
@@ -192,8 +193,8 @@ public class GridCachePreloadingEvictionsSelfTest extends GridCommonAbstractTest
 
         assertTrue(GridTestUtils.waitForCondition(new PA() {
             @Override public boolean apply() {
-                int size1 = ignite1.cache(null).localSize();
-                return size1 != oldSize && size1 == ignite2.cache(null).localSize();
+                int size1 = ignite1.cache(null).localSize(CachePeekMode.ALL);
+                return size1 != oldSize && size1 == ignite2.cache(null).localSize(CachePeekMode.ALL);
             }
         }, getTestTimeout()));
 
@@ -223,9 +224,9 @@ public class GridCachePreloadingEvictionsSelfTest extends GridCommonAbstractTest
         GridCacheAdapter<Integer, Object> cache2 = g2.internalCache();
 
         for (int i = 0; i < 3; i++) {
-            if (cache1.size() != cache2.size()) {
-                U.warn(log, "Sizes do not match (will retry in 1000 ms) [s1=" + cache1.size() +
-                    ", s2=" + cache2.size() + ']');
+            if (cache1.size(ALL_PEEK_MODES) != cache2.size(ALL_PEEK_MODES)) {
+                U.warn(log, "Sizes do not match (will retry in 1000 ms) [s1=" + cache1.size(ALL_PEEK_MODES) +
+                    ", s2=" + cache2.size(ALL_PEEK_MODES) + ']');
 
                 U.sleep(1000);
             }
@@ -233,11 +234,11 @@ public class GridCachePreloadingEvictionsSelfTest extends GridCommonAbstractTest
                 break;
         }
 
-        info("Cache1 size: " + cache1.size());
-        info("Cache2 size: " + cache2.size());
+        info("Cache1 size: " + cache1.size(ALL_PEEK_MODES));
+        info("Cache2 size: " + cache2.size(ALL_PEEK_MODES));
 
-        assert cache1.size() == cache2.size() : "Sizes do not match [s1=" + cache1.size() +
-            ", s2=" + cache2.size() + ']';
+        assert cache1.size(ALL_PEEK_MODES) == cache2.size(ALL_PEEK_MODES) :
+            "Sizes do not match [s1=" + cache1.size(ALL_PEEK_MODES) + ", s2=" + cache2.size(ALL_PEEK_MODES) + ']';
 
         for (Integer key : cache1.keySet()) {
             Object e = cache1.localPeek(key, new CachePeekMode[] {CachePeekMode.ONHEAP}, null);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c6877a7c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java
index 051a2a9..6176da4 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java
@@ -124,7 +124,7 @@ public class GridCacheSwapPreloadSelfTest extends GridCommonAbstractTest {
 
             startGrid(1);
 
-            int size = grid(1).cache(null).localSize();
+            int size = grid(1).cache(null).localSize(CachePeekMode.ALL);
 
             info("New node cache size: " + size);
 
@@ -201,7 +201,8 @@ public class GridCacheSwapPreloadSelfTest extends GridCommonAbstractTest {
 
             fut = null;
 
-            int size = grid(1).cache(null).localSize(CachePeekMode.ONHEAP);
+            int size = grid(1).cache(null).localSize(CachePeekMode.PRIMARY, CachePeekMode.BACKUP,
+                CachePeekMode.NEAR, CachePeekMode.ONHEAP);
 
             info("New node cache size: " + size);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c6877a7c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePeekModesAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePeekModesAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePeekModesAbstractTest.java
index 4418bcd..c2eb56f 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePeekModesAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePeekModesAbstractTest.java
@@ -480,9 +480,9 @@ public abstract class IgniteCachePeekModesAbstractTest extends IgniteCacheAbstra
                 for (Integer key : keys)
                     cache0.put(key, String.valueOf(key));
 
-                assertEquals(PUT_KEYS, cache0.localSize());
                 assertEquals(PUT_KEYS, cache0.localSize(BACKUP));
                 assertEquals(PUT_KEYS, cache0.localSize(ALL));
+                assertEquals(0, cache0.localSize());
                 assertEquals(0, cache0.localSize(PRIMARY));
                 assertEquals(0, cache0.localSize(NEAR));
 
@@ -493,7 +493,7 @@ public abstract class IgniteCachePeekModesAbstractTest extends IgniteCacheAbstra
                     assertEquals(PUT_KEYS, cache.size(PRIMARY));
                     assertEquals(PUT_KEYS * (gridCount() - 1), cache.size(BACKUP));
                     assertEquals(PUT_KEYS * gridCount(), cache.size(PRIMARY, BACKUP));
-                    assertEquals(PUT_KEYS * gridCount(), cache.size()); // Primary + backups.
+                    assertEquals(PUT_KEYS * gridCount(), cache.size(ALL)); // Primary + backups.
                 }
             }
             else {
@@ -503,7 +503,7 @@ public abstract class IgniteCachePeekModesAbstractTest extends IgniteCacheAbstra
                     cache0.put(key, String.valueOf(key));
 
                 if (hasNearCache()) {
-                    assertEquals(PUT_KEYS, cache0.localSize());
+                    assertEquals(0, cache0.localSize());
                     assertEquals(PUT_KEYS, cache0.localSize(ALL));
                     assertEquals(PUT_KEYS, cache0.localSize(NEAR));
 
@@ -513,7 +513,7 @@ public abstract class IgniteCachePeekModesAbstractTest extends IgniteCacheAbstra
                         assertEquals(PUT_KEYS, cache.size(NEAR));
                         assertEquals(PUT_KEYS, cache.size(BACKUP));
                         assertEquals(PUT_KEYS * 2, cache.size(PRIMARY, BACKUP));
-                        assertEquals(PUT_KEYS * 2 + PUT_KEYS, cache.size()); // Primary + backups + near.
+                        assertEquals(PUT_KEYS * 2 + PUT_KEYS, cache.size(ALL)); // Primary + backups + near.
                     }
                 }
                 else {
@@ -527,7 +527,7 @@ public abstract class IgniteCachePeekModesAbstractTest extends IgniteCacheAbstra
                         assertEquals(0, cache.size(NEAR));
                         assertEquals(PUT_KEYS, cache.size(BACKUP));
                         assertEquals(PUT_KEYS * 2, cache.size(PRIMARY, BACKUP));
-                        assertEquals(PUT_KEYS * 2, cache.size()); // Primary + backups.
+                        assertEquals(PUT_KEYS * 2, cache.size(ALL)); // Primary + backups.
                     }
                 }
 
@@ -569,15 +569,15 @@ public abstract class IgniteCachePeekModesAbstractTest extends IgniteCacheAbstra
             checkPrimarySize(PUT_KEYS - 1);
 
             if (cacheMode() == REPLICATED) {
-                assertEquals(PUT_KEYS - 1, cache0.localSize());
+                assertEquals(PUT_KEYS - 1, cache0.localSize(ALL));
                 assertEquals(0, cache0.localSize(PRIMARY));
                 assertEquals(PUT_KEYS - 1, cache0.localSize(BACKUP));
             }
             else {
                 if (hasNearCache())
-                    assertEquals(PUT_KEYS - 1, cache0.localSize());
+                    assertEquals(PUT_KEYS - 1, cache0.localSize(ALL));
                 else
-                    assertEquals(0, cache0.localSize());
+                    assertEquals(0, cache0.localSize(ALL));
             }
         }
         finally {
@@ -736,12 +736,12 @@ public abstract class IgniteCachePeekModesAbstractTest extends IgniteCacheAbstra
 
             assertTrue(totalSwap + totalOffheap < totalKeys);
 
-            assertEquals(totalKeys, cache0.localSize());
+            assertEquals(primaryKeys.size(), cache0.localSize());
             assertEquals(totalKeys, cache0.localSize(ALL));
-            assertEquals(totalOffheap, cache0.localSize(OFFHEAP));
-            assertEquals(totalSwap, cache0.localSize(SWAP));
-            assertEquals(totalKeys - (totalOffheap + totalSwap), cache0.localSize(ONHEAP));
-            assertEquals(totalKeys, cache0.localSize(SWAP, OFFHEAP, ONHEAP));
+            assertEquals(totalOffheap, cache0.localSize(PRIMARY, BACKUP, NEAR, OFFHEAP));
+            assertEquals(totalSwap, cache0.localSize(PRIMARY, BACKUP, NEAR, SWAP));
+            assertEquals(totalKeys - (totalOffheap + totalSwap), cache0.localSize(PRIMARY, BACKUP, NEAR, ONHEAP));
+            assertEquals(totalKeys, cache0.localSize(PRIMARY, BACKUP, NEAR, SWAP, OFFHEAP, ONHEAP));
 
             assertEquals(swapKeys.get1(), (Integer)cache0.localSize(SWAP, PRIMARY));
             assertEquals(swapKeys.get2(), (Integer)cache0.localSize(SWAP, BACKUP));
@@ -752,7 +752,7 @@ public abstract class IgniteCachePeekModesAbstractTest extends IgniteCacheAbstra
             assertEquals(swapKeys.get1() + offheapKeys.get1(), cache0.localSize(SWAP, OFFHEAP, PRIMARY));
             assertEquals(swapKeys.get2() + offheapKeys.get2(), cache0.localSize(SWAP, OFFHEAP, BACKUP));
 
-            assertEquals(totalSwap + totalOffheap, cache0.localSize(SWAP, OFFHEAP));
+            assertEquals(totalSwap + totalOffheap, cache0.localSize(PRIMARY, BACKUP, NEAR, SWAP, OFFHEAP));
 
             int globalSwapPrimary = 0;
             int globalSwapBackup = 0;
@@ -792,24 +792,24 @@ public abstract class IgniteCachePeekModesAbstractTest extends IgniteCacheAbstra
             for (int i = 0; i < gridCount(); i++) {
                 IgniteCache<Integer, String> cache = jcache(i);
 
-                assertEquals(globalTotal, cache.size());
+                assertEquals(totalKeys, cache.size(PRIMARY));
                 assertEquals(globalTotal, cache.size(ALL));
-                assertEquals(globalTotal, cache.size(ONHEAP, OFFHEAP, SWAP));
+                assertEquals(globalTotal, cache.size(PRIMARY, BACKUP, NEAR, ONHEAP, OFFHEAP, SWAP));
                 assertEquals(globalTotal, cache.size(ONHEAP, OFFHEAP, SWAP, PRIMARY, BACKUP));
 
-                assertEquals(globalTotalSwap, cache.size(SWAP));
+                assertEquals(globalTotalSwap, cache.size(PRIMARY, BACKUP, NEAR, SWAP));
                 assertEquals(globalSwapPrimary, cache.size(SWAP, PRIMARY));
                 assertEquals(globalSwapBackup, cache.size(SWAP, BACKUP));
 
-                assertEquals(globalTotalOffheap, cache.size(OFFHEAP));
+                assertEquals(globalTotalOffheap, cache.size(PRIMARY, BACKUP, NEAR, OFFHEAP));
                 assertEquals(globalOffheapPrimary, cache.size(OFFHEAP, PRIMARY));
                 assertEquals(globalOffheapBackup, cache.size(OFFHEAP, BACKUP));
 
-                assertEquals(globalTotalSwap + globalTotalOffheap, cache.size(SWAP, OFFHEAP));
+                assertEquals(globalTotalSwap + globalTotalOffheap, cache.size(PRIMARY, BACKUP, NEAR, SWAP, OFFHEAP));
                 assertEquals(globalSwapPrimary + globalOffheapPrimary, cache.size(SWAP, OFFHEAP, PRIMARY));
                 assertEquals(globalSwapBackup + globalOffheapBackup, cache.size(SWAP, OFFHEAP, BACKUP));
 
-                assertEquals(globalTotal - (globalTotalOffheap + globalTotalSwap), cache.size(ONHEAP));
+                assertEquals(globalTotal - (globalTotalOffheap + globalTotalSwap), cache.size(PRIMARY, BACKUP, NEAR, ONHEAP));
             }
         }
         finally {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c6877a7c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeAbstractTest.java
index 0320476..78bff83 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeAbstractTest.java
@@ -18,6 +18,7 @@
 package org.apache.ignite.internal.processors.cache.distributed;
 
 import org.apache.ignite.*;
+import org.apache.ignite.cache.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.events.*;
 import org.apache.ignite.internal.util.tostring.*;
@@ -340,15 +341,15 @@ public abstract class GridCacheMultiNodeAbstractTest extends GridCommonAbstractT
         cache2.put(2, "val2");
         cache3.put(3, "val3");
 
-        assertEquals(3, cache1.localSize());
-        assertEquals(3, cache2.localSize());
-        assertEquals(3, cache3.localSize());
+        assertEquals(3, cache1.localSize(CachePeekMode.ALL));
+        assertEquals(3, cache2.localSize(CachePeekMode.ALL));
+        assertEquals(3, cache3.localSize(CachePeekMode.ALL));
 
         cache1.clear();
 
-        assertEquals(0, cache1.localSize());
-        assertEquals(0, cache2.localSize());
-        assertEquals(0, cache3.localSize());
+        assertEquals(0, cache1.localSize(CachePeekMode.ALL));
+        assertEquals(0, cache2.localSize(CachePeekMode.ALL));
+        assertEquals(0, cache3.localSize(CachePeekMode.ALL));
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c6877a7c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEntrySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEntrySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEntrySelfTest.java
index b6cff17..170ff18 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEntrySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEntrySelfTest.java
@@ -178,10 +178,10 @@ public class GridCacheDhtEntrySelfTest extends GridCommonAbstractTest {
 
         assert !internalCache(near0).clearLocally(key);
 
-        assertEquals(1, near0.localSize());
+        assertEquals(1, near0.localSize(CachePeekMode.ALL));
         assertEquals(1, dht0.size());
 
-        assertEquals(1, near1.localSize());
+        assertEquals(1, near1.localSize(CachePeekMode.ALL));
         assertEquals(0, dht1.size());
     }
 
@@ -269,18 +269,18 @@ public class GridCacheDhtEntrySelfTest extends GridCommonAbstractTest {
 
         assert !e0.evictInternal(false, dht0.context().versions().next(), null);
 
-        assertEquals(1, near0.localSize());
+        assertEquals(1, near0.localSize(CachePeekMode.ALL));
         assertEquals(1, dht0.localSize(null));
 
-        assertEquals(1, near1.localSize());
+        assertEquals(1, near1.localSize(CachePeekMode.ALL));
         assertEquals(0, dht1.localSize(null));
 
         assert !e0.evictInternal(true, dht0.context().versions().next(), null);
 
-        assertEquals(1, near0.localSize());
+        assertEquals(1, near0.localSize(CachePeekMode.ALL));
         assertEquals(1, dht0.localSize(null));
 
-        assertEquals(1, near1.localSize());
+        assertEquals(1, near1.localSize(CachePeekMode.ALL));
         assertEquals(0, dht1.localSize(null));
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c6877a7c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadUnloadSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadUnloadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadUnloadSelfTest.java
index e2fd38d..ed41d8d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadUnloadSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadUnloadSelfTest.java
@@ -173,7 +173,7 @@ public class GridCacheDhtPreloadUnloadSelfTest extends GridCommonAbstractTest {
                 IgniteCache<Integer, String> c = grid(i).cache(null);
 
                 // Nothing should be unloaded since nodes are backing up each other.
-                assertEquals(cnt, c.localSize());
+                assertEquals(cnt, c.localSize(CachePeekMode.ALL));
             }
         }
         finally {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c6877a7c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMultiNodeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMultiNodeSelfTest.java
index 548564a..3c6c777 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMultiNodeSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMultiNodeSelfTest.java
@@ -402,8 +402,8 @@ public class GridCacheNearMultiNodeSelfTest extends GridCommonAbstractTest {
         assertEquals("2", localPeek(dht(primaryGrid(2)), 2));
         assertEquals("3", localPeek(dht(primaryGrid(3)), 3));
 
-        assertEquals(2, near.localSize());
-        assertEquals(2, near.localSize());
+        assertEquals(2, near.localSize(CachePeekMode.ALL));
+        assertEquals(2, near.localSize(CachePeekMode.ALL));
     }
 
     /** @throws Exception If failed. */
@@ -446,8 +446,8 @@ public class GridCacheNearMultiNodeSelfTest extends GridCommonAbstractTest {
 
         assertEquals("3", localPeek(dht(primaryIgnite), 3));
 
-        assertEquals(1, near.localSize());
-        assertEquals(1, near.localSize());
+        assertEquals(1, near.localSize(CachePeekMode.ALL));
+        assertEquals(1, near.localSize(CachePeekMode.ALL));
 
         assertEquals(1, dht(primaryIgnite).size());
 
@@ -485,8 +485,8 @@ public class GridCacheNearMultiNodeSelfTest extends GridCommonAbstractTest {
         assertEquals("2", localPeek(dht(primaryGrid(2)), 2));
         assertEquals("3", localPeek(dht(primaryGrid(3)), 3));
 
-        assertEquals(2, near.localSize());
-        assertEquals(2, near.localSize());
+        assertEquals(2, near.localSize(CachePeekMode.ALL));
+        assertEquals(2, near.localSize(CachePeekMode.ALL));
     }
 
     /**
@@ -529,8 +529,8 @@ public class GridCacheNearMultiNodeSelfTest extends GridCommonAbstractTest {
         assertEquals("2", localPeek(dht(primaryGrid(2)), 2));
         assertEquals("3", localPeek(dht(primaryGrid(3)), 3));
 
-        assertEquals(2, near.localSize());
-        assertEquals(2, near.localSize());
+        assertEquals(2, near.localSize(CachePeekMode.ALL));
+        assertEquals(2, near.localSize(CachePeekMode.ALL));
     }
 
     /** @throws Exception If failed. */
@@ -547,8 +547,8 @@ public class GridCacheNearMultiNodeSelfTest extends GridCommonAbstractTest {
         assertEquals("1", near.getAndPutIfAbsent(key, "2"));
 
         assertEquals("1", near.localPeek(key, CachePeekMode.ONHEAP));
-        assertEquals(1, near.localSize());
-        assertEquals(1, near.localSize());
+        assertEquals(1, near.localSize(CachePeekMode.ALL));
+        assertEquals(1, near.localSize(CachePeekMode.ALL));
 
         assertEquals("1", near.getAndReplace(key, "2"));
         assertEquals("2", near.localPeek(key, CachePeekMode.ONHEAP));
@@ -556,12 +556,12 @@ public class GridCacheNearMultiNodeSelfTest extends GridCommonAbstractTest {
         assertTrue(near.replace(key, "2"));
 
         assertEquals("2", near.localPeek(key, CachePeekMode.ONHEAP));
-        assertEquals(1, near.localSize());
-        assertEquals(1, near.localSize());
+        assertEquals(1, near.localSize(CachePeekMode.ALL));
+        assertEquals(1, near.localSize(CachePeekMode.ALL));
 
         assertTrue(near.remove(key, "2"));
 
-        assertEquals(0, near.localSize());
+        assertEquals(0, near.localSize(CachePeekMode.ALL));
     }
 
     /** @throws Exception If failed. */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c6877a7c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyMultiNodeFullApiSelfTest.java
index 0f699e7..92ae07a 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyMultiNodeFullApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyMultiNodeFullApiSelfTest.java
@@ -174,7 +174,7 @@ public class GridCacheNearOnlyMultiNodeFullApiSelfTest extends GridCachePartitio
 
         checkSize(map.keySet());
 
-        assertEquals(10, nearCache.localSize());
+        assertEquals(10, nearCache.localSize(CachePeekMode.ALL));
 
         int fullCacheSize = 0;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c6877a7c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeFullApiSelfTest.java
index 2258b86..caacc2b 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeFullApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeFullApiSelfTest.java
@@ -321,15 +321,15 @@ public class GridCachePartitionedMultiNodeFullApiSelfTest extends GridCacheParti
         assertEquals(Integer.valueOf(1), cache2.get(keys.get(1)));
 
         assertEquals(0, cache0.localSize(NEAR));
-        assertEquals(5, cache0.localSize() - cache0.localSize(NEAR));
+        assertEquals(5, cache0.localSize(CachePeekMode.ALL) - cache0.localSize(NEAR));
 
         IgniteCache<String, Integer> cache1 = jcache(1);
 
         assertEquals(0, cache1.localSize(NEAR));
-        assertEquals(5, cache1.localSize() - cache1.localSize(NEAR));
+        assertEquals(5, cache1.localSize(CachePeekMode.ALL) - cache1.localSize(NEAR));
 
         assertEquals(nearEnabled() ? 2 : 0, cache2.localSize(NEAR));
-        assertEquals(0, cache2.localSize() - cache2.localSize(NEAR));
+        assertEquals(0, cache2.localSize(CachePeekMode.ALL) - cache2.localSize(NEAR));
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c6877a7c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearReadCommittedTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearReadCommittedTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearReadCommittedTest.java
index 254cf09..0478cfc 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearReadCommittedTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearReadCommittedTest.java
@@ -57,7 +57,7 @@ public class IgniteCacheNearReadCommittedTest extends GridCacheAbstractSelfTest
 
         cache.put(key, key);
 
-        assertEquals(1, cache.localSize());
+        assertEquals(1, cache.localSize(CachePeekMode.ALL));
 
         try (Transaction tx = ignite(0).transactions().txStart(PESSIMISTIC, READ_COMMITTED)) {
             assertEquals(key, cache.get(key));
@@ -67,6 +67,6 @@ public class IgniteCacheNearReadCommittedTest extends GridCacheAbstractSelfTest
 
         ignite(1).cache(null).remove(key); // Remove from primary node.
 
-        assertEquals(0, cache.localSize());
+        assertEquals(0, cache.localSize(CachePeekMode.ALL));
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c6877a7c/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 e6c5517..4e6e08c 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
@@ -18,6 +18,7 @@
 package org.apache.ignite.internal.processors.cache.distributed.replicated.preloader;
 
 import org.apache.ignite.*;
+import org.apache.ignite.cache.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.cache.*;
@@ -151,8 +152,8 @@ public class GridCacheReplicatedPreloadLifecycleSelfTest extends GridCachePreloa
                 IgniteCache<String, MyValue> c1 = grid(j).cache("one");
                 IgniteCache<String, MyValue> c2 = grid(j).cache("two");
 
-                int size1 = c1.localSize();
-                int size2 = c2.localSize();
+                int size1 = c1.localSize(CachePeekMode.ALL);
+                int size2 = c2.localSize(CachePeekMode.ALL);
 
                 assertEquals(" Invalid cache1 size [i=" + i + ", j=" + j + ", size=" + size1 + ']', keys.length, size1);
                 assertEquals(" Invalid cache2 size [i=" + i + ", j=" + j + ", size=" + size2 + ']', keys.length / 2, size2);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c6877a7c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadSelfTest.java
index 9ebbebc..2bec185 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadSelfTest.java
@@ -280,7 +280,7 @@ public class GridCacheReplicatedPreloadSelfTest extends GridCommonAbstractTest {
 
             IgniteCache<Integer, String> cache2 = startGrid(2).cache(null);
 
-            assertEquals(keyCnt, cache2.localSize());
+            assertEquals(keyCnt, cache2.localSize(CachePeekMode.ALL));
         }
         finally {
             stopAllGrids();
@@ -304,11 +304,12 @@ public class GridCacheReplicatedPreloadSelfTest extends GridCommonAbstractTest {
 
             IgniteCache<Integer, String> cache2 = startGrid(2).cache(null);
 
-            int size = cache2.localSize();
+            int size = cache2.localSize(CachePeekMode.ALL);
 
             info("Size of cache2: " + size);
 
-            assert waitCacheSize(cache2, keyCnt, getTestTimeout()) : "Actual cache size: " + cache2.localSize();
+            assert waitCacheSize(cache2, keyCnt, getTestTimeout()) :
+                "Actual cache size: " + cache2.localSize(CachePeekMode.ALL);
         }
         finally {
             stopAllGrids();
@@ -331,14 +332,14 @@ public class GridCacheReplicatedPreloadSelfTest extends GridCommonAbstractTest {
 
         long end = System.currentTimeMillis() + timeout;
 
-        while (cache.localSize() < expSize) {
+        while (cache.localSize(CachePeekMode.ALL) < expSize) {
             Thread.sleep(50);
 
             if (end - System.currentTimeMillis() <= 0)
                 break;
         }
 
-        return cache.localSize() >= expSize;
+        return cache.localSize(CachePeekMode.ALL) >= expSize;
     }
 
     /**
@@ -358,7 +359,7 @@ public class GridCacheReplicatedPreloadSelfTest extends GridCommonAbstractTest {
 
             IgniteCache<Integer, String> cache2 = startGrid(2).cache(null);
 
-            assertEquals(cnt, cache2.localSize());
+            assertEquals(cnt, cache2.localSize(CachePeekMode.ALL));
         }
         finally {
             stopAllGrids();
@@ -382,7 +383,7 @@ public class GridCacheReplicatedPreloadSelfTest extends GridCommonAbstractTest {
 
             IgniteCache<Integer, String> cache2 = startGrid(2).cache(null);
 
-            assertEquals(cnt, cache2.localSize());
+            assertEquals(cnt, cache2.localSize(CachePeekMode.ALL));
         }
         finally {
             stopAllGrids();
@@ -406,7 +407,7 @@ public class GridCacheReplicatedPreloadSelfTest extends GridCommonAbstractTest {
 
             IgniteCache<Integer, String> cache2 = startGrid(2).cache(null);
 
-            assertEquals(cnt, cache2.localSize());
+            assertEquals(cnt, cache2.localSize(CachePeekMode.ALL));
         }
         finally {
             stopGrid(1);
@@ -450,7 +451,8 @@ public class GridCacheReplicatedPreloadSelfTest extends GridCommonAbstractTest {
                 grid(0).cache(null).putAll(map);
 
             for (int gridIdx = 0; gridIdx < gridCnt; gridIdx++) {
-                assert grid(gridIdx).cache(null).localSize() == cnt : "Actual size: " + grid(gridIdx).cache(null).localSize();
+                assert grid(gridIdx).cache(null).localSize(CachePeekMode.ALL) == cnt :
+                    "Actual size: " + grid(gridIdx).cache(null).localSize(CachePeekMode.ALL);
 
                 info("Cache size is OK for grid index: " + gridIdx);
             }
@@ -467,7 +469,8 @@ public class GridCacheReplicatedPreloadSelfTest extends GridCommonAbstractTest {
 
             stopGrid(idx);
 
-            assert waitCacheSize(lastCache, cnt, 20 * 1000) : "Actual cache size: " + lastCache.localSize();
+            assert waitCacheSize(lastCache, cnt, 20 * 1000) :
+                "Actual cache size: " + lastCache.localSize(CachePeekMode.ALL);
         }
         finally {
             stopAllGrids();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c6877a7c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlAbstractSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlAbstractSelfTest.java
index c56dfd4..3833576 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlAbstractSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlAbstractSelfTest.java
@@ -313,20 +313,20 @@ public abstract class CacheTtlAbstractSelfTest extends GridCommonAbstractTest {
             IgniteCache<Integer, Integer> cache = jcache(i);
 
             log.info("Size [node=" + i +
-                ", heap=" + cache.localSize(ONHEAP) +
-                ", offheap=" + cache.localSize(OFFHEAP) +
-                ", swap=" + cache.localSize(SWAP) + ']');
+                ", heap=" + cache.localSize(PRIMARY, BACKUP, NEAR, ONHEAP) +
+                ", offheap=" + cache.localSize(PRIMARY, BACKUP, NEAR, OFFHEAP) +
+                ", swap=" + cache.localSize(PRIMARY, BACKUP, NEAR, SWAP) + ']');
 
             if (memoryMode() == CacheMemoryMode.OFFHEAP_TIERED) {
-                assertEquals("Unexpected size, node: " + i, 0, cache.localSize(ONHEAP));
-                assertEquals("Unexpected size, node: " + i, size, cache.localSize(OFFHEAP));
+                assertEquals("Unexpected size, node: " + i, 0, cache.localSize(PRIMARY, BACKUP, NEAR, ONHEAP));
+                assertEquals("Unexpected size, node: " + i, size, cache.localSize(PRIMARY, BACKUP, NEAR, OFFHEAP));
             }
             else {
                 assertEquals("Unexpected size, node: " + i, size > MAX_CACHE_SIZE ? MAX_CACHE_SIZE : size,
-                    cache.localSize(ONHEAP));
+                    cache.localSize(PRIMARY, BACKUP, NEAR, ONHEAP));
 
                 assertEquals("Unexpected size, node: " + i,
-                    size > MAX_CACHE_SIZE ? size - MAX_CACHE_SIZE : 0, cache.localSize(OFFHEAP));
+                    size > MAX_CACHE_SIZE ? size - MAX_CACHE_SIZE : 0, cache.localSize(PRIMARY, BACKUP, NEAR, OFFHEAP));
             }
 
             for (int key = 0; key < size; key++)


[08/50] [abbrv] incubator-ignite git commit: IGNITE-701 - Fixed test.

Posted by ag...@apache.org.
IGNITE-701 - Fixed test.


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

Branch: refs/heads/ignite-674
Commit: ada2bdefe2fe662c0bad26e623f39474876dd873
Parents: 9d183c5
Author: Alexey Goncharuk <ag...@gridgain.com>
Authored: Wed Apr 8 10:26:15 2015 -0700
Committer: Alexey Goncharuk <ag...@gridgain.com>
Committed: Wed Apr 8 10:26:15 2015 -0700

----------------------------------------------------------------------
 .../processors/cache/distributed/dht/GridDhtLockFuture.java       | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ada2bdef/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java
index 2c31a13..db7ea09 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java
@@ -870,7 +870,8 @@ public final class GridDhtLockFuture<K, V> extends GridCompoundIdentityFuture<Bo
                                     IgniteTxEntry txEntry = tx.entry(e.txKey());
 
                                     // NOOP entries will be sent to backups on prepare step.
-                                    txEntry.op(GridCacheOperation.NOOP);
+                                    if (txEntry.op() == GridCacheOperation.READ)
+                                        txEntry.op(GridCacheOperation.NOOP);
                                 }
                             }
 


[29/50] [abbrv] incubator-ignite git commit: # ignite-707

Posted by ag...@apache.org.
# ignite-707


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

Branch: refs/heads/ignite-674
Commit: 5d1815ef5eb2b0dbb929136823fbc424bc9b094c
Parents: 2412422
Author: sboikov <sb...@gridgain.com>
Authored: Thu Apr 9 13:15:41 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Thu Apr 9 13:15:41 2015 +0300

----------------------------------------------------------------------
 .../processors/plugin/IgnitePluginProcessor.java    | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5d1815ef/modules/core/src/main/java/org/apache/ignite/internal/processors/plugin/IgnitePluginProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/plugin/IgnitePluginProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/plugin/IgnitePluginProcessor.java
index 8d71ad7..0b9ca5e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/plugin/IgnitePluginProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/plugin/IgnitePluginProcessor.java
@@ -27,6 +27,7 @@ import org.apache.ignite.plugin.*;
 import org.jetbrains.annotations.*;
 
 import java.lang.reflect.*;
+import java.security.*;
 import java.util.*;
 
 /**
@@ -53,9 +54,20 @@ public class IgnitePluginProcessor extends GridProcessorAdapter {
 
         ExtensionRegistryImpl registry = new ExtensionRegistryImpl();
 
-        ServiceLoader<PluginProvider> ldr = ServiceLoader.load(PluginProvider.class);
+        List<PluginProvider> providers = AccessController.doPrivileged(new PrivilegedAction<List<PluginProvider>>() {
+            @Override public List<PluginProvider> run() {
+                List<PluginProvider> providers = new ArrayList<>();
 
-        for (PluginProvider provider : ldr) {
+                ServiceLoader<PluginProvider> ldr = ServiceLoader.load(PluginProvider.class);
+
+                for (PluginProvider provider : ldr)
+                    providers.add(provider);
+
+                return providers;
+            }
+        });
+
+        for (PluginProvider provider : providers) {
             GridPluginContext pluginCtx = new GridPluginContext(ctx, cfg);
 
             if (F.isEmpty(provider.name()))


[18/50] [abbrv] incubator-ignite git commit: GG-9829 Need examples for IGridCache.LoadCache() and IGridCacheStore.LoadCache() in .NET - done.

Posted by ag...@apache.org.
GG-9829 Need examples for IGridCache.LoadCache() and IGridCacheStore.LoadCache() in .NET - done.


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

Branch: refs/heads/ignite-674
Commit: 5fcb072927925ac2342a43bc0b81e226043439e2
Parents: bb0ce4b
Author: ptupitsyn <pt...@gridgain.com>
Authored: Thu Apr 9 11:50:42 2015 +0300
Committer: ptupitsyn <pt...@gridgain.com>
Committed: Thu Apr 9 11:50:42 2015 +0300

----------------------------------------------------------------------
 .../processors/cache/GridCacheAdapter.java      | 57 +++++++++++---------
 .../cache/GridLoadCacheCloseablePredicate.java  | 30 +++++++++++
 .../distributed/dht/GridDhtCacheAdapter.java    | 22 +++++---
 3 files changed, 79 insertions(+), 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5fcb0729/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 b35dbd3..5ade136 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
@@ -3452,39 +3452,48 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
 
         final ExpiryPolicy plc = plc0 != null ? plc0 : ctx.expiry();
 
-        if (ctx.store().isLocal()) {
-            DataStreamerImpl ldr = ctx.kernalContext().dataStream().dataStreamer(ctx.namex());
+        if (p != null)
+            ctx.kernalContext().resource().injectGeneric(p);
 
-            try {
-                ldr.receiver(new IgniteDrDataStreamerCacheUpdater());
+        try {
+            if (ctx.store().isLocal()) {
+                DataStreamerImpl ldr = ctx.kernalContext().dataStream().dataStreamer(ctx.namex());
+
+                try {
+                    ldr.receiver(new IgniteDrDataStreamerCacheUpdater());
 
-                LocalStoreLoadClosure c = new LocalStoreLoadClosure(p, ldr, plc);
+                    LocalStoreLoadClosure c = new LocalStoreLoadClosure(p, ldr, plc);
 
-                ctx.store().loadCache(c, args);
+                    ctx.store().loadCache(c, args);
 
-                c.onDone();
-            }
-            finally {
-                ldr.closeEx(false);
+                    c.onDone();
+                }
+                finally {
+                    ldr.closeEx(false);
+                }
             }
-        }
-        else {
-            // Version for all loaded entries.
-            final GridCacheVersion ver0 = ctx.versions().nextForLoad();
+            else {
+                // Version for all loaded entries.
+                final GridCacheVersion ver0 = ctx.versions().nextForLoad();
 
-            ctx.store().loadCache(new CIX3<KeyCacheObject, Object, GridCacheVersion>() {
-                @Override public void applyx(KeyCacheObject key, Object val, @Nullable GridCacheVersion ver)
-                    throws IgniteException {
-                    assert ver == null;
+                ctx.store().loadCache(new CIX3<KeyCacheObject, Object, GridCacheVersion>() {
+                    @Override public void applyx(KeyCacheObject key, Object val, @Nullable GridCacheVersion ver)
+                        throws IgniteException {
+                        assert ver == null;
 
-                    long ttl = CU.ttlForLoad(plc);
+                        long ttl = CU.ttlForLoad(plc);
 
-                    if (ttl == CU.TTL_ZERO)
-                        return;
+                        if (ttl == CU.TTL_ZERO)
+                            return;
 
-                    loadEntry(key, val, ver0, (IgniteBiPredicate<Object, Object>)p, topVer, replicate, ttl);
-                }
-            }, args);
+                        loadEntry(key, val, ver0, (IgniteBiPredicate<Object, Object>) p, topVer, replicate, ttl);
+                    }
+                }, args);
+            }
+        }
+        finally {
+            if (p instanceof GridLoadCacheCloseablePredicate)
+                ((GridLoadCacheCloseablePredicate)p).onClose();
         }
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5fcb0729/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridLoadCacheCloseablePredicate.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridLoadCacheCloseablePredicate.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridLoadCacheCloseablePredicate.java
new file mode 100644
index 0000000..1331a42
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridLoadCacheCloseablePredicate.java
@@ -0,0 +1,30 @@
+/*
+ * 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;
+
+import org.apache.ignite.lang.*;
+
+/**
+ * Special version of bi-predicate for LoadCache with close callback.
+ */
+public interface GridLoadCacheCloseablePredicate<K, V> extends IgniteBiPredicate<K, V> {
+    /**
+     * Callback invoked when predicate is no longer needed.
+     */
+    public void onClose();
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5fcb0729/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
index e19b971..a875a26 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
@@ -411,13 +411,23 @@ public abstract class GridDhtCacheAdapter<K, V> extends GridDistributedCacheAdap
 
         final ExpiryPolicy plc = plc0 != null ? plc0 : ctx.expiry();
 
-        ctx.store().loadCache(new CI3<KeyCacheObject, Object, GridCacheVersion>() {
-            @Override public void apply(KeyCacheObject key, Object val, @Nullable GridCacheVersion ver) {
-                assert ver == null;
+        if (p != null)
+            ctx.kernalContext().resource().injectGeneric(p);
 
-                loadEntry(key, val, ver0, p, topVer, replicate, plc);
-            }
-        }, args);
+        try {
+            ctx.store().loadCache(new CI3<KeyCacheObject, Object, GridCacheVersion>() {
+                @Override public void apply(KeyCacheObject key, Object val, @Nullable GridCacheVersion ver) {
+                    assert ver == null;
+
+                    loadEntry(key, val, ver0, p, topVer, replicate, plc);
+                }
+            }, args);
+
+        }
+        finally {
+            if (p instanceof GridLoadCacheCloseablePredicate)
+                ((GridLoadCacheCloseablePredicate)p).onClose();
+        }
     }
 
     /**


[21/50] [abbrv] incubator-ignite git commit: # ignite-707

Posted by ag...@apache.org.
# ignite-707


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

Branch: refs/heads/ignite-674
Commit: 17c94b6b730989b6d4a5cbcc5893cced73518e47
Parents: 3e6da9c
Author: sboikov <sb...@gridgain.com>
Authored: Thu Apr 9 12:02:07 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Thu Apr 9 12:02:07 2015 +0300

----------------------------------------------------------------------
 .../ignite/internal/GridPluginContext.java      | 15 ++----
 .../apache/ignite/internal/IgniteKernal.java    |  5 --
 .../plugin/IgnitePluginProcessor.java           | 52 +++++---------------
 .../ignite/plugin/CachePluginConfiguration.java |  2 +-
 .../org/apache/ignite/plugin/IgnitePlugin.java  |  3 --
 .../ignite/plugin/PluginConfiguration.java      | 10 +---
 .../org/apache/ignite/plugin/PluginContext.java |  7 +--
 .../apache/ignite/plugin/PluginProvider.java    |  4 +-
 8 files changed, 20 insertions(+), 78 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/17c94b6b/modules/core/src/main/java/org/apache/ignite/internal/GridPluginContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/GridPluginContext.java b/modules/core/src/main/java/org/apache/ignite/internal/GridPluginContext.java
index 31a4246..af03670 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/GridPluginContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/GridPluginContext.java
@@ -30,30 +30,21 @@ import java.util.*;
  */
 public class GridPluginContext implements PluginContext {
     /** */
-    private final PluginConfiguration cfg;
-
-    /** */
     private final GridKernalContext ctx;
 
     /** */
-    private IgniteConfiguration igniteCfg;
+    private final IgniteConfiguration igniteCfg;
 
     /**
      * @param ctx Kernal context.
-     * @param cfg Plugin configuration.
+     * @param igniteCfg Ignite configuration.
      */
-    public GridPluginContext(GridKernalContext ctx, PluginConfiguration cfg, IgniteConfiguration igniteCfg) {
-        this.cfg = cfg;
+    public GridPluginContext(GridKernalContext ctx, IgniteConfiguration igniteCfg) {
         this.ctx = ctx;
         this.igniteCfg = igniteCfg;
     }
 
     /** {@inheritDoc} */
-    @Override public <C extends PluginConfiguration> C configuration() {
-        return (C)cfg;
-    }
-
-    /** {@inheritDoc} */
     @Override public IgniteConfiguration igniteConfiguration() {
         return igniteCfg;
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/17c94b6b/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 0db2ad6..8e5779e 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
@@ -1021,11 +1021,6 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable {
         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()");
-        }
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/17c94b6b/modules/core/src/main/java/org/apache/ignite/internal/processors/plugin/IgnitePluginProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/plugin/IgnitePluginProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/plugin/IgnitePluginProcessor.java
index bf5d61f..8d71ad7 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/plugin/IgnitePluginProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/plugin/IgnitePluginProcessor.java
@@ -53,53 +53,25 @@ public class IgnitePluginProcessor extends GridProcessorAdapter {
 
         ExtensionRegistryImpl registry = new ExtensionRegistryImpl();
 
-        if (cfg.getPluginConfigurations() != null) {
-            for (PluginConfiguration pluginCfg : cfg.getPluginConfigurations()) {
-                GridPluginContext pluginCtx = new GridPluginContext(ctx, pluginCfg, cfg);
+        ServiceLoader<PluginProvider> ldr = ServiceLoader.load(PluginProvider.class);
 
-                PluginProvider provider;
+        for (PluginProvider provider : ldr) {
+            GridPluginContext pluginCtx = new GridPluginContext(ctx, cfg);
 
-                try {
-                    if (pluginCfg.providerClass() == null)
-                        throw new IgniteException("Provider class is null.");
+            if (F.isEmpty(provider.name()))
+                throw new IgniteException("Plugin name can not be empty.");
 
-                    try {
-                        Constructor<? extends PluginProvider> ctr =
-                            pluginCfg.providerClass().getConstructor(PluginContext.class);
+            if (plugins.containsKey(provider.name()))
+                throw new IgniteException("Duplicated plugin name: " + provider.name());
 
-                        provider = ctr.newInstance(pluginCtx);
-                    }
-                    catch (NoSuchMethodException ignore) {
-                        try {
-                            Constructor<? extends PluginProvider> ctr =
-                                pluginCfg.providerClass().getConstructor(pluginCfg.getClass());
+            plugins.put(provider.name(), provider);
 
-                            provider = ctr.newInstance(pluginCfg);
-                        }
-                        catch (NoSuchMethodException ignored) {
-                            provider = pluginCfg.providerClass().newInstance();
-                        }
-                    }
-                }
-                catch (InstantiationException | IllegalAccessException | InvocationTargetException e) {
-                    throw new IgniteException("Failed to create plugin provider instance.", e);
-                }
+            pluginCtxMap.put(provider, pluginCtx);
 
-                if (F.isEmpty(provider.name()))
-                    throw new IgniteException("Plugin name can not be empty.");
+            provider.initExtensions(pluginCtx, registry);
 
-                if (provider.plugin() == null)
-                    throw new IgniteException("Plugin is null.");
-
-                if (plugins.containsKey(provider.name()))
-                    throw new IgniteException("Duplicated plugin name: " + provider.name());
-
-                plugins.put(provider.name(), provider);
-
-                pluginCtxMap.put(provider, pluginCtx);
-
-                provider.initExtensions(pluginCtx, registry);
-            }
+            if (provider.plugin() == null)
+                throw new IgniteException("Plugin is null.");
         }
 
         extensions = registry.createExtensionMap();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/17c94b6b/modules/core/src/main/java/org/apache/ignite/plugin/CachePluginConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/plugin/CachePluginConfiguration.java b/modules/core/src/main/java/org/apache/ignite/plugin/CachePluginConfiguration.java
index 1df48b3..2bb0996 100644
--- a/modules/core/src/main/java/org/apache/ignite/plugin/CachePluginConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/plugin/CachePluginConfiguration.java
@@ -30,7 +30,7 @@ public interface CachePluginConfiguration<K, V> extends Serializable {
      * Creates cache plugin provider.
      *
      * @return Cache plugin provider class.
-     * @param ctx
+     * @param ctx Plugin context.
      */
     public CachePluginProvider createProvider(CachePluginContext ctx);
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/17c94b6b/modules/core/src/main/java/org/apache/ignite/plugin/IgnitePlugin.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/plugin/IgnitePlugin.java b/modules/core/src/main/java/org/apache/ignite/plugin/IgnitePlugin.java
index 6a928af..7a8a99a 100644
--- a/modules/core/src/main/java/org/apache/ignite/plugin/IgnitePlugin.java
+++ b/modules/core/src/main/java/org/apache/ignite/plugin/IgnitePlugin.java
@@ -19,9 +19,6 @@ package org.apache.ignite.plugin;
 
 /**
  * Marker interface for all Ignite plugins.
- *
- * @author @java.author
- * @version @java.version
  */
 public interface IgnitePlugin {
     // No-op.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/17c94b6b/modules/core/src/main/java/org/apache/ignite/plugin/PluginConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/plugin/PluginConfiguration.java b/modules/core/src/main/java/org/apache/ignite/plugin/PluginConfiguration.java
index f30e897..1a4e2dc 100644
--- a/modules/core/src/main/java/org/apache/ignite/plugin/PluginConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/plugin/PluginConfiguration.java
@@ -18,14 +18,8 @@
 package org.apache.ignite.plugin;
 
 /**
- * TODO: Add class description.
- *
- * @author @java.author
- * @version @java.version
+ * Plugin configuration.
  */
 public interface PluginConfiguration {
-    /**
-     * @return Plugin provider class.
-     */
-    public Class<? extends PluginProvider> providerClass();
+    // No-op.
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/17c94b6b/modules/core/src/main/java/org/apache/ignite/plugin/PluginContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/plugin/PluginContext.java b/modules/core/src/main/java/org/apache/ignite/plugin/PluginContext.java
index f2a972c..6a4f20b 100644
--- a/modules/core/src/main/java/org/apache/ignite/plugin/PluginContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/plugin/PluginContext.java
@@ -26,15 +26,10 @@ import org.apache.ignite.spi.discovery.DiscoverySpi;
 import java.util.*;
 
 /**
- * TODO: Add class description.
+ * Plugin context.
  */
 public interface PluginContext {
     /**
-     * @return Plugin configuration.
-     */
-    public <C extends PluginConfiguration> C configuration();
-
-    /**
      * @return Ignite configuration.
      */
     public IgniteConfiguration igniteConfiguration();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/17c94b6b/modules/core/src/main/java/org/apache/ignite/plugin/PluginProvider.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/plugin/PluginProvider.java b/modules/core/src/main/java/org/apache/ignite/plugin/PluginProvider.java
index 1d965f5..d2aedff 100644
--- a/modules/core/src/main/java/org/apache/ignite/plugin/PluginProvider.java
+++ b/modules/core/src/main/java/org/apache/ignite/plugin/PluginProvider.java
@@ -25,9 +25,6 @@ import java.util.*;
 
 /**
  * Pluggable ignite component.
- *
- * @author @java.author
- * @version @java.version
  */
 public interface PluginProvider<C extends PluginConfiguration> {
     /**
@@ -51,6 +48,7 @@ public interface PluginProvider<C extends PluginConfiguration> {
     public <T extends IgnitePlugin> T plugin();
 
     /**
+     * @param ctx Plugin context.
      * @param cls Ignite component class.
      * @return Ignite component or {@code null} if component is not supported.
      */


[02/50] [abbrv] incubator-ignite git commit: ignite-635: IgniteCluster # startNodes return ClusterStartNodeResult-s instead of Tuple3-s

Posted by ag...@apache.org.
ignite-635: IgniteCluster # startNodes return ClusterStartNodeResult-s instead of Tuple3-s


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

Branch: refs/heads/ignite-674
Commit: 7f4c5eed0af2b56b1dd671cbe76a4224b72f5045
Parents: 71439bc
Author: Artem Shutak <as...@gridgain.com>
Authored: Wed Apr 8 18:27:23 2015 +0300
Committer: Artem Shutak <as...@gridgain.com>
Committed: Wed Apr 8 18:27:23 2015 +0300

----------------------------------------------------------------------
 .../java/org/apache/ignite/IgniteCluster.java   |   9 +-
 .../ignite/cluster/ClusterStartNodeResult.java  |  46 +++
 .../cluster/ClusterStartNodeResultImpl.java     |  87 ++++++
 .../cluster/IgniteClusterAsyncImpl.java         |   5 +-
 .../internal/cluster/IgniteClusterImpl.java     |  37 +--
 .../util/nodestart/IgniteNodeCallable.java      |  30 --
 .../util/nodestart/IgniteSshHelper.java         |   2 +-
 .../util/nodestart/StartNodeCallable.java       |  30 ++
 .../util/nodestart/IgniteNodeCallableImpl.java  | 308 ------------------
 .../util/nodestart/IgniteSshHelperImpl.java     |   4 +-
 .../util/nodestart/StartNodeCallableImpl.java   | 309 +++++++++++++++++++
 ...gniteProjectionStartStopRestartSelfTest.java | 261 ++++++++--------
 .../IgniteStartStopRestartTestSuite.java        |   1 +
 .../commands/start/VisorStartCommand.scala      |   4 +-
 14 files changed, 631 insertions(+), 502 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7f4c5eed/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 7d7d2fb..02fea14 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteCluster.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteCluster.java
@@ -19,7 +19,6 @@ package org.apache.ignite;
 
 import org.apache.ignite.cache.affinity.*;
 import org.apache.ignite.cluster.*;
-import org.apache.ignite.internal.util.lang.*;
 import org.apache.ignite.lang.*;
 import org.jetbrains.annotations.*;
 
@@ -170,12 +169,12 @@ public interface IgniteCluster extends ClusterGroup, IgniteAsyncSupport {
      *      nodes on the host than expected.
      * @param timeout Connection timeout.
      * @param maxConn Number of parallel SSH connections to one host.
-     * @return Collection of tuples, each containing host name, result (success of failure)
+     * @return Collection of start node results, each containing host name, result (success or failure)
      *      and error message (if any).
      * @throws IgniteException In case of error.
      */
     @IgniteAsyncSupported
-    public Collection<GridTuple3<String, Boolean, String>> startNodes(File file, boolean restart, int timeout,
+    public Collection<ClusterStartNodeResult> startNodes(File file, boolean restart, int timeout,
         int maxConn) throws IgniteException;
 
     /**
@@ -272,12 +271,12 @@ public interface IgniteCluster extends ClusterGroup, IgniteAsyncSupport {
      *      nodes on the host than expected.
      * @param timeout Connection timeout in milliseconds.
      * @param maxConn Number of parallel SSH connections to one host.
-     * @return Collection of tuples, each containing host name, result (success of failure)
+     * @return Collection of start node results, each containing host name, result (success or failure)
      *      and error message (if any).
      * @throws IgniteException In case of error.
      */
     @IgniteAsyncSupported
-    public Collection<GridTuple3<String, Boolean, String>> startNodes(Collection<Map<String, Object>> hosts,
+    public Collection<ClusterStartNodeResult> startNodes(Collection<Map<String, Object>> hosts,
         @Nullable Map<String, Object> dflts, boolean restart, int timeout, int maxConn) throws IgniteException;
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7f4c5eed/modules/core/src/main/java/org/apache/ignite/cluster/ClusterStartNodeResult.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cluster/ClusterStartNodeResult.java b/modules/core/src/main/java/org/apache/ignite/cluster/ClusterStartNodeResult.java
new file mode 100644
index 0000000..b6c3619
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/cluster/ClusterStartNodeResult.java
@@ -0,0 +1,46 @@
+/*
+ * 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.cluster;
+
+import org.jetbrains.annotations.*;
+
+/**
+ * Cluster start node result information.
+ */
+public interface ClusterStartNodeResult {
+    /**
+     * Gets host name.
+     *
+     * @return Host name.
+     */
+    public String getHostName();
+    
+    /**
+     * Gets result of success or failure.
+     *
+     * @return Success or failure. <code>True</code> if success.
+     */
+    public boolean isSuccess();
+    
+    /**
+     * Gets error message if any.
+     *
+     * @return Error massage.
+     */
+    @Nullable public String getError();
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7f4c5eed/modules/core/src/main/java/org/apache/ignite/internal/cluster/ClusterStartNodeResultImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/cluster/ClusterStartNodeResultImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/cluster/ClusterStartNodeResultImpl.java
new file mode 100644
index 0000000..39301b3
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/cluster/ClusterStartNodeResultImpl.java
@@ -0,0 +1,87 @@
+/*
+ * 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.cluster;
+
+import org.apache.ignite.cluster.*;
+
+/**
+ * Implementation for cluster start node result. 
+ */
+public class ClusterStartNodeResultImpl implements ClusterStartNodeResult {
+    /** Host name. */
+    private String hostName;
+
+    /** Result (success or failure). */
+    private boolean success;
+
+    /** Error message (if any) */
+    private String error;
+
+    /**
+     * @param hostName Host name.
+     * @param success Success or not.
+     * @param error Error message.
+     */
+    public ClusterStartNodeResultImpl(String hostName, boolean success, String error) {
+        this.hostName = hostName;
+        this.success = success;
+        this.error = error;
+    }
+
+    /** {@inheritDoc} */
+    @Override public String getHostName() {
+        return hostName;
+    }
+
+    /**
+     * Sets host name.
+     *
+     * @param hostName Host name.
+     */
+    public void setHostName(String hostName) {
+        this.hostName = hostName;
+    }
+
+    /** {@inheritDoc} */
+    @Override public boolean isSuccess() {
+        return success;
+    }
+
+    /**
+     * Sets success result.
+     *
+     * @param success Success result.
+     */
+    public void setSuccess(boolean success) {
+        this.success = success;
+    }
+
+    /** {@inheritDoc} */
+    @Override public String getError() {
+        return error;
+    }
+
+    /**
+     * Sets error message.
+     *
+     * @param error Error message.
+     */
+    public void setError(String error) {
+        this.error = error;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7f4c5eed/modules/core/src/main/java/org/apache/ignite/internal/cluster/IgniteClusterAsyncImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/cluster/IgniteClusterAsyncImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/cluster/IgniteClusterAsyncImpl.java
index 5a5daab..7f67b4f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/cluster/IgniteClusterAsyncImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/cluster/IgniteClusterAsyncImpl.java
@@ -20,7 +20,6 @@ package org.apache.ignite.internal.cluster;
 import org.apache.ignite.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.internal.*;
-import org.apache.ignite.internal.util.lang.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.lang.*;
 import org.jetbrains.annotations.*;
@@ -98,7 +97,7 @@ public class IgniteClusterAsyncImpl extends AsyncSupportAdapter<IgniteCluster>
     }
 
     /** {@inheritDoc} */
-    @Override public Collection<GridTuple3<String, Boolean, String>> startNodes(File file,
+    @Override public Collection<ClusterStartNodeResult> startNodes(File file,
         boolean restart,
         int timeout,
         int maxConn)
@@ -112,7 +111,7 @@ public class IgniteClusterAsyncImpl extends AsyncSupportAdapter<IgniteCluster>
     }
 
     /** {@inheritDoc} */
-    @Override public Collection<GridTuple3<String, Boolean, String>> startNodes(
+    @Override public Collection<ClusterStartNodeResult> startNodes(
         Collection<Map<String, Object>> hosts,
         @Nullable Map<String, Object> dflts,
         boolean restart,

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7f4c5eed/modules/core/src/main/java/org/apache/ignite/internal/cluster/IgniteClusterImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/cluster/IgniteClusterImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/cluster/IgniteClusterImpl.java
index 76a49dd..3c937b0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/cluster/IgniteClusterImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/cluster/IgniteClusterImpl.java
@@ -22,7 +22,6 @@ import org.apache.ignite.cluster.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.*;
 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.*;
@@ -189,7 +188,7 @@ public class IgniteClusterImpl extends ClusterGroupAdapter implements IgniteClus
     }
 
     /** {@inheritDoc} */
-    @Override public Collection<GridTuple3<String, Boolean, String>> startNodes(File file,
+    @Override public Collection<ClusterStartNodeResult> startNodes(File file,
         boolean restart,
         int timeout,
         int maxConn)
@@ -204,7 +203,7 @@ public class IgniteClusterImpl extends ClusterGroupAdapter implements IgniteClus
     }
 
     /** {@inheritDoc} */
-    @Override public Collection<GridTuple3<String, Boolean, String>> startNodes(Collection<Map<String, Object>> hosts,
+    @Override public Collection<ClusterStartNodeResult> startNodes(Collection<Map<String, Object>> hosts,
         @Nullable Map<String, Object> dflts,
         boolean restart,
         int timeout,
@@ -304,7 +303,7 @@ public class IgniteClusterImpl extends ClusterGroupAdapter implements IgniteClus
      * @return Future with results.
      * @see IgniteCluster#startNodes(java.io.File, boolean, int, int)
      */
-    IgniteInternalFuture<Collection<GridTuple3<String, Boolean, String>>> startNodesAsync(File file,
+    IgniteInternalFuture<Collection<ClusterStartNodeResult>> startNodesAsync(File file,
       boolean restart,
       int timeout,
       int maxConn)
@@ -332,7 +331,7 @@ public class IgniteClusterImpl extends ClusterGroupAdapter implements IgniteClus
      * @return Future with results.
      * @see IgniteCluster#startNodes(java.util.Collection, java.util.Map, boolean, int, int)
      */
-    IgniteInternalFuture<Collection<GridTuple3<String, Boolean, String>>> startNodesAsync(
+    IgniteInternalFuture<Collection<ClusterStartNodeResult>> startNodesAsync(
         Collection<Map<String, Object>> hosts,
         @Nullable Map<String, Object> dflts,
         boolean restart,
@@ -348,7 +347,7 @@ public class IgniteClusterImpl extends ClusterGroupAdapter implements IgniteClus
 
             Map<String, Collection<IgniteRemoteStartSpecification>> specsMap = specifications(hosts, dflts);
 
-            Map<String, ConcurrentLinkedQueue<IgniteNodeCallable>> runMap = new HashMap<>();
+            Map<String, ConcurrentLinkedQueue<StartNodeCallable>> runMap = new HashMap<>();
 
             int nodeCallCnt = 0;
 
@@ -393,7 +392,7 @@ public class IgniteClusterImpl extends ClusterGroupAdapter implements IgniteClus
                         startIdx = neighbors.size() + 1;
                 }
 
-                ConcurrentLinkedQueue<IgniteNodeCallable> nodeRuns = new ConcurrentLinkedQueue<>();
+                ConcurrentLinkedQueue<StartNodeCallable> nodeRuns = new ConcurrentLinkedQueue<>();
 
                 runMap.put(host, nodeRuns);
 
@@ -410,19 +409,17 @@ public class IgniteClusterImpl extends ClusterGroupAdapter implements IgniteClus
 
             // If there is nothing to start, return finished future with empty result.
             if (nodeCallCnt == 0)
-                return new GridFinishedFuture<Collection<GridTuple3<String, Boolean, String>>>(
-                    Collections.<GridTuple3<String, Boolean, String>>emptyList());
+                return new GridFinishedFuture<Collection<ClusterStartNodeResult>>(
+                    Collections.<ClusterStartNodeResult>emptyList());
 
             // Exceeding max line width for readability.
-            GridCompoundFuture<GridTuple3<String, Boolean, String>, Collection<GridTuple3<String, Boolean, String>>>
-                fut = new GridCompoundFuture<>(
-                CU.<GridTuple3<String, Boolean, String>>objectsReducer()
-            );
+            GridCompoundFuture<ClusterStartNodeResult, Collection<ClusterStartNodeResult>> fut = 
+                new GridCompoundFuture<>(CU.<ClusterStartNodeResult>objectsReducer());
 
             AtomicInteger cnt = new AtomicInteger(nodeCallCnt);
 
             // Limit maximum simultaneous connection number per host.
-            for (ConcurrentLinkedQueue<IgniteNodeCallable> queue : runMap.values()) {
+            for (ConcurrentLinkedQueue<StartNodeCallable> queue : runMap.values()) {
                 for (int i = 0; i < maxConn; i++) {
                     if (!runNextNodeCallable(queue, fut, cnt))
                         break;
@@ -471,25 +468,25 @@ public class IgniteClusterImpl extends ClusterGroupAdapter implements IgniteClus
      * @param cnt Atomic counter to check if all futures are added to compound future.
      * @return {@code True} if task was started, {@code false} if queue was empty.
      */
-    private boolean runNextNodeCallable(final ConcurrentLinkedQueue<IgniteNodeCallable> queue,
-        final GridCompoundFuture<GridTuple3<String, Boolean, String>, Collection<GridTuple3<String, Boolean, String>>>
+    private boolean runNextNodeCallable(final ConcurrentLinkedQueue<StartNodeCallable> queue,
+        final GridCompoundFuture<ClusterStartNodeResult, Collection<ClusterStartNodeResult>>
         comp,
         final AtomicInteger cnt)
     {
-        IgniteNodeCallable call = queue.poll();
+        StartNodeCallable call = queue.poll();
 
         if (call == null)
             return false;
 
-        IgniteInternalFuture<GridTuple3<String, Boolean, String>> fut = ctx.closure().callLocalSafe(call, true);
+        IgniteInternalFuture<ClusterStartNodeResult> fut = ctx.closure().callLocalSafe(call, true);
 
         comp.add(fut);
 
         if (cnt.decrementAndGet() == 0)
             comp.markInitialized();
 
-        fut.listen(new CI1<IgniteInternalFuture<GridTuple3<String, Boolean, String>>>() {
-            @Override public void apply(IgniteInternalFuture<GridTuple3<String, Boolean, String>> f) {
+        fut.listen(new CI1<IgniteInternalFuture<ClusterStartNodeResult>>() {
+            @Override public void apply(IgniteInternalFuture<ClusterStartNodeResult> f) {
                 runNextNodeCallable(queue, comp, cnt);
             }
         });

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7f4c5eed/modules/core/src/main/java/org/apache/ignite/internal/util/nodestart/IgniteNodeCallable.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/nodestart/IgniteNodeCallable.java b/modules/core/src/main/java/org/apache/ignite/internal/util/nodestart/IgniteNodeCallable.java
deleted file mode 100644
index 6c34efb..0000000
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/nodestart/IgniteNodeCallable.java
+++ /dev/null
@@ -1,30 +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.nodestart;
-
-import org.apache.ignite.internal.util.lang.*;
-
-import java.util.concurrent.*;
-
-/**
- * SSH-based node starter, returns tuple which contains hostname, success flag and error message
- * if attempt was not successful.
- */
-public interface IgniteNodeCallable extends Callable<GridTuple3<String, Boolean, String>> {
-    // No-op.
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7f4c5eed/modules/core/src/main/java/org/apache/ignite/internal/util/nodestart/IgniteSshHelper.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/nodestart/IgniteSshHelper.java b/modules/core/src/main/java/org/apache/ignite/internal/util/nodestart/IgniteSshHelper.java
index 2cb620f..14a35b7 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/nodestart/IgniteSshHelper.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/nodestart/IgniteSshHelper.java
@@ -30,5 +30,5 @@ public interface IgniteSshHelper {
      * @param timeout Connection timeout.
      * @return {@link Callable} starting node using SSH.
      */
-    public IgniteNodeCallable nodeStartCallable(IgniteRemoteStartSpecification spec, int timeout);
+    public StartNodeCallable nodeStartCallable(IgniteRemoteStartSpecification spec, int timeout);
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7f4c5eed/modules/core/src/main/java/org/apache/ignite/internal/util/nodestart/StartNodeCallable.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/nodestart/StartNodeCallable.java b/modules/core/src/main/java/org/apache/ignite/internal/util/nodestart/StartNodeCallable.java
new file mode 100644
index 0000000..a1a2046
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/nodestart/StartNodeCallable.java
@@ -0,0 +1,30 @@
+/*
+ * 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.nodestart;
+
+import org.apache.ignite.cluster.*;
+
+import java.util.concurrent.*;
+
+/**
+ * SSH-based node starter, returns tuple which contains hostname, success flag and error message
+ * if attempt was not successful.
+ */
+public interface StartNodeCallable extends Callable<ClusterStartNodeResult> {
+    // No-op.
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7f4c5eed/modules/ssh/src/main/java/org/apache/ignite/internal/util/nodestart/IgniteNodeCallableImpl.java
----------------------------------------------------------------------
diff --git a/modules/ssh/src/main/java/org/apache/ignite/internal/util/nodestart/IgniteNodeCallableImpl.java b/modules/ssh/src/main/java/org/apache/ignite/internal/util/nodestart/IgniteNodeCallableImpl.java
deleted file mode 100644
index 9b873bf..0000000
--- a/modules/ssh/src/main/java/org/apache/ignite/internal/util/nodestart/IgniteNodeCallableImpl.java
+++ /dev/null
@@ -1,308 +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.nodestart;
-
-import com.jcraft.jsch.*;
-import org.apache.ignite.*;
-import org.apache.ignite.internal.*;
-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.resources.*;
-
-import java.io.*;
-import java.text.*;
-import java.util.*;
-
-import static org.apache.ignite.IgniteSystemProperties.*;
-
-/**
- * SSH-based node starter.
- */
-public class IgniteNodeCallableImpl implements IgniteNodeCallable {
-    /** Default Ignite home path for Windows (taken from environment variable). */
-    private static final String DFLT_IGNITE_HOME_WIN = "%IGNITE_HOME%";
-
-    /** Default Ignite home path for Linux (taken from environment variable). */
-    private static final String DFLT_IGNITE_HOME_LINUX = "$IGNITE_HOME";
-
-    /** Default start script path for Linux. */
-    private static final String DFLT_SCRIPT_LINUX = "bin/ignite.sh -v";
-
-    /** Date format for log file name. */
-    private static final SimpleDateFormat FILE_NAME_DATE_FORMAT = new SimpleDateFormat("MM-dd-yyyy--HH-mm-ss");
-
-    /** Specification. */
-    private final IgniteRemoteStartSpecification spec;
-
-    /** Connection timeout. */
-    private final int timeout;
-
-    /** Logger. */
-    @LoggerResource
-    private IgniteLogger log;
-
-    /**
-     * Required by Externalizable.
-     */
-    public IgniteNodeCallableImpl() {
-        spec = null;
-        timeout = 0;
-
-        assert false;
-    }
-
-    /**
-     * Constructor.
-     *
-     * @param spec Specification.
-     * @param timeout Connection timeout.
-     */
-    public IgniteNodeCallableImpl(IgniteRemoteStartSpecification spec, int timeout) {
-        assert spec != null;
-
-        this.spec = spec;
-        this.timeout = timeout;
-    }
-
-    /** {@inheritDoc} */
-    @Override public GridTuple3<String, Boolean, String> call() {
-        JSch ssh = new JSch();
-
-        Session ses = null;
-
-        try {
-            if (spec.key() != null)
-                ssh.addIdentity(spec.key().getAbsolutePath());
-
-            ses = ssh.getSession(spec.username(), spec.host(), spec.port());
-
-            if (spec.password() != null)
-                ses.setPassword(spec.password());
-
-            ses.setConfig("StrictHostKeyChecking", "no");
-
-            ses.connect(timeout);
-
-            boolean win = isWindows(ses);
-
-            char separator = win ? '\\' : '/';
-
-            spec.fixPaths(separator);
-
-            String igniteHome = spec.igniteHome();
-
-            if (igniteHome == null)
-                igniteHome = win ? DFLT_IGNITE_HOME_WIN : DFLT_IGNITE_HOME_LINUX;
-
-            String script = spec.script();
-
-            if (script == null)
-                script = DFLT_SCRIPT_LINUX;
-
-            String cfg = spec.configuration();
-
-            if (cfg == null)
-                cfg = "";
-
-            String startNodeCmd;
-            String scriptOutputFileName = FILE_NAME_DATE_FORMAT.format(new Date()) + '-'
-                + UUID.randomUUID().toString().substring(0, 8) + ".log";
-
-            if (win)
-                throw new UnsupportedOperationException("Apache Ignite cannot be auto-started on Windows from IgniteCluster.startNodes(…) API.");
-            else { // Assume Unix.
-                int spaceIdx = script.indexOf(' ');
-
-                String scriptPath = spaceIdx > -1 ? script.substring(0, spaceIdx) : script;
-                String scriptArgs = spaceIdx > -1 ? script.substring(spaceIdx + 1) : "";
-                String rmtLogArgs = buildRemoteLogArguments(spec.username(), spec.host());
-                String tmpDir = env(ses, "$TMPDIR", "/tmp/");
-                String scriptOutputDir = tmpDir + "ignite-startNodes";
-
-                shell(ses, "mkdir " + scriptOutputDir);
-
-                // Mac os don't support ~ in double quotes. Trying get home path from remote system.
-                if (igniteHome.startsWith("~")) {
-                    String homeDir = env(ses, "$HOME", "~");
-
-                    igniteHome = igniteHome.replaceFirst("~", homeDir);
-                }
-
-                startNodeCmd = new SB().
-                    // Console output is consumed, started nodes must use Ignite file appenders for log.
-                        a("nohup ").
-                    a("\"").a(igniteHome).a('/').a(scriptPath).a("\"").
-                    a(" ").a(scriptArgs).
-                    a(!cfg.isEmpty() ? " \"" : "").a(cfg).a(!cfg.isEmpty() ? "\"" : "").
-                    a(rmtLogArgs).
-                    a(" > ").a(scriptOutputDir).a("/").a(scriptOutputFileName).a(" 2>& 1 &").
-                    toString();
-            }
-
-            info("Starting remote node with SSH command: " + startNodeCmd, spec.logger(), log);
-
-            shell(ses, startNodeCmd);
-
-            return new GridTuple3<>(spec.host(), true, null);
-        }
-        catch (IgniteInterruptedCheckedException e) {
-            return new GridTuple3<>(spec.host(), false, e.getMessage());
-        }
-        catch (Exception e) {
-            return new GridTuple3<>(spec.host(), false, X.getFullStackTrace(e));
-        }
-        finally {
-            if (ses != null && ses.isConnected())
-                ses.disconnect();
-        }
-    }
-
-    /**
-     * Executes command using {@code shell} channel.
-     *
-     * @param ses SSH session.
-     * @param cmd Command.
-     * @throws JSchException In case of SSH error.
-     * @throws IOException If IO error occurs.
-     * @throws org.apache.ignite.internal.IgniteInterruptedCheckedException If thread was interrupted while waiting.
-     */
-    private void shell(Session ses, String cmd) throws JSchException, IOException, IgniteInterruptedCheckedException {
-        ChannelShell ch = null;
-
-        try {
-            ch = (ChannelShell)ses.openChannel("shell");
-
-            ch.connect();
-
-            try (PrintStream out = new PrintStream(ch.getOutputStream(), true)) {
-                out.println(cmd);
-
-                U.sleep(1000);
-            }
-        }
-        finally {
-            if (ch != null && ch.isConnected())
-                ch.disconnect();
-        }
-    }
-
-    /**
-     * Checks whether host is running Windows OS.
-     *
-     * @param ses SSH session.
-     * @return Whether host is running Windows OS.
-     * @throws JSchException In case of SSH error.
-     */
-    private boolean isWindows(Session ses) throws JSchException {
-        try {
-            return exec(ses, "cmd.exe") != null;
-        }
-        catch (IOException ignored) {
-            return false;
-        }
-    }
-
-    /**
-     * Gets the value of the specified environment variable.
-     *
-     * @param ses SSH session.
-     * @param name environment variable name.
-     * @param dflt default value.
-     * @return environment variable value.
-     * @throws JSchException In case of SSH error.
-     */
-    private String env(Session ses, String name, String dflt) throws JSchException {
-        try {
-            return exec(ses, "echo " + name);
-        }
-        catch (IOException ignored) {
-            return dflt;
-        }
-    }
-
-    /**
-     * Gets the value of the specified environment variable.
-     *
-     * @param ses SSH session.
-     * @param cmd environment variable name.
-     * @return environment variable value.
-     * @throws JSchException In case of SSH error.
-     * @throws IOException If failed.
-     */
-    private String exec(Session ses, String cmd) throws JSchException, IOException {
-        ChannelExec ch = null;
-
-        try {
-            ch = (ChannelExec)ses.openChannel("exec");
-
-            ch.setCommand(cmd);
-
-            ch.connect();
-
-            try (BufferedReader reader = new BufferedReader(new InputStreamReader(ch.getInputStream()))) {
-                return reader.readLine();
-            }
-        }
-        finally {
-            if (ch != null && ch.isConnected())
-                ch.disconnect();
-        }
-    }
-
-    /**
-     * 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 ignite.sh} script arguments.
-     */
-    private String buildRemoteLogArguments(String username, String host) {
-        assert username != null;
-        assert host != null;
-
-        SB sb = new SB();
-
-        sb.a(" -J-D").a(IGNITE_SSH_HOST).a("=\"").a(host).a("\"").
-            a(" -J-D").a(IGNITE_SSH_USER_NAME).a("=\"").a(username).a("\"");
-
-        return sb.toString();
-    }
-
-    /**
-     * @param log Logger.
-     * @return This callable for chaining method calls.
-     */
-    public IgniteNodeCallable setLogger(IgniteLogger log) {
-        this.log = log;
-
-        return this;
-    }
-
-    /**
-     * Log info message to loggers.
-     *
-     * @param msg Message text.
-     * @param loggers Loggers.
-     */
-    private void info(String msg, IgniteLogger... loggers) {
-        for (IgniteLogger logger : loggers)
-            if (logger != null && logger.isInfoEnabled())
-                logger.info(msg);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7f4c5eed/modules/ssh/src/main/java/org/apache/ignite/internal/util/nodestart/IgniteSshHelperImpl.java
----------------------------------------------------------------------
diff --git a/modules/ssh/src/main/java/org/apache/ignite/internal/util/nodestart/IgniteSshHelperImpl.java b/modules/ssh/src/main/java/org/apache/ignite/internal/util/nodestart/IgniteSshHelperImpl.java
index cccf678..c2370b6 100644
--- a/modules/ssh/src/main/java/org/apache/ignite/internal/util/nodestart/IgniteSshHelperImpl.java
+++ b/modules/ssh/src/main/java/org/apache/ignite/internal/util/nodestart/IgniteSshHelperImpl.java
@@ -22,7 +22,7 @@ package org.apache.ignite.internal.util.nodestart;
  */
 public class IgniteSshHelperImpl implements IgniteSshHelper {
     /** {@inheritDoc} */
-    @Override public IgniteNodeCallable nodeStartCallable(IgniteRemoteStartSpecification spec, int timeout) {
-        return new IgniteNodeCallableImpl(spec, timeout);
+    @Override public StartNodeCallable nodeStartCallable(IgniteRemoteStartSpecification spec, int timeout) {
+        return new StartNodeCallableImpl(spec, timeout);
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7f4c5eed/modules/ssh/src/main/java/org/apache/ignite/internal/util/nodestart/StartNodeCallableImpl.java
----------------------------------------------------------------------
diff --git a/modules/ssh/src/main/java/org/apache/ignite/internal/util/nodestart/StartNodeCallableImpl.java b/modules/ssh/src/main/java/org/apache/ignite/internal/util/nodestart/StartNodeCallableImpl.java
new file mode 100644
index 0000000..7c6010f
--- /dev/null
+++ b/modules/ssh/src/main/java/org/apache/ignite/internal/util/nodestart/StartNodeCallableImpl.java
@@ -0,0 +1,309 @@
+/*
+ * 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.nodestart;
+
+import com.jcraft.jsch.*;
+import org.apache.ignite.*;
+import org.apache.ignite.cluster.*;
+import org.apache.ignite.internal.*;
+import org.apache.ignite.internal.cluster.*;
+import org.apache.ignite.internal.util.typedef.*;
+import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.resources.*;
+
+import java.io.*;
+import java.text.*;
+import java.util.*;
+
+import static org.apache.ignite.IgniteSystemProperties.*;
+
+/**
+ * SSH-based node starter.
+ */
+public class StartNodeCallableImpl implements StartNodeCallable {
+    /** Default Ignite home path for Windows (taken from environment variable). */
+    private static final String DFLT_IGNITE_HOME_WIN = "%IGNITE_HOME%";
+
+    /** Default Ignite home path for Linux (taken from environment variable). */
+    private static final String DFLT_IGNITE_HOME_LINUX = "$IGNITE_HOME";
+
+    /** Default start script path for Linux. */
+    private static final String DFLT_SCRIPT_LINUX = "bin/ignite.sh -v";
+
+    /** Date format for log file name. */
+    private static final SimpleDateFormat FILE_NAME_DATE_FORMAT = new SimpleDateFormat("MM-dd-yyyy--HH-mm-ss");
+
+    /** Specification. */
+    private final IgniteRemoteStartSpecification spec;
+
+    /** Connection timeout. */
+    private final int timeout;
+
+    /** Logger. */
+    @LoggerResource
+    private IgniteLogger log;
+
+    /**
+     * Required by Externalizable.
+     */
+    public StartNodeCallableImpl() {
+        spec = null;
+        timeout = 0;
+
+        assert false;
+    }
+
+    /**
+     * Constructor.
+     *
+     * @param spec Specification.
+     * @param timeout Connection timeout.
+     */
+    public StartNodeCallableImpl(IgniteRemoteStartSpecification spec, int timeout) {
+        assert spec != null;
+
+        this.spec = spec;
+        this.timeout = timeout;
+    }
+
+    /** {@inheritDoc} */
+    @Override public ClusterStartNodeResult call() {
+        JSch ssh = new JSch();
+
+        Session ses = null;
+
+        try {
+            if (spec.key() != null)
+                ssh.addIdentity(spec.key().getAbsolutePath());
+
+            ses = ssh.getSession(spec.username(), spec.host(), spec.port());
+
+            if (spec.password() != null)
+                ses.setPassword(spec.password());
+
+            ses.setConfig("StrictHostKeyChecking", "no");
+
+            ses.connect(timeout);
+
+            boolean win = isWindows(ses);
+
+            char separator = win ? '\\' : '/';
+
+            spec.fixPaths(separator);
+
+            String igniteHome = spec.igniteHome();
+
+            if (igniteHome == null)
+                igniteHome = win ? DFLT_IGNITE_HOME_WIN : DFLT_IGNITE_HOME_LINUX;
+
+            String script = spec.script();
+
+            if (script == null)
+                script = DFLT_SCRIPT_LINUX;
+
+            String cfg = spec.configuration();
+
+            if (cfg == null)
+                cfg = "";
+
+            String startNodeCmd;
+            String scriptOutputFileName = FILE_NAME_DATE_FORMAT.format(new Date()) + '-'
+                + UUID.randomUUID().toString().substring(0, 8) + ".log";
+
+            if (win)
+                throw new UnsupportedOperationException("Apache Ignite cannot be auto-started on Windows from IgniteCluster.startNodes(…) API.");
+            else { // Assume Unix.
+                int spaceIdx = script.indexOf(' ');
+
+                String scriptPath = spaceIdx > -1 ? script.substring(0, spaceIdx) : script;
+                String scriptArgs = spaceIdx > -1 ? script.substring(spaceIdx + 1) : "";
+                String rmtLogArgs = buildRemoteLogArguments(spec.username(), spec.host());
+                String tmpDir = env(ses, "$TMPDIR", "/tmp/");
+                String scriptOutputDir = tmpDir + "ignite-startNodes";
+
+                shell(ses, "mkdir " + scriptOutputDir);
+
+                // Mac os don't support ~ in double quotes. Trying get home path from remote system.
+                if (igniteHome.startsWith("~")) {
+                    String homeDir = env(ses, "$HOME", "~");
+
+                    igniteHome = igniteHome.replaceFirst("~", homeDir);
+                }
+
+                startNodeCmd = new SB().
+                    // Console output is consumed, started nodes must use Ignite file appenders for log.
+                        a("nohup ").
+                    a("\"").a(igniteHome).a('/').a(scriptPath).a("\"").
+                    a(" ").a(scriptArgs).
+                    a(!cfg.isEmpty() ? " \"" : "").a(cfg).a(!cfg.isEmpty() ? "\"" : "").
+                    a(rmtLogArgs).
+                    a(" > ").a(scriptOutputDir).a("/").a(scriptOutputFileName).a(" 2>& 1 &").
+                    toString();
+            }
+
+            info("Starting remote node with SSH command: " + startNodeCmd, spec.logger(), log);
+
+            shell(ses, startNodeCmd);
+
+            return new ClusterStartNodeResultImpl(spec.host(), true, null);
+        }
+        catch (IgniteInterruptedCheckedException e) {
+            return new ClusterStartNodeResultImpl(spec.host(), false, e.getMessage());
+        }
+        catch (Exception e) {
+            return new ClusterStartNodeResultImpl(spec.host(), false, X.getFullStackTrace(e));
+        }
+        finally {
+            if (ses != null && ses.isConnected())
+                ses.disconnect();
+        }
+    }
+
+    /**
+     * Executes command using {@code shell} channel.
+     *
+     * @param ses SSH session.
+     * @param cmd Command.
+     * @throws JSchException In case of SSH error.
+     * @throws IOException If IO error occurs.
+     * @throws IgniteInterruptedCheckedException If thread was interrupted while waiting.
+     */
+    private void shell(Session ses, String cmd) throws JSchException, IOException, IgniteInterruptedCheckedException {
+        ChannelShell ch = null;
+
+        try {
+            ch = (ChannelShell)ses.openChannel("shell");
+
+            ch.connect();
+
+            try (PrintStream out = new PrintStream(ch.getOutputStream(), true)) {
+                out.println(cmd);
+
+                U.sleep(1000);
+            }
+        }
+        finally {
+            if (ch != null && ch.isConnected())
+                ch.disconnect();
+        }
+    }
+
+    /**
+     * Checks whether host is running Windows OS.
+     *
+     * @param ses SSH session.
+     * @return Whether host is running Windows OS.
+     * @throws JSchException In case of SSH error.
+     */
+    private boolean isWindows(Session ses) throws JSchException {
+        try {
+            return exec(ses, "cmd.exe") != null;
+        }
+        catch (IOException ignored) {
+            return false;
+        }
+    }
+
+    /**
+     * Gets the value of the specified environment variable.
+     *
+     * @param ses SSH session.
+     * @param name environment variable name.
+     * @param dflt default value.
+     * @return environment variable value.
+     * @throws JSchException In case of SSH error.
+     */
+    private String env(Session ses, String name, String dflt) throws JSchException {
+        try {
+            return exec(ses, "echo " + name);
+        }
+        catch (IOException ignored) {
+            return dflt;
+        }
+    }
+
+    /**
+     * Gets the value of the specified environment variable.
+     *
+     * @param ses SSH session.
+     * @param cmd environment variable name.
+     * @return environment variable value.
+     * @throws JSchException In case of SSH error.
+     * @throws IOException If failed.
+     */
+    private String exec(Session ses, String cmd) throws JSchException, IOException {
+        ChannelExec ch = null;
+
+        try {
+            ch = (ChannelExec)ses.openChannel("exec");
+
+            ch.setCommand(cmd);
+
+            ch.connect();
+
+            try (BufferedReader reader = new BufferedReader(new InputStreamReader(ch.getInputStream()))) {
+                return reader.readLine();
+            }
+        }
+        finally {
+            if (ch != null && ch.isConnected())
+                ch.disconnect();
+        }
+    }
+
+    /**
+     * 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 ignite.sh} script arguments.
+     */
+    private String buildRemoteLogArguments(String username, String host) {
+        assert username != null;
+        assert host != null;
+
+        SB sb = new SB();
+
+        sb.a(" -J-D").a(IGNITE_SSH_HOST).a("=\"").a(host).a("\"").
+            a(" -J-D").a(IGNITE_SSH_USER_NAME).a("=\"").a(username).a("\"");
+
+        return sb.toString();
+    }
+
+    /**
+     * @param log Logger.
+     * @return This callable for chaining method calls.
+     */
+    public StartNodeCallable setLogger(IgniteLogger log) {
+        this.log = log;
+
+        return this;
+    }
+
+    /**
+     * Log info message to loggers.
+     *
+     * @param msg Message text.
+     * @param loggers Loggers.
+     */
+    private void info(String msg, IgniteLogger... loggers) {
+        for (IgniteLogger logger : loggers)
+            if (logger != null && logger.isInfoEnabled())
+                logger.info(msg);
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7f4c5eed/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteProjectionStartStopRestartSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteProjectionStartStopRestartSelfTest.java b/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteProjectionStartStopRestartSelfTest.java
index d4c5fc5..7fa5b4b 100644
--- a/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteProjectionStartStopRestartSelfTest.java
+++ b/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteProjectionStartStopRestartSelfTest.java
@@ -20,7 +20,6 @@ package org.apache.ignite.internal;
 import org.apache.ignite.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.events.*;
-import org.apache.ignite.internal.util.lang.*;
 import org.apache.ignite.internal.util.nodestart.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
@@ -178,19 +177,19 @@ public class IgniteProjectionStartStopRestartSelfTest extends GridCommonAbstract
     public void testStartOneNode() throws Exception {
         joinedLatch = new CountDownLatch(1);
 
-        Collection<GridTuple3<String, Boolean, String>> res =
+        Collection<ClusterStartNodeResult> res =
             startNodes(ignite.cluster(),
                 maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 1, U.getIgniteHome(), CFG_NO_ATTR, null),
                 null, false, 0, 16);
 
         assert res.size() == 1;
 
-        F.forEach(res, new CI1<GridTuple3<String, Boolean, String>>() {
-            @Override public void apply(GridTuple3<String, Boolean, String> t) {
-                assert t.get1().equals(HOST);
+        F.forEach(res, new CI1<ClusterStartNodeResult>() {
+            @Override public void apply(ClusterStartNodeResult t) {
+                assert t.getHostName().equals(HOST);
 
-                if (!t.get2())
-                    throw new IgniteException(t.get3());
+                if (!t.isSuccess())
+                    throw new IgniteException(t.getError());
             }
         });
 
@@ -208,19 +207,19 @@ public class IgniteProjectionStartStopRestartSelfTest extends GridCommonAbstract
     public void testStartThreeNodes() throws Exception {
         joinedLatch = new CountDownLatch(3);
 
-        Collection<GridTuple3<String, Boolean, String>> res =
+        Collection<ClusterStartNodeResult> res =
             startNodes(ignite.cluster(),
                 maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3, U.getIgniteHome(), CFG_NO_ATTR, null),
                 null, false, DFLT_TIMEOUT, 1);
 
         assert res.size() == 3;
 
-        F.forEach(res, new CI1<GridTuple3<String, Boolean, String>>() {
-            @Override public void apply(GridTuple3<String, Boolean, String> t) {
-                assert t.get1().equals(HOST);
+        F.forEach(res, new CI1<ClusterStartNodeResult>() {
+            @Override public void apply(ClusterStartNodeResult t) {
+                assert t.getHostName().equals(HOST);
 
-                if (!t.get2())
-                    throw new IgniteException(t.get3());
+                if (!t.isSuccess())
+                    throw new IgniteException(t.getError());
             }
         });
 
@@ -238,19 +237,19 @@ public class IgniteProjectionStartStopRestartSelfTest extends GridCommonAbstract
     public void testStartThreeNodesAndDoEmptyCall() throws Exception {
         joinedLatch = new CountDownLatch(3);
 
-        Collection<GridTuple3<String, Boolean, String>> res =
+        Collection<ClusterStartNodeResult> res =
             startNodes(ignite.cluster(),
                 maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3, U.getIgniteHome(), CFG_NO_ATTR, null),
                 null, false, 0, 16);
 
         assert res.size() == 3;
 
-        F.forEach(res, new CI1<GridTuple3<String, Boolean, String>>() {
-            @Override public void apply(GridTuple3<String, Boolean, String> t) {
-                assert t.get1().equals(HOST);
+        F.forEach(res, new CI1<ClusterStartNodeResult>() {
+            @Override public void apply(ClusterStartNodeResult t) {
+                assert t.getHostName().equals(HOST);
 
-                if (!t.get2())
-                    throw new IgniteException(t.get3());
+                if (!t.isSuccess())
+                    throw new IgniteException(t.getError());
             }
         });
 
@@ -279,19 +278,19 @@ public class IgniteProjectionStartStopRestartSelfTest extends GridCommonAbstract
     public void testStartThreeNodesAndTryToStartOneNode() throws Exception {
         joinedLatch = new CountDownLatch(3);
 
-        Collection<GridTuple3<String, Boolean, String>> res =
+        Collection<ClusterStartNodeResult> res =
             startNodes(ignite.cluster(),
                 maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3, U.getIgniteHome(), CFG_NO_ATTR, null),
                 null, false, 0, 16);
 
         assert res.size() == 3;
 
-        F.forEach(res, new CI1<GridTuple3<String, Boolean, String>>() {
-            @Override public void apply(GridTuple3<String, Boolean, String> t) {
-                assert t.get1().equals(HOST);
+        F.forEach(res, new CI1<ClusterStartNodeResult>() {
+            @Override public void apply(ClusterStartNodeResult t) {
+                assert t.getHostName().equals(HOST);
 
-                if (!t.get2())
-                    throw new IgniteException(t.get3());
+                if (!t.isSuccess())
+                    throw new IgniteException(t.getError());
             }
         });
 
@@ -320,19 +319,19 @@ public class IgniteProjectionStartStopRestartSelfTest extends GridCommonAbstract
     public void testStartFiveNodesInTwoCalls() throws Exception {
         joinedLatch = new CountDownLatch(3);
 
-        Collection<GridTuple3<String, Boolean, String>> res =
+        Collection<ClusterStartNodeResult> res =
             startNodes(ignite.cluster(),
                 maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3, U.getIgniteHome(), CFG_NO_ATTR, null),
                 null, false, 0, 16);
 
         assert res.size() == 3;
 
-        F.forEach(res, new CI1<GridTuple3<String, Boolean, String>>() {
-            @Override public void apply(GridTuple3<String, Boolean, String> t) {
-                assert t.get1().equals(HOST);
+        F.forEach(res, new CI1<ClusterStartNodeResult>() {
+            @Override public void apply(ClusterStartNodeResult t) {
+                assert t.getHostName().equals(HOST);
 
-                if (!t.get2())
-                    throw new IgniteException(t.get3());
+                if (!t.isSuccess())
+                    throw new IgniteException(t.getError());
             }
         });
 
@@ -351,12 +350,12 @@ public class IgniteProjectionStartStopRestartSelfTest extends GridCommonAbstract
 
         assert res.size() == 2;
 
-        F.forEach(res, new CI1<GridTuple3<String, Boolean, String>>() {
-            @Override public void apply(GridTuple3<String, Boolean, String> t) {
-                assert t.get1().equals(HOST);
+        F.forEach(res, new CI1<ClusterStartNodeResult>() {
+            @Override public void apply(ClusterStartNodeResult t) {
+                assert t.getHostName().equals(HOST);
 
-                if (!t.get2())
-                    throw new IgniteException(t.get3());
+                if (!t.isSuccess())
+                    throw new IgniteException(t.getError());
             }
         });
 
@@ -374,7 +373,7 @@ public class IgniteProjectionStartStopRestartSelfTest extends GridCommonAbstract
     public void testStartFiveWithTwoSpecs() throws Exception {
         joinedLatch = new CountDownLatch(5);
 
-        Collection<GridTuple3<String, Boolean, String>> res =
+        Collection<ClusterStartNodeResult> res =
             startNodes(ignite.cluster(),
                 F.asList(map(HOST, SSH_UNAME, pwd, key, 2, U.getIgniteHome(), CFG_NO_ATTR, null),
                     map(HOST, SSH_UNAME, pwd, key, 3, U.getIgniteHome(), CFG_NO_ATTR, null)),
@@ -382,12 +381,12 @@ public class IgniteProjectionStartStopRestartSelfTest extends GridCommonAbstract
 
         assert res.size() == 5;
 
-        F.forEach(res, new CI1<GridTuple3<String, Boolean, String>>() {
-            @Override public void apply(GridTuple3<String, Boolean, String> t) {
-                assert t.get1().equals(HOST);
+        F.forEach(res, new CI1<ClusterStartNodeResult>() {
+            @Override public void apply(ClusterStartNodeResult t) {
+                assert t.getHostName().equals(HOST);
 
-                if (!t.get2())
-                    throw new IgniteException(t.get3());
+                if (!t.isSuccess())
+                    throw new IgniteException(t.getError());
             }
         });
 
@@ -405,19 +404,19 @@ public class IgniteProjectionStartStopRestartSelfTest extends GridCommonAbstract
     public void testStartThreeNodesAndRestart() throws Exception {
         joinedLatch = new CountDownLatch(3);
 
-        Collection<GridTuple3<String, Boolean, String>> res =
+        Collection<ClusterStartNodeResult> res =
             startNodes(ignite.cluster(),
                 maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3, U.getIgniteHome(), CFG_NO_ATTR, null),
                 null, false, 0, 16);
 
         assert res.size() == 3;
 
-        F.forEach(res, new CI1<GridTuple3<String, Boolean, String>>() {
-            @Override public void apply(GridTuple3<String, Boolean, String> t) {
-                assert t.get1().equals(HOST);
+        F.forEach(res, new CI1<ClusterStartNodeResult>() {
+            @Override public void apply(ClusterStartNodeResult t) {
+                assert t.getHostName().equals(HOST);
 
-                if (!t.get2())
-                    throw new IgniteException(t.get3());
+                if (!t.isSuccess())
+                    throw new IgniteException(t.getError());
             }
         });
 
@@ -437,12 +436,12 @@ public class IgniteProjectionStartStopRestartSelfTest extends GridCommonAbstract
 
         assert res.size() == 3;
 
-        F.forEach(res, new CI1<GridTuple3<String, Boolean, String>>() {
-            @Override public void apply(GridTuple3<String, Boolean, String> t) {
-                assert t.get1().equals(HOST);
+        F.forEach(res, new CI1<ClusterStartNodeResult>() {
+            @Override public void apply(ClusterStartNodeResult t) {
+                assert t.getHostName().equals(HOST);
 
-                if (!t.get2())
-                    throw new IgniteException(t.get3());
+                if (!t.isSuccess())
+                    throw new IgniteException(t.getError());
             }
         });
 
@@ -465,19 +464,19 @@ public class IgniteProjectionStartStopRestartSelfTest extends GridCommonAbstract
 
         script = Paths.get(U.getIgniteHome()).relativize(U.resolveIgnitePath(script).toPath()).toString();
 
-        Collection<GridTuple3<String, Boolean, String>> res =
+        Collection<ClusterStartNodeResult> res =
             startNodes(ignite.cluster(),
                 maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 1, U.getIgniteHome(), null, script),
                 null, false, 0, 16);
 
         assert res.size() == 1;
 
-        F.forEach(res, new CI1<GridTuple3<String, Boolean, String>>() {
-            @Override public void apply(GridTuple3<String, Boolean, String> t) {
-                assert t.get1().equals(HOST);
+        F.forEach(res, new CI1<ClusterStartNodeResult>() {
+            @Override public void apply(ClusterStartNodeResult t) {
+                assert t.getHostName().equals(HOST);
 
-                if (!t.get2())
-                    throw new IgniteException(t.get3());
+                if (!t.isSuccess())
+                    throw new IgniteException(t.getError());
             }
         });
 
@@ -497,19 +496,19 @@ public class IgniteProjectionStartStopRestartSelfTest extends GridCommonAbstract
     public void testStopNodes() throws Exception {
         joinedLatch = new CountDownLatch(3);
 
-        Collection<GridTuple3<String, Boolean, String>> res =
+        Collection<ClusterStartNodeResult> res =
             startNodes(ignite.cluster(),
                 maps(Collections.singleton(HOST), SSH_UNAME, pwd, null, 3, U.getIgniteHome(), CFG_NO_ATTR,
                 null), null, false, 0, 16);
 
         assert res.size() == 3;
 
-        F.forEach(res, new CI1<GridTuple3<String, Boolean, String>>() {
-            @Override public void apply(GridTuple3<String, Boolean, String> t) {
-                assert t.get1().equals(HOST);
+        F.forEach(res, new CI1<ClusterStartNodeResult>() {
+            @Override public void apply(ClusterStartNodeResult t) {
+                assert t.getHostName().equals(HOST);
 
-                if (!t.get2())
-                    throw new IgniteException(t.get3());
+                if (!t.isSuccess())
+                    throw new IgniteException(t.getError());
             }
         });
 
@@ -532,19 +531,19 @@ public class IgniteProjectionStartStopRestartSelfTest extends GridCommonAbstract
     public void testStopNodesFiltered() throws Exception {
         joinedLatch = new CountDownLatch(2);
 
-        Collection<GridTuple3<String, Boolean, String>> res =
+        Collection<ClusterStartNodeResult> res =
             startNodes(ignite.cluster(),
                 maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 2, U.getIgniteHome(), CFG_ATTR, null),
                 null, false, 0, 16);
 
         assert res.size() == 2;
 
-        F.forEach(res, new CI1<GridTuple3<String, Boolean, String>>() {
-            @Override public void apply(GridTuple3<String, Boolean, String> t) {
-                assert t.get1().equals(HOST);
+        F.forEach(res, new CI1<ClusterStartNodeResult>() {
+            @Override public void apply(ClusterStartNodeResult t) {
+                assert t.getHostName().equals(HOST);
 
-                if (!t.get2())
-                    throw new IgniteException(t.get3());
+                if (!t.isSuccess())
+                    throw new IgniteException(t.getError());
             }
         });
 
@@ -558,12 +557,12 @@ public class IgniteProjectionStartStopRestartSelfTest extends GridCommonAbstract
 
         assert res.size() == 1;
 
-        F.forEach(res, new CI1<GridTuple3<String, Boolean, String>>() {
-            @Override public void apply(GridTuple3<String, Boolean, String> t) {
-                assert t.get1().equals(HOST);
+        F.forEach(res, new CI1<ClusterStartNodeResult>() {
+            @Override public void apply(ClusterStartNodeResult t) {
+                assert t.getHostName().equals(HOST);
 
-                if (!t.get2())
-                    throw new IgniteException(t.get3());
+                if (!t.isSuccess())
+                    throw new IgniteException(t.getError());
             }
         });
 
@@ -595,19 +594,19 @@ public class IgniteProjectionStartStopRestartSelfTest extends GridCommonAbstract
     public void testStopNodeById() throws Exception {
         joinedLatch = new CountDownLatch(3);
 
-        Collection<GridTuple3<String, Boolean, String>> res =
+        Collection<ClusterStartNodeResult> res =
             startNodes(ignite.cluster(),
                 maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3, U.getIgniteHome(), CFG_NO_ATTR, null),
                 null, false, 0, 16);
 
         assert res.size() == 3;
 
-        F.forEach(res, new CI1<GridTuple3<String, Boolean, String>>() {
-            @Override public void apply(GridTuple3<String, Boolean, String> t) {
-                assert t.get1().equals(HOST);
+        F.forEach(res, new CI1<ClusterStartNodeResult>() {
+            @Override public void apply(ClusterStartNodeResult t) {
+                assert t.getHostName().equals(HOST);
 
-                if (!t.get2())
-                    throw new IgniteException(t.get3());
+                if (!t.isSuccess())
+                    throw new IgniteException(t.getError());
             }
         });
 
@@ -630,19 +629,19 @@ public class IgniteProjectionStartStopRestartSelfTest extends GridCommonAbstract
     public void testStopNodesByIds() throws Exception {
         joinedLatch = new CountDownLatch(3);
 
-        Collection<GridTuple3<String, Boolean, String>> res =
+        Collection<ClusterStartNodeResult> res =
             startNodes(ignite.cluster(),
                 maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3, U.getIgniteHome(), CFG_NO_ATTR, null),
                 null, false, 0, 16);
 
         assert res.size() == 3;
 
-        F.forEach(res, new CI1<GridTuple3<String, Boolean, String>>() {
-            @Override public void apply(GridTuple3<String, Boolean, String> t) {
-                assert t.get1().equals(HOST);
+        F.forEach(res, new CI1<ClusterStartNodeResult>() {
+            @Override public void apply(ClusterStartNodeResult t) {
+                assert t.getHostName().equals(HOST);
 
-                if (!t.get2())
-                    throw new IgniteException(t.get3());
+                if (!t.isSuccess())
+                    throw new IgniteException(t.getError());
             }
         });
 
@@ -672,19 +671,19 @@ public class IgniteProjectionStartStopRestartSelfTest extends GridCommonAbstract
     public void testStopNodesByIdsC() throws Exception {
         joinedLatch = new CountDownLatch(3);
 
-        Collection<GridTuple3<String, Boolean, String>> res =
+        Collection<ClusterStartNodeResult> res =
             startNodes(ignite.cluster(),
                 maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3, U.getIgniteHome(), CFG_NO_ATTR, null),
                 null, false, 0, 16);
 
         assert res.size() == 3;
 
-        F.forEach(res, new CI1<GridTuple3<String, Boolean, String>>() {
-            @Override public void apply(GridTuple3<String, Boolean, String> t) {
-                assert t.get1().equals(HOST);
+        F.forEach(res, new CI1<ClusterStartNodeResult>() {
+            @Override public void apply(ClusterStartNodeResult t) {
+                assert t.getHostName().equals(HOST);
 
-                if (!t.get2())
-                    throw new IgniteException(t.get3());
+                if (!t.isSuccess())
+                    throw new IgniteException(t.getError());
             }
         });
 
@@ -709,19 +708,19 @@ public class IgniteProjectionStartStopRestartSelfTest extends GridCommonAbstract
     public void testRestartNodes() throws Exception {
         joinedLatch = new CountDownLatch(3);
 
-        Collection<GridTuple3<String, Boolean, String>> res =
+        Collection<ClusterStartNodeResult> res =
             startNodes(ignite.cluster(),
                 maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3, U.getIgniteHome(), CFG_NO_ATTR, null),
                 null, false, 0, 16);
 
         assert res.size() == 3;
 
-        F.forEach(res, new CI1<GridTuple3<String, Boolean, String>>() {
-            @Override public void apply(GridTuple3<String, Boolean, String> t) {
-                assert t.get1().equals(HOST);
+        F.forEach(res, new CI1<ClusterStartNodeResult>() {
+            @Override public void apply(ClusterStartNodeResult t) {
+                assert t.getHostName().equals(HOST);
 
-                if (!t.get2())
-                    throw new IgniteException(t.get3());
+                if (!t.isSuccess())
+                    throw new IgniteException(t.getError());
             }
         });
 
@@ -746,19 +745,19 @@ public class IgniteProjectionStartStopRestartSelfTest extends GridCommonAbstract
     public void testRestartNodesFiltered() throws Exception {
         joinedLatch = new CountDownLatch(2);
 
-        Collection<GridTuple3<String, Boolean, String>> res =
+        Collection<ClusterStartNodeResult> res =
             startNodes(ignite.cluster(),
                 maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 2, U.getIgniteHome(), CFG_ATTR, null),
                 null, false, 0, 16);
 
         assert res.size() == 2;
 
-        F.forEach(res, new CI1<GridTuple3<String, Boolean, String>>() {
-            @Override public void apply(GridTuple3<String, Boolean, String> t) {
-                assert t.get1().equals(HOST);
+        F.forEach(res, new CI1<ClusterStartNodeResult>() {
+            @Override public void apply(ClusterStartNodeResult t) {
+                assert t.getHostName().equals(HOST);
 
-                if (!t.get2())
-                    throw new IgniteException(t.get3());
+                if (!t.isSuccess())
+                    throw new IgniteException(t.getError());
             }
         });
 
@@ -772,12 +771,12 @@ public class IgniteProjectionStartStopRestartSelfTest extends GridCommonAbstract
 
         assert res.size() == 1;
 
-        F.forEach(res, new CI1<GridTuple3<String, Boolean, String>>() {
-            @Override public void apply(GridTuple3<String, Boolean, String> t) {
-                assert t.get1().equals(HOST);
+        F.forEach(res, new CI1<ClusterStartNodeResult>() {
+            @Override public void apply(ClusterStartNodeResult t) {
+                assert t.getHostName().equals(HOST);
 
-                if (!t.get2())
-                    throw new IgniteException(t.get3());
+                if (!t.isSuccess())
+                    throw new IgniteException(t.getError());
             }
         });
 
@@ -812,19 +811,19 @@ public class IgniteProjectionStartStopRestartSelfTest extends GridCommonAbstract
     public void testRestartNodeById() throws Exception {
         joinedLatch = new CountDownLatch(3);
 
-        Collection<GridTuple3<String, Boolean, String>> res =
+        Collection<ClusterStartNodeResult> res =
             startNodes(ignite.cluster(),
                 maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3, U.getIgniteHome(), CFG_NO_ATTR, null),
                 null, false, 0, 16);
 
         assert res.size() == 3;
 
-        F.forEach(res, new CI1<GridTuple3<String, Boolean, String>>() {
-            @Override public void apply(GridTuple3<String, Boolean, String> t) {
-                assert t.get1().equals(HOST);
+        F.forEach(res, new CI1<ClusterStartNodeResult>() {
+            @Override public void apply(ClusterStartNodeResult t) {
+                assert t.getHostName().equals(HOST);
 
-                if (!t.get2())
-                    throw new IgniteException(t.get3());
+                if (!t.isSuccess())
+                    throw new IgniteException(t.getError());
             }
         });
 
@@ -849,19 +848,19 @@ public class IgniteProjectionStartStopRestartSelfTest extends GridCommonAbstract
     public void testRestartNodesByIds() throws Exception {
         joinedLatch = new CountDownLatch(3);
 
-        Collection<GridTuple3<String, Boolean, String>> res =
+        Collection<ClusterStartNodeResult> res =
             startNodes(ignite.cluster(),
                 maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3, U.getIgniteHome(), CFG_NO_ATTR, null),
                 null, false, 0, 16);
 
         assert res.size() == 3;
 
-        F.forEach(res, new CI1<GridTuple3<String, Boolean, String>>() {
-            @Override public void apply(GridTuple3<String, Boolean, String> t) {
-                assert t.get1().equals(HOST);
+        F.forEach(res, new CI1<ClusterStartNodeResult>() {
+            @Override public void apply(ClusterStartNodeResult t) {
+                assert t.getHostName().equals(HOST);
 
-                if (!t.get2())
-                    throw new IgniteException(t.get3());
+                if (!t.isSuccess())
+                    throw new IgniteException(t.getError());
             }
         });
 
@@ -888,19 +887,19 @@ public class IgniteProjectionStartStopRestartSelfTest extends GridCommonAbstract
     public void testRestartNodesByIdsC() throws Exception {
         joinedLatch = new CountDownLatch(3);
 
-        Collection<GridTuple3<String, Boolean, String>> res =
+        Collection<ClusterStartNodeResult> res =
             startNodes(ignite.cluster(),
                 maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3, U.getIgniteHome(), CFG_NO_ATTR, null),
                 null, false, 0, 16);
 
         assert res.size() == 3;
 
-        F.forEach(res, new CI1<GridTuple3<String, Boolean, String>>() {
-            @Override public void apply(GridTuple3<String, Boolean, String> t) {
-                assert t.get1().equals(HOST);
+        F.forEach(res, new CI1<ClusterStartNodeResult>() {
+            @Override public void apply(ClusterStartNodeResult t) {
+                assert t.getHostName().equals(HOST);
 
-                if (!t.get2())
-                    throw new IgniteException(t.get3());
+                if (!t.isSuccess())
+                    throw new IgniteException(t.getError());
             }
         });
 
@@ -1016,7 +1015,7 @@ public class IgniteProjectionStartStopRestartSelfTest extends GridCommonAbstract
      * @param maxConn Maximum connections.
      * @return Results collection.
      */
-    private Collection<GridTuple3<String, Boolean, String>> startNodes(IgniteCluster cluster,
+    private Collection<ClusterStartNodeResult> startNodes(IgniteCluster cluster,
         Collection<Map<String, Object>> hosts,
         @Nullable Map<String, Object> dflts,
         boolean restart,
@@ -1026,6 +1025,6 @@ public class IgniteProjectionStartStopRestartSelfTest extends GridCommonAbstract
 
         assertNull(cluster.startNodes(hosts, dflts, restart, timeout, maxConn));
 
-        return cluster.<Collection<GridTuple3<String, Boolean, String>>>future().get(WAIT_TIMEOUT);
+        return cluster.<Collection<ClusterStartNodeResult>>future().get(WAIT_TIMEOUT);
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7f4c5eed/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteStartStopRestartTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteStartStopRestartTestSuite.java b/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteStartStopRestartTestSuite.java
index 65fcb44..6d09eb2 100644
--- a/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteStartStopRestartTestSuite.java
+++ b/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteStartStopRestartTestSuite.java
@@ -37,3 +37,4 @@ public class IgniteStartStopRestartTestSuite {
         return suite;
     }
 }
+

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7f4c5eed/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 5342fc1..a6de108 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
@@ -228,7 +228,7 @@ class VisorStartCommand {
 
                 try
                     res = ignite.cluster.startNodes(file, restart, timeout, maxConn).map(t => {
-                        Result(t.get1, t.get2, t.get3)
+                        Result(t.getHostName, t.isSuccess, t.getError)
                     }).toSeq
                 catch {
                     case e: IgniteException => scold(e.getMessage).^^
@@ -284,7 +284,7 @@ class VisorStartCommand {
 
                 try
                     res = ignite.cluster.startNodes(asJavaCollection(Seq(params)), null, restart, timeout, maxConn).
-                        map(t => Result(t.get1, t.get2, t.get3)).toSeq
+                        map(t => Result(t.getHostName, t.isSuccess, t.getError)).toSeq
                 catch {
                     case e: IgniteException => scold(e.getMessage).^^
                     case _: RejectedExecutionException => scold("Failed due to system error.").^^


[12/50] [abbrv] incubator-ignite git commit: # IGNITE-703 Muted unneeded daemon node output.

Posted by ag...@apache.org.
# IGNITE-703 Muted unneeded daemon node output.


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

Branch: refs/heads/ignite-674
Commit: 7466be2871b43c98d1699a4f393fb1aaa5cc6769
Parents: 9d183c5
Author: AKuznetsov <ak...@gridgain.com>
Authored: Thu Apr 9 14:02:28 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Thu Apr 9 14:02:28 2015 +0700

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


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7466be28/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 33ba976..b9981f1 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
@@ -31,6 +31,7 @@ import org.apache.ignite.internal.cluster.ClusterGroupEmptyCheckedException
 import org.apache.ignite.internal.util.lang.{GridFunc => F}
 import org.apache.ignite.internal.util.typedef._
 import org.apache.ignite.internal.util.{GridConfigurationFinder, IgniteUtils => U}
+import org.apache.ignite.logger.NullLogger
 import org.apache.ignite.internal.visor.VisorTaskArgument
 import org.apache.ignite.internal.visor.cache._
 import org.apache.ignite.internal.visor.node._
@@ -1608,6 +1609,8 @@ object visor extends VisorTag {
         // Make sure visor starts without shutdown hook.
         System.setProperty(IGNITE_NO_SHUTDOWN_HOOK, "true")
 
+        cfg.setGridLogger(new NullLogger)
+
         val startedGridName = try {
              Ignition.start(cfg).name
         }


[17/50] [abbrv] incubator-ignite git commit: # ignite-sprint-3 fixed compilation

Posted by ag...@apache.org.
# ignite-sprint-3 fixed compilation


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

Branch: refs/heads/ignite-674
Commit: bb0ce4b3567fa60a4c2097e4128ccaa0ef9e0a92
Parents: 6e84a3b
Author: sboikov <sb...@gridgain.com>
Authored: Thu Apr 9 11:47:56 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Thu Apr 9 11:47:56 2015 +0300

----------------------------------------------------------------------
 .../apache/ignite/examples/datagrid/CacheTransactionExample.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bb0ce4b3/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 67f6376..797543a 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
@@ -56,7 +56,7 @@ public class CacheTransactionExample {
 
             cfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
 
-            try (IgniteCache<Integer, Account> cache = ignite.getOrCreateCache(cfg, new NearCacheConfiguration<>())) {
+            try (IgniteCache<Integer, Account> cache = ignite.getOrCreateCache(cfg, new NearCacheConfiguration<Integer, Account>())) {
                 // Initialize.
                 cache.put(1, new Account(1, 100));
                 cache.put(2, new Account(1, 200));


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

Posted by ag...@apache.org.
Merge remote-tracking branch 'origin/ignite-sprint-3' into ignite-sprint-3


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

Branch: refs/heads/ignite-674
Commit: ac779fa35dcc0e157f4ad695131f3cb80914f0b5
Parents: 0c1ad00 86c3bc5
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Thu Apr 9 17:09:43 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Thu Apr 9 17:09:43 2015 +0300

----------------------------------------------------------------------
 .../datastructures/IgniteQueueExample.java      |  28 +--
 .../datastructures/IgniteSetExample.java        |  30 +--
 .../configuration/CacheConfiguration.java       |  20 +-
 .../configuration/CollectionConfiguration.java  | 114 +++++++++-
 .../ignite/internal/GridPluginContext.java      |  15 +-
 .../apache/ignite/internal/IgniteKernal.java    |   5 -
 .../processors/cache/GridCacheProcessor.java    |  26 ++-
 .../CacheDataStructuresCacheKey.java            |  62 ++++++
 .../CacheDataStructuresConfigurationKey.java    |   2 +-
 .../datastructures/DataStructuresProcessor.java | 222 +++++++++++++++++--
 .../plugin/IgnitePluginProcessor.java           |  58 ++---
 .../ignite/plugin/CachePluginConfiguration.java |   2 +-
 .../org/apache/ignite/plugin/IgnitePlugin.java  |   3 -
 .../ignite/plugin/PluginConfiguration.java      |  10 +-
 .../org/apache/ignite/plugin/PluginContext.java |   7 +-
 .../apache/ignite/plugin/PluginProvider.java    |   4 +-
 ...actQueueFailoverDataConsistencySelfTest.java |   4 +-
 .../GridCacheQueueApiSelfAbstractTest.java      |  80 +++++++
 .../GridCacheQueueCleanupSelfTest.java          |  11 +-
 ...dCacheQueueMultiNodeConsistencySelfTest.java |  11 +-
 .../GridCacheSetAbstractSelfTest.java           |   5 +-
 .../IgniteCollectionAbstractTest.java           | 160 +++----------
 .../IgniteDataStructureUniqueNameTest.java      |  47 +---
 .../GridCacheLocalAtomicOffheapSetSelfTest.java |  32 +++
 .../GridCacheLocalAtomicQueueApiSelfTest.java   |   6 +
 .../local/GridCacheLocalAtomicSetSelfTest.java  |   6 +
 .../GridCacheLocalOffheapQueueApiSelfTest.java  |  31 +++
 .../local/GridCacheLocalQueueApiSelfTest.java   |   6 +
 .../local/GridCacheLocalSetSelfTest.java        |   6 +
 ...artitionedAtomicOffheapQueueApiSelfTest.java |  32 +++
 ...omicOffheapQueueCreateMultiNodeSelfTest.java |  32 +++
 ...onedAtomicOffheapQueueMultiNodeSelfTest.java |  32 +++
 ...dCachePartitionedAtomicQueueApiSelfTest.java |   6 +
 ...ionedAtomicQueueCreateMultiNodeSelfTest.java |   6 +
 ...micQueueFailoverDataConsistencySelfTest.java |   6 +
 ...PartitionedAtomicQueueMultiNodeSelfTest.java |   6 +
 ...itionedAtomicQueueRotativeMultiNodeTest.java |   6 +
 ...chePartitionedAtomicSetFailoverSelfTest.java |   6 +
 ...rtitionedDataStructuresFailoverSelfTest.java |   6 +
 ...artitionedOffHeapValuesQueueApiSelfTest.java |  31 +++
 ...achePartitionedOffHeapValuesSetSelfTest.java |  32 +++
 ...edOffheapDataStructuresFailoverSelfTest.java |  34 +++
 ...hePartitionedOffheapSetFailoverSelfTest.java |  32 +++
 .../GridCachePartitionedQueueApiSelfTest.java   |   6 +
 ...PartitionedQueueCreateMultiNodeSelfTest.java |   6 +
 ...dCachePartitionedQueueEntryMoveSelfTest.java |  10 +-
 ...nedQueueFailoverDataConsistencySelfTest.java |   6 +
 ...CachePartitionedQueueJoinedNodeSelfTest.java |   6 +
 ...dCachePartitionedQueueMultiNodeSelfTest.java |   6 +
 ...hePartitionedQueueRotativeMultiNodeTest.java |   6 +
 ...GridCachePartitionedSetFailoverSelfTest.java |   6 +
 .../GridCachePartitionedSetSelfTest.java        |   6 +
 .../IgnitePartitionedSetNoBackupsSelfTest.java  |   5 +-
 ...eplicatedDataStructuresFailoverSelfTest.java |   6 +
 .../GridCacheReplicatedQueueApiSelfTest.java    |  11 +
 ...idCacheReplicatedQueueMultiNodeSelfTest.java |   6 +
 ...cheReplicatedQueueRotativeMultiNodeTest.java |   6 +
 .../GridCacheReplicatedSetSelfTest.java         |   6 +
 .../IgniteCacheDataStructuresSelfTestSuite.java |  10 +
 .../h2/sql/AbstractH2CompareQueryTest.java      |  13 +-
 .../query/h2/sql/BaseH2CompareQueryTest.java    |  25 ++-
 .../query/h2/sql/H2CompareBigQueryTest.java     |  38 +---
 62 files changed, 1093 insertions(+), 371 deletions(-)
----------------------------------------------------------------------



[16/50] [abbrv] incubator-ignite git commit: sprint-3 - Updated cache examples.

Posted by ag...@apache.org.
sprint-3 - Updated cache examples.


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

Branch: refs/heads/ignite-674
Commit: 6e84a3b3e4284b4818aec03a51988bdc51de7d54
Parents: 3e6da9c
Author: Dmitiry Setrakyan <ds...@gridgain.com>
Authored: Thu Apr 9 01:05:54 2015 -0700
Committer: Dmitiry Setrakyan <ds...@gridgain.com>
Committed: Thu Apr 9 01:05:54 2015 -0700

----------------------------------------------------------------------
 .../ignite/examples/datagrid/CacheAffinityExample.java    |  9 +--------
 .../apache/ignite/examples/datagrid/CacheApiExample.java  |  9 +--------
 .../ignite/examples/datagrid/CacheAsyncApiExample.java    |  9 +--------
 .../examples/datagrid/CacheContinuousQueryExample.java    |  8 +-------
 .../examples/datagrid/CacheDataStreamerExample.java       |  9 +--------
 .../ignite/examples/datagrid/CacheEventsExample.java      |  9 +--------
 .../ignite/examples/datagrid/CachePutGetExample.java      | 10 +---------
 .../ignite/examples/datagrid/CacheTransactionExample.java |  8 ++------
 .../datagrid/hibernate/HibernateL2CacheExample.java       |  5 +----
 .../datagrid/starschema/CacheStarSchemaExample.java       | 10 ++++------
 .../datagrid/store/auto/CacheAutoStoreExample.java        |  8 ++++----
 .../store/auto/CacheAutoStoreLoadDataExample.java         |  5 ++++-
 .../ignite/examples/datagrid/store/auto/CacheConfig.java  |  4 ++--
 .../datagrid/store/dummy/CacheDummyStoreExample.java      |  5 ++++-
 .../store/hibernate/CacheHibernateStoreExample.java       |  5 ++++-
 .../datagrid/store/jdbc/CacheJdbcStoreExample.java        |  5 ++++-
 .../ignite/examples/streaming/StreamVisitorExample.java   |  5 +----
 17 files changed, 37 insertions(+), 86 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6e84a3b3/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 7780e2e..a389dcb 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
@@ -18,9 +18,7 @@
 package org.apache.ignite.examples.datagrid;
 
 import org.apache.ignite.*;
-import org.apache.ignite.cache.*;
 import org.apache.ignite.cluster.*;
-import org.apache.ignite.configuration.*;
 import org.apache.ignite.examples.*;
 import org.apache.ignite.lang.*;
 
@@ -55,12 +53,7 @@ public final class CacheAffinityExample {
             System.out.println();
             System.out.println(">>> Cache affinity example started.");
 
-            CacheConfiguration<Integer, String> cfg = new CacheConfiguration<>();
-
-            cfg.setCacheMode(CacheMode.PARTITIONED);
-            cfg.setName(CACHE_NAME);
-
-            try (IgniteCache<Integer, String> cache = ignite.createCache(cfg)) {
+            try (IgniteCache<Integer, String> cache = ignite.getOrCreateCache(CACHE_NAME)) {
                 for (int i = 0; i < KEY_CNT; i++)
                     cache.put(i, Integer.toString(i));
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6e84a3b3/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 35b7ac6..3d06b2e 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
@@ -18,8 +18,6 @@
 package org.apache.ignite.examples.datagrid;
 
 import org.apache.ignite.*;
-import org.apache.ignite.cache.*;
-import org.apache.ignite.configuration.*;
 import org.apache.ignite.examples.*;
 
 import javax.cache.processor.*;
@@ -49,12 +47,7 @@ public class CacheApiExample {
             System.out.println();
             System.out.println(">>> Cache API example started.");
 
-            CacheConfiguration<Integer, String> cfg = new CacheConfiguration<>();
-
-            cfg.setCacheMode(CacheMode.PARTITIONED);
-            cfg.setName(CACHE_NAME);
-
-            try (IgniteCache<Integer, String> cache = ignite.createCache(cfg)) {
+            try (IgniteCache<Integer, String> cache = ignite.getOrCreateCache(CACHE_NAME)) {
                 // Demonstrate atomic map operations.
                 atomicMapOperations(cache);
             }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6e84a3b3/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheAsyncApiExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheAsyncApiExample.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheAsyncApiExample.java
index e7daa09..e9d6e04 100644
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheAsyncApiExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheAsyncApiExample.java
@@ -18,8 +18,6 @@
 package org.apache.ignite.examples.datagrid;
 
 import org.apache.ignite.*;
-import org.apache.ignite.cache.*;
-import org.apache.ignite.configuration.*;
 import org.apache.ignite.examples.*;
 import org.apache.ignite.lang.*;
 
@@ -49,12 +47,7 @@ public class CacheAsyncApiExample {
             System.out.println();
             System.out.println(">>> Cache asynchronous API example started.");
 
-            CacheConfiguration<Integer, String> cfg = new CacheConfiguration<>();
-
-            cfg.setCacheMode(CacheMode.PARTITIONED);
-            cfg.setName(CACHE_NAME);
-
-            try (IgniteCache<Integer, String> cache = ignite.createCache(cfg)) {
+            try (IgniteCache<Integer, String> cache = ignite.getOrCreateCache(CACHE_NAME)) {
                 // Enable asynchronous mode.
                 IgniteCache<Integer, String> asyncCache = cache.withAsync();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6e84a3b3/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 34014c8..a209d42 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
@@ -20,7 +20,6 @@ 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.configuration.*;
 import org.apache.ignite.examples.*;
 import org.apache.ignite.lang.*;
 
@@ -51,12 +50,7 @@ public class CacheContinuousQueryExample {
             System.out.println();
             System.out.println(">>> Cache continuous query example started.");
 
-            CacheConfiguration<Integer, String> cfg = new CacheConfiguration<>();
-
-            cfg.setCacheMode(CacheMode.PARTITIONED);
-            cfg.setName(CACHE_NAME);
-
-            try (IgniteCache<Integer, String> cache = ignite.createCache(cfg)) {
+            try (IgniteCache<Integer, String> cache = ignite.getOrCreateCache(CACHE_NAME)) {
                 int keyCnt = 20;
 
                 // These entries will be queried by initial predicate.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6e84a3b3/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheDataStreamerExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheDataStreamerExample.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheDataStreamerExample.java
index db00bab..4994388 100644
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheDataStreamerExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheDataStreamerExample.java
@@ -18,8 +18,6 @@
 package org.apache.ignite.examples.datagrid;
 
 import org.apache.ignite.*;
-import org.apache.ignite.cache.*;
-import org.apache.ignite.configuration.*;
 import org.apache.ignite.examples.*;
 
 /**
@@ -57,12 +55,7 @@ public class CacheDataStreamerExample {
             System.out.println();
             System.out.println(">>> Cache data streamer example started.");
 
-            CacheConfiguration<Integer, String> cfg = new CacheConfiguration<>();
-
-            cfg.setCacheMode(CacheMode.PARTITIONED);
-            cfg.setName(CACHE_NAME);
-
-            try (IgniteCache<Integer, String> cache = ignite.createCache(cfg)) {
+            try (IgniteCache<Integer, String> cache = ignite.getOrCreateCache(CACHE_NAME)) {
                 long start = System.currentTimeMillis();
 
                 try (IgniteDataStreamer<Integer, String> stmr = ignite.dataStreamer(CACHE_NAME)) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6e84a3b3/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 1c9e29e..32fab75 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
@@ -18,8 +18,6 @@
 package org.apache.ignite.examples.datagrid;
 
 import org.apache.ignite.*;
-import org.apache.ignite.cache.*;
-import org.apache.ignite.configuration.*;
 import org.apache.ignite.events.*;
 import org.apache.ignite.examples.*;
 import org.apache.ignite.lang.*;
@@ -53,12 +51,7 @@ public class CacheEventsExample {
             System.out.println();
             System.out.println(">>> Cache events example started.");
 
-            CacheConfiguration<Integer, String> cfg = new CacheConfiguration<>();
-
-            cfg.setCacheMode(CacheMode.PARTITIONED);
-            cfg.setName(CACHE_NAME);
-
-            try (IgniteCache<Integer, String> cache = ignite.createCache(cfg)) {
+            try (IgniteCache<Integer, String> cache = ignite.getOrCreateCache(CACHE_NAME)) {
                 // This optional local callback is called for each event notification
                 // that passed remote predicate listener.
                 IgniteBiPredicate<UUID, CacheEvent> locLsnr = new IgniteBiPredicate<UUID, CacheEvent>() {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6e84a3b3/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 acb46ed..8fd5376 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
@@ -18,8 +18,6 @@
 package org.apache.ignite.examples.datagrid;
 
 import org.apache.ignite.*;
-import org.apache.ignite.cache.*;
-import org.apache.ignite.configuration.*;
 import org.apache.ignite.examples.*;
 
 import java.util.*;
@@ -45,13 +43,7 @@ public class CachePutGetExample {
      */
     public static void main(String[] args) throws IgniteException {
         try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) {
-
-            CacheConfiguration<Integer, String> cfg = new CacheConfiguration<>();
-
-            cfg.setCacheMode(CacheMode.PARTITIONED);
-            cfg.setName(CACHE_NAME);
-
-            try (IgniteCache<Integer, String> cache = ignite.createCache(cfg)) {
+            try (IgniteCache<Integer, String> cache = ignite.getOrCreateCache(CACHE_NAME)) {
                 // Individual puts and gets.
                 putGet(cache);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6e84a3b3/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 c24ada1..67f6376 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
@@ -52,15 +52,11 @@ public class CacheTransactionExample {
             System.out.println();
             System.out.println(">>> Cache transaction example started.");
 
-            CacheConfiguration<Integer, Account> cfg = new CacheConfiguration<>();
+            CacheConfiguration<Integer, Account> cfg = new CacheConfiguration<>(CACHE_NAME);
 
-            cfg.setCacheMode(CacheMode.PARTITIONED);
-            cfg.setName(CACHE_NAME);
             cfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
 
-            NearCacheConfiguration<Integer, Account> nearCacheCfg = new NearCacheConfiguration<>();
-
-            try (IgniteCache<Integer, Account> cache = ignite.createCache(cfg, nearCacheCfg)) {
+            try (IgniteCache<Integer, Account> cache = ignite.getOrCreateCache(cfg, new NearCacheConfiguration<>())) {
                 // Initialize.
                 cache.put(1, new Account(1, 100));
                 cache.put(2, new Account(1, 200));

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6e84a3b3/examples/src/main/java/org/apache/ignite/examples/datagrid/hibernate/HibernateL2CacheExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/hibernate/HibernateL2CacheExample.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/hibernate/HibernateL2CacheExample.java
index 6bb3f33..af2decf 100644
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/hibernate/HibernateL2CacheExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/hibernate/HibernateL2CacheExample.java
@@ -31,7 +31,6 @@ import java.net.*;
 import java.util.*;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.*;
-import static org.apache.ignite.cache.CacheMode.*;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*;
 
 /**
@@ -188,10 +187,8 @@ public class HibernateL2CacheExample {
      * @return Cache configuration.
      */
     private static IgniteCache createCache(String name, CacheAtomicityMode atomicityMode) {
-        CacheConfiguration ccfg = new CacheConfiguration();
+        CacheConfiguration ccfg = new CacheConfiguration(name);
 
-        ccfg.setName(name);
-        ccfg.setCacheMode(PARTITIONED);
         ccfg.setAtomicityMode(atomicityMode);
         ccfg.setWriteSynchronizationMode(FULL_SYNC);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6e84a3b3/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 302d963..bef2457 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
@@ -73,25 +73,23 @@ public class CacheStarSchemaExample {
             System.out.println();
             System.out.println(">>> Cache star schema example started.");
 
-            CacheConfiguration<Integer, FactPurchase> factCacheCfg = new CacheConfiguration<>();
+            CacheConfiguration<Integer, FactPurchase> factCacheCfg = new CacheConfiguration<>(PARTITIONED_CACHE_NAME);
 
             factCacheCfg.setCacheMode(CacheMode.PARTITIONED);
-            factCacheCfg.setName(PARTITIONED_CACHE_NAME);
             factCacheCfg.setIndexedTypes(
                 Integer.class, FactPurchase.class
             );
 
-            CacheConfiguration<Integer, Object> dimCacheCfg = new CacheConfiguration<>();
+            CacheConfiguration<Integer, Object> dimCacheCfg = new CacheConfiguration<>(REPLICATED_CACHE_NAME);
 
             dimCacheCfg.setCacheMode(CacheMode.REPLICATED);
-            dimCacheCfg.setName(REPLICATED_CACHE_NAME);
             dimCacheCfg.setIndexedTypes(
                 Integer.class, DimStore.class,
                 Integer.class, DimProduct.class
             );
 
-            try (IgniteCache<Integer, FactPurchase> factCache = ignite.createCache(factCacheCfg);
-                 IgniteCache<Integer, Object> dimCache = ignite.createCache(dimCacheCfg)) {
+            try (IgniteCache<Integer, FactPurchase> factCache = ignite.getOrCreateCache(factCacheCfg);
+                 IgniteCache<Integer, Object> dimCache = ignite.getOrCreateCache(dimCacheCfg)) {
                 populateDimensions(dimCache);
                 populateFacts(factCache);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6e84a3b3/examples/src/main/java/org/apache/ignite/examples/datagrid/store/auto/CacheAutoStoreExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/store/auto/CacheAutoStoreExample.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/store/auto/CacheAutoStoreExample.java
index abc5fc5..0176451 100644
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/store/auto/CacheAutoStoreExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/store/auto/CacheAutoStoreExample.java
@@ -19,7 +19,6 @@ package org.apache.ignite.examples.datagrid.store.auto;
 
 import org.apache.ignite.*;
 import org.apache.ignite.cache.store.jdbc.*;
-import org.apache.ignite.configuration.*;
 import org.apache.ignite.examples.*;
 import org.apache.ignite.examples.datagrid.store.*;
 import org.apache.ignite.transactions.*;
@@ -45,6 +44,9 @@ import java.util.*;
  * start node with {@code examples/config/example-ignite.xml} configuration.
  */
 public class CacheAutoStoreExample {
+    /** Cache name. */
+    public static final String CACHE_NAME = CacheAutoStoreLoadDataExample.class.getSimpleName();
+
     /** Global person ID to use across entire example. */
     private static final Long id = Math.abs(UUID.randomUUID().getLeastSignificantBits());
 
@@ -60,9 +62,7 @@ public class CacheAutoStoreExample {
             System.out.println();
             System.out.println(">>> Cache auto store example started.");
 
-            CacheConfiguration<Long, Person> cacheCfg = CacheConfig.jdbcPojoStoreCache();
-
-            try (IgniteCache<Long, Person> cache = ignite.getOrCreateCache(cacheCfg)) {
+            try (IgniteCache<Long, Person> cache = ignite.getOrCreateCache(CacheConfig.jdbcPojoStoreCache(CACHE_NAME))) {
                 try (Transaction tx = ignite.transactions().txStart()) {
                     Person val = cache.get(id);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6e84a3b3/examples/src/main/java/org/apache/ignite/examples/datagrid/store/auto/CacheAutoStoreLoadDataExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/store/auto/CacheAutoStoreLoadDataExample.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/store/auto/CacheAutoStoreLoadDataExample.java
index 8a3b5c0..4cfd520 100644
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/store/auto/CacheAutoStoreLoadDataExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/store/auto/CacheAutoStoreLoadDataExample.java
@@ -42,6 +42,9 @@ import org.apache.ignite.examples.datagrid.store.*;
  * start node with {@code examples/config/example-ignite.xml} configuration.
  */
 public class CacheAutoStoreLoadDataExample {
+    /** Cache name. */
+    public static final String CACHE_NAME = CacheAutoStoreLoadDataExample.class.getSimpleName();
+
     /** Heap size required to run this example. */
     public static final int MIN_MEMORY = 1024 * 1024 * 1024;
 
@@ -58,7 +61,7 @@ public class CacheAutoStoreLoadDataExample {
             System.out.println();
             System.out.println(">>> Cache auto store load data example started.");
 
-            CacheConfiguration<Long, Person> cacheCfg = CacheConfig.jdbcPojoStoreCache();
+            CacheConfiguration<Long, Person> cacheCfg = CacheConfig.jdbcPojoStoreCache(CACHE_NAME);
 
             try (IgniteCache<Long, Person> cache = ignite.getOrCreateCache(cacheCfg)) {
                 // Load cache on all data nodes with custom SQL statement.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6e84a3b3/examples/src/main/java/org/apache/ignite/examples/datagrid/store/auto/CacheConfig.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/store/auto/CacheConfig.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/store/auto/CacheConfig.java
index 5c63694..6c148a6 100644
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/store/auto/CacheConfig.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/store/auto/CacheConfig.java
@@ -37,8 +37,8 @@ public class CacheConfig {
     /**
      * Configure cache with store.
      */
-    public static CacheConfiguration<Long, Person> jdbcPojoStoreCache() {
-        CacheConfiguration<Long, Person> cfg = new CacheConfiguration<>();
+    public static CacheConfiguration<Long, Person> jdbcPojoStoreCache(String name) {
+        CacheConfiguration<Long, Person> cfg = new CacheConfiguration<>(name);
 
         // Set atomicity as transaction, since we are showing transactions in the example.
         cfg.setAtomicityMode(TRANSACTIONAL);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6e84a3b3/examples/src/main/java/org/apache/ignite/examples/datagrid/store/dummy/CacheDummyStoreExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/store/dummy/CacheDummyStoreExample.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/store/dummy/CacheDummyStoreExample.java
index ce103d8..d79b895 100644
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/store/dummy/CacheDummyStoreExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/store/dummy/CacheDummyStoreExample.java
@@ -37,6 +37,9 @@ import static org.apache.ignite.cache.CacheAtomicityMode.*;
  * start node with {@code examples/config/example-ignite.xml} configuration.
  */
 public class CacheDummyStoreExample {
+    /** Cache name. */
+    private static final String CACHE_NAME = CacheDummyStoreExample.class.getSimpleName();
+
     /** Heap size required to run this example. */
     public static final int MIN_MEMORY = 1024 * 1024 * 1024;
 
@@ -60,7 +63,7 @@ public class CacheDummyStoreExample {
             System.out.println();
             System.out.println(">>> Cache store example started.");
 
-            CacheConfiguration<Long, Person> cacheCfg = new CacheConfiguration<>();
+            CacheConfiguration<Long, Person> cacheCfg = new CacheConfiguration<>(CACHE_NAME);
 
             // Set atomicity as transaction, since we are showing transactions in example.
             cacheCfg.setAtomicityMode(TRANSACTIONAL);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6e84a3b3/examples/src/main/java/org/apache/ignite/examples/datagrid/store/hibernate/CacheHibernateStoreExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/store/hibernate/CacheHibernateStoreExample.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/store/hibernate/CacheHibernateStoreExample.java
index 7dc80c6..a37bac4 100644
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/store/hibernate/CacheHibernateStoreExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/store/hibernate/CacheHibernateStoreExample.java
@@ -40,6 +40,9 @@ import static org.apache.ignite.cache.CacheAtomicityMode.*;
  * start node with {@code examples/config/example-ignite.xml} configuration.
  */
 public class CacheHibernateStoreExample {
+    /** Cache name. */
+    private static final String CACHE_NAME = CacheHibernateStoreExample.class.getSimpleName();
+
     /** Heap size required to run this example. */
     public static final int MIN_MEMORY = 1024 * 1024 * 1024;
 
@@ -63,7 +66,7 @@ public class CacheHibernateStoreExample {
             System.out.println();
             System.out.println(">>> Cache store example started.");
 
-            CacheConfiguration<Long, Person> cacheCfg = new CacheConfiguration<>();
+            CacheConfiguration<Long, Person> cacheCfg = new CacheConfiguration<>(CACHE_NAME);
 
             // Set atomicity as transaction, since we are showing transactions in example.
             cacheCfg.setAtomicityMode(TRANSACTIONAL);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6e84a3b3/examples/src/main/java/org/apache/ignite/examples/datagrid/store/jdbc/CacheJdbcStoreExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/store/jdbc/CacheJdbcStoreExample.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/store/jdbc/CacheJdbcStoreExample.java
index 8e68f59..ff8e143 100644
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/store/jdbc/CacheJdbcStoreExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/store/jdbc/CacheJdbcStoreExample.java
@@ -40,6 +40,9 @@ import static org.apache.ignite.cache.CacheAtomicityMode.*;
  * start node with {@code examples/config/example-ignite.xml} configuration.
  */
 public class CacheJdbcStoreExample {
+    /** Cache name. */
+    private static final String CACHE_NAME = CacheJdbcStoreExample.class.getSimpleName();
+
     /** Heap size required to run this example. */
     public static final int MIN_MEMORY = 1024 * 1024 * 1024;
 
@@ -63,7 +66,7 @@ public class CacheJdbcStoreExample {
             System.out.println();
             System.out.println(">>> Cache store example started.");
 
-            CacheConfiguration<Long, Person> cacheCfg = new CacheConfiguration<>();
+            CacheConfiguration<Long, Person> cacheCfg = new CacheConfiguration<>(CACHE_NAME);
 
             // Set atomicity as transaction, since we are showing transactions in example.
             cacheCfg.setAtomicityMode(TRANSACTIONAL);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6e84a3b3/examples/src/main/java/org/apache/ignite/examples/streaming/StreamVisitorExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/streaming/StreamVisitorExample.java b/examples/src/main/java/org/apache/ignite/examples/streaming/StreamVisitorExample.java
index 01259ff..0fbce68 100644
--- a/examples/src/main/java/org/apache/ignite/examples/streaming/StreamVisitorExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/streaming/StreamVisitorExample.java
@@ -55,9 +55,6 @@ public class StreamVisitorExample {
             if (!ExamplesUtils.hasServerNodes(ignite))
                 return;
 
-            // Market data cache with default configuration.
-            CacheConfiguration<String, Double> mktDataCfg = new CacheConfiguration<>("marketTicks");
-
             // Financial instrument cache configuration.
             CacheConfiguration<String, Instrument> instCfg = new CacheConfiguration<>("instCache");
 
@@ -67,7 +64,7 @@ public class StreamVisitorExample {
 
             // Auto-close caches at the end of the example.
             try (
-                IgniteCache<String, Double> mktCache = ignite.getOrCreateCache(mktDataCfg);
+                IgniteCache<String, Double> mktCache = ignite.getOrCreateCache("marketTicks"); // Default config.
                 IgniteCache<String, Instrument> instCache = ignite.getOrCreateCache(instCfg)
             ) {
                 try (IgniteDataStreamer<String, Double> mktStmr = ignite.dataStreamer(mktCache.getName())) {


[33/50] [abbrv] incubator-ignite git commit: Merge remote-tracking branch 'remotes/origin/ignite-180' into ignite-sprint-3

Posted by ag...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-180' into ignite-sprint-3


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

Branch: refs/heads/ignite-674
Commit: 887c1a8708bc5334ffb4dee3e1bf9d5f27ebdb3f
Parents: 245f467 5720aed
Author: ivasilinets <iv...@gridgain.com>
Authored: Thu Apr 9 14:27:58 2015 +0300
Committer: ivasilinets <iv...@gridgain.com>
Committed: Thu Apr 9 14:27:58 2015 +0300

----------------------------------------------------------------------
 .../datastructures/IgniteQueueExample.java      |  28 +--
 .../datastructures/IgniteSetExample.java        |  30 +--
 .../configuration/CacheConfiguration.java       |  20 +-
 .../configuration/CollectionConfiguration.java  | 114 +++++++++-
 .../processors/cache/GridCacheProcessor.java    |  26 ++-
 .../CacheDataStructuresCacheKey.java            |  62 ++++++
 .../CacheDataStructuresConfigurationKey.java    |   2 +-
 .../datastructures/DataStructuresProcessor.java | 222 +++++++++++++++++--
 ...actQueueFailoverDataConsistencySelfTest.java |   4 +-
 .../GridCacheQueueApiSelfAbstractTest.java      |  80 +++++++
 .../GridCacheQueueCleanupSelfTest.java          |  11 +-
 ...dCacheQueueMultiNodeConsistencySelfTest.java |  11 +-
 .../GridCacheSetAbstractSelfTest.java           |   5 +-
 .../IgniteCollectionAbstractTest.java           | 160 +++----------
 .../IgniteDataStructureUniqueNameTest.java      |  47 +---
 .../GridCacheLocalAtomicOffheapSetSelfTest.java |  32 +++
 .../GridCacheLocalAtomicQueueApiSelfTest.java   |   6 +
 .../local/GridCacheLocalAtomicSetSelfTest.java  |   6 +
 .../GridCacheLocalOffheapQueueApiSelfTest.java  |  31 +++
 .../local/GridCacheLocalQueueApiSelfTest.java   |   6 +
 .../local/GridCacheLocalSetSelfTest.java        |   6 +
 ...artitionedAtomicOffheapQueueApiSelfTest.java |  32 +++
 ...omicOffheapQueueCreateMultiNodeSelfTest.java |  32 +++
 ...onedAtomicOffheapQueueMultiNodeSelfTest.java |  32 +++
 ...dCachePartitionedAtomicQueueApiSelfTest.java |   6 +
 ...ionedAtomicQueueCreateMultiNodeSelfTest.java |   6 +
 ...micQueueFailoverDataConsistencySelfTest.java |   6 +
 ...PartitionedAtomicQueueMultiNodeSelfTest.java |   6 +
 ...itionedAtomicQueueRotativeMultiNodeTest.java |   6 +
 ...chePartitionedAtomicSetFailoverSelfTest.java |   6 +
 ...rtitionedDataStructuresFailoverSelfTest.java |   6 +
 ...artitionedOffHeapValuesQueueApiSelfTest.java |  31 +++
 ...achePartitionedOffHeapValuesSetSelfTest.java |  32 +++
 ...edOffheapDataStructuresFailoverSelfTest.java |  34 +++
 ...hePartitionedOffheapSetFailoverSelfTest.java |  32 +++
 .../GridCachePartitionedQueueApiSelfTest.java   |   6 +
 ...PartitionedQueueCreateMultiNodeSelfTest.java |   6 +
 ...dCachePartitionedQueueEntryMoveSelfTest.java |  10 +-
 ...nedQueueFailoverDataConsistencySelfTest.java |   6 +
 ...CachePartitionedQueueJoinedNodeSelfTest.java |   6 +
 ...dCachePartitionedQueueMultiNodeSelfTest.java |   6 +
 ...hePartitionedQueueRotativeMultiNodeTest.java |   6 +
 ...GridCachePartitionedSetFailoverSelfTest.java |   6 +
 .../GridCachePartitionedSetSelfTest.java        |   6 +
 .../IgnitePartitionedSetNoBackupsSelfTest.java  |   5 +-
 ...eplicatedDataStructuresFailoverSelfTest.java |   6 +
 .../GridCacheReplicatedQueueApiSelfTest.java    |  11 +
 ...idCacheReplicatedQueueMultiNodeSelfTest.java |   6 +
 ...cheReplicatedQueueRotativeMultiNodeTest.java |   6 +
 .../GridCacheReplicatedSetSelfTest.java         |   6 +
 .../IgniteCacheDataStructuresSelfTestSuite.java |  10 +
 51 files changed, 1030 insertions(+), 254 deletions(-)
----------------------------------------------------------------------



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

Posted by ag...@apache.org.
Merge remote-tracking branch 'origin/ignite-sprint-3' into ignite-sprint-3


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

Branch: refs/heads/ignite-674
Commit: a60f47db923d9395e72d710d9aed4af529acdac5
Parents: 8500053 d471a0b
Author: AKuznetsov <ak...@gridgain.com>
Authored: Thu Apr 9 23:18:28 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Thu Apr 9 23:18:28 2015 +0700

----------------------------------------------------------------------
 .../java/org/apache/ignite/IgniteCluster.java   |  2 +-
 .../processors/cache/GridCacheAdapter.java      |  2 +-
 .../cache/GridCacheProjectionImpl.java          |  2 +-
 .../processors/cache/GridCacheProxyImpl.java    |  2 +-
 .../cache/query/GridCacheQueriesImpl.java       |  2 +-
 .../cache/version/GridCacheVersionEx.java       |  2 +-
 .../IgniteCacheObjectProcessorImpl.java         |  2 +-
 .../datastructures/GridCacheQueueAdapter.java   |  2 +-
 .../util/lang/GridMetadataAwareAdapter.java     |  2 +-
 .../communication/tcp/TcpCommunicationSpi.java  |  2 +-
 .../discovery/tcp/TcpDiscoverySpiAdapter.java   |  2 +-
 .../ignite/tools/javadoc/IgniteLinkTaglet.java  | 20 ++++++++++----------
 12 files changed, 21 insertions(+), 21 deletions(-)
----------------------------------------------------------------------



[43/50] [abbrv] incubator-ignite git commit: # Code cleanup: Add missing @Override.

Posted by ag...@apache.org.
# Code cleanup: Add missing @Override.


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

Branch: refs/heads/ignite-674
Commit: d471a0b1cd86e6f7897f211825a970090dd1506c
Parents: 3765f5d
Author: sevdokimov <se...@gridgain.com>
Authored: Thu Apr 9 19:16:33 2015 +0300
Committer: sevdokimov <se...@gridgain.com>
Committed: Thu Apr 9 19:17:05 2015 +0300

----------------------------------------------------------------------
 .../java/org/apache/ignite/IgniteCluster.java   |  2 +-
 .../processors/cache/GridCacheAdapter.java      |  2 +-
 .../cache/GridCacheProjectionImpl.java          |  2 +-
 .../processors/cache/GridCacheProxyImpl.java    |  2 +-
 .../cache/query/GridCacheQueriesImpl.java       |  2 +-
 .../cache/version/GridCacheVersionEx.java       |  2 +-
 .../IgniteCacheObjectProcessorImpl.java         |  2 +-
 .../datastructures/GridCacheQueueAdapter.java   |  2 +-
 .../util/lang/GridMetadataAwareAdapter.java     |  2 +-
 .../communication/tcp/TcpCommunicationSpi.java  |  2 +-
 .../discovery/tcp/TcpDiscoverySpiAdapter.java   |  2 +-
 .../ignite/tools/javadoc/IgniteLinkTaglet.java  | 20 ++++++++++----------
 12 files changed, 21 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d471a0b1/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 02fea14..72be3fb 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteCluster.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteCluster.java
@@ -329,5 +329,5 @@ public interface IgniteCluster extends ClusterGroup, IgniteAsyncSupport {
     public void resetMetrics();
 
     /** {@inheritDoc} */
-    public IgniteCluster withAsync();
+    @Override public IgniteCluster withAsync();
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d471a0b1/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 5ade136..9281976 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
@@ -309,7 +309,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>,
     /**
      * @return Context.
      */
-    public GridCacheContext<K, V> context() {
+    @Override public GridCacheContext<K, V> context() {
         return ctx;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d471a0b1/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 9730c39..77240e4 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
@@ -116,7 +116,7 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
      *
      * @return Cache context.
      */
-    public GridCacheContext<K, V> context() {
+    @Override public GridCacheContext<K, V> context() {
         return cctx;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d471a0b1/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 2e8449e..ee64acf 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
@@ -104,7 +104,7 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali
     /**
      * @return Cache context.
      */
-    public GridCacheContext context() {
+    @Override public GridCacheContext context() {
         return ctx;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d471a0b1/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 40839fb..aca1ff0 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
@@ -148,7 +148,7 @@ public class GridCacheQueriesImpl<K, V> implements GridCacheQueriesEx<K, V> {
      *
      * @return Query.
      */
-    public <R> CacheQuery<R> createSpiQuery() {
+    @Override public <R> CacheQuery<R> createSpiQuery() {
         return new GridCacheQueryAdapter<>(ctx,
             SPI,
             null,

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d471a0b1/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridCacheVersionEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridCacheVersionEx.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridCacheVersionEx.java
index 4bd0c3e..812d656 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridCacheVersionEx.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridCacheVersionEx.java
@@ -76,7 +76,7 @@ public class GridCacheVersionEx extends GridCacheVersion {
     }
 
     /** {@inheritDoc} */
-    public GridCacheVersion conflictVersion() {
+    @Override public GridCacheVersion conflictVersion() {
         return drVer;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d471a0b1/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessorImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessorImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessorImpl.java
index 3e02acd..1f761be 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessorImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessorImpl.java
@@ -90,7 +90,7 @@ public class IgniteCacheObjectProcessorImpl extends GridProcessorAdapter impleme
     }
 
     /** {@inheritDoc} */
-    @Nullable public KeyCacheObject toCacheKeyObject(CacheObjectContext ctx, Object obj, boolean userObj) {
+    @Override @Nullable public KeyCacheObject toCacheKeyObject(CacheObjectContext ctx, Object obj, boolean userObj) {
         if (obj instanceof KeyCacheObject)
             return (KeyCacheObject)obj;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d471a0b1/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheQueueAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheQueueAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheQueueAdapter.java
index 08e3f65..9fd7356 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheQueueAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheQueueAdapter.java
@@ -523,7 +523,7 @@ public abstract class GridCacheQueueAdapter<T> extends AbstractCollection<T> imp
 
     /** {@inheritDoc} */
     @SuppressWarnings("unchecked")
-    public void close() {
+    @Override public void close() {
         if (rmvd)
             return;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d471a0b1/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridMetadataAwareAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridMetadataAwareAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridMetadataAwareAdapter.java
index 6773634..6f5d775 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridMetadataAwareAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridMetadataAwareAdapter.java
@@ -385,7 +385,7 @@ public class GridMetadataAwareAdapter {
 
     /** {@inheritDoc} */
     @SuppressWarnings({"CloneDoesntDeclareCloneNotSupportedException", "OverriddenMethodCallDuringObjectConstruction"})
-    public Object clone() {
+    @Override public Object clone() {
         try {
             GridMetadataAwareAdapter clone = (GridMetadataAwareAdapter)super.clone();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d471a0b1/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
index 6cd439b..ff84e5b 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
@@ -738,7 +738,7 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
      * @param ignite Ignite.
      */
     @IgniteInstanceResource
-    protected void injectResources(Ignite ignite) {
+    @Override protected void injectResources(Ignite ignite) {
         super.injectResources(ignite);
 
         if (ignite != null) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d471a0b1/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiAdapter.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiAdapter.java
index e949846..9cde198 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiAdapter.java
@@ -151,7 +151,7 @@ abstract class TcpDiscoverySpiAdapter extends IgniteSpiAdapter implements Discov
      * @param ignite Ignite.
      */
     @IgniteInstanceResource
-    protected void injectResources(Ignite ignite) {
+    @Override protected void injectResources(Ignite ignite) {
         super.injectResources(ignite);
 
         // Inject resource.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d471a0b1/modules/tools/src/main/java/org/apache/ignite/tools/javadoc/IgniteLinkTaglet.java
----------------------------------------------------------------------
diff --git a/modules/tools/src/main/java/org/apache/ignite/tools/javadoc/IgniteLinkTaglet.java b/modules/tools/src/main/java/org/apache/ignite/tools/javadoc/IgniteLinkTaglet.java
index 96b963e..7667e63 100644
--- a/modules/tools/src/main/java/org/apache/ignite/tools/javadoc/IgniteLinkTaglet.java
+++ b/modules/tools/src/main/java/org/apache/ignite/tools/javadoc/IgniteLinkTaglet.java
@@ -35,49 +35,49 @@ public class IgniteLinkTaglet implements Taglet {
     /**
      * Return the name of this custom tag.
      */
-    public String getName() {
+    @Override public String getName() {
         return NAME;
     }
 
     /**
      * @return true since this tag can be used in a field doc comment.
      */
-    public boolean inField() {
+    @Override public boolean inField() {
         return true;
     }
 
     /**
      * @return true since this tag can be used in a constructor doc comment.
      */
-    public boolean inConstructor() {
+    @Override public boolean inConstructor() {
         return true;
     }
 
     /**
      * @return true since this tag can be used in a method doc comment.
      */
-    public boolean inMethod() {
+    @Override public boolean inMethod() {
         return true;
     }
 
     /**
      * @return true since this tag can be used in an overview doc comment.
      */
-    public boolean inOverview() {
+    @Override public boolean inOverview() {
         return true;
     }
 
     /**
      * @return true since this tag can be used in a package doc comment.
      */
-    public boolean inPackage() {
+    @Override public boolean inPackage() {
         return true;
     }
 
     /**
      * @return true since this.
      */
-    public boolean inType() {
+    @Override public boolean inType() {
         return true;
     }
 
@@ -86,7 +86,7 @@ public class IgniteLinkTaglet implements Taglet {
      *
      * @return true since this is an inline tag.
      */
-    public boolean isInlineTag() {
+    @Override public boolean isInlineTag() {
         return true;
     }
 
@@ -117,7 +117,7 @@ public class IgniteLinkTaglet implements Taglet {
      *
      * @param tag <code>Tag</code> representation of this custom tag.
      */
-    public String toString(Tag tag) {
+    @Override public String toString(Tag tag) {
         if (tag.text() == null || tag.text().isEmpty())
             return "";
 
@@ -159,7 +159,7 @@ public class IgniteLinkTaglet implements Taglet {
      *
      * @param tags the array of <code>Tag</code>s representing of this custom tag.
      */
-    public String toString(Tag[] tags) {
+    @Override public String toString(Tag[] tags) {
         return null;
     }
 }


[25/50] [abbrv] incubator-ignite git commit: [maven-release-plugin] prepare branch 1.0.2QAILS01

Posted by ag...@apache.org.
[maven-release-plugin] prepare branch 1.0.2QAILS01


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

Branch: refs/heads/ignite-674
Commit: de4c61a2b54d7016be13dce06e63cb7e99170053
Parents: 8803e17
Author: Ignite Teamcity <ig...@apache.org>
Authored: Thu Apr 9 12:48:23 2015 +0300
Committer: Ignite Teamcity <ig...@apache.org>
Committed: Thu Apr 9 12:48:23 2015 +0300

----------------------------------------------------------------------
 examples/pom.xml              | 4 ++++
 modules/aop/pom.xml           | 4 ++++
 modules/aws/pom.xml           | 4 ++++
 modules/clients/pom.xml       | 4 ++++
 modules/codegen/pom.xml       | 4 ++++
 modules/core/pom.xml          | 4 ++++
 modules/extdata/p2p/pom.xml   | 4 ++++
 modules/extdata/uri/pom.xml   | 4 ++++
 modules/geospatial/pom.xml    | 4 ++++
 modules/hadoop/pom.xml        | 4 ++++
 modules/hibernate/pom.xml     | 4 ++++
 modules/indexing/pom.xml      | 4 ++++
 modules/jcl/pom.xml           | 4 ++++
 modules/jta/pom.xml           | 4 ++++
 modules/log4j/pom.xml         | 4 ++++
 modules/rest-http/pom.xml     | 4 ++++
 modules/scalar/pom.xml        | 4 ++++
 modules/schedule/pom.xml      | 4 ++++
 modules/schema-import/pom.xml | 4 ++++
 modules/slf4j/pom.xml         | 4 ++++
 modules/spring/pom.xml        | 4 ++++
 modules/ssh/pom.xml           | 4 ++++
 modules/tools/pom.xml         | 4 ++++
 modules/urideploy/pom.xml     | 4 ++++
 modules/visor-console/pom.xml | 4 ++++
 modules/visor-plugins/pom.xml | 4 ++++
 modules/web/pom.xml           | 4 ++++
 modules/yardstick/pom.xml     | 4 ++++
 pom.xml                       | 2 +-
 29 files changed, 113 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de4c61a2/examples/pom.xml
----------------------------------------------------------------------
diff --git a/examples/pom.xml b/examples/pom.xml
index 08f44eb..f3af253 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -225,4 +225,8 @@
             </build>
         </profile>
     </profiles>
+
+  <scm>
+    <tag>1.0.2QAILS01</tag>
+  </scm>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de4c61a2/modules/aop/pom.xml
----------------------------------------------------------------------
diff --git a/modules/aop/pom.xml b/modules/aop/pom.xml
index 917ccc6..d15b41f 100644
--- a/modules/aop/pom.xml
+++ b/modules/aop/pom.xml
@@ -107,4 +107,8 @@
             </testResource>
         </testResources>
     </build>
+
+  <scm>
+    <tag>1.0.2QAILS01</tag>
+  </scm>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de4c61a2/modules/aws/pom.xml
----------------------------------------------------------------------
diff --git a/modules/aws/pom.xml b/modules/aws/pom.xml
index b738450..91e62b0 100644
--- a/modules/aws/pom.xml
+++ b/modules/aws/pom.xml
@@ -99,4 +99,8 @@
             <scope>test</scope>
         </dependency>
     </dependencies>
+
+  <scm>
+    <tag>1.0.2QAILS01</tag>
+  </scm>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de4c61a2/modules/clients/pom.xml
----------------------------------------------------------------------
diff --git a/modules/clients/pom.xml b/modules/clients/pom.xml
index 29250f4..51d0183 100644
--- a/modules/clients/pom.xml
+++ b/modules/clients/pom.xml
@@ -128,4 +128,8 @@
             </plugin>
         </plugins>
     </build>
+
+  <scm>
+    <tag>1.0.2QAILS01</tag>
+  </scm>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de4c61a2/modules/codegen/pom.xml
----------------------------------------------------------------------
diff --git a/modules/codegen/pom.xml b/modules/codegen/pom.xml
index 2990330..ec56e3d 100644
--- a/modules/codegen/pom.xml
+++ b/modules/codegen/pom.xml
@@ -52,4 +52,8 @@
             <version>${project.version}</version>
         </dependency>
     </dependencies>
+
+  <scm>
+    <tag>1.0.2QAILS01</tag>
+  </scm>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de4c61a2/modules/core/pom.xml
----------------------------------------------------------------------
diff --git a/modules/core/pom.xml b/modules/core/pom.xml
index 466ccb9..c2c49df 100644
--- a/modules/core/pom.xml
+++ b/modules/core/pom.xml
@@ -424,4 +424,8 @@
             </build>
         </profile>
     </profiles>
+
+  <scm>
+    <tag>1.0.2QAILS01</tag>
+  </scm>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de4c61a2/modules/extdata/p2p/pom.xml
----------------------------------------------------------------------
diff --git a/modules/extdata/p2p/pom.xml b/modules/extdata/p2p/pom.xml
index c8f0d63..97be6f8 100644
--- a/modules/extdata/p2p/pom.xml
+++ b/modules/extdata/p2p/pom.xml
@@ -93,4 +93,8 @@
             </plugin>
         </plugins>
     </build>
+
+  <scm>
+    <tag>1.0.2QAILS01</tag>
+  </scm>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de4c61a2/modules/extdata/uri/pom.xml
----------------------------------------------------------------------
diff --git a/modules/extdata/uri/pom.xml b/modules/extdata/uri/pom.xml
index ed7bff5..be96f4c 100644
--- a/modules/extdata/uri/pom.xml
+++ b/modules/extdata/uri/pom.xml
@@ -122,4 +122,8 @@
             </plugin>
         </plugins>
     </build>
+
+  <scm>
+    <tag>1.0.2QAILS01</tag>
+  </scm>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de4c61a2/modules/geospatial/pom.xml
----------------------------------------------------------------------
diff --git a/modules/geospatial/pom.xml b/modules/geospatial/pom.xml
index d0ae253..1b1f146 100644
--- a/modules/geospatial/pom.xml
+++ b/modules/geospatial/pom.xml
@@ -81,4 +81,8 @@
             <scope>test</scope>
         </dependency>
     </dependencies>
+
+  <scm>
+    <tag>1.0.2QAILS01</tag>
+  </scm>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de4c61a2/modules/hadoop/pom.xml
----------------------------------------------------------------------
diff --git a/modules/hadoop/pom.xml b/modules/hadoop/pom.xml
index 69d5294..91ac659 100644
--- a/modules/hadoop/pom.xml
+++ b/modules/hadoop/pom.xml
@@ -224,4 +224,8 @@
             </plugin>
         </plugins>
     </build>
+
+  <scm>
+    <tag>1.0.2QAILS01</tag>
+  </scm>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de4c61a2/modules/hibernate/pom.xml
----------------------------------------------------------------------
diff --git a/modules/hibernate/pom.xml b/modules/hibernate/pom.xml
index eba98b5..7435825 100644
--- a/modules/hibernate/pom.xml
+++ b/modules/hibernate/pom.xml
@@ -120,4 +120,8 @@
             </testResource>
         </testResources>
     </build>
+
+  <scm>
+    <tag>1.0.2QAILS01</tag>
+  </scm>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de4c61a2/modules/indexing/pom.xml
----------------------------------------------------------------------
diff --git a/modules/indexing/pom.xml b/modules/indexing/pom.xml
index 5851e66..b453b06 100644
--- a/modules/indexing/pom.xml
+++ b/modules/indexing/pom.xml
@@ -93,4 +93,8 @@
             <scope>test</scope>
         </dependency>
     </dependencies>
+
+  <scm>
+    <tag>1.0.2QAILS01</tag>
+  </scm>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de4c61a2/modules/jcl/pom.xml
----------------------------------------------------------------------
diff --git a/modules/jcl/pom.xml b/modules/jcl/pom.xml
index c2d1851..5c2f288 100644
--- a/modules/jcl/pom.xml
+++ b/modules/jcl/pom.xml
@@ -54,4 +54,8 @@
             <scope>test</scope>
         </dependency>
     </dependencies>
+
+  <scm>
+    <tag>1.0.2QAILS01</tag>
+  </scm>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de4c61a2/modules/jta/pom.xml
----------------------------------------------------------------------
diff --git a/modules/jta/pom.xml b/modules/jta/pom.xml
index dbf4eac..f72a5f1 100644
--- a/modules/jta/pom.xml
+++ b/modules/jta/pom.xml
@@ -82,4 +82,8 @@
             <scope>test</scope>
         </dependency>
     </dependencies>
+
+  <scm>
+    <tag>1.0.2QAILS01</tag>
+  </scm>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de4c61a2/modules/log4j/pom.xml
----------------------------------------------------------------------
diff --git a/modules/log4j/pom.xml b/modules/log4j/pom.xml
index 6f88587..14351c9 100644
--- a/modules/log4j/pom.xml
+++ b/modules/log4j/pom.xml
@@ -53,4 +53,8 @@
             <scope>test</scope>
         </dependency>
     </dependencies>
+
+  <scm>
+    <tag>1.0.2QAILS01</tag>
+  </scm>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de4c61a2/modules/rest-http/pom.xml
----------------------------------------------------------------------
diff --git a/modules/rest-http/pom.xml b/modules/rest-http/pom.xml
index cbade02..e232407 100644
--- a/modules/rest-http/pom.xml
+++ b/modules/rest-http/pom.xml
@@ -113,4 +113,8 @@
             <version>1.8.3</version>
         </dependency>
     </dependencies>
+
+  <scm>
+    <tag>1.0.2QAILS01</tag>
+  </scm>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de4c61a2/modules/scalar/pom.xml
----------------------------------------------------------------------
diff --git a/modules/scalar/pom.xml b/modules/scalar/pom.xml
index 83de256..400c165 100644
--- a/modules/scalar/pom.xml
+++ b/modules/scalar/pom.xml
@@ -185,4 +185,8 @@
             </plugin>
         </plugins>
     </build>
+
+  <scm>
+    <tag>1.0.2QAILS01</tag>
+  </scm>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de4c61a2/modules/schedule/pom.xml
----------------------------------------------------------------------
diff --git a/modules/schedule/pom.xml b/modules/schedule/pom.xml
index fe11f3f..cddb0f2 100644
--- a/modules/schedule/pom.xml
+++ b/modules/schedule/pom.xml
@@ -74,4 +74,8 @@
             <scope>test</scope>
         </dependency>
     </dependencies>
+
+  <scm>
+    <tag>1.0.2QAILS01</tag>
+  </scm>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de4c61a2/modules/schema-import/pom.xml
----------------------------------------------------------------------
diff --git a/modules/schema-import/pom.xml b/modules/schema-import/pom.xml
index 9eb95c1..074abcb 100644
--- a/modules/schema-import/pom.xml
+++ b/modules/schema-import/pom.xml
@@ -99,4 +99,8 @@
             </dependencies>
         </profile>
     </profiles>
+
+  <scm>
+    <tag>1.0.2QAILS01</tag>
+  </scm>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de4c61a2/modules/slf4j/pom.xml
----------------------------------------------------------------------
diff --git a/modules/slf4j/pom.xml b/modules/slf4j/pom.xml
index 9feba39..087f1f5 100644
--- a/modules/slf4j/pom.xml
+++ b/modules/slf4j/pom.xml
@@ -46,4 +46,8 @@
             <version>1.6.4</version>
         </dependency>
     </dependencies>
+
+  <scm>
+    <tag>1.0.2QAILS01</tag>
+  </scm>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de4c61a2/modules/spring/pom.xml
----------------------------------------------------------------------
diff --git a/modules/spring/pom.xml b/modules/spring/pom.xml
index 533c1f2..2038112 100644
--- a/modules/spring/pom.xml
+++ b/modules/spring/pom.xml
@@ -115,4 +115,8 @@
             </testResource>
         </testResources>
     </build>
+
+  <scm>
+    <tag>1.0.2QAILS01</tag>
+  </scm>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de4c61a2/modules/ssh/pom.xml
----------------------------------------------------------------------
diff --git a/modules/ssh/pom.xml b/modules/ssh/pom.xml
index 1f70406..0611271 100644
--- a/modules/ssh/pom.xml
+++ b/modules/ssh/pom.xml
@@ -68,4 +68,8 @@
             <scope>test</scope>
         </dependency>
     </dependencies>
+
+  <scm>
+    <tag>1.0.2QAILS01</tag>
+  </scm>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de4c61a2/modules/tools/pom.xml
----------------------------------------------------------------------
diff --git a/modules/tools/pom.xml b/modules/tools/pom.xml
index 68b1fb9..d17b719 100644
--- a/modules/tools/pom.xml
+++ b/modules/tools/pom.xml
@@ -74,4 +74,8 @@
             </dependencies>
         </profile>
     </profiles>
+
+  <scm>
+    <tag>1.0.2QAILS01</tag>
+  </scm>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de4c61a2/modules/urideploy/pom.xml
----------------------------------------------------------------------
diff --git a/modules/urideploy/pom.xml b/modules/urideploy/pom.xml
index d8a9aa1..616eaad 100644
--- a/modules/urideploy/pom.xml
+++ b/modules/urideploy/pom.xml
@@ -150,4 +150,8 @@
             <scope>test</scope>
         </dependency>
     </dependencies>
+
+  <scm>
+    <tag>1.0.2QAILS01</tag>
+  </scm>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de4c61a2/modules/visor-console/pom.xml
----------------------------------------------------------------------
diff --git a/modules/visor-console/pom.xml b/modules/visor-console/pom.xml
index bd1d20c..761dcc1 100644
--- a/modules/visor-console/pom.xml
+++ b/modules/visor-console/pom.xml
@@ -153,4 +153,8 @@
              </plugin>
         </plugins>
     </build>
+
+  <scm>
+    <tag>1.0.2QAILS01</tag>
+  </scm>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de4c61a2/modules/visor-plugins/pom.xml
----------------------------------------------------------------------
diff --git a/modules/visor-plugins/pom.xml b/modules/visor-plugins/pom.xml
index a63289d..b83856c 100644
--- a/modules/visor-plugins/pom.xml
+++ b/modules/visor-plugins/pom.xml
@@ -73,4 +73,8 @@
             </resource>
         </resources>
     </build>
+
+  <scm>
+    <tag>1.0.2QAILS01</tag>
+  </scm>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de4c61a2/modules/web/pom.xml
----------------------------------------------------------------------
diff --git a/modules/web/pom.xml b/modules/web/pom.xml
index eeeec39..95b9abc 100644
--- a/modules/web/pom.xml
+++ b/modules/web/pom.xml
@@ -88,4 +88,8 @@
             <scope>test</scope>
         </dependency>
     </dependencies>
+
+  <scm>
+    <tag>1.0.2QAILS01</tag>
+  </scm>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de4c61a2/modules/yardstick/pom.xml
----------------------------------------------------------------------
diff --git a/modules/yardstick/pom.xml b/modules/yardstick/pom.xml
index 0d2e81a..8c4904a 100644
--- a/modules/yardstick/pom.xml
+++ b/modules/yardstick/pom.xml
@@ -194,4 +194,8 @@
             </plugin>
         </plugins>
     </build>
+
+  <scm>
+    <tag>1.0.2QAILS01</tag>
+  </scm>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de4c61a2/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index c9dfce4..74fe0ba 100644
--- a/pom.xml
+++ b/pom.xml
@@ -43,7 +43,7 @@
         <url>https://git-wip-us.apache.org/repos/asf/incubator-ignite</url>
         <connection>scm:git:git://git-wip-us.apache.org/repos/asf/incubator-ignite</connection>
         <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/incubator-ignite</developerConnection>
-        <tag>HEAD</tag>
+        <tag>1.0.2QAILS01</tag>
     </scm>
 
     <distributionManagement>


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

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


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

Branch: refs/heads/ignite-674
Commit: 3765f5d3312a13ffe5b28821ad2fadd91b09cee8
Parents: 968a3ad e7fa0a9
Author: S.Vladykin <sv...@gridgain.com>
Authored: Thu Apr 9 18:06:11 2015 +0300
Committer: S.Vladykin <sv...@gridgain.com>
Committed: Thu Apr 9 18:06:11 2015 +0300

----------------------------------------------------------------------
 .../datastructures/IgniteQueueExample.java      |  28 +-
 .../datastructures/IgniteSetExample.java        |  30 +-
 .../configuration/CacheConfiguration.java       |  20 +-
 .../configuration/CollectionConfiguration.java  | 114 ++++-
 .../ignite/internal/GridPluginContext.java      |  15 +-
 .../apache/ignite/internal/IgniteKernal.java    |  16 +-
 .../ignite/internal/MarshallerContextImpl.java  |   3 +
 .../affinity/GridAffinityProcessor.java         |   5 +-
 .../processors/cache/GridCacheProcessor.java    |  63 ++-
 .../continuous/CacheContinuousQueryManager.java |  28 --
 .../cacheobject/IgniteCacheObjectProcessor.java |   5 +-
 .../IgniteCacheObjectProcessorImpl.java         |  34 +-
 .../datastreamer/DataStreamerImpl.java          |   8 +-
 .../CacheDataStructuresCacheKey.java            |  62 +++
 .../CacheDataStructuresConfigurationKey.java    |   2 +-
 .../datastructures/DataStructuresProcessor.java | 222 ++++++++-
 .../plugin/IgnitePluginProcessor.java           |  58 +--
 .../ignite/plugin/CachePluginConfiguration.java |   2 +-
 .../org/apache/ignite/plugin/IgnitePlugin.java  |   3 -
 .../ignite/plugin/PluginConfiguration.java      |  10 +-
 .../org/apache/ignite/plugin/PluginContext.java |   7 +-
 .../apache/ignite/plugin/PluginProvider.java    |   4 +-
 ...actQueueFailoverDataConsistencySelfTest.java |   4 +-
 .../GridCacheQueueApiSelfAbstractTest.java      |  80 ++++
 .../GridCacheQueueCleanupSelfTest.java          |  11 +-
 ...dCacheQueueMultiNodeConsistencySelfTest.java |  11 +-
 .../GridCacheSetAbstractSelfTest.java           |   5 +-
 .../IgniteCollectionAbstractTest.java           | 160 ++-----
 .../IgniteDataStructureUniqueNameTest.java      |  47 +-
 .../GridCacheLocalAtomicOffheapSetSelfTest.java |  32 ++
 .../GridCacheLocalAtomicQueueApiSelfTest.java   |   6 +
 .../local/GridCacheLocalAtomicSetSelfTest.java  |   6 +
 .../GridCacheLocalOffheapQueueApiSelfTest.java  |  31 ++
 .../local/GridCacheLocalQueueApiSelfTest.java   |   6 +
 .../local/GridCacheLocalSetSelfTest.java        |   6 +
 ...artitionedAtomicOffheapQueueApiSelfTest.java |  32 ++
 ...omicOffheapQueueCreateMultiNodeSelfTest.java |  32 ++
 ...onedAtomicOffheapQueueMultiNodeSelfTest.java |  32 ++
 ...dCachePartitionedAtomicQueueApiSelfTest.java |   6 +
 ...ionedAtomicQueueCreateMultiNodeSelfTest.java |   6 +
 ...micQueueFailoverDataConsistencySelfTest.java |   6 +
 ...PartitionedAtomicQueueMultiNodeSelfTest.java |   6 +
 ...itionedAtomicQueueRotativeMultiNodeTest.java |   6 +
 ...chePartitionedAtomicSetFailoverSelfTest.java |   6 +
 ...rtitionedDataStructuresFailoverSelfTest.java |   6 +
 ...artitionedOffHeapValuesQueueApiSelfTest.java |  31 ++
 ...achePartitionedOffHeapValuesSetSelfTest.java |  32 ++
 ...edOffheapDataStructuresFailoverSelfTest.java |  34 ++
 ...hePartitionedOffheapSetFailoverSelfTest.java |  32 ++
 .../GridCachePartitionedQueueApiSelfTest.java   |   6 +
 ...PartitionedQueueCreateMultiNodeSelfTest.java |   6 +
 ...dCachePartitionedQueueEntryMoveSelfTest.java |  10 +-
 ...nedQueueFailoverDataConsistencySelfTest.java |   6 +
 ...CachePartitionedQueueJoinedNodeSelfTest.java |   6 +
 ...dCachePartitionedQueueMultiNodeSelfTest.java |   6 +
 ...hePartitionedQueueRotativeMultiNodeTest.java |   6 +
 ...GridCachePartitionedSetFailoverSelfTest.java |   6 +
 .../GridCachePartitionedSetSelfTest.java        |   6 +
 .../IgnitePartitionedSetNoBackupsSelfTest.java  |   5 +-
 ...eplicatedDataStructuresFailoverSelfTest.java |   6 +
 .../GridCacheReplicatedQueueApiSelfTest.java    |  11 +
 ...idCacheReplicatedQueueMultiNodeSelfTest.java |   6 +
 ...cheReplicatedQueueRotativeMultiNodeTest.java |   6 +
 .../GridCacheReplicatedSetSelfTest.java         |   6 +
 .../IgniteCacheDataStructuresSelfTestSuite.java |  10 +
 modules/urideploy/README.txt                    |   2 +-
 modules/urideploy/licenses/edtftp-license.pdf   | Bin 58355 -> 0 bytes
 modules/urideploy/licenses/jtidy-license.txt    |  50 --
 .../urideploy/licenses/jtidy-mit-license.txt    |  50 ++
 modules/urideploy/pom.xml                       |   6 -
 .../spi/deployment/uri/UriDeploymentSpi.java    | 182 +++----
 .../uri/scanners/GridUriDeploymentScanner.java  | 286 -----------
 .../GridUriDeploymentScannerListener.java       |   2 +-
 .../uri/scanners/UriDeploymentScanner.java      |  47 ++
 .../scanners/UriDeploymentScannerContext.java   |  92 ++++
 .../scanners/UriDeploymentScannerManager.java   | 221 +++++++++
 .../file/GridUriDeploymentFileScanner.java      | 311 ------------
 .../scanners/file/UriDeploymentFileScanner.java | 327 +++++++++++++
 .../ftp/GridUriDeploymentFtpClient.java         | 199 --------
 .../ftp/GridUriDeploymentFtpConfiguration.java  | 115 -----
 .../ftp/GridUriDeploymentFtpException.java      |  43 --
 .../scanners/ftp/GridUriDeploymentFtpFile.java  | 119 -----
 .../ftp/GridUriDeploymentFtpScanner.java        | 234 ---------
 .../uri/scanners/ftp/package-info.java          |  22 -
 .../http/GridUriDeploymentHttpScanner.java      | 423 ----------------
 .../scanners/http/UriDeploymentHttpScanner.java | 478 +++++++++++++++++++
 ...loymentMultiScannersErrorThrottlingTest.java |   3 -
 .../GridUriDeploymentMultiScannersSelfTest.java |   3 +-
 .../GridFileDeploymentUndeploySelfTest.java     |   4 +-
 .../uri/scanners/ftp/GridFtpDeploymentTest.java |  46 --
 .../uri/scanners/ftp/package-info.java          |  22 -
 91 files changed, 2386 insertions(+), 2420 deletions(-)
----------------------------------------------------------------------



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

Posted by ag...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-sprint-3' into ignite-180


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

Branch: refs/heads/ignite-674
Commit: 963af2967f48e1914b790d46bbe0c4ae4771e31b
Parents: c8444ec 5fcb072
Author: ivasilinets <iv...@gridgain.com>
Authored: Thu Apr 9 11:56:20 2015 +0300
Committer: ivasilinets <iv...@gridgain.com>
Committed: Thu Apr 9 11:56:20 2015 +0300

----------------------------------------------------------------------
 .../examples/datagrid/CacheAffinityExample.java |   9 +-
 .../examples/datagrid/CacheApiExample.java      |   9 +-
 .../examples/datagrid/CacheAsyncApiExample.java |   9 +-
 .../datagrid/CacheContinuousQueryExample.java   |   8 +-
 .../datagrid/CacheDataStreamerExample.java      |   9 +-
 .../examples/datagrid/CacheEventsExample.java   |   9 +-
 .../examples/datagrid/CachePutGetExample.java   |  10 +-
 .../datagrid/CacheTransactionExample.java       |   8 +-
 .../hibernate/HibernateL2CacheExample.java      |   5 +-
 .../starschema/CacheStarSchemaExample.java      |  10 +-
 .../store/auto/CacheAutoStoreExample.java       |   8 +-
 .../auto/CacheAutoStoreLoadDataExample.java     |   5 +-
 .../datagrid/store/auto/CacheConfig.java        |   4 +-
 .../store/dummy/CacheDummyStoreExample.java     |   5 +-
 .../hibernate/CacheHibernateStoreExample.java   |   5 +-
 .../store/jdbc/CacheJdbcStoreExample.java       |   5 +-
 .../streaming/StreamVisitorExample.java         |   5 +-
 .../src/main/java/org/apache/ignite/Ignite.java |  11 +
 .../java/org/apache/ignite/IgniteCluster.java   |   9 +-
 .../ignite/cluster/ClusterStartNodeResult.java  |  46 +
 .../ignite/internal/ClusterMetricsSnapshot.java | 384 +++-----
 .../apache/ignite/internal/IgniteKernal.java    |  30 +-
 .../cluster/ClusterStartNodeResultImpl.java     |  87 ++
 .../cluster/IgniteClusterAsyncImpl.java         |   5 +-
 .../internal/cluster/IgniteClusterImpl.java     |  37 +-
 .../cache/DynamicCacheChangeRequest.java        |   2 +-
 .../processors/cache/GridCacheAdapter.java      |  57 +-
 .../processors/cache/GridCacheProcessor.java    | 130 +--
 .../cache/GridLoadCacheCloseablePredicate.java  |  30 +
 .../distributed/dht/GridDhtCacheAdapter.java    |  22 +-
 .../util/nodestart/IgniteNodeCallable.java      |  30 -
 .../util/nodestart/IgniteSshHelper.java         |   2 +-
 .../util/nodestart/StartNodeCallable.java       |  30 +
 .../messages/TcpDiscoveryAbstractMessage.java   |  24 +-
 .../messages/TcpDiscoveryAuthFailedMessage.java |  25 +-
 .../TcpDiscoveryCheckFailedMessage.java         |  24 +-
 .../TcpDiscoveryClientReconnectMessage.java     |  30 +-
 .../TcpDiscoveryCustomEventMessage.java         |  23 +-
 .../messages/TcpDiscoveryDiscardMessage.java    |  24 +-
 .../TcpDiscoveryDuplicateIdMessage.java         |  24 +-
 .../messages/TcpDiscoveryHandshakeRequest.java  |   8 -
 .../messages/TcpDiscoveryHandshakeResponse.java |  22 -
 .../messages/TcpDiscoveryHeartbeatMessage.java  |  44 +-
 .../TcpDiscoveryJoinRequestMessage.java         |  28 +-
 .../TcpDiscoveryLoopbackProblemMessage.java     |  28 +-
 .../TcpDiscoveryNodeAddFinishedMessage.java     |  24 +-
 .../messages/TcpDiscoveryNodeAddedMessage.java  |  60 +-
 .../messages/TcpDiscoveryNodeFailedMessage.java |  28 +-
 .../messages/TcpDiscoveryNodeLeftMessage.java   |   8 -
 .../tcp/messages/TcpDiscoveryPingRequest.java   |  25 +-
 .../tcp/messages/TcpDiscoveryPingResponse.java  |  14 -
 .../TcpDiscoveryStatusCheckMessage.java         |  30 +-
 ...teCacheConfigurationDefaultTemplateTest.java | 111 +++
 ...eCacheConfigurationTemplateNotFoundTest.java | 114 ---
 .../IgniteCacheConfigurationTemplateTest.java   |  86 +-
 .../ignite/testframework/junits/IgniteMock.java |   5 +
 .../ignite/testsuites/IgniteCacheTestSuite.java |   2 +-
 .../h2/sql/AbstractH2CompareQueryTest.java      | 341 ++++++++
 .../query/h2/sql/BaseH2CompareQueryTest.java    | 823 +++++++++++++++++
 .../query/h2/sql/H2CompareBigQueryTest.java     | 707 +++++++++++++++
 .../query/h2/sql/IgniteVsH2QueryTest.java       | 875 -------------------
 .../IgniteCacheQuerySelfTestSuite.java          |   5 +-
 .../processors/query/h2/sql/bigQuery.sql        |  55 ++
 .../org/apache/ignite/IgniteSpringBean.java     |   7 +
 .../util/nodestart/IgniteNodeCallableImpl.java  | 308 -------
 .../util/nodestart/IgniteSshHelperImpl.java     |   4 +-
 .../util/nodestart/StartNodeCallableImpl.java   | 309 +++++++
 ...gniteProjectionStartStopRestartSelfTest.java | 261 +++---
 .../IgniteStartStopRestartTestSuite.java        |   1 +
 .../commands/start/VisorStartCommand.scala      |   4 +-
 70 files changed, 3149 insertions(+), 2397 deletions(-)
----------------------------------------------------------------------


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


[04/50] [abbrv] incubator-ignite git commit: Merge remote-tracking branch 'remotes/origin/ignite-30' into ignite-sprint-3

Posted by ag...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-30' into ignite-sprint-3


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

Branch: refs/heads/ignite-674
Commit: 382229c51c7b869778e8dce846c111f51f70c699
Parents: 2f458d2 c31dbd2
Author: sevdokimov <se...@gridgain.com>
Authored: Wed Apr 8 19:48:05 2015 +0300
Committer: sevdokimov <se...@gridgain.com>
Committed: Wed Apr 8 19:48:05 2015 +0300

----------------------------------------------------------------------
 .../ignite/internal/ClusterMetricsSnapshot.java | 384 ++++++-------------
 .../messages/TcpDiscoveryAbstractMessage.java   |  24 +-
 .../messages/TcpDiscoveryAuthFailedMessage.java |  25 +-
 .../TcpDiscoveryCheckFailedMessage.java         |  24 +-
 .../TcpDiscoveryClientReconnectMessage.java     |  30 +-
 .../TcpDiscoveryCustomEventMessage.java         |  23 +-
 .../messages/TcpDiscoveryDiscardMessage.java    |  24 +-
 .../TcpDiscoveryDuplicateIdMessage.java         |  24 +-
 .../messages/TcpDiscoveryHandshakeRequest.java  |   8 -
 .../messages/TcpDiscoveryHandshakeResponse.java |  22 --
 .../messages/TcpDiscoveryHeartbeatMessage.java  |  44 +--
 .../TcpDiscoveryJoinRequestMessage.java         |  28 +-
 .../TcpDiscoveryLoopbackProblemMessage.java     |  28 +-
 .../TcpDiscoveryNodeAddFinishedMessage.java     |  24 +-
 .../messages/TcpDiscoveryNodeAddedMessage.java  |  60 +--
 .../messages/TcpDiscoveryNodeFailedMessage.java |  28 +-
 .../messages/TcpDiscoveryNodeLeftMessage.java   |   8 -
 .../tcp/messages/TcpDiscoveryPingRequest.java   |  25 +-
 .../tcp/messages/TcpDiscoveryPingResponse.java  |  14 -
 .../TcpDiscoveryStatusCheckMessage.java         |  30 +-
 20 files changed, 148 insertions(+), 729 deletions(-)
----------------------------------------------------------------------



[49/50] [abbrv] incubator-ignite git commit: Merge branch ignite-701 into ignite-sprint-3

Posted by ag...@apache.org.
Merge branch ignite-701 into ignite-sprint-3


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

Branch: refs/heads/ignite-674
Commit: 845787cdc266ba1db1aaf3f61f4ee9acd97168ee
Parents: bad0161 a3fe2e4
Author: Alexey Goncharuk <ag...@gridgain.com>
Authored: Thu Apr 9 18:07:17 2015 -0700
Committer: Alexey Goncharuk <ag...@gridgain.com>
Committed: Thu Apr 9 18:07:17 2015 -0700

----------------------------------------------------------------------
 .../cache/distributed/dht/GridDhtLockFuture.java     |  3 ++-
 .../ignite/GridCacheAffinityBackupsSelfTest.java     | 15 +++++++--------
 2 files changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------



[23/50] [abbrv] incubator-ignite git commit: Merge remote-tracking branch 'remotes/origin/ignite-694' into ignite-sprint-3

Posted by ag...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-694' into ignite-sprint-3


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

Branch: refs/heads/ignite-674
Commit: 8803e17981fac145c94780220eff18093376df9f
Parents: 5fcb072 998d1fa
Author: sboikov <sb...@gridgain.com>
Authored: Thu Apr 9 12:19:25 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Thu Apr 9 12:19:25 2015 +0300

----------------------------------------------------------------------
 .../processors/cache/GridCacheIoManager.java    |  87 +++++++-----
 .../processors/cache/GridCacheMessage.java      |   7 +
 .../GridCachePartitionExchangeManager.java      | 136 ++++++++++++++++++-
 .../dht/GridDhtAffinityAssignmentRequest.java   |   5 +
 .../dht/GridDhtAffinityAssignmentResponse.java  |   5 +
 .../GridDhtPartitionsAbstractMessage.java       |  15 +-
 .../IgniteCacheAtomicNodeJoinTest.java          |  44 ++++++
 .../IgniteCacheNodeJoinAbstractTest.java        | 109 +++++++++++++++
 .../distributed/IgniteCacheTxNodeJoinTest.java  |  38 ++++++
 .../IgniteCacheFailoverTestSuite.java           |   4 +
 10 files changed, 409 insertions(+), 41 deletions(-)
----------------------------------------------------------------------



[44/50] [abbrv] incubator-ignite git commit: Merge branches 'ignite-703' and 'ignite-sprint-3' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-sprint-3

Posted by ag...@apache.org.
Merge branches 'ignite-703' and 'ignite-sprint-3' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-sprint-3


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

Branch: refs/heads/ignite-674
Commit: 8500053b7e0e7eb63c07cbbe0dbed45ea9376910
Parents: 3765f5d 7466be2
Author: AKuznetsov <ak...@gridgain.com>
Authored: Thu Apr 9 23:17:31 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Thu Apr 9 23:17:31 2015 +0700

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



[10/50] [abbrv] incubator-ignite git commit: Merge remote-tracking branch 'remotes/origin/ignite-sprint-3' into ignite-694

Posted by ag...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-sprint-3' into ignite-694


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

Branch: refs/heads/ignite-674
Commit: 7908aea91ad23d04efd1e6bbbc0ae796e72c0880
Parents: 8474a0a 5e9addb
Author: sboikov <sb...@gridgain.com>
Authored: Thu Apr 9 09:02:56 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Thu Apr 9 09:02:56 2015 +0300

----------------------------------------------------------------------
 .../apache/ignite/internal/IgniteKernal.java    |   7 +-
 .../org/apache/ignite/internal/IgnitionEx.java  | 171 +++-----
 .../cache/transactions/IgniteTxManager.java     |   6 +-
 .../ignite/internal/visor/cache/VisorCache.java |   2 +-
 .../cache/VisorCacheAggregatedMetrics.java      |  38 +-
 .../visor/cache/VisorCacheConfiguration.java    |  17 +-
 .../internal/visor/cache/VisorCacheMetrics.java |  53 ++-
 .../cache/VisorCacheMetricsCollectorTask.java   |  59 ++-
 .../visor/cache/VisorCacheStopTask.java         |  69 +++
 .../h2/twostep/GridReduceQueryExecutor.java     |   2 +-
 .../commands/cache/VisorCacheCommand.scala      | 423 +++++++++++--------
 .../commands/cache/VisorCacheStopCommand.scala  | 145 +++++++
 12 files changed, 657 insertions(+), 335 deletions(-)
----------------------------------------------------------------------



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

Posted by ag...@apache.org.
Merge remote-tracking branch 'origin/ignite-sprint-3' into ignite-sprint-3


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

Branch: refs/heads/ignite-674
Commit: 9d183c50c1bab91f0fd03a10a588e7c7a63731a7
Parents: fe74390 382229c
Author: Artem Shutak <as...@gridgain.com>
Authored: Wed Apr 8 19:55:42 2015 +0300
Committer: Artem Shutak <as...@gridgain.com>
Committed: Wed Apr 8 19:55:42 2015 +0300

----------------------------------------------------------------------
 .../ignite/internal/ClusterMetricsSnapshot.java | 384 ++++++-------------
 .../messages/TcpDiscoveryAbstractMessage.java   |  24 +-
 .../messages/TcpDiscoveryAuthFailedMessage.java |  25 +-
 .../TcpDiscoveryCheckFailedMessage.java         |  24 +-
 .../TcpDiscoveryClientReconnectMessage.java     |  30 +-
 .../TcpDiscoveryCustomEventMessage.java         |  23 +-
 .../messages/TcpDiscoveryDiscardMessage.java    |  24 +-
 .../TcpDiscoveryDuplicateIdMessage.java         |  24 +-
 .../messages/TcpDiscoveryHandshakeRequest.java  |   8 -
 .../messages/TcpDiscoveryHandshakeResponse.java |  22 --
 .../messages/TcpDiscoveryHeartbeatMessage.java  |  44 +--
 .../TcpDiscoveryJoinRequestMessage.java         |  28 +-
 .../TcpDiscoveryLoopbackProblemMessage.java     |  28 +-
 .../TcpDiscoveryNodeAddFinishedMessage.java     |  24 +-
 .../messages/TcpDiscoveryNodeAddedMessage.java  |  60 +--
 .../messages/TcpDiscoveryNodeFailedMessage.java |  28 +-
 .../messages/TcpDiscoveryNodeLeftMessage.java   |   8 -
 .../tcp/messages/TcpDiscoveryPingRequest.java   |  25 +-
 .../tcp/messages/TcpDiscoveryPingResponse.java  |  14 -
 .../TcpDiscoveryStatusCheckMessage.java         |  30 +-
 20 files changed, 148 insertions(+), 729 deletions(-)
----------------------------------------------------------------------



[40/50] [abbrv] incubator-ignite git commit: ignite-sprint-3 - sql tests

Posted by ag...@apache.org.
ignite-sprint-3 - sql tests


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

Branch: refs/heads/ignite-674
Commit: 27b6b78875ad803c3c8b19fb4410e00f48791e92
Parents: 245f467
Author: S.Vladykin <sv...@gridgain.com>
Authored: Thu Apr 9 18:02:15 2015 +0300
Committer: S.Vladykin <sv...@gridgain.com>
Committed: Thu Apr 9 18:02:15 2015 +0300

----------------------------------------------------------------------
 .../processors/query/h2/sql/BaseH2CompareQueryTest.java | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/27b6b788/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/BaseH2CompareQueryTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/BaseH2CompareQueryTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/BaseH2CompareQueryTest.java
index 3cafab2..7f07069 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/BaseH2CompareQueryTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/BaseH2CompareQueryTest.java
@@ -305,17 +305,19 @@ public class BaseH2CompareQueryTest extends AbstractH2CompareQueryTest {
      * @throws SQLException If failed.
      */
     public void testAggregateOrderBy() throws SQLException {
-        compareOrderedQueryRes0("select firstName name, count(*) cnt from \"part\".Person group by name order by cnt desc");
+        compareOrderedQueryRes0(
+            "select firstName name, count(*) cnt from \"part\".Person " +
+            "group by name order by cnt, name desc");
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testNullParamSubstitution() throws Exception {
-        List<List<?>> rs1 = compareQueryRes0("select id from \"part\".Person where lastname is ?", null);
+        List<List<?>> rs1 = compareQueryRes0("select ? from \"part\".Person", null);
 
         // Ensure we find something.
-        assertNotSame(0, rs1.size());
+        assertFalse(rs1.isEmpty());
     }
 
     /**
@@ -329,8 +331,8 @@ public class BaseH2CompareQueryTest extends AbstractH2CompareQueryTest {
 
         base = "select firstName||lastName name, salary from \"part\".Person";
 
-        assertEquals(10, compareOrderedQueryRes0(base + " union all " + base + " order by salary desc").size());
-        assertEquals(5, compareOrderedQueryRes0(base + " union " + base + " order by salary desc").size());
+        assertEquals(PERS_CNT * 2, compareOrderedQueryRes0(base + " union all " + base + " order by salary desc").size());
+        assertEquals(PERS_CNT, compareOrderedQueryRes0(base + " union " + base + " order by salary desc").size());
     }
 
     /**


[34/50] [abbrv] incubator-ignite git commit: Merge remote-tracking branch 'remotes/origin/ignite-707' into ignite-sprint-3

Posted by ag...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-707' into ignite-sprint-3


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

Branch: refs/heads/ignite-674
Commit: 86c3bc551dff7417c24019339e567c2cfa75f726
Parents: 887c1a8 2793bd9
Author: sboikov <sb...@gridgain.com>
Authored: Thu Apr 9 15:57:02 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Thu Apr 9 15:57:02 2015 +0300

----------------------------------------------------------------------
 .../ignite/internal/GridPluginContext.java      | 15 +----
 .../apache/ignite/internal/IgniteKernal.java    |  5 --
 .../plugin/IgnitePluginProcessor.java           | 58 +++++++-------------
 .../ignite/plugin/CachePluginConfiguration.java |  2 +-
 .../org/apache/ignite/plugin/IgnitePlugin.java  |  3 -
 .../ignite/plugin/PluginConfiguration.java      | 10 +---
 .../org/apache/ignite/plugin/PluginContext.java |  7 +--
 .../apache/ignite/plugin/PluginProvider.java    |  4 +-
 8 files changed, 29 insertions(+), 75 deletions(-)
----------------------------------------------------------------------



[37/50] [abbrv] incubator-ignite git commit: # IGNITE-661: Removed FTP scanner and abstracted scanners into separate configurable entity.

Posted by ag...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0391d27c/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/ftp/GridUriDeploymentFtpScanner.java
----------------------------------------------------------------------
diff --git a/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/ftp/GridUriDeploymentFtpScanner.java b/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/ftp/GridUriDeploymentFtpScanner.java
deleted file mode 100644
index dc9044e..0000000
--- a/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/ftp/GridUriDeploymentFtpScanner.java
+++ /dev/null
@@ -1,234 +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.spi.deployment.uri.scanners.ftp;
-
-import org.apache.ignite.*;
-import org.apache.ignite.internal.util.typedef.internal.*;
-import org.apache.ignite.spi.deployment.uri.scanners.*;
-
-import java.io.*;
-import java.net.*;
-import java.util.*;
-
-/**
- * FTP scanner scans directory for new files. Scanned directory defined in URI.
- * Scanner doesn't search files in subfolders.
- */
-public class GridUriDeploymentFtpScanner extends GridUriDeploymentScanner {
-    /** */
-    private static final long UNKNOWN_FILE_TSTAMP = -1;
-
-    /** */
-    private final GridUriDeploymentFtpConfiguration cfg;
-
-    /** Cache of found files to check if any of it has been updated. */
-    private Map<GridUriDeploymentFtpFile, Long> cache = new HashMap<>();
-
-    /**
-     * @param gridName Grid instance name.
-     * @param uri FTP URI.
-     * @param deployDir FTP directory.
-     * @param freq Scanner frequency.
-     * @param filter Scanner filter.
-     * @param lsnr Deployment listener.
-     * @param log Logger to use.
-     */
-    public GridUriDeploymentFtpScanner(
-        String gridName,
-        URI uri,
-        File deployDir,
-        long freq,
-        FilenameFilter filter,
-        GridUriDeploymentScannerListener lsnr,
-        IgniteLogger log) {
-        super(gridName, uri, deployDir, freq, filter, lsnr, log);
-
-        cfg = initializeFtpConfiguration(uri);
-   }
-
-    /**
-     * @param uri FTP URI.
-     * @return FTP configuration.
-     */
-    private GridUriDeploymentFtpConfiguration initializeFtpConfiguration(URI uri) {
-        assert "ftp".equals(uri.getScheme());
-
-        GridUriDeploymentFtpConfiguration cfg = new GridUriDeploymentFtpConfiguration();
-
-        String userInfo = uri.getUserInfo();
-        String username = null;
-        String pswd = null;
-
-        if (userInfo != null) {
-            String[] arr = userInfo.split(";");
-
-            if (arr != null && arr.length > 0)
-                for (String el : arr)
-                    if (el.startsWith("freq=")) {
-                        // No-op.
-                    }
-                    else if (el.indexOf(':') != -1) {
-                        int idx = el.indexOf(':');
-
-                        username = el.substring(0, idx);
-                        pswd = el.substring(idx + 1);
-                    }
-                    else
-                        username = el;
-        }
-
-        // Username and password must be defined in URI.
-        if (username == null)
-            throw new IgniteException("Username has not been provided.");
-
-        if (pswd == null)
-            throw new IgniteException("Password has not been provided.");
-
-        cfg.setHost(uri.getHost());
-        cfg.setPort(uri.getPort());
-        cfg.setUsername(username);
-        cfg.setPassword(pswd);
-        cfg.setDirectory(uri.getPath());
-
-        return cfg;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected void process() {
-        Collection<GridUriDeploymentFtpFile> foundFiles = U.newHashSet(cache.size());
-
-        long start = U.currentTimeMillis();
-
-        processFtp(foundFiles);
-
-        if (getLogger().isDebugEnabled())
-            getLogger().debug("FTP scanner time in milliseconds: " + (U.currentTimeMillis() - start));
-
-        if (!isFirstScan()) {
-            Collection<GridUriDeploymentFtpFile> delFiles = new HashSet<>(cache.keySet());
-
-            delFiles.removeAll(foundFiles);
-
-            if (!delFiles.isEmpty()) {
-                List<String> uris = new ArrayList<>();
-
-                for (GridUriDeploymentFtpFile file : delFiles) {
-                    Long tstamp = cache.get(file);
-
-                    // Ignore files in cache w/o timestamp.
-                    if (tstamp != null && tstamp != UNKNOWN_FILE_TSTAMP)
-                        uris.add(getFileUri(file.getName()));
-                }
-
-                cache.keySet().removeAll(delFiles);
-
-                getListener().onDeletedFiles(uris);
-            }
-        }
-    }
-
-    /**
-     * @param files File to process.
-     */
-    @SuppressWarnings({"UnusedCatchParameter"})
-    private void processFtp(Collection<GridUriDeploymentFtpFile> files) {
-        GridUriDeploymentFtpClient ftp = new GridUriDeploymentFtpClient(cfg, getLogger());
-
-        try {
-            ftp.connect();
-
-            for (GridUriDeploymentFtpFile file : ftp.getFiles()) {
-                String fileName = file.getName();
-
-                if (getFilter().accept(null, fileName.toLowerCase()) && file.isFile()) {
-                    files.add(file);
-
-                    Long lastModified = cache.get(file);
-
-                    Calendar fileTstamp = file.getTimestamp();
-
-                    if (fileTstamp == null) {
-                        if (lastModified == null) {
-                            // Add new file in cache to avoid print warning every time.
-                            cache.put(file, UNKNOWN_FILE_TSTAMP);
-
-                            U.warn(getLogger(), "File with unknown timestamp will be ignored " +
-                                "(check FTP server configuration): " + file);
-                        }
-                    }
-                    // If file is new or has been modified.
-                    else if (lastModified == null || lastModified != fileTstamp.getTimeInMillis()) {
-                        cache.put(file, fileTstamp.getTimeInMillis());
-
-                        if (getLogger().isDebugEnabled())
-                            getLogger().debug("Discovered deployment file or directory: " + file);
-
-                        try {
-                            File diskFile = createTempFile(fileName, getDeployDirectory());
-
-                            ftp.downloadToFile(file, diskFile);
-
-                            String fileUri = getFileUri(fileName);
-
-                            // Delete file when JVM stopped.
-                            diskFile.deleteOnExit();
-
-                            // Deployment SPI apply.
-                            // NOTE: If SPI listener blocks then FTP connection may be closed by timeout.
-                            getListener().onNewOrUpdatedFile(diskFile, fileUri, fileTstamp.getTimeInMillis());
-                        }
-                        catch (IOException e) {
-                            U.error(getLogger(), "Failed to download file from FTP server: " + fileName, e);
-                        }
-                    }
-                }
-            }
-        }
-        catch (GridUriDeploymentFtpException e) {
-            if (!isCancelled()) {
-                String maskedUri = getUri() != null ? U.hidePassword(getUri().toString()) : null;
-
-                if (e.hasCause(ConnectException.class))
-                    LT.warn(getLogger(), e, "Failed to connect to FTP server (connection refused): " + maskedUri);
-
-                else if (e.hasCause(UnknownHostException.class))
-                    LT.warn(getLogger(), e, "Failed to connect to FTP server (host is unknown): " + maskedUri);
-
-                else
-                    U.error(getLogger(), "Failed to get files from FTP server: " + maskedUri, e);
-            }
-        }
-        finally {
-            try {
-                ftp.close();
-            }
-            catch (GridUriDeploymentFtpException e) {
-                if (!isCancelled())
-                    U.error(getLogger(), "Failed to close FTP client.", e);
-            }
-        }
-    }
-
-    /** {@inheritDoc} */
-    @Override public String toString() {
-        return S.toString(GridUriDeploymentFtpScanner.class, this,
-            "uri", getUri() != null ? U.hidePassword(getUri().toString()) : null,
-            "freq", getFrequency(),
-            "deployDir", getDeployDirectory());
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0391d27c/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/ftp/package-info.java
----------------------------------------------------------------------
diff --git a/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/ftp/package-info.java b/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/ftp/package-info.java
deleted file mode 100644
index ca29005..0000000
--- a/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/ftp/package-info.java
+++ /dev/null
@@ -1,22 +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 description. -->
- * Contains FTP scanner for URI deployer SPI.
- */
-package org.apache.ignite.spi.deployment.uri.scanners.ftp;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0391d27c/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/http/GridUriDeploymentHttpScanner.java
----------------------------------------------------------------------
diff --git a/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/http/GridUriDeploymentHttpScanner.java b/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/http/GridUriDeploymentHttpScanner.java
deleted file mode 100644
index 49ac343..0000000
--- a/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/http/GridUriDeploymentHttpScanner.java
+++ /dev/null
@@ -1,423 +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.spi.deployment.uri.scanners.http;
-
-import org.apache.ignite.*;
-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.spi.*;
-import org.apache.ignite.spi.deployment.uri.scanners.*;
-import org.jetbrains.annotations.*;
-import org.w3c.dom.*;
-import org.w3c.tidy.*;
-
-import javax.net.ssl.*;
-import java.io.*;
-import java.net.*;
-import java.security.*;
-import java.security.cert.*;
-import java.util.*;
-
-/**
- * URI deployment HTTP scanner.
- */
-public class GridUriDeploymentHttpScanner extends GridUriDeploymentScanner {
-    /** Secure socket protocol to use. */
-    private static final String PROTOCOL = "TLS";
-
-    /** */
-    @GridToStringExclude
-    private URL scanDir;
-
-    /** Cache of found files to check if any of it has been updated. */
-    private Map<String, Long> tstampCache = new HashMap<>();
-
-    /** */
-    @GridToStringExclude
-    private final Tidy tidy;
-
-    /** Outgoing data SSL socket factory. */
-    private SSLSocketFactory sockFactory;
-
-    /**
-     * @param gridName Grid instance name.
-     * @param uri HTTP URI.
-     * @param deployDir Deployment directory.
-     * @param freq Scanner frequency.
-     * @param filter Filename filter.
-     * @param lsnr Deployment listener.
-     * @param log Logger to use.
-     * @throws org.apache.ignite.spi.IgniteSpiException Thrown in case of any error.
-     */
-    public GridUriDeploymentHttpScanner(
-        String gridName,
-        URI uri,
-        File deployDir,
-        long freq,
-        FilenameFilter filter,
-        GridUriDeploymentScannerListener lsnr,
-        IgniteLogger log) throws IgniteSpiException {
-        super(gridName, uri, deployDir, freq, filter, lsnr, log);
-
-        initialize(uri);
-
-        tidy = new Tidy();
-
-        tidy.setQuiet(true);
-        tidy.setOnlyErrors(true);
-        tidy.setShowWarnings(false);
-        tidy.setInputEncoding("UTF8");
-        tidy.setOutputEncoding("UTF8");
-   }
-
-    /**
-     * @param uri HTTP URI.
-     * @throws org.apache.ignite.spi.IgniteSpiException Thrown in case of any error.
-     */
-    private void initialize(URI uri) throws IgniteSpiException {
-        assert "http".equals(uri.getScheme()) || "https".equals(uri.getScheme());
-
-        try {
-            scanDir = new URL(uri.getScheme(), uri.getHost(), uri.getPort(), uri.getPath());
-        }
-        catch (MalformedURLException e) {
-            scanDir = null;
-
-            throw new IgniteSpiException("Wrong value for scanned HTTP directory with URI: " + uri, e);
-        }
-
-        try {
-            if ("https".equals(uri.getScheme())) {
-                // Set up socket factory to do authentication.
-                SSLContext ctx = SSLContext.getInstance(PROTOCOL);
-
-                ctx.init(null, getTrustManagers(), null);
-
-                sockFactory = ctx.getSocketFactory();
-            }
-        }
-        catch (NoSuchAlgorithmException e) {
-            throw new IgniteSpiException("Failed to initialize SSL context. URI: " + uri, e);
-        }
-        catch (KeyManagementException e) {
-            throw new IgniteSpiException("Failed to initialize SSL context. URI:" + uri, e);
-        }
-    }
-
-    /** {@inheritDoc} */
-    @Override protected void process() {
-        Collection<String> foundFiles = U.newHashSet(tstampCache.size());
-
-        long start = U.currentTimeMillis();
-
-        processHttp(foundFiles);
-
-        if (getLogger().isDebugEnabled())
-            getLogger().debug("HTTP scanner time in ms: " + (U.currentTimeMillis() - start));
-
-        if (!isFirstScan()) {
-            Collection<String> deletedFiles = new HashSet<>(tstampCache.keySet());
-
-            deletedFiles.removeAll(foundFiles);
-
-            if (!deletedFiles.isEmpty()) {
-                List<String> uris = new ArrayList<>();
-
-                for (String file : deletedFiles) {
-                    uris.add(getFileUri(getFileName(file)));
-                }
-
-                tstampCache.keySet().removeAll(deletedFiles);
-
-                getListener().onDeletedFiles(uris);
-            }
-        }
-    }
-
-    /**
-     * @param files Files to process.
-     */
-    private void processHttp(Collection<String> files) {
-        Set<String> urls = getUrls(scanDir);
-
-        for (String url : urls) {
-            String fileName = getFileName(url);
-
-            if (getFilter().accept(null, fileName)) {
-                files.add(url);
-
-                Long lastModified = tstampCache.get(url);
-
-                InputStream in = null;
-                OutputStream out = null;
-
-                File file = null;
-
-                try {
-                    URLConnection conn = new URL(url).openConnection();
-
-                    if (conn instanceof HttpsURLConnection) {
-                        HttpsURLConnection httpsConn = (HttpsURLConnection)conn;
-
-                        httpsConn.setHostnameVerifier(new DeploymentHostnameVerifier());
-
-                        assert sockFactory != null;
-
-                        // Initialize socket factory.
-                        httpsConn.setSSLSocketFactory(sockFactory);
-                    }
-
-                    if (lastModified != null)
-                        conn.setIfModifiedSince(lastModified);
-
-                    in = conn.getInputStream();
-
-                    long rcvLastModified = conn.getLastModified();
-
-                    if (in == null || lastModified != null && (lastModified == rcvLastModified ||
-                        conn instanceof HttpURLConnection &&
-                        ((HttpURLConnection)conn).getResponseCode() == HttpURLConnection.HTTP_NOT_MODIFIED))
-                        continue;
-
-                    tstampCache.put(url, rcvLastModified);
-
-                    lastModified = rcvLastModified;
-
-                    if (getLogger().isDebugEnabled()) {
-                        getLogger().debug("Discovered deployment file or directory: " +
-                            U.hidePassword(url));
-                    }
-
-                    file = createTempFile(fileName, getDeployDirectory());
-
-                    // Delete file when JVM stopped.
-                    file.deleteOnExit();
-
-                    out = new FileOutputStream(file);
-
-                    U.copy(in, out);
-                }
-                catch (IOException e) {
-                    if (!isCancelled()) {
-                        if (X.hasCause(e, ConnectException.class)) {
-                            LT.warn(getLogger(), e, "Failed to connect to HTTP server (connection refused): " +
-                                U.hidePassword(url));
-                        }
-                        else if (X.hasCause(e, UnknownHostException.class)) {
-                            LT.warn(getLogger(), e, "Failed to connect to HTTP server (host is unknown): " +
-                                U.hidePassword(url));
-                        }
-                        else
-                            U.error(getLogger(), "Failed to save file: " + fileName, e);
-                    }
-                }
-                finally {
-                    U.closeQuiet(in);
-                    U.closeQuiet(out);
-                }
-
-                if (file != null && file.exists() && file.length() > 0)
-                    getListener().onNewOrUpdatedFile(file, getFileUri(fileName), lastModified);
-            }
-        }
-    }
-
-    /**
-     * @param node XML element node.
-     * @param res Set of URLs in string format to populate.
-     * @param baseUrl Base URL.
-     */
-    @SuppressWarnings( {"UnusedCatchParameter", "UnnecessaryFullyQualifiedName"})
-    private void findReferences(org.w3c.dom.Node node, Set<String> res, URL baseUrl) {
-        if (node instanceof Element && "a".equals(node.getNodeName().toLowerCase())) {
-            Element element = (Element)node;
-
-            String href = element.getAttribute("href");
-
-            if (href != null && !href.isEmpty()) {
-                URL url = null;
-
-                try {
-                    url = new URL(href);
-                }
-                catch (MalformedURLException e) {
-                    try {
-                        url = new URL(baseUrl.getProtocol(), baseUrl.getHost(), baseUrl.getPort(),
-                            href.charAt(0) == '/' ? href : baseUrl.getFile() + '/' + href);
-                    }
-                    catch (MalformedURLException e1) {
-                        U.error(getLogger(), "Skipping bad URL: " + url, e1);
-                    }
-                }
-
-                if (url != null)
-                    res.add(url.toString());
-            }
-        }
-
-        NodeList childNodes = node.getChildNodes();
-
-        for (int i = 0; i < childNodes.getLength(); i++)
-            findReferences(childNodes.item(i), res, baseUrl);
-    }
-
-    /**
-     * @param url Base URL.
-     * @return Set of referenced URLs in string format.
-     */
-    private Set<String> getUrls(URL url) {
-        assert url != null;
-
-        InputStream in = null;
-
-        Set<String> urls = new HashSet<>();
-
-        Document dom = null;
-
-        try {
-            URLConnection conn = url.openConnection();
-
-            if (conn instanceof HttpsURLConnection) {
-                HttpsURLConnection httpsConn = (HttpsURLConnection)conn;
-
-                httpsConn.setHostnameVerifier(new DeploymentHostnameVerifier());
-
-                assert sockFactory != null;
-
-                // Initialize socket factory.
-                httpsConn.setSSLSocketFactory(sockFactory);
-            }
-
-            in = conn.getInputStream();
-
-            if (in == null)
-                throw new IOException("Failed to open connection: " + U.hidePassword(url.toString()));
-
-            dom = tidy.parseDOM(in, null);
-        }
-        catch (IOException e) {
-            if (!isCancelled()) {
-                if (X.hasCause(e, ConnectException.class)) {
-                    LT.warn(getLogger(), e, "Failed to connect to HTTP server (connection refused): " +
-                        U.hidePassword(url.toString()));
-                }
-                else if (X.hasCause(e, UnknownHostException.class)) {
-                    LT.warn(getLogger(), e, "Failed to connect to HTTP server (host is unknown): " +
-                        U.hidePassword(url.toString()));
-                }
-                else
-                    U.error(getLogger(), "Failed to get HTML page: " + U.hidePassword(url.toString()), e);
-            }
-        }
-        finally{
-            U.closeQuiet(in);
-        }
-
-        if (dom != null)
-            findReferences(dom, urls, url);
-
-        return urls;
-    }
-
-    /**
-     * @param url Base URL string format.
-     * @return File name extracted from {@code url} string format.
-     */
-    private String getFileName(String url) {
-        assert url != null;
-
-        return url.substring(url.lastIndexOf('/') + 1);
-    }
-
-    /**
-     * Construct array with one trust manager which don't reject input certificates.
-     *
-     * @return Array with one X509TrustManager implementation of trust manager.
-     */
-    private TrustManager[] getTrustManagers() {
-        return new TrustManager[]{
-            new X509TrustManager() {
-                /** {@inheritDoc} */
-                @Nullable @Override public X509Certificate[] getAcceptedIssuers() { return null; }
-
-                /** {@inheritDoc} */
-                @Override public void checkClientTrusted(X509Certificate[] certs, String authType) {
-                    StringBuilder buf = new StringBuilder();
-
-                    buf.append("Trust manager handle client certificates [authType=");
-                    buf.append(authType);
-                    buf.append(", certificates=");
-
-                    for (X509Certificate cert : certs) {
-                        buf.append("{type=");
-                        buf.append(cert.getType());
-                        buf.append(", principalName=");
-                        buf.append(cert.getSubjectX500Principal().getName());
-                        buf.append('}');
-                    }
-
-                    buf.append(']');
-
-                    if (getLogger().isDebugEnabled())
-                        getLogger().debug(buf.toString());
-                }
-
-                /** {@inheritDoc} */
-                @Override public void checkServerTrusted(X509Certificate[] certs, String authType) {
-                    StringBuilder buf = new StringBuilder();
-
-                    buf.append("Trust manager handle server certificates [authType=");
-                    buf.append(authType);
-                    buf.append(", certificates=");
-
-                    for (X509Certificate cert : certs) {
-                        buf.append("{type=");
-                        buf.append(cert.getType());
-                        buf.append(", principalName=");
-                        buf.append(cert.getSubjectX500Principal().getName());
-                        buf.append('}');
-                    }
-
-                    buf.append(']');
-
-                    if (getLogger().isDebugEnabled())
-                        getLogger().debug(buf.toString());
-                }
-            }
-        };
-    }
-
-
-    /** {@inheritDoc} */
-    @Override public String toString() {
-        return S.toString(GridUriDeploymentHttpScanner.class, this,
-            "scanDir", scanDir != null ? U.hidePassword(scanDir.toString()) : null);
-    }
-
-    /**
-     * Verifier always return 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;
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0391d27c/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/http/UriDeploymentHttpScanner.java
----------------------------------------------------------------------
diff --git a/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/http/UriDeploymentHttpScanner.java b/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/http/UriDeploymentHttpScanner.java
new file mode 100644
index 0000000..002b2e1
--- /dev/null
+++ b/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/http/UriDeploymentHttpScanner.java
@@ -0,0 +1,478 @@
+/*
+ * 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.scanners.http;
+
+import org.apache.ignite.internal.util.typedef.*;
+import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.spi.*;
+import org.apache.ignite.spi.deployment.uri.scanners.*;
+import org.jetbrains.annotations.*;
+import org.w3c.dom.*;
+import org.w3c.tidy.*;
+
+import javax.net.ssl.*;
+import java.io.*;
+import java.net.*;
+import java.security.*;
+import java.security.cert.*;
+import java.util.*;
+import java.util.concurrent.*;
+
+/**
+ * URI deployment HTTP scanner.
+ */
+public class UriDeploymentHttpScanner implements UriDeploymentScanner {
+    /** Default scan frequency. */
+    private static final int DFLT_SCAN_FREQ = 300000;
+
+    /** Secure socket protocol to use. */
+    private static final String PROTOCOL = "TLS";
+
+    /** Per-URI contexts. */
+    private final ConcurrentHashMap<URI, URIContext> uriCtxs = new ConcurrentHashMap<>();
+
+    /** {@inheritDoc} */
+    @Override public boolean acceptsURI(URI uri) {
+        String proto = uri.getScheme().toLowerCase();
+
+        return "http".equals(proto) || "https".equals(proto);
+    }
+
+    /** {@inheritDoc} */
+    @Override public void scan(UriDeploymentScannerContext scanCtx) {
+        URI uri = scanCtx.getUri();
+
+        URIContext uriCtx = uriCtxs.get(uri);
+
+        if (uriCtx == null) {
+            uriCtx = createUriContext(uri, scanCtx);
+
+            URIContext oldUriCtx = uriCtxs.putIfAbsent(uri, uriCtx);
+
+            if (oldUriCtx != null)
+                uriCtx = oldUriCtx;
+        }
+
+        uriCtx.scan(scanCtx);
+    }
+
+    /**
+     * Create context for the given URI.
+     *
+     * @param uri URI.
+     * @param scanCtx Scanner context.
+     * @return URI context.
+     */
+    private URIContext createUriContext(URI uri, final UriDeploymentScannerContext scanCtx) {
+        assert "http".equals(uri.getScheme()) || "https".equals(uri.getScheme());
+
+        URL scanDir;
+
+        try {
+            scanDir = new URL(uri.getScheme(), uri.getHost(), uri.getPort(), uri.getPath());
+        }
+        catch (MalformedURLException e) {
+            throw new IgniteSpiException("Wrong value for scanned HTTP directory with URI: " + uri, e);
+        }
+
+        SSLSocketFactory sockFactory = null;
+
+        try {
+            if ("https".equals(uri.getScheme())) {
+                // Set up socket factory to do authentication.
+                SSLContext ctx = SSLContext.getInstance(PROTOCOL);
+
+                ctx.init(null, getTrustManagers(scanCtx), null);
+
+                sockFactory = ctx.getSocketFactory();
+            }
+        }
+        catch (NoSuchAlgorithmException e) {
+            throw new IgniteSpiException("Failed to initialize SSL context. URI: " + uri, e);
+        }
+        catch (KeyManagementException e) {
+            throw new IgniteSpiException("Failed to initialize SSL context. URI:" + uri, e);
+        }
+
+        return new URIContext(scanDir, sockFactory);
+    }
+
+    /** {@inheritDoc} */
+    @Override public long getDefaultScanFrequency() {
+        return DFLT_SCAN_FREQ;
+    }
+
+    /**
+     * Construct array with one trust manager which don't reject input certificates.
+     *
+     * @param scanCtx context.
+     * @return Array with one X509TrustManager implementation of trust manager.
+     */
+    private static TrustManager[] getTrustManagers(final UriDeploymentScannerContext scanCtx) {
+        return new TrustManager[]{
+            new X509TrustManager() {
+                /** {@inheritDoc} */
+                @Nullable
+                @Override public X509Certificate[] getAcceptedIssuers() { return null; }
+
+                /** {@inheritDoc} */
+                @Override public void checkClientTrusted(X509Certificate[] certs, String authType) {
+                    StringBuilder buf = new StringBuilder();
+
+                    buf.append("Trust manager handle client certificates [authType=");
+                    buf.append(authType);
+                    buf.append(", certificates=");
+
+                    for (X509Certificate cert : certs) {
+                        buf.append("{type=");
+                        buf.append(cert.getType());
+                        buf.append(", principalName=");
+                        buf.append(cert.getSubjectX500Principal().getName());
+                        buf.append('}');
+                    }
+
+                    buf.append(']');
+
+                    if (scanCtx.getLogger().isDebugEnabled())
+                        scanCtx.getLogger().debug(buf.toString());
+                }
+
+                /** {@inheritDoc} */
+                @Override public void checkServerTrusted(X509Certificate[] certs, String authType) {
+                    StringBuilder buf = new StringBuilder();
+
+                    buf.append("Trust manager handle server certificates [authType=");
+                    buf.append(authType);
+                    buf.append(", certificates=");
+
+                    for (X509Certificate cert : certs) {
+                        buf.append("{type=");
+                        buf.append(cert.getType());
+                        buf.append(", principalName=");
+                        buf.append(cert.getSubjectX500Principal().getName());
+                        buf.append('}');
+                    }
+
+                    buf.append(']');
+
+                    if (scanCtx.getLogger().isDebugEnabled())
+                        scanCtx.getLogger().debug(buf.toString());
+                }
+            }
+        };
+    }
+
+    /**
+     * URI context.
+     */
+    private class URIContext {
+        /** */
+        private final URL scanDir;
+
+        /** Outgoing data SSL socket factory. */
+        private final SSLSocketFactory sockFactory;
+
+        /** */
+        private final Tidy tidy;
+
+        /** Cache of found files to check if any of it has been updated. */
+        private final Map<String, Long> tstampCache = new HashMap<>();
+
+        /**
+         * Constructor.
+         *
+         * @param scanDir Scan directory.
+         * @param sockFactory Socket factory.
+         */
+        public URIContext(URL scanDir, SSLSocketFactory sockFactory) {
+            this.scanDir = scanDir;
+            this.sockFactory = sockFactory;
+
+            tidy = new Tidy();
+
+            tidy.setQuiet(true);
+            tidy.setOnlyErrors(true);
+            tidy.setShowWarnings(false);
+            tidy.setInputEncoding("UTF8");
+            tidy.setOutputEncoding("UTF8");
+        }
+
+        /**
+         * Perform scan.
+         *
+         * @param scanCtx Scan context.
+         */
+        private void scan(UriDeploymentScannerContext scanCtx) {
+            Collection<String> foundFiles = U.newHashSet(tstampCache.size());
+
+            long start = U.currentTimeMillis();
+
+            processHttp(foundFiles, scanCtx);
+
+            if (scanCtx.getLogger().isDebugEnabled())
+                scanCtx.getLogger().debug("HTTP scanner time in ms: " + (U.currentTimeMillis() - start));
+
+            if (!scanCtx.isFirstScan()) {
+                Collection<String> deletedFiles = new HashSet<>(tstampCache.keySet());
+
+                deletedFiles.removeAll(foundFiles);
+
+                if (!deletedFiles.isEmpty()) {
+                    List<String> uris = new ArrayList<>();
+
+                    for (String file : deletedFiles)
+                        uris.add(getFileUri(fileName(file), scanCtx));
+
+                    tstampCache.keySet().removeAll(deletedFiles);
+
+                    scanCtx.getListener().onDeletedFiles(uris);
+                }
+            }
+        }
+
+        /**
+         * @param files Files to process.
+         * @param scanCtx Scan context.
+         */
+        @SuppressWarnings("unchecked")
+        private void processHttp(Collection<String> files, UriDeploymentScannerContext scanCtx) {
+            Set<String> urls = getUrls(scanDir, scanCtx);
+
+            for (String url : urls) {
+                String fileName = fileName(url);
+
+                if (scanCtx.getFilter().accept(null, fileName)) {
+                    files.add(url);
+
+                    Long lastModified = tstampCache.get(url);
+
+                    InputStream in = null;
+                    OutputStream out = null;
+
+                    File file = null;
+
+                    try {
+                        URLConnection conn = new URL(url).openConnection();
+
+                        if (conn instanceof HttpsURLConnection) {
+                            HttpsURLConnection httpsConn = (HttpsURLConnection)conn;
+
+                            httpsConn.setHostnameVerifier(new DeploymentHostnameVerifier());
+
+                            assert sockFactory != null;
+
+                            // Initialize socket factory.
+                            httpsConn.setSSLSocketFactory(sockFactory);
+                        }
+
+                        if (lastModified != null)
+                            conn.setIfModifiedSince(lastModified);
+
+                        in = conn.getInputStream();
+
+                        long rcvLastModified = conn.getLastModified();
+
+                        if (in == null || lastModified != null && (lastModified == rcvLastModified ||
+                            conn instanceof HttpURLConnection &&
+                                ((HttpURLConnection)conn).getResponseCode() == HttpURLConnection.HTTP_NOT_MODIFIED))
+                            continue;
+
+                        tstampCache.put(url, rcvLastModified);
+
+                        lastModified = rcvLastModified;
+
+                        if (scanCtx.getLogger().isDebugEnabled()) {
+                            scanCtx.getLogger().debug("Discovered deployment file or directory: " +
+                                U.hidePassword(url));
+                        }
+
+                        file = scanCtx.createTempFile(fileName, scanCtx.getDeployDirectory());
+
+                        // Delete file when JVM stopped.
+                        file.deleteOnExit();
+
+                        out = new FileOutputStream(file);
+
+                        U.copy(in, out);
+                    }
+                    catch (IOException e) {
+                        if (!scanCtx.isCancelled()) {
+                            if (X.hasCause(e, ConnectException.class)) {
+                                LT.warn(scanCtx.getLogger(), e, "Failed to connect to HTTP server " +
+                                    "(connection refused): " + U.hidePassword(url));
+                            }
+                            else if (X.hasCause(e, UnknownHostException.class)) {
+                                LT.warn(scanCtx.getLogger(), e, "Failed to connect to HTTP server " +
+                                    "(host is unknown): " + U.hidePassword(url));
+                            }
+                            else
+                                U.error(scanCtx.getLogger(), "Failed to save file: " + fileName, e);
+                        }
+                    }
+                    finally {
+                        U.closeQuiet(in);
+                        U.closeQuiet(out);
+                    }
+
+                    if (file != null && file.exists() && file.length() > 0)
+                        scanCtx.getListener().onNewOrUpdatedFile(file, getFileUri(fileName, scanCtx), lastModified);
+                }
+            }
+        }
+
+        /**
+         * @param url Base URL.
+         * @param scanCtx Scan context.
+         * @return Set of referenced URLs in string format.
+         */
+        @SuppressWarnings("unchecked")
+        private Set<String> getUrls(URL url, UriDeploymentScannerContext scanCtx) {
+            assert url != null;
+
+            InputStream in = null;
+
+            Set<String> urls = new HashSet<>();
+
+            Document dom = null;
+
+            try {
+                URLConnection conn = url.openConnection();
+
+                if (conn instanceof HttpsURLConnection) {
+                    HttpsURLConnection httpsConn = (HttpsURLConnection)conn;
+
+                    httpsConn.setHostnameVerifier(new DeploymentHostnameVerifier());
+
+                    assert sockFactory != null;
+
+                    // Initialize socket factory.
+                    httpsConn.setSSLSocketFactory(sockFactory);
+                }
+
+                in = conn.getInputStream();
+
+                if (in == null)
+                    throw new IOException("Failed to open connection: " + U.hidePassword(url.toString()));
+
+                dom = tidy.parseDOM(in, null);
+            }
+            catch (IOException e) {
+                if (!scanCtx.isCancelled()) {
+                    if (X.hasCause(e, ConnectException.class)) {
+                        LT.warn(scanCtx.getLogger(), e, "Failed to connect to HTTP server (connection refused): " +
+                            U.hidePassword(url.toString()));
+                    }
+                    else if (X.hasCause(e, UnknownHostException.class)) {
+                        LT.warn(scanCtx.getLogger(), e, "Failed to connect to HTTP server (host is unknown): " +
+                            U.hidePassword(url.toString()));
+                    }
+                    else
+                        U.error(scanCtx.getLogger(), "Failed to get HTML page: " + U.hidePassword(url.toString()), e);
+                }
+            }
+            finally{
+                U.closeQuiet(in);
+            }
+
+            if (dom != null)
+                findReferences(dom, urls, url, scanCtx);
+
+            return urls;
+        }
+
+        /**
+         * @param node XML element node.
+         * @param res Set of URLs in string format to populate.
+         * @param baseUrl Base URL.
+         * @param scanCtx Scan context.
+         */
+        @SuppressWarnings( {"UnusedCatchParameter", "UnnecessaryFullyQualifiedName"})
+        private void findReferences(org.w3c.dom.Node node, Set<String> res, URL baseUrl,
+            UriDeploymentScannerContext scanCtx) {
+            if (node instanceof Element && "a".equals(node.getNodeName().toLowerCase())) {
+                Element element = (Element)node;
+
+                String href = element.getAttribute("href");
+
+                if (href != null && !href.isEmpty()) {
+                    URL url = null;
+
+                    try {
+                        url = new URL(href);
+                    }
+                    catch (MalformedURLException e) {
+                        try {
+                            url = new URL(baseUrl.getProtocol(), baseUrl.getHost(), baseUrl.getPort(),
+                                href.charAt(0) == '/' ? href : baseUrl.getFile() + '/' + href);
+                        }
+                        catch (MalformedURLException e1) {
+                            U.error(scanCtx.getLogger(), "Skipping bad URL: " + href, e1);
+                        }
+                    }
+
+                    if (url != null)
+                        res.add(url.toString());
+                }
+            }
+
+            NodeList childNodes = node.getChildNodes();
+
+            for (int i = 0; i < childNodes.getLength(); i++)
+                findReferences(childNodes.item(i), res, baseUrl, scanCtx);
+        }
+
+        /**
+         * @param url Base URL string format.
+         * @return File name extracted from {@code url} string format.
+         */
+        private String fileName(String url) {
+            assert url != null;
+
+            return url.substring(url.lastIndexOf('/') + 1);
+        }
+
+        /**
+         * Gets file URI for the given file name. It extends any given name with {@code URI}.
+         *
+         * @param name File name.
+         * @param scanCtx Scan context.
+         * @return URI for the given file name.
+         */
+        private String getFileUri(String name, UriDeploymentScannerContext scanCtx) {
+            assert name != null;
+
+            String fileUri = scanCtx.getUri().toString();
+
+            fileUri = fileUri.length() > 0 && fileUri.charAt(fileUri.length() - 1) == '/' ? fileUri + name :
+                fileUri + '/' + name;
+
+            return fileUri;
+        }
+    }
+
+    /**
+     * Verifier always return 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;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0391d27c/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentMultiScannersErrorThrottlingTest.java
----------------------------------------------------------------------
diff --git a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentMultiScannersErrorThrottlingTest.java b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentMultiScannersErrorThrottlingTest.java
index 21e5eb5..32fdadc 100644
--- a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentMultiScannersErrorThrottlingTest.java
+++ b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentMultiScannersErrorThrottlingTest.java
@@ -44,9 +44,6 @@ public class GridUriDeploymentMultiScannersErrorThrottlingTest extends GridUriDe
     public List<String> getUriList() {
         List<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");
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0391d27c/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentMultiScannersSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentMultiScannersSelfTest.java b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentMultiScannersSelfTest.java
index af54e06..1beee49 100644
--- a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentMultiScannersSelfTest.java
+++ b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentMultiScannersSelfTest.java
@@ -42,8 +42,7 @@ public class GridUriDeploymentMultiScannersSelfTest extends GridUriDeploymentAbs
     public List<String> getUriList() {
         List<String> uriList = new ArrayList<>();
 
-        // Fake URIs.
-        uriList.add(GridTestProperties.getProperty("deploy.uri.ftp"));
+        // Fake URI.
         uriList.add(GridTestProperties.getProperty("deploy.uri.http"));
 
         // One real URI.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0391d27c/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/scanners/file/GridFileDeploymentUndeploySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/scanners/file/GridFileDeploymentUndeploySelfTest.java b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/scanners/file/GridFileDeploymentUndeploySelfTest.java
index 2d6d681..0ac7c98 100644
--- a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/scanners/file/GridFileDeploymentUndeploySelfTest.java
+++ b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/scanners/file/GridFileDeploymentUndeploySelfTest.java
@@ -70,7 +70,7 @@ public class GridFileDeploymentUndeploySelfTest extends GridSpiAbstractTest<UriD
 
         assert newGarFile.exists();
 
-        Thread.sleep(UriDeploymentSpi.DFLT_DISK_SCAN_FREQUENCY + 3000);
+        Thread.sleep(UriDeploymentFileScanner.DFLT_SCAN_FREQ + 3000);
 
         assert getSpi().findResource("org.apache.ignite.spi.deployment.uri.tasks.GridUriDeploymentTestTask3") != null :
             "Failed to find resource for added GAR file.";
@@ -82,7 +82,7 @@ public class GridFileDeploymentUndeploySelfTest extends GridSpiAbstractTest<UriD
 
         assert !newGarFile.exists();
 
-        Thread.sleep(UriDeploymentSpi.DFLT_DISK_SCAN_FREQUENCY + 3000);
+        Thread.sleep(UriDeploymentFileScanner.DFLT_SCAN_FREQ + 3000);
 
         assert getSpi().findResource("org.apache.ignite.spi.deployment.uri.tasks.GridUriDeploymentTestTask3") == null;
         assert getSpi().findResource("GridUriDeploymentTestWithNameTask3") == null;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0391d27c/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/scanners/ftp/GridFtpDeploymentTest.java
----------------------------------------------------------------------
diff --git a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/scanners/ftp/GridFtpDeploymentTest.java b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/scanners/ftp/GridFtpDeploymentTest.java
deleted file mode 100644
index 5b73889..0000000
--- a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/scanners/ftp/GridFtpDeploymentTest.java
+++ /dev/null
@@ -1,46 +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.spi.deployment.uri.scanners.ftp;
-
-import org.apache.ignite.spi.deployment.uri.*;
-import org.apache.ignite.testframework.config.*;
-import org.apache.ignite.testframework.junits.spi.*;
-
-import java.util.*;
-
-/**
- * Test for FTP deployment.
- */
-@GridSpiTest(spi = UriDeploymentSpi.class, group = "Deployment SPI")
-public class GridFtpDeploymentTest extends GridUriDeploymentAbstractSelfTest {
-    /**
-     * @throws Exception  If failed.
-     */
-    public void testDeployment() throws Exception {
-        checkTask("org.apache.ignite.spi.deployment.uri.tasks.GridUriDeploymentTestTask3");
-        checkTask("GridUriDeploymentTestWithNameTask3");
-    }
-
-    /**
-     * @return List of deployment sources.
-     */
-    @GridSpiTestConfig
-    public List<String> getUriList() {
-        return Collections.singletonList(GridTestProperties.getProperty("deploy.uri.ftp"));
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0391d27c/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/scanners/ftp/package-info.java
----------------------------------------------------------------------
diff --git a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/scanners/ftp/package-info.java b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/scanners/ftp/package-info.java
deleted file mode 100644
index 50fd545..0000000
--- a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/scanners/ftp/package-info.java
+++ /dev/null
@@ -1,22 +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 description. -->
- * Contains internal tests or test related classes and interfaces.
- */
-package org.apache.ignite.spi.deployment.uri.scanners.ftp;
\ No newline at end of file


[38/50] [abbrv] incubator-ignite git commit: # IGNITE-661: Removed FTP scanner and abstracted scanners into separate configurable entity.

Posted by ag...@apache.org.
# IGNITE-661: Removed FTP scanner and abstracted scanners into separate configurable entity.


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

Branch: refs/heads/ignite-674
Commit: 0391d27c51b7590c3cc501b9a8d512fbb6cc4d7b
Parents: ac779fa
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Thu Apr 9 17:48:20 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Thu Apr 9 17:48:20 2015 +0300

----------------------------------------------------------------------
 modules/urideploy/README.txt                    |   2 +-
 modules/urideploy/licenses/edtftp-license.pdf   | Bin 58355 -> 0 bytes
 modules/urideploy/licenses/jtidy-license.txt    |  50 --
 .../urideploy/licenses/jtidy-mit-license.txt    |  50 ++
 modules/urideploy/pom.xml                       |   6 -
 .../spi/deployment/uri/UriDeploymentSpi.java    | 182 +++----
 .../uri/scanners/GridUriDeploymentScanner.java  | 286 -----------
 .../GridUriDeploymentScannerListener.java       |   2 +-
 .../uri/scanners/UriDeploymentScanner.java      |  47 ++
 .../scanners/UriDeploymentScannerContext.java   |  92 ++++
 .../scanners/UriDeploymentScannerManager.java   | 221 +++++++++
 .../file/GridUriDeploymentFileScanner.java      | 311 ------------
 .../scanners/file/UriDeploymentFileScanner.java | 327 +++++++++++++
 .../ftp/GridUriDeploymentFtpClient.java         | 199 --------
 .../ftp/GridUriDeploymentFtpConfiguration.java  | 115 -----
 .../ftp/GridUriDeploymentFtpException.java      |  43 --
 .../scanners/ftp/GridUriDeploymentFtpFile.java  | 119 -----
 .../ftp/GridUriDeploymentFtpScanner.java        | 234 ---------
 .../uri/scanners/ftp/package-info.java          |  22 -
 .../http/GridUriDeploymentHttpScanner.java      | 423 ----------------
 .../scanners/http/UriDeploymentHttpScanner.java | 478 +++++++++++++++++++
 ...loymentMultiScannersErrorThrottlingTest.java |   3 -
 .../GridUriDeploymentMultiScannersSelfTest.java |   3 +-
 .../GridFileDeploymentUndeploySelfTest.java     |   4 +-
 .../uri/scanners/ftp/GridFtpDeploymentTest.java |  46 --
 .../uri/scanners/ftp/package-info.java          |  22 -
 26 files changed, 1277 insertions(+), 2010 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0391d27c/modules/urideploy/README.txt
----------------------------------------------------------------------
diff --git a/modules/urideploy/README.txt b/modules/urideploy/README.txt
index a2cdb62..dc3defd 100644
--- a/modules/urideploy/README.txt
+++ b/modules/urideploy/README.txt
@@ -2,7 +2,7 @@ Apache Ignite URI Deploy Module
 -------------------------------
 
 Apache Ignite URI Deploy module provides capabilities to deploy tasks from different sources like
-File System, HTTP, FTP, or even Email.
+File System, HTTP, or even Email.
 
 To enable URI Deploy module when starting a standalone node, move 'optional/ignite-urideploy' folder to
 'libs' folder before running 'ignite.{sh|bat}' script. The content of the module folder will

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0391d27c/modules/urideploy/licenses/edtftp-license.pdf
----------------------------------------------------------------------
diff --git a/modules/urideploy/licenses/edtftp-license.pdf b/modules/urideploy/licenses/edtftp-license.pdf
deleted file mode 100644
index 606d7cd..0000000
Binary files a/modules/urideploy/licenses/edtftp-license.pdf and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0391d27c/modules/urideploy/licenses/jtidy-license.txt
----------------------------------------------------------------------
diff --git a/modules/urideploy/licenses/jtidy-license.txt b/modules/urideploy/licenses/jtidy-license.txt
deleted file mode 100644
index 3f5714a..0000000
--- a/modules/urideploy/licenses/jtidy-license.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-Java HTML Tidy - JTidy
-HTML parser and pretty printer
-
-Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
-Institute of Technology, Institut National de Recherche en
-Informatique et en Automatique, Keio University). All Rights
-Reserved.
-
-Contributing Author(s):
-
-   Dave Raggett <ds...@w3.org>
-   Andy Quick <ac...@sympatico.ca> (translation to Java)
-   Gary L Peskin <ga...@firstech.com> (Java development)
-   Sami Lempinen <sa...@lempinen.net> (release management)
-   Fabrizio Giustina <fgiust at users.sourceforge.net>
-
-The contributing author(s) would like to thank all those who
-helped with testing, bug fixes, and patience.  This wouldn't
-have been possible without all of you.
-
-COPYRIGHT NOTICE:
-
-This software and documentation is provided "as is," and
-the copyright holders and contributing author(s) make no
-representations or warranties, express or implied, including
-but not limited to, warranties of merchantability or fitness
-for any particular purpose or that the use of the software or
-documentation will not infringe any third party patents,
-copyrights, trademarks or other rights.
-
-The copyright holders and contributing author(s) will not be
-liable for any direct, indirect, special or consequential damages
-arising out of any use of the software or documentation, even if
-advised of the possibility of such damage.
-
-Permission is hereby granted to use, copy, modify, and distribute
-this source code, or portions hereof, documentation and executables,
-for any purpose, without fee, subject to the following restrictions:
-
-1. The origin of this source code must not be misrepresented.
-2. Altered versions must be plainly marked as such and must
-   not be misrepresented as being the original source.
-3. This Copyright notice may not be removed or altered from any
-   source or altered source distribution.
-
-The copyright holders and contributing author(s) specifically
-permit, without fee, and encourage the use of this source code
-as a component for supporting the Hypertext Markup Language in
-commercial products. If you use this source code in a product,
-acknowledgment is not required but would be appreciated.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0391d27c/modules/urideploy/licenses/jtidy-mit-license.txt
----------------------------------------------------------------------
diff --git a/modules/urideploy/licenses/jtidy-mit-license.txt b/modules/urideploy/licenses/jtidy-mit-license.txt
new file mode 100644
index 0000000..3f5714a
--- /dev/null
+++ b/modules/urideploy/licenses/jtidy-mit-license.txt
@@ -0,0 +1,50 @@
+Java HTML Tidy - JTidy
+HTML parser and pretty printer
+
+Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
+Institute of Technology, Institut National de Recherche en
+Informatique et en Automatique, Keio University). All Rights
+Reserved.
+
+Contributing Author(s):
+
+   Dave Raggett <ds...@w3.org>
+   Andy Quick <ac...@sympatico.ca> (translation to Java)
+   Gary L Peskin <ga...@firstech.com> (Java development)
+   Sami Lempinen <sa...@lempinen.net> (release management)
+   Fabrizio Giustina <fgiust at users.sourceforge.net>
+
+The contributing author(s) would like to thank all those who
+helped with testing, bug fixes, and patience.  This wouldn't
+have been possible without all of you.
+
+COPYRIGHT NOTICE:
+
+This software and documentation is provided "as is," and
+the copyright holders and contributing author(s) make no
+representations or warranties, express or implied, including
+but not limited to, warranties of merchantability or fitness
+for any particular purpose or that the use of the software or
+documentation will not infringe any third party patents,
+copyrights, trademarks or other rights.
+
+The copyright holders and contributing author(s) will not be
+liable for any direct, indirect, special or consequential damages
+arising out of any use of the software or documentation, even if
+advised of the possibility of such damage.
+
+Permission is hereby granted to use, copy, modify, and distribute
+this source code, or portions hereof, documentation and executables,
+for any purpose, without fee, subject to the following restrictions:
+
+1. The origin of this source code must not be misrepresented.
+2. Altered versions must be plainly marked as such and must
+   not be misrepresented as being the original source.
+3. This Copyright notice may not be removed or altered from any
+   source or altered source distribution.
+
+The copyright holders and contributing author(s) specifically
+permit, without fee, and encourage the use of this source code
+as a component for supporting the Hypertext Markup Language in
+commercial products. If you use this source code in a product,
+acknowledgment is not required but would be appreciated.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0391d27c/modules/urideploy/pom.xml
----------------------------------------------------------------------
diff --git a/modules/urideploy/pom.xml b/modules/urideploy/pom.xml
index d8a9aa1..29b00b7 100644
--- a/modules/urideploy/pom.xml
+++ b/modules/urideploy/pom.xml
@@ -77,12 +77,6 @@
         </dependency>
 
         <dependency>
-            <groupId>com.enterprisedt</groupId>
-            <artifactId>edtFTPj</artifactId>
-            <version>1.5.3</version>
-        </dependency>
-
-        <dependency>
             <groupId>net.sf.jtidy</groupId>
             <artifactId>jtidy</artifactId>
             <version>r938</version>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0391d27c/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/UriDeploymentSpi.java
----------------------------------------------------------------------
diff --git 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
index da9b42e..cb089c3 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
@@ -28,7 +28,6 @@ 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.jetbrains.annotations.*;
 
@@ -39,7 +38,7 @@ 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.
+ * different sources like file system folders, 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
@@ -140,7 +139,6 @@ import java.util.Map.*;
  * <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>
@@ -163,12 +161,6 @@ import java.util.Map.*;
  *      <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/ignite/deployment'}
@@ -194,12 +186,6 @@ import java.util.Map.*;
  *      <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/ignite/deployment'}
@@ -209,42 +195,7 @@ import java.util.Map.*;
  * <blockquote class="snippet">
  * {@code classes://freq=5000@localhost/c:/Program files/ignite/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 'ignite/deployment'}
- * <blockquote class="snippet">
- * ftp://username:password;freq=10000@localhost:21/ignite/deployment
- * </blockquote>
- * <p>
+ * <a name="http"></a>
  * <h2 class="header">HTTP URI Example</h2>
  * The following example will scan {@code 'ignite/deployment'} folder with
  * on site {@code 'www.mysite.com'} using authentication
@@ -262,7 +213,6 @@ import java.util.Map.*;
  * 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");
  *
@@ -290,7 +240,6 @@ import java.util.Map.*;
  *                 &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;
@@ -319,15 +268,6 @@ public class UriDeploymentSpi extends IgniteSpiAdapter implements DeploymentSpi,
      */
     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/ignite.xml}). */
     public static final String XML_DESCRIPTOR_PATH = "META-INF/ignite.xml";
 
@@ -354,15 +294,14 @@ public class UriDeploymentSpi extends IgniteSpiAdapter implements DeploymentSpi,
 
     /** */
     @SuppressWarnings({"CollectionDeclaredAsConcreteClass"})
-    private final LinkedList<GridUriDeploymentUnitDescriptor> unitLoaders =
-        new LinkedList<>();
+    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<>();
+    /** List of scanner managers. Every URI has it's own manager. */
+    private final Collection<UriDeploymentScannerManager> mgrs = new ArrayList<>();
 
     /** Whether URIs should be encoded or not. */
     private boolean encodeUri = true;
@@ -384,6 +323,9 @@ public class UriDeploymentSpi extends IgniteSpiAdapter implements DeploymentSpi,
     @SuppressWarnings("UnusedDeclaration")
     private boolean delayOnNewOrUpdatedFile;
 
+    /** Configured scanners. */
+    private UriDeploymentScanner[] scanners;
+
     /**
      * Sets absolute path to temporary directory which will be used by
      * deployment SPI to keep all deployed classes in.
@@ -463,17 +405,36 @@ public class UriDeploymentSpi extends IgniteSpiAdapter implements DeploymentSpi,
         this.lsnr = lsnr;
     }
 
+    /**
+     * Gets scanners.
+     *
+     * @return Scanners.
+     */
+    public UriDeploymentScanner[] getScanners() {
+        return scanners;
+    }
+
+    /**
+     * Sets scanners.
+     *
+     * @param scanners Scanners.
+     */
+    @IgniteSpiConfiguration(optional = true)
+    public void setScanners(UriDeploymentScanner... scanners) {
+        this.scanners = scanners;
+    }
+
     /** {@inheritDoc} */
     @Override public void spiStop() throws IgniteSpiException {
-        for (GridUriDeploymentScanner scanner : scanners)
-            scanner.cancel();
+        for (UriDeploymentScannerManager mgr : mgrs)
+            mgr.cancel();
 
-        for (GridUriDeploymentScanner scanner : scanners)
-            scanner.join();
+        for (UriDeploymentScannerManager mgr : mgrs)
+            mgr.join();
 
         // Clear inner collections.
         uriEncodedList.clear();
-        scanners.clear();
+        mgrs.clear();
 
         List<ClassLoader> tmpClsLdrs;
 
@@ -587,9 +548,15 @@ public class UriDeploymentSpi extends IgniteSpiAdapter implements DeploymentSpi,
             }
         };
 
-        for (URI uri : uriEncodedList) {
-            String proto = uri.getScheme();
+        // Set default scanners if none are configured.
+        if (scanners == null) {
+            scanners = new UriDeploymentScanner[2];
+
+            scanners[0] = new UriDeploymentFileScanner();
+            scanners[1] = new UriDeploymentHttpScanner();
+        }
 
+        for (URI uri : uriEncodedList) {
             File file = new File(deployTmpDirPath);
 
             long freq = -1;
@@ -601,34 +568,23 @@ public class UriDeploymentSpi extends IgniteSpiAdapter implements DeploymentSpi,
                 U.error(log, "Error parsing parameter value for frequency.", e);
             }
 
-            assert proto != null;
-
-            GridUriDeploymentScanner scanner;
+            UriDeploymentScannerManager mgr = null;
 
-            switch (proto) {
-                case "file":
-                    scanner = new GridUriDeploymentFileScanner(gridName, uri, file, freq > 0 ? freq :
-                        DFLT_DISK_SCAN_FREQUENCY, filter, lsnr, log);
-                    break;
+            for (UriDeploymentScanner scanner : scanners) {
+                if (scanner.acceptsURI(uri)) {
+                    mgr = new UriDeploymentScannerManager(gridName, uri, file, freq > 0 ? freq :
+                        scanner.getDefaultScanFrequency(), filter, lsnr, log, scanner);
 
-                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);
+            if (mgr == null)
+                throw new IgniteSpiException("Unsupported URI (please configure appropriate scanner): " + uri);
 
-            scanner.start();
+            mgrs.add(mgr);
+
+            mgr.start();
         }
 
         // Ack parameters.
@@ -636,7 +592,7 @@ public class UriDeploymentSpi extends IgniteSpiAdapter implements DeploymentSpi,
             log.debug(configInfo("tmpDirPath", tmpDirPath));
             log.debug(configInfo("uriList", uriList));
             log.debug(configInfo("encodeUri", encodeUri));
-            log.debug(configInfo("scanners", scanners));
+            log.debug(configInfo("scanners", mgrs));
         }
 
         // Ack ok start.
@@ -662,7 +618,7 @@ public class UriDeploymentSpi extends IgniteSpiAdapter implements DeploymentSpi,
         if (userInfo != null) {
             String[] arr = userInfo.split(";");
 
-            if (arr != null && arr.length > 0)
+            if (arr.length > 0)
                 for (String el : arr)
                     if (el.startsWith("freq="))
                         return Long.parseLong(el.substring(5));
@@ -676,7 +632,7 @@ public class UriDeploymentSpi extends IgniteSpiAdapter implements DeploymentSpi,
     @Override public DeploymentResource findResource(String rsrcName) {
         assert rsrcName != null;
 
-        // Wait until all scanners finish their first scanning.
+        // Wait until all scanner managers finish their first scanning.
         try {
             synchronized (mux) {
                 while (!isFirstScanFinished(firstScanCntr))
@@ -684,7 +640,7 @@ public class UriDeploymentSpi extends IgniteSpiAdapter implements DeploymentSpi,
             }
         }
         catch (InterruptedException e) {
-            U.error(log, "Failed to wait while all scanners finish their first scanning.", e);
+            U.error(log, "Failed to wait while all scanner managers finish their first scanning.", e);
 
             Thread.currentThread().interrupt();
 
@@ -946,28 +902,6 @@ public class UriDeploymentSpi extends IgniteSpiAdapter implements DeploymentSpi,
     }
 
     /**
-     * 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.
@@ -1014,8 +948,6 @@ public class UriDeploymentSpi extends IgniteSpiAdapter implements DeploymentSpi,
         for (String uri : uriList) {
             assertParameter(uri != null, "uriList.get(X) != null");
 
-            assert uri != null;
-
             String encUri = encodeUri(uri.replaceAll("\\\\", "/"));
 
             URI uriObj;
@@ -1038,7 +970,7 @@ public class UriDeploymentSpi extends IgniteSpiAdapter implements DeploymentSpi,
     }
 
     /**
-     * Add configuration for file scanner {@link GridUriDeploymentFileScanner}.
+     * Add configuration for file scanner.
      *
      * @throws org.apache.ignite.spi.IgniteSpiException Thrown if default URI syntax is incorrect.
      */
@@ -1144,7 +1076,7 @@ public class UriDeploymentSpi extends IgniteSpiAdapter implements DeploymentSpi,
                 GridUriDeploymentUnitDescriptor desc = iter.next();
 
                 assert !newDesc.getClassLoader().equals(desc.getClassLoader()) :
-                    "Uri scanners always create new class loader for every GAR file: " + newDesc;
+                    "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 &&

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0391d27c/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/GridUriDeploymentScanner.java
----------------------------------------------------------------------
diff --git a/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/GridUriDeploymentScanner.java b/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/GridUriDeploymentScanner.java
deleted file mode 100644
index e20d156..0000000
--- a/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/GridUriDeploymentScanner.java
+++ /dev/null
@@ -1,286 +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.spi.deployment.uri.scanners;
-
-import org.apache.ignite.*;
-import org.apache.ignite.internal.util.tostring.*;
-import org.apache.ignite.internal.util.typedef.internal.*;
-import org.apache.ignite.spi.*;
-
-import java.io.*;
-import java.net.*;
-
-/**
- * Base deployment scanner implementation. It simplifies scanner implementation
- * by providing loggers, executors and file names parsing methods.
- */
-public abstract class GridUriDeploymentScanner {
-    /** Grid name. */
-    private final String gridName;
-
-    /** URI that scanner should looks after. */
-    @GridToStringExclude
-    private final URI uri;
-
-    /** Temporary deployment directory. */
-    private final File deployDir;
-
-    /** Scan frequency. */
-    private final long freq;
-
-    /** Found files filter. */
-    private final FilenameFilter filter;
-
-    /** Scanner listener which should be notified about changes. */
-    private final GridUriDeploymentScannerListener lsnr;
-
-    /** Logger. */
-    private final IgniteLogger log;
-
-    /** Scanner implementation. */
-    private IgniteSpiThread scanner;
-
-    /** Whether first scan completed or not. */
-    private boolean firstScan = true;
-
-    /**
-     * Scans URI for new, updated or deleted files.
-     */
-    protected abstract void process();
-
-    /**
-     * Creates new scanner.
-     *
-     * @param gridName Grid name.
-     * @param uri URI which scanner should looks after.
-     * @param deployDir Temporary deployment directory.
-     * @param freq Scan frequency.
-     * @param filter Found files filter.
-     * @param lsnr Scanner listener which should be notifier about changes.
-     * @param log Logger.
-     */
-    protected GridUriDeploymentScanner(
-        String gridName,
-        URI uri,
-        File deployDir,
-        long freq,
-        FilenameFilter filter,
-        GridUriDeploymentScannerListener lsnr,
-        IgniteLogger log) {
-        assert uri != null;
-        assert freq > 0;
-        assert deployDir != null;
-        assert filter != null;
-        assert log != null;
-        assert lsnr != null;
-
-        this.gridName = gridName;
-        this.uri = uri;
-        this.deployDir = deployDir;
-        this.freq = freq;
-        this.filter = filter;
-        this.log = log.getLogger(getClass());
-        this.lsnr = lsnr;
-    }
-
-    /**
-     * Starts scanner.
-     */
-    public void start() {
-        scanner = new IgniteSpiThread(gridName, "grid-uri-scanner", log) {
-            /** {@inheritDoc} */
-            @SuppressWarnings({"BusyWait"})
-            @Override protected void body() throws InterruptedException  {
-                try {
-                    while (!isInterrupted()) {
-                        try {
-                            process();
-                        }
-                        finally {
-                            // Do it in finally to avoid any hanging.
-                            if (firstScan) {
-                                firstScan = false;
-
-                                lsnr.onFirstScanFinished();
-                            }
-                        }
-
-                        Thread.sleep(freq);
-                    }
-                }
-                finally {
-                    // Double check. If we were cancelled before anything has been scanned.
-                    if (firstScan) {
-                        firstScan = false;
-
-                        lsnr.onFirstScanFinished();
-                    }
-                }
-            }
-        };
-
-        scanner.start();
-
-        if (log.isDebugEnabled())
-            log.debug("Grid URI deployment scanner started: " + this);
-    }
-
-    /**
-     * Cancels scanner execution.
-     */
-    public void cancel() {
-        U.interrupt(scanner);
-    }
-
-    /**
-     * Joins scanner thread.
-     */
-    public void join() {
-        U.join(scanner, log);
-
-        if (log.isDebugEnabled())
-            log.debug("Grid URI deployment scanner stopped: " + this);
-    }
-
-    /**
-     * Tests whether scanner was cancelled before or not.
-     *
-     * @return {@code true} if scanner was cancelled and {@code false}
-     *      otherwise.
-     */
-    protected boolean isCancelled() {
-        assert scanner != null;
-
-        return scanner.isInterrupted();
-    }
-
-    /**
-     * Creates temp file in temp directory.
-     *
-     * @param fileName File name.
-     * @param tmpDir dir to creating file.
-     * @return created file.
-     * @throws IOException if error occur.
-     */
-    protected File createTempFile(String fileName, File tmpDir) throws IOException {
-        assert fileName != null;
-
-        int idx = fileName.lastIndexOf('.');
-
-        if (idx == -1)
-            idx = fileName.length();
-
-        String prefix = fileName.substring(0, idx);
-        if (idx < 3) { // Prefix must be at least 3 characters long. See File.createTempFile(...).
-            prefix += "___";
-        }
-
-        String suffix = fileName.substring(idx);
-
-        return File.createTempFile(prefix, suffix, tmpDir);
-    }
-
-    /**
-     * Gets file URI for the given file name. It extends any given name with {@link #uri}.
-     *
-     * @param name File name.
-     * @return URI for the given file name.
-     */
-    protected String getFileUri(String name) {
-        assert name != null;
-
-        String fileUri = uri.toString();
-
-        fileUri = fileUri.length() > 0 && fileUri.charAt(fileUri.length() - 1) == '/' ? fileUri + name :
-            fileUri + '/' + name;
-
-        return fileUri;
-    }
-
-    /**
-     * Tests whether first scan completed or not.
-     *
-     * @return {@code true} if first scan has been already completed and
-     *      {@code false} otherwise.
-     */
-    protected boolean isFirstScan() {
-        return firstScan;
-    }
-
-    /**
-     * Gets deployment URI.
-     *
-     * @return Deployment URI.
-     */
-    protected final URI getUri() {
-        return uri;
-    }
-
-    /**
-     * Gets deployment frequency.
-     *
-     * @return Deployment frequency.
-     */
-    protected final long getFrequency() {
-        return freq;
-    }
-
-    /**
-     * Gets temporary deployment directory.
-     *
-     * @return Temporary deployment directory.
-     */
-    protected final File getDeployDirectory() {
-        return deployDir;
-    }
-
-    /**
-     * Gets filter for found files. Before {@link #lsnr} is notified about
-     * changes with certain file last should be accepted by filter.
-     *
-     * @return New, updated or deleted file filter.
-     */
-    protected final FilenameFilter getFilter() {
-        return filter;
-    }
-
-    /**
-     * Gets deployment listener.
-     *
-     * @return Listener which should be notified about all deployment events
-     *      by scanner.
-     */
-    protected final GridUriDeploymentScannerListener getListener() {
-        return lsnr;
-    }
-
-    /**
-     * Gets scanner logger.
-     *
-     * @return Logger.
-     */
-    protected final IgniteLogger getLogger() {
-        return log;
-    }
-
-    /** {@inheritDoc} */
-    @Override public String toString() {
-        return S.toString(GridUriDeploymentScanner.class, this,
-            "uri", uri != null ? U.hidePassword(uri.toString()) : null);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0391d27c/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/GridUriDeploymentScannerListener.java
----------------------------------------------------------------------
diff --git a/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/GridUriDeploymentScannerListener.java b/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/GridUriDeploymentScannerListener.java
index ff33bd5..905e944 100644
--- a/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/GridUriDeploymentScannerListener.java
+++ b/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/GridUriDeploymentScannerListener.java
@@ -22,7 +22,7 @@ import java.util.*;
 
 /**
  * Scanner listener interface. Whatever deployment scanner is used
- * (ftp, http, file and so on) following events happens:
+ * (http, file and so on) following events happens:
  * <ul>
  * <li>{@code onNewOrUpdatedFile} - happens when new file has been found or updated.</li>
  * <li>{@code onDeletedFiles} - happens when file(s) has been removed.</li>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0391d27c/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/UriDeploymentScanner.java
----------------------------------------------------------------------
diff --git a/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/UriDeploymentScanner.java b/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/UriDeploymentScanner.java
new file mode 100644
index 0000000..e33351c
--- /dev/null
+++ b/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/UriDeploymentScanner.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.spi.deployment.uri.scanners;
+
+import java.net.*;
+
+/**
+ * URI deployment scanner.
+ */
+public interface UriDeploymentScanner {
+    /**
+     * Check whether scanner is able to process the given URI.
+     *
+     * @param uri URI.
+     * @return {@code true} if scanner is able to process the URI.
+     */
+    boolean acceptsURI(URI uri);
+
+    /**
+     * Scan the given URI.
+     *
+     * @param scanCtx Scan context.
+     */
+    void scan(UriDeploymentScannerContext scanCtx);
+
+    /**
+     * Gets default scan frequency in milliseconds.
+     *
+     * @return Default scan frequency.
+     */
+    long getDefaultScanFrequency();
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0391d27c/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/UriDeploymentScannerContext.java
----------------------------------------------------------------------
diff --git a/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/UriDeploymentScannerContext.java b/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/UriDeploymentScannerContext.java
new file mode 100644
index 0000000..9867f0f
--- /dev/null
+++ b/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/UriDeploymentScannerContext.java
@@ -0,0 +1,92 @@
+/*
+ * 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.scanners;
+
+import org.apache.ignite.*;
+import org.apache.ignite.spi.deployment.uri.scanners.*;
+
+import java.io.*;
+import java.net.*;
+
+/**
+ * Deployment scanner context.
+ */
+public interface UriDeploymentScannerContext {
+    /**
+     * Creates temp file in temp directory.
+     *
+     * @param fileName File name.
+     * @param tmpDir dir to creating file.
+     * @return created file.
+     * @throws IOException if error occur.
+     */
+    File createTempFile(String fileName, File tmpDir) throws IOException;
+
+    /**
+     * Gets temporary deployment directory.
+     *
+     * @return Temporary deployment directory.
+     */
+    File getDeployDirectory();
+
+    /**
+     * Gets filter for found files. Before listener is notified about
+     * changes with certain file last should be accepted by filter.
+     *
+     * @return New, updated or deleted file filter.
+     */
+    FilenameFilter getFilter();
+
+    /**
+     * Gets deployment listener.
+     *
+     * @return Listener which should be notified about all deployment events
+     *      by scanner.
+     */
+    GridUriDeploymentScannerListener getListener();
+
+    /**
+     * Gets scanner logger.
+     *
+     * @return Logger.
+     */
+    IgniteLogger getLogger();
+
+    /**
+     * Gets deployment URI.
+     *
+     * @return Deployment URI.
+     */
+    URI getUri();
+
+    /**
+     * Tests whether scanner was cancelled before or not.
+     *
+     * @return {@code true} if scanner was cancelled and {@code false}
+     *      otherwise.
+     */
+    boolean isCancelled();
+
+    /**
+     * Tests whether first scan completed or not.
+     *
+     * @return {@code true} if first scan has been already completed and
+     *      {@code false} otherwise.
+     */
+    boolean isFirstScan();
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0391d27c/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/UriDeploymentScannerManager.java
----------------------------------------------------------------------
diff --git a/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/UriDeploymentScannerManager.java b/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/UriDeploymentScannerManager.java
new file mode 100644
index 0000000..0d959d9
--- /dev/null
+++ b/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/UriDeploymentScannerManager.java
@@ -0,0 +1,221 @@
+/*
+ * 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.scanners;
+
+import org.apache.ignite.*;
+import org.apache.ignite.internal.util.tostring.*;
+import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.spi.*;
+
+import java.io.*;
+import java.net.*;
+
+/**
+ * URI deployment scanner manager.
+ */
+public class UriDeploymentScannerManager implements UriDeploymentScannerContext {
+    /** Grid name. */
+    private final String gridName;
+
+    /** URI that scanner should looks after. */
+    @GridToStringExclude
+    private final URI uri;
+
+    /** Temporary deployment directory. */
+    private final File deployDir;
+
+    /** Scan frequency. */
+    private final long freq;
+
+    /** Found files filter. */
+    private final FilenameFilter filter;
+
+    /** Scanner listener which should be notified about changes. */
+    private final GridUriDeploymentScannerListener lsnr;
+
+    /** Logger. */
+    private final IgniteLogger log;
+
+    /** Underlying scanner. */
+    private final UriDeploymentScanner scanner;
+
+    /** Scanner implementation. */
+    private IgniteSpiThread scannerThread;
+
+    /** Whether first scan completed or not. */
+    private boolean firstScan = true;
+
+    /**
+     * Creates new scanner.
+     *
+     * @param gridName Grid name.
+     * @param uri URI which scanner should looks after.
+     * @param deployDir Temporary deployment directory.
+     * @param freq Scan frequency.
+     * @param filter Found files filter.
+     * @param lsnr Scanner listener which should be notifier about changes.
+     * @param log Logger.
+     * @param scanner Scanner.
+     */
+    public UriDeploymentScannerManager(
+        String gridName,
+        URI uri,
+        File deployDir,
+        long freq,
+        FilenameFilter filter,
+        GridUriDeploymentScannerListener lsnr,
+        IgniteLogger log,
+        UriDeploymentScanner scanner) {
+        assert uri != null;
+        assert freq > 0;
+        assert deployDir != null;
+        assert filter != null;
+        assert log != null;
+        assert lsnr != null;
+        assert scanner != null;
+
+        this.gridName = gridName;
+        this.uri = uri;
+        this.deployDir = deployDir;
+        this.freq = freq;
+        this.filter = filter;
+        this.log = log.getLogger(getClass());
+        this.lsnr = lsnr;
+        this.scanner = scanner;
+    }
+
+    /**
+     * Starts scanner.
+     */
+    public void start() {
+        scannerThread = new IgniteSpiThread(gridName, "grid-uri-scanner", log) {
+            /** {@inheritDoc} */
+            @SuppressWarnings({"BusyWait"})
+            @Override protected void body() throws InterruptedException  {
+                try {
+                    while (!isInterrupted()) {
+                        try {
+                            scanner.scan(UriDeploymentScannerManager.this);
+                        }
+                        finally {
+                            // Do it in finally to avoid any hanging.
+                            if (firstScan) {
+                                firstScan = false;
+
+                                lsnr.onFirstScanFinished();
+                            }
+                        }
+
+                        Thread.sleep(freq);
+                    }
+                }
+                finally {
+                    // Double check. If we were cancelled before anything has been scanned.
+                    if (firstScan) {
+                        firstScan = false;
+
+                        lsnr.onFirstScanFinished();
+                    }
+                }
+            }
+        };
+
+        scannerThread.start();
+
+        if (log.isDebugEnabled())
+            log.debug("Grid URI deployment scanner started: " + this);
+    }
+
+    /**
+     * Cancels scanner execution.
+     */
+    public void cancel() {
+        U.interrupt(scannerThread);
+    }
+
+    /**
+     * Joins scanner thread.
+     */
+    public void join() {
+        U.join(scannerThread, log);
+
+        if (log.isDebugEnabled())
+            log.debug("Grid URI deployment scanner stopped: " + this);
+    }
+
+    /** {@inheritDoc} */
+    public boolean isCancelled() {
+        assert scannerThread != null;
+
+        return scannerThread.isInterrupted();
+    }
+
+    /** {@inheritDoc} */
+    public File createTempFile(String fileName, File tmpDir) throws IOException {
+        assert fileName != null;
+
+        int idx = fileName.lastIndexOf('.');
+
+        if (idx == -1)
+            idx = fileName.length();
+
+        String prefix = fileName.substring(0, idx);
+        if (idx < 3) { // Prefix must be at least 3 characters long. See File.createTempFile(...).
+            prefix += "___";
+        }
+
+        String suffix = fileName.substring(idx);
+
+        return File.createTempFile(prefix, suffix, tmpDir);
+    }
+
+    /** {@inheritDoc} */
+    public boolean isFirstScan() {
+        return firstScan;
+    }
+
+    /** {@inheritDoc} */
+    public URI getUri() {
+        return uri;
+    }
+
+    /** {@inheritDoc} */
+    public File getDeployDirectory() {
+        return deployDir;
+    }
+
+    /** {@inheritDoc} */
+    public FilenameFilter getFilter() {
+        return filter;
+    }
+
+    /** {@inheritDoc} */
+    public GridUriDeploymentScannerListener getListener() {
+        return lsnr;
+    }
+
+    /** {@inheritDoc} */
+    public IgniteLogger getLogger() {
+        return log;
+    }
+
+    /** {@inheritDoc} */
+    @Override public String toString() {
+        return S.toString(UriDeploymentScannerManager.class, this, "uri", U.hidePassword(uri.toString()));
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0391d27c/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/file/GridUriDeploymentFileScanner.java
----------------------------------------------------------------------
diff --git a/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/file/GridUriDeploymentFileScanner.java b/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/file/GridUriDeploymentFileScanner.java
deleted file mode 100644
index fc81c13..0000000
--- a/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/file/GridUriDeploymentFileScanner.java
+++ /dev/null
@@ -1,311 +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.spi.deployment.uri.scanners.file;
-
-import org.apache.ignite.*;
-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.spi.*;
-import org.apache.ignite.spi.deployment.uri.scanners.*;
-
-import java.io.*;
-import java.net.*;
-import java.util.*;
-
-/**
- * Scanner that processes all URIs with "file" scheme. Usually URI point to
- * certain directory or file and scanner is in charge of watching all changes
- * (file deletion, creation and so on) and sending notification to the listener
- * about every change.
- */
-public class GridUriDeploymentFileScanner extends GridUriDeploymentScanner {
-    /** Scanning directory or file. */
-    private File scanDir;
-
-    /** Cache of found GAR-files or GAR-directories to check if any of it has been updated. */
-    private Map<File, Long> tstampCache = new HashMap<>();
-
-    /** Cache of found files in GAR-folder to check if any of it has been updated. */
-    private Map<File, Map<File, Long>> garDirFilesTstampCache = new HashMap<>();
-
-    /** */
-    private FileFilter garFilter;
-
-    /** */
-    private FileFilter garDirFilesFilter;
-
-    /**
-     * Creates new instance of scanner with given name.
-     *
-     * @param gridName Grid name.
-     * @param uri URI which scanner should look after.
-     * @param deployDir Temporary deployment directory.
-     * @param freq Scan frequency.
-     * @param filter Found files filter.
-     * @param lsnr Scanner listener which should be notifier about changes.
-     * @param log Logger.
-     * @throws org.apache.ignite.spi.IgniteSpiException Thrown if URI is {@code null} or is not a
-     *      directory.
-     */
-    public GridUriDeploymentFileScanner(
-        String gridName,
-        URI uri,
-        File deployDir,
-        long freq,
-        FilenameFilter filter,
-        GridUriDeploymentScannerListener lsnr,
-        IgniteLogger log) throws IgniteSpiException {
-        super(gridName, uri, deployDir, freq, filter, lsnr, log);
-
-        initialize(uri);
-    }
-
-    /**
-     * Initializes scanner by parsing given URI and extracting scanning
-     * directory path and creating file filters.
-     *
-     * @param uri Scanning URI with "file" scheme.
-     * @throws org.apache.ignite.spi.IgniteSpiException Thrown if URI is {@code null} or is not a
-     *      directory.
-     */
-    private void initialize(URI uri) throws IgniteSpiException {
-        assert "file".equals(getUri().getScheme());
-
-        String scanDirPath = uri.getPath();
-
-        if (scanDirPath != null)
-            scanDir = new File(scanDirPath);
-
-        if (scanDir == null || !scanDir.isDirectory()) {
-            scanDir = null;
-
-            throw new IgniteSpiException("URI is either not provided or is not a directory: " +
-                U.hidePassword(uri.toString()));
-        }
-
-        garFilter = new FileFilter() {
-            /** {@inheritDoc} */
-            @Override public boolean accept(File pathname) {
-                return getFilter().accept(null, pathname.getName());
-            }
-        };
-
-        garDirFilesFilter = new FileFilter() {
-            /** {@inheritDoc} */
-            @Override public boolean accept(File pathname) {
-                // Allow all files in GAR-directory.
-                return pathname.isFile();
-            }
-        };
-    }
-
-    /**
-     * Handles changes in scanning directory by tracking files modification date.
-     * Checks files modification date against those one that was collected before
-     * and notifies listener about every changed or deleted file.
-     */
-    @Override protected void process() {
-        final Set<File> foundFiles = isFirstScan() ? new HashSet<File>() : U.<File>newHashSet(tstampCache.size());
-
-        GridDeploymentFileHandler hnd = new GridDeploymentFileHandler() {
-            /** {@inheritDoc} */
-            @Override public void handle(File file) {
-                foundFiles.add(file);
-
-                handleFile(file);
-            }
-        };
-
-        // Scan directory for deploy units.
-        GridDeploymentFolderScannerHelper.scanFolder(scanDir, garFilter, hnd);
-
-        // Print warning if no GAR-units found first time.
-        if (isFirstScan() && foundFiles.isEmpty())
-            U.warn(getLogger(), "No GAR-units found in: " + U.hidePassword(getUri().toString()));
-
-        if (!isFirstScan()) {
-            Collection<File> deletedFiles = new HashSet<>(tstampCache.keySet());
-
-            deletedFiles.removeAll(foundFiles);
-
-            if (!deletedFiles.isEmpty()) {
-                List<String> uris = new ArrayList<>();
-
-                for (File file : deletedFiles) {
-                    uris.add(getFileUri(file.getAbsolutePath()));
-                }
-
-                // Clear cache.
-                tstampCache.keySet().removeAll(deletedFiles);
-
-                garDirFilesTstampCache.keySet().removeAll(deletedFiles);
-
-                getListener().onDeletedFiles(uris);
-            }
-        }
-    }
-
-    /**
-     * Tests whether given directory or file was changed since last check and if so
-     * copies all directory sub-folders and files or file itself to the deployment
-     * directory and than notifies listener about new or updated files.
-     *
-     * @param file Scanning directory or file.
-     */
-    private void handleFile(File file) {
-        boolean changed;
-
-        Long lastMod;
-
-        if (file.isDirectory()) {
-            GridTuple<Long> dirLastModified = F.t(file.lastModified());
-
-            changed = checkGarDirectoryChanged(file, dirLastModified);
-
-            lastMod = dirLastModified.get();
-        }
-        else {
-            lastMod = tstampCache.get(file);
-
-            changed = lastMod == null || lastMod != file.lastModified();
-
-            lastMod = file.lastModified();
-        }
-
-        // If file is new or has been modified.
-        if (changed) {
-            tstampCache.put(file, lastMod);
-
-            if (getLogger().isDebugEnabled())
-                getLogger().debug("Discovered deployment file or directory: " + file);
-
-            String fileName = file.getName();
-
-            try {
-                File cpFile = createTempFile(fileName, getDeployDirectory());
-
-                // Delete file when JVM stopped.
-                cpFile.deleteOnExit();
-
-                if (file.isDirectory()) {
-                    cpFile = new File(cpFile.getParent(), "dir_" + cpFile.getName());
-
-                    // Delete directory when JVM stopped.
-                    cpFile.deleteOnExit();
-                }
-
-                // Copy file to deploy directory.
-                U.copy(file, cpFile, true);
-
-                String fileUri = getFileUri(file.getAbsolutePath());
-
-                getListener().onNewOrUpdatedFile(cpFile, fileUri, lastMod);
-            }
-            catch (IOException e) {
-                U.error(getLogger(), "Error saving file: " + fileName, e);
-            }
-        }
-    }
-
-    /**
-     * Tests whether certain directory was changed since given modification date.
-     * It scans all directory files one by one and compares their modification
-     * dates with those ones that was collected before.
-     * <p>
-     * If at least one file was changed (has modification date after given one)
-     * whole directory is considered as modified.
-     *
-     * @param dir Scanning directory.
-     * @param lastModified Last calculated Directory modification date.
-     * @return {@code true} if directory was changed since last check and
-     *      {@code false} otherwise.
-     */
-    private boolean checkGarDirectoryChanged(File dir, final GridTuple<Long> lastModified) {
-        final Map<File, Long> clssTstampCache;
-
-        boolean firstScan = false;
-
-        if (!garDirFilesTstampCache.containsKey(dir)) {
-            firstScan = true;
-
-            garDirFilesTstampCache.put(dir, clssTstampCache = new HashMap<>());
-        }
-        else
-            clssTstampCache = garDirFilesTstampCache.get(dir);
-
-        assert clssTstampCache != null;
-
-        final GridTuple<Boolean> changed = F.t(false);
-
-        final Set<File> foundFiles = firstScan ? new HashSet<File>() : U.<File>newHashSet(clssTstampCache.size());
-
-        GridDeploymentFileHandler hnd = new GridDeploymentFileHandler() {
-            @Override public void handle(File file) {
-                foundFiles.add(file);
-
-                Long fileLastModified = clssTstampCache.get(file);
-
-                if (fileLastModified == null || fileLastModified != file.lastModified()) {
-                    clssTstampCache.put(file, fileLastModified = file.lastModified());
-
-                    changed.set(true);
-                }
-
-                // Calculate last modified file in folder.
-                if (fileLastModified > lastModified.get())
-                    lastModified.set(fileLastModified);
-            }
-        };
-
-        // Scan GAR-directory for changes.
-        GridDeploymentFolderScannerHelper.scanFolder(dir, garDirFilesFilter, hnd);
-
-        // Clear cache for deleted files.
-        if (!firstScan && clssTstampCache.keySet().retainAll(foundFiles))
-            changed.set(true);
-
-        return changed.get();
-    }
-
-    /**
-     * Converts given file name to the URI with "file" scheme.
-     *
-     * @param name File name to be converted.
-     * @return File name with "file://" prefix.
-     */
-    @Override protected String getFileUri(String name) {
-        assert name != null;
-
-        name = name.replace("\\","/");
-
-        return "file://" + (name.charAt(0) == '/' ? "" : '/') + name;
-    }
-
-    /** {@inheritDoc} */
-    @Override public String toString() {
-        StringBuilder buf = new StringBuilder();
-
-        buf.append(getClass().getName()).append(" [");
-        buf.append("scanDir=").append(scanDir);
-        buf.append(']');
-
-        return buf.toString();
-    }
-}
-

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0391d27c/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/file/UriDeploymentFileScanner.java
----------------------------------------------------------------------
diff --git a/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/file/UriDeploymentFileScanner.java b/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/file/UriDeploymentFileScanner.java
new file mode 100644
index 0000000..2cbe38b
--- /dev/null
+++ b/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/file/UriDeploymentFileScanner.java
@@ -0,0 +1,327 @@
+/*
+ * 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.scanners.file;
+
+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.spi.*;
+import org.apache.ignite.spi.deployment.uri.scanners.*;
+
+import java.io.*;
+import java.net.*;
+import java.util.*;
+import java.util.concurrent.*;
+
+/**
+ * URI deployment file scanner.
+ */
+public class UriDeploymentFileScanner implements UriDeploymentScanner {
+    /** Default scan frequency. */
+    public static final int DFLT_SCAN_FREQ = 5000;
+
+    /** Per-URI contexts. */
+    private final ConcurrentHashMap<URI, URIContext> uriCtxs = new ConcurrentHashMap<>();
+
+    /** {@inheritDoc} */
+    @Override public boolean acceptsURI(URI uri) {
+        String proto = uri.getScheme().toLowerCase();
+
+        return "file".equals(proto);
+    }
+
+    /** {@inheritDoc} */
+    @Override public void scan(UriDeploymentScannerContext scanCtx) {
+        URI uri = scanCtx.getUri();
+
+        URIContext uriCtx = uriCtxs.get(uri);
+
+        if (uriCtx == null) {
+            uriCtx = createUriContext(uri, scanCtx);
+
+            URIContext oldUriCtx = uriCtxs.putIfAbsent(uri, uriCtx);
+
+            if (oldUriCtx != null)
+                uriCtx = oldUriCtx;
+        }
+
+        uriCtx.scan(scanCtx);
+    }
+
+    /** {@inheritDoc} */
+    @Override public long getDefaultScanFrequency() {
+        return DFLT_SCAN_FREQ;
+    }
+
+    /**
+     * Create context for the given URI.
+     *
+     * @param uri URI.
+     * @param scanCtx Scanner context.
+     * @return URI context.
+     */
+    private URIContext createUriContext(URI uri, final UriDeploymentScannerContext scanCtx) {
+        String scanDirPath = uri.getPath();
+
+        File scanDir = null;
+
+        if (scanDirPath != null)
+            scanDir = new File(scanDirPath);
+
+        if (scanDir == null || !scanDir.isDirectory())
+            throw new IgniteSpiException("URI is either not provided or is not a directory: " +
+                U.hidePassword(uri.toString()));
+
+        FileFilter garFilter = new FileFilter() {
+            /** {@inheritDoc} */
+            @Override public boolean accept(File pathname) {
+                return scanCtx.getFilter().accept(null, pathname.getName());
+            }
+        };
+
+        FileFilter garDirFilesFilter = new FileFilter() {
+            /** {@inheritDoc} */
+            @Override public boolean accept(File pathname) {
+                // Allow all files in GAR-directory.
+                return pathname.isFile();
+            }
+        };
+
+        return new URIContext(scanDir, garFilter, garDirFilesFilter);
+    }
+
+    /**
+     * Converts given file name to the URI with "file" scheme.
+     *
+     * @param name File name to be converted.
+     * @return File name with "file://" prefix.
+     */
+    private static String getFileUri(String name) {
+        assert name != null;
+
+        name = name.replace("\\","/");
+
+        return "file://" + (name.charAt(0) == '/' ? "" : '/') + name;
+    }
+
+    /**
+     * Context for the given URI.
+     */
+    private static class URIContext {
+        /** Scanning directory or file. */
+        private final File scanDir;
+
+        /** GAR filter. */
+        private final FileFilter garFilter;
+
+        /** GAR directory files filter. */
+        private final FileFilter garDirFilesFilter;
+
+        /** Cache of found GAR-files or GAR-directories to check if any of it has been updated. */
+        private final Map<File, Long> tstampCache = new HashMap<>();
+
+        /** Cache of found files in GAR-folder to check if any of it has been updated. */
+        private final Map<File, Map<File, Long>> garDirFilesTstampCache = new HashMap<>();
+
+        /**
+         * Constructor.
+         *
+         * @param scanDir Scan directory.
+         * @param garFilter Gar filter.
+         * @param garDirFilesFilter GAR directory files filter.
+         */
+        private URIContext(File scanDir, FileFilter garFilter, FileFilter garDirFilesFilter) {
+            this.scanDir = scanDir;
+            this.garFilter = garFilter;
+            this.garDirFilesFilter = garDirFilesFilter;
+        }
+
+        /**
+         * Perform scan.
+         *
+         * @param scanCtx Scan context.
+         */
+        private void scan(final UriDeploymentScannerContext scanCtx) {
+            final Set<File> foundFiles = scanCtx.isFirstScan() ?
+                new HashSet<File>() : U.<File>newHashSet(tstampCache.size());
+
+            GridDeploymentFileHandler hnd = new GridDeploymentFileHandler() {
+                /** {@inheritDoc} */
+                @Override public void handle(File file) {
+                    foundFiles.add(file);
+
+                    handleFile(file, scanCtx);
+                }
+            };
+
+            // Scan directory for deploy units.
+            GridDeploymentFolderScannerHelper.scanFolder(scanDir, garFilter, hnd);
+
+            // Print warning if no GAR-units found first time.
+            if (scanCtx.isFirstScan() && foundFiles.isEmpty())
+                U.warn(scanCtx.getLogger(), "No GAR-units found in: " + U.hidePassword(scanCtx.getUri().toString()));
+
+            if (!scanCtx.isFirstScan()) {
+                Collection<File> deletedFiles = new HashSet<>(tstampCache.keySet());
+
+                deletedFiles.removeAll(foundFiles);
+
+                if (!deletedFiles.isEmpty()) {
+                    List<String> uris = new ArrayList<>();
+
+                    for (File file : deletedFiles) {
+                        uris.add(getFileUri(file.getAbsolutePath()));
+                    }
+
+                    // Clear cache.
+                    tstampCache.keySet().removeAll(deletedFiles);
+
+                    garDirFilesTstampCache.keySet().removeAll(deletedFiles);
+
+                    scanCtx.getListener().onDeletedFiles(uris);
+                }
+            }
+        }
+
+        /**
+         * Tests whether given directory or file was changed since last check and if so
+         * copies all directory sub-folders and files or file itself to the deployment
+         * directory and than notifies listener about new or updated files.
+         *
+         * @param file Scanning directory or file.
+         * @param ctx Scanner context.
+         */
+        private void handleFile(File file, UriDeploymentScannerContext ctx) {
+            boolean changed;
+
+            Long lastMod;
+
+            if (file.isDirectory()) {
+                GridTuple<Long> dirLastModified = F.t(file.lastModified());
+
+                changed = checkGarDirectoryChanged(file, dirLastModified);
+
+                lastMod = dirLastModified.get();
+            }
+            else {
+                lastMod = tstampCache.get(file);
+
+                changed = lastMod == null || lastMod != file.lastModified();
+
+                lastMod = file.lastModified();
+            }
+
+            // If file is new or has been modified.
+            if (changed) {
+                tstampCache.put(file, lastMod);
+
+                if (ctx.getLogger().isDebugEnabled())
+                    ctx.getLogger().debug("Discovered deployment file or directory: " + file);
+
+                String fileName = file.getName();
+
+                try {
+                    File cpFile = ctx.createTempFile(fileName, ctx.getDeployDirectory());
+
+                    // Delete file when JVM stopped.
+                    cpFile.deleteOnExit();
+
+                    if (file.isDirectory()) {
+                        cpFile = new File(cpFile.getParent(), "dir_" + cpFile.getName());
+
+                        // Delete directory when JVM stopped.
+                        cpFile.deleteOnExit();
+                    }
+
+                    // Copy file to deploy directory.
+                    U.copy(file, cpFile, true);
+
+                    String fileUri = getFileUri(file.getAbsolutePath());
+
+                    assert lastMod != null;
+
+                    ctx.getListener().onNewOrUpdatedFile(cpFile, fileUri, lastMod);
+                }
+                catch (IOException e) {
+                    U.error(ctx.getLogger(), "Error saving file: " + fileName, e);
+                }
+            }
+        }
+
+        /**
+         * Tests whether certain directory was changed since given modification date.
+         * It scans all directory files one by one and compares their modification
+         * dates with those ones that was collected before.
+         * <p>
+         * If at least one file was changed (has modification date after given one)
+         * whole directory is considered as modified.
+         *
+         * @param dir Scanning directory.
+         * @param lastModified Last calculated Directory modification date.
+         * @return {@code true} if directory was changed since last check and
+         *      {@code false} otherwise.
+         */
+        @SuppressWarnings("ConstantConditions")
+        private boolean checkGarDirectoryChanged(File dir, final GridTuple<Long> lastModified) {
+            final Map<File, Long> clssTstampCache;
+
+            boolean firstScan = false;
+
+            if (!garDirFilesTstampCache.containsKey(dir)) {
+                firstScan = true;
+
+                garDirFilesTstampCache.put(dir, clssTstampCache = new HashMap<>());
+            }
+            else
+                clssTstampCache = garDirFilesTstampCache.get(dir);
+
+            assert clssTstampCache != null;
+
+            final GridTuple<Boolean> changed = F.t(false);
+
+            final Set<File> foundFiles = firstScan ? new HashSet<File>() : U.<File>newHashSet(clssTstampCache.size());
+
+            GridDeploymentFileHandler hnd = new GridDeploymentFileHandler() {
+                @Override public void handle(File file) {
+                    foundFiles.add(file);
+
+                    Long fileLastModified = clssTstampCache.get(file);
+
+                    if (fileLastModified == null || fileLastModified != file.lastModified()) {
+                        clssTstampCache.put(file, fileLastModified = file.lastModified());
+
+                        changed.set(true);
+                    }
+
+                    // Calculate last modified file in folder.
+                    if (fileLastModified > lastModified.get())
+                        lastModified.set(fileLastModified);
+                }
+            };
+
+            // Scan GAR-directory for changes.
+            GridDeploymentFolderScannerHelper.scanFolder(dir, garDirFilesFilter, hnd);
+
+            // Clear cache for deleted files.
+            if (!firstScan && clssTstampCache.keySet().retainAll(foundFiles))
+                changed.set(true);
+
+            return changed.get();
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0391d27c/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/ftp/GridUriDeploymentFtpClient.java
----------------------------------------------------------------------
diff --git a/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/ftp/GridUriDeploymentFtpClient.java b/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/ftp/GridUriDeploymentFtpClient.java
deleted file mode 100644
index e85082e..0000000
--- a/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/ftp/GridUriDeploymentFtpClient.java
+++ /dev/null
@@ -1,199 +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.spi.deployment.uri.scanners.ftp;
-
-import com.enterprisedt.net.ftp.*;
-import org.apache.ignite.*;
-import org.apache.ignite.internal.util.typedef.internal.*;
-
-import java.io.*;
-import java.text.*;
-import java.util.*;
-
-/**
- * URI FTP deployment client.
- */
-class GridUriDeploymentFtpClient {
-    /** Timeout in milliseconds on the underlying socket. */
-    private static final int TIMEOUT = 60000;
-
-    /** */
-    private final GridUriDeploymentFtpConfiguration cfg;
-
-    /** */
-    private final IgniteLogger log;
-
-    /** */
-    private FTPClient ftp;
-
-    /** */
-    private boolean isConnected;
-
-    /**
-     * @param cfg FTP configuration.
-     * @param log Logger to use.
-     */
-    GridUriDeploymentFtpClient(GridUriDeploymentFtpConfiguration cfg, IgniteLogger log) {
-        assert cfg != null;
-        assert log != null;
-
-        this.cfg = cfg;
-        this.log = log;
-    }
-
-
-    /**
-     * @param rmtFile Remote file.
-     * @param localFile Local file.
-     * @throws GridUriDeploymentFtpException Thrown in case of any error.
-     */
-    void downloadToFile(GridUriDeploymentFtpFile rmtFile, File localFile) throws GridUriDeploymentFtpException {
-        assert ftp != null;
-        assert rmtFile != null;
-        assert localFile != null;
-
-        String dirName = rmtFile.getParentDirectory();
-
-        if (dirName.length() == 0 || '/' != dirName.charAt(dirName.length() - 1))
-            dirName += '/';
-
-        String srcPath = dirName + rmtFile.getName();
-
-        try {
-            BufferedOutputStream out = null;
-
-            try {
-                out = new BufferedOutputStream(new FileOutputStream(localFile));
-
-                ftp.get(out, srcPath);
-            }
-            finally {
-                U.close(out, log);
-            }
-        }
-        catch (IOException | FTPException e) {
-            throw new GridUriDeploymentFtpException("Failed to download file [rmtFile=" + srcPath + ", localFile=" +
-                localFile + ']', e);
-        }
-    }
-
-    /**
-     * @throws GridUriDeploymentFtpException Thrown in case of any error.
-     */
-    void connect() throws GridUriDeploymentFtpException {
-        ftp = new FTPClient();
-
-        try {
-            ftp.setRemoteHost(cfg.getHost());
-            ftp.setRemotePort(cfg.getPort());
-
-            // Set socket timeout to avoid an infinite timeout.
-            ftp.setTimeout(TIMEOUT);
-
-            ftp.connect();
-
-            ftp.login(cfg.getUsername(), cfg.getPassword());
-
-            // Set up passive binary transfers.
-            ftp.setConnectMode(FTPConnectMode.PASV);
-            ftp.setType(FTPTransferType.BINARY);
-
-            if (!ftp.connected()) {
-                ftp.quit();
-
-                throw new GridUriDeploymentFtpException("FTP server refused connection [host=" + cfg.getHost() +
-                    ", port=" + cfg.getPort() + ", username=" + cfg.getUsername() + ']');
-            }
-        }
-        catch (IOException | FTPException e) {
-            throw new GridUriDeploymentFtpException("Failed to connect to host [host=" + cfg.getHost() +
-                ", port=" + cfg.getPort() + ']', e);
-        }
-
-        isConnected = true;
-    }
-
-    /**
-     * @throws GridUriDeploymentFtpException Thrown in case of any error.
-     */
-    void close() throws GridUriDeploymentFtpException {
-        if (!isConnected)
-            return;
-
-        assert ftp != null;
-
-        Exception e = null;
-
-        try {
-            ftp.quit();
-        }
-        catch (IOException e1) {
-            e = e1;
-        }
-        catch (FTPException e1) {
-            e = e1;
-        }
-        finally{
-            if (ftp.connected()) {
-                try {
-                    ftp.quit();
-                }
-                catch (IOException | FTPException e1) {
-                    // Don't loose the initial exception.
-                    if (e == null)
-                        e = e1;
-                }
-            }
-        }
-
-        ftp = null;
-
-        isConnected = false;
-
-        if (e != null)
-            throw new GridUriDeploymentFtpException("Failed to close FTP client.", e);
-    }
-
-    /**
-     * @return List of files.
-     * @throws GridUriDeploymentFtpException Thrown in case of any error.
-     */
-    List<GridUriDeploymentFtpFile> getFiles() throws GridUriDeploymentFtpException {
-        try {
-            assert cfg.getDirectory() != null;
-
-            List<GridUriDeploymentFtpFile> clientFiles = new ArrayList<>();
-
-            FTPFile[] files = ftp.dirDetails(cfg.getDirectory());
-
-            for (FTPFile file : files) {
-                clientFiles.add(new GridUriDeploymentFtpFile(cfg.getDirectory(), file));
-            }
-
-            return clientFiles;
-        }
-        catch (IOException | ParseException | FTPException e) {
-            throw new GridUriDeploymentFtpException("Failed to get files in directory: " + cfg.getDirectory(), e);
-        }
-    }
-
-    /** {@inheritDoc} */
-    @Override public String toString() {
-        return S.toString(GridUriDeploymentFtpClient.class, this);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0391d27c/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/ftp/GridUriDeploymentFtpConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/ftp/GridUriDeploymentFtpConfiguration.java b/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/ftp/GridUriDeploymentFtpConfiguration.java
deleted file mode 100644
index 5d5b62a..0000000
--- a/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/ftp/GridUriDeploymentFtpConfiguration.java
+++ /dev/null
@@ -1,115 +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.spi.deployment.uri.scanners.ftp;
-
-import org.apache.ignite.internal.util.tostring.*;
-import org.apache.ignite.internal.util.typedef.internal.*;
-
-/**
- * URI FTP deployment configuration.
- */
-class GridUriDeploymentFtpConfiguration {
-    /** */
-    private static final String DFLT_DIR = "/";
-
-    /** */
-    private String host;
-
-    /** */
-    private int port = 21;
-
-    /** */
-    private String username;
-
-    /** */
-    @GridToStringExclude private String pswd;
-
-    /** */
-    private String dir = DFLT_DIR;
-
-    /**
-     * @return Host.
-     */
-    String getHost() { return host; }
-
-    /**
-     * @param host FTP host.
-     */
-    void setHost(String host) {
-        assert host != null;
-
-        this.host = host;
-    }
-
-    /**
-     * @return Port.
-     */
-    int getPort() { return port; }
-
-    /**
-     * @param port FTP port.
-     */
-    void setPort(int port) {
-        assert port > 0;
-
-        this.port = port;
-    }
-
-    /**
-     * @return Username.
-     */
-    String getUsername() { return username; }
-
-    /**
-     * @param username FTP username.
-     */
-    void setUsername(String username) {
-        assert username != null;
-
-        this.username = username;
-    }
-
-    /**
-     * @return Password.
-     */
-    String getPassword() { return pswd; }
-
-    /**
-     * @param pswd FTP password.
-     */
-    void setPassword(String pswd) {
-        assert pswd != null;
-
-        this.pswd = pswd;
-    }
-
-    /**
-     * @return Directory.
-     */
-    String getDirectory() { return dir; }
-
-    /**
-     * @param dir FTP remote directory.
-     */
-    void setDirectory(String dir) { this.dir = dir == null ? DFLT_DIR : dir; }
-
-    /** {@inheritDoc} */
-    @Override public String toString() {
-        return S.toString(GridUriDeploymentFtpConfiguration.class, this);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0391d27c/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/ftp/GridUriDeploymentFtpException.java
----------------------------------------------------------------------
diff --git a/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/ftp/GridUriDeploymentFtpException.java b/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/ftp/GridUriDeploymentFtpException.java
deleted file mode 100644
index cc046a8..0000000
--- a/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/ftp/GridUriDeploymentFtpException.java
+++ /dev/null
@@ -1,43 +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.spi.deployment.uri.scanners.ftp;
-
-import org.apache.ignite.*;
-
-/**
- * An exception occurred during URI FTP deployment.
- */
-class GridUriDeploymentFtpException extends IgniteCheckedException {
-    /** */
-    private static final long serialVersionUID = 0L;
-
-    /**
-     * Creates new grid exception with given error message.
-     *
-     * @param msg Error message.
-     */
-    GridUriDeploymentFtpException(String msg) { super(msg); }
-
-    /**
-     * Creates new grid ftp client exception with given error message and optional nested exception.
-     *
-     * @param msg Error message.
-     * @param cause Optional nested exception (can be {@code null}).
-     */
-    GridUriDeploymentFtpException(String msg, Throwable cause) { super(msg, cause); }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0391d27c/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/ftp/GridUriDeploymentFtpFile.java
----------------------------------------------------------------------
diff --git a/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/ftp/GridUriDeploymentFtpFile.java b/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/ftp/GridUriDeploymentFtpFile.java
deleted file mode 100644
index 90e941f..0000000
--- a/modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/ftp/GridUriDeploymentFtpFile.java
+++ /dev/null
@@ -1,119 +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.spi.deployment.uri.scanners.ftp;
-
-import com.enterprisedt.net.ftp.*;
-import org.apache.ignite.internal.util.typedef.internal.*;
-
-import java.util.*;
-
-/**
- * Value object which encapsulates {@link FTPFile} and corresponding directory.
- */
-class GridUriDeploymentFtpFile {
-    /** */
-    private final String dir;
-
-    /** */
-    private final FTPFile file;
-
-    /**
-     * @param dir Remote FTP directory.
-     * @param file FTP file.
-     */
-    GridUriDeploymentFtpFile(String dir, FTPFile file) {
-        assert dir != null;
-        assert file != null;
-        assert file.getName() != null;
-
-        this.dir = dir;
-        this.file = file;
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean equals(Object obj) {
-        if (this == obj)
-            return true;
-
-        if (!(obj instanceof GridUriDeploymentFtpFile))
-            return false;
-
-        GridUriDeploymentFtpFile other = (GridUriDeploymentFtpFile)obj;
-
-        return dir.equals(other.dir) && file.getName().equals(other.file.getName());
-    }
-
-    /** {@inheritDoc} */
-    @Override public int hashCode() {
-        int res = dir.hashCode();
-
-        res = 29 * res + file.getName().hashCode();
-
-        return res;
-    }
-
-    /**
-     * @return File name.
-     */
-    String getName() {
-        return file.getName();
-    }
-
-    /**
-     * @return Last modification date as calendar.
-     */
-    Calendar getTimestamp() {
-        Date date = file.lastModified();
-
-        Calendar cal = null;
-
-        if (date != null) {
-            cal = Calendar.getInstance();
-
-            cal.setTime(date);
-        }
-
-        return cal;
-    }
-
-    /**
-     * @return {@code True} in case provided file is a directory.
-     */
-    boolean isDirectory() {
-        return file.isDir();
-    }
-
-    /**
-     * @return {@code True} in case provided file is not a directory or link.
-     */
-    boolean isFile() {
-        return !file.isDir() && !file.isLink();
-    }
-
-    /**
-     * @return File parent directory.
-     */
-    String getParentDirectory() {
-        return dir;
-    }
-
-    /** {@inheritDoc} */
-    @Override public String toString() {
-        return S.toString(GridUriDeploymentFtpFile.class, this);
-    }
-}


[27/50] [abbrv] incubator-ignite git commit: # IGNITE-30 Fix broken test ClusterMetricsSnapshotSerializeSelfTest.

Posted by ag...@apache.org.
# IGNITE-30 Fix broken test ClusterMetricsSnapshotSerializeSelfTest.


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

Branch: refs/heads/ignite-674
Commit: ca568f5b4b1e0d181bd19b86f8b3f362ea05c2d6
Parents: 8b63c8a
Author: sevdokimov <se...@gridgain.com>
Authored: Thu Apr 9 12:52:57 2015 +0300
Committer: sevdokimov <se...@gridgain.com>
Committed: Thu Apr 9 12:53:11 2015 +0300

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


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ca568f5b/modules/core/src/main/java/org/apache/ignite/internal/ClusterMetricsSnapshot.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/ClusterMetricsSnapshot.java b/modules/core/src/main/java/org/apache/ignite/internal/ClusterMetricsSnapshot.java
index 558b0c3..8cfdd8a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/ClusterMetricsSnapshot.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/ClusterMetricsSnapshot.java
@@ -1311,7 +1311,7 @@ public class ClusterMetricsSnapshot implements ClusterMetrics {
         assert !buf.hasRemaining() : "Invalid metrics size [expected=" + METRICS_SIZE + ", actual="
             + (buf.position() - off) + ']';
 
-        return off;
+        return buf.position();
     }
 
     /**


[35/50] [abbrv] incubator-ignite git commit: # GG-10064: Fixed marshaller bug.

Posted by ag...@apache.org.
# GG-10064: Fixed marshaller bug.


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

Branch: refs/heads/ignite-674
Commit: 0c1ad007f3c76a0e9e356619707aa07ab212ef87
Parents: fd9cdff
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Thu Apr 9 17:09:19 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Thu Apr 9 17:09:19 2015 +0300

----------------------------------------------------------------------
 .../ignite/internal/MarshallerContextImpl.java  |  3 +++
 .../continuous/CacheContinuousQueryManager.java | 28 --------------------
 2 files changed, 3 insertions(+), 28 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0c1ad007/modules/core/src/main/java/org/apache/ignite/internal/MarshallerContextImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/MarshallerContextImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/MarshallerContextImpl.java
index e6ef192..0952e86 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/MarshallerContextImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/MarshallerContextImpl.java
@@ -131,6 +131,9 @@ public class MarshallerContextImpl extends MarshallerContextAdapter {
                 throw new IgniteCheckedException("Failed to read class name from file [id=" + id +
                     ", file=" + file.getAbsolutePath() + ']', e);
             }
+
+            // Must explicitly put entry to cache to invoke other continuous queries.
+            registerClassName(id, clsName);
         }
 
         return clsName;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0c1ad007/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryManager.java
index 0d28120..13d29bf 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryManager.java
@@ -274,34 +274,6 @@ public class CacheContinuousQueryManager extends GridCacheManagerAdapter {
      * @return Continuous routine ID.
      * @throws IgniteCheckedException In case of error.
      */
-    public UUID executeInternalQueryForNonInternalKeys(CacheEntryUpdatedListener<?, ?> locLsnr,
-        CacheEntryEventSerializableFilter rmtFilter,
-        boolean loc,
-        boolean notifyExisting)
-        throws IgniteCheckedException
-    {
-        return executeQuery0(
-            locLsnr,
-            rmtFilter,
-            ContinuousQuery.DFLT_PAGE_SIZE,
-            ContinuousQuery.DFLT_TIME_INTERVAL,
-            ContinuousQuery.DFLT_AUTO_UNSUBSCRIBE,
-            false,
-            notifyExisting,
-            true,
-            false,
-            true,
-            loc ? cctx.grid().cluster().forLocal() : null);
-    }
-
-    /**
-     * @param locLsnr Local listener.
-     * @param rmtFilter Remote filter.
-     * @param loc Local flag.
-     * @param notifyExisting Notify existing flag.
-     * @return Continuous routine ID.
-     * @throws IgniteCheckedException In case of error.
-     */
     public UUID executeInternalQuery(CacheEntryUpdatedListener<?, ?> locLsnr,
         CacheEntryEventSerializableFilter rmtFilter,
         boolean loc,


[41/50] [abbrv] incubator-ignite git commit: ignite-sprint-3 - sql

Posted by ag...@apache.org.
ignite-sprint-3 - sql


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

Branch: refs/heads/ignite-674
Commit: 968a3ad35b98a6989f0f64003166f977564af713
Parents: 27b6b78
Author: S.Vladykin <sv...@gridgain.com>
Authored: Thu Apr 9 18:05:57 2015 +0300
Committer: S.Vladykin <sv...@gridgain.com>
Committed: Thu Apr 9 18:05:57 2015 +0300

----------------------------------------------------------------------
 .../query/h2/sql/GridSqlQueryParser.java        | 24 ++++++++++++++------
 1 file changed, 17 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/968a3ad3/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 b174d71..3817c1a 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
@@ -199,9 +199,7 @@ public class GridSqlQueryParser {
             else if (tbl instanceof TableView) {
                 Query qry = VIEW_QUERY.get((TableView)tbl);
 
-                assert0(qry instanceof Select, qry);
-
-                res = new GridSqlSubquery(parse((Select)qry));
+                res = new GridSqlSubquery(parse(qry));
             }
             else if (tbl instanceof FunctionTable)
                 res = parseExpression(FUNC_EXPR.get((FunctionTable)tbl));
@@ -518,8 +516,18 @@ public class GridSqlQueryParser {
 
             GridSqlFunction res = new GridSqlFunction(null, f.getName());
 
-            for (Expression arg : f.getArgs())
-                res.addChild(parseExpression(arg));
+            if (f.getArgs() != null) {
+                for (Expression arg : f.getArgs()) {
+                    if (arg == null) {
+                        if (f.getFunctionType() != Function.CASE)
+                            throw new IllegalStateException("Function type with null arg: " + f.getFunctionType());
+
+                        continue;
+                    }
+
+                    res.addChild(parseExpression(arg));
+                }
+            }
 
             if (f.getFunctionType() == Function.CAST || f.getFunctionType() == Function.CONVERT)
                 res.setCastType(new Column(null, f.getType(), f.getPrecision(), f.getScale(), f.getDisplaySize())
@@ -535,8 +543,10 @@ public class GridSqlQueryParser {
 
             GridSqlFunction res = new GridSqlFunction(alias.getSchema().getName(), f.getName());
 
-            for (Expression arg : f.getArgs())
-                res.addChild(parseExpression(arg));
+            if (f.getArgs() != null) {
+                for (Expression arg : f.getArgs())
+                    res.addChild(parseExpression(arg));
+            }
 
             return res;
         }


[39/50] [abbrv] incubator-ignite git commit: # IGNITE-691: Fixed.

Posted by ag...@apache.org.
# IGNITE-691: Fixed.


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

Branch: refs/heads/ignite-674
Commit: e7fa0a9a09df44ffd7caaa675c30ab5b1c6b9344
Parents: 0391d27
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Thu Apr 9 17:54:05 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Thu Apr 9 17:54:05 2015 +0300

----------------------------------------------------------------------
 .../apache/ignite/internal/IgniteKernal.java    | 11 +-----
 .../affinity/GridAffinityProcessor.java         |  5 ++-
 .../processors/cache/GridCacheProcessor.java    | 37 +++++++++++++-------
 .../cacheobject/IgniteCacheObjectProcessor.java |  5 +--
 .../IgniteCacheObjectProcessorImpl.java         | 34 +++++++-----------
 .../datastreamer/DataStreamerImpl.java          |  8 ++---
 6 files changed, 47 insertions(+), 53 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7fa0a9a/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 8e5779e..05667d8 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
@@ -2235,19 +2235,10 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable {
 
     /** {@inheritDoc} */
     @Override public <K, V> IgniteCache<K, V> cache(@Nullable String name) {
-        return cache(name, true);
-    }
-
-    /**
-     * @param name Cache name.
-     * @param failIfSys Fail if requestsed cache is system cache.
-     * @return Cache.
-     */
-    public <K, V> IgniteCache<K, V> cache(@Nullable String name, boolean failIfSys) {
         guard();
 
         try {
-            return ctx.cache().publicJCache(name, true, failIfSys);
+            return ctx.cache().publicJCache(name, true);
         }
         catch (IgniteCheckedException e) {
             throw CU.convertToCacheException(e);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7fa0a9a/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityProcessor.java
index 46fc099..daa2bc2 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityProcessor.java
@@ -21,6 +21,7 @@ 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.events.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.managers.eventstorage.*;
@@ -404,7 +405,9 @@ public class GridAffinityProcessor extends GridProcessorAdapter {
         f.reset();
         m.reset();
 
-        return new AffinityInfo(f, m, t.get3(), ctx.cacheObjects().contextForCache(n, cacheName, null));
+        CacheConfiguration ccfg = ctx.cache().cacheConfiguration(cacheName);
+
+        return new AffinityInfo(f, m, t.get3(), ctx.cacheObjects().contextForCache(ccfg));
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7fa0a9a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
index 1dd1658..c0e84f8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
@@ -60,7 +60,6 @@ import org.jetbrains.annotations.*;
 
 import javax.cache.configuration.*;
 import javax.cache.integration.*;
-import javax.cache.processor.*;
 import javax.management.*;
 import java.io.*;
 import java.util.*;
@@ -575,7 +574,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
 
             CacheConfiguration<?, ?> cfg = new CacheConfiguration(cfgs[i]);
 
-            CacheObjectContext cacheObjCtx = ctx.cacheObjects().contextForCache(null, cfg.getName(), cfg);
+            CacheObjectContext cacheObjCtx = ctx.cacheObjects().contextForCache(cfg);
 
             // Initialize defaults.
             initialize(cfg, cacheObjCtx);
@@ -716,7 +715,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
             IgnitePredicate filter = ccfg.getNodeFilter();
 
             if (filter.apply(locNode)) {
-                CacheObjectContext cacheObjCtx = ctx.cacheObjects().contextForCache(null, ccfg.getName(), ccfg);
+                CacheObjectContext cacheObjCtx = ctx.cacheObjects().contextForCache(ccfg);
 
                 CachePluginManager pluginMgr = cache2PluginMgr.get(ccfg.getName());
                 
@@ -1433,7 +1432,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
                     ccfg.setNearConfiguration(nearCfg);
             }
 
-            CacheObjectContext cacheObjCtx = ctx.cacheObjects().contextForCache(null, ccfg.getName(), ccfg);
+            CacheObjectContext cacheObjCtx = ctx.cacheObjects().contextForCache(ccfg);
 
             GridCacheContext cacheCtx = createCache(ccfg, null, cacheType, cacheObjCtx);
 
@@ -1725,7 +1724,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
      */
     public IgniteInternalFuture<?> getOrCreateFromTemplate(String cacheName) {
         try {
-            if (publicJCache(cacheName, false, true) != null) // Cache with given name already started.
+            if (publicJCache(cacheName, false) != null) // Cache with given name already started.
                 return new GridFinishedFuture<>();
 
             CacheConfiguration cfg = createConfigFromTemplate(cacheName);
@@ -1889,7 +1888,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
                 try {
                     CacheConfiguration cfg = new CacheConfiguration(ccfg);
 
-                    CacheObjectContext cacheObjCtx = ctx.cacheObjects().contextForCache(null, cfg.getName(), cfg);
+                    CacheObjectContext cacheObjCtx = ctx.cacheObjects().contextForCache(cfg);
 
                     initialize(cfg, cacheObjCtx);
 
@@ -2524,22 +2523,21 @@ public class GridCacheProcessor extends GridProcessorAdapter {
      * @throws IgniteCheckedException If failed.
      */
     public <K, V> IgniteCache<K, V> publicJCache(@Nullable String cacheName) throws IgniteCheckedException {
-        return publicJCache(cacheName, true, true);
+        return publicJCache(cacheName, true);
     }
 
     /**
      * @param cacheName Cache name.
      * @param failIfNotStarted If {@code true} throws {@link IllegalArgumentException} if cache is not started,
      *        otherwise returns {@code null} in this case.
-     * @param failIfSys Fail is cache is system.
      * @param <K> type of keys.
      * @param <V> type of values.
      * @return Cache instance for given name.
      * @throws IgniteCheckedException If failed.
      */
-    @SuppressWarnings("unchecked")
-    @Nullable public <K, V> IgniteCache<K, V> publicJCache(@Nullable String cacheName, boolean failIfNotStarted,
-        boolean failIfSys) throws IgniteCheckedException
+    @SuppressWarnings({"unchecked", "ConstantConditions"})
+    @Nullable public <K, V> IgniteCache<K, V> publicJCache(@Nullable String cacheName, boolean failIfNotStarted)
+        throws IgniteCheckedException
     {
         if (log.isDebugEnabled())
             log.debug("Getting public cache for name: " + cacheName);
@@ -2550,7 +2548,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
 
         DynamicCacheDescriptor desc = registeredCaches.get(masked);
 
-        if (desc != null && !desc.cacheType().userCache() && failIfSys)
+        if (desc != null && !desc.cacheType().userCache())
             throw new IllegalStateException("Failed to get cache because it is a system cache: " + cacheName);
 
         if (cache == null) {
@@ -2589,6 +2587,21 @@ public class GridCacheProcessor extends GridProcessorAdapter {
     }
 
     /**
+     * Get configuration for the given cache.
+     *
+     * @param name Cache name.
+     * @return Cache configuration.
+     */
+    public CacheConfiguration cacheConfiguration(String name) {
+        DynamicCacheDescriptor desc = registeredCaches.get(maskNull(name));
+
+        if (desc == null || desc.cancelled())
+            throw new IllegalStateException("Cache doesn't exist: " + name);
+        else
+            return desc.cacheConfiguration();
+    }
+
+    /**
      * @param cacheCfg Cache configuration template.
      * @throws IgniteCheckedException If failed.
      */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7fa0a9a/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessor.java
index 358ef1a..a04692d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessor.java
@@ -116,12 +116,9 @@ public interface IgniteCacheObjectProcessor extends GridProcessor {
     public Object unmarshal(CacheObjectContext ctx, byte[] bytes, ClassLoader clsLdr) throws IgniteCheckedException;
 
     /**
-     * @param node Node.
-     * @param cacheName Cache name.
      * @return Cache object context.
      */
-    public CacheObjectContext contextForCache(ClusterNode node, @Nullable String cacheName,
-        @Nullable CacheConfiguration ccfg);
+    public CacheObjectContext contextForCache(CacheConfiguration ccfg);
 
     /**
      * @param ctx Cache context.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7fa0a9a/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessorImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessorImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessorImpl.java
index 95fb9f7..3e02acd 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessorImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessorImpl.java
@@ -19,7 +19,6 @@ package org.apache.ignite.internal.processors.cacheobject;
 
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
-import org.apache.ignite.cluster.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.*;
@@ -186,26 +185,19 @@ public class IgniteCacheObjectProcessorImpl extends GridProcessorAdapter impleme
     }
 
     /** {@inheritDoc} */
-    @Override public CacheObjectContext contextForCache(ClusterNode node, @Nullable String cacheName,
-        @Nullable CacheConfiguration ccfg) {
-        if (ccfg != null) {
-            CacheMemoryMode memMode = ccfg.getMemoryMode();
-
-            boolean storeVal = ctx.config().isPeerClassLoadingEnabled() ||
-                GridQueryProcessor.isEnabled(ccfg) ||
-                !ccfg.isCopyOnRead();
-
-            return new CacheObjectContext(ctx,
-                new GridCacheDefaultAffinityKeyMapper(),
-                ccfg.isCopyOnRead() && memMode == ONHEAP_TIERED,
-                storeVal);
-        }
-        else
-            return new CacheObjectContext(
-                ctx,
-                new GridCacheDefaultAffinityKeyMapper(),
-                false,
-                ctx.config().isPeerClassLoadingEnabled());
+    @Override public CacheObjectContext contextForCache(CacheConfiguration ccfg) {
+        assert ccfg != null;
+
+        CacheMemoryMode memMode = ccfg.getMemoryMode();
+
+        boolean storeVal = ctx.config().isPeerClassLoadingEnabled() ||
+            GridQueryProcessor.isEnabled(ccfg) ||
+            !ccfg.isCopyOnRead();
+
+        return new CacheObjectContext(ctx,
+            ccfg.getAffinityMapper() != null ? ccfg.getAffinityMapper() : new GridCacheDefaultAffinityKeyMapper(),
+            ccfg.isCopyOnRead() && memMode == ONHEAP_TIERED,
+            storeVal);
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7fa0a9a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImpl.java
index 2b470f6..a03a925 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImpl.java
@@ -19,6 +19,7 @@ package org.apache.ignite.internal.processors.datastreamer;
 
 import org.apache.ignite.*;
 import org.apache.ignite.cluster.*;
+import org.apache.ignite.configuration.*;
 import org.apache.ignite.events.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.cluster.*;
@@ -180,12 +181,9 @@ public class DataStreamerImpl<K, V> implements IgniteDataStreamer<K, V>, Delayed
         if (log == null)
             log = U.logger(ctx, logRef, DataStreamerImpl.class);
 
-        ClusterNode node = F.first(ctx.grid().cluster().forCacheNodes(cacheName).nodes());
-
-        if (node == null)
-            throw new IllegalStateException("Cache doesn't exist: " + cacheName);
+        CacheConfiguration ccfg = ctx.cache().cacheConfiguration(cacheName);
 
-        this.cacheObjCtx = ctx.cacheObjects().contextForCache(node, cacheName, null);
+        this.cacheObjCtx = ctx.cacheObjects().contextForCache(ccfg);
         this.cacheName = cacheName;
         this.flushQ = flushQ;
 


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

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


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

Branch: refs/heads/ignite-674
Commit: 6cba5507dad2c0ac9f13b2d2b39b71890f506fc8
Parents: 151f970 845787c
Author: Alexey Goncharuk <ag...@gridgain.com>
Authored: Thu Apr 9 18:08:40 2015 -0700
Committer: Alexey Goncharuk <ag...@gridgain.com>
Committed: Thu Apr 9 18:08:40 2015 -0700

----------------------------------------------------------------------
 DEVNOTES.txt                                    |   4 +-
 .../examples/datagrid/CacheAffinityExample.java |   9 +-
 .../examples/datagrid/CacheApiExample.java      |   9 +-
 .../examples/datagrid/CacheAsyncApiExample.java |   9 +-
 .../datagrid/CacheContinuousQueryExample.java   |   8 +-
 .../datagrid/CacheDataStreamerExample.java      |   9 +-
 .../examples/datagrid/CacheEventsExample.java   |   9 +-
 .../examples/datagrid/CachePutGetExample.java   |  10 +-
 .../datagrid/CacheTransactionExample.java       |   8 +-
 .../hibernate/HibernateL2CacheExample.java      |   5 +-
 .../starschema/CacheStarSchemaExample.java      |  10 +-
 .../store/auto/CacheAutoStoreExample.java       |   8 +-
 .../auto/CacheAutoStoreLoadDataExample.java     |   5 +-
 .../datagrid/store/auto/CacheConfig.java        |   4 +-
 .../store/dummy/CacheDummyStoreExample.java     |   5 +-
 .../hibernate/CacheHibernateStoreExample.java   |   5 +-
 .../store/jdbc/CacheJdbcStoreExample.java       |   5 +-
 .../datastructures/IgniteQueueExample.java      |  28 +-
 .../datastructures/IgniteSetExample.java        |  30 +-
 .../streaming/StreamVisitorExample.java         |   5 +-
 .../src/main/java/org/apache/ignite/Ignite.java |  26 +
 .../java/org/apache/ignite/IgniteCache.java     |   6 +-
 .../java/org/apache/ignite/IgniteCluster.java   |  11 +-
 .../ignite/cluster/ClusterStartNodeResult.java  |  46 +
 .../configuration/CacheConfiguration.java       |  20 +-
 .../configuration/CollectionConfiguration.java  | 114 ++-
 .../ignite/internal/ClusterMetricsSnapshot.java | 388 +++------
 .../ignite/internal/GridPluginContext.java      |  15 +-
 .../apache/ignite/internal/IgniteKernal.java    |  68 +-
 .../org/apache/ignite/internal/IgnitionEx.java  | 171 ++--
 .../ignite/internal/MarshallerContextImpl.java  |   3 +
 .../cluster/ClusterStartNodeResultImpl.java     |  87 ++
 .../cluster/IgniteClusterAsyncImpl.java         |   5 +-
 .../internal/cluster/IgniteClusterImpl.java     |  37 +-
 .../internal/managers/GridManagerAdapter.java   |  34 +-
 .../affinity/GridAffinityProcessor.java         |   5 +-
 .../cache/DynamicCacheChangeRequest.java        |  19 +-
 .../cache/DynamicCacheDescriptor.java           |  17 +-
 .../processors/cache/GridCacheAdapter.java      |  84 +-
 .../processors/cache/GridCacheIoManager.java    |  89 +-
 .../processors/cache/GridCacheMessage.java      |   7 +
 .../GridCachePartitionExchangeManager.java      | 136 ++-
 .../processors/cache/GridCacheProcessor.java    | 422 +++++++--
 .../cache/GridCacheProjectionImpl.java          |   2 +-
 .../processors/cache/GridCacheProxyImpl.java    |   2 +-
 .../cache/GridLoadCacheCloseablePredicate.java  |  30 +
 .../dht/GridDhtAffinityAssignmentRequest.java   |   5 +
 .../dht/GridDhtAffinityAssignmentResponse.java  |   5 +
 .../distributed/dht/GridDhtCacheAdapter.java    |  22 +-
 .../distributed/dht/GridDhtLockFuture.java      |  11 +-
 .../distributed/dht/GridDhtTxLocalAdapter.java  |  49 +-
 .../distributed/dht/GridDhtTxPrepareFuture.java |   2 +-
 .../GridDhtPartitionsAbstractMessage.java       |  15 +-
 .../GridDhtPartitionsExchangeFuture.java        |   1 +
 .../cache/query/GridCacheQueriesImpl.java       |   2 +-
 .../continuous/CacheContinuousQueryManager.java |  28 -
 .../cache/transactions/IgniteTxManager.java     |   6 +-
 .../cache/version/GridCacheVersionEx.java       |   2 +-
 .../cacheobject/IgniteCacheObjectProcessor.java |   5 +-
 .../IgniteCacheObjectProcessorImpl.java         |  36 +-
 .../datastreamer/DataStreamerImpl.java          |   8 +-
 .../CacheDataStructuresCacheKey.java            |  62 ++
 .../CacheDataStructuresConfigurationKey.java    |   2 +-
 .../datastructures/DataStructuresProcessor.java | 222 ++++-
 .../datastructures/GridCacheQueueAdapter.java   |   2 +-
 .../plugin/IgnitePluginProcessor.java           |  58 +-
 .../ignite/internal/util/lang/GridFunc.java     |  33 +
 .../util/lang/GridMetadataAwareAdapter.java     |   2 +-
 .../util/nodestart/IgniteNodeCallable.java      |  30 -
 .../util/nodestart/IgniteSshHelper.java         |   2 +-
 .../util/nodestart/StartNodeCallable.java       |  30 +
 .../ignite/internal/visor/cache/VisorCache.java |   2 +-
 .../cache/VisorCacheAggregatedMetrics.java      |  38 +-
 .../visor/cache/VisorCacheConfiguration.java    |  17 +-
 .../internal/visor/cache/VisorCacheMetrics.java |  53 +-
 .../cache/VisorCacheMetricsCollectorTask.java   |  59 +-
 .../visor/cache/VisorCacheStopTask.java         |  69 ++
 .../ignite/plugin/CachePluginConfiguration.java |   2 +-
 .../org/apache/ignite/plugin/IgnitePlugin.java  |   3 -
 .../ignite/plugin/PluginConfiguration.java      |  10 +-
 .../org/apache/ignite/plugin/PluginContext.java |   7 +-
 .../apache/ignite/plugin/PluginProvider.java    |   4 +-
 .../communication/tcp/TcpCommunicationSpi.java  |   2 +-
 .../discovery/tcp/TcpDiscoverySpiAdapter.java   |   2 +-
 .../messages/TcpDiscoveryAbstractMessage.java   |  24 +-
 .../messages/TcpDiscoveryAuthFailedMessage.java |  25 +-
 .../TcpDiscoveryCheckFailedMessage.java         |  24 +-
 .../TcpDiscoveryClientReconnectMessage.java     |  30 +-
 .../TcpDiscoveryCustomEventMessage.java         |  23 +-
 .../messages/TcpDiscoveryDiscardMessage.java    |  24 +-
 .../TcpDiscoveryDuplicateIdMessage.java         |  24 +-
 .../messages/TcpDiscoveryHandshakeRequest.java  |   8 -
 .../messages/TcpDiscoveryHandshakeResponse.java |  22 -
 .../messages/TcpDiscoveryHeartbeatMessage.java  |  44 +-
 .../TcpDiscoveryJoinRequestMessage.java         |  28 +-
 .../TcpDiscoveryLoopbackProblemMessage.java     |  28 +-
 .../TcpDiscoveryNodeAddFinishedMessage.java     |  24 +-
 .../messages/TcpDiscoveryNodeAddedMessage.java  |  60 +-
 .../messages/TcpDiscoveryNodeFailedMessage.java |  28 +-
 .../messages/TcpDiscoveryNodeLeftMessage.java   |   8 -
 .../tcp/messages/TcpDiscoveryPingRequest.java   |  25 +-
 .../tcp/messages/TcpDiscoveryPingResponse.java  |  14 -
 .../TcpDiscoveryStatusCheckMessage.java         |  30 +-
 .../resources/META-INF/classnames.properties    |  19 +-
 .../GridCacheAffinityBackupsSelfTest.java       |  15 +-
 .../cache/GridCacheAbstractFullApiSelfTest.java |  13 +-
 .../GridCacheAbstractIteratorsSelfTest.java     |   3 +-
 .../cache/GridCacheAbstractSelfTest.java        |  10 +-
 .../cache/GridCacheClearAllSelfTest.java        |   2 +-
 .../cache/GridCacheDeploymentSelfTest.java      |   9 +-
 .../GridCachePreloadingEvictionsSelfTest.java   |  23 +-
 .../cache/GridCacheSwapPreloadSelfTest.java     |   5 +-
 ...teCacheConfigurationDefaultTemplateTest.java | 111 +++
 .../IgniteCacheConfigurationTemplateTest.java   | 448 ++++++++++
 .../cache/IgniteCachePeekModesAbstractTest.java |  40 +-
 ...actQueueFailoverDataConsistencySelfTest.java |   4 +-
 .../GridCacheQueueApiSelfAbstractTest.java      |  80 ++
 .../GridCacheQueueCleanupSelfTest.java          |  11 +-
 ...dCacheQueueMultiNodeConsistencySelfTest.java |  11 +-
 .../GridCacheSetAbstractSelfTest.java           |   5 +-
 .../IgniteCollectionAbstractTest.java           | 160 +---
 .../IgniteDataStructureUniqueNameTest.java      |  47 +-
 .../GridCacheLocalAtomicOffheapSetSelfTest.java |  32 +
 .../GridCacheLocalAtomicQueueApiSelfTest.java   |   6 +
 .../local/GridCacheLocalAtomicSetSelfTest.java  |   6 +
 .../GridCacheLocalOffheapQueueApiSelfTest.java  |  31 +
 .../local/GridCacheLocalQueueApiSelfTest.java   |   6 +
 .../local/GridCacheLocalSetSelfTest.java        |   6 +
 ...artitionedAtomicOffheapQueueApiSelfTest.java |  32 +
 ...omicOffheapQueueCreateMultiNodeSelfTest.java |  32 +
 ...onedAtomicOffheapQueueMultiNodeSelfTest.java |  32 +
 ...dCachePartitionedAtomicQueueApiSelfTest.java |   6 +
 ...ionedAtomicQueueCreateMultiNodeSelfTest.java |   6 +
 ...micQueueFailoverDataConsistencySelfTest.java |   6 +
 ...PartitionedAtomicQueueMultiNodeSelfTest.java |   6 +
 ...itionedAtomicQueueRotativeMultiNodeTest.java |   6 +
 ...chePartitionedAtomicSetFailoverSelfTest.java |   6 +
 ...rtitionedDataStructuresFailoverSelfTest.java |   6 +
 ...artitionedOffHeapValuesQueueApiSelfTest.java |  31 +
 ...achePartitionedOffHeapValuesSetSelfTest.java |  32 +
 ...edOffheapDataStructuresFailoverSelfTest.java |  34 +
 ...hePartitionedOffheapSetFailoverSelfTest.java |  32 +
 .../GridCachePartitionedQueueApiSelfTest.java   |   6 +
 ...PartitionedQueueCreateMultiNodeSelfTest.java |   6 +
 ...dCachePartitionedQueueEntryMoveSelfTest.java |  10 +-
 ...nedQueueFailoverDataConsistencySelfTest.java |   6 +
 ...CachePartitionedQueueJoinedNodeSelfTest.java |   6 +
 ...dCachePartitionedQueueMultiNodeSelfTest.java |   6 +
 ...hePartitionedQueueRotativeMultiNodeTest.java |   6 +
 ...GridCachePartitionedSetFailoverSelfTest.java |   6 +
 .../GridCachePartitionedSetSelfTest.java        |   6 +
 .../IgnitePartitionedSetNoBackupsSelfTest.java  |   5 +-
 ...eplicatedDataStructuresFailoverSelfTest.java |   6 +
 .../GridCacheReplicatedQueueApiSelfTest.java    |  11 +
 ...idCacheReplicatedQueueMultiNodeSelfTest.java |   6 +
 ...cheReplicatedQueueRotativeMultiNodeTest.java |   6 +
 .../GridCacheReplicatedSetSelfTest.java         |   6 +
 .../GridCacheMultiNodeAbstractTest.java         |  13 +-
 .../IgniteCacheAtomicNodeJoinTest.java          |  44 +
 .../IgniteCacheNodeJoinAbstractTest.java        | 109 +++
 .../distributed/IgniteCacheTxNodeJoinTest.java  |  38 +
 .../dht/GridCacheDhtEntrySelfTest.java          |  12 +-
 .../dht/GridCacheDhtPreloadUnloadSelfTest.java  |   2 +-
 .../near/GridCacheNearMultiNodeSelfTest.java    |  26 +-
 ...idCacheNearOnlyMultiNodeFullApiSelfTest.java |   2 +-
 ...achePartitionedMultiNodeFullApiSelfTest.java |   6 +-
 .../near/IgniteCacheNearReadCommittedTest.java  |   4 +-
 ...CacheReplicatedPreloadLifecycleSelfTest.java |   5 +-
 .../GridCacheReplicatedPreloadSelfTest.java     |  23 +-
 .../ignite/testframework/junits/IgniteMock.java |  15 +
 .../junits/common/GridCommonAbstractTest.java   |  13 +-
 .../IgniteCacheDataStructuresSelfTestSuite.java |  10 +
 .../IgniteCacheFailoverTestSuite.java           |   4 +
 .../ignite/testsuites/IgniteCacheTestSuite.java |   5 +-
 .../processors/query/h2/sql/GridSqlElement.java |   8 -
 .../processors/query/h2/sql/GridSqlQuery.java   | 183 ++++
 .../query/h2/sql/GridSqlQueryParser.java        | 121 ++-
 .../query/h2/sql/GridSqlQuerySplitter.java      | 111 ++-
 .../processors/query/h2/sql/GridSqlSelect.java  | 209 ++---
 .../query/h2/sql/GridSqlSubquery.java           |   8 +-
 .../processors/query/h2/sql/GridSqlUnion.java   | 134 +++
 .../h2/twostep/GridReduceQueryExecutor.java     |   2 +-
 ...CacheOffheapTieredMultithreadedSelfTest.java |   4 +-
 .../cache/ttl/CacheTtlAbstractSelfTest.java     |  14 +-
 .../h2/sql/AbstractH2CompareQueryTest.java      | 352 ++++++++
 .../query/h2/sql/BaseH2CompareQueryTest.java    | 836 ++++++++++++++++++
 .../query/h2/sql/GridQueryParsingTest.java      |  26 +-
 .../query/h2/sql/H2CompareBigQueryTest.java     | 677 +++++++++++++++
 .../query/h2/sql/IgniteVsH2QueryTest.java       | 860 -------------------
 .../IgniteCacheQuerySelfTestSuite.java          |   6 +-
 .../processors/query/h2/sql/bigQuery.sql        |  55 ++
 .../org/apache/ignite/IgniteSpringBean.java     |  21 +
 .../util/nodestart/IgniteNodeCallableImpl.java  | 308 -------
 .../util/nodestart/IgniteSshHelperImpl.java     |   4 +-
 .../util/nodestart/StartNodeCallableImpl.java   | 309 +++++++
 ...gniteProjectionStartStopRestartSelfTest.java | 261 +++---
 .../IgniteStartStopRestartTestSuite.java        |   1 +
 .../ignite/tools/javadoc/IgniteLinkTaglet.java  |  20 +-
 modules/urideploy/README.txt                    |   2 +-
 modules/urideploy/licenses/edtftp-license.pdf   | Bin 58355 -> 0 bytes
 modules/urideploy/licenses/jtidy-license.txt    |  50 --
 .../urideploy/licenses/jtidy-mit-license.txt    |  50 ++
 modules/urideploy/pom.xml                       |   6 -
 .../spi/deployment/uri/UriDeploymentSpi.java    | 182 ++--
 .../uri/scanners/GridUriDeploymentScanner.java  | 286 ------
 .../GridUriDeploymentScannerListener.java       |   2 +-
 .../uri/scanners/UriDeploymentScanner.java      |  47 +
 .../scanners/UriDeploymentScannerContext.java   |  92 ++
 .../scanners/UriDeploymentScannerManager.java   | 221 +++++
 .../file/GridUriDeploymentFileScanner.java      | 311 -------
 .../scanners/file/UriDeploymentFileScanner.java | 327 +++++++
 .../ftp/GridUriDeploymentFtpClient.java         | 199 -----
 .../ftp/GridUriDeploymentFtpConfiguration.java  | 115 ---
 .../ftp/GridUriDeploymentFtpException.java      |  43 -
 .../scanners/ftp/GridUriDeploymentFtpFile.java  | 119 ---
 .../ftp/GridUriDeploymentFtpScanner.java        | 234 -----
 .../uri/scanners/ftp/package-info.java          |  22 -
 .../http/GridUriDeploymentHttpScanner.java      | 423 ---------
 .../scanners/http/UriDeploymentHttpScanner.java | 478 +++++++++++
 ...loymentMultiScannersErrorThrottlingTest.java |   3 -
 .../GridUriDeploymentMultiScannersSelfTest.java |   3 +-
 .../GridFileDeploymentUndeploySelfTest.java     |   4 +-
 .../uri/scanners/ftp/GridFtpDeploymentTest.java |  46 -
 .../uri/scanners/ftp/package-info.java          |  22 -
 .../commands/cache/VisorCacheClearCommand.scala |   3 +-
 .../commands/cache/VisorCacheCommand.scala      | 423 +++++----
 .../commands/cache/VisorCacheStopCommand.scala  | 145 ++++
 .../commands/start/VisorStartCommand.scala      |   4 +-
 .../scala/org/apache/ignite/visor/visor.scala   |  15 +-
 229 files changed, 8188 insertions(+), 5448 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6cba5507/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6cba5507/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6cba5507/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocalAdapter.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6cba5507/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6cba5507/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
----------------------------------------------------------------------

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

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6cba5507/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java
----------------------------------------------------------------------


[13/50] [abbrv] incubator-ignite git commit: # ignite-sprint-3 correction for ignite-680

Posted by ag...@apache.org.
# ignite-sprint-3 correction for ignite-680


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

Branch: refs/heads/ignite-674
Commit: 3e6da9cda37c094167ec7bad604c3f9baf631fc6
Parents: 9d183c5
Author: sboikov <sb...@gridgain.com>
Authored: Thu Apr 9 09:50:42 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Thu Apr 9 10:11:35 2015 +0300

----------------------------------------------------------------------
 .../src/main/java/org/apache/ignite/Ignite.java |  11 ++
 .../apache/ignite/internal/IgniteKernal.java    |  19 ++-
 .../cache/DynamicCacheChangeRequest.java        |   2 +-
 .../processors/cache/GridCacheProcessor.java    | 119 +++++++++++--------
 ...teCacheConfigurationDefaultTemplateTest.java | 111 +++++++++++++++++
 ...eCacheConfigurationTemplateNotFoundTest.java | 114 ------------------
 .../IgniteCacheConfigurationTemplateTest.java   |  86 +++++++++++++-
 .../ignite/testframework/junits/IgniteMock.java |   5 +
 .../ignite/testsuites/IgniteCacheTestSuite.java |   2 +-
 .../org/apache/ignite/IgniteSpringBean.java     |   7 ++
 10 files changed, 309 insertions(+), 167 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3e6da9cd/modules/core/src/main/java/org/apache/ignite/Ignite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/Ignite.java b/modules/core/src/main/java/org/apache/ignite/Ignite.java
index 6b49add..40c9bbb 100644
--- a/modules/core/src/main/java/org/apache/ignite/Ignite.java
+++ b/modules/core/src/main/java/org/apache/ignite/Ignite.java
@@ -217,6 +217,17 @@ public interface Ignite extends AutoCloseable {
     public <K, V> IgniteCache<K, V> createCache(CacheConfiguration<K, V> cacheCfg);
 
     /**
+     * Dynamically starts new cache using template configuration.
+     * <p>
+     * If local node is an affinity node, this method will return the instance of started cache.
+     * Otherwise, it will create a client cache on local node.
+     *
+     * @param cacheName Cache name.
+     * @return Instance of started cache.
+     */
+    public <K, V> IgniteCache<K, V> createCache(String cacheName);
+
+    /**
      * Gets existing cache with the given name or creates new one with the given configuration.
      *
      * @param cacheCfg Cache configuration to use.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3e6da9cd/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 768bbd3..0db2ad6 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
@@ -2282,6 +2282,23 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable {
     }
 
     /** {@inheritDoc} */
+    @Override public <K, V> IgniteCache<K, V> createCache(String cacheName) {
+        guard();
+
+        try {
+            ctx.cache().createFromTemplate(cacheName).get();
+
+            return ctx.cache().publicJCache(cacheName);
+        }
+        catch (IgniteCheckedException e) {
+            throw CU.convertToCacheException(e);
+        }
+        finally {
+            unguard();
+        }
+    }
+
+    /** {@inheritDoc} */
     @Override public <K, V> IgniteCache<K, V> getOrCreateCache(CacheConfiguration<K, V> cacheCfg) {
         A.notNull(cacheCfg, "cacheCfg");
 
@@ -2409,7 +2426,7 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable {
         guard();
 
         try {
-            ctx.cache().dynamicStartCache(cacheName).get();
+            ctx.cache().getOrCreateFromTemplate(cacheName).get();
 
             return ctx.cache().publicJCache(cacheName);
         }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3e6da9cd/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/DynamicCacheChangeRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/DynamicCacheChangeRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/DynamicCacheChangeRequest.java
index bd53cdb..c08a179 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/DynamicCacheChangeRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/DynamicCacheChangeRequest.java
@@ -119,7 +119,7 @@ public class DynamicCacheChangeRequest implements Serializable {
      * @return {@code True} if this is a start request.
      */
     public boolean start() {
-        return startCfg != null;
+        return !template && startCfg != null;
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3e6da9cd/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
index 35cfd0c..f0db73e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
@@ -1365,7 +1365,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
     ) throws IgniteCheckedException {
         for (DynamicCacheChangeRequest req : reqs) {
             assert req.start() : req;
-            assert req.cacheType() != null : req.cacheType();
+            assert req.cacheType() != null : req;
 
             prepareCacheStart(
                 req.startCacheConfiguration(),
@@ -1711,81 +1711,102 @@ public class GridCacheProcessor extends GridProcessorAdapter {
      * @param cacheName Cache name.
      * @return Future that will be completed when cache is deployed.
      */
-    public IgniteInternalFuture<?> dynamicStartCache(String cacheName) {
+    public IgniteInternalFuture<?> createFromTemplate(String cacheName) {
+        CacheConfiguration cfg = createConfigFromTemplate(cacheName);
+
+        return dynamicStartCache(cfg, cacheName, null, true);
+    }
+
+    /**
+     * Dynamically starts cache using template configuration.
+     *
+     * @param cacheName Cache name.
+     * @return Future that will be completed when cache is deployed.
+     */
+    public IgniteInternalFuture<?> getOrCreateFromTemplate(String cacheName) {
         try {
             if (publicJCache(cacheName, false, true) != null) // Cache with given name already started.
                 return new GridFinishedFuture<>();
 
-            CacheConfiguration cfgTemplate = null;
+            CacheConfiguration cfg = createConfigFromTemplate(cacheName);
 
-            CacheConfiguration dfltCacheCfg = null;
+            return dynamicStartCache(cfg, cacheName, null, false);
+        }
+        catch (IgniteCheckedException e) {
+            return new GridFinishedFuture<>(e);
+        }
+    }
 
-            List<CacheConfiguration> wildcardNameCfgs = null;
+    /**
+     * @param cacheName Cache name.
+     * @return Cache configuration.
+     */
+    private CacheConfiguration createConfigFromTemplate(String cacheName) {
+        CacheConfiguration cfgTemplate = null;
 
-            for (DynamicCacheDescriptor desc : registeredTemplates.values()) {
-                assert desc.template();
+        CacheConfiguration dfltCacheCfg = null;
 
-                CacheConfiguration cfg = desc.cacheConfiguration();
+        List<CacheConfiguration> wildcardNameCfgs = null;
 
-                assert cfg != null;
+        for (DynamicCacheDescriptor desc : registeredTemplates.values()) {
+            assert desc.template();
 
-                if (F.eq(cacheName, cfg.getName())) {
-                    cfgTemplate = cfg;
+            CacheConfiguration cfg = desc.cacheConfiguration();
 
-                    break;
-                }
+            assert cfg != null;
 
-                if (cfg.getName() != null ) {
-                    if (cfg.getName().endsWith("*")) {
-                        if (cfg.getName().length() > 1) {
-                            if (wildcardNameCfgs == null)
-                                wildcardNameCfgs = new ArrayList<>();
+            if (F.eq(cacheName, cfg.getName())) {
+                cfgTemplate = cfg;
 
-                            wildcardNameCfgs.add(cfg);
-                        }
-                        else
-                            dfltCacheCfg = cfg; // Template with name '*'.
+                break;
+            }
+
+            if (cfg.getName() != null ) {
+                if (cfg.getName().endsWith("*")) {
+                    if (cfg.getName().length() > 1) {
+                        if (wildcardNameCfgs == null)
+                            wildcardNameCfgs = new ArrayList<>();
+
+                        wildcardNameCfgs.add(cfg);
                     }
+                    else
+                        dfltCacheCfg = cfg; // Template with name '*'.
                 }
-                else if (dfltCacheCfg == null)
-                    dfltCacheCfg = cfg;
             }
+            else if (dfltCacheCfg == null)
+                dfltCacheCfg = cfg;
+        }
 
-            if (cfgTemplate == null && cacheName != null && wildcardNameCfgs != null) {
-                Collections.sort(wildcardNameCfgs, new Comparator<CacheConfiguration>() {
-                    @Override public int compare(CacheConfiguration cfg1, CacheConfiguration cfg2) {
-                        Integer len1 = cfg1.getName() != null ? cfg1.getName().length() : 0;
-                        Integer len2 = cfg2.getName() != null ? cfg2.getName().length() : 0;
+        if (cfgTemplate == null && cacheName != null && wildcardNameCfgs != null) {
+            Collections.sort(wildcardNameCfgs, new Comparator<CacheConfiguration>() {
+                @Override public int compare(CacheConfiguration cfg1, CacheConfiguration cfg2) {
+                    Integer len1 = cfg1.getName() != null ? cfg1.getName().length() : 0;
+                    Integer len2 = cfg2.getName() != null ? cfg2.getName().length() : 0;
 
-                        return len2.compareTo(len1);
-                    }
-                });
+                    return len2.compareTo(len1);
+                }
+            });
 
-                for (CacheConfiguration cfg : wildcardNameCfgs) {
-                    if (cacheName.startsWith(cfg.getName().substring(0, cfg.getName().length() - 1))) {
-                        cfgTemplate = cfg;
+            for (CacheConfiguration cfg : wildcardNameCfgs) {
+                if (cacheName.startsWith(cfg.getName().substring(0, cfg.getName().length() - 1))) {
+                    cfgTemplate = cfg;
 
-                        break;
-                    }
+                    break;
                 }
             }
+        }
 
-            if (cfgTemplate == null)
-                cfgTemplate = dfltCacheCfg;
+        if (cfgTemplate == null)
+            cfgTemplate = dfltCacheCfg;
 
-            if (cfgTemplate == null)
-                throw new IllegalArgumentException("Failed to start cache " +
-                    "(there is no matching template configuration) : " + cacheName);
+        if (cfgTemplate == null)
+            cfgTemplate = new CacheConfiguration();
 
-            CacheConfiguration cfg = new CacheConfiguration(cfgTemplate);
+        CacheConfiguration cfg = new CacheConfiguration(cfgTemplate);
 
-            cfg.setName(cacheName);
+        cfg.setName(cacheName);
 
-            return dynamicStartCache(cfg, cacheName, null, false);
-        }
-        catch (IgniteCheckedException e) {
-            return new GridFinishedFuture<>(e);
-        }
+        return cfg;
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3e6da9cd/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigurationDefaultTemplateTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigurationDefaultTemplateTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigurationDefaultTemplateTest.java
new file mode 100644
index 0000000..0aa9683
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigurationDefaultTemplateTest.java
@@ -0,0 +1,111 @@
+/*
+ * 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;
+
+import org.apache.ignite.*;
+import org.apache.ignite.configuration.*;
+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.*;
+
+/**
+ *
+ */
+public class IgniteCacheConfigurationDefaultTemplateTest extends GridCommonAbstractTest {
+    /** */
+    private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
+
+    /** {@inheritDoc} */
+    @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
+        IgniteConfiguration cfg = super.getConfiguration(gridName);
+
+        ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setIpFinder(ipFinder);
+
+        CacheConfiguration templateCfg = new CacheConfiguration();
+
+        templateCfg.setName("org.apache.ignite.template*");
+        templateCfg.setBackups(3);
+
+        cfg.setCacheConfiguration(templateCfg);
+
+        return cfg;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void afterTest() throws Exception {
+        super.afterTest();
+
+        stopAllGrids();
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testDefaultTemplate() throws Exception {
+        Ignite ignite = startGrid(0);
+
+        checkDefaultTemplate(ignite, "org.apache.ignite");
+
+        checkDefaultTemplate(ignite, "org.apache.ignite.templat");
+
+        checkDefaultTemplate(ignite, null);
+
+        checkGetOrCreate(ignite, "org.apache.ignite.template", 3);
+
+        CacheConfiguration templateCfg = new CacheConfiguration();
+
+        templateCfg.setBackups(4);
+
+        ignite.addCacheConfiguration(templateCfg);
+
+        checkGetOrCreate(ignite, "org.apache.ignite2", 4);
+    }
+
+    /**
+     * @param ignite Ignite.
+     * @param cacheName Cache name.
+     */
+    private void checkDefaultTemplate(final Ignite ignite, final String cacheName) {
+        checkGetOrCreate(ignite, cacheName, 0);
+
+        IgniteCache cache = ignite.getOrCreateCache(cacheName);
+
+        assertNotNull(cache);
+
+        CacheConfiguration cfg = (CacheConfiguration)cache.getConfiguration(CacheConfiguration.class);
+
+        assertEquals(CacheConfiguration.DFLT_CACHE_ATOMICITY_MODE, cfg.getAtomicityMode());
+    }
+
+    /**
+     * @param ignite Ignite.
+     * @param name Cache name.
+     * @param expBackups Expected number of backups.
+     */
+    private void checkGetOrCreate(Ignite ignite, String name, int expBackups) {
+        IgniteCache cache = ignite.getOrCreateCache(name);
+
+        assertNotNull(cache);
+
+        CacheConfiguration cfg = (CacheConfiguration)cache.getConfiguration(CacheConfiguration.class);
+
+        assertEquals(name, cfg.getName());
+        assertEquals(expBackups, cfg.getBackups());
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3e6da9cd/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigurationTemplateNotFoundTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigurationTemplateNotFoundTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigurationTemplateNotFoundTest.java
deleted file mode 100644
index 53780da..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigurationTemplateNotFoundTest.java
+++ /dev/null
@@ -1,114 +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.processors.cache;
-
-import org.apache.ignite.*;
-import org.apache.ignite.configuration.*;
-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.*;
-import org.apache.ignite.testframework.junits.common.*;
-
-import java.util.concurrent.*;
-
-/**
- *
- */
-public class IgniteCacheConfigurationTemplateNotFoundTest extends GridCommonAbstractTest {
-    /** */
-    private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
-
-    /** {@inheritDoc} */
-    @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
-        IgniteConfiguration cfg = super.getConfiguration(gridName);
-
-        ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setIpFinder(ipFinder);
-
-        CacheConfiguration templateCfg = new CacheConfiguration();
-
-        templateCfg.setName("org.apache.ignite.template*");
-        templateCfg.setBackups(3);
-
-        cfg.setCacheConfiguration(templateCfg);
-
-        return cfg;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected void afterTest() throws Exception {
-        super.afterTest();
-
-        stopAllGrids();
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testTemplateNotFound() throws Exception {
-        Ignite ignite = startGrid(0);
-
-        checkTemplateNotFound(ignite, "org.apache.ignite");
-
-        checkTemplateNotFound(ignite, "org.apache.ignite.templat");
-
-        checkTemplateNotFound(ignite, null);
-
-        checkGetOrCreate(ignite, "org.apache.ignite.template", 3);
-
-        CacheConfiguration templateCfg = new CacheConfiguration();
-
-        templateCfg.setBackups(4);
-
-        ignite.addCacheConfiguration(templateCfg);
-
-        checkGetOrCreate(ignite, "org.apache.ignite", 4);
-
-        checkGetOrCreate(ignite, null, 4);
-    }
-
-    /**
-     * @param ignite Ignite.
-     * @param cacheName Cache name.
-     */
-    private void checkTemplateNotFound(final Ignite ignite, final String cacheName) {
-        GridTestUtils.assertThrows(log, new Callable<Void>() {
-            @Override public Void call() throws Exception {
-                ignite.getOrCreateCache(cacheName);
-
-                return null;
-            }
-        }, IllegalArgumentException.class, null);
-    }
-
-    /**
-     * @param ignite Ignite.
-     * @param name Cache name.
-     * @param expBackups Expected number of backups.
-     */
-    private void checkGetOrCreate(Ignite ignite, String name, int expBackups) {
-        IgniteCache cache = ignite.getOrCreateCache(name);
-
-        assertNotNull(cache);
-
-        CacheConfiguration cfg = (CacheConfiguration)cache.getConfiguration(CacheConfiguration.class);
-
-        assertEquals(name, cfg.getName());
-        assertEquals(expBackups, cfg.getBackups());
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3e6da9cd/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigurationTemplateTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigurationTemplateTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigurationTemplateTest.java
index d0ffab2..a030039 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigurationTemplateTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigurationTemplateTest.java
@@ -18,6 +18,7 @@
 package org.apache.ignite.internal.processors.cache;
 
 import org.apache.ignite.*;
+import org.apache.ignite.cache.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.events.*;
 import org.apache.ignite.lang.*;
@@ -96,7 +97,61 @@ public class IgniteCacheConfigurationTemplateTest extends GridCommonAbstractTest
     /**
      * @throws Exception If failed.
      */
-    public void testCreateFromTemplateConfiguration() throws Exception {
+    public void testCreateFromTemplate() throws Exception {
+        addTemplate = true;
+
+        Ignite ignite0 = startGrid(0);
+
+        checkCreate(ignite0, "org.apache.ignite.test.cache1", 4);
+        checkCreated(ignite0, "org.apache.ignite.test.cache1");
+
+        Ignite ignite1 = startGrid(1);
+
+        checkCreated(ignite1, "org.apache.ignite.test.cache1");
+
+        checkCreate(ignite1, "org.apache.ignite1", 3);
+        checkCreated(ignite1, "org.apache.ignite1");
+
+        checkCreated(ignite0, "org.apache.ignite1");
+
+        checkCreate(ignite0, "org.apache1", 2);
+        checkCreated(ignite0, "org.apache1");
+
+        checkCreated(ignite1, "org.apache1");
+
+        addTemplate = false;
+        clientMode = true;
+
+        Ignite ignite2 = startGrid(2);
+
+        assertNotNull(ignite2.cache("org.apache.ignite.test.cache1"));
+        assertNotNull(ignite2.cache("org.apache.ignite1"));
+        assertNotNull(ignite2.cache("org.apache1"));
+
+        CacheConfiguration template1 = new CacheConfiguration();
+
+        template1.setName(TEMPLATE3);
+        template1.setBackups(5);
+
+        ignite2.addCacheConfiguration(template1);
+
+        checkCreate(ignite0, "org.apache.ignite.test2.cache1", 5);
+
+        checkCreated(ignite0, "org.apache.ignite.test2.cache1");
+        checkCreated(ignite1, "org.apache.ignite.test2.cache1");
+        checkCreated(ignite2, "org.apache.ignite.test2.cache1");
+
+        Ignite ignite3 = startGrid(3);
+
+        checkCreate(ignite3, "org.apache.ignite.test2.cache2", 5);
+
+        checkNoTemplateCaches(4);
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testGetOrCreateFromTemplate() throws Exception {
         addTemplate = true;
 
         Ignite ignite0 = startGrid(0);
@@ -322,6 +377,35 @@ public class IgniteCacheConfigurationTemplateTest extends GridCommonAbstractTest
     }
 
     /**
+     * @param ignite Ignite.
+     * @param name Cache name.
+     * @param expBackups Expected number of backups.
+     */
+    private void checkCreate(final Ignite ignite, final String name, int expBackups) {
+        IgniteCache cache = ignite.createCache(name);
+
+        assertNotNull(cache);
+
+        CacheConfiguration cfg = (CacheConfiguration)cache.getConfiguration(CacheConfiguration.class);
+
+        assertEquals(name, cfg.getName());
+        assertEquals(expBackups, cfg.getBackups());
+    }
+
+    /**
+     * @param cacheName Cache name.
+     */
+    private void checkCreated(final Ignite ignite, final String cacheName) {
+        GridTestUtils.assertThrows(log, new Callable<Void>() {
+            @Override public Void call() throws Exception {
+                ignite.createCache(cacheName);
+
+                return null;
+            }
+        }, CacheExistsException.class, null);
+    }
+
+    /**
      * @param nodes Nodes number.
      */
     private void checkNoTemplateCaches(int nodes) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3e6da9cd/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteMock.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteMock.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteMock.java
index b575544..2451f59 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteMock.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteMock.java
@@ -202,6 +202,11 @@ public class IgniteMock implements Ignite {
     }
 
     /** {@inheritDoc} */
+    @Override public <K, V> IgniteCache<K, V> createCache(String cacheName) {
+        return null;
+    }
+
+    /** {@inheritDoc} */
     @Override public <K, V> void addCacheConfiguration(CacheConfiguration<K, V> cacheCfg) {
         // No-op.
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3e6da9cd/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java
index 649ce0f..01b45f5 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java
@@ -411,7 +411,7 @@ public class IgniteCacheTestSuite extends TestSuite {
         suite.addTestSuite(IgniteDynamicCacheStartSelfTest.class);
         suite.addTestSuite(IgniteCacheDynamicStopSelfTest.class);
         suite.addTestSuite(IgniteCacheConfigurationTemplateTest.class);
-        suite.addTestSuite(IgniteCacheConfigurationTemplateNotFoundTest.class);
+        suite.addTestSuite(IgniteCacheConfigurationDefaultTemplateTest.class);
 
         suite.addTestSuite(GridCacheTxLoadFromStoreOnLockSelfTest.class);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3e6da9cd/modules/spring/src/main/java/org/apache/ignite/IgniteSpringBean.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/main/java/org/apache/ignite/IgniteSpringBean.java b/modules/spring/src/main/java/org/apache/ignite/IgniteSpringBean.java
index cd4fd73..3228210 100644
--- a/modules/spring/src/main/java/org/apache/ignite/IgniteSpringBean.java
+++ b/modules/spring/src/main/java/org/apache/ignite/IgniteSpringBean.java
@@ -283,6 +283,13 @@ public class IgniteSpringBean implements Ignite, DisposableBean, InitializingBea
     }
 
     /** {@inheritDoc} */
+    @Override public <K, V> IgniteCache<K, V> createCache(String cacheName) {
+        assert g != null;
+
+        return g.createCache(cacheName);
+    }
+
+    /** {@inheritDoc} */
     @Override public <K, V> void addCacheConfiguration(CacheConfiguration<K, V> cacheCfg) {
         assert g != null;
 


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

Posted by ag...@apache.org.
Merge remote-tracking branch 'origin/ignite-sprint-3' into ignite-sprint-3


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

Branch: refs/heads/ignite-674
Commit: 245f46765b673d3a45300874781a898c9ad321fd
Parents: 59d9374 fd9cdff
Author: Artem Shutak <as...@gridgain.com>
Authored: Thu Apr 9 13:54:34 2015 +0300
Committer: Artem Shutak <as...@gridgain.com>
Committed: Thu Apr 9 13:54:34 2015 +0300

----------------------------------------------------------------------
 .../ignite/internal/ClusterMetricsSnapshot.java |   2 +-
 .../processors/cache/GridCacheIoManager.java    |  87 +++++++-----
 .../processors/cache/GridCacheMessage.java      |   7 +
 .../GridCachePartitionExchangeManager.java      | 136 ++++++++++++++++++-
 .../dht/GridDhtAffinityAssignmentRequest.java   |   5 +
 .../dht/GridDhtAffinityAssignmentResponse.java  |   5 +
 .../GridDhtPartitionsAbstractMessage.java       |  15 +-
 .../IgniteCacheAtomicNodeJoinTest.java          |  44 ++++++
 .../IgniteCacheNodeJoinAbstractTest.java        | 109 +++++++++++++++
 .../distributed/IgniteCacheTxNodeJoinTest.java  |  38 ++++++
 .../IgniteCacheFailoverTestSuite.java           |   4 +
 11 files changed, 410 insertions(+), 42 deletions(-)
----------------------------------------------------------------------



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

Posted by ag...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-sprint-3' into ignite-707


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

Branch: refs/heads/ignite-674
Commit: 2412422b2e40d27e5dd5a22c778027b41693c511
Parents: 17c94b6 8803e17
Author: sboikov <sb...@gridgain.com>
Authored: Thu Apr 9 12:23:15 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Thu Apr 9 12:23:15 2015 +0300

----------------------------------------------------------------------
 .../examples/datagrid/CacheAffinityExample.java |   9 +-
 .../examples/datagrid/CacheApiExample.java      |   9 +-
 .../examples/datagrid/CacheAsyncApiExample.java |   9 +-
 .../datagrid/CacheContinuousQueryExample.java   |   8 +-
 .../datagrid/CacheDataStreamerExample.java      |   9 +-
 .../examples/datagrid/CacheEventsExample.java   |   9 +-
 .../examples/datagrid/CachePutGetExample.java   |  10 +-
 .../datagrid/CacheTransactionExample.java       |   8 +-
 .../hibernate/HibernateL2CacheExample.java      |   5 +-
 .../starschema/CacheStarSchemaExample.java      |  10 +-
 .../store/auto/CacheAutoStoreExample.java       |   8 +-
 .../auto/CacheAutoStoreLoadDataExample.java     |   5 +-
 .../datagrid/store/auto/CacheConfig.java        |   4 +-
 .../store/dummy/CacheDummyStoreExample.java     |   5 +-
 .../hibernate/CacheHibernateStoreExample.java   |   5 +-
 .../store/jdbc/CacheJdbcStoreExample.java       |   5 +-
 .../streaming/StreamVisitorExample.java         |   5 +-
 .../processors/cache/GridCacheAdapter.java      |  57 ++++----
 .../processors/cache/GridCacheIoManager.java    |  87 +++++++-----
 .../processors/cache/GridCacheMessage.java      |   7 +
 .../GridCachePartitionExchangeManager.java      | 136 ++++++++++++++++++-
 .../cache/GridLoadCacheCloseablePredicate.java  |  30 ++++
 .../dht/GridDhtAffinityAssignmentRequest.java   |   5 +
 .../dht/GridDhtAffinityAssignmentResponse.java  |   5 +
 .../distributed/dht/GridDhtCacheAdapter.java    |  22 ++-
 .../GridDhtPartitionsAbstractMessage.java       |  15 +-
 .../IgniteCacheAtomicNodeJoinTest.java          |  44 ++++++
 .../IgniteCacheNodeJoinAbstractTest.java        | 109 +++++++++++++++
 .../distributed/IgniteCacheTxNodeJoinTest.java  |  38 ++++++
 .../IgniteCacheFailoverTestSuite.java           |   4 +
 30 files changed, 525 insertions(+), 157 deletions(-)
----------------------------------------------------------------------



[48/50] [abbrv] incubator-ignite git commit: ignite-sprint-3 - fix for IGNITE-626

Posted by ag...@apache.org.
ignite-sprint-3 - fix for IGNITE-626


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

Branch: refs/heads/ignite-674
Commit: bad0161136f5a1e99832439e8a294040dfc8bcef
Parents: 22252f1
Author: S.Vladykin <sv...@gridgain.com>
Authored: Fri Apr 10 01:01:56 2015 +0300
Committer: S.Vladykin <sv...@gridgain.com>
Committed: Fri Apr 10 01:01:56 2015 +0300

----------------------------------------------------------------------
 .../junits/common/GridCommonAbstractTest.java          | 13 ++++++++++++-
 .../IgniteCacheOffheapTieredMultithreadedSelfTest.java |  4 ++--
 .../testsuites/IgniteCacheQuerySelfTestSuite.java      |  1 +
 3 files changed, 15 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bad01611/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
index 9f4ae0b..98822f0 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
@@ -330,9 +330,20 @@ public abstract class GridCommonAbstractTest extends GridAbstractTest {
 
     /** {@inheritDoc} */
     @Override protected final Ignite startGridsMultiThreaded(int cnt) throws Exception {
+        return startGridsMultiThreaded(cnt, true);
+    }
+
+    /**
+     * @param cnt Count.
+     * @param awaitPartitionMapExchange If we need to await partition map exchange.
+     * @return Ignite.
+     * @throws Exception If failed.
+     */
+    protected final Ignite startGridsMultiThreaded(int cnt, boolean awaitPartitionMapExchange) throws Exception {
         Ignite g = super.startGridsMultiThreaded(cnt);
 
-        awaitPartitionMapExchange();
+        if (awaitPartitionMapExchange)
+            awaitPartitionMapExchange();
 
         return g;
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bad01611/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapTieredMultithreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapTieredMultithreadedSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapTieredMultithreadedSelfTest.java
index dd48f95..8f5b663 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapTieredMultithreadedSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapTieredMultithreadedSelfTest.java
@@ -78,7 +78,7 @@ public class IgniteCacheOffheapTieredMultithreadedSelfTest extends GridCommonAbs
 
     /** {@inheritDoc} */
     @Override protected void beforeTestsStarted() throws Exception {
-        startGridsMultiThreaded(3);
+        startGridsMultiThreaded(3, false);
 
         cache = grid(0).cache(null);
     }
@@ -125,7 +125,7 @@ public class IgniteCacheOffheapTieredMultithreadedSelfTest extends GridCommonAbs
             }
         }, 64);
 
-        Thread.sleep(3 * 60 * 1000);
+        Thread.sleep(30 * 1000);
 
         end.set(true);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bad01611/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 552205a..57ac209 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
@@ -61,6 +61,7 @@ public class IgniteCacheQuerySelfTestSuite extends TestSuite {
         suite.addTestSuite(IgniteCacheQueryOffheapMultiThreadedSelfTest.class);
         suite.addTestSuite(IgniteCacheQueryOffheapEvictsMultiThreadedSelfTest.class);
         suite.addTestSuite(IgniteCacheSqlQueryMultiThreadedSelfTest.class);
+        suite.addTestSuite(IgniteCacheOffheapTieredMultithreadedSelfTest.class);
 //        suite.addTestSuite(IgniteCacheQueryNodeRestartSelfTest.class); TODO IGNITE-484
         suite.addTestSuite(GridCacheReduceQueryMultithreadedSelfTest.class);
         suite.addTestSuite(GridCacheCrossCacheQuerySelfTest.class);


[09/50] [abbrv] incubator-ignite git commit: IGNITE-701 - Fixed test.

Posted by ag...@apache.org.
IGNITE-701 - Fixed test.


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

Branch: refs/heads/ignite-674
Commit: a3fe2e44a66e19c1afd1a316a0bea0cbe170ef9f
Parents: ada2bde
Author: Alexey Goncharuk <ag...@gridgain.com>
Authored: Wed Apr 8 10:44:54 2015 -0700
Committer: Alexey Goncharuk <ag...@gridgain.com>
Committed: Wed Apr 8 10:44:54 2015 -0700

----------------------------------------------------------------------
 .../ignite/GridCacheAffinityBackupsSelfTest.java     | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a3fe2e44/modules/core/src/test/java/org/apache/ignite/GridCacheAffinityBackupsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/GridCacheAffinityBackupsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/GridCacheAffinityBackupsSelfTest.java
index 2a4655f..212eb23 100644
--- a/modules/core/src/test/java/org/apache/ignite/GridCacheAffinityBackupsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/GridCacheAffinityBackupsSelfTest.java
@@ -18,7 +18,6 @@
 package org.apache.ignite;
 
 import org.apache.ignite.cache.*;
-import org.apache.ignite.cache.affinity.*;
 import org.apache.ignite.cache.affinity.fair.*;
 import org.apache.ignite.cache.affinity.rendezvous.*;
 import org.apache.ignite.cluster.*;
@@ -35,7 +34,7 @@ public class GridCacheAffinityBackupsSelfTest extends GridCommonAbstractTest {
     private int backups;
 
     /** Affinity function. */
-    private AffinityFunction func;
+    private int funcType;
 
     /** */
     private int nodesCnt = 5;
@@ -48,7 +47,7 @@ public class GridCacheAffinityBackupsSelfTest extends GridCommonAbstractTest {
 
         ccfg.setCacheMode(CacheMode.PARTITIONED);
         ccfg.setBackups(backups);
-        ccfg.setAffinity(func);
+        ccfg.setAffinity(funcType == 0 ? new FairAffinityFunction() : new RendezvousAffinityFunction());
 
         cfg.setCacheConfiguration(ccfg);
 
@@ -60,7 +59,7 @@ public class GridCacheAffinityBackupsSelfTest extends GridCommonAbstractTest {
      */
     public void testRendezvousBackups() throws Exception {
         for (int i = 0; i < nodesCnt; i++)
-            checkBackups(i, new RendezvousAffinityFunction());
+            checkBackups(i, 1);
     }
 
     /**
@@ -68,17 +67,17 @@ public class GridCacheAffinityBackupsSelfTest extends GridCommonAbstractTest {
      */
     public void testFairBackups() throws Exception {
         for (int i = 0; i < nodesCnt; i++)
-            checkBackups(i, new FairAffinityFunction());
+            checkBackups(i, 0);
     }
 
     /**
      * @param backups Number of backups.
-     * @param func Affinity function.
+     * @param funcType Affinity function type.
      * @throws Exception If failed.
      */
-    private void checkBackups(int backups, AffinityFunction func) throws Exception {
+    private void checkBackups(int backups, int funcType) throws Exception {
         this.backups = backups;
-        this.func = func;
+        this.funcType = funcType;
 
         startGrids(nodesCnt);
 


[22/50] [abbrv] incubator-ignite git commit: #ignite-180: fix comments after review.

Posted by ag...@apache.org.
#ignite-180: fix comments after review.


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

Branch: refs/heads/ignite-674
Commit: 5720aedbb3fead0d7e37066684fb76b705291569
Parents: 8b2324f
Author: ivasilinets <iv...@gridgain.com>
Authored: Thu Apr 9 12:09:12 2015 +0300
Committer: ivasilinets <iv...@gridgain.com>
Committed: Thu Apr 9 12:09:12 2015 +0300

----------------------------------------------------------------------
 .../ignite/examples/datastructures/IgniteQueueExample.java   | 5 +++--
 .../ignite/examples/datastructures/IgniteSetExample.java     | 8 +++++---
 .../cache/datastructures/GridCacheQueueCleanupSelfTest.java  | 3 ++-
 .../GridCacheQueueMultiNodeConsistencySelfTest.java          | 3 ++-
 .../cache/datastructures/GridCacheSetAbstractSelfTest.java   | 1 -
 .../datastructures/IgniteDataStructureUniqueNameTest.java    | 3 ++-
 .../local/GridCacheLocalAtomicOffheapSetSelfTest.java        | 4 +++-
 .../local/GridCacheLocalAtomicQueueApiSelfTest.java          | 3 ++-
 .../local/GridCacheLocalAtomicSetSelfTest.java               | 3 ++-
 .../local/GridCacheLocalOffheapQueueApiSelfTest.java         | 4 +++-
 .../datastructures/local/GridCacheLocalQueueApiSelfTest.java | 3 ++-
 .../datastructures/local/GridCacheLocalSetSelfTest.java      | 3 ++-
 .../GridCachePartitionedAtomicOffheapQueueApiSelfTest.java   | 4 +++-
 ...PartitionedAtomicOffheapQueueCreateMultiNodeSelfTest.java | 4 +++-
 ...dCachePartitionedAtomicOffheapQueueMultiNodeSelfTest.java | 4 +++-
 .../GridCachePartitionedAtomicQueueApiSelfTest.java          | 3 ++-
 ...idCachePartitionedAtomicQueueCreateMultiNodeSelfTest.java | 3 ++-
 ...artitionedAtomicQueueFailoverDataConsistencySelfTest.java | 3 ++-
 .../GridCachePartitionedAtomicQueueMultiNodeSelfTest.java    | 3 ++-
 ...GridCachePartitionedAtomicQueueRotativeMultiNodeTest.java | 3 ++-
 .../GridCachePartitionedAtomicSetFailoverSelfTest.java       | 3 ++-
 .../GridCachePartitionedDataStructuresFailoverSelfTest.java  | 3 ++-
 .../GridCachePartitionedOffHeapValuesQueueApiSelfTest.java   | 4 +++-
 .../GridCachePartitionedOffHeapValuesSetSelfTest.java        | 4 +++-
 ...achePartitionedOffheapDataStructuresFailoverSelfTest.java | 4 +++-
 .../GridCachePartitionedOffheapSetFailoverSelfTest.java      | 4 +++-
 .../partitioned/GridCachePartitionedQueueApiSelfTest.java    | 3 ++-
 .../GridCachePartitionedQueueCreateMultiNodeSelfTest.java    | 3 ++-
 .../GridCachePartitionedQueueEntryMoveSelfTest.java          | 3 ++-
 ...CachePartitionedQueueFailoverDataConsistencySelfTest.java | 3 ++-
 .../GridCachePartitionedQueueJoinedNodeSelfTest.java         | 3 ++-
 .../GridCachePartitionedQueueMultiNodeSelfTest.java          | 3 ++-
 .../GridCachePartitionedQueueRotativeMultiNodeTest.java      | 3 ++-
 .../partitioned/GridCachePartitionedSetFailoverSelfTest.java | 3 ++-
 .../partitioned/GridCachePartitionedSetSelfTest.java         | 3 ++-
 .../GridCacheReplicatedDataStructuresFailoverSelfTest.java   | 3 ++-
 .../replicated/GridCacheReplicatedQueueApiSelfTest.java      | 3 ++-
 .../GridCacheReplicatedQueueMultiNodeSelfTest.java           | 3 ++-
 .../GridCacheReplicatedQueueRotativeMultiNodeTest.java       | 3 ++-
 .../replicated/GridCacheReplicatedSetSelfTest.java           | 3 ++-
 .../testsuites/IgniteCacheDataStructuresSelfTestSuite.java   | 2 +-
 41 files changed, 92 insertions(+), 44 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5720aedb/examples/src/main/java/org/apache/ignite/examples/datastructures/IgniteQueueExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datastructures/IgniteQueueExample.java b/examples/src/main/java/org/apache/ignite/examples/datastructures/IgniteQueueExample.java
index fae9523..79067e6 100644
--- a/examples/src/main/java/org/apache/ignite/examples/datastructures/IgniteQueueExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datastructures/IgniteQueueExample.java
@@ -18,13 +18,14 @@
 package org.apache.ignite.examples.datastructures;
 
 import org.apache.ignite.*;
-import org.apache.ignite.cache.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.examples.*;
 import org.apache.ignite.lang.*;
 
 import java.util.*;
 
+import static org.apache.ignite.cache.CacheMode.*;
+
 /**
  * Ignite cache distributed queue example. This example demonstrates {@code FIFO} unbounded
  * cache queue.
@@ -79,7 +80,7 @@ public class IgniteQueueExample {
     private static IgniteQueue<String> initializeQueue(Ignite ignite, String queueName) throws IgniteException {
         CollectionConfiguration colCfg = new CollectionConfiguration();
 
-        colCfg.setCacheMode(CacheMode.PARTITIONED);
+        colCfg.setCacheMode(PARTITIONED);
 
         // Initialize new FIFO queue.
         IgniteQueue<String> queue = ignite.queue(queueName, 0, colCfg);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5720aedb/examples/src/main/java/org/apache/ignite/examples/datastructures/IgniteSetExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datastructures/IgniteSetExample.java b/examples/src/main/java/org/apache/ignite/examples/datastructures/IgniteSetExample.java
index 29f7f37..8d4fc89 100644
--- a/examples/src/main/java/org/apache/ignite/examples/datastructures/IgniteSetExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datastructures/IgniteSetExample.java
@@ -18,13 +18,15 @@
 package org.apache.ignite.examples.datastructures;
 
 import org.apache.ignite.*;
-import org.apache.ignite.cache.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.examples.*;
 import org.apache.ignite.lang.*;
 
 import java.util.*;
 
+import static org.apache.ignite.cache.CacheAtomicityMode.*;
+import static org.apache.ignite.cache.CacheMode.*;
+
 /**
  * Ignite cache distributed set example.
  * <p>
@@ -73,8 +75,8 @@ public class IgniteSetExample {
     private static IgniteSet<String> initializeSet(Ignite ignite, String setName) throws IgniteException {
         CollectionConfiguration setCfg = new CollectionConfiguration();
 
-        setCfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
-        setCfg.setCacheMode(CacheMode.PARTITIONED);
+        setCfg.setAtomicityMode(TRANSACTIONAL);
+        setCfg.setCacheMode(PARTITIONED);
 
         // Initialize new set.
         IgniteSet<String> set = ignite.set(setName, setCfg);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5720aedb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueCleanupSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueCleanupSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueCleanupSelfTest.java
index 8bf30fa..f25c0e0 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueCleanupSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueCleanupSelfTest.java
@@ -32,6 +32,7 @@ import java.util.concurrent.*;
 import java.util.concurrent.atomic.*;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.*;
+import static org.apache.ignite.cache.CacheMemoryMode.*;
 import static org.apache.ignite.cache.CacheMode.*;
 
 /**
@@ -56,7 +57,7 @@ public class GridCacheQueueCleanupSelfTest extends IgniteCollectionAbstractTest
 
     /** {@inheritDoc} */
     @Override protected CacheMemoryMode collectionMemoryMode() {
-        return CacheMemoryMode.ONHEAP_TIERED;
+        return ONHEAP_TIERED;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5720aedb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeConsistencySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeConsistencySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeConsistencySelfTest.java
index 495bcef..2232493 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeConsistencySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeConsistencySelfTest.java
@@ -27,6 +27,7 @@ import org.apache.ignite.resources.*;
 import java.util.*;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.*;
+import static org.apache.ignite.cache.CacheMemoryMode.*;
 import static org.apache.ignite.cache.CacheMode.*;
 import static org.apache.ignite.internal.processors.cache.datastructures.GridCacheQueueMultiNodeAbstractSelfTest.*;
 
@@ -69,7 +70,7 @@ public class GridCacheQueueMultiNodeConsistencySelfTest extends IgniteCollection
 
     /** {@inheritDoc} */
     @Override protected CacheMemoryMode collectionMemoryMode() {
-        return CacheMemoryMode.ONHEAP_TIERED;
+        return ONHEAP_TIERED;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5720aedb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetAbstractSelfTest.java
index 8da3234..fe5892e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetAbstractSelfTest.java
@@ -19,7 +19,6 @@ package org.apache.ignite.internal.processors.cache.datastructures;
 
 import junit.framework.*;
 import org.apache.ignite.*;
-import org.apache.ignite.cache.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.cache.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5720aedb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteDataStructureUniqueNameTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteDataStructureUniqueNameTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteDataStructureUniqueNameTest.java
index 1255153..5e66ccb 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteDataStructureUniqueNameTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteDataStructureUniqueNameTest.java
@@ -29,6 +29,7 @@ import java.util.*;
 import java.util.concurrent.*;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.*;
+import static org.apache.ignite.cache.CacheMemoryMode.*;
 import static org.apache.ignite.cache.CacheMode.*;
 
 /**
@@ -47,7 +48,7 @@ public class IgniteDataStructureUniqueNameTest extends IgniteCollectionAbstractT
 
     /** {@inheritDoc} */
     @Override protected CacheMemoryMode collectionMemoryMode() {
-        return CacheMemoryMode.ONHEAP_TIERED;
+        return ONHEAP_TIERED;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5720aedb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalAtomicOffheapSetSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalAtomicOffheapSetSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalAtomicOffheapSetSelfTest.java
index 394eaab..bffd80a 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalAtomicOffheapSetSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalAtomicOffheapSetSelfTest.java
@@ -19,12 +19,14 @@ package org.apache.ignite.internal.processors.cache.datastructures.local;
 
 import org.apache.ignite.cache.*;
 
+import static org.apache.ignite.cache.CacheMemoryMode.*;
+
 /**
  * Set tests.
  */
 public class GridCacheLocalAtomicOffheapSetSelfTest extends GridCacheLocalAtomicSetSelfTest {
     /** {@inheritDoc} */
     @Override protected CacheMemoryMode collectionMemoryMode() {
-        return CacheMemoryMode.OFFHEAP_TIERED;
+        return OFFHEAP_TIERED;
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5720aedb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalAtomicQueueApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalAtomicQueueApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalAtomicQueueApiSelfTest.java
index 51c08a0..3cb4dab 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalAtomicQueueApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalAtomicQueueApiSelfTest.java
@@ -20,6 +20,7 @@ package org.apache.ignite.internal.processors.cache.datastructures.local;
 import org.apache.ignite.cache.*;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.*;
+import static org.apache.ignite.cache.CacheMemoryMode.*;
 
 /**
  * Queue tests with local atomic cache.
@@ -27,7 +28,7 @@ import static org.apache.ignite.cache.CacheAtomicityMode.*;
 public class GridCacheLocalAtomicQueueApiSelfTest extends GridCacheLocalQueueApiSelfTest {
     /** {@inheritDoc} */
     @Override protected CacheMemoryMode collectionMemoryMode() {
-        return CacheMemoryMode.ONHEAP_TIERED;
+        return ONHEAP_TIERED;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5720aedb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalAtomicSetSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalAtomicSetSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalAtomicSetSelfTest.java
index d149a06..688417f 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalAtomicSetSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalAtomicSetSelfTest.java
@@ -21,6 +21,7 @@ import org.apache.ignite.cache.*;
 import org.apache.ignite.internal.processors.cache.datastructures.*;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.*;
+import static org.apache.ignite.cache.CacheMemoryMode.*;
 import static org.apache.ignite.cache.CacheMode.*;
 
 /**
@@ -39,7 +40,7 @@ public class GridCacheLocalAtomicSetSelfTest extends GridCacheSetAbstractSelfTes
 
     /** {@inheritDoc} */
     @Override protected CacheMemoryMode collectionMemoryMode() {
-        return CacheMemoryMode.ONHEAP_TIERED;
+        return ONHEAP_TIERED;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5720aedb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalOffheapQueueApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalOffheapQueueApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalOffheapQueueApiSelfTest.java
index c8e5bf7..441e89e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalOffheapQueueApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalOffheapQueueApiSelfTest.java
@@ -18,12 +18,14 @@ package org.apache.ignite.internal.processors.cache.datastructures.local;
 
 import org.apache.ignite.cache.*;
 
+import static org.apache.ignite.cache.CacheMemoryMode.*;
+
 /**
  * Queue tests with local cache.
  */
 public class GridCacheLocalOffheapQueueApiSelfTest extends GridCacheLocalQueueApiSelfTest {
     /** {@inheritDoc} */
     @Override protected CacheMemoryMode collectionMemoryMode() {
-        return CacheMemoryMode.OFFHEAP_TIERED;
+        return OFFHEAP_TIERED;
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5720aedb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalQueueApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalQueueApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalQueueApiSelfTest.java
index 837c94b..7b6e0d8 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalQueueApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalQueueApiSelfTest.java
@@ -21,6 +21,7 @@ import org.apache.ignite.cache.*;
 import org.apache.ignite.internal.processors.cache.datastructures.*;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.*;
+import static org.apache.ignite.cache.CacheMemoryMode.*;
 import static org.apache.ignite.cache.CacheMode.*;
 
 /**
@@ -34,7 +35,7 @@ public class GridCacheLocalQueueApiSelfTest extends GridCacheQueueApiSelfAbstrac
 
     /** {@inheritDoc} */
     @Override protected CacheMemoryMode collectionMemoryMode() {
-        return CacheMemoryMode.ONHEAP_TIERED;
+        return ONHEAP_TIERED;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5720aedb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalSetSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalSetSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalSetSelfTest.java
index b312a65..580d770 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalSetSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalSetSelfTest.java
@@ -21,6 +21,7 @@ import org.apache.ignite.cache.*;
 import org.apache.ignite.internal.processors.cache.datastructures.*;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.*;
+import static org.apache.ignite.cache.CacheMemoryMode.*;
 import static org.apache.ignite.cache.CacheMode.*;
 
 /**
@@ -39,7 +40,7 @@ public class GridCacheLocalSetSelfTest extends GridCacheSetAbstractSelfTest {
 
     /** {@inheritDoc} */
     @Override protected CacheMemoryMode collectionMemoryMode() {
-        return CacheMemoryMode.ONHEAP_TIERED;
+        return ONHEAP_TIERED;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5720aedb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicOffheapQueueApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicOffheapQueueApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicOffheapQueueApiSelfTest.java
index f571f60..84dabda 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicOffheapQueueApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicOffheapQueueApiSelfTest.java
@@ -19,12 +19,14 @@ package org.apache.ignite.internal.processors.cache.datastructures.partitioned;
 
 import org.apache.ignite.cache.*;
 
+import static org.apache.ignite.cache.CacheMemoryMode.*;
+
 /**
  * Queue tests with partitioned atomic cache.
  */
 public class GridCachePartitionedAtomicOffheapQueueApiSelfTest extends GridCachePartitionedAtomicQueueApiSelfTest {
     /** {@inheritDoc} */
     @Override protected CacheMemoryMode collectionMemoryMode() {
-        return CacheMemoryMode.OFFHEAP_TIERED;
+        return OFFHEAP_TIERED;
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5720aedb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicOffheapQueueCreateMultiNodeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicOffheapQueueCreateMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicOffheapQueueCreateMultiNodeSelfTest.java
index 9c31319..f29a752 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicOffheapQueueCreateMultiNodeSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicOffheapQueueCreateMultiNodeSelfTest.java
@@ -18,6 +18,8 @@ package org.apache.ignite.internal.processors.cache.datastructures.partitioned;
 
 import org.apache.ignite.cache.*;
 
+import static org.apache.ignite.cache.CacheMemoryMode.*;
+
 /**
  *
  */
@@ -25,6 +27,6 @@ public class GridCachePartitionedAtomicOffheapQueueCreateMultiNodeSelfTest
     extends GridCachePartitionedAtomicQueueCreateMultiNodeSelfTest {
     /** {@inheritDoc} */
     @Override protected CacheMemoryMode collectionMemoryMode() {
-        return CacheMemoryMode.OFFHEAP_TIERED;
+        return OFFHEAP_TIERED;
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5720aedb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicOffheapQueueMultiNodeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicOffheapQueueMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicOffheapQueueMultiNodeSelfTest.java
index 5efc2ed..8004dde 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicOffheapQueueMultiNodeSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicOffheapQueueMultiNodeSelfTest.java
@@ -19,12 +19,14 @@ package org.apache.ignite.internal.processors.cache.datastructures.partitioned;
 
 import org.apache.ignite.cache.*;
 
+import static org.apache.ignite.cache.CacheMemoryMode.*;
+
 /**
  * Queue multi node test.
  */
 public class GridCachePartitionedAtomicOffheapQueueMultiNodeSelfTest extends GridCachePartitionedAtomicQueueMultiNodeSelfTest {
     /** {@inheritDoc} */
     @Override protected CacheMemoryMode collectionMemoryMode() {
-        return CacheMemoryMode.OFFHEAP_TIERED;
+        return OFFHEAP_TIERED;
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5720aedb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueApiSelfTest.java
index 02fc8ad..01be8c0 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueApiSelfTest.java
@@ -20,6 +20,7 @@ package org.apache.ignite.internal.processors.cache.datastructures.partitioned;
 import org.apache.ignite.cache.*;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.*;
+import static org.apache.ignite.cache.CacheMemoryMode.*;
 
 /**
  * Queue tests with partitioned atomic cache.
@@ -27,7 +28,7 @@ import static org.apache.ignite.cache.CacheAtomicityMode.*;
 public class GridCachePartitionedAtomicQueueApiSelfTest extends GridCachePartitionedQueueApiSelfTest {
     /** {@inheritDoc} */
     @Override protected CacheMemoryMode collectionMemoryMode() {
-        return CacheMemoryMode.ONHEAP_TIERED;
+        return ONHEAP_TIERED;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5720aedb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueCreateMultiNodeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueCreateMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueCreateMultiNodeSelfTest.java
index 1b36a74..e2cebec 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueCreateMultiNodeSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueCreateMultiNodeSelfTest.java
@@ -20,6 +20,7 @@ package org.apache.ignite.internal.processors.cache.datastructures.partitioned;
 import org.apache.ignite.cache.*;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.*;
+import static org.apache.ignite.cache.CacheMemoryMode.*;
 
 /**
  *
@@ -28,7 +29,7 @@ public class GridCachePartitionedAtomicQueueCreateMultiNodeSelfTest
     extends GridCachePartitionedQueueCreateMultiNodeSelfTest {
     /** {@inheritDoc} */
     @Override protected CacheMemoryMode collectionMemoryMode() {
-        return CacheMemoryMode.ONHEAP_TIERED;
+        return ONHEAP_TIERED;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5720aedb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueFailoverDataConsistencySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueFailoverDataConsistencySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueFailoverDataConsistencySelfTest.java
index 1772d5f..85aedf8 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueFailoverDataConsistencySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueFailoverDataConsistencySelfTest.java
@@ -21,6 +21,7 @@ import org.apache.ignite.cache.*;
 import org.apache.ignite.internal.processors.cache.datastructures.*;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.*;
+import static org.apache.ignite.cache.CacheMemoryMode.*;
 
 /**
  * Queue failover test for atomic cache.
@@ -29,7 +30,7 @@ public class GridCachePartitionedAtomicQueueFailoverDataConsistencySelfTest exte
     GridCacheAbstractQueueFailoverDataConsistencySelfTest {
     /** {@inheritDoc} */
     @Override protected CacheMemoryMode collectionMemoryMode() {
-        return CacheMemoryMode.ONHEAP_TIERED;
+        return ONHEAP_TIERED;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5720aedb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueMultiNodeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueMultiNodeSelfTest.java
index 914f7d2..cc4eb68 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueMultiNodeSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueMultiNodeSelfTest.java
@@ -20,6 +20,7 @@ package org.apache.ignite.internal.processors.cache.datastructures.partitioned;
 import org.apache.ignite.cache.*;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.*;
+import static org.apache.ignite.cache.CacheMemoryMode.*;
 
 /**
  * Queue multi node test.
@@ -27,7 +28,7 @@ import static org.apache.ignite.cache.CacheAtomicityMode.*;
 public class GridCachePartitionedAtomicQueueMultiNodeSelfTest extends GridCachePartitionedQueueMultiNodeSelfTest {
     /** {@inheritDoc} */
     @Override protected CacheMemoryMode collectionMemoryMode() {
-        return CacheMemoryMode.ONHEAP_TIERED;
+        return ONHEAP_TIERED;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5720aedb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueRotativeMultiNodeTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueRotativeMultiNodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueRotativeMultiNodeTest.java
index 7451e38..ed12d52 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueRotativeMultiNodeTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueRotativeMultiNodeTest.java
@@ -20,6 +20,7 @@ package org.apache.ignite.internal.processors.cache.datastructures.partitioned;
 import org.apache.ignite.cache.*;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.*;
+import static org.apache.ignite.cache.CacheMemoryMode.*;
 
 /**
  * Sequence multi node tests.
@@ -28,7 +29,7 @@ public class GridCachePartitionedAtomicQueueRotativeMultiNodeTest extends
     GridCachePartitionedQueueRotativeMultiNodeTest {
     /** {@inheritDoc} */
     @Override protected CacheMemoryMode collectionMemoryMode() {
-        return CacheMemoryMode.ONHEAP_TIERED;
+        return ONHEAP_TIERED;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5720aedb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSetFailoverSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSetFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSetFailoverSelfTest.java
index 771d685..f453aa8 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSetFailoverSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSetFailoverSelfTest.java
@@ -21,6 +21,7 @@ import org.apache.ignite.cache.*;
 import org.apache.ignite.internal.processors.cache.datastructures.*;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.*;
+import static org.apache.ignite.cache.CacheMemoryMode.*;
 
 /**
  * Set failover tests.
@@ -28,7 +29,7 @@ import static org.apache.ignite.cache.CacheAtomicityMode.*;
 public class GridCachePartitionedAtomicSetFailoverSelfTest extends GridCacheSetFailoverAbstractSelfTest {
     /** {@inheritDoc} */
     @Override protected CacheMemoryMode collectionMemoryMode() {
-        return CacheMemoryMode.ONHEAP_TIERED;
+        return ONHEAP_TIERED;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5720aedb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedDataStructuresFailoverSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedDataStructuresFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedDataStructuresFailoverSelfTest.java
index fdb344d..519148e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedDataStructuresFailoverSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedDataStructuresFailoverSelfTest.java
@@ -21,6 +21,7 @@ import org.apache.ignite.cache.*;
 import org.apache.ignite.internal.processors.cache.datastructures.*;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.*;
+import static org.apache.ignite.cache.CacheMemoryMode.*;
 import static org.apache.ignite.cache.CacheMode.*;
 
 /**
@@ -35,7 +36,7 @@ public class GridCachePartitionedDataStructuresFailoverSelfTest
 
     /** {@inheritDoc} */
     @Override protected CacheMemoryMode collectionMemoryMode() {
-        return CacheMemoryMode.ONHEAP_TIERED;
+        return ONHEAP_TIERED;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5720aedb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedOffHeapValuesQueueApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedOffHeapValuesQueueApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedOffHeapValuesQueueApiSelfTest.java
index 1cffd46..f844bf3 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedOffHeapValuesQueueApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedOffHeapValuesQueueApiSelfTest.java
@@ -18,12 +18,14 @@ package org.apache.ignite.internal.processors.cache.datastructures.partitioned;
 
 import org.apache.ignite.cache.*;
 
+import static org.apache.ignite.cache.CacheMemoryMode.*;
+
 /**
  * Queue tests with partitioned cache.
  */
 public class GridCachePartitionedOffHeapValuesQueueApiSelfTest extends GridCachePartitionedQueueApiSelfTest {
     /** {@inheritDoc} */
     @Override protected CacheMemoryMode collectionMemoryMode() {
-        return CacheMemoryMode.OFFHEAP_VALUES;
+        return OFFHEAP_VALUES;
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5720aedb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedOffHeapValuesSetSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedOffHeapValuesSetSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedOffHeapValuesSetSelfTest.java
index 7c6041f..0c7f973 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedOffHeapValuesSetSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedOffHeapValuesSetSelfTest.java
@@ -19,12 +19,14 @@ package org.apache.ignite.internal.processors.cache.datastructures.partitioned;
 
 import org.apache.ignite.cache.*;
 
+import static org.apache.ignite.cache.CacheMemoryMode.*;
+
 /**
  * Set tests with off-heap values cache memory mode.
  */
 public class GridCachePartitionedOffHeapValuesSetSelfTest extends GridCachePartitionedSetSelfTest {
     /** {@inheritDoc} */
     @Override protected CacheMemoryMode collectionMemoryMode() {
-        return CacheMemoryMode.OFFHEAP_VALUES;
+        return OFFHEAP_VALUES;
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5720aedb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedOffheapDataStructuresFailoverSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedOffheapDataStructuresFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedOffheapDataStructuresFailoverSelfTest.java
index e729e96..9878693 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedOffheapDataStructuresFailoverSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedOffheapDataStructuresFailoverSelfTest.java
@@ -19,13 +19,15 @@ package org.apache.ignite.internal.processors.cache.datastructures.partitioned;
 
 import org.apache.ignite.cache.*;
 
+import static org.apache.ignite.cache.CacheMemoryMode.*;
+
 /**
  * Failover tests for cache data structures.
  */
 public class GridCachePartitionedOffheapDataStructuresFailoverSelfTest extends GridCachePartitionedDataStructuresFailoverSelfTest {
     /** {@inheritDoc} */
     @Override protected CacheMemoryMode collectionMemoryMode() {
-        return CacheMemoryMode.OFFHEAP_TIERED;
+        return OFFHEAP_TIERED;
     }
 
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5720aedb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedOffheapSetFailoverSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedOffheapSetFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedOffheapSetFailoverSelfTest.java
index 0b28dd8..bf1866f 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedOffheapSetFailoverSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedOffheapSetFailoverSelfTest.java
@@ -19,12 +19,14 @@ package org.apache.ignite.internal.processors.cache.datastructures.partitioned;
 
 import org.apache.ignite.cache.*;
 
+import static org.apache.ignite.cache.CacheMemoryMode.*;
+
 /**
  * Set failover tests.
  */
 public class GridCachePartitionedOffheapSetFailoverSelfTest extends GridCachePartitionedSetFailoverSelfTest {
     /** {@inheritDoc} */
     @Override protected CacheMemoryMode collectionMemoryMode() {
-        return CacheMemoryMode.OFFHEAP_TIERED;
+        return OFFHEAP_TIERED;
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5720aedb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueApiSelfTest.java
index 41d8417..dd095a0 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueApiSelfTest.java
@@ -21,6 +21,7 @@ import org.apache.ignite.cache.*;
 import org.apache.ignite.internal.processors.cache.datastructures.*;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.*;
+import static org.apache.ignite.cache.CacheMemoryMode.*;
 import static org.apache.ignite.cache.CacheMode.*;
 
 /**
@@ -34,7 +35,7 @@ public class GridCachePartitionedQueueApiSelfTest extends GridCacheQueueApiSelfA
 
     /** {@inheritDoc} */
     @Override protected CacheMemoryMode collectionMemoryMode() {
-        return CacheMemoryMode.ONHEAP_TIERED;
+        return ONHEAP_TIERED;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5720aedb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueCreateMultiNodeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueCreateMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueCreateMultiNodeSelfTest.java
index 4bbbf8c..5b6627e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueCreateMultiNodeSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueCreateMultiNodeSelfTest.java
@@ -30,6 +30,7 @@ import java.util.concurrent.atomic.*;
 
 import static java.util.concurrent.TimeUnit.*;
 import static org.apache.ignite.cache.CacheAtomicityMode.*;
+import static org.apache.ignite.cache.CacheMemoryMode.*;
 import static org.apache.ignite.cache.CacheMode.*;
 import static org.apache.ignite.cache.CacheRebalanceMode.*;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*;
@@ -52,7 +53,7 @@ public class GridCachePartitionedQueueCreateMultiNodeSelfTest extends IgniteColl
 
     /** {@inheritDoc} */
     @Override protected CacheMemoryMode collectionMemoryMode() {
-        return CacheMemoryMode.ONHEAP_TIERED;
+        return ONHEAP_TIERED;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5720aedb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueEntryMoveSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueEntryMoveSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueEntryMoveSelfTest.java
index 92b61f4..13363cd 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueEntryMoveSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueEntryMoveSelfTest.java
@@ -33,6 +33,7 @@ import java.util.*;
 import java.util.concurrent.*;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.*;
+import static org.apache.ignite.cache.CacheMemoryMode.*;
 import static org.apache.ignite.cache.CacheMode.*;
 
 /**
@@ -63,7 +64,7 @@ public class GridCachePartitionedQueueEntryMoveSelfTest extends IgniteCollection
 
     /** {@inheritDoc} */
     @Override protected CacheMemoryMode collectionMemoryMode() {
-        return CacheMemoryMode.ONHEAP_TIERED;
+        return ONHEAP_TIERED;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5720aedb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueFailoverDataConsistencySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueFailoverDataConsistencySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueFailoverDataConsistencySelfTest.java
index 495036e..4b809e2 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueFailoverDataConsistencySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueFailoverDataConsistencySelfTest.java
@@ -21,6 +21,7 @@ import org.apache.ignite.cache.*;
 import org.apache.ignite.internal.processors.cache.datastructures.*;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.*;
+import static org.apache.ignite.cache.CacheMemoryMode.*;
 
 /**
  * Queue failover test for transactional cache.
@@ -29,7 +30,7 @@ public class GridCachePartitionedQueueFailoverDataConsistencySelfTest extends
     GridCacheAbstractQueueFailoverDataConsistencySelfTest {
     /** {@inheritDoc} */
     @Override protected CacheMemoryMode collectionMemoryMode() {
-        return CacheMemoryMode.ONHEAP_TIERED;
+        return ONHEAP_TIERED;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5720aedb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueJoinedNodeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueJoinedNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueJoinedNodeSelfTest.java
index b3a575f..5681c01 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueJoinedNodeSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueJoinedNodeSelfTest.java
@@ -21,6 +21,7 @@ import org.apache.ignite.cache.*;
 import org.apache.ignite.internal.processors.cache.datastructures.*;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.*;
+import static org.apache.ignite.cache.CacheMemoryMode.*;
 import static org.apache.ignite.cache.CacheMode.*;
 
 /**
@@ -34,7 +35,7 @@ public class GridCachePartitionedQueueJoinedNodeSelfTest extends GridCacheQueueJ
 
     /** {@inheritDoc} */
     @Override protected CacheMemoryMode collectionMemoryMode() {
-        return CacheMemoryMode.ONHEAP_TIERED;
+        return ONHEAP_TIERED;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5720aedb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueMultiNodeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueMultiNodeSelfTest.java
index bdf7f95..c336209 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueMultiNodeSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueMultiNodeSelfTest.java
@@ -21,6 +21,7 @@ import org.apache.ignite.cache.*;
 import org.apache.ignite.internal.processors.cache.datastructures.*;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.*;
+import static org.apache.ignite.cache.CacheMemoryMode.*;
 import static org.apache.ignite.cache.CacheMode.*;
 
 /**
@@ -34,7 +35,7 @@ public class GridCachePartitionedQueueMultiNodeSelfTest extends GridCacheQueueMu
 
     /** {@inheritDoc} */
     @Override protected CacheMemoryMode collectionMemoryMode() {
-        return CacheMemoryMode.ONHEAP_TIERED;
+        return ONHEAP_TIERED;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5720aedb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueRotativeMultiNodeTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueRotativeMultiNodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueRotativeMultiNodeTest.java
index 0807d46..3fbfda5 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueRotativeMultiNodeTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueRotativeMultiNodeTest.java
@@ -21,6 +21,7 @@ import org.apache.ignite.cache.*;
 import org.apache.ignite.internal.processors.cache.datastructures.*;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.*;
+import static org.apache.ignite.cache.CacheMemoryMode.*;
 import static org.apache.ignite.cache.CacheMode.*;
 
 /**
@@ -34,7 +35,7 @@ public class GridCachePartitionedQueueRotativeMultiNodeTest extends GridCacheQue
 
     /** {@inheritDoc} */
     @Override protected CacheMemoryMode collectionMemoryMode() {
-        return CacheMemoryMode.ONHEAP_TIERED;
+        return ONHEAP_TIERED;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5720aedb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedSetFailoverSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedSetFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedSetFailoverSelfTest.java
index 68659c1..2186afb 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedSetFailoverSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedSetFailoverSelfTest.java
@@ -21,6 +21,7 @@ import org.apache.ignite.cache.*;
 import org.apache.ignite.internal.processors.cache.datastructures.*;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.*;
+import static org.apache.ignite.cache.CacheMemoryMode.*;
 
 /**
  * Set failover tests.
@@ -33,6 +34,6 @@ public class GridCachePartitionedSetFailoverSelfTest extends GridCacheSetFailove
 
     /** {@inheritDoc} */
     @Override protected CacheMemoryMode collectionMemoryMode() {
-        return CacheMemoryMode.ONHEAP_TIERED;
+        return ONHEAP_TIERED;
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5720aedb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedSetSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedSetSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedSetSelfTest.java
index a76fec1..0eb989d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedSetSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedSetSelfTest.java
@@ -21,6 +21,7 @@ import org.apache.ignite.cache.*;
 import org.apache.ignite.internal.processors.cache.datastructures.*;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.*;
+import static org.apache.ignite.cache.CacheMemoryMode.*;
 import static org.apache.ignite.cache.CacheMode.*;
 
 /**
@@ -34,7 +35,7 @@ public class GridCachePartitionedSetSelfTest extends GridCacheSetAbstractSelfTes
 
     /** {@inheritDoc} */
     @Override protected CacheMemoryMode collectionMemoryMode() {
-        return CacheMemoryMode.OFFHEAP_TIERED;
+        return OFFHEAP_TIERED;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5720aedb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedDataStructuresFailoverSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedDataStructuresFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedDataStructuresFailoverSelfTest.java
index f2dbdcf..46e458b 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedDataStructuresFailoverSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedDataStructuresFailoverSelfTest.java
@@ -21,6 +21,7 @@ import org.apache.ignite.cache.*;
 import org.apache.ignite.internal.processors.cache.datastructures.*;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.*;
+import static org.apache.ignite.cache.CacheMemoryMode.*;
 import static org.apache.ignite.cache.CacheMode.*;
 
 /**
@@ -35,7 +36,7 @@ public class GridCacheReplicatedDataStructuresFailoverSelfTest
 
     /** {@inheritDoc} */
     @Override protected CacheMemoryMode collectionMemoryMode() {
-        return CacheMemoryMode.ONHEAP_TIERED;
+        return ONHEAP_TIERED;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5720aedb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedQueueApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedQueueApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedQueueApiSelfTest.java
index 0a854cc..8933fbf 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedQueueApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedQueueApiSelfTest.java
@@ -21,6 +21,7 @@ import org.apache.ignite.cache.*;
 import org.apache.ignite.internal.processors.cache.datastructures.*;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.*;
+import static org.apache.ignite.cache.CacheMemoryMode.*;
 import static org.apache.ignite.cache.CacheMode.*;
 
 /**
@@ -34,7 +35,7 @@ public class GridCacheReplicatedQueueApiSelfTest extends GridCacheQueueApiSelfAb
 
     /** {@inheritDoc} */
     @Override protected CacheMemoryMode collectionMemoryMode() {
-        return CacheMemoryMode.OFFHEAP_TIERED;
+        return OFFHEAP_TIERED;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5720aedb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedQueueMultiNodeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedQueueMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedQueueMultiNodeSelfTest.java
index 5969bcd..ecaf704 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedQueueMultiNodeSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedQueueMultiNodeSelfTest.java
@@ -21,6 +21,7 @@ import org.apache.ignite.cache.*;
 import org.apache.ignite.internal.processors.cache.datastructures.*;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.*;
+import static org.apache.ignite.cache.CacheMemoryMode.*;
 import static org.apache.ignite.cache.CacheMode.*;
 
 /**
@@ -34,7 +35,7 @@ public class GridCacheReplicatedQueueMultiNodeSelfTest extends GridCacheQueueMul
 
     /** {@inheritDoc} */
     @Override protected CacheMemoryMode collectionMemoryMode() {
-        return CacheMemoryMode.ONHEAP_TIERED;
+        return ONHEAP_TIERED;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5720aedb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedQueueRotativeMultiNodeTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedQueueRotativeMultiNodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedQueueRotativeMultiNodeTest.java
index d013c2f..07781f6 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedQueueRotativeMultiNodeTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedQueueRotativeMultiNodeTest.java
@@ -21,6 +21,7 @@ import org.apache.ignite.cache.*;
 import org.apache.ignite.internal.processors.cache.datastructures.*;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.*;
+import static org.apache.ignite.cache.CacheMemoryMode.*;
 import static org.apache.ignite.cache.CacheMode.*;
 
 /**
@@ -34,7 +35,7 @@ public class GridCacheReplicatedQueueRotativeMultiNodeTest extends GridCacheQueu
 
     /** {@inheritDoc} */
     @Override protected CacheMemoryMode collectionMemoryMode() {
-        return CacheMemoryMode.ONHEAP_TIERED;
+        return ONHEAP_TIERED;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5720aedb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedSetSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedSetSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedSetSelfTest.java
index 897660c..3473e32 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedSetSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedSetSelfTest.java
@@ -21,6 +21,7 @@ import org.apache.ignite.cache.*;
 import org.apache.ignite.internal.processors.cache.datastructures.*;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.*;
+import static org.apache.ignite.cache.CacheMemoryMode.*;
 import static org.apache.ignite.cache.CacheMode.*;
 
 /**
@@ -34,7 +35,7 @@ public class GridCacheReplicatedSetSelfTest extends GridCacheSetAbstractSelfTest
 
     /** {@inheritDoc} */
     @Override protected CacheMemoryMode collectionMemoryMode() {
-        return CacheMemoryMode.ONHEAP_TIERED;
+        return ONHEAP_TIERED;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5720aedb/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheDataStructuresSelfTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheDataStructuresSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheDataStructuresSelfTestSuite.java
index d17b3db..4c40e75 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheDataStructuresSelfTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheDataStructuresSelfTestSuite.java
@@ -68,7 +68,7 @@ public class IgniteCacheDataStructuresSelfTestSuite extends TestSuite {
         suite.addTest(new TestSuite(GridCachePartitionedAtomicQueueMultiNodeSelfTest.class));
         suite.addTest(new TestSuite(GridCachePartitionedAtomicOffheapQueueMultiNodeSelfTest.class));
 
-        // TODO: IGNITE-180.
+        // TODO: IGNITE-80.
         //suite.addTest(new TestSuite(GridCachePartitionedQueueCreateMultiNodeSelfTest.class));
         //suite.addTest(new TestSuite(GridCachePartitionedAtomicQueueCreateMultiNodeSelfTest.class));
         //suite.addTest(new TestSuite(GridCachePartitionedAtomicOffheapQueueCreateMultiNodeSelfTest.class));


[26/50] [abbrv] incubator-ignite git commit: [maven-release-plugin] prepare for next development iteration

Posted by ag...@apache.org.
[maven-release-plugin] prepare for next development iteration


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

Branch: refs/heads/ignite-674
Commit: 8b63c8a7af47f03bbbd9084e14041704f8c61ed3
Parents: de4c61a
Author: Ignite Teamcity <ig...@apache.org>
Authored: Thu Apr 9 12:48:41 2015 +0300
Committer: Ignite Teamcity <ig...@apache.org>
Committed: Thu Apr 9 12:48:41 2015 +0300

----------------------------------------------------------------------
 examples/pom.xml              | 6 +-----
 modules/aop/pom.xml           | 6 +-----
 modules/aws/pom.xml           | 6 +-----
 modules/clients/pom.xml       | 6 +-----
 modules/codegen/pom.xml       | 6 +-----
 modules/core/pom.xml          | 6 +-----
 modules/extdata/p2p/pom.xml   | 6 +-----
 modules/extdata/uri/pom.xml   | 6 +-----
 modules/geospatial/pom.xml    | 6 +-----
 modules/hadoop/pom.xml        | 6 +-----
 modules/hibernate/pom.xml     | 6 +-----
 modules/indexing/pom.xml      | 6 +-----
 modules/jcl/pom.xml           | 6 +-----
 modules/jta/pom.xml           | 6 +-----
 modules/log4j/pom.xml         | 6 +-----
 modules/rest-http/pom.xml     | 6 +-----
 modules/scalar/pom.xml        | 6 +-----
 modules/schedule/pom.xml      | 6 +-----
 modules/schema-import/pom.xml | 6 +-----
 modules/slf4j/pom.xml         | 6 +-----
 modules/spring/pom.xml        | 6 +-----
 modules/ssh/pom.xml           | 6 +-----
 modules/tools/pom.xml         | 6 +-----
 modules/urideploy/pom.xml     | 6 +-----
 modules/visor-console/pom.xml | 6 +-----
 modules/visor-plugins/pom.xml | 6 +-----
 modules/web/pom.xml           | 6 +-----
 modules/yardstick/pom.xml     | 6 +-----
 pom.xml                       | 4 ++--
 29 files changed, 30 insertions(+), 142 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8b63c8a7/examples/pom.xml
----------------------------------------------------------------------
diff --git a/examples/pom.xml b/examples/pom.xml
index f3af253..c25a00d 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -28,7 +28,7 @@
     </parent>
 
     <artifactId>ignite-examples</artifactId>
-    <version>1.0.1-RC1-SNAPSHOT</version>
+    <version>1.0.1-RC2-SNAPSHOT</version>
 
     <dependencies>
         <dependency>
@@ -225,8 +225,4 @@
             </build>
         </profile>
     </profiles>
-
-  <scm>
-    <tag>1.0.2QAILS01</tag>
-  </scm>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8b63c8a7/modules/aop/pom.xml
----------------------------------------------------------------------
diff --git a/modules/aop/pom.xml b/modules/aop/pom.xml
index d15b41f..d8223ac 100644
--- a/modules/aop/pom.xml
+++ b/modules/aop/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-aop</artifactId>
-    <version>1.0.1-RC1-SNAPSHOT</version>
+    <version>1.0.1-RC2-SNAPSHOT</version>
 
     <dependencies>
         <dependency>
@@ -107,8 +107,4 @@
             </testResource>
         </testResources>
     </build>
-
-  <scm>
-    <tag>1.0.2QAILS01</tag>
-  </scm>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8b63c8a7/modules/aws/pom.xml
----------------------------------------------------------------------
diff --git a/modules/aws/pom.xml b/modules/aws/pom.xml
index 91e62b0..5b05476 100644
--- a/modules/aws/pom.xml
+++ b/modules/aws/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-aws</artifactId>
-    <version>1.0.1-RC1-SNAPSHOT</version>
+    <version>1.0.1-RC2-SNAPSHOT</version>
 
     <dependencies>
         <dependency>
@@ -99,8 +99,4 @@
             <scope>test</scope>
         </dependency>
     </dependencies>
-
-  <scm>
-    <tag>1.0.2QAILS01</tag>
-  </scm>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8b63c8a7/modules/clients/pom.xml
----------------------------------------------------------------------
diff --git a/modules/clients/pom.xml b/modules/clients/pom.xml
index 51d0183..f18171f 100644
--- a/modules/clients/pom.xml
+++ b/modules/clients/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-clients</artifactId>
-    <version>1.0.1-RC1-SNAPSHOT</version>
+    <version>1.0.1-RC2-SNAPSHOT</version>
 
     <dependencies>
         <dependency>
@@ -128,8 +128,4 @@
             </plugin>
         </plugins>
     </build>
-
-  <scm>
-    <tag>1.0.2QAILS01</tag>
-  </scm>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8b63c8a7/modules/codegen/pom.xml
----------------------------------------------------------------------
diff --git a/modules/codegen/pom.xml b/modules/codegen/pom.xml
index ec56e3d..5bd781f 100644
--- a/modules/codegen/pom.xml
+++ b/modules/codegen/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-codegen</artifactId>
-    <version>1.0.1-RC1-SNAPSHOT</version>
+    <version>1.0.1-RC2-SNAPSHOT</version>
 
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -52,8 +52,4 @@
             <version>${project.version}</version>
         </dependency>
     </dependencies>
-
-  <scm>
-    <tag>1.0.2QAILS01</tag>
-  </scm>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8b63c8a7/modules/core/pom.xml
----------------------------------------------------------------------
diff --git a/modules/core/pom.xml b/modules/core/pom.xml
index c2c49df..3877801 100644
--- a/modules/core/pom.xml
+++ b/modules/core/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-core</artifactId>
-    <version>1.0.1-RC1-SNAPSHOT</version>
+    <version>1.0.1-RC2-SNAPSHOT</version>
 
     <dependencies>
         <dependency>
@@ -424,8 +424,4 @@
             </build>
         </profile>
     </profiles>
-
-  <scm>
-    <tag>1.0.2QAILS01</tag>
-  </scm>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8b63c8a7/modules/extdata/p2p/pom.xml
----------------------------------------------------------------------
diff --git a/modules/extdata/p2p/pom.xml b/modules/extdata/p2p/pom.xml
index 97be6f8..93a825c 100644
--- a/modules/extdata/p2p/pom.xml
+++ b/modules/extdata/p2p/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-extdata-p2p</artifactId>
-    <version>1.0.1-RC1-SNAPSHOT</version>
+    <version>1.0.1-RC2-SNAPSHOT</version>
 
     <dependencies>
         <dependency>
@@ -93,8 +93,4 @@
             </plugin>
         </plugins>
     </build>
-
-  <scm>
-    <tag>1.0.2QAILS01</tag>
-  </scm>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8b63c8a7/modules/extdata/uri/pom.xml
----------------------------------------------------------------------
diff --git a/modules/extdata/uri/pom.xml b/modules/extdata/uri/pom.xml
index be96f4c..3dde312 100644
--- a/modules/extdata/uri/pom.xml
+++ b/modules/extdata/uri/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-extdata-uri</artifactId>
-    <version>1.0.1-RC1-SNAPSHOT</version>
+    <version>1.0.1-RC2-SNAPSHOT</version>
 
     <dependencies>
         <dependency>
@@ -122,8 +122,4 @@
             </plugin>
         </plugins>
     </build>
-
-  <scm>
-    <tag>1.0.2QAILS01</tag>
-  </scm>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8b63c8a7/modules/geospatial/pom.xml
----------------------------------------------------------------------
diff --git a/modules/geospatial/pom.xml b/modules/geospatial/pom.xml
index 1b1f146..3bdaa5b 100644
--- a/modules/geospatial/pom.xml
+++ b/modules/geospatial/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-geospatial</artifactId>
-    <version>1.0.1-RC1-SNAPSHOT</version>
+    <version>1.0.1-RC2-SNAPSHOT</version>
 
     <dependencies>
         <dependency>
@@ -81,8 +81,4 @@
             <scope>test</scope>
         </dependency>
     </dependencies>
-
-  <scm>
-    <tag>1.0.2QAILS01</tag>
-  </scm>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8b63c8a7/modules/hadoop/pom.xml
----------------------------------------------------------------------
diff --git a/modules/hadoop/pom.xml b/modules/hadoop/pom.xml
index 91ac659..8c3a133 100644
--- a/modules/hadoop/pom.xml
+++ b/modules/hadoop/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-hadoop</artifactId>
-    <version>1.0.1-RC1-SNAPSHOT</version>
+    <version>1.0.1-RC2-SNAPSHOT</version>
 
     <dependencies>
         <dependency>
@@ -224,8 +224,4 @@
             </plugin>
         </plugins>
     </build>
-
-  <scm>
-    <tag>1.0.2QAILS01</tag>
-  </scm>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8b63c8a7/modules/hibernate/pom.xml
----------------------------------------------------------------------
diff --git a/modules/hibernate/pom.xml b/modules/hibernate/pom.xml
index 7435825..2930c84 100644
--- a/modules/hibernate/pom.xml
+++ b/modules/hibernate/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-hibernate</artifactId>
-    <version>1.0.1-RC1-SNAPSHOT</version>
+    <version>1.0.1-RC2-SNAPSHOT</version>
 
     <dependencies>
         <dependency>
@@ -120,8 +120,4 @@
             </testResource>
         </testResources>
     </build>
-
-  <scm>
-    <tag>1.0.2QAILS01</tag>
-  </scm>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8b63c8a7/modules/indexing/pom.xml
----------------------------------------------------------------------
diff --git a/modules/indexing/pom.xml b/modules/indexing/pom.xml
index b453b06..0890931 100644
--- a/modules/indexing/pom.xml
+++ b/modules/indexing/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-indexing</artifactId>
-    <version>1.0.1-RC1-SNAPSHOT</version>
+    <version>1.0.1-RC2-SNAPSHOT</version>
 
     <dependencies>
         <dependency>
@@ -93,8 +93,4 @@
             <scope>test</scope>
         </dependency>
     </dependencies>
-
-  <scm>
-    <tag>1.0.2QAILS01</tag>
-  </scm>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8b63c8a7/modules/jcl/pom.xml
----------------------------------------------------------------------
diff --git a/modules/jcl/pom.xml b/modules/jcl/pom.xml
index 5c2f288..84e5030 100644
--- a/modules/jcl/pom.xml
+++ b/modules/jcl/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-jcl</artifactId>
-    <version>1.0.1-RC1-SNAPSHOT</version>
+    <version>1.0.1-RC2-SNAPSHOT</version>
 
     <dependencies>
         <dependency>
@@ -54,8 +54,4 @@
             <scope>test</scope>
         </dependency>
     </dependencies>
-
-  <scm>
-    <tag>1.0.2QAILS01</tag>
-  </scm>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8b63c8a7/modules/jta/pom.xml
----------------------------------------------------------------------
diff --git a/modules/jta/pom.xml b/modules/jta/pom.xml
index f72a5f1..35393c1 100644
--- a/modules/jta/pom.xml
+++ b/modules/jta/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-jta</artifactId>
-    <version>1.0.1-RC1-SNAPSHOT</version>
+    <version>1.0.1-RC2-SNAPSHOT</version>
 
     <dependencies>
         <dependency>
@@ -82,8 +82,4 @@
             <scope>test</scope>
         </dependency>
     </dependencies>
-
-  <scm>
-    <tag>1.0.2QAILS01</tag>
-  </scm>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8b63c8a7/modules/log4j/pom.xml
----------------------------------------------------------------------
diff --git a/modules/log4j/pom.xml b/modules/log4j/pom.xml
index 14351c9..c180539 100644
--- a/modules/log4j/pom.xml
+++ b/modules/log4j/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-log4j</artifactId>
-    <version>1.0.1-RC1-SNAPSHOT</version>
+    <version>1.0.1-RC2-SNAPSHOT</version>
 
     <dependencies>
         <dependency>
@@ -53,8 +53,4 @@
             <scope>test</scope>
         </dependency>
     </dependencies>
-
-  <scm>
-    <tag>1.0.2QAILS01</tag>
-  </scm>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8b63c8a7/modules/rest-http/pom.xml
----------------------------------------------------------------------
diff --git a/modules/rest-http/pom.xml b/modules/rest-http/pom.xml
index e232407..b81d77c 100644
--- a/modules/rest-http/pom.xml
+++ b/modules/rest-http/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-rest-http</artifactId>
-    <version>1.0.1-RC1-SNAPSHOT</version>
+    <version>1.0.1-RC2-SNAPSHOT</version>
 
     <dependencies>
         <dependency>
@@ -113,8 +113,4 @@
             <version>1.8.3</version>
         </dependency>
     </dependencies>
-
-  <scm>
-    <tag>1.0.2QAILS01</tag>
-  </scm>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8b63c8a7/modules/scalar/pom.xml
----------------------------------------------------------------------
diff --git a/modules/scalar/pom.xml b/modules/scalar/pom.xml
index 400c165..b7cd39d 100644
--- a/modules/scalar/pom.xml
+++ b/modules/scalar/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-scalar</artifactId>
-    <version>1.0.1-RC1-SNAPSHOT</version>
+    <version>1.0.1-RC2-SNAPSHOT</version>
 
     <dependencies>
         <dependency>
@@ -185,8 +185,4 @@
             </plugin>
         </plugins>
     </build>
-
-  <scm>
-    <tag>1.0.2QAILS01</tag>
-  </scm>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8b63c8a7/modules/schedule/pom.xml
----------------------------------------------------------------------
diff --git a/modules/schedule/pom.xml b/modules/schedule/pom.xml
index cddb0f2..bd4ebf2 100644
--- a/modules/schedule/pom.xml
+++ b/modules/schedule/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-schedule</artifactId>
-    <version>1.0.1-RC1-SNAPSHOT</version>
+    <version>1.0.1-RC2-SNAPSHOT</version>
 
     <dependencies>
         <dependency>
@@ -74,8 +74,4 @@
             <scope>test</scope>
         </dependency>
     </dependencies>
-
-  <scm>
-    <tag>1.0.2QAILS01</tag>
-  </scm>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8b63c8a7/modules/schema-import/pom.xml
----------------------------------------------------------------------
diff --git a/modules/schema-import/pom.xml b/modules/schema-import/pom.xml
index 074abcb..441479f 100644
--- a/modules/schema-import/pom.xml
+++ b/modules/schema-import/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-schema-import</artifactId>
-    <version>1.0.1-RC1-SNAPSHOT</version>
+    <version>1.0.1-RC2-SNAPSHOT</version>
 
     <dependencies>
         <dependency>
@@ -99,8 +99,4 @@
             </dependencies>
         </profile>
     </profiles>
-
-  <scm>
-    <tag>1.0.2QAILS01</tag>
-  </scm>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8b63c8a7/modules/slf4j/pom.xml
----------------------------------------------------------------------
diff --git a/modules/slf4j/pom.xml b/modules/slf4j/pom.xml
index 087f1f5..3527591 100644
--- a/modules/slf4j/pom.xml
+++ b/modules/slf4j/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-slf4j</artifactId>
-    <version>1.0.1-RC1-SNAPSHOT</version>
+    <version>1.0.1-RC2-SNAPSHOT</version>
 
     <dependencies>
         <dependency>
@@ -46,8 +46,4 @@
             <version>1.6.4</version>
         </dependency>
     </dependencies>
-
-  <scm>
-    <tag>1.0.2QAILS01</tag>
-  </scm>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8b63c8a7/modules/spring/pom.xml
----------------------------------------------------------------------
diff --git a/modules/spring/pom.xml b/modules/spring/pom.xml
index 2038112..49b97ae 100644
--- a/modules/spring/pom.xml
+++ b/modules/spring/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-spring</artifactId>
-    <version>1.0.1-RC1-SNAPSHOT</version>
+    <version>1.0.1-RC2-SNAPSHOT</version>
 
     <dependencies>
         <dependency>
@@ -115,8 +115,4 @@
             </testResource>
         </testResources>
     </build>
-
-  <scm>
-    <tag>1.0.2QAILS01</tag>
-  </scm>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8b63c8a7/modules/ssh/pom.xml
----------------------------------------------------------------------
diff --git a/modules/ssh/pom.xml b/modules/ssh/pom.xml
index 0611271..528bf1d 100644
--- a/modules/ssh/pom.xml
+++ b/modules/ssh/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-ssh</artifactId>
-    <version>1.0.1-RC1-SNAPSHOT</version>
+    <version>1.0.1-RC2-SNAPSHOT</version>
 
     <dependencies>
         <dependency>
@@ -68,8 +68,4 @@
             <scope>test</scope>
         </dependency>
     </dependencies>
-
-  <scm>
-    <tag>1.0.2QAILS01</tag>
-  </scm>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8b63c8a7/modules/tools/pom.xml
----------------------------------------------------------------------
diff --git a/modules/tools/pom.xml b/modules/tools/pom.xml
index d17b719..d1f91a7 100644
--- a/modules/tools/pom.xml
+++ b/modules/tools/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-tools</artifactId>
-    <version>1.0.1-RC1-SNAPSHOT</version>
+    <version>1.0.1-RC2-SNAPSHOT</version>
 
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -74,8 +74,4 @@
             </dependencies>
         </profile>
     </profiles>
-
-  <scm>
-    <tag>1.0.2QAILS01</tag>
-  </scm>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8b63c8a7/modules/urideploy/pom.xml
----------------------------------------------------------------------
diff --git a/modules/urideploy/pom.xml b/modules/urideploy/pom.xml
index 616eaad..82e87e6 100644
--- a/modules/urideploy/pom.xml
+++ b/modules/urideploy/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-urideploy</artifactId>
-    <version>1.0.1-RC1-SNAPSHOT</version>
+    <version>1.0.1-RC2-SNAPSHOT</version>
 
     <dependencies>
         <dependency>
@@ -150,8 +150,4 @@
             <scope>test</scope>
         </dependency>
     </dependencies>
-
-  <scm>
-    <tag>1.0.2QAILS01</tag>
-  </scm>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8b63c8a7/modules/visor-console/pom.xml
----------------------------------------------------------------------
diff --git a/modules/visor-console/pom.xml b/modules/visor-console/pom.xml
index 761dcc1..4fff01d 100644
--- a/modules/visor-console/pom.xml
+++ b/modules/visor-console/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-visor-console</artifactId>
-    <version>1.0.1-RC1-SNAPSHOT</version>
+    <version>1.0.1-RC2-SNAPSHOT</version>
 
     <dependencies>
         <dependency>
@@ -153,8 +153,4 @@
              </plugin>
         </plugins>
     </build>
-
-  <scm>
-    <tag>1.0.2QAILS01</tag>
-  </scm>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8b63c8a7/modules/visor-plugins/pom.xml
----------------------------------------------------------------------
diff --git a/modules/visor-plugins/pom.xml b/modules/visor-plugins/pom.xml
index b83856c..f05a68b 100644
--- a/modules/visor-plugins/pom.xml
+++ b/modules/visor-plugins/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-visor-plugins</artifactId>
-    <version>1.0.1-RC1-SNAPSHOT</version>
+    <version>1.0.1-RC2-SNAPSHOT</version>
 
     <dependencies>
         <!-- Ignite dependencies -->
@@ -73,8 +73,4 @@
             </resource>
         </resources>
     </build>
-
-  <scm>
-    <tag>1.0.2QAILS01</tag>
-  </scm>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8b63c8a7/modules/web/pom.xml
----------------------------------------------------------------------
diff --git a/modules/web/pom.xml b/modules/web/pom.xml
index 95b9abc..09bdbfa 100644
--- a/modules/web/pom.xml
+++ b/modules/web/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-web</artifactId>
-    <version>1.0.1-RC1-SNAPSHOT</version>
+    <version>1.0.1-RC2-SNAPSHOT</version>
 
     <dependencies>
         <dependency>
@@ -88,8 +88,4 @@
             <scope>test</scope>
         </dependency>
     </dependencies>
-
-  <scm>
-    <tag>1.0.2QAILS01</tag>
-  </scm>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8b63c8a7/modules/yardstick/pom.xml
----------------------------------------------------------------------
diff --git a/modules/yardstick/pom.xml b/modules/yardstick/pom.xml
index 8c4904a..61406b7 100644
--- a/modules/yardstick/pom.xml
+++ b/modules/yardstick/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-yardstick</artifactId>
-    <version>1.0.1-RC1-SNAPSHOT</version>
+    <version>1.0.1-RC2-SNAPSHOT</version>
 
     <properties>
         <yardstick.version>0.7.0</yardstick.version>
@@ -194,8 +194,4 @@
             </plugin>
         </plugins>
     </build>
-
-  <scm>
-    <tag>1.0.2QAILS01</tag>
-  </scm>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8b63c8a7/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 74fe0ba..38d2303 100644
--- a/pom.xml
+++ b/pom.xml
@@ -32,7 +32,7 @@
 
     <groupId>org.apache.ignite</groupId>
     <artifactId>incubator-ignite</artifactId>
-    <version>1.0.1-RC1-SNAPSHOT</version>
+    <version>1.0.1-RC2-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <properties>
@@ -43,7 +43,7 @@
         <url>https://git-wip-us.apache.org/repos/asf/incubator-ignite</url>
         <connection>scm:git:git://git-wip-us.apache.org/repos/asf/incubator-ignite</connection>
         <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/incubator-ignite</developerConnection>
-        <tag>1.0.2QAILS01</tag>
+        <tag>HEAD</tag>
     </scm>
 
     <distributionManagement>


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

Posted by ag...@apache.org.
Merge remote-tracking branch 'origin/ignite-694' into ignite-694


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

Branch: refs/heads/ignite-674
Commit: 32aa57c5875cc4bc07ef9b3bc3fa61a8985ea31d
Parents: 7908aea 7f7c829
Author: sboikov <sb...@gridgain.com>
Authored: Thu Apr 9 09:03:39 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Thu Apr 9 09:03:39 2015 +0300

----------------------------------------------------------------------
 .../cache/distributed/dht/GridDhtAffinityAssignmentRequest.java | 5 +++++
 .../distributed/dht/GridDhtAffinityAssignmentResponse.java      | 5 +++++
 2 files changed, 10 insertions(+)
----------------------------------------------------------------------



[06/50] [abbrv] incubator-ignite git commit: ignite-437: test for bigQuery sql

Posted by ag...@apache.org.
ignite-437: test for bigQuery sql


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

Branch: refs/heads/ignite-674
Commit: fe743909cf483d00ab5189049523ed3353bf5a3d
Parents: 2f458d2
Author: Artem Shutak <as...@gridgain.com>
Authored: Wed Apr 8 19:55:29 2015 +0300
Committer: Artem Shutak <as...@gridgain.com>
Committed: Wed Apr 8 19:55:29 2015 +0300

----------------------------------------------------------------------
 .../h2/sql/AbstractH2CompareQueryTest.java      | 341 ++++++++
 .../query/h2/sql/BaseH2CompareQueryTest.java    | 823 +++++++++++++++++
 .../query/h2/sql/H2CompareBigQueryTest.java     | 707 +++++++++++++++
 .../query/h2/sql/IgniteVsH2QueryTest.java       | 875 -------------------
 .../IgniteCacheQuerySelfTestSuite.java          |   5 +-
 .../processors/query/h2/sql/bigQuery.sql        |  55 ++
 6 files changed, 1929 insertions(+), 877 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fe743909/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/AbstractH2CompareQueryTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/AbstractH2CompareQueryTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/AbstractH2CompareQueryTest.java
new file mode 100644
index 0000000..c74493f
--- /dev/null
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/AbstractH2CompareQueryTest.java
@@ -0,0 +1,341 @@
+/*
+ * 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;
+
+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.util.typedef.internal.*;
+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.testframework.junits.common.*;
+import org.jetbrains.annotations.*;
+
+import java.sql.*;
+import java.util.*;
+
+/**
+ * Abstract test framework to compare query results from h2 database instance and mixed ignite caches (replicated and partitioned)
+ * which have the same data models and data content. 
+ */
+public abstract class AbstractH2CompareQueryTest extends GridCommonAbstractTest {
+    /** */
+    private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
+
+    /** Partitioned cache. */
+    protected static IgniteCache pCache;
+
+    /** Replicated cache. */
+    protected static IgniteCache rCache;
+    
+    /** H2 db connection. */
+    protected static Connection conn;
+
+    /** {@inheritDoc} */
+    @SuppressWarnings("unchecked")
+    @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
+        IgniteConfiguration c = super.getConfiguration(gridName);
+
+        TcpDiscoverySpi disco = new TcpDiscoverySpi();
+
+        disco.setIpFinder(IP_FINDER);
+
+        c.setDiscoverySpi(disco);
+
+        c.setMarshaller(new OptimizedMarshaller(true));
+
+        c.setCacheConfiguration(createCache("part", CacheMode.PARTITIONED),
+            createCache("repl", CacheMode.REPLICATED)
+        );
+
+        return c;
+    }
+
+    /**
+     * Creates new cache configuration.
+     *
+     * @param name Cache name.
+     * @param mode Cache mode.
+     * @return Cache configuration.
+     */
+    private CacheConfiguration createCache(String name, CacheMode mode) {
+        CacheConfiguration<?,?> cc = defaultCacheConfiguration();
+
+        cc.setName(name);
+        cc.setCacheMode(mode);
+        cc.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
+        cc.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
+
+        setIndexedTypes(cc, mode);
+
+        return cc;
+    }
+
+    /**
+     * @param cc Cache configuration.
+     * @param mode Cache Mode.
+     */
+    protected abstract void setIndexedTypes(CacheConfiguration<?, ?> cc, CacheMode mode) ;
+
+    /** {@inheritDoc} */
+    @Override protected void beforeTestsStarted() throws Exception {
+        super.beforeTestsStarted();
+
+        Ignite ignite = startGrids(4);
+
+        pCache = ignite.cache("part");
+        
+        rCache = ignite.cache("repl");
+
+        awaitPartitionMapExchange();
+        
+        conn = openH2Connection(false);
+
+        initializeH2Schema();
+
+        initCacheAndDbData();
+
+        checkAllDataEquals();
+    }
+    
+    /** {@inheritDoc} */
+    @Override protected void afterTestsStopped() throws Exception {
+        super.afterTestsStopped();
+        
+        conn.close();
+        
+        stopAllGrids();
+    }
+
+    /**
+     * Populate cache and h2 database with test data.
+     */
+    protected abstract void initCacheAndDbData() throws SQLException;
+
+    /**
+     * @throws Exception If failed.
+     */
+    protected abstract void checkAllDataEquals() throws Exception;
+
+    /**
+     * Initialize h2 database schema.
+     *
+     * @throws SQLException If exception.
+     */
+    protected abstract void initializeH2Schema() throws SQLException;
+
+    /**
+     * Gets connection from a pool.
+     *
+     * @param autocommit {@code true} If connection should use autocommit mode.
+     * @return Pooled connection.
+     * @throws SQLException In case of error.
+     */
+    private Connection openH2Connection(boolean autocommit) throws SQLException {
+        System.setProperty("h2.serializeJavaObject", "false");
+        
+        String dbName = "test";
+        
+        Connection conn = DriverManager.getConnection("jdbc:h2:mem:" + dbName + ";DB_CLOSE_DELAY=-1");
+
+        conn.setAutoCommit(autocommit);
+
+        return conn;
+    }
+
+    /**
+     * Execute given sql query on h2 database and on partitioned ignite cache and compare results.
+     *
+     * @param sql SQL query.
+     * @param args SQL arguments.
+     * then results will compare as ordered queries.
+     * @return Result set after SQL query execution. 
+     * @throws SQLException If exception.
+     */
+    protected final List<List<?>> compareQueryRes0(String sql, @Nullable Object... args) throws SQLException {
+        return compareQueryRes0(pCache, sql, args, Ordering.RANDOM);
+    }
+
+    /**
+     * Execute given sql query on h2 database and on ignite cache and compare results. 
+     * Expected that results are not ordered.
+     *
+     * @param cache Ignite cache.
+     * @param sql SQL query.
+     * @param args SQL arguments.
+     * then results will compare as ordered queries.
+     * @return Result set after SQL query execution. 
+     * @throws SQLException If exception.
+     */
+    protected final List<List<?>> compareQueryRes0(IgniteCache cache, String sql, @Nullable Object... args) throws SQLException {
+        return compareQueryRes0(cache, sql, args, Ordering.RANDOM);
+    }
+
+    /**
+     * Execute given sql query on h2 database and on partitioned ignite cache and compare results.
+     * Expected that results are ordered.
+     *
+     * @param sql SQL query.
+     * @param args SQL arguments.
+     * then results will compare as ordered queries.
+     * @return Result set after SQL query execution.
+     * @throws SQLException If exception.
+     */
+    protected final List<List<?>> compareOrderedQueryRes0(String sql, @Nullable Object... args) throws SQLException {
+        return compareQueryRes0(pCache, sql, args, Ordering.ORDERED);
+    }
+
+    /**
+     * Execute given sql query on h2 database and on ignite cache and compare results.
+     *
+     * @param cache Ignite cache.
+     * @param sql SQL query.
+     * @param args SQL arguments.
+     * @param ordering Expected ordering of SQL results. If {@link Ordering#ORDERED}
+     * then results will compare as ordered queries.
+     * @return Result set after SQL query execution.
+     * @throws SQLException If exception.
+     */    
+    @SuppressWarnings("unchecked")
+    protected final List<List<?>> compareQueryRes0(IgniteCache cache, String sql, @Nullable Object[] args, Ordering ordering) throws SQLException {
+        if (args == null)
+            args = new Object[] {null};
+        
+        info("Sql query:\n" + sql + "\nargs=" + Arrays.toString(args));
+
+        List<List<?>> h2Res = executeH2Query(sql, args);
+
+        List<List<?>> cacheRes = cache.query(new SqlFieldsQuery(sql).setArgs(args)).getAll();
+
+        assertRsEquals(h2Res, cacheRes, ordering);
+        
+        return h2Res;
+    }
+
+    /**
+     * Execute SQL query on h2 database.
+     *
+     * @param sql SQL query.
+     * @param args SQL arguments.
+     * @return Result of SQL query on h2 database.
+     * @throws SQLException If exception.
+     */
+    private List<List<?>> executeH2Query(String sql, Object[] args) throws SQLException {
+        List<List<?>> res = new ArrayList<>();
+        ResultSet rs = null;
+
+        try(PreparedStatement st = conn.prepareStatement(sql)) {
+            for (int idx = 0; idx < args.length; idx++)
+                st.setObject(idx + 1, args[idx]);
+
+            rs = st.executeQuery();
+
+            int colCnt = rs.getMetaData().getColumnCount();
+
+            while (rs.next()) {
+                List<Object> row = new ArrayList<>(colCnt);
+                
+                for (int i = 1; i <= colCnt; i++)
+                    row.add(rs.getObject(i));
+                
+                res.add(row);
+            }
+        }
+        finally {
+            U.closeQuiet(rs);
+        }
+
+        return res;
+    }
+
+    /**
+     * Assert equals of result sets according to expected ordering.
+     *
+     * @param rs1 Expected result set.
+     * @param rs2 Actual result set.
+     * @param ordering Expected ordering of SQL results. If {@link Ordering#ORDERED}
+     * then results will compare as ordered queries.
+     */
+    private void assertRsEquals(List<List<?>> rs1, List<List<?>> rs2, Ordering ordering) {
+        assertEquals("Rows count has to be equal.", rs1.size(), rs2.size());
+        
+        switch (ordering){
+            case ORDERED:
+                for (int rowNum = 0; rowNum < rs1.size(); rowNum++) {
+                    List<?> row1 = rs1.get(rowNum);
+                    List<?> row2 = rs2.get(rowNum);
+
+                    assertEquals("Columns count have to be equal.", row1.size(), row2.size());
+
+                    for (int colNum = 0; colNum < row1.size(); colNum++)
+                        assertEquals("Row=" + rowNum + ", column=" + colNum, row1.get(colNum), row2.get(colNum));
+                }
+
+                break;
+            case RANDOM:
+                Map<List<?>, Integer> rowsWithCnt1 = extractUniqueRowsWithCounts(rs1);
+                Map<List<?>, Integer> rowsWithCnt2 = extractUniqueRowsWithCounts(rs2);
+                
+                assertEquals("Unique rows count has to be equal.", rowsWithCnt1.size(), rowsWithCnt2.size());
+
+                for (Map.Entry<List<?>, Integer> entry1 : rowsWithCnt1.entrySet()) {
+                    List<?> row = entry1.getKey();
+                    Integer cnt1 = entry1.getValue();
+
+                    Integer cnt2 = rowsWithCnt2.get(row);
+
+                    assertEquals("Row has different occurance number.\nRow=" + row, cnt1, cnt2);
+                }
+                
+                break;
+            default: 
+                throw new IllegalStateException();
+        }
+    }
+
+    /**
+     * @param rs Result set.
+     * @return Map of unique rows at the result set to number of occuriances at the result set.
+     */
+    private Map<List<?>, Integer> extractUniqueRowsWithCounts(Iterable<List<?>> rs) {
+        Map<List<?>, Integer> res = new HashMap<>();
+
+        for (List<?> row : rs) {
+            Integer cnt = res.get(row);
+            
+            if (cnt == null)
+                cnt = 0;
+            
+            res.put(row, cnt + 1);
+        }
+        return res;
+    }
+    
+    /**
+     * Ordering type.
+     */
+    protected enum Ordering {
+        /** Random. */
+        RANDOM, 
+        /** Ordered. */
+        ORDERED
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fe743909/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/BaseH2CompareQueryTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/BaseH2CompareQueryTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/BaseH2CompareQueryTest.java
new file mode 100644
index 0000000..eea834d
--- /dev/null
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/BaseH2CompareQueryTest.java
@@ -0,0 +1,823 @@
+/*
+ * 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;
+
+import org.apache.ignite.cache.*;
+import org.apache.ignite.cache.affinity.*;
+import org.apache.ignite.cache.query.annotations.*;
+import org.apache.ignite.configuration.*;
+
+import java.io.*;
+import java.sql.*;
+import java.sql.Date;
+import java.util.*;
+
+/**
+ * Base set of queries to compare query results from h2 database instance and mixed ignite caches (replicated and partitioned)
+ * which have the same data models and data content.
+ */
+public class BaseH2CompareQueryTest extends AbstractH2CompareQueryTest {
+    /** Org count. */
+    public static final int ORG_CNT = 30;
+    
+    /** Address count. */
+    public static final int ADDR_CNT = 10;
+    
+    /** Person count. */
+    public static final int PERS_CNT = 50;
+    
+    /** Product count. */
+    public static final int PROD_CNT = 100;
+
+    /** Purchase count. */
+    public static final int PURCH_CNT = PROD_CNT * 5;
+
+    /** {@inheritDoc} */
+    @Override protected void setIndexedTypes(CacheConfiguration<?, ?> cc, CacheMode mode) {
+        if (mode == CacheMode.PARTITIONED)
+            cc.setIndexedTypes(
+                Integer.class, Organization.class,
+                AffinityKey.class, Person.class,
+                AffinityKey.class, Purchase.class
+            );
+        else if (mode == CacheMode.REPLICATED)
+            cc.setIndexedTypes(
+                Integer.class, Product.class,
+                Integer.class, Address.class
+            );
+        else
+            throw new IllegalStateException("mode: " + mode);
+    }
+
+    /** {@inheritDoc} */
+    @SuppressWarnings("unchecked")
+    @Override protected void initCacheAndDbData() throws SQLException {
+        int idGen = 0;
+
+        // Organizations.
+        List<Organization> organizations = new ArrayList<>();
+
+        for (int i = 0; i < ORG_CNT; i++) {
+            int id = idGen++;
+
+            Organization org = new Organization(id, "Org" + id);
+
+            organizations.add(org);
+
+            pCache.put(org.id, org);
+
+            insertInDb(org);
+        }
+        
+       // Adresses.
+        List<Address> addreses = new ArrayList<>();
+
+        for (int i = 0; i < ADDR_CNT; i++) {
+            int id = idGen++;
+
+            Address addr = new Address(id, "Addr" + id);
+
+            addreses.add(addr);
+
+            rCache.put(addr.id, addr);
+
+            insertInDb(addr);
+        }
+
+        // Persons.
+        List<Person> persons = new ArrayList<>();
+
+        for (int i = 0; i < PERS_CNT; i++) {
+            int id = idGen++;
+
+            Person person = new Person(id, organizations.get(i % organizations.size()),
+                "name" + id, "lastName" + id, id * 100.0, addreses.get(i % addreses.size()));
+
+            // Add a Person without lastname.
+            if (id == organizations.size() + 1)
+                person.lastName = null;
+
+            persons.add(person);
+
+            pCache.put(person.key(), person);
+
+            insertInDb(person);
+        }
+
+        // Products.
+        List<Product> products = new ArrayList<>();
+
+        for (int i = 0; i < PROD_CNT; i++) {
+            int id = idGen++;
+
+            Product product = new Product(id, "Product" + id, id*1000);
+
+            products.add(product);
+
+            rCache.put(product.id, product);
+
+            insertInDb(product);
+        }
+
+        // Purchases.
+        for (int i = 0; i < PURCH_CNT; i++) {
+            int id = idGen++;
+
+            Person person = persons.get(i % persons.size());
+            
+            Purchase purchase = new Purchase(id, products.get(i % products.size()), person.orgId, person);
+
+            pCache.put(purchase.key(), purchase);
+
+            insertInDb(purchase);
+        }
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void checkAllDataEquals() throws Exception {
+        compareQueryRes0("select _key, _val, id, name from \"part\".Organization");
+
+        compareQueryRes0("select _key, _val, id, firstName, lastName, orgId, salary from \"part\".Person");
+
+        compareQueryRes0("select _key, _val, id, personId, productId, organizationId from \"part\".Purchase");
+
+        compareQueryRes0(rCache, "select _key, _val, id, name, price from \"repl\".Product");
+    }
+
+    /**
+     * *
+     * @throws Exception
+     */
+    public void testAllExamples() throws Exception {
+//        compareQueryRes0("select ? limit ? offset ?");
+
+//        compareQueryRes0("select cool1()");
+//        compareQueryRes0("select cool1() z");
+//
+//        compareQueryRes0("select b,a from table0('aaa', 100)");
+//        compareQueryRes0("select * from table0('aaa', 100)");
+//        compareQueryRes0("select * from table0('aaa', 100) t0");
+//        compareQueryRes0("select x.a, y.b from table0('aaa', 100) x natural join table0('bbb', 100) y");
+//        compareQueryRes0("select * from table0('aaa', 100) x join table0('bbb', 100) y on x.a=y.a and x.b = 'bbb'");
+//        compareQueryRes0("select * from table0('aaa', 100) x left join table0('bbb', 100) y on x.a=y.a and x.b = 'bbb'");
+//        compareQueryRes0("select * from table0('aaa', 100) x left join table0('bbb', 100) y on x.a=y.a where x.b = 'bbb'");
+//        compareQueryRes0("select * from table0('aaa', 100) x left join table0('bbb', 100) y where x.b = 'bbb'");
+
+        final String addStreet = "Addr" + ORG_CNT + 1;
+        
+        List<List<?>> res = compareQueryRes0("select avg(old) from \"part\".Person left join \"repl\".Address " +
+            " on Person.addrId = Address.id where lower(Address.street) = lower(?)", addStreet);
+        
+        assertNotSame(0, res);
+
+        compareQueryRes0("select avg(old) from \"part\".Person join \"repl\".Address on Person.addrId = Address.id " +
+            "where lower(Address.street) = lower(?)", addStreet);
+
+        compareQueryRes0("select avg(old) from \"part\".Person left join \"repl\".Address where Person.addrId = Address.id " +
+            "and lower(Address.street) = lower(?)", addStreet);
+
+        compareQueryRes0("select avg(old) from \"part\".Person, \"repl\".Address where Person.addrId = Address.id " +
+            "and lower(Address.street) = lower(?)", addStreet);
+
+        compareQueryRes0("select firstName, date from \"part\".Person");
+        compareQueryRes0("select distinct firstName, date from \"part\".Person");
+        
+        final String star = " _key, _val, id, firstName, lastName, orgId, salary, addrId, old, date ";
+        
+        compareQueryRes0("select " + star + " from \"part\".Person p");
+        compareQueryRes0("select " + star + " from \"part\".Person");
+        compareQueryRes0("select distinct " + star + " from \"part\".Person");
+        compareQueryRes0("select p.firstName, date from \"part\".Person p");
+        
+        compareQueryRes0("select p._key, p._val, p.id, p.firstName, p.lastName, p.orgId, p.salary, p.addrId, p.old, " +
+            " p.date, a._key, a._val, a.id, a.street" +
+            " from \"part\".Person p, \"repl\".Address a");
+//        compareQueryRes0("select p.* from \"part\".Person p, \"repl\".Address a");
+//        compareQueryRes0("select person.* from \"part\".Person, \"repl\".Address a");
+//        compareQueryRes0("select p.*, street from \"part\".Person p, \"repl\".Address a");
+        compareQueryRes0("select p.firstName, a.street from \"part\".Person p, \"repl\".Address a");
+        compareQueryRes0("select distinct p.firstName, a.street from \"part\".Person p, \"repl\".Address a");
+        compareQueryRes0("select distinct firstName, street from \"part\".Person, \"repl\".Address group by firstName, street ");
+        compareQueryRes0("select distinct firstName, street from \"part\".Person, \"repl\".Address");
+        // TODO uncomment and investigate (Rows count has to be equal.: Expected :2500, Actual :900)
+//        compareQueryRes0("select p1.firstName, a2.street from \"part\".Person p1, \"repl\".Address a1, \"part\".Person p2, \"repl\".Address a2");
+
+        //TODO look at it (org.h2.jdbc.JdbcSQLException: Feature not supported: "VARCHAR +" // at H2)
+//        compareQueryRes0("select p.firstName n, a.street s from \"part\".Person p, \"repl\".Address a");
+        compareQueryRes0("select p.firstName, 1 as i, 'aaa' s from \"part\".Person p");
+
+//        compareQueryRes0("select p.firstName + 'a', 1 * 3 as i, 'aaa' s, -p.old, -p.old as old from \"part\".Person p");
+//        compareQueryRes0("select p.firstName || 'a' + p.firstName, (p.old * 3) % p.old - p.old / p.old, p.firstName = 'aaa', " +
+//            " p.firstName is p.firstName, p.old > 0, p.old >= 0, p.old < 0, p.old <= 0, p.old <> 0, p.old is not p.old, " +
+//            " p.old is null, p.old is not null " +
+//            " from \"part\".Person p");
+
+        compareQueryRes0("select p.firstName from \"part\".Person p where firstName <> 'ivan'");
+        compareQueryRes0("select p.firstName from \"part\".Person p where firstName like 'i%'");
+        compareQueryRes0("select p.firstName from \"part\".Person p where firstName regexp 'i%'");
+        compareQueryRes0("select p.firstName from \"part\".Person p, \"repl\".Address a where p.firstName <> 'ivan' and a.id > 10 or not (a.id = 100)");
+
+        compareQueryRes0("select case p.firstName when 'a' then 1 when 'a' then 2 end as a from \"part\".Person p");
+        compareQueryRes0("select case p.firstName when 'a' then 1 when 'a' then 2 else -1 end as a from \"part\".Person p");
+
+        compareQueryRes0("select abs(p.old)  from \"part\".Person p");
+        compareQueryRes0("select cast(p.old as numeric(10, 2)) from \"part\".Person p");
+        compareQueryRes0("select cast(p.old as numeric(10, 2)) z from \"part\".Person p");
+        compareQueryRes0("select cast(p.old as numeric(10, 2)) as z from \"part\".Person p");
+
+        // TODO alanyse
+//        compareQueryRes0("select " + star + " from \"part\".Person p where p.firstName in ('a', 'b', '_' + RAND())"); // test ConditionIn
+        compareQueryRes0("select " + star + " from \"part\".Person p where p.firstName in ('a', 'b', 'c')"); // test ConditionInConstantSet
+        compareQueryRes0("select " + star + " from \"part\".Person p where p.firstName in (select a.street from \"repl\".Address a)"); // test ConditionInConstantSet
+
+        compareQueryRes0("select (select a.street from \"repl\".Address a where a.id = p.addrId) from \"part\".Person p"); // test ConditionInConstantSet
+
+        compareQueryRes0("select p.firstName, ? from \"part\".Person p where firstName regexp ? and p.old < ?", 10, "Iv*n", 40);
+
+        compareQueryRes0("select count(*) as a from \"part\".Person");
+        compareQueryRes0("select count(*) as a, count(p.*), count(p.firstName) from \"part\".Person p");
+        compareQueryRes0("select count(distinct p.firstName) from \"part\".Person p");
+
+        compareQueryRes0("select p.firstName, avg(p.old), max(p.old) from \"part\".Person p group by p.firstName");
+        compareQueryRes0("select p.firstName n, avg(p.old) a, max(p.old) m from \"part\".Person p group by p.firstName");
+        compareQueryRes0("select p.firstName n, avg(p.old) a, max(p.old) m from \"part\".Person p group by n");
+
+        compareQueryRes0("select p.firstName n, avg(p.old) a, max(p.old) m from \"part\".Person p group by p.addrId, p.firstName");
+        compareQueryRes0("select p.firstName n, avg(p.old) a, max(p.old) m from \"part\".Person p group by p.firstName, p.addrId");
+        compareQueryRes0("select p.firstName n, max(p.old) + min(p.old) / count(distinct p.old) from \"part\".Person p group by p.firstName");
+        compareQueryRes0("select p.firstName n, max(p.old) maxOld, min(p.old) minOld from \"part\".Person p group by p.firstName having maxOld > 10 and min(p.old) < 1");
+
+        compareQueryRes0("select p.firstName n, avg(p.old) a, max(p.old) m from \"part\".Person p group by p.firstName order by n");
+        compareQueryRes0("select p.firstName n, avg(p.old) a, max(p.old) m from \"part\".Person p group by p.firstName order by p.firstName");
+        compareQueryRes0("select p.firstName n, avg(p.old) a, max(p.old) m from \"part\".Person p group by p.firstName order by p.firstName, m");
+        compareQueryRes0("select p.firstName n, avg(p.old) a, max(p.old) m from \"part\".Person p group by p.firstName order by p.firstName, max(p.old) desc");
+        compareQueryRes0("select p.firstName n, avg(p.old) a, max(p.old) m from \"part\".Person p group by p.firstName order by p.firstName nulls first");
+        compareQueryRes0("select p.firstName n, avg(p.old) a, max(p.old) m from \"part\".Person p group by p.firstName order by p.firstName nulls last");
+        compareQueryRes0("select p.firstName n from \"part\".Person p order by p.old + 10");
+        compareQueryRes0("select p.firstName n from \"part\".Person p order by p.old + 10, p.firstName");
+        compareQueryRes0("select p.firstName n from \"part\".Person p order by p.old + 10, p.firstName desc");
+
+        compareQueryRes0("select p.firstName n from \"part\".Person p, (select a.street from \"repl\".Address a where a.street is not null) ");
+        compareQueryRes0("select street from \"part\".Person p, (select a.street from \"repl\".Address a where a.street is not null) ");
+        compareQueryRes0("select addr.street from \"part\".Person p, (select a.street from \"repl\".Address a where a.street is not null) addr");
+
+        compareQueryRes0("select p.firstName n from \"part\".Person p order by p.old + 10");
+
+        compareQueryRes0("select 'foo' as bar union select 'foo' as bar");
+        compareQueryRes0("select 'foo' as bar union all select 'foo' as bar");
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testParamSubstitution() throws Exception {
+        compareQueryRes0("select ? from \"part\".Person", "Some arg");
+    }
+
+    /**
+     * @throws SQLException If failed.
+     */
+    public void testAggregateOrderBy() throws SQLException {
+        compareOrderedQueryRes0("select firstName name, count(*) cnt from \"part\".Person group by name order by cnt desc");
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testNullParamSubstitution() throws Exception {
+        List<List<?>> rs1 = compareQueryRes0("select id from \"part\".Person where lastname is ?", null);
+
+        // Ensure we find something.
+        assertNotSame(0, rs1.size());
+    }
+
+    /**
+     *
+     */
+    public void testUnion() throws SQLException {
+        String base = "select _val v from \"part\".Person";
+
+        compareQueryRes0(base + " union all " + base);
+        compareQueryRes0(base + " union " + base);
+
+        base = "select firstName||lastName name, salary from \"part\".Person";
+
+        assertEquals(10, compareOrderedQueryRes0(base + " union all " + base + " order by salary desc").size());
+        assertEquals(5, compareOrderedQueryRes0(base + " union " + base + " order by salary desc").size());
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testEmptyResult() throws Exception {
+        compareQueryRes0("select id from \"part\".Person where 0 = 1");
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testSqlQueryWithAggregation() throws Exception {
+        compareQueryRes0("select avg(salary) from \"part\".Person, \"part\".Organization where Person.orgId = Organization.id and "
+            + "lower(Organization.name) = lower(?)", "Org1");
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testSqlFieldsQuery() throws Exception {
+        compareQueryRes0("select concat(firstName, ' ', lastName) from \"part\".Person");
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testSqlFieldsQueryWithJoin() throws Exception {
+        compareQueryRes0("select concat(firstName, ' ', lastName), "
+            + "Organization.name from \"part\".Person, \"part\".Organization where "
+            + "Person.orgId = Organization.id");
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testOrdered() throws Exception {
+        compareOrderedQueryRes0("select firstName, lastName" +
+                " from \"part\".Person" +
+                " order by lastName, firstName"
+        );
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testSimpleJoin() throws Exception {
+        // Have expected results.
+        compareQueryRes0("select id, firstName, lastName" +
+            "  from \"part\".Person" +
+            "  where Person.id = ?", 3);
+
+        // Ignite cache return 0 results...
+        compareQueryRes0("select pe.firstName" +
+            "  from \"part\".Person pe join \"part\".Purchase pu on pe.id = pu.personId " +
+            "  where pe.id = ?", 3);
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testSimpleReplicatedSelect() throws Exception {
+        compareQueryRes0(rCache, "select id, name from \"repl\".Product");
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void _testCrossCache() throws Exception {
+        //TODO Investigate (should be 20 results instead of 0).
+        compareQueryRes0("select firstName, lastName" +
+            "  from \"part\".Person, \"part\".Purchase" +
+            "  where Person.id = Purchase.personId");
+
+        //TODO Investigate.
+        compareQueryRes0("select concat(firstName, ' ', lastName), Product.name " +
+            "  from \"part\".Person, \"part\".Purchase, \"repl\".Product " +
+            "  where Person.id = Purchase.personId and Purchase.productId = Product.id" +
+            "  group by Product.id");
+
+        //TODO Investigate.
+        compareQueryRes0("select concat(firstName, ' ', lastName), count (Product.id) " +
+            "  from \"part\".Person, \"part\".Purchase, \"repl\".Product " +
+            "  where Person.id = Purchase.personId and Purchase.productId = Product.id" +
+            "  group by Product.id");
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void initializeH2Schema() throws SQLException {
+        Statement st = conn.createStatement();
+
+        st.execute("CREATE SCHEMA \"part\"");
+        st.execute("CREATE SCHEMA \"repl\"");
+
+        st.execute("create table \"part\".ORGANIZATION" +
+            "  (_key int not null," +
+            "  _val other not null," +
+            "  id int unique," +
+            "  name varchar(255))");
+
+        st.execute("create table \"part\".PERSON" +
+            "  (_key other not null ," +
+            "   _val other not null ," +
+            "  id int unique, " +
+            "  firstName varchar(255), " +
+            "  lastName varchar(255)," +
+            "  orgId int not null," +
+            "  salary double," +
+            "  addrId int," +
+            "  old int," +
+            "  date Date )");
+
+        st.execute("create table \"repl\".PRODUCT" +
+            "  (_key int not null ," +
+            "   _val other not null ," +
+            "  id int unique, " +
+            "  name varchar(255), " +
+            "  price int)");
+
+        st.execute("create table \"part\".PURCHASE" +
+            "  (_key other not null ," +
+            "   _val other not null ," +
+            "  id int unique, " +
+            "  personId int, " +
+            "  organizationId int, " +
+            "  productId int)");
+
+        st.execute("create table \"repl\".ADDRESS" +
+            "  (_key int not null ," +
+            "   _val other not null ," +
+            "  id int unique, " +
+            "  street varchar(255))");
+
+        conn.commit();
+    }
+    
+    /**
+     * Insert {@link Organization} at h2 database.
+     *
+     * @param org Organization.
+     * @throws SQLException If exception.
+     */
+    private void insertInDb(Organization org) throws SQLException {
+        try(PreparedStatement st = conn.prepareStatement(
+            "insert into \"part\".ORGANIZATION (_key, _val, id, name) values(?, ?, ?, ?)")) {
+            st.setObject(1, org.id);
+            st.setObject(2, org);
+            st.setObject(3, org.id);
+            st.setObject(4, org.name);
+
+            st.executeUpdate();
+        }
+    }
+
+    /**
+     * Insert {@link Person} at h2 database.
+     *
+     * @param p Person.
+     * @throws SQLException If exception.
+     */
+    private void insertInDb(Person p) throws SQLException {
+        try(PreparedStatement st = conn.prepareStatement("insert into \"part\".PERSON " +
+            "(_key, _val, id, firstName, lastName, orgId, salary, addrId, old, date) values(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)")) {
+            st.setObject(1, p.key());
+            st.setObject(2, p);
+            st.setObject(3, p.id);
+            st.setObject(4, p.firstName);
+            st.setObject(5, p.lastName);
+            st.setObject(6, p.orgId);
+            st.setObject(7, p.salary);
+            st.setObject(8, p.addrId);
+            st.setObject(9, p.old);
+            st.setObject(10, p.date);
+
+            st.executeUpdate();
+        }
+    }
+
+    /**
+     * Insert {@link Product} at h2 database.
+     *
+     * @param p Product.
+     * @throws SQLException If exception.
+     */
+    private void insertInDb(Product p) throws SQLException {
+        try(PreparedStatement st = conn.prepareStatement(
+            "insert into \"repl\".PRODUCT (_key, _val, id, name, price) values(?, ?, ?, ?, ?)")) {
+            st.setObject(1, p.id);
+            st.setObject(2, p);
+            st.setObject(3, p.id);
+            st.setObject(4, p.name);
+            st.setObject(5, p.price);
+
+            st.executeUpdate();
+        }
+    }
+
+    /**
+     * Insert {@link Purchase} at h2 database.
+     *
+     * @param p Purchase.
+     * @throws SQLException If exception.
+     */
+    private void insertInDb(Purchase p) throws SQLException {
+        try(PreparedStatement st = conn.prepareStatement(
+            "insert into \"part\".PURCHASE (_key, _val, id, personId, productId, organizationId) values(?, ?, ?, ?, ?, ?)")) {
+            st.setObject(1, p.key());
+            st.setObject(2, p);
+            st.setObject(3, p.id);
+            st.setObject(4, p.personId);
+            st.setObject(5, p.productId);
+            st.setObject(6, p.organizationId);
+
+            st.executeUpdate();
+        }
+    }
+    
+    /**
+     * Insert {@link Address} at h2 database.
+     *
+     * @param a Address.
+     * @throws SQLException If exception.
+     */
+    private void insertInDb(Address a) throws SQLException {
+        try(PreparedStatement st = conn.prepareStatement(
+            "insert into \"repl\".ADDRESS (_key, _val, id, street) values(?, ?, ?, ?)")) {
+            st.setObject(1, a.id);
+            st.setObject(2, a);
+            st.setObject(3, a.id);
+            st.setObject(4, a.street);
+
+            st.executeUpdate();
+        }
+    }
+
+    @QuerySqlFunction
+    public static int cool1() {
+        return 1;
+    }
+
+    @QuerySqlFunction
+    public static ResultSet table0(Connection c, String a, int b) throws SQLException {
+        return c.createStatement().executeQuery("select '" + a + "' as a, " +  b + " as b");
+    }
+
+    /**
+     * Person class. Stored at partitioned cache.
+     */
+    private static class Person implements Serializable {
+        /** Person ID (indexed). */
+        @QuerySqlField(index = true)
+        private int id;
+
+        /** Organization ID (indexed). */
+        @QuerySqlField(index = true)
+        private int orgId;
+
+        /** First name (not-indexed). */
+        @QuerySqlField
+        private String firstName;
+
+        /** Last name (not indexed). */
+        @QuerySqlField
+        private String lastName;
+
+        /** Salary (indexed). */
+        @QuerySqlField(index = true)
+        private double salary;
+
+        /** Address Id (indexed). */
+        @QuerySqlField(index = true)
+        private int addrId;
+
+        /** Date. */
+        @QuerySqlField(index = true)
+        public Date date = new Date(System.currentTimeMillis());
+
+        /** Old. */
+        @QuerySqlField(index = true)
+        public int old = 17;
+
+
+        /**
+         * Constructs person record.
+         *
+         * @param org Organization.
+         * @param firstName First name.
+         * @param lastName Last name.
+         * @param salary Salary.
+         */
+        Person(int id, Organization org, String firstName, String lastName, double salary, Address addr) {
+            this.id = id;
+            this.firstName = firstName;
+            this.lastName = lastName;
+            this.salary = salary;
+            orgId = org.id;
+            addrId = addr.id;
+        }
+
+        /**
+         * @return Custom affinity key to guarantee that person is always collocated with organization.
+         */
+        public AffinityKey<Integer> key() {
+            return new AffinityKey<>(id, orgId);
+        }
+
+        /** {@inheritDoc} */
+        @Override public boolean equals(Object o) {
+            return this == o || o instanceof Person && id == ((Person)o).id;
+
+        }
+
+        /** {@inheritDoc} */
+        @Override public int hashCode() {
+            return id;
+        }
+
+        /** {@inheritDoc} */
+        @Override public String toString() {
+            return "Person [firstName=" + firstName +
+                ", lastName=" + lastName +
+                ", id=" + id +
+                ", orgId=" + orgId +
+                ", salary=" + salary + 
+                ", addrId=" + addrId + ']';
+        }
+    }
+
+    /**
+     * Organization class. Stored at partitioned cache.
+     */
+    private static class Organization implements Serializable {
+        /** Organization ID (indexed). */
+        @QuerySqlField(index = true)
+        private int id;
+
+        /** Organization name (indexed). */
+        @QuerySqlField(index = true)
+        private String name;
+
+        /**
+         * Create Organization.
+         *
+         * @param id Organization ID.
+         * @param name Organization name.
+         */
+        Organization(int id, String name) {
+            this.id = id;
+            this.name = name;
+        }
+
+        /** {@inheritDoc} */
+        @Override public boolean equals(Object o) {
+            return this == o || o instanceof Organization && id == ((Organization)o).id;
+
+        }
+
+        /** {@inheritDoc} */
+        @Override public int hashCode() {
+            return id;
+        }
+
+        /** {@inheritDoc} */
+        @Override public String toString() {
+            return "Organization [id=" + id + ", name=" + name + ']';
+        }
+    }
+
+    /**
+     * Product class. Stored at replicated cache.
+     */
+    private static class Product implements Serializable {
+        /** Primary key. */
+        @QuerySqlField(index = true)
+        private int id;
+
+        /** Product name. */
+        @QuerySqlField
+        private String name;
+
+        /** Product price */
+        @QuerySqlField
+        private int price;
+
+        /**
+         * Create Product.
+         *
+         * @param id Product ID.
+         * @param name Product name.
+         * @param price Product price.
+         */
+        Product(int id, String name, int price) {
+            this.id = id;
+            this.name = name;
+            this.price = price;
+        }
+
+        /** {@inheritDoc} */
+        @Override public boolean equals(Object o) {
+            return this == o || o instanceof Product && id == ((Product)o).id;
+
+        }
+
+        /** {@inheritDoc} */
+        @Override public int hashCode() {
+            return id;
+        }
+
+        /** {@inheritDoc} */
+        @Override public String toString() {
+            return "Product [id=" + id + ", name=" + name + ", price=" + price + ']';
+        }
+    }
+
+    /**
+     * Purchase class. Stored at partitioned cache.
+     */
+    private static class Purchase implements Serializable {
+        /** Primary key. */
+        @QuerySqlField(index = true)
+        private int id;
+
+        /** Product ID. */
+        @QuerySqlField
+        private int productId;
+
+        /** Person ID. */
+        @QuerySqlField
+        private int personId;
+        
+        /** Organization id. */
+        @QuerySqlField
+        private int organizationId;
+
+        /**
+         * Create Purchase.
+         *  @param id Purchase ID.
+         * @param product Purchase product.
+         * @param organizationId Organization Id.
+         * @param person Purchase person.
+         */
+        Purchase(int id, Product product, int organizationId, Person person) {
+            this.id = id;
+            productId = product.id;
+            personId = person.id;
+            this.organizationId = organizationId;
+        }
+
+        /**
+         * @return Custom affinity key to guarantee that purchase is always collocated with person.
+         */
+        public AffinityKey<Integer> key() {
+            return new AffinityKey<>(id, organizationId);
+        }
+
+        /** {@inheritDoc} */
+        @Override public boolean equals(Object o) {
+            return this == o || o instanceof Purchase && id == ((Purchase)o).id;
+        }
+
+        /** {@inheritDoc} */
+        @Override public int hashCode() {
+            return id;
+        }
+
+        /** {@inheritDoc} */
+        @Override public String toString() {
+            return "Purchase [id=" + id + ", productId=" + productId + ", personId=" + personId + ']';
+        }
+    }
+
+    /**
+     * Address class. Stored at replicated cache.
+     */
+    private static class Address implements Serializable {
+        @QuerySqlField(index = true)
+        private int id;
+
+        @QuerySqlField(index = true)
+        private String street;
+
+        Address(int id, String street) {
+            this.id = id;
+            this.street = street;
+        }
+
+        /** {@inheritDoc} */
+        @Override public boolean equals(Object o) {
+            return this == o || o instanceof Address && id == ((Address)o).id;
+        }
+
+        /** {@inheritDoc} */
+        @Override public int hashCode() {
+            return id;
+        }
+
+        /** {@inheritDoc} */
+        @Override public String toString() {
+            return "Address [id=" + id + ", street=" + street + ']';
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fe743909/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/H2CompareBigQueryTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/H2CompareBigQueryTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/H2CompareBigQueryTest.java
new file mode 100644
index 0000000..c5a2cad
--- /dev/null
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/H2CompareBigQueryTest.java
@@ -0,0 +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.processors.query.h2.sql;
+
+import org.apache.ignite.cache.*;
+import org.apache.ignite.cache.affinity.*;
+import org.apache.ignite.cache.query.annotations.*;
+import org.apache.ignite.configuration.*;
+
+import java.io.*;
+import java.sql.Date;
+import java.sql.*;
+import java.util.*;
+import java.util.concurrent.atomic.*;
+
+/**
+ * Executes one big query (and subqueries of the big query) to compare query results from h2 database instance and 
+ * mixed ignite caches (replicated and partitioned) which have the same data models and data content.
+ * 
+ * 
+ * <pre> 
+ *
+ *  -------------------------------------> rootOrderId (virtual) <--------------------------
+ *  |                                                                |                     |
+ *  |                                                                |                     |
+ *  |                                ---------------------           |                     |
+ *  |  ------------------            --part.ReplaceOrder--           |                     |
+ *  |  --part.CustOrder--            ---------------------           |                     |
+ *  |  ------------------            -  id  PK           -           |                     |
+ *  |  -  orderId  PK   - <--  <---> -  orderId          -           |                     |
+ *  -- -  rootOrderId   -   |        -  rootOrderId      - -----------                     |
+ *     -  origOrderId   -   |        -  refOrderId       -   // = origOrderId              |
+ *     -  date          -   |        -  date             -                                 |
+ *     -  alias         -   |        -  alias            -                                 |
+ *     -  archSeq       -   |        -  archSeq          -          -------------------    |
+ *     ------------------   |        ---------------------          ----repl.Exec------    |
+ *                          |                                       -------------------    |
+ *     -----------------    |                                       -  rootOrderId PK - ----
+ *     ---part.Cancel---    |                                       -  date           -
+ *     -----------------    |        ---------------------          -  execShares int -
+ *     -  id       PK  -    |        --part.OrderParams---          -  price      int -
+ *     -  refOrderId   - ---|        ---------------------          -  lastMkt    int -
+ *     -  date         -    |        -  id  PK           -          -------------------
+ *     -----------------    -------  - orderId           -
+ *                                   - date              -
+ *                                   - parentAlgo        -
+ *                                   ---------------------
+ *  </pre>
+ *
+ */
+public class H2CompareBigQueryTest extends AbstractH2CompareQueryTest {
+    /** Root order count. */
+    private static final int ROOT_ORDER_CNT = 1000;
+
+    /** Dates count. */
+    private static final int DATES_CNT = 5;
+    
+    /** Full the big query. */
+    private String bigQry = getBigQry();
+
+    /**
+     * Extracts the big query from file.
+     *  
+     * @return Big query.
+     */
+    private String getBigQry() {
+        String res = "";
+
+        Reader isr = new InputStreamReader(getClass().getResourceAsStream("bigQuery.sql"));
+        
+        try(BufferedReader reader = new BufferedReader(isr)) {
+            for(String line; (line = reader.readLine()) != null; )
+                if (!line.startsWith("--")) // Skip commented lines.
+                    res += line + '\n';
+        }
+        catch (Throwable e) {
+            e.printStackTrace();
+            
+            fail();
+        }
+
+        return res;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void setIndexedTypes(CacheConfiguration<?, ?> cc, CacheMode mode) {
+        if (mode == CacheMode.PARTITIONED)
+            cc.setIndexedTypes(
+                Integer.class, CustOrder.class,
+                AffinityKey.class, ReplaceOrder.class,
+                AffinityKey.class, OrderParams.class,
+                AffinityKey.class, Cancel.class
+            );
+        else if (mode == CacheMode.REPLICATED)
+            cc.setIndexedTypes(
+                Integer.class, Exec.class
+            );
+        else
+            throw new IllegalStateException("mode: " + mode);
+    }
+
+    /** {@inheritDoc} */
+    @SuppressWarnings("unchecked")
+    @Override protected void initCacheAndDbData() throws SQLException {
+        final AtomicInteger idGen = new AtomicInteger();
+
+        final Iterable<Integer> rootOrderIds = new ArrayList<Integer>(){{
+            for (int i = 0; i < ROOT_ORDER_CNT; i++)
+                add(idGen.incrementAndGet());
+        }};
+
+        final Date curDate = new Date(new java.util.Date().getTime());
+
+        final List<Date> dates = new ArrayList<Date>(){{
+            for (int i = 0; i < DATES_CNT; i++)
+                add(new Date(curDate.getTime() - i * 24 * 60 * 60 * 1000)); // Minus i days.
+        }};
+
+        final Iterable<CustOrder> orders = new ArrayList<CustOrder>(){{
+            for (int rootOrderId : rootOrderIds) {
+                // Generate 1 - 5 orders for 1 root order.
+                for (int i = 0; i < rootOrderId % 5; i++) {
+                    int orderId = idGen.incrementAndGet();
+                    
+                    CustOrder order = new CustOrder(orderId, rootOrderId, dates.get(orderId % dates.size()) , 
+                        orderId % 2 == 0 ? "CUSTOM" : "OTHER", orderId);
+
+                    add(order);
+
+                    pCache.put(order.orderId, order);
+
+                    insertInDb(order);
+                }                
+            }
+        }};
+
+        final Collection<OrderParams> params = new ArrayList<OrderParams>(){{
+            for (CustOrder o : orders) {
+                OrderParams op = new OrderParams(idGen.incrementAndGet(), o.orderId, o.date, 
+                    o.orderId % 2 == 0 ? "Algo 1" : "Algo 2");
+
+                add(op);
+
+                pCache.put(op.key(), op);
+
+                insertInDb(op);
+            }
+        }};
+        
+        final Collection<ReplaceOrder> replaces = new ArrayList<ReplaceOrder>(){{
+            for (CustOrder o : orders) {
+                if (o.orderId % 7 == 0) {
+                    ReplaceOrder replace = new ReplaceOrder(idGen.incrementAndGet(), o.orderId, o.rootOrderId, o.alias,
+                        new Date(o.date.getTime() + 12 * 60 * 60 * 1000), o.orderId); // Plus a half of day.
+
+                    add(replace);
+
+                    pCache.put(replace.key(), replace);
+
+                    insertInDb(replace);
+                }
+            }
+        }};
+
+        final Collection<Cancel> cancels = new ArrayList<Cancel>(){{
+            for (CustOrder o : orders) {
+                if (o.orderId % 9 == 0) {
+                    Cancel c = new Cancel(idGen.incrementAndGet(), o.orderId, 
+                        new Date(o.date.getTime() + 12 * 60 * 60 * 1000));// Plus a half of day.
+
+                    add(c);
+
+                    pCache.put(c.key(), c); 
+
+                    insertInDb(c);
+                }
+            }
+        }};
+
+        final Collection<Exec> execs = new ArrayList<Exec>(){{
+            for (int rootOrderId : rootOrderIds) {
+                int execShares = 10000 + rootOrderId;
+                int price = 1000 + rootOrderId;
+                int latsMkt = 3000 + rootOrderId;
+                
+                Exec exec = new Exec(rootOrderId, dates.get(rootOrderId % dates.size()), execShares, price, latsMkt);
+
+                add(exec);
+
+                rCache.put(exec.rootOrderId, exec);
+
+                insertInDb(exec);
+            }
+        }};
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    @Override protected void checkAllDataEquals() throws Exception {
+        compareQueryRes0("select _key, _val, date, orderId, rootOrderId, alias, archSeq, origOrderId " +
+            "from \"part\".CustOrder");
+        compareQueryRes0("select _key, _val, id, date, orderId, rootOrderId, alias, archSeq, refOrderId " +
+            "from \"part\".ReplaceOrder");
+        compareQueryRes0("select _key, _val, id, date, orderId, parentAlgo from \"part\".OrderParams\n");
+        compareQueryRes0("select _key, _val, id, date, refOrderId from \"part\".Cancel\n");
+        compareQueryRes0(rCache, "select _key, _val, date, rootOrderId, execShares, price, lastMkt from \"repl\".Exec\n");
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testUnionAllOrders() throws Exception {
+        compareQueryRes0(
+            "   select  date, orderId, rootOrderId " +
+                "   from \"part\".CustOrder where alias='CUSTOM'");
+                
+        compareQueryRes0(
+                "   select  date, orderId, rootOrderId " +
+                "   from \"part\".ReplaceOrder where alias='CUSTOM'");
+        
+        compareQueryRes0(
+            "   select 10" +
+
+                "   union all" +
+
+                "   select  20");
+        
+        compareQueryRes0(
+            "   select  date, orderId, rootOrderId " +
+                "   from \"part\".CustOrder where alias='CUSTOM'" +
+
+                "   union all" +
+
+                "   select  date, orderId, rootOrderId " +
+                "   from \"part\".ReplaceOrder where alias='CUSTOM'");
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testBigQuery() throws Exception {
+        List<List<?>> res = compareQueryRes0(bigQry);
+        
+        assertTrue(!res.isEmpty()); // Ensure we set good testing data at database.
+    }
+    
+    /** {@inheritDoc} */
+    @Override protected void initializeH2Schema() throws SQLException {
+        Statement st = conn.createStatement();
+
+        st.execute("CREATE SCHEMA \"part\"");
+        st.execute("CREATE SCHEMA \"repl\"");
+
+        st.execute("create table \"part\".CustOrder" +
+            "  (" +
+            "  _key int not null," +
+            "  _val other not null," +
+            "  orderId int unique," +
+            "  rootOrderId int," +
+            "  origOrderId int," +
+            "  archSeq int," +
+            "  date Date, " +
+            "  alias varchar(255)" +
+            "  )");
+
+        st.execute("create table \"part\".ReplaceOrder" +
+            "  (" +
+            "  _key other not null," +
+            "  _val other not null," +
+            "  id int unique," +
+            "  orderId int ," +
+            "  rootOrderId int," +
+            "  refOrderId int," +
+            "  archSeq int," +
+            "  date Date, " +
+            "  alias varchar(255)" +
+            "  )");
+
+        st.execute("create table \"part\".OrderParams" +
+            "  (" +
+            "  _key other not null," +
+            "  _val other not null," +
+            "  id int unique," +
+            "  orderId int ," +
+            "  date Date, " +
+            "  parentAlgo varchar(255)" +
+            "  )");
+
+        st.execute("create table \"part\".Cancel" +
+            "  (" +
+            "  _key other not null," +
+            "  _val other not null," +
+            "  id int unique," +
+            "  date Date, " +
+            "  refOrderId int" +
+            "  )");
+
+        st.execute("create table \"repl\".Exec" +
+            "  (" +
+            "  _key int not null," +
+            "  _val other not null," +
+            "  rootOrderId int unique," +
+            "  date Date, " +
+            "  execShares int," +
+            "  price int," +
+            "  lastMkt int" +
+            "  )");
+        
+        conn.commit();
+    }
+
+    /**
+     * Insert {@link CustOrder} at h2 database.
+     *  
+     * @param o CustOrder.
+     */
+    private void insertInDb(CustOrder o) throws SQLException {
+        try(PreparedStatement st = conn.prepareStatement(
+            "insert into \"part\".CustOrder (_key, _val, orderId, rootOrderId, date, alias, archSeq, origOrderId) " +
+                "values(?, ?, ?, ?, ?, ?, ?, ?)")) {
+            int i = 0;
+            
+            st.setObject(++i, o.orderId);
+            st.setObject(++i, o);
+            st.setObject(++i, o.orderId);
+            st.setObject(++i, o.rootOrderId);
+            st.setObject(++i, o.date);
+            st.setObject(++i, o.alias);
+            st.setObject(++i, o.archSeq);
+            st.setObject(++i, o.origOrderId);
+
+            st.executeUpdate();
+        }
+    }
+
+    /**
+     * Insert {@link ReplaceOrder} at h2 database.
+     *
+     * @param o ReplaceOrder.
+     */
+    private void insertInDb(ReplaceOrder o) throws SQLException {
+        try(PreparedStatement st = conn.prepareStatement(
+            "insert into \"part\".ReplaceOrder (_key, _val, id, orderId, rootOrderId, date, alias, archSeq, refOrderId) " +
+                "values(?, ?, ?, ?, ?, ?, ?, ?, ?)")) {
+            int i = 0;
+            
+            st.setObject(++i, o.key());
+            st.setObject(++i, o);
+            st.setObject(++i, o.id);
+            st.setObject(++i, o.orderId);
+            st.setObject(++i, o.rootOrderId);
+            st.setObject(++i, o.date);
+            st.setObject(++i, o.alias);
+            st.setObject(++i, o.archSeq);
+            st.setObject(++i, o.refOrderId);
+
+            st.executeUpdate();
+        }
+    }
+
+    /**
+     * Insert {@link OrderParams} at h2 database.
+     *
+     * @param o OrderParams.
+     */
+    private void insertInDb(OrderParams o) throws SQLException {
+        try(PreparedStatement st = conn.prepareStatement(
+            "insert into \"part\".OrderParams (_key, _val, id, date, orderId, parentAlgo) values(?, ?, ?, ?, ?, ?)")) {
+            int i = 0;
+            
+            st.setObject(++i, o.key());
+            st.setObject(++i, o);
+            st.setObject(++i, o.id);
+            st.setObject(++i, o.date);
+            st.setObject(++i, o.orderId);
+            st.setObject(++i, o.parentAlgo);
+
+            st.executeUpdate();
+        }
+    }
+
+    /**
+     * Insert {@link Cancel} at h2 database.
+     *
+     * @param o Cancel.
+     */
+    private void insertInDb(Cancel o) throws SQLException {
+        try(PreparedStatement st = conn.prepareStatement(
+            "insert into \"part\".Cancel (_key, _val, id, date, refOrderId) values(?, ?, ?, ?, ?)")) {
+            int i = 0;
+            
+            st.setObject(++i, o.key());
+            st.setObject(++i, o);
+            st.setObject(++i, o.id);
+            st.setObject(++i, o.date);
+            st.setObject(++i, o.refOrderId);
+
+            st.executeUpdate();
+        }
+    }
+
+    /**
+     * Insert {@link Exec} at h2 database.
+     *
+     * @param o Execution.
+     */
+    private void insertInDb(Exec o) throws SQLException {
+        try(PreparedStatement st = conn.prepareStatement(
+            "insert into \"repl\".Exec (_key, _val, date, rootOrderId, execShares, price, lastMkt) " +
+                "values(?, ?, ?, ?, ?, ?, ?)")) {
+            int i = 0;
+            
+            st.setObject(++i, o.rootOrderId);
+            st.setObject(++i, o);
+            st.setObject(++i, o.date);
+            st.setObject(++i, o.rootOrderId);
+            st.setObject(++i, o.execShares);
+            st.setObject(++i, o.price);
+            st.setObject(++i, o.lastMkt);
+
+            st.executeUpdate();
+        }
+    }
+
+    /**
+     * Custom Order.
+     */
+    static class CustOrder implements Serializable {
+        /** Primary key. */
+        @QuerySqlField(index = true)
+        private int orderId;
+
+        /** Root order ID*/
+        @QuerySqlField
+        private int rootOrderId;
+
+        /** Orig order ID*/
+        @QuerySqlField
+        private int origOrderId;
+
+        /** Date */
+        @QuerySqlField
+        private Date date ;
+
+        /**  */
+        @QuerySqlField
+        private String alias = "CUSTOM";
+
+        /**  */
+        @QuerySqlField
+        private int archSeq = 11; // TODO: use it.
+
+        /**
+         * @param orderId Order id.
+         * @param rootOrderId Root order id.
+         * @param date Date.
+         * @param alias Alias.
+         * @param origOrderId Orig order id.
+         */
+        CustOrder(int orderId, int rootOrderId, Date date, String alias, int origOrderId) {
+            this.orderId = orderId;
+            this.rootOrderId = rootOrderId;
+            this.origOrderId = origOrderId;
+            this.date = date;
+            this.alias = alias;
+        }
+
+        /** {@inheritDoc} */
+        @Override public boolean equals(Object o) {
+            return this == o || o instanceof CustOrder && orderId == ((CustOrder)o).orderId;
+        }
+
+        /** {@inheritDoc} */
+        @Override public int hashCode() {
+            return orderId;
+        }
+    }
+
+    /**
+     * Replace Order.
+     */
+    static class ReplaceOrder implements Serializable {
+        /** Primary key. */
+        @QuerySqlField(index = true)
+        private int id;
+        
+        /** Order id. */
+        @QuerySqlField(index = true)
+        private int orderId;
+
+        /** Root order ID*/
+        @QuerySqlField
+        private int rootOrderId;
+
+        /** Ref order ID*/
+        @QuerySqlField
+        private int refOrderId;
+
+        /** Date */
+        @QuerySqlField
+        private Date date ;
+
+        /**  */
+        @QuerySqlField
+        private String alias = "CUSTOM";
+
+        /**  */
+        @QuerySqlField
+        private int archSeq = 111; // TODO: use it.
+
+        /**
+         * @param id Id.
+         * @param orderId Order id.
+         * @param rootOrderId Root order id.
+         * @param alias Alias.
+         * @param date Date.
+         * @param refOrderId Reference order id.
+         */
+        ReplaceOrder(int id, int orderId, int rootOrderId, String alias, Date date, int refOrderId) {
+            this.id = id;
+            this.orderId = orderId;
+            this.rootOrderId = rootOrderId;
+            this.refOrderId = refOrderId;
+            this.date = date;
+            this.alias = alias;
+        }
+
+        /**
+         * @return Afinity key.
+         */
+        public AffinityKey<Integer> key() {
+            return new AffinityKey<>(id, orderId);
+        }
+
+        /** {@inheritDoc} */
+        @Override public boolean equals(Object o) {
+            return this == o || o instanceof ReplaceOrder && id == ((ReplaceOrder)o).id;
+        }
+
+        /** {@inheritDoc} */
+        @Override public int hashCode() {
+            return id;
+        }
+    }
+
+    /**
+     * Order params.
+     */
+    static class OrderParams implements Serializable {
+        /** Primary key. */
+        @QuerySqlField(index = true)
+        private int id;
+
+        /** Order id. */
+        @QuerySqlField(index = true)
+        private int orderId;
+
+        /** Date */
+        @QuerySqlField
+        private Date date ;
+
+        /**  */
+        @QuerySqlField
+        private String parentAlgo = "CUSTOM_ALGO";
+
+        /**
+         * @param id Id.
+         * @param orderId Order id.
+         * @param date Date.
+         * @param parentAlgo Parent algo.
+         */
+        OrderParams(int id, int orderId, Date date, String parentAlgo) {
+            this.id = id;
+            this.orderId = orderId;
+            this.date = date;
+            this.parentAlgo = parentAlgo;
+        }
+
+        /**
+         * @return Afinity key.
+         */
+        public AffinityKey<Integer> key() {
+            return new AffinityKey<>(id, orderId);
+        }
+
+        /** {@inheritDoc} */
+        @Override public boolean equals(Object o) {
+            return this == o || o instanceof OrderParams && id == ((OrderParams)o).id;
+        }
+
+        /** {@inheritDoc} */
+        @Override public int hashCode() {
+            return id;
+        }
+    }
+
+    /**
+     * Cancel Order.
+     */
+    static class Cancel implements Serializable {
+        /** Primary key. */
+        @QuerySqlField(index = true)
+        private int id;
+
+        /** Order id. */
+        @QuerySqlField(index = true)
+        private int refOrderId;
+
+        /** Date */
+        @QuerySqlField
+        private Date date;
+
+        /**
+         * @param id
+         * @param refOrderId Reference order id.
+         * @param date Date.
+         */
+        Cancel(int id, int refOrderId, Date date) {
+            this.id = id;
+            this.refOrderId = refOrderId;
+            this.date = date;
+        }
+
+        /**
+         * @return Afinity key.
+         */
+        public AffinityKey<Integer> key() {
+            return new AffinityKey<>(id, refOrderId);
+        }
+
+        /** {@inheritDoc} */
+        @Override public boolean equals(Object o) {
+            return this == o || o instanceof Cancel && id == ((Cancel)o).id;
+        }
+
+        /** {@inheritDoc} */
+        @Override public int hashCode() {
+            return id;
+        }
+    }
+
+    /**
+     * Execute information about root query.
+     */
+    static class Exec implements Serializable {
+        /** Primary key. */
+        @QuerySqlField
+        private int rootOrderId;
+
+        /** Date */
+        @QuerySqlField
+        private Date date ;
+
+        /** */
+        @QuerySqlField
+        private int execShares;
+
+        /** */
+        @QuerySqlField
+        private int price;
+
+        /** */
+        @QuerySqlField
+        private int lastMkt;
+
+        /**
+         * @param rootOrderId Root order id.
+         * @param date Date.
+         * @param execShares Execute shares.
+         * @param price Price.
+         * @param lastMkt Last mkt.
+         */
+        Exec(int rootOrderId, Date date, int execShares, int price, int lastMkt) {
+            this.rootOrderId = rootOrderId;
+            this.date = date;
+            this.execShares = execShares;
+            this.price = price;
+            this.lastMkt = lastMkt;
+        }
+
+        /** {@inheritDoc} */
+        @Override public boolean equals(Object o) {
+            return this == o || o instanceof Exec && rootOrderId == ((Exec)o).rootOrderId;
+        }
+
+        /** {@inheritDoc} */
+        @Override public int hashCode() {
+            return rootOrderId;
+        }
+    }
+}


[47/50] [abbrv] incubator-ignite git commit: # DEVNOTES

Posted by ag...@apache.org.
# DEVNOTES


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

Branch: refs/heads/ignite-674
Commit: 22252f1f1962d5d958996c447ea38b1b41dd0d37
Parents: c6877a7
Author: Valentin Kulichenko <vk...@gridgain.com>
Authored: Thu Apr 9 13:26:35 2015 -0700
Committer: Valentin Kulichenko <vk...@gridgain.com>
Committed: Thu Apr 9 13:26:35 2015 -0700

----------------------------------------------------------------------
 DEVNOTES.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/22252f1f/DEVNOTES.txt
----------------------------------------------------------------------
diff --git a/DEVNOTES.txt b/DEVNOTES.txt
index 041026d..4df917c 100644
--- a/DEVNOTES.txt
+++ b/DEVNOTES.txt
@@ -40,5 +40,5 @@ For more information (e.g. exclude list) see "check-licenses" profile in "parent
 
 Useful Release Commands
 ========================
-ZIP: zip -r9 apache-ignite-X.X.X-src apache-ignite-X.X.X-src.zip
-PGP: gpg --armor --output apache-ignite-X.X.X-src.zip.asc --detach-sig apache-ignite-X.X.X-src.zip
+ZIP: zip -r9 apache-ignite-X.X.X-src.zip apache-ignite-X.X.X-src
+GPG: gpg --armor --output apache-ignite-X.X.X-src.zip.asc --detach-sig apache-ignite-X.X.X-src.zip


[14/50] [abbrv] incubator-ignite git commit: Merge remote-tracking branch 'remotes/origin/ignite-sprint-3' into ignite-694

Posted by ag...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-sprint-3' into ignite-694


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

Branch: refs/heads/ignite-674
Commit: 9eb3fceb17d7ef0e11370f0de65ad641860a8b53
Parents: 32aa57c 3e6da9c
Author: sboikov <sb...@gridgain.com>
Authored: Thu Apr 9 10:13:17 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Thu Apr 9 10:13:17 2015 +0300

----------------------------------------------------------------------
 .../src/main/java/org/apache/ignite/Ignite.java |  11 +
 .../java/org/apache/ignite/IgniteCluster.java   |   9 +-
 .../ignite/cluster/ClusterStartNodeResult.java  |  46 +
 .../ignite/internal/ClusterMetricsSnapshot.java | 384 +++------
 .../apache/ignite/internal/IgniteKernal.java    |  30 +-
 .../cluster/ClusterStartNodeResultImpl.java     |  87 ++
 .../cluster/IgniteClusterAsyncImpl.java         |   5 +-
 .../internal/cluster/IgniteClusterImpl.java     |  37 +-
 .../cache/DynamicCacheChangeRequest.java        |   2 +-
 .../processors/cache/GridCacheProcessor.java    | 130 +--
 .../ignite/internal/util/lang/GridFunc.java     |  33 +
 .../util/nodestart/IgniteNodeCallable.java      |  30 -
 .../util/nodestart/IgniteSshHelper.java         |   2 +-
 .../util/nodestart/StartNodeCallable.java       |  30 +
 .../messages/TcpDiscoveryAbstractMessage.java   |  24 +-
 .../messages/TcpDiscoveryAuthFailedMessage.java |  25 +-
 .../TcpDiscoveryCheckFailedMessage.java         |  24 +-
 .../TcpDiscoveryClientReconnectMessage.java     |  30 +-
 .../TcpDiscoveryCustomEventMessage.java         |  23 +-
 .../messages/TcpDiscoveryDiscardMessage.java    |  24 +-
 .../TcpDiscoveryDuplicateIdMessage.java         |  24 +-
 .../messages/TcpDiscoveryHandshakeRequest.java  |   8 -
 .../messages/TcpDiscoveryHandshakeResponse.java |  22 -
 .../messages/TcpDiscoveryHeartbeatMessage.java  |  44 +-
 .../TcpDiscoveryJoinRequestMessage.java         |  28 +-
 .../TcpDiscoveryLoopbackProblemMessage.java     |  28 +-
 .../TcpDiscoveryNodeAddFinishedMessage.java     |  24 +-
 .../messages/TcpDiscoveryNodeAddedMessage.java  |  60 +-
 .../messages/TcpDiscoveryNodeFailedMessage.java |  28 +-
 .../messages/TcpDiscoveryNodeLeftMessage.java   |   8 -
 .../tcp/messages/TcpDiscoveryPingRequest.java   |  25 +-
 .../tcp/messages/TcpDiscoveryPingResponse.java  |  14 -
 .../TcpDiscoveryStatusCheckMessage.java         |  30 +-
 ...teCacheConfigurationDefaultTemplateTest.java | 111 +++
 ...eCacheConfigurationTemplateNotFoundTest.java | 114 ---
 .../IgniteCacheConfigurationTemplateTest.java   |  86 +-
 .../ignite/testframework/junits/IgniteMock.java |   5 +
 .../ignite/testsuites/IgniteCacheTestSuite.java |   2 +-
 .../processors/query/h2/sql/GridSqlElement.java |   8 -
 .../processors/query/h2/sql/GridSqlQuery.java   | 183 ++++
 .../query/h2/sql/GridSqlQueryParser.java        |  97 ++-
 .../query/h2/sql/GridSqlQuerySplitter.java      | 111 ++-
 .../processors/query/h2/sql/GridSqlSelect.java  | 209 ++---
 .../query/h2/sql/GridSqlSubquery.java           |   8 +-
 .../processors/query/h2/sql/GridSqlUnion.java   | 134 +++
 .../h2/sql/AbstractH2CompareQueryTest.java      | 341 ++++++++
 .../query/h2/sql/BaseH2CompareQueryTest.java    | 823 ++++++++++++++++++
 .../query/h2/sql/GridQueryParsingTest.java      |  26 +-
 .../query/h2/sql/H2CompareBigQueryTest.java     | 707 +++++++++++++++
 .../query/h2/sql/IgniteVsH2QueryTest.java       | 860 -------------------
 .../IgniteCacheQuerySelfTestSuite.java          |   5 +-
 .../processors/query/h2/sql/bigQuery.sql        |  55 ++
 .../org/apache/ignite/IgniteSpringBean.java     |   7 +
 .../util/nodestart/IgniteNodeCallableImpl.java  | 308 -------
 .../util/nodestart/IgniteSshHelperImpl.java     |   4 +-
 .../util/nodestart/StartNodeCallableImpl.java   | 309 +++++++
 ...gniteProjectionStartStopRestartSelfTest.java | 261 +++---
 .../IgniteStartStopRestartTestSuite.java        |   1 +
 .../commands/start/VisorStartCommand.scala      |   4 +-
 59 files changed, 3636 insertions(+), 2472 deletions(-)
----------------------------------------------------------------------



[15/50] [abbrv] incubator-ignite git commit: # ignite-694

Posted by ag...@apache.org.
# ignite-694


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

Branch: refs/heads/ignite-674
Commit: 998d1fa4e2f5515ed7f008ac2f866ce0178638cd
Parents: 9eb3fce
Author: sboikov <sb...@gridgain.com>
Authored: Thu Apr 9 10:41:27 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Thu Apr 9 10:41:27 2015 +0300

----------------------------------------------------------------------
 .../processors/cache/GridCachePartitionExchangeManager.java       | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/998d1fa4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
index 0955328..7a1324f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
@@ -796,6 +796,9 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
 
                     GridCacheContext<K, V> cacheCtx = cctx.cacheContext(cacheId);
 
+                    if (cacheCtx != null && !cacheCtx.started())
+                        continue; // Can safely ignore background exchange.
+
                     GridDhtPartitionTopology top = null;
 
                     if (cacheCtx == null)


[05/50] [abbrv] incubator-ignite git commit: ignite-437: test for bigQuery sql

Posted by ag...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fe743909/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/IgniteVsH2QueryTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/IgniteVsH2QueryTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/IgniteVsH2QueryTest.java
deleted file mode 100644
index 5845a2e..0000000
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/IgniteVsH2QueryTest.java
+++ /dev/null
@@ -1,875 +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.processors.query.h2.sql;
-
-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.util.typedef.internal.*;
-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.testframework.junits.common.*;
-import org.jetbrains.annotations.*;
-
-import java.io.*;
-import java.sql.*;
-import java.util.*;
-
-/**
- * Test to compare query results from h2 database instance and mixed ignite caches (replicated and partitioned) 
- * which have the same data models and data content. 
- */
-public class IgniteVsH2QueryTest extends GridCommonAbstractTest {
-    /** */
-    private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
-
-    /** Partitioned cache. */
-    private static IgniteCache pCache;
-
-    /** Replicated cache. */
-    private static IgniteCache rCache;
-    
-    /** H2 db connection. */
-    private static Connection conn;
-
-    /** {@inheritDoc} */
-    @SuppressWarnings("unchecked")
-    @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
-        IgniteConfiguration c = super.getConfiguration(gridName);
-
-        TcpDiscoverySpi disco = new TcpDiscoverySpi();
-
-        disco.setIpFinder(IP_FINDER);
-
-        c.setDiscoverySpi(disco);
-
-        c.setMarshaller(new OptimizedMarshaller(true));
-
-        c.setCacheConfiguration(createCache("part", CacheMode.PARTITIONED),
-            createCache("repl", CacheMode.REPLICATED)
-        );
-
-        return c;
-    }
-
-    /**
-     * Creates new cache configuration.
-     *
-     * @param name Cache name.
-     * @param mode Cache mode.
-     * @return Cache configuration.
-     */
-    private static CacheConfiguration createCache(String name, CacheMode mode) {
-        CacheConfiguration<?,?> cc = defaultCacheConfiguration();
-
-        cc.setName(name);
-        cc.setCacheMode(mode);
-        cc.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
-        cc.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
-
-        if (mode == CacheMode.PARTITIONED)
-            cc.setIndexedTypes(
-                Integer.class, Organization.class,
-                AffinityKey.class, Person.class,
-                AffinityKey.class, Purchase.class
-            );
-        else if (mode == CacheMode.REPLICATED)
-            cc.setIndexedTypes(
-                Integer.class, Product.class
-            );
-        else
-            throw new IllegalStateException("mode: " + mode);
-
-        return cc;
-    }
-
-
-    /** {@inheritDoc} */
-    @Override protected void beforeTestsStarted() throws Exception {
-        super.beforeTestsStarted();
-
-        Ignite ignite = startGrids(4);
-
-        pCache = ignite.cache("part");
-        
-        rCache = ignite.cache("repl");
-
-        awaitPartitionMapExchange();
-        
-        conn = openH2Connection(false);
-
-        initializeH2Schema();
-
-        initCacheAndDbData();
-
-        checkAllDataEquals();
-    }
-    
-    /** {@inheritDoc} */
-    @Override protected void afterTestsStopped() throws Exception {
-        super.afterTestsStopped();
-        
-        conn.close();
-        
-        stopAllGrids();
-    }
-
-    /**
-     * Populate cache and h2 database with test data.
-     */
-    @SuppressWarnings("unchecked")
-    private void initCacheAndDbData() throws SQLException {
-        int idGen = 0;
-        
-        // Organizations.
-        List<Organization> organizations = new ArrayList<>();
-
-        for (int i = 0; i < 3; i++) {
-            int id = idGen++;
-            
-            Organization org = new Organization(id, "Org" + id);
-            
-            organizations.add(org);
-            
-            pCache.put(org.id, org);
-            
-            insertInDb(org);
-        }
-
-        // Persons.
-        List<Person> persons = new ArrayList<>();
-        
-        for (int i = 0; i < 5; i++) {
-            int id = idGen++;
-
-            Person person = new Person(id, organizations.get(i % organizations.size()), 
-                "name" + id, "lastName" + id, id * 100.0);
-            
-            // Add a Person without lastname.
-            if (id == organizations.size() + 1)
-                person.lastName = null;
-
-            persons.add(person);
-
-            pCache.put(person.key(), person);
-            
-            insertInDb(person);
-        }
-
-        // Products.
-        List<Product> products = new ArrayList<>();
-
-        for (int i = 0; i < 10; i++) {
-            int id = idGen++;
-            
-            Product product = new Product(id, "Product" + id, id*1000);
-            
-            products.add(product);
-            
-            rCache.put(product.id, product);
-            
-            insertInDb(product);
-        }
-
-        // Purchases.
-        for (int i = 0; i < products.size() * 2; i++) {
-            int id = idGen++;
-
-            Purchase purchase = new Purchase(id, products.get(i % products.size()), persons.get(i % persons.size()));
-
-            pCache.put(purchase.key(), purchase);
-            
-            insertInDb(purchase);
-        }
-    }
-
-    /**
-     * Insert {@link Organization} at h2 database.
-     *  
-     * @param org Organization.
-     * @throws SQLException If exception.
-     */
-    private void insertInDb(Organization org) throws SQLException {
-        try(PreparedStatement st = conn.prepareStatement(
-            "insert into \"part\".ORGANIZATION (_key, _val, id, name) values(?, ?, ?, ?)")) {
-            st.setObject(1, org.id);
-            st.setObject(2, org);
-            st.setObject(3, org.id);
-            st.setObject(4, org.name);
-
-            st.executeUpdate();
-        }
-    }
-
-    /**
-     * Insert {@link Person} at h2 database.
-     *
-     * @param p Person.
-     * @throws SQLException If exception.
-     */
-    private void insertInDb(Person p) throws SQLException {
-        try(PreparedStatement st = conn.prepareStatement("insert into \"part\".PERSON " +
-            "(_key, _val, id, firstName, lastName, orgId, salary) values(?, ?, ?, ?, ?, ?, ?)")) {
-            st.setObject(1, p.key());
-            st.setObject(2, p);
-            st.setObject(3, p.id);
-            st.setObject(4, p.firstName);
-            st.setObject(5, p.lastName);
-            st.setObject(6, p.orgId);
-            st.setObject(7, p.salary);
-
-            st.executeUpdate();
-        }
-    }
-
-    /**
-     * Insert {@link Product} at h2 database.
-     *
-     * @param p Product.
-     * @throws SQLException If exception.
-     */
-    private void insertInDb(Product p) throws SQLException {
-        try(PreparedStatement st = conn.prepareStatement(
-            "insert into \"repl\".PRODUCT (_key, _val, id, name, price) values(?, ?, ?, ?, ?)")) {
-            st.setObject(1, p.id);
-            st.setObject(2, p);
-            st.setObject(3, p.id);
-            st.setObject(4, p.name);
-            st.setObject(5, p.price);
-
-            st.executeUpdate();
-        }
-    }
-
-    /**
-     * Insert {@link Purchase} at h2 database.
-     *
-     * @param p Purchase.
-     * @throws SQLException If exception.
-     */
-    private void insertInDb(Purchase p) throws SQLException {
-        try(PreparedStatement st = conn.prepareStatement(
-            "insert into \"part\".PURCHASE (_key, _val, id, personId, productId) values(?, ?, ?, ?, ?)")) {
-            st.setObject(1, p.key());
-            st.setObject(2, p);
-            st.setObject(3, p.id);
-            st.setObject(4, p.personId);
-            st.setObject(5, p.productId);
-
-            st.executeUpdate();
-        }
-    }
-
-    /**
-     * Initialize h2 database schema.
-     *
-     * @throws SQLException If exception.
-     */
-    private void initializeH2Schema() throws SQLException {
-        Statement st = conn.createStatement();
-
-        st.execute("CREATE SCHEMA \"part\"");
-        st.execute("CREATE SCHEMA \"repl\"");
-
-        st.execute("create table \"part\".ORGANIZATION" +
-            "  (_key int not null," +
-            "  _val other not null," +
-            "  id int unique," +
-            "  name varchar(255))");
-        
-        st.execute("create table \"part\".PERSON" +
-            "  (_key other not null ," +
-            "   _val other not null ," +
-            "  id int unique, " +
-            "  firstName varchar(255), " +
-            "  lastName varchar(255)," +
-            "  orgId int not null," +
-            "  salary double )");
-
-        st.execute("create table \"repl\".PRODUCT" +
-            "  (_key int not null ," +
-            "   _val other not null ," +
-            "  id int unique, " +
-            "  name varchar(255), " +
-            "  price int)");
-
-        st.execute("create table \"part\".PURCHASE" +
-            "  (_key other not null ," +
-            "   _val other not null ," +
-            "  id int unique, " +
-            "  personId int, " +
-            "  productId int)");
-
-        conn.commit();
-    }
-
-    /**
-     * Gets connection from a pool.
-     *
-     * @param autocommit {@code true} If connection should use autocommit mode.
-     * @return Pooled connection.
-     * @throws SQLException In case of error.
-     */
-    private Connection openH2Connection(boolean autocommit) throws SQLException {
-        System.setProperty("h2.serializeJavaObject", "false");
-        
-        String dbName = "test";
-        
-        Connection conn = DriverManager.getConnection("jdbc:h2:mem:" + dbName + ";DB_CLOSE_DELAY=-1");
-
-        conn.setAutoCommit(autocommit);
-
-        return conn;
-    }
-
-    /**
-     * Execute given sql query on h2 database and on partitioned ignite cache and compare results.
-     *
-     * @param sql SQL query.
-     * @param args SQL arguments.
-     * then results will compare as ordered queries.
-     * @return Result set after SQL query execution. 
-     * @throws SQLException If exception.
-     */
-    private List<List<?>> compareQueryRes0(String sql, @Nullable Object... args) throws SQLException {
-        return compareQueryRes0(pCache, sql, args, Order.RANDOM);
-    }
-
-    /**
-     * Execute given sql query on h2 database and on ignite cache and compare results. 
-     * Expected that results are not ordered.
-     *
-     * @param cache Ignite cache.
-     * @param sql SQL query.
-     * @param args SQL arguments.
-     * then results will compare as ordered queries.
-     * @return Result set after SQL query execution. 
-     * @throws SQLException If exception.
-     */
-    private List<List<?>> compareQueryRes0(IgniteCache cache, String sql, @Nullable Object... args) throws SQLException {
-        return compareQueryRes0(cache, sql, args, Order.RANDOM);
-    }
-
-    /**
-     * Execute given sql query on h2 database and on partitioned ignite cache and compare results.
-     * Expected that results are ordered.
-     *
-     * @param sql SQL query.
-     * @param args SQL arguments.
-     * then results will compare as ordered queries.
-     * @return Result set after SQL query execution.
-     * @throws SQLException If exception.
-     */
-    private List<List<?>> compareOrderedQueryRes0(String sql, @Nullable Object... args) throws SQLException {
-        return compareQueryRes0(pCache, sql, args, Order.ORDERED);
-    }
-
-    /**
-     * Execute given sql query on h2 database and on ignite cache and compare results.
-     *
-     * @param cache Ignite cache.
-     * @param sql SQL query.
-     * @param args SQL arguments.
-     * @param order Expected ordering of SQL results. If {@link Order#ORDERED} 
-     * then results will compare as ordered queries.
-     * @return Result set after SQL query execution.
-     * @throws SQLException If exception.
-     */    
-    @SuppressWarnings("unchecked")
-    private List<List<?>> compareQueryRes0(IgniteCache cache, String sql, @Nullable Object[] args, Order order) throws SQLException {
-        if (args == null)
-            args = new Object[] {null};
-        
-        log.info("Sql=\"" + sql + "\", args=" + Arrays.toString(args));
-
-        List<List<?>> h2Res = executeH2Query(sql, args);
-
-        List<List<?>> cacheRes = cache.query(new SqlFieldsQuery(sql).setArgs(args)).getAll();
-
-        assertRsEquals(h2Res, cacheRes, order);
-        
-        return cacheRes;
-    }
-
-    /**
-     * Execute SQL query on h2 database.
-     *
-     * @param sql SQL query.
-     * @param args SQL arguments.
-     * @return Result of SQL query on h2 database.
-     * @throws SQLException If exception.
-     */
-    private List<List<?>> executeH2Query(String sql, Object[] args) throws SQLException {
-        List<List<?>> res = new ArrayList<>();
-        ResultSet rs = null;
-
-        try(PreparedStatement st = conn.prepareStatement(sql)) {
-            for (int idx = 0; idx < args.length; idx++)
-                st.setObject(idx + 1, args[idx]);
-
-            rs = st.executeQuery();
-
-            int colCnt = rs.getMetaData().getColumnCount();
-
-            while (rs.next()) {
-                List<Object> row = new ArrayList<>(colCnt);
-                
-                for (int i = 1; i <= colCnt; i++)
-                    row.add(rs.getObject(i));
-                
-                res.add(row);
-            }
-        }
-        finally {
-            U.closeQuiet(rs);
-        }
-
-        return res;
-    }
-
-    /**
-     * Assert equals of result sets according to expected ordering.
-     *
-     * @param rs1 Expected result set.
-     * @param rs2 Actual result set.
-     * @param order Expected ordering of SQL results. If {@link Order#ORDERED} 
-     * then results will compare as ordered queries.
-     */
-    private void assertRsEquals(List<List<?>> rs1, List<List<?>> rs2, Order order) {
-        assertEquals("Rows count has to be equal.", rs1.size(), rs2.size());
-        
-        switch (order){
-            case ORDERED:
-                for (int rowNum = 0; rowNum < rs1.size(); rowNum++) {
-                    List<?> row1 = rs1.get(rowNum);
-                    List<?> row2 = rs2.get(rowNum);
-
-                    assertEquals("Columns count have to be equal.", row1.size(), row2.size());
-
-                    for (int colNum = 0; colNum < row1.size(); colNum++)
-                        assertEquals("Row=" + rowNum + ", column=" + colNum, row1.get(colNum), row2.get(colNum));
-                }
-
-                break;
-            case RANDOM:
-                Map<List<?>, Integer> rowsWithCnt1 = extractUniqueRowsWithCounts(rs1);
-                Map<List<?>, Integer> rowsWithCnt2 = extractUniqueRowsWithCounts(rs2);
-                
-                assertEquals("Unique rows count has to be equal.", rowsWithCnt1.size(), rowsWithCnt2.size());
-
-                for (Map.Entry<List<?>, Integer> entry1 : rowsWithCnt1.entrySet()) {
-                    List<?> row = entry1.getKey();
-                    Integer cnt1 = entry1.getValue();
-
-                    Integer cnt2 = rowsWithCnt2.get(row);
-
-                    assertEquals("Row has different occurance number.\nRow=" + row, cnt1, cnt2);
-                }
-                
-                break;
-            default: 
-                throw new IllegalStateException();
-        }
-    }
-
-    /**
-     * @param rs Result set.
-     * @return Map of unique rows at the result set to number of occuriances at the result set.
-     */
-    private Map<List<?>, Integer> extractUniqueRowsWithCounts(Iterable<List<?>> rs) {
-        Map<List<?>, Integer> res = new HashMap<>();
-
-        for (List<?> row : rs) {
-            Integer cnt = res.get(row);
-            
-            if (cnt == null)
-                cnt = 0;
-            
-            res.put(row, cnt + 1);
-        }
-        return res;
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    private void checkAllDataEquals() throws Exception {
-        compareQueryRes0("select _key, _val, id, name from \"part\".Organization");
-
-        compareQueryRes0("select _key, _val, id, firstName, lastName, orgId, salary from \"part\".Person");
-
-        compareQueryRes0("select _key, _val, id, personId, productId from \"part\".Purchase");
-
-        compareQueryRes0(rCache, "select _key, _val, id, name, price from \"repl\".Product");
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void _testSimpleReplSelect() throws Exception {
-        compareQueryRes0("select id, name, price from \"repl\".Product");
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testParamSubstitution() throws Exception {
-        compareQueryRes0("select ? from \"part\".Person", "Some arg");
-    }
-
-    /**
-     * @throws SQLException If failed.
-     */
-    public void testAggregateOrderBy() throws SQLException {
-        compareOrderedQueryRes0("select firstName name, count(*) cnt from \"part\".Person group by name order by cnt desc");
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testNullParamSubstitution() throws Exception {
-        List<List<?>> rs1 = compareQueryRes0("select id from \"part\".Person where lastname is ?", null);
-
-        // Ensure we find something.
-        assertNotSame(0, rs1.size());
-    }
-
-    /**
-     *
-     */
-    public void testUnion() throws SQLException {
-        String base = "select _val v from \"part\".Person";
-
-        compareQueryRes0(base + " union all " + base);
-        compareQueryRes0(base + " union " + base);
-
-        base = "select firstName||lastName name, salary from \"part\".Person";
-
-        assertEquals(10, compareOrderedQueryRes0(base + " union all " + base + " order by salary desc").size());
-        assertEquals(5, compareOrderedQueryRes0(base + " union " + base + " order by salary desc").size());
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testEmptyResult() throws Exception {
-        compareQueryRes0("select id from \"part\".Person where 0 = 1");
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testSqlQueryWithAggregation() throws Exception {
-        compareQueryRes0("select avg(salary) from \"part\".Person, \"part\".Organization where Person.orgId = Organization.id and "
-            + "lower(Organization.name) = lower(?)", "Org1");
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testSqlFieldsQuery() throws Exception {
-        compareQueryRes0("select concat(firstName, ' ', lastName) from \"part\".Person");
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testSqlFieldsQueryWithJoin() throws Exception {
-        compareQueryRes0("select concat(firstName, ' ', lastName), "
-            + "Organization.name from \"part\".Person, \"part\".Organization where "
-            + "Person.orgId = Organization.id");
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testOrdered() throws Exception {
-        compareOrderedQueryRes0("select firstName, lastName" +
-                " from \"part\".Person" +
-                " order by lastName, firstName"
-        );
-    }
-
-    /**
-     * //TODO Investigate.
-     *  
-     * @throws Exception If failed.
-     */
-    public void _testSimpleJoin() throws Exception {
-        // Have expected results.
-        compareQueryRes0("select id, firstName, lastName" +
-            "  from \"part\".Person" +
-            "  where Person.id = ?", 3);
-
-        // Ignite cache return 0 results...
-        compareQueryRes0("select pe.firstName" +
-            "  from \"part\".Person pe join \"part\".Purchase pu on pe.id = pu.personId " +
-            "  where pe.id = ?", 3);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testSimpleReplicatedSelect() throws Exception {
-        compareQueryRes0(rCache, "select id, name from \"repl\".Product");
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void _testCrossCache() throws Exception {
-        //TODO Investigate (should be 20 results instead of 0).
-        compareQueryRes0("select firstName, lastName" +
-            "  from \"part\".Person, \"part\".Purchase" +
-            "  where Person.id = Purchase.personId");
-
-        //TODO Investigate.
-        compareQueryRes0("select concat(firstName, ' ', lastName), Product.name " +
-            "  from \"part\".Person, \"part\".Purchase, \"repl\".Product " +
-            "  where Person.id = Purchase.personId and Purchase.productId = Product.id" +
-            "  group by Product.id");
-
-        //TODO Investigate.
-        compareQueryRes0("select concat(firstName, ' ', lastName), count (Product.id) " +
-            "  from \"part\".Person, \"part\".Purchase, \"repl\".Product " +
-            "  where Person.id = Purchase.personId and Purchase.productId = Product.id" +
-            "  group by Product.id");
-    }
-
-    /**
-     * Person class. Stored at partitioned cache.
-     */
-    private static class Person implements Serializable {
-        /** Person ID (indexed). */
-        @QuerySqlField(index = true)
-        private int id;
-
-        /** Organization ID (indexed). */
-        @QuerySqlField(index = true)
-        private int orgId;
-
-        /** First name (not-indexed). */
-        @QuerySqlField
-        private String firstName;
-
-        /** Last name (not indexed). */
-        @QuerySqlField
-        private String lastName;
-
-        /** Salary (indexed). */
-        @QuerySqlField(index = true)
-        private double salary;
-
-        /**
-         * Constructs person record.
-         *
-         * @param org Organization.
-         * @param firstName First name.
-         * @param lastName Last name.
-         * @param salary Salary.
-         */
-        Person(int id, Organization org, String firstName, String lastName, double salary) {
-            this.id = id;
-            this.firstName = firstName;
-            this.lastName = lastName;
-            this.salary = salary;
-            orgId = org.id;
-        }
-
-        /**
-         * @return Custom affinity key to guarantee that person is always collocated with organization.
-         */
-        public AffinityKey<Integer> key() {
-            return new AffinityKey<>(id, orgId);
-        }
-
-        /** {@inheritDoc} */
-        @Override public boolean equals(Object o) {
-            return this == o || o instanceof Person && id == ((Person)o).id;
-
-        }
-
-        /** {@inheritDoc} */
-        @Override public int hashCode() {
-            return id;
-        }
-
-        /** {@inheritDoc} */
-        @Override public String toString() {
-            return "Person [firstName=" + firstName +
-                ", lastName=" + lastName +
-                ", id=" + id +
-                ", orgId=" + orgId +
-                ", salary=" + salary + ']';
-        }
-    }
-
-    /**
-     * Organization class. Stored at partitioned cache.
-     */
-    private static class Organization implements Serializable {
-        /** Organization ID (indexed). */
-        @QuerySqlField(index = true)
-        private int id;
-
-        /** Organization name (indexed). */
-        @QuerySqlField(index = true)
-        private String name;
-
-        /**
-         * Create Organization.
-         *
-         * @param id Organization ID.
-         * @param name Organization name.
-         */
-        Organization(int id, String name) {
-            this.id = id;
-            this.name = name;
-        }
-
-        /** {@inheritDoc} */
-        @Override public boolean equals(Object o) {
-            return this == o || o instanceof Organization && id == ((Organization)o).id;
-
-        }
-
-        /** {@inheritDoc} */
-        @Override public int hashCode() {
-            return id;
-        }
-
-        /** {@inheritDoc} */
-        @Override public String toString() {
-            return "Organization [id=" + id + ", name=" + name + ']';
-        }
-    }
-
-    /**
-     * Product class. Stored at replicated cache.
-     */
-    private static class Product implements Serializable {
-        /** Primary key. */
-        @QuerySqlField(index = true)
-        private int id;
-
-        /** Product name. */
-        @QuerySqlField
-        private String name;
-
-        /** Product price */
-        @QuerySqlField
-        private int price;
-
-        /**
-         * Create Product.
-         *
-         * @param id Product ID.
-         * @param name Product name.
-         * @param price Product price.
-         */
-        Product(int id, String name, int price) {
-            this.id = id;
-            this.name = name;
-            this.price = price;
-        }
-
-        /** {@inheritDoc} */
-        @Override public boolean equals(Object o) {
-            return this == o || o instanceof Product && id == ((Product)o).id;
-
-        }
-
-        /** {@inheritDoc} */
-        @Override public int hashCode() {
-            return id;
-        }
-
-        /** {@inheritDoc} */
-        @Override public String toString() {
-            return "Product [id=" + id + ", name=" + name + ", price=" + price + ']';
-        }
-    }
-
-    /**
-     * Purchase class. Stored at partitioned cache.
-     */
-    private static class Purchase implements Serializable {
-        /** Primary key. */
-        @QuerySqlField(index = true)
-        private int id;
-
-        /** Product ID. */
-        @QuerySqlField
-        private int productId;
-
-        /** Person ID. */
-        @QuerySqlField
-        private int personId;
-
-        /**
-         * Create Purchase.
-         *
-         * @param id Purchase ID.
-         * @param product Purchase product.
-         * @param person Purchase person.
-         */
-        Purchase(int id, Product product, Person person) {
-            this.id = id;
-            productId = product.id;
-            personId = person.id;
-        }
-
-        /**
-         * @return Custom affinity key to guarantee that purchase is always collocated with person.
-         */
-        public AffinityKey<Integer> key() {
-            return new AffinityKey<>(id, personId);
-        }
-
-        /** {@inheritDoc} */
-        @Override public boolean equals(Object o) {
-            return this == o || o instanceof Purchase && id == ((Purchase)o).id;
-
-        }
-
-        /** {@inheritDoc} */
-        @Override public int hashCode() {
-            return id;
-        }
-
-        /** {@inheritDoc} */
-        @Override public String toString() {
-            return "Purchase [id=" + id + ", productId=" + productId + ", personId=" + personId + ']';
-        }
-    }
-
-    /**
-     * Order type. 
-     */
-    private enum Order {
-        /** Random. */
-        RANDOM, 
-        /** Ordered. */
-        ORDERED
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fe743909/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 43e54fe..552205a 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
@@ -100,8 +100,9 @@ public class IgniteCacheQuerySelfTestSuite extends TestSuite {
 
         suite.addTestSuite(GridOrderedMessageCancelSelfTest.class);
 
-        // H2 comparison.
-        suite.addTestSuite(IgniteVsH2QueryTest.class);
+        // Ignite cache and H2 comparison.
+        suite.addTestSuite(BaseH2CompareQueryTest.class);
+        suite.addTestSuite(H2CompareBigQueryTest.class);
 
         return suite;
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fe743909/modules/indexing/src/test/resources/org/apache/ignite/internal/processors/query/h2/sql/bigQuery.sql
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/resources/org/apache/ignite/internal/processors/query/h2/sql/bigQuery.sql b/modules/indexing/src/test/resources/org/apache/ignite/internal/processors/query/h2/sql/bigQuery.sql
new file mode 100644
index 0000000..5f5cb74
--- /dev/null
+++ b/modules/indexing/src/test/resources/org/apache/ignite/internal/processors/query/h2/sql/bigQuery.sql
@@ -0,0 +1,55 @@
+--
+-- 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.
+--
+
+select *
+from (
+  select rootOrderId as custOrderId, co.date, co.orderId, replace(co.alias,'_ALGO','') as alias, op.parentAlgo
+  from (
+	select  date, orderId, rootOrderId, origOrderId, archSeq, alias 
+	from "part".CustOrder where alias='CUSTOM'
+	
+	union all
+	
+	select  date, orderId, rootOrderId, refOrderId as origOrderId, archSeq, alias
+	from "part".ReplaceOrder where alias='CUSTOM'
+  ) co, "part".OrderParams op
+  where co.date = op.date and co.orderId = op.orderId and co.archSeq = -- TODO: replace with 'dateToLong(co.date)+archSeq'.
+	(
+	  select max(archSeq) -- TODO: replace with 'dateToLong(co.date)+archSeq'.
+	  from (
+		  select  date, orderId, rootOrderId, origOrderId, archSeq, alias 
+		  from "part".CustOrder where alias='CUSTOM'
+		  
+		  union all
+		  
+		  select  date, orderId, rootOrderId, refOrderId as origOrderId, archSeq, alias
+		  from "part".ReplaceOrder where alias='CUSTOM'
+	  ) 
+	  where origOrderId = co.origOrderId and date = co.date
+	) and co.alias='CUSTOM'
+) cop 
+inner join (
+  select e.date, e.rootOrderId as eRootOrderId, e.rootOrderId, sum(e.execShares) as execShares, 
+	sum(e.execShares*e.price)/sum(e.execShares) as price,
+	case when min(e.lastMkt) = max(e.lastMkt) then min(e.lastMkt) else min('XOFF') end as execMeet
+  from "repl".Exec e
+  group by e.date, e.rootOrderId
+) oep on (cop.date = oep.date and cop.custOrderId = oep.eRootOrderId)
+left outer join (
+  select top 1 refOrderId, date from "part".Cancel
+) cc on (cc.refOrderId = cop.orderId and cc.date = cop.date)
+where cop.alias='CUSTOM'