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 2017/04/06 10:46:27 UTC

[50/50] [abbrv] ignite git commit: Merge branch master into ignite-3477-master

Merge branch master into ignite-3477-master


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

Branch: refs/heads/ignite-3477-master
Commit: 03183a9abd830d9d15a26e773a4d95b841f6d8c3
Parents: 6d0a419 b465301
Author: Alexey Goncharuk <al...@gmail.com>
Authored: Thu Apr 6 13:44:16 2017 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Thu Apr 6 13:44:16 2017 +0300

----------------------------------------------------------------------
 assembly/release-fabric-base.xml                |   6 +
 .../internal/jdbc2/JdbcConnectionSelfTest.java  |  34 ++
 .../src/test/resources/spring-server-node.xml   |  71 ++--
 .../test/resources/spring-server-ssl-node.xml   |  69 ++--
 .../java/org/apache/ignite/IgniteBinary.java    |  35 +-
 .../org/apache/ignite/IgniteJdbcDriver.java     |  11 +-
 .../ignite/cache/CacheTypeFieldMetadata.java    | 149 --------
 .../apache/ignite/cache/CacheTypeMetadata.java  | 379 -------------------
 .../org/apache/ignite/cache/QueryEntity.java    |   3 +
 .../store/jdbc/CacheAbstractJdbcStore.java      |  55 ---
 .../configuration/CacheConfiguration.java       |  35 +-
 .../configuration/IgniteConfiguration.java      |  30 ++
 .../configuration/MemoryConfiguration.java      |  20 +-
 .../MemoryPolicyConfiguration.java              |  12 +-
 .../ignite/internal/GridKernalContext.java      |   7 +
 .../ignite/internal/GridKernalContextImpl.java  |  11 +
 .../apache/ignite/internal/IgniteKernal.java    |   2 +
 .../org/apache/ignite/internal/IgnitionEx.java  |  16 +
 .../ignite/internal/MarshallerContextImpl.java  |  20 +-
 .../ignite/internal/jdbc2/JdbcConnection.java   |  50 ++-
 .../managers/communication/GridIoManager.java   |   2 +
 .../managers/communication/GridIoPolicy.java    |   5 +-
 .../continuous/GridContinuousProcessor.java     |   3 +-
 .../internal/processors/pool/PoolProcessor.java |  10 +-
 .../processors/query/GridQueryProcessor.java    |  10 -
 .../internal/processors/query/QueryUtils.java   | 328 +---------------
 .../processors/service/GridServiceProxy.java    |  10 +
 .../task/GridTaskThreadContextKey.java          |   7 +-
 .../processors/task/GridTaskWorker.java         |  16 +-
 .../visor/cache/VisorCacheConfiguration.java    |   2 +-
 .../cache/VisorCacheTypeFieldMetadata.java      |  14 +-
 .../visor/cache/VisorCacheTypeMetadata.java     |  91 +----
 .../ignite/spi/collision/CollisionSpi.java      |  11 +-
 .../ignite/spi/discovery/tcp/ServerImpl.java    |   3 +-
 .../resources/META-INF/classnames.properties    |   1 -
 .../test/config/store/jdbc/ignite-jdbc-type.xml | 279 ++++++++++++++
 .../config/store/jdbc/ignite-type-metadata.xml  | 276 --------------
 ...eJdbcStoreAbstractMultithreadedSelfTest.java |  71 ++--
 .../ignite/custom/DummyEventFilterFactory.java  |  47 +++
 .../ContinuousQueryPeerClassLoadingTest.java    | 142 +++++++
 .../marshaller/MarshallerContextSelfTest.java   |  80 +++-
 .../ignite/platform/PlatformStopIgniteTask.java |  11 +-
 .../services/ServiceThreadPoolSelfTest.java     | 133 +++++++
 .../junits/GridTestKernalContext.java           |   1 +
 .../testsuites/IgniteKernalSelfTestSuite.java   |   2 +
 .../hadoop/impl/v2/HadoopV2Context.java         |   6 +-
 .../query/h2/sql/GridSqlOperationType.java      |  23 +-
 .../query/h2/sql/GridSqlQueryParser.java        |  19 +-
 .../cache/BinarySerializationQuerySelfTest.java |  30 +-
 ...ryDuplicateIndexObjectsAbstractSelfTest.java | 159 ++++++++
 .../IgniteCacheObjectKeyIndexingSelfTest.java   | 124 ++++++
 .../cache/IncorrectCacheTypeMetadataTest.java   |  76 ----
 .../cache/IncorrectQueryEntityTest.java         |   3 +
 ...ateIndexObjectPartitionedAtomicSelfTest.java |  38 ++
 ...xObjectPartitionedTransactionalSelfTest.java |  41 ++
 .../query/IgniteSqlSplitterSelfTest.java        |  43 +++
 .../query/h2/sql/GridQueryParsingTest.java      |  27 +-
 .../IgniteBinaryCacheQueryTestSuite.java        |   5 +
 .../IgniteCacheQuerySelfTestSuite.java          |   2 -
 .../IgniteCacheQuerySelfTestSuite2.java         |   2 +
 .../IgniteCacheQuerySelfTestSuite3.java         |   2 +
 .../include/ignite/binary/binary_containers.h   |   2 +-
 .../include/ignite/binary/binary_raw_writer.h   |   4 +-
 .../include/ignite/binary/binary_writer.h       |   4 +-
 .../ignite/impl/binary/binary_reader_impl.h     |   6 +-
 .../include/ignite/impl/binary/binary_utils.h   |  13 +-
 .../ignite/impl/binary/binary_writer_impl.h     |   4 +-
 .../core-test/config/cache-query-default.xml    |  70 ++--
 .../cpp/core-test/include/ignite/test_utils.h   |  11 +
 .../src/binary_reader_writer_raw_test.cpp       |  12 +-
 .../core-test/src/binary_reader_writer_test.cpp |  12 +-
 .../cpp/core-test/src/cache_query_test.cpp      | 225 ++++++++---
 .../platforms/cpp/core-test/src/cache_test.cpp  | 206 +++++++++-
 .../cpp/core-test/src/cluster_test.cpp          |   4 +-
 .../cpp/core-test/src/ignition_test.cpp         |  12 +-
 .../cpp/core/include/ignite/cache/cache.h       | 161 ++++++++
 .../cpp/core/include/ignite/cache/cache_entry.h |  15 +
 .../include/ignite/cache/query/query_cursor.h   |  28 +-
 .../platforms/cpp/core/include/ignite/ignite.h  |  18 +-
 .../cpp/core/include/ignite/ignition.h          |  14 +-
 .../ignite/impl/cache/query/query_impl.h        |   7 +
 .../cpp/core/include/ignite/impl/helpers.h      |  57 +++
 .../cpp/core/include/ignite/impl/operations.h   | 136 ++++++-
 .../platforms/cpp/core/project/vs/core.vcxproj  |   1 +
 .../cpp/core/project/vs/core.vcxproj.filters    |   3 +
 modules/platforms/cpp/core/src/ignition.cpp     |  62 +--
 .../core/src/impl/cache/query/query_impl.cpp    |  39 +-
 .../cpp/core/src/impl/ignite_environment.cpp    |   2 +-
 .../ExpiryCacheHolderTest.cs                    |  12 +-
 .../Binary/BinaryDynamicRegistrationTest.cs     |  50 ++-
 .../Binary/BinaryEqualityComparerTest.cs        |   7 +-
 .../BinaryConfigurationTest.cs                  |  43 +++
 .../Cache/CacheAbstractTest.cs                  |  18 +-
 .../Cache/CacheTestAsyncWrapper.cs              |  12 +-
 .../Cache/Query/CacheLinqTest.cs                |  36 +-
 .../Cache/Store/CacheStoreTest.cs               |   2 +-
 .../Compute/AbstractTaskTest.cs                 |  28 +-
 .../Compute/MixedClusterTest.cs                 |  33 +-
 .../Config/cache-query-continuous.xml           | 118 ++++--
 .../Apache.Ignite.Core.Tests/DeploymentTest.cs  |  10 +
 .../Examples/ExamplesTest.cs                    |  22 +-
 .../Apache.Ignite.Core.Tests/ExecutableTest.cs  |   5 +-
 .../IgniteConfigurationSectionTest.cs           |   7 +-
 .../Plugin/PluginTest.cs                        |  16 +-
 .../dotnet/Apache.Ignite.Core/Cache/ICache.cs   |  16 +-
 .../Cache/ICacheEntryProcessorResult.cs         |  12 +-
 .../dotnet/Apache.Ignite.Core/Ignition.cs       |  28 +-
 .../Impl/Binary/Marshaller.cs                   |  27 ++
 .../Impl/Cache/CacheEntryProcessorResult.cs     |  27 +-
 .../Apache.Ignite.Core/Impl/Cache/CacheImpl.cs  |  28 +-
 .../Impl/Common/IgniteHome.cs                   |  21 +-
 .../Apache.Ignite.Core/Impl/PlatformTarget.cs   |  17 +-
 .../Impl/DbCache.cs                             |   2 +-
 .../Impl/CacheQueryExpressionVisitor.cs         |  14 +-
 .../Apache.Ignite.Linq/Impl/CacheQueryParser.cs |  25 +-
 .../Apache.Ignite.Linq/Impl/MethodVisitor.cs    |  72 +++-
 .../examples/Apache.Ignite.Examples/App.config  |   4 +-
 .../Datagrid/MultiTieredCacheExample.cs         |   2 +-
 .../Datagrid/PutGetExample.cs                   |  13 +-
 .../Misc/ClientReconnectExample.cs              |  38 +-
 modules/schema-import/README.txt                |   4 +-
 modules/spring/pom.xml                          |   6 +
 .../apache/ignite/cache/spring/SpringCache.java |   4 +-
 .../ignite/cache/spring/SpringCacheTest.java    | 177 +++++++++
 .../IgniteExcludeInConfigurationTest.java       |  14 +-
 .../org/apache/ignite/spring/sprint-exclude.xml |  19 +-
 .../testsuites/IgniteSpringTestSuite.java       |   3 +
 .../modules/configuration/Version.service.js    |   2 +-
 .../states/configuration/clusters/general.pug   |   2 +-
 modules/web-console/web-agent/README.txt        |   2 +-
 .../config/benchmark-atomic.properties          |  21 +-
 .../config/benchmark-cache-load.properties      |   7 +-
 .../config/benchmark-compute.properties         |  13 +-
 .../config/benchmark-failover.properties        |   4 +-
 .../config/benchmark-multicast.properties       |   4 +-
 .../config/benchmark-put-indexed-val.properties |   9 +-
 .../yardstick/config/benchmark-query.properties |  19 +-
 .../config/benchmark-remote-sample.properties   |   5 +-
 .../config/benchmark-sample.properties          |   5 +-
 .../config/benchmark-sql-dml.properties         |  19 +-
 .../yardstick/config/benchmark-store.properties |  30 +-
 .../yardstick/config/benchmark-tx.properties    |  19 +-
 .../test-max-int-values-offheap.properties      |   5 +-
 .../test-max-int-values-onheap.properties       |   5 +-
 .../config/test-max-int-values-swap.properties  |   5 +-
 .../IgniteCacheRandomOperationBenchmark.java    |  25 +-
 146 files changed, 3413 insertions(+), 2078 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/03183a9a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheAbstractJdbcStore.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/03183a9a/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
