Merge branch 'ignite-sprint-4' into ignite-695

Conflicts:
        
modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLoadingConcurrentGridStartSelfTest.java
        
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java


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

Branch: refs/heads/ignite-695
Commit: 8517bc58b3d13eb33280bec76f23817cddafb3c9
Parents: e5ccee4 54f9492
Author: Artem Shutak <ashu...@gridgain.com>
Authored: Tue May 5 12:26:11 2015 +0300
Committer: Artem Shutak <ashu...@gridgain.com>
Committed: Tue May 5 12:26:11 2015 +0300

----------------------------------------------------------------------
 DEVNOTES.txt                                    |   4 +-
 assembly/release-base.xml                       |   2 +
 assembly/release-schema-import.xml              |  50 +++
 .../streaming/wordcount/CacheConfig.java        |   5 -
 .../config/grid-client-config.properties        |  50 +--
 .../ClientPropertiesConfigurationSelfTest.java  |  12 +-
 modules/cloud/README.txt                        |  32 ++
 modules/cloud/licenses/apache-2.0.txt           | 202 +++++++++
 modules/cloud/pom.xml                           | 106 +++++
 .../cloud/TcpDiscoveryCloudIpFinder.java        | 433 +++++++++++++++++++
 .../tcp/ipfinder/cloud/package-info.java        |  21 +
 .../TcpDiscoveryCloudIpFinderSelfTest.java      | 124 ++++++
 .../tcp/ipfinder/cloud/package-info.java        |  22 +
 .../ignite/testsuites/IgniteCloudTestSuite.java | 112 +++++
 .../ignite/codegen/MessageCodeGenerator.java    |  26 +-
 .../java/org/apache/ignite/IgniteCache.java     |   5 +
 .../org/apache/ignite/IgniteJdbcDriver.java     |  81 ++--
 .../configuration/CacheConfiguration.java       | 259 ++++++++---
 .../configuration/IgniteConfiguration.java      | 344 ++++++++++++---
 .../ignite/internal/GridDirectCollection.java   |   3 +
 .../ignite/internal/GridUpdateNotifier.java     |  66 ++-
 .../ignite/internal/IgniteComponentType.java    |  36 +-
 .../apache/ignite/internal/IgniteKernal.java    |  83 ++--
 .../org/apache/ignite/internal/IgnitionEx.java  |  15 +-
 .../client/GridClientConfiguration.java         |   2 +-
 .../managers/communication/GridIoManager.java   |  30 +-
 .../communication/GridIoMessageFactory.java     |   8 +
 .../managers/indexing/GridIndexingManager.java  |  14 +-
 .../processors/cache/CacheObjectImpl.java       |   2 +-
 .../processors/cache/GridCacheMapEntry.java     |   9 +-
 .../processors/cache/GridCacheProcessor.java    |   3 +-
 .../processors/cache/GridCacheSwapManager.java  |  35 +-
 .../processors/cache/GridCacheTtlManager.java   | 168 ++++---
 .../processors/cache/GridCacheUtils.java        |   5 +-
 .../cache/query/GridCacheQueryManager.java      |  22 +-
 .../cache/query/GridCacheSqlQuery.java          | 135 +++++-
 .../cache/query/GridCacheTwoStepQuery.java      |   8 +-
 .../processors/query/GridQueryIndexing.java     |  19 +-
 .../processors/query/GridQueryProcessor.java    |  78 +++-
 .../messages/GridQueryNextPageResponse.java     |  68 ++-
 .../h2/twostep/messages/GridQueryRequest.java   |  21 +-
 .../util/spring/IgniteSpringHelper.java         |   4 +-
 .../internal/visor/cache/VisorCacheMetrics.java |  53 +--
 .../cache/VisorCacheNearConfiguration.java      |   4 +-
 .../visor/cache/VisorCacheStartTask.java        | 155 +++++++
 .../internal/visor/util/VisorTaskUtils.java     |  10 +
 .../apache/ignite/lang/IgniteAsyncSupport.java  |   4 +-
 .../org/apache/ignite/spi/IgniteSpiAdapter.java |  19 +-
 .../discovery/tcp/TcpClientDiscoverySpi.java    |   4 -
 .../spi/discovery/tcp/TcpDiscoverySpi.java      |   4 -
 .../discovery/tcp/TcpDiscoverySpiAdapter.java   |  18 +-
 .../resources/META-INF/classnames.properties    |  13 +
 .../core/src/main/resources/ignite.properties   |   2 +-
 .../internal/GridUpdateNotifierSelfTest.java    |  13 +-
 .../IgniteCacheEntryListenerAbstractTest.java   |   4 +-
 ...CacheLoadingConcurrentGridStartSelfTest.java | 159 +++++++
 ...GridCacheLoadingConcurrentGridStartTest.java | 159 -------
 .../tcp/TcpClientDiscoverySelfTest.java         |   8 +
 .../ignite/testsuites/IgniteCacheTestSuite.java |   2 +-
 modules/gce/README.txt                          |  32 ++
 modules/gce/licenses/apache-2.0.txt             | 202 +++++++++
 modules/gce/pom.xml                             |  92 ++++
 .../gce/TcpDiscoveryGoogleStorageIpFinder.java  | 380 ++++++++++++++++
 .../tcp/ipfinder/gce/package-info.java          |  22 +
 ...pDiscoveryGoogleStorageIpFinderSelfTest.java |  73 ++++
 .../tcp/ipfinder/gce/package-info.java          |  22 +
 .../ignite/testsuites/IgniteGCETestSuite.java   |  71 +++
 .../processors/query/h2/IgniteH2Indexing.java   | 169 +++++++-
 .../query/h2/opt/GridH2AbstractKeyValueRow.java |  92 +---
 .../query/h2/opt/GridH2KeyValueRowOffheap.java  |   7 +-
 .../query/h2/opt/GridH2KeyValueRowOnheap.java   |   6 +-
 .../query/h2/opt/GridH2RowDescriptor.java       |  14 +-
 .../processors/query/h2/opt/GridH2Table.java    |  10 +-
 .../query/h2/opt/GridH2ValueCacheObject.java    | 191 ++++++++
 .../query/h2/opt/GridLuceneIndex.java           |  84 ++--
 .../query/h2/twostep/GridMapQueryExecutor.java  |  21 +-
 .../query/h2/twostep/GridMergeIndex.java        |   6 +-
 .../h2/twostep/GridMergeIndexUnsorted.java      |   4 +-
 .../h2/twostep/GridReduceQueryExecutor.java     |  13 +-
 .../query/h2/twostep/GridResultPage.java        |  80 +++-
 .../query/h2/twostep/msg/GridH2Array.java       | 124 ++++++
 .../query/h2/twostep/msg/GridH2Boolean.java     | 112 +++++
 .../query/h2/twostep/msg/GridH2Byte.java        | 113 +++++
 .../query/h2/twostep/msg/GridH2Bytes.java       | 113 +++++
 .../query/h2/twostep/msg/GridH2CacheObject.java | 148 +++++++
 .../query/h2/twostep/msg/GridH2Date.java        | 115 +++++
 .../query/h2/twostep/msg/GridH2Decimal.java     | 134 ++++++
 .../query/h2/twostep/msg/GridH2Double.java      | 113 +++++
 .../query/h2/twostep/msg/GridH2Float.java       | 113 +++++
 .../query/h2/twostep/msg/GridH2Geometry.java    | 134 ++++++
 .../query/h2/twostep/msg/GridH2Integer.java     | 113 +++++
 .../query/h2/twostep/msg/GridH2JavaObject.java  | 113 +++++
 .../query/h2/twostep/msg/GridH2Long.java        | 113 +++++
 .../query/h2/twostep/msg/GridH2Null.java        |  78 ++++
 .../query/h2/twostep/msg/GridH2Short.java       | 113 +++++
 .../query/h2/twostep/msg/GridH2String.java      | 115 +++++
 .../query/h2/twostep/msg/GridH2Time.java        | 116 +++++
 .../query/h2/twostep/msg/GridH2Timestamp.java   | 133 ++++++
 .../query/h2/twostep/msg/GridH2Uuid.java        | 133 ++++++
 .../h2/twostep/msg/GridH2ValueMessage.java      |  49 +++
 .../twostep/msg/GridH2ValueMessageFactory.java  | 201 +++++++++
 .../IgniteCacheQueryMultiThreadedSelfTest.java  |   6 +-
 .../h2/GridIndexingSpiAbstractSelfTest.java     | 130 ++++--
 modules/schema-import/pom.xml                   |   6 +-
 .../util/spring/IgniteSpringHelperImpl.java     |   2 +-
 ...gniteProjectionStartStopRestartSelfTest.java |  26 +-
 .../commands/cache/VisorCacheCommand.scala      |   2 +-
 pom.xml                                         | 232 ++++++++--
 108 files changed, 6916 insertions(+), 930 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8517bc58/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLoadingConcurrentGridStartSelfTest.java
----------------------------------------------------------------------
diff --cc 
modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLoadingConcurrentGridStartSelfTest.java
index 0000000,74273d1..1e28937
mode 000000,100644..100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLoadingConcurrentGridStartSelfTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLoadingConcurrentGridStartSelfTest.java
@@@ -1,0 -1,154 +1,159 @@@
+ /*
+  * Licensed to the Apache Software Foundation (ASF) under one or more
+  * contributor license agreements.  See the NOTICE file distributed with
+  * this work for additional information regarding copyright ownership.
+  * The ASF licenses this file to You under the Apache License, Version 2.0
+  * (the "License"); you may not use this file except in compliance with
+  * the License.  You may obtain a copy of the License at
+  *
+  *      http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+ 
+ package org.apache.ignite.internal.processors.cache.distributed;
+ 
+ import org.apache.ignite.*;
+ import org.apache.ignite.cache.*;
+ import org.apache.ignite.cache.store.*;
+ import org.apache.ignite.configuration.*;
+ import org.apache.ignite.internal.*;
+ import org.apache.ignite.lang.*;
+ import org.apache.ignite.testframework.*;
+ import org.apache.ignite.testframework.junits.common.*;
+ import org.jetbrains.annotations.*;
+ 
+ import javax.cache.*;
+ import javax.cache.configuration.*;
+ import javax.cache.integration.*;
+ import java.util.concurrent.*;
+ 
+ import static org.apache.ignite.cache.CacheMode.*;
+ 
+ /**
+  * Tests for cache data loading during simultaneous grids start.
+  */
+ public class CacheLoadingConcurrentGridStartSelfTest extends 
GridCommonAbstractTest {
++    /** {@inheritDoc} */
++    @Override protected void beforeTest() throws Exception {
++        fail("https://issues.apache.org/jira/browse/IGNITE-500";);
++    }
++
+     /** Grids count */
+     private static int GRIDS_CNT = 5;
+ 
+     /** Keys count */
+     private static int KEYS_CNT = 1_000_000;
+ 
+     /** {@inheritDoc} */
+     @SuppressWarnings("unchecked")
+     @Override protected IgniteConfiguration getConfiguration(String gridName) 
throws Exception {
+         IgniteConfiguration cfg = super.getConfiguration(gridName);
+ 
+         CacheConfiguration ccfg = new CacheConfiguration();
+ 
+         ccfg.setCacheMode(PARTITIONED);
+ 
+         ccfg.setBackups(1);
+ 
+         CacheStore<Integer, String> store = new CacheStoreAdapter<Integer, 
String>() {
+             @Override public void loadCache(IgniteBiInClosure<Integer, 
String> f, Object... args) {
+                 for (int i = 0; i < KEYS_CNT; i++)
+                     f.apply(i, Integer.toString(i));
+             }
+ 
+             @Nullable @Override public String load(Integer i) throws 
CacheLoaderException {
+                 return null;
+             }
+ 
+             @Override public void write(Cache.Entry<? extends Integer, ? 
extends String> entry) throws CacheWriterException {
+                 // No-op.
+             }
+ 
+             @Override public void delete(Object o) throws 
CacheWriterException {
+                 // No-op.
+             }
+         };
+ 
+         ccfg.setCacheStoreFactory(new FactoryBuilder.SingletonFactory(store));
+ 
+         cfg.setCacheConfiguration(ccfg);
+ 
+         return cfg;
+     }
+ 
+     /** {@inheritDoc} */
+     @Override protected void afterTest() throws Exception {
+         stopAllGrids();
+     }
+ 
+     /**
+      * @throws Exception if failed
+      */
+     public void testLoadCacheWithDataStreamer() throws Exception {
+         IgniteInClosure<Ignite> f = new IgniteInClosure<Ignite>() {
+             @Override public void apply(Ignite grid) {
+                 try (IgniteDataStreamer<Integer, String> dataStreamer = 
grid.dataStreamer(null)) {
+                     for (int i = 0; i < KEYS_CNT; i++)
+                         dataStreamer.addData(i, Integer.toString(i));
+                 }
+             }
+         };
+ 
+         loadCache(f);
+     }
+ 
+     /**
+      * @throws Exception if failed
+      */
+     public void testLoadCacheFromStore() throws Exception {
+         loadCache(new IgniteInClosure<Ignite>() {
+             @Override public void apply(Ignite grid) {
+                 grid.cache(null).loadCache(null);
+             }
+         });
+     }
+ 
+     /**
+      * Loads cache using closure and asserts cache size.
+      *
+      * @param f cache loading closure
+      * @throws Exception if failed
+      */
+     private void loadCache(IgniteInClosure<Ignite> f) throws Exception {
+         Ignite g0 = startGrid(0);
+ 
+         IgniteInternalFuture fut = GridTestUtils.runAsync(new 
Callable<Ignite>() {
+             @Override public Ignite call() throws Exception {
+                 return startGridsMultiThreaded(1, GRIDS_CNT - 1);
+             }
+         });
+ 
+         try {
+             f.apply(g0);
+         }
+         finally {
+             fut.get();
+         }
+ 
+         assertCacheSize();
+     }
+ 
+     /** Asserts cache size. */
+     private void assertCacheSize() {
+         IgniteCache<Integer, String> cache = grid(0).cache(null);
+ 
+         assertEquals(KEYS_CNT, cache.size(CachePeekMode.PRIMARY));
+ 
+         int total = 0;
+ 
+         for (int i = 0; i < GRIDS_CNT; i++)
+             total += grid(i).cache(null).localSize(CachePeekMode.PRIMARY);
+ 
+         assertEquals(KEYS_CNT, total);
+     }
+ }

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

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8517bc58/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridIndexingSpiAbstractSelfTest.java
----------------------------------------------------------------------

Reply via email to