index 643c140,ab0aff2..a9cb38e
--- a/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
@@@ -51,9 -51,7 +51,8 @@@ import org.apache.ignite.cache.CacheInt
  import org.apache.ignite.cache.CacheMemoryMode;
  import org.apache.ignite.cache.CacheMode;
  import org.apache.ignite.cache.CacheRebalanceMode;
- import org.apache.ignite.cache.CacheTypeMetadata;
  import org.apache.ignite.cache.CacheWriteSynchronizationMode;
 +import org.apache.ignite.cache.PartitionLossPolicy;
  import org.apache.ignite.cache.QueryEntity;
  import org.apache.ignite.cache.QueryIndex;
  import org.apache.ignite.cache.QueryIndexType;
@@@ -497,9 -491,9 +493,8 @@@ public class CacheConfiguration<K, V> e
          startSize = cc.getStartSize();
          storeFactory = cc.getCacheStoreFactory();
          storeSesLsnrs = cc.getCacheStoreSessionListenerFactories();
 -        swapEnabled = cc.isSwapEnabled();
          tmLookupClsName = cc.getTransactionManagerLookupClassName();
          topValidator = cc.getTopologyValidator();
-         typeMeta = cc.getTypeMetadata();
          writeBehindBatchSize = cc.getWriteBehindBatchSize();
          writeBehindEnabled = cc.isWriteBehindEnabled();
          writeBehindFlushFreq = cc.getWriteBehindFlushFrequency();
@@@ -1325,27 -1320,6 +1320,29 @@@
      }
  
      /**
 +     * Gets maximum inline size for sql indexes. If -1 returned then
 +     * {@code IgniteSystemProperties.IGNITE_MAX_INDEX_PAYLOAD_SIZE} system property is used.
 +     * <p>
 +     * If not set, default value is {@link #DFLT_SQL_INDEX_MAX_INLINE_SIZE}.
 +     *
 +     * @return Maximum payload size for offheap indexes.
 +     */
 +    public int getSqlIndexMaxInlineSize() {
 +        return sqlIndexMaxInlineSize;
 +    }
 +
 +    /**
 +     * Sets maximum inline size for sql indexes.
 +     *
 +     * @param sqlIndexMaxInlineSize Maximum inline size for sql indexes.
 +     */
-     public void setSqlIndexMaxInlineSize(int sqlIndexMaxInlineSize) {
++    public CacheConfiguration<K, V> setSqlIndexMaxInlineSize(int sqlIndexMaxInlineSize) {
 +        this.sqlIndexMaxInlineSize = sqlIndexMaxInlineSize;
++
++        return this;
 +    }
 +
 +    /**
       * Flag indicating whether Ignite should use write-behind behaviour for the cache store.
       * By default write-behind is disabled which is defined via {@link #DFLT_WRITE_BEHIND_ENABLED}
       * constant.
@@@ -2078,28 -2058,6 +2053,30 @@@
      }
  
      /**
 +     * Gets partition loss policy. This policy defines how Ignite will react to a situation when all nodes for
 +     * some partition leave the cluster.
 +     *
 +     * @return Partition loss policy.
 +     * @see PartitionLossPolicy
 +     */
 +    public PartitionLossPolicy getPartitionLossPolicy() {
 +        return partitionLossPolicy == null ? DFLT_PARTITION_LOSS_POLICY : partitionLossPolicy;
 +    }
 +
 +    /**
 +     * Sets partition loss policy. This policy defines how Ignite will react to a situation when all nodes for
 +     * some partition leave the cluster.
 +     *
 +     * @param partitionLossPolicy Partition loss policy.
 +     * @see PartitionLossPolicy
 +     */
-     public void setPartitionLossPolicy(PartitionLossPolicy partitionLossPolicy) {
++    public CacheConfiguration<K, V> setPartitionLossPolicy(PartitionLossPolicy partitionLossPolicy) {
 +        this.partitionLossPolicy = partitionLossPolicy;
++
++        return this;
 +    }
 +
 +    /**
       * Sets query entities configuration.
       *
       * @param qryEntities Query entities.

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

http://git-wip-us.apache.org/repos/asf/ignite/blob/03183a9a/modules/core/src/main/java/org/apache/ignite/configuration/MemoryConfiguration.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/configuration/MemoryConfiguration.java
index 1722781,0000000..0f16ada
mode 100644,000000..100644
--- a/modules/core/src/main/java/org/apache/ignite/configuration/MemoryConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/configuration/MemoryConfiguration.java
@@@ -1,163 -1,0 +1,173 @@@
 +/*
 + * 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.configuration;
 +
 +import java.io.Serializable;
 +import org.apache.ignite.internal.util.typedef.internal.A;
 +import org.apache.ignite.internal.util.typedef.internal.U;
 +
 +/**
 + * Database configuration used to configure database and manage offheap memory of Ignite Node.
 + *
 + * <p>It may be configured under {@link IgniteConfiguration XML configuration} as follows:</p>
 + * <pre>
 + *     {@code
 + *     <property name="memoryConfiguration">
 + *         <bean class="org.apache.ignite.configuration.MemoryConfiguration">
 + *             <property name="systemCacheMemorySize" value="103833600"/>
 + *             <property name="defaultMemoryPolicyName" value="default_mem_plc"/>
 + *
 + *             <property name="memoryPolicies">
 + *                 <list>
 + *                     <bean class="org.apache.ignite.configuration.MemoryPolicyConfiguration">
 + *                         <property name="name" value="default_mem_plc"/>
 + *                         <property name="size" value="103833600"/>
 + *                     </bean>
 + *                     <bean class="org.apache.ignite.configuration.MemoryPolicyConfiguration">
 + *                         ...
 + *                     </bean>
 + *                 </list>
 + *             </property>
 + *         </bean>
 + *     </property>
 + *     }
 + * </pre>
 + */
 +public class MemoryConfiguration implements Serializable {
 +    /** */
 +    private static final long serialVersionUID = 0L;
 +
 +    /** Default MemoryPolicy size is 1GB. */
 +    public static final long DFLT_MEMORY_POLICY_SIZE = 1024 * 1024 * 1024;
 +
 +    /** Default size of memory chunk for system cache is 100MB. */
 +    public static final long DFLT_SYS_CACHE_MEM_SIZE = 100 * 1024 * 1024;
 +
 +    /** Default page size. */
 +    public static final int DFLT_PAGE_SIZE = 2 * 1024;
 +
 +    /** Size of memory for system cache. */
 +    private long sysCacheMemSize = DFLT_SYS_CACHE_MEM_SIZE;
 +
 +    /** Page size. */
 +    private int pageSize = DFLT_PAGE_SIZE;
 +
 +    /** Concurrency level. */
 +    private int concLvl;
 +
 +    /** Name of MemoryPolicy to be used as default. */
 +    private String dfltMemPlcName;
 +
 +    /** Memory policies. */
 +    private MemoryPolicyConfiguration[] memPlcs;
 +
 +    /**
 +     * @return memory size for system cache.
 +     */
 +    public long getSystemCacheMemorySize() {
 +        return sysCacheMemSize;
 +    }
 +
 +    /**
 +     * @param sysCacheMemSize Memory size for system cache.
 +     */
-     public void setSystemCacheMemorySize(long sysCacheMemSize) {
++    public MemoryConfiguration setSystemCacheMemorySize(long sysCacheMemSize) {
 +        this.sysCacheMemSize = sysCacheMemSize;
++
++        return this;
 +    }
 +
 +    /**
 +     * @return Page size.
 +     */
 +    public int getPageSize() {
 +        return pageSize;
 +    }
 +
 +    /**
 +     * @param pageSize Page size.
 +     */
-     public void setPageSize(int pageSize) {
++    public MemoryConfiguration setPageSize(int pageSize) {
 +        A.ensure(pageSize >= 1024 && pageSize <= 16 * 1024, "Page size must be between 1kB and 16kB.");
 +        A.ensure(U.isPow2(pageSize), "Page size must be a power of 2.");
 +
 +        this.pageSize = pageSize;
++
++        return this;
 +    }
 +
 +    /**
 +     * @return Array of MemoryPolicyConfiguration objects.
 +     */
 +    public MemoryPolicyConfiguration[] getMemoryPolicies() {
 +        return memPlcs;
 +    }
 +
 +    /**
 +     * @param memPlcs MemoryPolicyConfiguration instances.
 +     */
-     public void setMemoryPolicies(MemoryPolicyConfiguration... memPlcs) {
++    public MemoryConfiguration setMemoryPolicies(MemoryPolicyConfiguration... memPlcs) {
 +        this.memPlcs = memPlcs;
++
++        return this;
 +    }
 +
 +    /**
 +     * @return default {@link MemoryPolicyConfiguration} instance.
 +     */
 +    public MemoryPolicyConfiguration createDefaultPolicyConfig() {
 +        MemoryPolicyConfiguration memPlc = new MemoryPolicyConfiguration();
 +
 +        memPlc.setName(null);
 +        memPlc.setSize(DFLT_MEMORY_POLICY_SIZE);
 +
 +        return memPlc;
 +    }
 +
 +    /**
 +     * @return Concurrency level.
 +     */
 +    public int getConcurrencyLevel() {
 +        return concLvl;
 +    }
 +
 +    /**
 +     * @param concLvl Concurrency level.
 +     */
-     public void setConcurrencyLevel(int concLvl) {
++    public MemoryConfiguration setConcurrencyLevel(int concLvl) {
 +        this.concLvl = concLvl;
++        
++        return this;
 +    }
 +
 +    /**
 +     * @return Name of MemoryPolicy to be used as default.
 +     */
 +    public String getDefaultMemoryPolicyName() {
 +        return dfltMemPlcName;
 +    }
 +
 +    /**
 +     * @param dfltMemPlcName Name of MemoryPolicy to be used as default.
 +     */
-     public void setDefaultMemoryPolicyName(String dfltMemPlcName) {
++    public MemoryConfiguration setDefaultMemoryPolicyName(String dfltMemPlcName) {
 +        this.dfltMemPlcName = dfltMemPlcName;
++
++        return this;
 +    }
 +}

http://git-wip-us.apache.org/repos/asf/ignite/blob/03183a9a/modules/core/src/main/java/org/apache/ignite/configuration/MemoryPolicyConfiguration.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/configuration/MemoryPolicyConfiguration.java
index 3bf1706,0000000..2add64f
mode 100644,000000..100644
--- a/modules/core/src/main/java/org/apache/ignite/configuration/MemoryPolicyConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/configuration/MemoryPolicyConfiguration.java
@@@ -1,80 -1,0 +1,86 @@@
 +/*
 + * 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.configuration;
 +
 +import java.io.Serializable;
 +import org.apache.ignite.internal.pagemem.PageMemory;
 +import org.apache.ignite.internal.processors.cache.database.MemoryPolicy;
 +
 +/**
 + * Configuration bean used for creating {@link MemoryPolicy} instances.
 + */
 +public final class MemoryPolicyConfiguration implements Serializable {
 +    /** */
 +    private static final long serialVersionUID = 0L;
 +
 +    /** Unique name of MemoryPolicy. */
 +    private String name;
 +
 +    /** Size in bytes of {@link PageMemory} in bytes that will be created for this configuration. */
 +    private long size;
 +
 +    /** Path for memory mapped file (won't be created if not configured). */
 +    private String swapFilePath;
 +
 +    /**
 +     * Unique name of MemoryPolicy.
 +     */
 +    public String getName() {
 +        return name;
 +    }
 +
 +    /**
 +     * @param name Unique name of MemoryPolicy.
 +     */
-     public void setName(String name) {
++    public MemoryPolicyConfiguration setName(String name) {
 +        this.name = name;
++
++        return this;
 +    }
 +
 +    /**
 +     * Size in bytes of {@link PageMemory} in bytes that will be created for this configuration.
 +     */
 +    public long getSize() {
 +        return size;
 +    }
 +
 +    /**
 +     * Size in bytes of {@link PageMemory} in bytes that will be created for this configuration.
 +     */
-     public void setSize(long size) {
++    public MemoryPolicyConfiguration setSize(long size) {
 +        this.size = size;
++
++        return this;
 +    }
 +
 +    /**
 +     * @return Path for memory mapped file (won't be created if not configured).
 +     */
 +    public String getSwapFilePath() {
 +        return swapFilePath;
 +    }
 +
 +    /**
 +     * @param swapFilePath Path for memory mapped file (won't be created if not configured)..
 +     */
-     public void setSwapFilePath(String swapFilePath) {
++    public MemoryPolicyConfiguration setSwapFilePath(String swapFilePath) {
 +        this.swapFilePath = swapFilePath;
++
++        return this;
 +    }
 +}

http://git-wip-us.apache.org/repos/asf/ignite/blob/03183a9a/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContext.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/03183a9a/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContextImpl.java
----------------------------------------------------------------------

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

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

http://git-wip-us.apache.org/repos/asf/ignite/blob/03183a9a/modules/core/src/main/java/org/apache/ignite/internal/MarshallerContextImpl.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/03183a9a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/03183a9a/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/03183a9a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/03183a9a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/QueryUtils.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/03183a9a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java
index e5325e2,30973b0..0f5cd46
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java
@@@ -129,8 -137,9 +129,8 @@@ public class VisorCacheConfiguration im
          startSize = ccfg.getStartSize();
          offHeapMaxMemory = ccfg.getOffHeapMaxMemory();
          maxConcurrentAsyncOps = ccfg.getMaxConcurrentAsyncOperations();
 -        memoryMode = ccfg.getMemoryMode();
          interceptor = compactClass(ccfg.getInterceptor());
-         typeMeta = VisorCacheTypeMetadata.list(ccfg.getQueryEntities(), ccfg.getCacheStoreFactory(), ccfg.getTypeMetadata());
+         typeMeta = VisorCacheTypeMetadata.list(ccfg.getQueryEntities(), ccfg.getCacheStoreFactory());
          statisticsEnabled = ccfg.isStatisticsEnabled();
          mgmtEnabled = ccfg.isManagementEnabled();
          ldrFactory = compactClass(ccfg.getCacheLoaderFactory());

http://git-wip-us.apache.org/repos/asf/ignite/blob/03183a9a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/03183a9a/modules/core/src/main/resources/META-INF/classnames.properties
----------------------------------------------------------------------
diff --cc modules/core/src/main/resources/META-INF/classnames.properties
index 3598447,9cce826..473f176
--- a/modules/core/src/main/resources/META-INF/classnames.properties
+++ b/modules/core/src/main/resources/META-INF/classnames.properties
@@@ -44,9 -44,7 +44,8 @@@ org.apache.ignite.cache.CachePeekMod
  org.apache.ignite.cache.CacheRebalanceMode
  org.apache.ignite.cache.CacheServerNotFoundException
  org.apache.ignite.cache.CacheTypeFieldMetadata
- org.apache.ignite.cache.CacheTypeMetadata
  org.apache.ignite.cache.CacheWriteSynchronizationMode
 +org.apache.ignite.cache.PartitionLossPolicy
  org.apache.ignite.cache.QueryEntity
  org.apache.ignite.cache.QueryIndex
  org.apache.ignite.cache.QueryIndexType

http://git-wip-us.apache.org/repos/asf/ignite/blob/03183a9a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcStoreAbstractMultithreadedSelfTest.java
----------------------------------------------------------------------
diff --cc modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcStoreAbstractMultithreadedSelfTest.java
index bed7456,e7a4af0..b1f8cd3
--- a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcStoreAbstractMultithreadedSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcStoreAbstractMultithreadedSelfTest.java
@@@ -148,42 -181,11 +181,10 @@@ public abstract class CacheJdbcStoreAbs
  
          cc.setCacheMode(PARTITIONED);
          cc.setAtomicityMode(ATOMIC);
 -        cc.setSwapEnabled(false);
          cc.setWriteBehindEnabled(false);
  
-         URL cfgUrl;
- 
-         try {
-             cfgUrl = new URL(DFLT_MAPPING_CONFIG);
-         }
-         catch (MalformedURLException ignore) {
-             cfgUrl = U.resolveIgniteUrl(DFLT_MAPPING_CONFIG);
-         }
- 
-         if (cfgUrl == null)
-             throw new Exception("Failed to resolve metadata path: " + DFLT_MAPPING_CONFIG);
- 
-         try {
-             GenericApplicationContext springCtx = new GenericApplicationContext();
- 
-             new XmlBeanDefinitionReader(springCtx).loadBeanDefinitions(new UrlResource(cfgUrl));
- 
-             springCtx.refresh();
- 
-             Collection<CacheTypeMetadata> tp = new ArrayList<>(springCtx.getBeansOfType(CacheTypeMetadata.class).values());
- 
-             cc.setTypeMetadata(tp);
-         }
-         catch (BeansException e) {
-             if (X.hasCause(e, ClassNotFoundException.class))
-                 throw new IgniteCheckedException("Failed to instantiate Spring XML application context " +
-                     "(make sure all classes used in Spring configuration are present at CLASSPATH) " +
-                     "[springUrl=" + cfgUrl + ']', e);
-             else
-                 throw new IgniteCheckedException("Failed to instantiate Spring XML application context [springUrl=" +
-                     cfgUrl + ", err=" + e.getMessage() + ']', e);
-         }
- 
          cc.setCacheStoreFactory(singletonFactory(store));
+ 
          cc.setReadThrough(true);
          cc.setWriteThrough(true);
          cc.setLoadPreviousValue(true);

http://git-wip-us.apache.org/repos/asf/ignite/blob/03183a9a/modules/core/src/test/java/org/apache/ignite/marshaller/MarshallerContextSelfTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/03183a9a/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridTestKernalContext.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/03183a9a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteKernalSelfTestSuite.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/03183a9a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IncorrectQueryEntityTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/03183a9a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSplitterSelfTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/03183a9a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/GridQueryParsingTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/03183a9a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/03183a9a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite2.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/03183a9a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite3.java
----------------------------------------------------------------------
diff --cc modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite3.java
index 3c1f971,a4594ee..e4ca29f
--- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite3.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite3.java
@@@ -33,7 -33,9 +33,8 @@@ import org.apache.ignite.internal.proce
  import org.apache.ignite.internal.processors.cache.query.continuous.CacheKeepBinaryIterationNearEnabledTest;
  import org.apache.ignite.internal.processors.cache.query.continuous.CacheKeepBinaryIterationTest;
  import org.apache.ignite.internal.processors.cache.query.continuous.CacheKeepBinaryIterationStoreEnabledTest;
 -import org.apache.ignite.internal.processors.cache.query.continuous.CacheKeepBinaryIterationSwapEnabledTest;
  import org.apache.ignite.internal.processors.cache.query.continuous.ClientReconnectContinuousQueryTest;
+ import org.apache.ignite.internal.processors.cache.query.continuous.ContinuousQueryPeerClassLoadingTest;
  import org.apache.ignite.internal.processors.cache.query.continuous.ContinuousQueryRemoteFilterMissingInClassPathSelfTest;
  import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryAtomicNearEnabledSelfTest;
  import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryAtomicOffheapTieredTest;
@@@ -122,10 -124,10 +123,11 @@@ public class IgniteCacheQuerySelfTestSu
          suite.addTestSuite(CacheKeepBinaryIterationNearEnabledTest.class);
          suite.addTestSuite(IgniteCacheContinuousQueryBackupQueueTest.class);
          suite.addTestSuite(IgniteCacheContinuousQueryNoUnsubscribeTest.class);
+         suite.addTestSuite(ContinuousQueryPeerClassLoadingTest.class);
          suite.addTestSuite(ClientReconnectContinuousQueryTest.class);
  
 +        suite.addTest(IgniteDistributedJoinTestSuite.suite());
 +
          return suite;
      }
  }

http://git-wip-us.apache.org/repos/asf/ignite/blob/03183a9a/modules/platforms/cpp/core-test/config/cache-query-default.xml
----------------------------------------------------------------------
diff --cc modules/platforms/cpp/core-test/config/cache-query-default.xml
index 28c57d6,0000000..366435c
mode 100644,000000..100644
--- a/modules/platforms/cpp/core-test/config/cache-query-default.xml
+++ b/modules/platforms/cpp/core-test/config/cache-query-default.xml
@@@ -1,131 -1,0 +1,153 @@@
 +<?xml version="1.0" encoding="UTF-8"?>
 +
 +<!--
 +    Licensed to the Apache Software Foundation (ASF) under one or more
 +    contributor license agreements.  See the NOTICE file distributed with
 +    this work for additional information regarding copyright ownership.
 +    The ASF licenses this file to You under the Apache License, Version 2.0
 +    (the "License"); you may not use this file except in compliance with
 +    the License.  You may obtain a copy of the License at
 +
 +         http://www.apache.org/licenses/LICENSE-2.0
 +
 +    Unless required by applicable law or agreed to in writing, software
 +    distributed under the License is distributed on an "AS IS" BASIS,
 +    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 +    See the License for the specific language governing permissions and
 +    limitations under the License.
 +-->
 +
 +<!--
 +    Ignite Spring configuration file to startup grid cache.
 +-->
 +<beans xmlns="http://www.springframework.org/schema/beans"
 +       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 +       xmlns:util="http://www.springframework.org/schema/util"
 +       xsi:schemaLocation="
 +        http://www.springframework.org/schema/beans
 +        http://www.springframework.org/schema/beans/spring-beans.xsd
 +        http://www.springframework.org/schema/util
 +        http://www.springframework.org/schema/util/spring-util.xsd">
 +    <bean abstract="true" id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
 +        <property name="localHost" value="127.0.0.1"/>
 +        <property name="connectorConfiguration"><null/></property>
 +
 +        <property name="cacheConfiguration">
 +            <list>
 +                <bean class="org.apache.ignite.configuration.CacheConfiguration">
 +                    <property name="name" value="QueryPerson"/>
 +                    <property name="cacheMode" value="PARTITIONED"/>
 +                    <property name="atomicityMode" value="TRANSACTIONAL"/>
 +                    <property name="writeSynchronizationMode" value="FULL_SYNC"/>
 +
 +                    <property name="affinity">
 +                        <bean class="org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction">
 +                            <property name="partitions" value="256"/>
 +                        </bean>
 +                    </property>
-                     
-                     <property name="typeMetadata">
++
++                    <property name="queryEntities">
 +                        <list>
-                             <bean class="org.apache.ignite.cache.CacheTypeMetadata">
++                            <bean class="org.apache.ignite.cache.QueryEntity">
 +                                <property name="valueType" value="QueryPerson"/>
-                                 <property name="ascendingFields">
-                                     <map>
-                                         <entry key="age" value="java.lang.Integer"/>
-                                     </map>
-                                 </property>
-                                 <property name="queryFields">
++                                <property name="fields">
 +                                    <map>
 +                                        <entry key="name" value="java.lang.String"/>
 +                                        <entry key="age" value="java.lang.Integer"/>
 +                                        <entry key="birthday" value="java.util.Date"/>
 +                                        <entry key="recordCreated" value="java.sql.Timestamp"/>
 +                                    </map>
 +                                </property>
-                                 <property name="textFields">
++                                <property name="indexes">
 +                                    <list>
-                                         <value>name</value>
++                                        <bean class="org.apache.ignite.cache.QueryIndex">
++                                            <property name="fields">
++                                                <map>
++                                                    <entry key="age" value="true"/>
++                                                </map>
++                                            </property>
++                                        </bean>
++                                        <bean class="org.apache.ignite.cache.QueryIndex">
++                                            <property name="indexType" value="FULLTEXT"/>
++                                            <property name="fields">
++                                                <map>
++                                                    <entry key="name" value="false"/>
++                                                </map>
++                                            </property>
++                                        </bean>
 +                                    </list>
 +                                </property>
 +                            </bean>
++                        </list>
++                    </property>
++                </bean>
 +
-                             <bean class="org.apache.ignite.cache.CacheTypeMetadata">
++                <bean class="org.apache.ignite.configuration.CacheConfiguration">
++                    <property name="name" value="QueryRelation"/>
++                    <property name="cacheMode" value="PARTITIONED"/>
++                    <property name="atomicityMode" value="TRANSACTIONAL"/>
++                    <property name="writeSynchronizationMode" value="FULL_SYNC"/>
++
++                    <property name="affinity">
++                        <bean class="org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction">
++                            <property name="partitions" value="256"/>
++                        </bean>
++                    </property>
++
++                    <property name="queryEntities">
++                        <list>
++                            <bean class="org.apache.ignite.cache.QueryEntity">
 +                                <property name="valueType" value="QueryRelation"/>
-                                 <property name="queryFields">
++                                <property name="fields">
 +                                    <map>
 +                                        <entry key="personId" value="java.lang.Integer"/>
 +                                        <entry key="someVal" value="java.lang.Integer"/>
 +                                    </map>
 +                                </property>
 +                            </bean>
 +                        </list>
 +                    </property>
 +                </bean>
 +
 +                <bean class="org.apache.ignite.configuration.CacheConfiguration">
-                     <property name="name" value="QueryRelation"/>
++                    <property name="name" value="TimeCache"/>
 +                    <property name="cacheMode" value="PARTITIONED"/>
 +                    <property name="atomicityMode" value="TRANSACTIONAL"/>
 +                    <property name="writeSynchronizationMode" value="FULL_SYNC"/>
 +
 +                    <property name="affinity">
 +                        <bean class="org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction">
 +                            <property name="partitions" value="256"/>
 +                        </bean>
 +                    </property>
-                     
-                     <property name="typeMetadata">
++
++                    <!-- Configure type metadata to enable queries. -->
++                    <property name="queryEntities">
 +                        <list>
-                             <bean class="org.apache.ignite.cache.CacheTypeMetadata">
-                                 <property name="valueType" value="QueryRelation"/>
-                                 <property name="queryFields">
-                                     <map>
-                                         <entry key="personId" value="java.lang.Integer"/>
-                                         <entry key="someVal" value="java.lang.Integer"/>
-                                     </map>
-                                 </property>
++                            <bean class="org.apache.ignite.cache.QueryEntity">
++                                <property name="keyType" value="java.lang.Integer"/>
++                                <property name="valueType" value="java.sql.Time"/>
 +                            </bean>
 +                        </list>
 +                    </property>
 +                </bean>
 +            </list>
 +        </property>
 +
 +        <property name="discoverySpi">
 +            <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
 +                <property name="ipFinder">
 +                    <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
 +                        <property name="addresses">
 +                            <list>
 +                                <!-- In distributed environment, replace with actual host IP address. -->
 +                                <value>127.0.0.1:47500</value>
 +                            </list>
 +                        </property>
 +                    </bean>
 +                </property>
 +                <property name="socketTimeout" value="300" />
 +            </bean>
 +        </property>
 +    </bean>
 +</beans>

http://git-wip-us.apache.org/repos/asf/ignite/blob/03183a9a/modules/platforms/cpp/core-test/src/cache_query_test.cpp
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/03183a9a/modules/platforms/cpp/core-test/src/cache_test.cpp
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/03183a9a/modules/platforms/cpp/core-test/src/ignition_test.cpp
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/03183a9a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTest.cs
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/03183a9a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Store/CacheStoreTest.cs
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/03183a9a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/MultiTieredCacheExample.cs
----------------------------------------------------------------------
diff --cc modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/MultiTieredCacheExample.cs
index 9336fc7,f905d86..567f1b9
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/MultiTieredCacheExample.cs
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/MultiTieredCacheExample.cs
@@@ -26,7 -26,8 +26,7 @@@ namespace Apache.Ignite.Examples.Datagr
      using Apache.Ignite.Core.Cache.Configuration;
      using Apache.Ignite.Core.Cache.Eviction;
      using Apache.Ignite.Core.Discovery.Tcp;
-     using Apache.Ignite.Core.Discovery.Tcp.Multicast;
+     using Apache.Ignite.Core.Discovery.Tcp.Static;
 -    using Apache.Ignite.Core.SwapSpace.File;
  
      /// <summary>
      /// This example demonstrates on how to configure a multi-tiered Ignite cache that will store data in different