You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ak...@apache.org on 2018/12/10 07:24:31 UTC

[01/37] ignite git commit: IGNITE-10049: MVCC: Create "Cache 4" test suite for MVCC mode. This closes #5499.

Repository: ignite
Updated Branches:
  refs/heads/ignite-10189 5a0c51787 -> 6ae44a775


http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java
index 5f7377f..378c9e9 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java
@@ -6,7 +6,7 @@
  * (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
+ *      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,
@@ -17,6 +17,7 @@
 
 package org.apache.ignite.testsuites;
 
+import java.util.HashSet;
 import junit.framework.TestSuite;
 import org.apache.ignite.cache.store.CacheStoreListenerRWThroughDisabledAtomicCacheTest;
 import org.apache.ignite.cache.store.CacheStoreListenerRWThroughDisabledTransactionalCacheTest;
@@ -26,12 +27,13 @@ import org.apache.ignite.cache.store.jdbc.CacheJdbcStoreSessionListenerSelfTest;
 import org.apache.ignite.internal.processors.GridCacheTxLoadFromStoreOnLockSelfTest;
 import org.apache.ignite.internal.processors.cache.CacheClientStoreSelfTest;
 import org.apache.ignite.internal.processors.cache.CacheConnectionLeakStoreTxTest;
-import org.apache.ignite.internal.processors.cache.CacheGetEntryOptimisticReadCommittedSeltTest;
-import org.apache.ignite.internal.processors.cache.CacheGetEntryOptimisticRepeatableReadSeltTest;
-import org.apache.ignite.internal.processors.cache.CacheGetEntryOptimisticSerializableSeltTest;
-import org.apache.ignite.internal.processors.cache.CacheGetEntryPessimisticReadCommittedSeltTest;
-import org.apache.ignite.internal.processors.cache.CacheGetEntryPessimisticRepeatableReadSeltTest;
-import org.apache.ignite.internal.processors.cache.CacheGetEntryPessimisticSerializableSeltTest;
+import org.apache.ignite.internal.processors.cache.CacheEventWithTxLabelTest;
+import org.apache.ignite.internal.processors.cache.CacheGetEntryOptimisticReadCommittedSelfTest;
+import org.apache.ignite.internal.processors.cache.CacheGetEntryOptimisticRepeatableReadSelfTest;
+import org.apache.ignite.internal.processors.cache.CacheGetEntryOptimisticSerializableSelfTest;
+import org.apache.ignite.internal.processors.cache.CacheGetEntryPessimisticReadCommittedSelfTest;
+import org.apache.ignite.internal.processors.cache.CacheGetEntryPessimisticRepeatableReadSelfTest;
+import org.apache.ignite.internal.processors.cache.CacheGetEntryPessimisticSerializableSelfTest;
 import org.apache.ignite.internal.processors.cache.CacheOffheapMapEntrySelfTest;
 import org.apache.ignite.internal.processors.cache.CacheReadThroughAtomicRestartSelfTest;
 import org.apache.ignite.internal.processors.cache.CacheReadThroughLocalAtomicRestartSelfTest;
@@ -46,7 +48,6 @@ import org.apache.ignite.internal.processors.cache.CacheStoreUsageMultinodeDynam
 import org.apache.ignite.internal.processors.cache.CacheStoreUsageMultinodeStaticStartAtomicTest;
 import org.apache.ignite.internal.processors.cache.CacheStoreUsageMultinodeStaticStartTxTest;
 import org.apache.ignite.internal.processors.cache.CacheTxNotAllowReadFromBackupTest;
-import org.apache.ignite.internal.processors.cache.CashEventWithTxLabelTest;
 import org.apache.ignite.internal.processors.cache.CrossCacheLockTest;
 import org.apache.ignite.internal.processors.cache.GridCacheMarshallingNodeJoinSelfTest;
 import org.apache.ignite.internal.processors.cache.GridCacheMultinodeUpdateAtomicNearEnabledSelfTest;
@@ -155,193 +156,202 @@ import org.apache.ignite.internal.processors.cache.version.CacheVersionedEntryPa
 import org.apache.ignite.internal.processors.cache.version.CacheVersionedEntryReplicatedAtomicSelfTest;
 import org.apache.ignite.internal.processors.cache.version.CacheVersionedEntryReplicatedTransactionalSelfTest;
 
+import static org.apache.ignite.testframework.GridTestUtils.addTestIfNeeded;
+
 /**
  * Test suite.
  */
 public class IgniteCacheTestSuite4 extends TestSuite {
     /**
      * @return IgniteCache test suite.
-     * @throws Exception Thrown in case of the failure.
      */
-    public static TestSuite suite() throws Exception {
+    public static TestSuite suite() {
+        return suite(null);
+    }
+
+    /**
+     * @param ignoredTests Ignored tests.
+     * @return IgniteCache test suite.
+     */
+    public static TestSuite suite(HashSet<Class> ignoredTests) {
         TestSuite suite = new TestSuite("IgniteCache Test Suite part 4");
 
         // Multi node update.
-        suite.addTestSuite(GridCacheMultinodeUpdateSelfTest.class);
-        suite.addTestSuite(GridCacheMultinodeUpdateNearEnabledSelfTest.class);
-        suite.addTestSuite(GridCacheMultinodeUpdateNearEnabledNoBackupsSelfTest.class);
-        suite.addTestSuite(GridCacheMultinodeUpdateAtomicSelfTest.class);
-        suite.addTestSuite(GridCacheMultinodeUpdateAtomicNearEnabledSelfTest.class);
-
-        suite.addTestSuite(IgniteCacheAtomicLoadAllTest.class);
-        suite.addTestSuite(IgniteCacheAtomicLocalLoadAllTest.class);
-        suite.addTestSuite(IgniteCacheTxLoadAllTest.class);
-        suite.addTestSuite(IgniteCacheTxLocalLoadAllTest.class);
-
-        suite.addTestSuite(IgniteCacheAtomicLoaderWriterTest.class);
-        suite.addTestSuite(IgniteCacheTxLoaderWriterTest.class);
-
-        suite.addTestSuite(IgniteCacheAtomicStoreSessionTest.class);
-        suite.addTestSuite(IgniteCacheTxStoreSessionTest.class);
-        suite.addTestSuite(IgniteCacheAtomicStoreSessionWriteBehindTest.class);
-        suite.addTestSuite(IgniteCacheTxStoreSessionWriteBehindTest.class);
-        suite.addTestSuite(IgniteCacheTxStoreSessionWriteBehindCoalescingTest.class);
-
-        suite.addTestSuite(IgniteCacheAtomicNoReadThroughTest.class);
-        suite.addTestSuite(IgniteCacheAtomicNearEnabledNoReadThroughTest.class);
-        suite.addTestSuite(IgniteCacheAtomicLocalNoReadThroughTest.class);
-        suite.addTestSuite(IgniteCacheTxNoReadThroughTest.class);
-        suite.addTestSuite(IgniteCacheTxNearEnabledNoReadThroughTest.class);
-        suite.addTestSuite(IgniteCacheTxLocalNoReadThroughTest.class);
-
-        suite.addTestSuite(IgniteCacheAtomicNoLoadPreviousValueTest.class);
-        suite.addTestSuite(IgniteCacheAtomicNearEnabledNoLoadPreviousValueTest.class);
-        suite.addTestSuite(IgniteCacheAtomicLocalNoLoadPreviousValueTest.class);
-        suite.addTestSuite(IgniteCacheTxNoLoadPreviousValueTest.class);
-        suite.addTestSuite(IgniteCacheTxNearEnabledNoLoadPreviousValueTest.class);
-        suite.addTestSuite(IgniteCacheTxLocalNoLoadPreviousValueTest.class);
-
-        suite.addTestSuite(IgniteCacheAtomicNoWriteThroughTest.class);
-        suite.addTestSuite(IgniteCacheAtomicNearEnabledNoWriteThroughTest.class);
-        suite.addTestSuite(IgniteCacheAtomicLocalNoWriteThroughTest.class);
-        suite.addTestSuite(IgniteCacheTxNoWriteThroughTest.class);
-        suite.addTestSuite(IgniteCacheTxNearEnabledNoWriteThroughTest.class);
-        suite.addTestSuite(IgniteCacheTxLocalNoWriteThroughTest.class);
-
-        suite.addTestSuite(IgniteCacheAtomicPeekModesTest.class);
-        suite.addTestSuite(IgniteCacheAtomicNearPeekModesTest.class);
-        suite.addTestSuite(IgniteCacheAtomicReplicatedPeekModesTest.class);
-        suite.addTestSuite(IgniteCacheAtomicLocalPeekModesTest.class);
-        suite.addTestSuite(IgniteCacheTxPeekModesTest.class);
-        suite.addTestSuite(IgniteCacheTxNearPeekModesTest.class);
-        suite.addTestSuite(IgniteCacheTxLocalPeekModesTest.class);
-        suite.addTestSuite(IgniteCacheTxReplicatedPeekModesTest.class);
-
-        suite.addTestSuite(IgniteCacheInvokeReadThroughSingleNodeTest.class);
-        suite.addTestSuite(IgniteCacheInvokeReadThroughTest.class);
-        suite.addTestSuite(IgniteCacheReadThroughStoreCallTest.class);
-        suite.addTestSuite(GridCacheVersionMultinodeTest.class);
-
-        suite.addTestSuite(IgniteCacheNearReadCommittedTest.class);
-        suite.addTestSuite(IgniteCacheAtomicCopyOnReadDisabledTest.class);
-        suite.addTestSuite(IgniteCacheTxCopyOnReadDisabledTest.class);
-
-        suite.addTestSuite(IgniteCacheTxPreloadNoWriteTest.class);
-
-        suite.addTestSuite(IgniteDynamicCacheStartSelfTest.class);
-        suite.addTestSuite(IgniteDynamicCacheMultinodeTest.class);
-        suite.addTestSuite(IgniteDynamicCacheStartFailTest.class);
-        suite.addTestSuite(IgniteDynamicCacheStartCoordinatorFailoverTest.class);
-        suite.addTestSuite(IgniteDynamicCacheWithConfigStartSelfTest.class);
-        suite.addTestSuite(IgniteCacheDynamicStopSelfTest.class);
-        suite.addTestSuite(IgniteDynamicCacheStartStopConcurrentTest.class);
-        suite.addTestSuite(IgniteCacheConfigurationTemplateTest.class);
-        suite.addTestSuite(IgniteCacheConfigurationDefaultTemplateTest.class);
-        suite.addTestSuite(IgniteDynamicClientCacheStartSelfTest.class);
-        suite.addTestSuite(IgniteDynamicCacheStartNoExchangeTimeoutTest.class);
-        suite.addTestSuite(CacheAffinityEarlyTest.class);
-        suite.addTestSuite(IgniteCacheCreatePutMultiNodeSelfTest.class);
-        suite.addTestSuite(IgniteCacheCreatePutTest.class);
-        suite.addTestSuite(CacheStartOnJoinTest.class);
-        suite.addTestSuite(IgniteCacheStartTest.class);
-        suite.addTestSuite(CacheDiscoveryDataConcurrentJoinTest.class);
-        suite.addTestSuite(IgniteClientCacheInitializationFailTest.class);
-        suite.addTestSuite(IgniteCacheFailedUpdateResponseTest.class);
-
-        suite.addTestSuite(GridCacheTxLoadFromStoreOnLockSelfTest.class);
-
-        suite.addTestSuite(GridCacheMarshallingNodeJoinSelfTest.class);
-
-        suite.addTestSuite(IgniteCacheJdbcBlobStoreNodeRestartTest.class);
-
-        suite.addTestSuite(IgniteCacheAtomicLocalStoreValueTest.class);
-        suite.addTestSuite(IgniteCacheAtomicStoreValueTest.class);
-        suite.addTestSuite(IgniteCacheAtomicNearEnabledStoreValueTest.class);
-        suite.addTestSuite(IgniteCacheTxLocalStoreValueTest.class);
-        suite.addTestSuite(IgniteCacheTxStoreValueTest.class);
-        suite.addTestSuite(IgniteCacheTxNearEnabledStoreValueTest.class);
-
-        suite.addTestSuite(IgniteCacheLockFailoverSelfTest.class);
-        suite.addTestSuite(IgniteCacheMultiTxLockSelfTest.class);
-
-        suite.addTestSuite(IgniteInternalCacheTypesTest.class);
-
-        suite.addTestSuite(IgniteExchangeFutureHistoryTest.class);
-
-        suite.addTestSuite(CacheNoValueClassOnServerNodeTest.class);
-        suite.addTestSuite(IgniteSystemCacheOnClientTest.class);
-
-        suite.addTestSuite(CacheRemoveAllSelfTest.class);
-        suite.addTestSuite(CacheGetEntryOptimisticReadCommittedSeltTest.class);
-        suite.addTestSuite(CacheGetEntryOptimisticRepeatableReadSeltTest.class);
-        suite.addTestSuite(CacheGetEntryOptimisticSerializableSeltTest.class);
-        suite.addTestSuite(CacheGetEntryPessimisticReadCommittedSeltTest.class);
-        suite.addTestSuite(CacheGetEntryPessimisticRepeatableReadSeltTest.class);
-        suite.addTestSuite(CacheGetEntryPessimisticSerializableSeltTest.class);
-        suite.addTestSuite(CacheTxNotAllowReadFromBackupTest.class);
-
-        suite.addTestSuite(CacheStopAndDestroySelfTest.class);
-
-        suite.addTestSuite(CacheOffheapMapEntrySelfTest.class);
-
-        suite.addTestSuite(CacheJdbcStoreSessionListenerSelfTest.class);
-        suite.addTestSuite(CacheStoreSessionListenerLifecycleSelfTest.class);
-        suite.addTestSuite(CacheStoreListenerRWThroughDisabledAtomicCacheTest.class);
-        suite.addTestSuite(CacheStoreListenerRWThroughDisabledTransactionalCacheTest.class);
-        suite.addTestSuite(CacheStoreSessionListenerWriteBehindEnabledTest.class);
-
-        suite.addTestSuite(CacheClientStoreSelfTest.class);
-        suite.addTestSuite(CacheStoreUsageMultinodeStaticStartAtomicTest.class);
-        suite.addTestSuite(CacheStoreUsageMultinodeStaticStartTxTest.class);
-        suite.addTestSuite(CacheStoreUsageMultinodeDynamicStartAtomicTest.class);
-        suite.addTestSuite(CacheStoreUsageMultinodeDynamicStartTxTest.class);
-        suite.addTestSuite(CacheConnectionLeakStoreTxTest.class);
-
-        suite.addTestSuite(GridCacheStoreManagerDeserializationTest.class);
-        suite.addTestSuite(GridLocalCacheStoreManagerDeserializationTest.class);
-
-        suite.addTestSuite(IgniteStartCacheInTransactionSelfTest.class);
-        suite.addTestSuite(IgniteStartCacheInTransactionAtomicSelfTest.class);
-
-        suite.addTestSuite(CacheReadThroughRestartSelfTest.class);
-        suite.addTestSuite(CacheReadThroughReplicatedRestartSelfTest.class);
-        suite.addTestSuite(CacheReadThroughReplicatedAtomicRestartSelfTest.class);
-        suite.addTestSuite(CacheReadThroughLocalRestartSelfTest.class);
-        suite.addTestSuite(CacheReadThroughLocalAtomicRestartSelfTest.class);
-        suite.addTestSuite(CacheReadThroughAtomicRestartSelfTest.class);
+        addTestIfNeeded(suite, GridCacheMultinodeUpdateSelfTest.class, ignoredTests);
+        addTestIfNeeded(suite, GridCacheMultinodeUpdateNearEnabledSelfTest.class, ignoredTests);
+        addTestIfNeeded(suite, GridCacheMultinodeUpdateNearEnabledNoBackupsSelfTest.class, ignoredTests);
+        addTestIfNeeded(suite, GridCacheMultinodeUpdateAtomicSelfTest.class, ignoredTests);
+        addTestIfNeeded(suite, GridCacheMultinodeUpdateAtomicNearEnabledSelfTest.class, ignoredTests);
+
+        addTestIfNeeded(suite, IgniteCacheAtomicLoadAllTest.class, ignoredTests);
+        addTestIfNeeded(suite, IgniteCacheAtomicLocalLoadAllTest.class, ignoredTests);
+        addTestIfNeeded(suite, IgniteCacheTxLoadAllTest.class, ignoredTests);
+        addTestIfNeeded(suite, IgniteCacheTxLocalLoadAllTest.class, ignoredTests);
+
+        addTestIfNeeded(suite, IgniteCacheAtomicLoaderWriterTest.class, ignoredTests);
+        addTestIfNeeded(suite, IgniteCacheTxLoaderWriterTest.class, ignoredTests);
+
+        addTestIfNeeded(suite, IgniteCacheAtomicStoreSessionTest.class, ignoredTests);
+        addTestIfNeeded(suite, IgniteCacheTxStoreSessionTest.class, ignoredTests);
+        addTestIfNeeded(suite, IgniteCacheAtomicStoreSessionWriteBehindTest.class, ignoredTests);
+        addTestIfNeeded(suite, IgniteCacheTxStoreSessionWriteBehindTest.class, ignoredTests);
+        addTestIfNeeded(suite, IgniteCacheTxStoreSessionWriteBehindCoalescingTest.class, ignoredTests);
+
+        addTestIfNeeded(suite, IgniteCacheAtomicNoReadThroughTest.class, ignoredTests);
+        addTestIfNeeded(suite, IgniteCacheAtomicNearEnabledNoReadThroughTest.class, ignoredTests);
+        addTestIfNeeded(suite, IgniteCacheAtomicLocalNoReadThroughTest.class, ignoredTests);
+        addTestIfNeeded(suite, IgniteCacheTxNoReadThroughTest.class, ignoredTests);
+        addTestIfNeeded(suite, IgniteCacheTxNearEnabledNoReadThroughTest.class, ignoredTests);
+        addTestIfNeeded(suite, IgniteCacheTxLocalNoReadThroughTest.class, ignoredTests);
+
+        addTestIfNeeded(suite, IgniteCacheAtomicNoLoadPreviousValueTest.class, ignoredTests);
+        addTestIfNeeded(suite, IgniteCacheAtomicNearEnabledNoLoadPreviousValueTest.class, ignoredTests);
+        addTestIfNeeded(suite, IgniteCacheAtomicLocalNoLoadPreviousValueTest.class, ignoredTests);
+        addTestIfNeeded(suite, IgniteCacheTxNoLoadPreviousValueTest.class, ignoredTests);
+        addTestIfNeeded(suite, IgniteCacheTxNearEnabledNoLoadPreviousValueTest.class, ignoredTests);
+        addTestIfNeeded(suite, IgniteCacheTxLocalNoLoadPreviousValueTest.class, ignoredTests);
+
+        addTestIfNeeded(suite, IgniteCacheAtomicNoWriteThroughTest.class, ignoredTests);
+        addTestIfNeeded(suite, IgniteCacheAtomicNearEnabledNoWriteThroughTest.class, ignoredTests);
+        addTestIfNeeded(suite, IgniteCacheAtomicLocalNoWriteThroughTest.class, ignoredTests);
+        addTestIfNeeded(suite, IgniteCacheTxNoWriteThroughTest.class, ignoredTests);
+        addTestIfNeeded(suite, IgniteCacheTxNearEnabledNoWriteThroughTest.class, ignoredTests);
+        addTestIfNeeded(suite, IgniteCacheTxLocalNoWriteThroughTest.class, ignoredTests);
+
+        addTestIfNeeded(suite, IgniteCacheAtomicPeekModesTest.class, ignoredTests);
+        addTestIfNeeded(suite, IgniteCacheAtomicNearPeekModesTest.class, ignoredTests);
+        addTestIfNeeded(suite, IgniteCacheAtomicReplicatedPeekModesTest.class, ignoredTests);
+        addTestIfNeeded(suite, IgniteCacheAtomicLocalPeekModesTest.class, ignoredTests);
+        addTestIfNeeded(suite, IgniteCacheTxPeekModesTest.class, ignoredTests);
+        addTestIfNeeded(suite, IgniteCacheTxNearPeekModesTest.class, ignoredTests);
+        addTestIfNeeded(suite, IgniteCacheTxLocalPeekModesTest.class, ignoredTests);
+        addTestIfNeeded(suite, IgniteCacheTxReplicatedPeekModesTest.class, ignoredTests);
+
+        addTestIfNeeded(suite, IgniteCacheInvokeReadThroughSingleNodeTest.class, ignoredTests);
+        addTestIfNeeded(suite, IgniteCacheInvokeReadThroughTest.class, ignoredTests);
+        addTestIfNeeded(suite, IgniteCacheReadThroughStoreCallTest.class, ignoredTests);
+        addTestIfNeeded(suite, GridCacheVersionMultinodeTest.class, ignoredTests);
+
+        addTestIfNeeded(suite, IgniteCacheNearReadCommittedTest.class, ignoredTests);
+        addTestIfNeeded(suite, IgniteCacheAtomicCopyOnReadDisabledTest.class, ignoredTests);
+        addTestIfNeeded(suite, IgniteCacheTxCopyOnReadDisabledTest.class, ignoredTests);
+
+        addTestIfNeeded(suite, IgniteCacheTxPreloadNoWriteTest.class, ignoredTests);
+
+        addTestIfNeeded(suite, IgniteDynamicCacheStartSelfTest.class, ignoredTests);
+        addTestIfNeeded(suite, IgniteDynamicCacheMultinodeTest.class, ignoredTests);
+        addTestIfNeeded(suite, IgniteDynamicCacheStartFailTest.class, ignoredTests);
+        addTestIfNeeded(suite, IgniteDynamicCacheStartCoordinatorFailoverTest.class, ignoredTests);
+        addTestIfNeeded(suite, IgniteDynamicCacheWithConfigStartSelfTest.class, ignoredTests);
+        addTestIfNeeded(suite, IgniteCacheDynamicStopSelfTest.class, ignoredTests);
+        addTestIfNeeded(suite, IgniteDynamicCacheStartStopConcurrentTest.class, ignoredTests);
+        addTestIfNeeded(suite, IgniteCacheConfigurationTemplateTest.class, ignoredTests);
+        addTestIfNeeded(suite, IgniteCacheConfigurationDefaultTemplateTest.class, ignoredTests);
+        addTestIfNeeded(suite, IgniteDynamicClientCacheStartSelfTest.class, ignoredTests);
+        addTestIfNeeded(suite, IgniteDynamicCacheStartNoExchangeTimeoutTest.class, ignoredTests);
+        addTestIfNeeded(suite, CacheAffinityEarlyTest.class, ignoredTests);
+        addTestIfNeeded(suite, IgniteCacheCreatePutMultiNodeSelfTest.class, ignoredTests);
+        addTestIfNeeded(suite, IgniteCacheCreatePutTest.class, ignoredTests);
+        addTestIfNeeded(suite, CacheStartOnJoinTest.class, ignoredTests);
+        addTestIfNeeded(suite, IgniteCacheStartTest.class, ignoredTests);
+        addTestIfNeeded(suite, CacheDiscoveryDataConcurrentJoinTest.class, ignoredTests);
+        addTestIfNeeded(suite, IgniteClientCacheInitializationFailTest.class, ignoredTests);
+        addTestIfNeeded(suite, IgniteCacheFailedUpdateResponseTest.class, ignoredTests);
+
+        addTestIfNeeded(suite, GridCacheTxLoadFromStoreOnLockSelfTest.class, ignoredTests);
+
+        addTestIfNeeded(suite, GridCacheMarshallingNodeJoinSelfTest.class, ignoredTests);
+
+        addTestIfNeeded(suite, IgniteCacheJdbcBlobStoreNodeRestartTest.class, ignoredTests);
+
+        addTestIfNeeded(suite, IgniteCacheAtomicLocalStoreValueTest.class, ignoredTests);
+        addTestIfNeeded(suite, IgniteCacheAtomicStoreValueTest.class, ignoredTests);
+        addTestIfNeeded(suite, IgniteCacheAtomicNearEnabledStoreValueTest.class, ignoredTests);
+        addTestIfNeeded(suite, IgniteCacheTxLocalStoreValueTest.class, ignoredTests);
+        addTestIfNeeded(suite, IgniteCacheTxStoreValueTest.class, ignoredTests);
+        addTestIfNeeded(suite, IgniteCacheTxNearEnabledStoreValueTest.class, ignoredTests);
+
+        addTestIfNeeded(suite, IgniteCacheLockFailoverSelfTest.class, ignoredTests);
+        addTestIfNeeded(suite, IgniteCacheMultiTxLockSelfTest.class, ignoredTests);
+
+        addTestIfNeeded(suite, IgniteInternalCacheTypesTest.class, ignoredTests);
+
+        addTestIfNeeded(suite, IgniteExchangeFutureHistoryTest.class, ignoredTests);
+
+        addTestIfNeeded(suite, CacheNoValueClassOnServerNodeTest.class, ignoredTests);
+        addTestIfNeeded(suite, IgniteSystemCacheOnClientTest.class, ignoredTests);
+
+        addTestIfNeeded(suite, CacheRemoveAllSelfTest.class, ignoredTests);
+        addTestIfNeeded(suite, CacheGetEntryOptimisticReadCommittedSelfTest.class, ignoredTests);
+        addTestIfNeeded(suite, CacheGetEntryOptimisticRepeatableReadSelfTest.class, ignoredTests);
+        addTestIfNeeded(suite, CacheGetEntryOptimisticSerializableSelfTest.class, ignoredTests);
+        addTestIfNeeded(suite, CacheGetEntryPessimisticReadCommittedSelfTest.class, ignoredTests);
+        addTestIfNeeded(suite, CacheGetEntryPessimisticRepeatableReadSelfTest.class, ignoredTests);
+        addTestIfNeeded(suite, CacheGetEntryPessimisticSerializableSelfTest.class, ignoredTests);
+        addTestIfNeeded(suite, CacheTxNotAllowReadFromBackupTest.class, ignoredTests);
+
+        addTestIfNeeded(suite, CacheStopAndDestroySelfTest.class, ignoredTests);
+
+        addTestIfNeeded(suite, CacheOffheapMapEntrySelfTest.class, ignoredTests);
+
+        addTestIfNeeded(suite, CacheJdbcStoreSessionListenerSelfTest.class, ignoredTests);
+        addTestIfNeeded(suite, CacheStoreSessionListenerLifecycleSelfTest.class, ignoredTests);
+        addTestIfNeeded(suite, CacheStoreListenerRWThroughDisabledAtomicCacheTest.class, ignoredTests);
+        addTestIfNeeded(suite, CacheStoreListenerRWThroughDisabledTransactionalCacheTest.class, ignoredTests);
+        addTestIfNeeded(suite, CacheStoreSessionListenerWriteBehindEnabledTest.class, ignoredTests);
+
+        addTestIfNeeded(suite, CacheClientStoreSelfTest.class, ignoredTests);
+        addTestIfNeeded(suite, CacheStoreUsageMultinodeStaticStartAtomicTest.class, ignoredTests);
+        addTestIfNeeded(suite, CacheStoreUsageMultinodeStaticStartTxTest.class, ignoredTests);
+        addTestIfNeeded(suite, CacheStoreUsageMultinodeDynamicStartAtomicTest.class, ignoredTests);
+        addTestIfNeeded(suite, CacheStoreUsageMultinodeDynamicStartTxTest.class, ignoredTests);
+        addTestIfNeeded(suite, CacheConnectionLeakStoreTxTest.class, ignoredTests);
+
+        addTestIfNeeded(suite, GridCacheStoreManagerDeserializationTest.class, ignoredTests);
+        addTestIfNeeded(suite, GridLocalCacheStoreManagerDeserializationTest.class, ignoredTests);
+
+        addTestIfNeeded(suite, IgniteStartCacheInTransactionSelfTest.class, ignoredTests);
+        addTestIfNeeded(suite, IgniteStartCacheInTransactionAtomicSelfTest.class, ignoredTests);
+
+        addTestIfNeeded(suite, CacheReadThroughRestartSelfTest.class, ignoredTests);
+        addTestIfNeeded(suite, CacheReadThroughReplicatedRestartSelfTest.class, ignoredTests);
+        addTestIfNeeded(suite, CacheReadThroughReplicatedAtomicRestartSelfTest.class, ignoredTests);
+        addTestIfNeeded(suite, CacheReadThroughLocalRestartSelfTest.class, ignoredTests);
+        addTestIfNeeded(suite, CacheReadThroughLocalAtomicRestartSelfTest.class, ignoredTests);
+        addTestIfNeeded(suite, CacheReadThroughAtomicRestartSelfTest.class, ignoredTests);
 
         // Versioned entry tests
-        suite.addTestSuite(CacheVersionedEntryLocalAtomicSwapDisabledSelfTest.class);
-        suite.addTestSuite(CacheVersionedEntryLocalTransactionalSelfTest.class);
-        suite.addTestSuite(CacheVersionedEntryPartitionedAtomicSelfTest.class);
-        suite.addTestSuite(CacheVersionedEntryPartitionedTransactionalSelfTest.class);
-        suite.addTestSuite(CacheVersionedEntryReplicatedAtomicSelfTest.class);
-        suite.addTestSuite(CacheVersionedEntryReplicatedTransactionalSelfTest.class);
+        addTestIfNeeded(suite, CacheVersionedEntryLocalAtomicSwapDisabledSelfTest.class, ignoredTests);
+        addTestIfNeeded(suite, CacheVersionedEntryLocalTransactionalSelfTest.class, ignoredTests);
+        addTestIfNeeded(suite, CacheVersionedEntryPartitionedAtomicSelfTest.class, ignoredTests);
+        addTestIfNeeded(suite, CacheVersionedEntryPartitionedTransactionalSelfTest.class, ignoredTests);
+        addTestIfNeeded(suite, CacheVersionedEntryReplicatedAtomicSelfTest.class, ignoredTests);
+        addTestIfNeeded(suite, CacheVersionedEntryReplicatedTransactionalSelfTest.class, ignoredTests);
 
-        suite.addTestSuite(GridCacheDhtTxPreloadSelfTest.class);
-        suite.addTestSuite(GridCacheNearTxPreloadSelfTest.class);
-        suite.addTestSuite(GridReplicatedTxPreloadTest.class);
-        suite.addTestSuite(CacheGroupsPreloadTest.class);
+        addTestIfNeeded(suite, GridCacheDhtTxPreloadSelfTest.class, ignoredTests);
+        addTestIfNeeded(suite, GridCacheNearTxPreloadSelfTest.class, ignoredTests);
+        addTestIfNeeded(suite, GridReplicatedTxPreloadTest.class, ignoredTests);
+        addTestIfNeeded(suite, CacheGroupsPreloadTest.class, ignoredTests);
 
-        suite.addTestSuite(IgniteDynamicCacheFilterTest.class);
+        addTestIfNeeded(suite, IgniteDynamicCacheFilterTest.class, ignoredTests);
 
-        suite.addTestSuite(CrossCacheLockTest.class);
-        suite.addTestSuite(IgniteCrossCacheTxSelfTest.class);
+        addTestIfNeeded(suite, CrossCacheLockTest.class, ignoredTests);
+        addTestIfNeeded(suite, IgniteCrossCacheTxSelfTest.class, ignoredTests);
 
-        suite.addTestSuite(CacheGetFutureHangsSelfTest.class);
+        addTestIfNeeded(suite, CacheGetFutureHangsSelfTest.class, ignoredTests);
 
-        suite.addTestSuite(IgniteCacheSingleGetMessageTest.class);
-        suite.addTestSuite(IgniteCacheReadFromBackupTest.class);
+        addTestIfNeeded(suite, IgniteCacheSingleGetMessageTest.class, ignoredTests);
+        addTestIfNeeded(suite, IgniteCacheReadFromBackupTest.class, ignoredTests);
 
-        suite.addTestSuite(MarshallerCacheJobRunNodeRestartTest.class);
+        addTestIfNeeded(suite, MarshallerCacheJobRunNodeRestartTest.class, ignoredTests);
 
-        suite.addTestSuite(IgniteCacheNearOnlyTxTest.class);
+        addTestIfNeeded(suite, IgniteCacheNearOnlyTxTest.class, ignoredTests);
 
-        suite.addTestSuite(IgniteCacheContainsKeyAtomicTest.class);
+        addTestIfNeeded(suite, IgniteCacheContainsKeyAtomicTest.class, ignoredTests);
 
-        suite.addTestSuite(CacheResultIsNotNullOnPartitionLossTest.class);
+        addTestIfNeeded(suite, CacheResultIsNotNullOnPartitionLossTest.class, ignoredTests);
 
-        suite.addTestSuite(CashEventWithTxLabelTest.class);
+        addTestIfNeeded(suite, CacheEventWithTxLabelTest.class, ignoredTests);
 
         return suite;
     }


[28/37] ignite git commit: IGNITE-10348 Safely recreate metastore to mitigate IGNITE-8735

Posted by ak...@apache.org.
IGNITE-10348 Safely recreate metastore to mitigate IGNITE-8735

Signed-off-by: Ivan Rakov <ir...@apache.org>


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

Branch: refs/heads/ignite-10189
Commit: 86f92d9697e6bb1f138b5d2e477d7eb5cf8c8814
Parents: 137a0e7
Author: Alexey Stelmak <sp...@gmail.com>
Authored: Fri Dec 7 18:56:48 2018 +0300
Committer: Ivan Rakov <ir...@apache.org>
Committed: Fri Dec 7 18:56:48 2018 +0300

----------------------------------------------------------------------
 .../internal/pagemem/PageIdAllocator.java       |   5 +-
 .../processors/cache/GridCacheProcessor.java    |  18 +
 .../persistence/file/FilePageStoreManager.java  |   8 +-
 .../persistence/metastorage/MetaStorage.java    | 406 ++++++++++++++++++-
 .../metastorage/MetastorageDataRow.java         |   3 +-
 .../metastorage/MetastorageTree.java            |  11 +-
 .../IgnitePdsCorruptedStoreTest.java            |   3 +-
 .../metastorage/IgniteMetaStorageBasicTest.java | 273 ++++++++++++-
 8 files changed, 702 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/86f92d96/modules/core/src/main/java/org/apache/ignite/internal/pagemem/PageIdAllocator.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/PageIdAllocator.java b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/PageIdAllocator.java
index b3e4b07..d91d31d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/PageIdAllocator.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/PageIdAllocator.java
@@ -35,8 +35,11 @@ public interface PageIdAllocator {
     /** Special partition reserved for index space. */
     public static final int INDEX_PARTITION = 0xFFFF;
 
+    /** Old special partition reserved for metastore space. */
+    public static final int OLD_METASTORE_PARTITION = 0x0;
+
     /** Special partition reserved for metastore space. */
-    public static final int METASTORE_PARTITION = 0x0;
+    public static final int METASTORE_PARTITION = 0x1;
 
     /**
      * Allocates a page from the space for the given partition ID and the given flags.

http://git-wip-us.apache.org/repos/asf/ignite/blob/86f92d96/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 375dd12..3e32ead 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
@@ -105,6 +105,7 @@ import org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabase
 import org.apache.ignite.internal.processors.cache.persistence.IgniteCacheDatabaseSharedManager;
 import org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager;
 import org.apache.ignite.internal.processors.cache.persistence.freelist.FreeList;
+import org.apache.ignite.internal.processors.cache.persistence.metastorage.MetaStorage;
 import org.apache.ignite.internal.processors.cache.persistence.metastorage.MetastorageLifecycleListener;
 import org.apache.ignite.internal.processors.cache.persistence.metastorage.ReadOnlyMetastorage;
 import org.apache.ignite.internal.processors.cache.persistence.partstate.GroupPartitionId;
@@ -277,6 +278,9 @@ public class GridCacheProcessor extends GridProcessorAdapter {
     /** Cache recovery lifecycle state and actions. */
     private final CacheRecoveryLifecycle recovery = new CacheRecoveryLifecycle();
 
+    /** Tmp storage for meta migration. */
+    private MetaStorage.TmpStorage tmpStorage;
+
     /**
      * @param ctx Kernal context.
      */
@@ -5471,6 +5475,20 @@ public class GridCacheProcessor extends GridProcessorAdapter {
     }
 
     /**
+     * Get Temporary storage
+     */
+    public MetaStorage.TmpStorage getTmpStorage() {
+        return tmpStorage;
+    }
+
+    /**
+     * Set Temporary storage
+     */
+    public void setTmpStorage(MetaStorage.TmpStorage tmpStorage) {
+        this.tmpStorage = tmpStorage;
+    }
+
+    /**
      * Recovery lifecycle for caches.
      */
     private class CacheRecoveryLifecycle implements MetastorageLifecycleListener, DatabaseLifecycleListener {

http://git-wip-us.apache.org/repos/asf/ignite/blob/86f92d96/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/FilePageStoreManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/FilePageStoreManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/FilePageStoreManager.java
index e80107f..5a4eb8b 100755
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/FilePageStoreManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/FilePageStoreManager.java
@@ -374,10 +374,10 @@ public class FilePageStoreManager extends GridCacheSharedManagerAdapter implemen
 
             CacheStoreHolder holder = initDir(
                 new File(storeWorkDir, META_STORAGE_NAME),
-                    grpId,
-                    1,
-                    dataRegion.memoryMetrics(),
-                    false);
+                grpId,
+                PageIdAllocator.METASTORE_PARTITION + 1,
+                dataRegion.memoryMetrics(),
+                false);
 
             CacheStoreHolder old = idxCacheStores.put(grpId, holder);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/86f92d96/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/metastorage/MetaStorage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/metastorage/MetaStorage.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/metastorage/MetaStorage.java
index a61bf64..7ff8257 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/metastorage/MetaStorage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/metastorage/MetaStorage.java
@@ -17,13 +17,24 @@
 
 package org.apache.ignite.internal.processors.cache.persistence.metastorage;
 
+import java.io.Closeable;
+import java.io.File;
+import java.io.IOException;
+import java.io.RandomAccessFile;
 import java.io.Serializable;
 import java.nio.ByteBuffer;
+import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
 import java.util.Map;
 import java.util.concurrent.Executor;
 import java.util.concurrent.atomic.AtomicLong;
+import java.util.stream.Stream;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteException;
 import org.apache.ignite.IgniteLogger;
@@ -32,10 +43,11 @@ import org.apache.ignite.internal.pagemem.PageIdAllocator;
 import org.apache.ignite.internal.pagemem.PageIdUtils;
 import org.apache.ignite.internal.pagemem.PageMemory;
 import org.apache.ignite.internal.pagemem.wal.IgniteWriteAheadLogManager;
-import org.apache.ignite.internal.processors.cache.persistence.StorageException;
 import org.apache.ignite.internal.pagemem.wal.WALPointer;
 import org.apache.ignite.internal.pagemem.wal.record.MetastoreDataRecord;
 import org.apache.ignite.internal.pagemem.wal.record.delta.MetaPageInitRecord;
+import org.apache.ignite.internal.processors.cache.CacheGroupContext;
+import org.apache.ignite.internal.processors.cache.GridCacheProcessor;
 import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
 import org.apache.ignite.internal.processors.cache.IncompleteObject;
 import org.apache.ignite.internal.processors.cache.persistence.DataRegion;
@@ -44,6 +56,7 @@ import org.apache.ignite.internal.processors.cache.persistence.DbCheckpointListe
 import org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager;
 import org.apache.ignite.internal.processors.cache.persistence.IgniteCacheDatabaseSharedManager;
 import org.apache.ignite.internal.processors.cache.persistence.RootPage;
+import org.apache.ignite.internal.processors.cache.persistence.StorageException;
 import org.apache.ignite.internal.processors.cache.persistence.freelist.AbstractFreeList;
 import org.apache.ignite.internal.processors.cache.persistence.pagemem.PageMemoryEx;
 import org.apache.ignite.internal.processors.cache.persistence.tree.io.AbstractDataPageIO;
@@ -58,12 +71,14 @@ import org.apache.ignite.internal.processors.failure.FailureProcessor;
 import org.apache.ignite.internal.util.lang.GridCursor;
 import org.apache.ignite.internal.util.typedef.internal.CU;
 import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.lang.IgniteBiTuple;
 import org.apache.ignite.lang.IgnitePredicate;
 import org.apache.ignite.marshaller.Marshaller;
 import org.apache.ignite.marshaller.jdk.JdkMarshaller;
 import org.jetbrains.annotations.NotNull;
 
 import static org.apache.ignite.internal.pagemem.PageIdAllocator.FLAG_DATA;
+import static org.apache.ignite.internal.pagemem.PageIdAllocator.OLD_METASTORE_PARTITION;
 import static org.apache.ignite.internal.pagemem.PageIdUtils.itemId;
 import static org.apache.ignite.internal.pagemem.PageIdUtils.pageId;
 
@@ -77,9 +92,19 @@ public class MetaStorage implements DbCheckpointListener, ReadOnlyMetastorage, R
     /** */
     public static final int METASTORAGE_CACHE_ID = CU.cacheId(METASTORAGE_CACHE_NAME);
 
+    /** This flag is used ONLY FOR TESTING the migration of a metastorage from Part 0 to Part 1. */
+    public static boolean PRESERVE_LEGACY_METASTORAGE_PARTITION_ID = false;
+
     /** Marker for removed entry. */
     private static final byte[] TOMBSTONE = new byte[0];
 
+    /** Temporary metastorage memory size. */
+    private static final int TEMPORARY_METASTORAGE_IN_MEMORY_SIZE = 128 * 1024 * 1024;
+
+    /** Temporary metastorage buffer size (file). */
+    private static final int TEMPORARY_METASTORAGE_BUFFER_SIZE = 1024 * 1024;
+
+
     /** */
     private final IgniteWriteAheadLogManager wal;
 
@@ -99,7 +124,7 @@ public class MetaStorage implements DbCheckpointListener, ReadOnlyMetastorage, R
     private DataRegionMetricsImpl regionMetrics;
 
     /** */
-    private boolean readOnly;
+    private final boolean readOnly;
 
     /** */
     private boolean empty;
@@ -122,6 +147,12 @@ public class MetaStorage implements DbCheckpointListener, ReadOnlyMetastorage, R
     /** */
     private final FailureProcessor failureProcessor;
 
+    /** Partition id. */
+    private int partId;
+
+    /** Cctx. */
+    private final GridCacheSharedContext cctx;
+
     /** */
     public MetaStorage(
         GridCacheSharedContext cctx,
@@ -129,6 +160,7 @@ public class MetaStorage implements DbCheckpointListener, ReadOnlyMetastorage, R
         DataRegionMetricsImpl regionMetrics,
         boolean readOnly
     ) {
+        this.cctx = cctx;
         wal = cctx.wal();
         this.dataRegion = dataRegion;
         this.regionMetrics = regionMetrics;
@@ -138,10 +170,79 @@ public class MetaStorage implements DbCheckpointListener, ReadOnlyMetastorage, R
     }
 
     /** */
-    public void init(IgniteCacheDatabaseSharedManager db) throws IgniteCheckedException {
+    public void init(GridCacheDatabaseSharedManager db) throws IgniteCheckedException {
         regionMetrics.clear();
+        initInternal(db);
+
+        if (!PRESERVE_LEGACY_METASTORAGE_PARTITION_ID) {
+            GridCacheProcessor gcProcessor = cctx.kernalContext().cache();
+
+            if (partId == OLD_METASTORE_PARTITION)
+                gcProcessor.setTmpStorage(copyDataToTmpStorage());
+            else if (gcProcessor.getTmpStorage() != null) {
+                restoreDataFromTmpStorage(gcProcessor.getTmpStorage());
+
+                gcProcessor.setTmpStorage(null);
+
+                // remove old partitions
+                CacheGroupContext cgc = cctx.cache().cacheGroup(METASTORAGE_CACHE_ID);
 
-        getOrAllocateMetas();
+                if (cgc != null) {
+                    db.schedulePartitionDestroy(METASTORAGE_CACHE_ID, OLD_METASTORE_PARTITION);
+
+                    db.schedulePartitionDestroy(METASTORAGE_CACHE_ID, PageIdAllocator.INDEX_PARTITION);
+                }
+            }
+        }
+    }
+
+    /**
+     * Copying all data from the 'meta' to temporary storage.
+     *
+     * @return Target temporary storage
+     */
+    private TmpStorage copyDataToTmpStorage() throws IgniteCheckedException {
+        TmpStorage tmpStorage = new TmpStorage(TEMPORARY_METASTORAGE_IN_MEMORY_SIZE, log);
+
+        GridCursor<MetastorageDataRow> cur = tree.find(null, null);
+
+        while (cur.next()) {
+            MetastorageDataRow row = cur.get();
+
+            tmpStorage.add(row.key(), row.value());
+        }
+
+        return tmpStorage;
+    }
+
+    /**
+     * Data recovery from temporary storage
+     *
+     * @param tmpStorage temporary storage.
+     */
+    private void restoreDataFromTmpStorage(TmpStorage tmpStorage) throws IgniteCheckedException {
+        for (Iterator<IgniteBiTuple<String, byte[]>> it = tmpStorage.stream().iterator(); it.hasNext(); ) {
+            IgniteBiTuple<String, byte[]> t = it.next();
+
+            putData(t.get1(), t.get2());
+        }
+
+        try {
+            tmpStorage.close();
+        }
+        catch (IOException e) {
+            log.error(e.getMessage(), e);
+        }
+    }
+
+    /**
+     * @param db Database.
+     */
+    private void initInternal(IgniteCacheDatabaseSharedManager db) throws IgniteCheckedException {
+        if (PRESERVE_LEGACY_METASTORAGE_PARTITION_ID)
+            getOrAllocateMetas(partId = PageIdAllocator.OLD_METASTORE_PARTITION);
+        else if (!readOnly || getOrAllocateMetas(partId = PageIdAllocator.OLD_METASTORE_PARTITION))
+            getOrAllocateMetas(partId = PageIdAllocator.METASTORE_PARTITION);
 
         if (!empty) {
             freeList = new FreeListImpl(METASTORAGE_CACHE_ID, "metastorage",
@@ -151,7 +252,7 @@ public class MetaStorage implements DbCheckpointListener, ReadOnlyMetastorage, R
             MetastorageRowStore rowStore = new MetastorageRowStore(freeList, db);
 
             tree = new MetastorageTree(METASTORAGE_CACHE_ID, dataRegion.pageMemory(), wal, rmvId,
-                freeList, rowStore, treeRoot.pageId().pageId(), treeRoot.isAllocated(), failureProcessor);
+                freeList, rowStore, treeRoot.pageId().pageId(), treeRoot.isAllocated(), failureProcessor, partId);
 
             if (!readOnly)
                 ((GridCacheDatabaseSharedManager)db).addCheckpointListener(this);
@@ -226,6 +327,23 @@ public class MetaStorage implements DbCheckpointListener, ReadOnlyMetastorage, R
         return res;
     }
 
+    /**
+     * Read all items from metastore.
+     */
+    public Collection<IgniteBiTuple<String, byte[]>> readAll() throws IgniteCheckedException {
+        ArrayList<IgniteBiTuple<String, byte[]>> res = new ArrayList<>();
+
+        GridCursor<MetastorageDataRow> cur = tree.find(null, null);
+
+        while (cur.next()) {
+            MetastorageDataRow row = cur.get();
+
+            res.add(new IgniteBiTuple<>(row.key(), row.value()));
+        }
+
+        return res;
+    }
+
     /** {@inheritDoc} */
     @Override public void write(@NotNull String key, @NotNull Serializable val) throws IgniteCheckedException {
         assert val != null;
@@ -314,11 +432,16 @@ public class MetaStorage implements DbCheckpointListener, ReadOnlyMetastorage, R
                 + U.hexLong(reuseListRoot) + ", METASTORAGE_CACHE_ID=" + METASTORAGE_CACHE_ID);
     }
 
-    /** */
-    private void getOrAllocateMetas() throws IgniteCheckedException {
-        PageMemoryEx pageMem = (PageMemoryEx)dataRegion.pageMemory();
+    /**
+     * Initializing the selected partition for use as MetaStorage
+     *
+     * @param partId Partition id.
+     * @return true if the partion is empty
+     */
+    private boolean getOrAllocateMetas(int partId) throws IgniteCheckedException {
+        empty = false;
 
-        int partId = 0;
+        PageMemoryEx pageMem = (PageMemoryEx)dataRegion.pageMemory();
 
         long partMetaId = pageMem.partitionMetaPageId(METASTORAGE_CACHE_ID, partId);
         long partMetaPage = pageMem.acquirePage(METASTORAGE_CACHE_ID, partMetaId);
@@ -330,7 +453,7 @@ public class MetaStorage implements DbCheckpointListener, ReadOnlyMetastorage, R
                     if (PageIO.getType(pageAddr) != PageIO.T_PART_META) {
                         empty = true;
 
-                        return;
+                        return true;
                     }
 
                     PagePartitionMetaIO io = PageIO.getPageIO(pageAddr);
@@ -406,6 +529,8 @@ public class MetaStorage implements DbCheckpointListener, ReadOnlyMetastorage, R
         finally {
             pageMem.releasePage(METASTORAGE_CACHE_ID, partMetaId, partMetaPage);
         }
+
+        return false;
     }
 
     /**
@@ -451,8 +576,6 @@ public class MetaStorage implements DbCheckpointListener, ReadOnlyMetastorage, R
     private void saveStoreMetadata() throws IgniteCheckedException {
         PageMemoryEx pageMem = (PageMemoryEx) pageMemory();
 
-        int partId = 0;
-
         long partMetaId = pageMem.partitionMetaPageId(METASTORAGE_CACHE_ID, partId);
         long partMetaPage = pageMem.acquirePage(METASTORAGE_CACHE_ID, partMetaId);
 
@@ -498,7 +621,7 @@ public class MetaStorage implements DbCheckpointListener, ReadOnlyMetastorage, R
     }
 
     /** */
-    public static class FreeListImpl extends AbstractFreeList<MetastorageDataRow> {
+    public class FreeListImpl extends AbstractFreeList<MetastorageDataRow> {
         /** {@inheritDoc} */
         FreeListImpl(int cacheId, String name, DataRegionMetricsImpl regionMetrics, DataRegion dataRegion,
             ReuseList reuseList,
@@ -513,7 +636,7 @@ public class MetaStorage implements DbCheckpointListener, ReadOnlyMetastorage, R
 
         /** {@inheritDoc} */
         @Override protected long allocatePageNoReuse() throws IgniteCheckedException {
-            return pageMem.allocatePage(grpId, PageIdAllocator.METASTORE_PARTITION, FLAG_DATA);
+            return pageMem.allocatePage(grpId, partId, FLAG_DATA);
         }
 
         /**
@@ -598,4 +721,259 @@ public class MetaStorage implements DbCheckpointListener, ReadOnlyMetastorage, R
             return new MetastorageDataRow(link, key, incomplete.data());
         }
     }
+
+    /**
+     * Temporary storage internal
+     */
+    private interface TmpStorageInternal extends Closeable {
+        /**
+         * Put data
+         *
+         * @param key Key.
+         * @param val Value.
+         */
+        boolean add(String key, byte[] val) throws IOException;
+
+        /**
+         * Read data from storage
+         */
+        Stream<IgniteBiTuple<String, byte[]>> stream() throws IOException;
+    }
+
+    /**
+     * Temporary storage (memory)
+     */
+    private static class MemoryTmpStorage implements TmpStorageInternal {
+        /** Buffer. */
+        final ByteBuffer buf;
+
+        /** Size. */
+        int size;
+
+        /**
+         * @param size Size.
+         */
+        MemoryTmpStorage(int size) {
+            buf = ByteBuffer.allocateDirect(size);
+        }
+
+        /** {@inheritDoc} */
+        @Override public boolean add(String key, byte[] val) {
+            byte[] keyData = key.getBytes(StandardCharsets.UTF_8);
+
+            if (val.length + keyData.length + 8 > buf.remaining())
+                return false;
+
+            buf.putInt(keyData.length).putInt(val.length).put(keyData).put(val);
+
+            size++;
+
+            return true;
+        }
+
+        /** {@inheritDoc} */
+        @Override public Stream<IgniteBiTuple<String, byte[]>> stream() {
+            buf.flip();
+
+            return Stream.generate(() -> {
+                int keyLen = buf.getInt();
+                int dataLen = buf.getInt();
+
+                byte[] tmpBuf = new byte[Math.max(keyLen, dataLen)];
+
+                buf.get(tmpBuf, 0, keyLen);
+
+                String key = new String(tmpBuf, 0, keyLen, StandardCharsets.UTF_8);
+
+                buf.get(tmpBuf, 0, dataLen);
+
+                return new IgniteBiTuple<>(key, tmpBuf.length > dataLen ? Arrays.copyOf(tmpBuf, dataLen) : tmpBuf);
+            }).limit(size);
+        }
+
+        /** {@inheritDoc} */
+        @Override public void close() throws IOException {
+        }
+    }
+
+    /**
+     * Temporary storage (file)
+     */
+    private static class FileTmpStorage implements TmpStorageInternal {
+        /** Cache. */
+        final ByteBuffer cache = ByteBuffer.allocateDirect(TEMPORARY_METASTORAGE_BUFFER_SIZE);
+
+        /** File. */
+        RandomAccessFile file;
+
+        /** Size. */
+        long size;
+
+        /** {@inheritDoc} */
+        @Override public boolean add(String key, byte[] val) throws IOException {
+            if (file == null)
+                file = new RandomAccessFile(File.createTempFile("m_storage", "bin"), "rw");
+
+            byte[] keyData = key.getBytes(StandardCharsets.UTF_8);
+
+            if (val.length + keyData.length + 8 > cache.remaining())
+                flushCache(false);
+
+            cache.putInt(keyData.length).putInt(val.length).put(keyData).put(val);
+
+            size++;
+
+            return true;
+        }
+
+        /** {@inheritDoc} */
+        @Override public Stream<IgniteBiTuple<String, byte[]>> stream() throws IOException {
+            if (file == null)
+                return Stream.empty();
+
+            flushCache(true);
+
+            file.getChannel().position(0);
+
+            readToCache();
+
+            return Stream.generate(() -> {
+                if (cache.remaining() <= 8) {
+                    cache.compact();
+
+                    try {
+                        readToCache();
+                    }
+                    catch (IOException e) {
+                        throw new IgniteException(e);
+                    }
+                }
+
+                int keyLen = cache.getInt();
+                int dataLen = cache.getInt();
+
+                if (cache.remaining() < keyLen + dataLen) {
+                    cache.compact();
+
+                    try {
+                        readToCache();
+                    }
+                    catch (IOException e) {
+                        throw new IgniteException(e);
+                    }
+                }
+
+                byte[] tmpBuf = new byte[Math.max(keyLen, dataLen)];
+
+                cache.get(tmpBuf, 0, keyLen);
+
+                String key = new String(tmpBuf, 0, keyLen, StandardCharsets.UTF_8);
+
+                cache.get(tmpBuf, 0, dataLen);
+
+                return new IgniteBiTuple<>(key, tmpBuf.length > dataLen ? Arrays.copyOf(tmpBuf, dataLen) : tmpBuf);
+            }).limit(size);
+        }
+
+        /** {@inheritDoc} */
+        @Override public void close() throws IOException {
+            file.close();
+        }
+
+        /**
+         * Read data to cache
+         */
+        private void readToCache() throws IOException {
+            int len = (int)Math.min(file.length() - file.getChannel().position(), cache.remaining());
+
+            while (len > 0)
+                len -= file.getChannel().read(cache);
+
+            cache.flip();
+        }
+
+        /**
+         * Write cache to file.
+         *
+         * @param force force metadata.
+         */
+        private void flushCache(boolean force) throws IOException {
+            if (cache.position() > 0) {
+                cache.flip();
+
+                while (cache.remaining() > 0)
+                    file.getChannel().write(cache);
+
+                cache.clear();
+            }
+
+            file.getChannel().force(force);
+        }
+    }
+
+    /**
+     * Temporary storage
+     */
+    public static class TmpStorage implements Closeable {
+        /** Chain of internal storages. */
+        final List<TmpStorageInternal> chain = new ArrayList<>(2);
+
+        /** Current internal storage. */
+        TmpStorageInternal current;
+
+        /** Logger. */
+        final IgniteLogger log;
+
+        /**
+         * @param memBufSize Memory buffer size.
+         * @param log Logger.
+         */
+        TmpStorage(int memBufSize, IgniteLogger log) {
+            this.log = log;
+
+            chain.add(current = new MemoryTmpStorage(memBufSize));
+        }
+
+        /**
+         * Put data
+         *
+         * @param key Key.
+         * @param val Value.
+         */
+        public void add(String key, byte[] val) throws IgniteCheckedException {
+            try {
+                while (!current.add(key, val))
+                    chain.add(current = new FileTmpStorage());
+            }
+            catch (IOException e) {
+                throw new IgniteCheckedException(e);
+            }
+        }
+
+        /**
+         * Read data from storage
+         */
+        public Stream<IgniteBiTuple<String, byte[]>> stream() {
+            return chain.stream().flatMap(storage -> {
+                try {
+                    return storage.stream();
+                }
+                catch (IOException e) {
+                    throw new IgniteException(e);
+                }
+            });
+        }
+
+        /** {@inheritDoc} */
+        @Override public void close() throws IOException {
+            for (TmpStorageInternal storage : chain) {
+                try {
+                    storage.close();
+                }
+                catch (IOException ex) {
+                    log.error(ex.getMessage(), ex);
+                }
+            }
+        }
+    }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/86f92d96/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/metastorage/MetastorageDataRow.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/metastorage/MetastorageDataRow.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/metastorage/MetastorageDataRow.java
index 5e2660b..2d7b0a6 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/metastorage/MetastorageDataRow.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/metastorage/MetastorageDataRow.java
@@ -18,6 +18,7 @@
 package org.apache.ignite.internal.processors.cache.persistence.metastorage;
 
 import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.internal.pagemem.PageIdAllocator;
 import org.apache.ignite.internal.processors.cache.persistence.Storable;
 
 /**
@@ -62,7 +63,7 @@ public class MetastorageDataRow implements MetastorageSearchRow, Storable {
     /** {@inheritDoc} */
     @Override
     public int partition() {
-        return 0;
+        return MetaStorage.PRESERVE_LEGACY_METASTORAGE_PARTITION_ID ? PageIdAllocator.OLD_METASTORE_PARTITION: PageIdAllocator.METASTORE_PARTITION;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/86f92d96/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/metastorage/MetastorageTree.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/metastorage/MetastorageTree.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/metastorage/MetastorageTree.java
index 420c51d..1db47be 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/metastorage/MetastorageTree.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/metastorage/MetastorageTree.java
@@ -19,7 +19,6 @@ package org.apache.ignite.internal.processors.cache.persistence.metastorage;
 
 import java.util.concurrent.atomic.AtomicLong;
 import org.apache.ignite.IgniteCheckedException;
-import org.apache.ignite.internal.pagemem.PageIdAllocator;
 import org.apache.ignite.internal.pagemem.PageMemory;
 import org.apache.ignite.internal.pagemem.PageUtils;
 import org.apache.ignite.internal.pagemem.wal.IgniteWriteAheadLogManager;
@@ -44,6 +43,9 @@ public class MetastorageTree extends BPlusTree<MetastorageSearchRow, Metastorage
     /** */
     private MetastorageRowStore rowStore;
 
+    /** Partition id. */
+    private final int partId;
+
     /**
      * @param pageMem Page memory instance.
      * @param wal WAL manager.
@@ -63,12 +65,15 @@ public class MetastorageTree extends BPlusTree<MetastorageSearchRow, Metastorage
         MetastorageRowStore rowStore,
         long metaPageId,
         boolean initNew,
-        @Nullable FailureProcessor failureProcessor) throws IgniteCheckedException {
+        @Nullable FailureProcessor failureProcessor,
+        int partId) throws IgniteCheckedException {
         super("Metastorage", cacheId, pageMem, wal,
             globalRmvId, metaPageId, reuseList, MetastorageInnerIO.VERSIONS, MetastoreLeafIO.VERSIONS, failureProcessor);
 
         this.rowStore = rowStore;
 
+        this.partId = partId;
+
         initTree(initNew);
     }
 
@@ -99,7 +104,7 @@ public class MetastorageTree extends BPlusTree<MetastorageSearchRow, Metastorage
 
     /** {@inheritDoc} */
     @Override protected long allocatePageNoReuse() throws IgniteCheckedException {
-        return pageMem.allocatePage(grpId, PageIdAllocator.METASTORE_PARTITION, FLAG_DATA);
+        return pageMem.allocatePage(grpId, partId, FLAG_DATA);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/86f92d96/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCorruptedStoreTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCorruptedStoreTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCorruptedStoreTest.java
index 39faf5a..dba8486 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCorruptedStoreTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCorruptedStoreTest.java
@@ -37,6 +37,7 @@ import org.apache.ignite.failure.FailureContext;
 import org.apache.ignite.internal.IgniteEx;
 import org.apache.ignite.internal.IgniteInternalFuture;
 import org.apache.ignite.internal.IgniteInterruptedCheckedException;
+import org.apache.ignite.internal.pagemem.PageIdAllocator;
 import org.apache.ignite.internal.pagemem.PageIdUtils;
 import org.apache.ignite.internal.processors.cache.IgniteInternalCache;
 import org.apache.ignite.internal.processors.cache.persistence.file.FileIO;
@@ -231,7 +232,7 @@ public class IgnitePdsCorruptedStoreTest extends GridCommonAbstractTest {
 
         MetaStorage metaStorage = ignite.context().cache().context().database().metaStorage();
 
-        corruptTreeRoot(ignite, (PageMemoryEx)metaStorage.pageMemory(), METASTORAGE_CACHE_ID, 0);
+        corruptTreeRoot(ignite, (PageMemoryEx)metaStorage.pageMemory(), METASTORAGE_CACHE_ID, PageIdAllocator.METASTORE_PARTITION);
 
         stopGrid(0);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/86f92d96/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/metastorage/IgniteMetaStorageBasicTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/metastorage/IgniteMetaStorageBasicTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/metastorage/IgniteMetaStorageBasicTest.java
index 538b332..ee609c1 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/metastorage/IgniteMetaStorageBasicTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/metastorage/IgniteMetaStorageBasicTest.java
@@ -18,7 +18,15 @@
 package org.apache.ignite.internal.processors.cache.persistence.metastorage;
 
 import java.io.Serializable;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
 import java.util.Random;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.configuration.DataRegionConfiguration;
@@ -28,6 +36,7 @@ import org.apache.ignite.configuration.WALMode;
 import org.apache.ignite.internal.IgniteEx;
 import org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager;
 import org.apache.ignite.internal.processors.cache.persistence.IgniteCacheDatabaseSharedManager;
+import org.apache.ignite.lang.IgniteBiTuple;
 import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
@@ -147,12 +156,274 @@ public class IgniteMetaStorageBasicTest extends GridCommonAbstractTest {
 
                 metaStorage.remove(key);
 
-                metaStorage.putData(key, arr/*b.toString().getBytes()*/);
+                metaStorage.putData(key, arr);
             }
         }
         finally {
             db.checkpointReadUnlock();
         }
+
+        stopGrid();
+    }
+
+    /**
+     * @param metaStorage Meta storage.
+     * @param size Size.
+     */
+    private Map<String, byte[]> putDataToMetaStorage(MetaStorage metaStorage, int size, int from) throws IgniteCheckedException {
+        Map<String, byte[]> res = new HashMap<>();
+
+        for (Iterator<IgniteBiTuple<String, byte[]>> it = generateTestData(size, from).iterator(); it.hasNext(); ) {
+            IgniteBiTuple<String, byte[]> d = it.next();
+
+            metaStorage.putData(d.getKey(), d.getValue());
+
+            res.put(d.getKey(), d.getValue());
+        }
+
+        return res;
+    }
+
+    /**
+     * Testing data migration between metastorage partitions (delete partition case)
+     */
+    public void testDeletePartitionFromMetaStorageMigration() throws Exception {
+        final Map<String, byte[]> testData = new HashMap<>();
+
+        MetaStorage.PRESERVE_LEGACY_METASTORAGE_PARTITION_ID = true;
+
+        try {
+            IgniteEx ig = startGrid(0);
+
+            ig.cluster().active(true);
+
+            IgniteCacheDatabaseSharedManager db = ig.context().cache().context().database();
+
+            MetaStorage metaStorage = db.metaStorage();
+
+            assertNotNull(metaStorage);
+
+            db.checkpointReadLock();
+
+            try {
+                testData.putAll(putDataToMetaStorage(metaStorage, 1_000, 0));
+            }
+            finally {
+                db.checkpointReadUnlock();
+            }
+
+            db.waitForCheckpoint("Test");
+
+            ((GridCacheDatabaseSharedManager)db).enableCheckpoints(false);
+
+            db.checkpointReadLock();
+
+            try {
+                testData.putAll(putDataToMetaStorage(metaStorage, 1_000, 1_000));
+            }
+            finally {
+                db.checkpointReadUnlock();
+            }
+
+            stopGrid(0);
+
+            MetaStorage.PRESERVE_LEGACY_METASTORAGE_PARTITION_ID = false;
+
+            IgniteConfiguration cfg = getConfiguration(getTestIgniteInstanceName(0));
+
+            cfg.getDataStorageConfiguration().setCheckpointFrequency(3600 * 1000L);
+
+            ig = (IgniteEx)startGrid(getTestIgniteInstanceName(0), optimize(cfg), null);
+
+            ig.cluster().active(true);
+
+            db = ig.context().cache().context().database();
+
+            metaStorage = db.metaStorage();
+
+            assertNotNull(metaStorage);
+
+            db.checkpointReadLock();
+
+            try {
+                testData.putAll(putDataToMetaStorage(metaStorage, 1_000, 2_000));
+            }
+            finally {
+                db.checkpointReadUnlock();
+            }
+
+            db.waitForCheckpoint("Test");
+
+            stopGrid(0);
+
+            ig = startGrid(0);
+
+            ig.cluster().active(true);
+
+            db = ig.context().cache().context().database();
+
+            metaStorage = db.metaStorage();
+
+            assertNotNull(metaStorage);
+
+            db.checkpointReadLock();
+            try {
+                Collection<IgniteBiTuple<String, byte[]>> read = metaStorage.readAll();
+
+                int cnt = 0;
+                for (IgniteBiTuple<String, byte[]> r : read) {
+                    byte[] test = testData.get(r.get1());
+
+                    if (test != null) {
+                        Assert.assertArrayEquals(r.get2(), test);
+
+                        cnt++;
+                    }
+                }
+
+                assertEquals(cnt, testData.size());
+            }
+            finally {
+                db.checkpointReadUnlock();
+            }
+        }
+        finally {
+            MetaStorage.PRESERVE_LEGACY_METASTORAGE_PARTITION_ID = false;
+        }
+
+    }
+
+    /**
+     * Testing data migration between metastorage partitions
+     */
+    public void testMetaStorageMigration() throws Exception {
+        final Map<String, byte[]> testData = new HashMap<>(5_000);
+
+        generateTestData(5_000, -1).forEach(t -> testData.put(t.get1(), t.get2()));
+
+        MetaStorage.PRESERVE_LEGACY_METASTORAGE_PARTITION_ID = true;
+
+        try {
+            IgniteEx ig = startGrid(0);
+
+            ig.cluster().active(true);
+
+            IgniteCacheDatabaseSharedManager db = ig.context().cache().context().database();
+
+            MetaStorage metaStorage = db.metaStorage();
+
+            assertNotNull(metaStorage);
+
+            db.checkpointReadLock();
+
+            try {
+                for (Map.Entry<String, byte[]> v : testData.entrySet())
+                    metaStorage.putData(v.getKey(), v.getValue());
+            }
+            finally {
+                db.checkpointReadUnlock();
+            }
+
+            stopGrid(0);
+
+            MetaStorage.PRESERVE_LEGACY_METASTORAGE_PARTITION_ID = false;
+
+            ig = startGrid(0);
+
+            ig.cluster().active(true);
+
+            db = ig.context().cache().context().database();
+
+            metaStorage = db.metaStorage();
+
+            assertNotNull(metaStorage);
+
+            db.checkpointReadLock();
+
+            try {
+                Collection<IgniteBiTuple<String, byte[]>> read = metaStorage.readAll();
+
+                int cnt = 0;
+                for (IgniteBiTuple<String, byte[]> r : read) {
+                    byte[] test = testData.get(r.get1());
+
+                    if (test != null) {
+                        Assert.assertArrayEquals(r.get2(), test);
+
+                        cnt++;
+                    }
+                }
+
+                assertEquals(cnt, testData.size());
+            }
+            finally {
+                db.checkpointReadUnlock();
+            }
+        }
+        finally {
+            MetaStorage.PRESERVE_LEGACY_METASTORAGE_PARTITION_ID = false;
+        }
+    }
+
+    /**
+     * Testing temporary storage
+     */
+    public void testMetaStoreMigrationTmpStorage() throws Exception {
+        List<IgniteBiTuple<String, byte[]>> data = generateTestData(2_000, -1).collect(Collectors.toList());
+
+        // memory
+        try (MetaStorage.TmpStorage tmpStorage = new MetaStorage.TmpStorage(4 * 1024 * 1024, log)) {
+            for (IgniteBiTuple<String, byte[]> item : data)
+                tmpStorage.add(item.get1(), item.get2());
+
+            compare(tmpStorage.stream().iterator(), data.iterator());
+        }
+
+        // file
+        try (MetaStorage.TmpStorage tmpStorage = new MetaStorage.TmpStorage(4 * 1024, log)) {
+            for (IgniteBiTuple<String, byte[]> item : data)
+                tmpStorage.add(item.get1(), item.get2());
+
+            compare(tmpStorage.stream().iterator(), data.iterator());
+        }
+    }
+
+    /**
+     * Test data generation
+     */
+    private static Stream<IgniteBiTuple<String, byte[]>> generateTestData(int size, int fromKey) {
+        final AtomicInteger idx = new AtomicInteger(fromKey);
+        final Random rnd = new Random();
+
+        return Stream.generate(() -> {
+            byte[] val = new byte[1024];
+
+            rnd.nextBytes(val);
+
+            return new IgniteBiTuple<>("KEY_" + (fromKey < 0 ? rnd.nextInt() : idx.getAndIncrement()), val);
+        }).limit(size);
+    }
+
+    /**
+     * Compare two iterator
+     *
+     * @param it It.
+     * @param it1 It 1.
+     */
+    private static void compare(Iterator<IgniteBiTuple<String, byte[]>> it, Iterator<IgniteBiTuple<String, byte[]>> it1) {
+        while (true) {
+            Assert.assertEquals(it.hasNext(), it1.hasNext());
+
+            if (!it.hasNext())
+                break;
+
+            IgniteBiTuple<String, byte[]> i = it.next();
+            IgniteBiTuple<String, byte[]> i1 = it1.next();
+
+            Assert.assertEquals(i.get1(), i.get1());
+
+            Assert.assertArrayEquals(i.get2(), i1.get2());
+        }
     }
 
     /**


[32/37] ignite git commit: IGNITE-10565 Web Console: Add missing "maxRowsToShow" binding for "ui-grid" component.

Posted by ak...@apache.org.
IGNITE-10565 Web Console: Add missing "maxRowsToShow" binding for "ui-grid" component.


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

Branch: refs/heads/ignite-10189
Commit: 7f3f6b5d68830b3b27aa47e4737bfb17c1684839
Parents: b131da0
Author: Alexander Kalinin <ve...@yandex.ru>
Authored: Mon Dec 10 10:58:52 2018 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Mon Dec 10 10:58:52 2018 +0700

----------------------------------------------------------------------
 modules/web-console/frontend/app/components/ui-grid/component.js | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/7f3f6b5d/modules/web-console/frontend/app/components/ui-grid/component.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/ui-grid/component.js b/modules/web-console/frontend/app/components/ui-grid/component.js
index f0c3b06..d75cc6c 100644
--- a/modules/web-console/frontend/app/components/ui-grid/component.js
+++ b/modules/web-console/frontend/app/components/ui-grid/component.js
@@ -30,6 +30,7 @@ export default {
         gridHeight: '<?',
         tabName: '<?',
         tableTitle: '<?',
+        maxRowsToShow: '<?',
 
         // Input Events.
         items: '<',


[23/37] ignite git commit: IGNITE-10587 Web Console: Fixed chart history cleanup.

Posted by ak...@apache.org.
IGNITE-10587 Web Console: Fixed chart history cleanup.


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

Branch: refs/heads/ignite-10189
Commit: 26860c5a9a9375baba81bcf67d140a4f4055d838
Parents: e1b8686
Author: Alexander Kalinin <ve...@yandex.ru>
Authored: Fri Dec 7 16:29:08 2018 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Fri Dec 7 16:29:08 2018 +0700

----------------------------------------------------------------------
 .../web-console/frontend/app/components/ignite-chart/controller.js  | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/26860c5a/modules/web-console/frontend/app/components/ignite-chart/controller.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/ignite-chart/controller.js b/modules/web-console/frontend/app/components/ignite-chart/controller.js
index 81ed273..b611250 100644
--- a/modules/web-console/frontend/app/components/ignite-chart/controller.js
+++ b/modules/web-console/frontend/app/components/ignite-chart/controller.js
@@ -87,6 +87,7 @@ export class IgniteChartController {
         if ((changes.chartDataPoint && _.isNil(changes.chartDataPoint.currentValue)) ||
             (changes.chartHistory && _.isEmpty(changes.chartHistory.currentValue))) {
             this.clearDatasets();
+            this.localHistory = [];
 
             return;
         }


[33/37] ignite git commit: IGNITE-10382: [ML] Move datasets from example to ml module

Posted by ak...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/86a788f3/modules/ml/src/main/resources/datasets/two_classed_iris.csv
----------------------------------------------------------------------
diff --git a/modules/ml/src/main/resources/datasets/two_classed_iris.csv b/modules/ml/src/main/resources/datasets/two_classed_iris.csv
new file mode 100644
index 0000000..872c699
--- /dev/null
+++ b/modules/ml/src/main/resources/datasets/two_classed_iris.csv
@@ -0,0 +1,100 @@
+0	5.1	3.5	1.4	0.2
+0	4.9	3	1.4	0.2
+0	4.7	3.2	1.3	0.2
+0	4.6	3.1	1.5	0.2
+0	5	3.6	1.4	0.2
+0	5.4	3.9	1.7	0.4
+0	4.6	3.4	1.4	0.3
+0	5	3.4	1.5	0.2
+0	4.4	2.9	1.4	0.2
+0	4.9	3.1	1.5	0.1
+0	5.4	3.7	1.5	0.2
+0	4.8	3.4	1.6	0.2
+0	4.8	3	1.4	0.1
+0	4.3	3	1.1	0.1
+0	5.8	4	1.2	0.2
+0	5.7	4.4	1.5	0.4
+0	5.4	3.9	1.3	0.4
+0	5.1	3.5	1.4	0.3
+0	5.7	3.8	1.7	0.3
+0	5.1	3.8	1.5	0.3
+0	5.4	3.4	1.7	0.2
+0	5.1	3.7	1.5	0.4
+0	4.6	3.6	1	0.2
+0	5.1	3.3	1.7	0.5
+0	4.8	3.4	1.9	0.2
+0	5	3	1.6	0.2
+0	5	3.4	1.6	0.4
+0	5.2	3.5	1.5	0.2
+0	5.2	3.4	1.4	0.2
+0	4.7	3.2	1.6	0.2
+0	4.8	3.1	1.6	0.2
+0	5.4	3.4	1.5	0.4
+0	5.2	4.1	1.5	0.1
+0	5.5	4.2	1.4	0.2
+0	4.9	3.1	1.5	0.1
+0	5	3.2	1.2	0.2
+0	5.5	3.5	1.3	0.2
+0	4.9	3.1	1.5	0.1
+0	4.4	3	1.3	0.2
+0	5.1	3.4	1.5	0.2
+0	5	3.5	1.3	0.3
+0	4.5	2.3	1.3	0.3
+0	4.4	3.2	1.3	0.2
+0	5	3.5	1.6	0.6
+0	5.1	3.8	1.9	0.4
+0	4.8	3	1.4	0.3
+0	5.1	3.8	1.6	0.2
+0	4.6	3.2	1.4	0.2
+0	5.3	3.7	1.5	0.2
+0	5	3.3	1.4	0.2
+1	7	3.2	4.7	1.4
+1	6.4	3.2	4.5	1.5
+1	6.9	3.1	4.9	1.5
+1	5.5	2.3	4	1.3
+1	6.5	2.8	4.6	1.5
+1	5.7	2.8	4.5	1.3
+1	6.3	3.3	4.7	1.6
+1	4.9	2.4	3.3	1
+1	6.6	2.9	4.6	1.3
+1	5.2	2.7	3.9	1.4
+1	5	2	3.5	1
+1	5.9	3	4.2	1.5
+1	6	2.2	4	1
+1	6.1	2.9	4.7	1.4
+1	5.6	2.9	3.6	1.3
+1	6.7	3.1	4.4	1.4
+1	5.6	3	4.5	1.5
+1	5.8	2.7	4.1	1
+1	6.2	2.2	4.5	1.5
+1	5.6	2.5	3.9	1.1
+1	5.9	3.2	4.8	1.8
+1	6.1	2.8	4	1.3
+1	6.3	2.5	4.9	1.5
+1	6.1	2.8	4.7	1.2
+1	6.4	2.9	4.3	1.3
+1	6.6	3	4.4	1.4
+1	6.8	2.8	4.8	1.4
+1	6.7	3	5	1.7
+1	6	2.9	4.5	1.5
+1	5.7	2.6	3.5	1
+1	5.5	2.4	3.8	1.1
+1	5.5	2.4	3.7	1
+1	5.8	2.7	3.9	1.2
+1	6	2.7	5.1	1.6
+1	5.4	3	4.5	1.5
+1	6	3.4	4.5	1.6
+1	6.7	3.1	4.7	1.5
+1	6.3	2.3	4.4	1.3
+1	5.6	3	4.1	1.3
+1	5.5	2.5	4	1.3
+1	5.5	2.6	4.4	1.2
+1	6.1	3	4.6	1.4
+1	5.8	2.6	4	1.2
+1	5	2.3	3.3	1
+1	5.6	2.7	4.2	1.3
+1	5.7	3	4.2	1.2
+1	5.7	2.9	4.2	1.3
+1	6.2	2.9	4.3	1.3
+1	5.1	2.5	3	1.1
+1	5.7	2.8	4.1	1.3

http://git-wip-us.apache.org/repos/asf/ignite/blob/86a788f3/modules/ml/src/main/resources/datasets/wine.txt
----------------------------------------------------------------------
diff --git a/modules/ml/src/main/resources/datasets/wine.txt b/modules/ml/src/main/resources/datasets/wine.txt
new file mode 100644
index 0000000..a0b3962
--- /dev/null
+++ b/modules/ml/src/main/resources/datasets/wine.txt
@@ -0,0 +1,178 @@
+1,14.23,1.71,2.43,15.6,127,2.8,3.06,.28,2.29,5.64,1.04,3.92,1065
+1,13.2,1.78,2.14,11.2,100,2.65,2.76,.26,1.28,4.38,1.05,3.4,1050
+1,13.16,2.36,2.67,18.6,101,2.8,3.24,.3,2.81,5.68,1.03,3.17,1185
+1,14.37,1.95,2.5,16.8,113,3.85,3.49,.24,2.18,7.8,.86,3.45,1480
+1,13.24,2.59,2.87,21,118,2.8,2.69,.39,1.82,4.32,1.04,2.93,735
+1,14.2,1.76,2.45,15.2,112,3.27,3.39,.34,1.97,6.75,1.05,2.85,1450
+1,14.39,1.87,2.45,14.6,96,2.5,2.52,.3,1.98,5.25,1.02,3.58,1290
+1,14.06,2.15,2.61,17.6,121,2.6,2.51,.31,1.25,5.05,1.06,3.58,1295
+1,14.83,1.64,2.17,14,97,2.8,2.98,.29,1.98,5.2,1.08,2.85,1045
+1,13.86,1.35,2.27,16,98,2.98,3.15,.22,1.85,7.22,1.01,3.55,1045
+1,14.1,2.16,2.3,18,105,2.95,3.32,.22,2.38,5.75,1.25,3.17,1510
+1,14.12,1.48,2.32,16.8,95,2.2,2.43,.26,1.57,5,1.17,2.82,1280
+1,13.75,1.73,2.41,16,89,2.6,2.76,.29,1.81,5.6,1.15,2.9,1320
+1,14.75,1.73,2.39,11.4,91,3.1,3.69,.43,2.81,5.4,1.25,2.73,1150
+1,14.38,1.87,2.38,12,102,3.3,3.64,.29,2.96,7.5,1.2,3,1547
+1,13.63,1.81,2.7,17.2,112,2.85,2.91,.3,1.46,7.3,1.28,2.88,1310
+1,14.3,1.92,2.72,20,120,2.8,3.14,.33,1.97,6.2,1.07,2.65,1280
+1,13.83,1.57,2.62,20,115,2.95,3.4,.4,1.72,6.6,1.13,2.57,1130
+1,14.19,1.59,2.48,16.5,108,3.3,3.93,.32,1.86,8.7,1.23,2.82,1680
+1,13.64,3.1,2.56,15.2,116,2.7,3.03,.17,1.66,5.1,.96,3.36,845
+1,14.06,1.63,2.28,16,126,3,3.17,.24,2.1,5.65,1.09,3.71,780
+1,12.93,3.8,2.65,18.6,102,2.41,2.41,.25,1.98,4.5,1.03,3.52,770
+1,13.71,1.86,2.36,16.6,101,2.61,2.88,.27,1.69,3.8,1.11,4,1035
+1,12.85,1.6,2.52,17.8,95,2.48,2.37,.26,1.46,3.93,1.09,3.63,1015
+1,13.5,1.81,2.61,20,96,2.53,2.61,.28,1.66,3.52,1.12,3.82,845
+1,13.05,2.05,3.22,25,124,2.63,2.68,.47,1.92,3.58,1.13,3.2,830
+1,13.39,1.77,2.62,16.1,93,2.85,2.94,.34,1.45,4.8,.92,3.22,1195
+1,13.3,1.72,2.14,17,94,2.4,2.19,.27,1.35,3.95,1.02,2.77,1285
+1,13.87,1.9,2.8,19.4,107,2.95,2.97,.37,1.76,4.5,1.25,3.4,915
+1,14.02,1.68,2.21,16,96,2.65,2.33,.26,1.98,4.7,1.04,3.59,1035
+1,13.73,1.5,2.7,22.5,101,3,3.25,.29,2.38,5.7,1.19,2.71,1285
+1,13.58,1.66,2.36,19.1,106,2.86,3.19,.22,1.95,6.9,1.09,2.88,1515
+1,13.68,1.83,2.36,17.2,104,2.42,2.69,.42,1.97,3.84,1.23,2.87,990
+1,13.76,1.53,2.7,19.5,132,2.95,2.74,.5,1.35,5.4,1.25,3,1235
+1,13.51,1.8,2.65,19,110,2.35,2.53,.29,1.54,4.2,1.1,2.87,1095
+1,13.48,1.81,2.41,20.5,100,2.7,2.98,.26,1.86,5.1,1.04,3.47,920
+1,13.28,1.64,2.84,15.5,110,2.6,2.68,.34,1.36,4.6,1.09,2.78,880
+1,13.05,1.65,2.55,18,98,2.45,2.43,.29,1.44,4.25,1.12,2.51,1105
+1,13.07,1.5,2.1,15.5,98,2.4,2.64,.28,1.37,3.7,1.18,2.69,1020
+1,14.22,3.99,2.51,13.2,128,3,3.04,.2,2.08,5.1,.89,3.53,760
+1,13.56,1.71,2.31,16.2,117,3.15,3.29,.34,2.34,6.13,.95,3.38,795
+1,13.41,3.84,2.12,18.8,90,2.45,2.68,.27,1.48,4.28,.91,3,1035
+1,13.88,1.89,2.59,15,101,3.25,3.56,.17,1.7,5.43,.88,3.56,1095
+1,13.24,3.98,2.29,17.5,103,2.64,2.63,.32,1.66,4.36,.82,3,680
+1,13.05,1.77,2.1,17,107,3,3,.28,2.03,5.04,.88,3.35,885
+1,14.21,4.04,2.44,18.9,111,2.85,2.65,.3,1.25,5.24,.87,3.33,1080
+1,14.38,3.59,2.28,16,102,3.25,3.17,.27,2.19,4.9,1.04,3.44,1065
+1,13.9,1.68,2.12,16,101,3.1,3.39,.21,2.14,6.1,.91,3.33,985
+1,14.1,2.02,2.4,18.8,103,2.75,2.92,.32,2.38,6.2,1.07,2.75,1060
+1,13.94,1.73,2.27,17.4,108,2.88,3.54,.32,2.08,8.90,1.12,3.1,1260
+1,13.05,1.73,2.04,12.4,92,2.72,3.27,.17,2.91,7.2,1.12,2.91,1150
+1,13.83,1.65,2.6,17.2,94,2.45,2.99,.22,2.29,5.6,1.24,3.37,1265
+1,13.82,1.75,2.42,14,111,3.88,3.74,.32,1.87,7.05,1.01,3.26,1190
+1,13.77,1.9,2.68,17.1,115,3,2.79,.39,1.68,6.3,1.13,2.93,1375
+1,13.74,1.67,2.25,16.4,118,2.6,2.9,.21,1.62,5.85,.92,3.2,1060
+1,13.56,1.73,2.46,20.5,116,2.96,2.78,.2,2.45,6.25,.98,3.03,1120
+1,14.22,1.7,2.3,16.3,118,3.2,3,.26,2.03,6.38,.94,3.31,970
+1,13.29,1.97,2.68,16.8,102,3,3.23,.31,1.66,6,1.07,2.84,1270
+1,13.72,1.43,2.5,16.7,108,3.4,3.67,.19,2.04,6.8,.89,2.87,1285
+2,12.37,.94,1.36,10.6,88,1.98,.57,.28,.42,1.95,1.05,1.82,520
+2,12.33,1.1,2.28,16,101,2.05,1.09,.63,.41,3.27,1.25,1.67,680
+2,12.64,1.36,2.02,16.8,100,2.02,1.41,.53,.62,5.75,.98,1.59,450
+2,13.67,1.25,1.92,18,94,2.1,1.79,.32,.73,3.8,1.23,2.46,630
+2,12.37,1.13,2.16,19,87,3.5,3.1,.19,1.87,4.45,1.22,2.87,420
+2,12.17,1.45,2.53,19,104,1.89,1.75,.45,1.03,2.95,1.45,2.23,355
+2,12.37,1.21,2.56,18.1,98,2.42,2.65,.37,2.08,4.6,1.19,2.3,678
+2,13.11,1.01,1.7,15,78,2.98,3.18,.26,2.28,5.3,1.12,3.18,502
+2,12.37,1.17,1.92,19.6,78,2.11,2,.27,1.04,4.68,1.12,3.48,510
+2,13.34,.94,2.36,17,110,2.53,1.3,.55,.42,3.17,1.02,1.93,750
+2,12.21,1.19,1.75,16.8,151,1.85,1.28,.14,2.5,2.85,1.28,3.07,718
+2,12.29,1.61,2.21,20.4,103,1.1,1.02,.37,1.46,3.05,.906,1.82,870
+2,13.86,1.51,2.67,25,86,2.95,2.86,.21,1.87,3.38,1.36,3.16,410
+2,13.49,1.66,2.24,24,87,1.88,1.84,.27,1.03,3.74,.98,2.78,472
+2,12.99,1.67,2.6,30,139,3.3,2.89,.21,1.96,3.35,1.31,3.5,985
+2,11.96,1.09,2.3,21,101,3.38,2.14,.13,1.65,3.21,.99,3.13,886
+2,11.66,1.88,1.92,16,97,1.61,1.57,.34,1.15,3.8,1.23,2.14,428
+2,13.03,.9,1.71,16,86,1.95,2.03,.24,1.46,4.6,1.19,2.48,392
+2,11.84,2.89,2.23,18,112,1.72,1.32,.43,.95,2.65,.96,2.52,500
+2,12.33,.99,1.95,14.8,136,1.9,1.85,.35,2.76,3.4,1.06,2.31,750
+2,12.7,3.87,2.4,23,101,2.83,2.55,.43,1.95,2.57,1.19,3.13,463
+2,12,.92,2,19,86,2.42,2.26,.3,1.43,2.5,1.38,3.12,278
+2,12.72,1.81,2.2,18.8,86,2.2,2.53,.26,1.77,3.9,1.16,3.14,714
+2,12.08,1.13,2.51,24,78,2,1.58,.4,1.4,2.2,1.31,2.72,630
+2,13.05,3.86,2.32,22.5,85,1.65,1.59,.61,1.62,4.8,.84,2.01,515
+2,11.84,.89,2.58,18,94,2.2,2.21,.22,2.35,3.05,.79,3.08,520
+2,12.67,.98,2.24,18,99,2.2,1.94,.3,1.46,2.62,1.23,3.16,450
+2,12.16,1.61,2.31,22.8,90,1.78,1.69,.43,1.56,2.45,1.33,2.26,495
+2,11.65,1.67,2.62,26,88,1.92,1.61,.4,1.34,2.6,1.36,3.21,562
+2,11.64,2.06,2.46,21.6,84,1.95,1.69,.48,1.35,2.8,1,2.75,680
+2,12.08,1.33,2.3,23.6,70,2.2,1.59,.42,1.38,1.74,1.07,3.21,625
+2,12.08,1.83,2.32,18.5,81,1.6,1.5,.52,1.64,2.4,1.08,2.27,480
+2,12,1.51,2.42,22,86,1.45,1.25,.5,1.63,3.6,1.05,2.65,450
+2,12.69,1.53,2.26,20.7,80,1.38,1.46,.58,1.62,3.05,.96,2.06,495
+2,12.29,2.83,2.22,18,88,2.45,2.25,.25,1.99,2.15,1.15,3.3,290
+2,11.62,1.99,2.28,18,98,3.02,2.26,.17,1.35,3.25,1.16,2.96,345
+2,12.47,1.52,2.2,19,162,2.5,2.27,.32,3.28,2.6,1.16,2.63,937
+2,11.81,2.12,2.74,21.5,134,1.6,.99,.14,1.56,2.5,.95,2.26,625
+2,12.29,1.41,1.98,16,85,2.55,2.5,.29,1.77,2.9,1.23,2.74,428
+2,12.37,1.07,2.1,18.5,88,3.52,3.75,.24,1.95,4.5,1.04,2.77,660
+2,12.29,3.17,2.21,18,88,2.85,2.99,.45,2.81,2.3,1.42,2.83,406
+2,12.08,2.08,1.7,17.5,97,2.23,2.17,.26,1.4,3.3,1.27,2.96,710
+2,12.6,1.34,1.9,18.5,88,1.45,1.36,.29,1.35,2.45,1.04,2.77,562
+2,12.34,2.45,2.46,21,98,2.56,2.11,.34,1.31,2.8,.8,3.38,438
+2,11.82,1.72,1.88,19.5,86,2.5,1.64,.37,1.42,2.06,.94,2.44,415
+2,12.51,1.73,1.98,20.5,85,2.2,1.92,.32,1.48,2.94,1.04,3.57,672
+2,12.42,2.55,2.27,22,90,1.68,1.84,.66,1.42,2.7,.86,3.3,315
+2,12.25,1.73,2.12,19,80,1.65,2.03,.37,1.63,3.4,1,3.17,510
+2,12.72,1.75,2.28,22.5,84,1.38,1.76,.48,1.63,3.3,.88,2.42,488
+2,12.22,1.29,1.94,19,92,2.36,2.04,.39,2.08,2.7,.86,3.02,312
+2,11.61,1.35,2.7,20,94,2.74,2.92,.29,2.49,2.65,.96,3.26,680
+2,11.46,3.74,1.82,19.5,107,3.18,2.58,.24,3.58,2.9,.75,2.81,562
+2,12.52,2.43,2.17,21,88,2.55,2.27,.26,1.22,2,.9,2.78,325
+2,11.76,2.68,2.92,20,103,1.75,2.03,.6,1.05,3.8,1.23,2.5,607
+2,11.41,.74,2.5,21,88,2.48,2.01,.42,1.44,3.08,1.1,2.31,434
+2,12.08,1.39,2.5,22.5,84,2.56,2.29,.43,1.04,2.9,.93,3.19,385
+2,11.03,1.51,2.2,21.5,85,2.46,2.17,.52,2.01,1.9,1.71,2.87,407
+2,11.82,1.47,1.99,20.8,86,1.98,1.6,.3,1.53,1.95,.95,3.33,495
+2,12.42,1.61,2.19,22.5,108,2,2.09,.34,1.61,2.06,1.06,2.96,345
+2,12.77,3.43,1.98,16,80,1.63,1.25,.43,.83,3.4,.7,2.12,372
+2,12,3.43,2,19,87,2,1.64,.37,1.87,1.28,.93,3.05,564
+2,11.45,2.4,2.42,20,96,2.9,2.79,.32,1.83,3.25,.8,3.39,625
+2,11.56,2.05,3.23,28.5,119,3.18,5.08,.47,1.87,6,.93,3.69,465
+2,12.42,4.43,2.73,26.5,102,2.2,2.13,.43,1.71,2.08,.92,3.12,365
+2,13.05,5.8,2.13,21.5,86,2.62,2.65,.3,2.01,2.6,.73,3.1,380
+2,11.87,4.31,2.39,21,82,2.86,3.03,.21,2.91,2.8,.75,3.64,380
+2,12.07,2.16,2.17,21,85,2.6,2.65,.37,1.35,2.76,.86,3.28,378
+2,12.43,1.53,2.29,21.5,86,2.74,3.15,.39,1.77,3.94,.69,2.84,352
+2,11.79,2.13,2.78,28.5,92,2.13,2.24,.58,1.76,3,.97,2.44,466
+2,12.37,1.63,2.3,24.5,88,2.22,2.45,.4,1.9,2.12,.89,2.78,342
+2,12.04,4.3,2.38,22,80,2.1,1.75,.42,1.35,2.6,.79,2.57,580
+3,12.86,1.35,2.32,18,122,1.51,1.25,.21,.94,4.1,.76,1.29,630
+3,12.88,2.99,2.4,20,104,1.3,1.22,.24,.83,5.4,.74,1.42,530
+3,12.81,2.31,2.4,24,98,1.15,1.09,.27,.83,5.7,.66,1.36,560
+3,12.7,3.55,2.36,21.5,106,1.7,1.2,.17,.84,5,.78,1.29,600
+3,12.51,1.24,2.25,17.5,85,2,.58,.6,1.25,5.45,.75,1.51,650
+3,12.6,2.46,2.2,18.5,94,1.62,.66,.63,.94,7.1,.73,1.58,695
+3,12.25,4.72,2.54,21,89,1.38,.47,.53,.8,3.85,.75,1.27,720
+3,12.53,5.51,2.64,25,96,1.79,.6,.63,1.1,5,.82,1.69,515
+3,13.49,3.59,2.19,19.5,88,1.62,.48,.58,.88,5.7,.81,1.82,580
+3,12.84,2.96,2.61,24,101,2.32,.6,.53,.81,4.92,.89,2.15,590
+3,12.93,2.81,2.7,21,96,1.54,.5,.53,.75,4.6,.77,2.31,600
+3,13.36,2.56,2.35,20,89,1.4,.5,.37,.64,5.6,.7,2.47,780
+3,13.52,3.17,2.72,23.5,97,1.55,.52,.5,.55,4.35,.89,2.06,520
+3,13.62,4.95,2.35,20,92,2,.8,.47,1.02,4.4,.91,2.05,550
+3,12.25,3.88,2.2,18.5,112,1.38,.78,.29,1.14,8.21,.65,2,855
+3,13.16,3.57,2.15,21,102,1.5,.55,.43,1.3,4,.6,1.68,830
+3,13.88,5.04,2.23,20,80,.98,.34,.4,.68,4.9,.58,1.33,415
+3,12.87,4.61,2.48,21.5,86,1.7,.65,.47,.86,7.65,.54,1.86,625
+3,13.32,3.24,2.38,21.5,92,1.93,.76,.45,1.25,8.42,.55,1.62,650
+3,13.08,3.9,2.36,21.5,113,1.41,1.39,.34,1.14,9.40,.57,1.33,550
+3,13.5,3.12,2.62,24,123,1.4,1.57,.22,1.25,8.60,.59,1.3,500
+3,12.79,2.67,2.48,22,112,1.48,1.36,.24,1.26,10.8,.48,1.47,480
+3,13.11,1.9,2.75,25.5,116,2.2,1.28,.26,1.56,7.1,.61,1.33,425
+3,13.23,3.3,2.28,18.5,98,1.8,.83,.61,1.87,10.52,.56,1.51,675
+3,12.58,1.29,2.1,20,103,1.48,.58,.53,1.4,7.6,.58,1.55,640
+3,13.17,5.19,2.32,22,93,1.74,.63,.61,1.55,7.9,.6,1.48,725
+3,13.84,4.12,2.38,19.5,89,1.8,.83,.48,1.56,9.01,.57,1.64,480
+3,12.45,3.03,2.64,27,97,1.9,.58,.63,1.14,7.5,.67,1.73,880
+3,14.34,1.68,2.7,25,98,2.8,1.31,.53,2.7,13,.57,1.96,660
+3,13.48,1.67,2.64,22.5,89,2.6,1.1,.52,2.29,11.75,.57,1.78,620
+3,12.36,3.83,2.38,21,88,2.3,.92,.5,1.04,7.65,.56,1.58,520
+3,13.69,3.26,2.54,20,107,1.83,.56,.5,.8,5.88,.96,1.82,680
+3,12.85,3.27,2.58,22,106,1.65,.6,.6,.96,5.58,.87,2.11,570
+3,12.96,3.45,2.35,18.5,106,1.39,.7,.4,.94,5.28,.68,1.75,675
+3,13.78,2.76,2.3,22,90,1.35,.68,.41,1.03,9.58,.7,1.68,615
+3,13.73,4.36,2.26,22.5,88,1.28,.47,.52,1.15,6.62,.78,1.75,520
+3,13.45,3.7,2.6,23,111,1.7,.92,.43,1.46,10.68,.85,1.56,695
+3,12.82,3.37,2.3,19.5,88,1.48,.66,.4,.97,10.26,.72,1.75,685
+3,13.58,2.58,2.69,24.5,105,1.55,.84,.39,1.54,8.66,.74,1.8,750
+3,13.4,4.6,2.86,25,112,1.98,.96,.27,1.11,8.5,.67,1.92,630
+3,12.2,3.03,2.32,19,96,1.25,.49,.4,.73,5.5,.66,1.83,510
+3,12.77,2.39,2.28,19.5,86,1.39,.51,.48,.64,9.899999,.57,1.63,470
+3,14.16,2.51,2.48,20,91,1.68,.7,.44,1.24,9.7,.62,1.71,660
+3,13.71,5.65,2.45,20.5,95,1.68,.61,.52,1.06,7.7,.64,1.74,740
+3,13.4,3.91,2.48,23,102,1.8,.75,.43,1.41,7.3,.7,1.56,750
+3,13.27,4.28,2.26,20,120,1.59,.69,.43,1.35,10.2,.59,1.56,835
+3,13.17,2.59,2.37,20,120,1.65,.68,.53,1.46,9.3,.6,1.62,840
+3,14.13,4.1,2.74,24.5,96,2.05,.76,.56,1.35,9.2,.61,1.6,560


[04/37] ignite git commit: IGNITE-10049: MVCC: Create "Cache 4" test suite for MVCC mode. This closes #5499.

Posted by ak...@apache.org.
IGNITE-10049: MVCC: Create "Cache 4" test suite for MVCC mode. This closes #5499.


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

Branch: refs/heads/ignite-10189
Commit: cf32fc7baccea641f11a691f4897d564387b7fc8
Parents: ee5a8f3
Author: rkondakov <ko...@mail.ru>
Authored: Wed Dec 5 15:54:44 2018 +0300
Committer: Igor Seliverstov <gv...@gmail.com>
Committed: Wed Dec 5 15:54:44 2018 +0300

----------------------------------------------------------------------
 ...RWThroughDisabledTransactionalCacheTest.java |   8 +
 ...heStoreSessionListenerLifecycleSelfTest.java |   8 +
 ...reSessionListenerWriteBehindEnabledTest.java |   8 +
 .../CacheJdbcStoreSessionListenerSelfTest.java  |   8 +
 .../GridCacheTxLoadFromStoreOnLockSelfTest.java |   8 +
 .../cache/CacheClientStoreSelfTest.java         |   8 +
 .../cache/CacheConnectionLeakStoreTxTest.java   |  20 +
 .../cache/CacheEventWithTxLabelTest.java        | 494 +++++++++++++++++++
 .../cache/CacheGetEntryAbstractTest.java        |   4 +-
 ...GetEntryOptimisticReadCommittedSelfTest.java |  36 ++
 ...GetEntryOptimisticReadCommittedSeltTest.java |  36 --
 ...etEntryOptimisticRepeatableReadSelfTest.java |  36 ++
 ...etEntryOptimisticRepeatableReadSeltTest.java |  36 --
 ...eGetEntryOptimisticSerializableSelfTest.java |  36 ++
 ...eGetEntryOptimisticSerializableSeltTest.java |  36 --
 ...etEntryPessimisticReadCommittedSelfTest.java |  36 ++
 ...etEntryPessimisticReadCommittedSeltTest.java |  36 --
 ...tEntryPessimisticRepeatableReadSelfTest.java | 105 ++++
 ...tEntryPessimisticRepeatableReadSeltTest.java |  40 --
 ...GetEntryPessimisticSerializableSelfTest.java |  36 ++
 ...GetEntryPessimisticSerializableSeltTest.java |  36 --
 .../cache/CacheOffheapMapEntrySelfTest.java     |  14 +
 .../CacheReadThroughLocalRestartSelfTest.java   |   8 +
 .../cache/CacheReadThroughRestartSelfTest.java  |  11 +
 .../cache/CacheRemoveAllSelfTest.java           |   9 +
 .../cache/CacheStopAndDestroySelfTest.java      |  18 +
 ...heStoreUsageMultinodeDynamicStartTxTest.java |   8 +
 ...cheStoreUsageMultinodeStaticStartTxTest.java |   8 +
 .../CacheTxNotAllowReadFromBackupTest.java      |  66 +++
 .../cache/CashEventWithTxLabelTest.java         | 487 ------------------
 .../processors/cache/CrossCacheLockTest.java    |   8 +
 .../cache/GridCacheAbstractSelfTest.java        |   4 +-
 .../GridCacheMarshallingNodeJoinSelfTest.java   |   8 +
 ...ridCacheMultinodeUpdateAbstractSelfTest.java |  17 +-
 ...inodeUpdateNearEnabledNoBackupsSelfTest.java |   6 +-
 ...CacheMultinodeUpdateNearEnabledSelfTest.java |  13 +-
 ...ridCacheStoreManagerDeserializationTest.java |  10 +-
 .../cache/GridCacheVersionMultinodeTest.java    |  35 +-
 ...iteCacheInvokeReadThroughSingleNodeTest.java |  46 ++
 .../cache/IgniteCacheInvokeReadThroughTest.java |  55 +++
 .../IgniteCacheReadThroughStoreCallTest.java    |   8 +
 .../IgniteCacheTxCopyOnReadDisabledTest.java    |   7 +
 .../cache/IgniteCacheTxLocalPeekModesTest.java  |   8 +
 .../cache/IgniteCacheTxLocalStoreValueTest.java |   8 +
 .../IgniteCacheTxNearEnabledStoreValueTest.java |   8 +
 .../cache/IgniteCacheTxNearPeekModesTest.java   |   9 +
 .../cache/IgniteCacheTxPeekModesTest.java       |   9 +-
 .../cache/IgniteCacheTxStoreValueTest.java      |   8 +
 ...IgniteClientCacheInitializationFailTest.java |  37 +-
 .../cache/IgniteDynamicCacheFilterTest.java     |   2 +
 ...ynamicCacheStartCoordinatorFailoverTest.java |   3 +
 ...eDynamicCacheStartNoExchangeTimeoutTest.java |  36 +-
 .../cache/IgniteDynamicCacheStartSelfTest.java  |  14 +
 ...niteDynamicCacheWithConfigStartSelfTest.java |   2 +
 .../IgniteDynamicClientCacheStartSelfTest.java  |   8 +-
 .../IgniteStartCacheInTransactionSelfTest.java  |   3 +
 .../distributed/CacheAffinityEarlyTest.java     |   2 +-
 .../distributed/CacheGroupsPreloadTest.java     |  44 ++
 .../cache/distributed/CacheStartOnJoinTest.java |  14 +-
 .../IgniteCacheCreatePutMultiNodeSelfTest.java  |  17 +-
 .../distributed/IgniteCacheCreatePutTest.java   |  11 +
 .../IgniteCacheFailedUpdateResponseTest.java    |  41 +-
 .../IgniteCacheReadFromBackupTest.java          |  89 +++-
 .../IgniteCacheSingleGetMessageTest.java        |  33 +-
 .../IgniteTxPreloadAbstractTest.java            |  10 +-
 .../dht/IgniteCacheLockFailoverSelfTest.java    |   8 +
 .../dht/IgniteCacheMultiTxLockSelfTest.java     |  24 +-
 .../dht/IgniteCrossCacheMvccTxSelfTest.java     |  39 ++
 .../dht/IgniteCrossCacheTxAbstractSelfTest.java | 181 +++++++
 .../dht/IgniteCrossCacheTxSelfTest.java         | 155 +-----
 .../near/GridCacheNearTxPreloadSelfTest.java    |   8 +
 .../near/GridCachePartitionedEventSelfTest.java |   8 +
 .../near/IgniteCacheNearOnlyTxTest.java         |   8 +
 .../near/IgniteCacheNearReadCommittedTest.java  |   8 +
 .../IgniteCacheLoadAllAbstractTest.java         |  10 +-
 .../IgniteCacheTxLoaderWriterTest.java          |   8 +
 .../IgniteCacheTxLocalLoadAllTest.java          |   7 +
 ...niteCacheTxLocalNoLoadPreviousValueTest.java |   8 +
 .../IgniteCacheTxLocalNoReadThroughTest.java    |   8 +
 .../IgniteCacheTxLocalNoWriteThroughTest.java   |   8 +
 ...cheTxNearEnabledNoLoadPreviousValueTest.java |   8 +
 ...iteCacheTxNearEnabledNoWriteThroughTest.java |   8 +
 .../IgniteCacheTxNoLoadPreviousValueTest.java   |   8 +
 .../IgniteCacheTxNoReadThroughTest.java         |   8 +
 .../IgniteCacheTxNoWriteThroughTest.java        |   8 +
 .../IgniteCacheTxStoreSessionTest.java          |   8 +
 ...TxStoreSessionWriteBehindCoalescingTest.java |   8 +
 ...gniteCacheTxStoreSessionWriteBehindTest.java |   8 +
 ...ersionedEntryLocalTransactionalSelfTest.java |   9 +
 .../testframework/MvccFeatureChecker.java       |  20 +
 .../testsuites/IgniteCacheMvccTestSuite2.java   |   1 +
 .../testsuites/IgniteCacheMvccTestSuite4.java   | 197 ++++++++
 .../testsuites/IgniteCacheTestSuite4.java       | 356 ++++++-------
 93 files changed, 2396 insertions(+), 1072 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreListenerRWThroughDisabledTransactionalCacheTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreListenerRWThroughDisabledTransactionalCacheTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreListenerRWThroughDisabledTransactionalCacheTest.java
index 4503815..faf30b7 100644
--- a/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreListenerRWThroughDisabledTransactionalCacheTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreListenerRWThroughDisabledTransactionalCacheTest.java
@@ -20,6 +20,7 @@ package org.apache.ignite.cache.store;
 import java.util.Random;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.cache.CacheAtomicityMode;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 import org.apache.ignite.transactions.Transaction;
 import org.apache.ignite.transactions.TransactionConcurrency;
 import org.apache.ignite.transactions.TransactionIsolation;
@@ -37,6 +38,13 @@ import static org.apache.ignite.transactions.TransactionIsolation.SERIALIZABLE;
  */
 public class CacheStoreListenerRWThroughDisabledTransactionalCacheTest extends CacheStoreSessionListenerReadWriteThroughDisabledAbstractTest {
     /** {@inheritDoc} */
+    @Override public void setUp() throws Exception {
+        MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE);
+
+        super.setUp();
+    }
+
+    /** {@inheritDoc} */
     @Override protected CacheAtomicityMode atomicityMode() {
         return TRANSACTIONAL;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerLifecycleSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerLifecycleSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerLifecycleSelfTest.java
index ff176c5..9bc3cdc 100644
--- a/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerLifecycleSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerLifecycleSelfTest.java
@@ -34,6 +34,7 @@ import org.apache.ignite.resources.IgniteInstanceResource;
 import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.apache.ignite.transactions.Transaction;
 
@@ -50,6 +51,13 @@ public class CacheStoreSessionListenerLifecycleSelfTest extends GridCommonAbstra
     private static final Queue<String> evts = new ConcurrentLinkedDeque<>();
 
     /** {@inheritDoc} */
+    @Override public void setUp() throws Exception {
+        MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE);
+
+        super.setUp();
+    }
+
+    /** {@inheritDoc} */
     @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
         IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerWriteBehindEnabledTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerWriteBehindEnabledTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerWriteBehindEnabledTest.java
index 9314dbb..3ba4ec2 100644
--- a/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerWriteBehindEnabledTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerWriteBehindEnabledTest.java
@@ -44,6 +44,7 @@ import org.apache.ignite.internal.processors.cache.GridCacheAbstractSelfTest;
 import org.apache.ignite.internal.processors.cache.store.GridCacheWriteBehindStore;
 import org.apache.ignite.resources.CacheStoreSessionResource;
 import org.apache.ignite.testframework.GridTestUtils;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 
 /**
  * This class tests that calls of {@link CacheStoreSessionListener#onSessionStart(CacheStoreSession)}
@@ -67,6 +68,13 @@ public class CacheStoreSessionListenerWriteBehindEnabledTest extends GridCacheAb
     private static final AtomicInteger uninitializedListenerCnt = new AtomicInteger();
 
     /** {@inheritDoc} */
+    @Override public void setUp() throws Exception {
+        MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE);
+
+        super.setUp();
+    }
+
+    /** {@inheritDoc} */
     @Override protected int gridCount() {
         return 1;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcStoreSessionListenerSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcStoreSessionListenerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcStoreSessionListenerSelfTest.java
index 237cfeb..968dc08 100644
--- a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcStoreSessionListenerSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcStoreSessionListenerSelfTest.java
@@ -32,6 +32,7 @@ import org.apache.ignite.cache.store.CacheStoreSessionListener;
 import org.apache.ignite.cache.store.CacheStoreSessionListenerAbstractSelfTest;
 import org.apache.ignite.lang.IgniteBiInClosure;
 import org.apache.ignite.resources.CacheStoreSessionResource;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 import org.h2.jdbcx.JdbcConnectionPool;
 
 /**
@@ -39,6 +40,13 @@ import org.h2.jdbcx.JdbcConnectionPool;
  */
 public class CacheJdbcStoreSessionListenerSelfTest extends CacheStoreSessionListenerAbstractSelfTest {
     /** {@inheritDoc} */
+    @Override public void setUp() throws Exception {
+        MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE);
+
+        super.setUp();
+    }
+
+    /** {@inheritDoc} */
     @Override protected Factory<? extends CacheStore<Integer, Integer>> storeFactory() {
         return new Factory<CacheStore<Integer, Integer>>() {
             @Override public CacheStore<Integer, Integer> create() {

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/GridCacheTxLoadFromStoreOnLockSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/GridCacheTxLoadFromStoreOnLockSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/GridCacheTxLoadFromStoreOnLockSelfTest.java
index 6293723..a1f18a7 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/GridCacheTxLoadFromStoreOnLockSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/GridCacheTxLoadFromStoreOnLockSelfTest.java
@@ -33,6 +33,7 @@ import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.apache.ignite.transactions.Transaction;
 import org.apache.ignite.transactions.TransactionConcurrency;
@@ -46,6 +47,13 @@ public class GridCacheTxLoadFromStoreOnLockSelfTest extends GridCommonAbstractTe
     private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
 
     /** {@inheritDoc} */
+    @Override public void setUp() throws Exception {
+        MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE);
+
+        super.setUp();
+    }
+
+    /** {@inheritDoc} */
     @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
         IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheClientStoreSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheClientStoreSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheClientStoreSelfTest.java
index 8703791..ecf9d2e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheClientStoreSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheClientStoreSelfTest.java
@@ -40,6 +40,7 @@ import org.apache.ignite.resources.IgniteInstanceResource;
 import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 
 import static org.apache.ignite.IgniteSystemProperties.IGNITE_SKIP_CONFIGURATION_CONSISTENCY_CHECK;
@@ -67,6 +68,13 @@ public class CacheClientStoreSelfTest extends GridCommonAbstractTest {
     private static volatile boolean loadedFromClient;
 
     /** {@inheritDoc} */
+    @Override public void setUp() throws Exception {
+        MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE);
+
+        super.setUp();
+    }
+
+    /** {@inheritDoc} */
     @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
         IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheConnectionLeakStoreTxTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheConnectionLeakStoreTxTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheConnectionLeakStoreTxTest.java
index 27dbe62..db08d53 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheConnectionLeakStoreTxTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheConnectionLeakStoreTxTest.java
@@ -170,6 +170,26 @@ public class CacheConnectionLeakStoreTxTest extends GridCommonAbstractTest {
     }
 
     /**
+     * @throws Exception If failed.
+     */
+    public void testConnectionLeakOneBackupMvccPessimisticRepeatableRead() throws Exception {
+        fail("https://issues.apache.org/jira/browse/IGNITE-8582");
+
+        checkConnectionLeak(CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT, PESSIMISTIC, REPEATABLE_READ);
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testConnectionLeakOneBackupMvccPessimisticRepeatableReadLoadFromStore() throws Exception {
+        fail("https://issues.apache.org/jira/browse/IGNITE-8582");
+
+        isLoadFromStore = true;
+
+        checkConnectionLeak(CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT, PESSIMISTIC, REPEATABLE_READ);
+    }
+
+    /**
      * @param atomicityMode Atomicity mode.
      * @param txConcurrency Transaction concurrency.
      * @param txIsolation Transaction isolation.

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheEventWithTxLabelTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheEventWithTxLabelTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheEventWithTxLabelTest.java
new file mode 100644
index 0000000..dabf0db
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheEventWithTxLabelTest.java
@@ -0,0 +1,494 @@
+/*
+ * 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 java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.function.Consumer;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+import java.util.stream.IntStream;
+import org.apache.ignite.Ignite;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.cache.CacheAtomicityMode;
+import org.apache.ignite.cache.CacheEntryProcessor;
+import org.apache.ignite.cache.CacheMode;
+import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.events.CacheEvent;
+import org.apache.ignite.events.Event;
+import org.apache.ignite.internal.IgniteKernal;
+import org.apache.ignite.internal.util.lang.IgnitePair;
+import org.apache.ignite.lang.IgnitePredicate;
+import org.apache.ignite.testframework.MvccFeatureChecker;
+import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.apache.ignite.transactions.Transaction;
+import org.apache.ignite.transactions.TransactionConcurrency;
+import org.apache.ignite.transactions.TransactionIsolation;
+import org.junit.Assert;
+
+import static org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_PUT;
+import static org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_READ;
+import static org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_REMOVED;
+
+/**
+ * Test to check passing transaction's label for EVT_CACHE_OBJECT_READ, EVT_CACHE_OBJECT_PUT,
+ * EVT_CACHE_OBJECT_REMOVED events.
+ */
+public class CacheEventWithTxLabelTest extends GridCommonAbstractTest {
+    /** Types event to be checked. */
+    private static final int[] CACHE_EVENT_TYPES = {EVT_CACHE_OBJECT_READ, EVT_CACHE_OBJECT_PUT, EVT_CACHE_OBJECT_REMOVED};
+
+    /** Transaction label. */
+    private static final String TX_LABEL = "TX_LABEL";
+
+    /** Number of server nodes. */
+    private static final int SRVS = 3;
+
+    /** Number of client nodes. */
+    private static final int CLIENTS = 1;
+
+    /** Cache name. */
+    public static final String CACHE_NAME = "cache";
+
+    /** Client or server mode to start Ignite instance. */
+    private static boolean client;
+
+    /** Key related to primary node. */
+    private Integer primaryKey = 0;
+
+    /** Key related to backup node. */
+    private Integer backupKey = 0;
+
+    /** Current cash backup count. */
+    private int backupCnt;
+
+    /** Current transaction isolation level. */
+    private TransactionIsolation isolation;
+
+    /** Current transaction concurrency level. */
+    private TransactionConcurrency concurrency;
+
+    /** All failed tests information, */
+    private ArrayList<String> errors = new ArrayList<>();
+
+    /** Count of errors on previous iteration of testing. */
+    private int prevErrCnt = 0;
+
+    /** List to keep all events with no tx label between run tests */
+    private static List<CacheEvent> wrongEvts = Collections.synchronizedList(new ArrayList<>());
+
+    /** Simple entry processor to use for tests */
+    private static CacheEntryProcessor entryProcessor = (CacheEntryProcessor)(entry, objects) -> entry.getValue();
+
+    /** {@inheritDoc} */
+    @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
+        return super.getConfiguration(igniteInstanceName).setClientMode(client);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void beforeTestsStarted() throws Exception {
+        if (MvccFeatureChecker.forcedMvcc())
+            fail("https://issues.apache.org/jira/browse/IGNITE-10270");
+
+        super.beforeTestsStarted();
+
+        client = false;
+
+        startGridsMultiThreaded(SRVS);
+
+        client = true;
+
+        startGridsMultiThreaded(SRVS, CLIENTS);
+
+        client = false;
+
+        waitForDiscovery(primary(), backup1(), backup2(), client());
+
+        registerEventListeners(primary(), backup1(), backup2(), client());
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void afterTestsStopped() throws Exception {
+        super.afterTestsStopped();
+
+        stopAllGrids();
+    }
+
+    /**
+     * Check all cases for passing transaction label in cash event.
+     *
+     * @throws Exception If failed.
+     */
+    public void testPassTxLabelInCashEventForAllCases() throws Exception {
+        Ignite[] nodes = {client(), primary(), backup1(), backup2()};
+
+        for (int backupCnt = 0; backupCnt < SRVS; backupCnt++) {
+            this.backupCnt = backupCnt;
+
+            prepareCache(backupCnt);
+
+            for (TransactionIsolation isolation : TransactionIsolation.values()) {
+                this.isolation = isolation;
+
+                for (TransactionConcurrency concurrency : TransactionConcurrency.values()) {
+                    this.concurrency = concurrency;
+
+                    if (MvccFeatureChecker.forcedMvcc() && !MvccFeatureChecker.isSupported(concurrency, isolation))
+                        continue;
+
+                    for (int i = 0; i < nodes.length - 1; i++) {
+                        Ignite nodeForPut = nodes[i];
+                        Ignite nodeForGet = nodes[i + 1];
+
+                        singleWriteReadRemoveTest(nodeForPut, nodeForGet);
+
+                        multiWriteReadRemoveTest(nodeForPut, nodeForGet);
+
+                        singleNodeBatchWriteReadRemoveTest(nodeForPut, nodeForGet);
+
+                        multiNodeBatchWriteReadRemoveTest(nodeForPut, nodeForGet);
+
+                        writeInvokeRemoveTest(nodeForPut, nodeForGet);
+
+                        writeInvokeAllRemoveTest(nodeForPut, nodeForGet);
+                    }
+                }
+            }
+        }
+
+        String listOfFailedTests = String.join(",\n", errors);
+
+        Assert.assertTrue("Have been received " + prevErrCnt + " cache events with incorrect txlabel.\n" +
+                "Failed tests:" + listOfFailedTests,
+            errors.isEmpty());
+    }
+
+    /**
+     * Check error after run test. In case error occured information about failed test will be added to errors list.
+     *
+     * @param testName Name of test which result will be checked.
+     * @param node1 First node
+     * @param node2 Second node
+     */
+    private void checkResult(String testName, Ignite node1, Ignite node2) {
+        int currErrCnt = wrongEvts.size();
+
+        if (prevErrCnt != currErrCnt) {
+            prevErrCnt = currErrCnt;
+
+            errors.add(String.format("%s backCnt-%s, %s, %s, node1-%s, node2-%s",
+                testName, backupCnt, isolation, concurrency, nodeType(node1), nodeType(node2)));
+        }
+    }
+
+    /**
+     * @param node Ignite node
+     * @return Node type in the test
+     */
+    private String nodeType(Ignite node) {
+        if (client().equals(node))
+            return "CLIENT";
+        else if (primary().equals(node))
+            return "PRIMARY";
+        else if (backup1().equals(node))
+            return "BACKUP1";
+        else if (backup2().equals(node))
+            return "BACKUP2";
+        else
+            return "UNKNOWN";
+    }
+
+    /**
+     * Test single put, get, remove operations.
+     *
+     * @param instanceToPut Ignite instance to put test data.
+     * @param instanceToGet Ignite instance to get test data.
+     */
+    private void singleWriteReadRemoveTest(Ignite instanceToPut, Ignite instanceToGet) {
+        runTransactionally(instanceToPut, (Ignite ign) -> {
+            ign.cache(CACHE_NAME).put(primaryKey, 3);
+        });
+
+        runTransactionally(instanceToGet, (Ignite ign) -> {
+            ign.cache(CACHE_NAME).get(primaryKey);
+        });
+
+        runTransactionally(instanceToGet, (Ignite ign) -> {
+            ign.cache(CACHE_NAME).remove(primaryKey);
+        });
+
+        checkResult("singleWriteReadRemoveTest", instanceToPut, instanceToGet);
+    }
+
+    /**
+     * Test multi put, get, remove operations
+     *
+     * @param instanceToPut Ignite instance to put test data.
+     * @param instanceToGet Ignite instance to get test data.
+     */
+    private void multiWriteReadRemoveTest(Ignite instanceToPut, Ignite instanceToGet) {
+        runTransactionally(instanceToPut, (Ignite ign) -> {
+            ign.cache(CACHE_NAME).put(primaryKey, 2);
+            ign.cache(CACHE_NAME).put(backupKey, 3);
+        });
+
+        runTransactionally(instanceToGet, (Ignite ign) -> {
+            ign.cache(CACHE_NAME).get(primaryKey);
+            ign.cache(CACHE_NAME).get(backupKey);
+        });
+
+        runTransactionally(instanceToGet, (Ignite ign) -> {
+            ign.cache(CACHE_NAME).remove(primaryKey);
+            ign.cache(CACHE_NAME).remove(backupKey);
+        });
+
+        checkResult("multiWriteReadRemoveTest", instanceToPut, instanceToGet);
+    }
+
+    /**
+     * Test multi nodes batch write-read
+     *
+     * @param instanceToPut Ignite instance to put test data.
+     * @param instanceToGet Ignite instance to get test data.
+     */
+    private void multiNodeBatchWriteReadRemoveTest(Ignite instanceToPut, Ignite instanceToGet) {
+        Map<Integer, Integer> keyValuesMap = IntStream.range(0, 100).boxed()
+            .collect(Collectors.toMap(Function.identity(), Function.identity()));
+
+        runTransactionally(instanceToPut, (Ignite ign) -> {
+            ign.cache(CACHE_NAME).putAll(keyValuesMap);
+        });
+
+        runTransactionally(instanceToGet, (Ignite ign) -> {
+            ign.cache(CACHE_NAME).getAll(keyValuesMap.keySet());
+        });
+
+        runTransactionally(instanceToGet, (Ignite ign) -> {
+            ign.cache(CACHE_NAME).removeAll(keyValuesMap.keySet());
+        });
+
+        checkResult("multiNodeBatchWriteReadRemoveTest", instanceToPut, instanceToGet);
+    }
+
+    /**
+     * Test single node batch write-read-remove
+     *
+     * @param instanceToPut Ignite instance to put test data.
+     * @param instanceToGet Ignite instance to get test data.
+     */
+    private void singleNodeBatchWriteReadRemoveTest(Ignite instanceToPut, Ignite instanceToGet) {
+        IgnitePair<Integer> keys = evaluatePrimaryAndBackupKeys(primaryKey + 1, backupKey + 1);
+
+        Map<Integer, Integer> keyValuesMap = new HashMap<>();
+        keyValuesMap.put(primaryKey, 1);
+        keyValuesMap.put(keys.get1(), 2);
+
+        runTransactionally(instanceToPut, (Ignite ign) -> {
+            ign.cache(CACHE_NAME).putAll(keyValuesMap);
+        });
+
+        runTransactionally(instanceToGet, (Ignite ign) -> {
+            ign.cache(CACHE_NAME).getAll(keyValuesMap.keySet());
+        });
+
+        runTransactionally(instanceToGet, (Ignite ign) -> {
+            ign.cache(CACHE_NAME).removeAll(keyValuesMap.keySet());
+        });
+
+        checkResult("oneNodeBatchWriteReadRemoveTest", instanceToPut, instanceToGet);
+    }
+
+    /**
+     * Test put-invoke-remove
+     *
+     * @param instanceToPut Ignite instance to put test data.
+     * @param instanceToGet Ignite instance to get test data.
+     */
+    @SuppressWarnings("unchecked")
+    private void writeInvokeRemoveTest(Ignite instanceToPut, Ignite instanceToGet) {
+        runTransactionally(instanceToGet, (Ignite ign) -> {
+            ign.cache(CACHE_NAME).put(primaryKey, 3);
+        });
+
+        runTransactionally(instanceToPut, (Ignite ign) -> {
+            ign.cache(CACHE_NAME).invoke(primaryKey, entryProcessor);
+            ign.cache(CACHE_NAME).invoke(backupKey, entryProcessor);
+        });
+
+        runTransactionally(instanceToGet, (Ignite ign) -> {
+            ign.cache(CACHE_NAME).remove(primaryKey);
+        });
+
+        checkResult("writeInvokeRemoveTest", instanceToPut, instanceToGet);
+    }
+
+    /**
+     * Test putAll-invokeAll-removeAll
+     *
+     * @param instanceToPut Ignite instance to put test data.
+     * @param instanceToGet Ignite instance to get test data.
+     */
+    @SuppressWarnings("unchecked")
+    private void writeInvokeAllRemoveTest(Ignite instanceToPut, Ignite instanceToGet) {
+        Map<Integer, Integer> keyValuesMap = IntStream.range(0, 100).boxed()
+            .collect(Collectors.toMap(Function.identity(), Function.identity()));
+
+        runTransactionally(instanceToGet, (Ignite ign) -> {
+            ign.cache(CACHE_NAME).putAll(keyValuesMap);
+        });
+
+        runTransactionally(instanceToPut, (Ignite ign) -> {
+            ign.cache(CACHE_NAME).invokeAll(keyValuesMap.keySet(), entryProcessor);
+        });
+
+        runTransactionally(instanceToGet, (Ignite ign) -> {
+            ign.cache(CACHE_NAME).removeAll(keyValuesMap.keySet());
+        });
+
+        checkResult("WriteInvokeAllRemoveTest", instanceToPut, instanceToGet);
+    }
+
+    /**
+     * Run command in transaction.
+     *
+     * @param startNode Ignite node to start transaction and run passed command.
+     * @param cmdInTx Command which should be done in transaction.
+     */
+    private void runTransactionally(Ignite startNode, Consumer<Ignite> cmdInTx) {
+        try (Transaction tx = startNode.transactions().withLabel(TX_LABEL).txStart(concurrency, isolation)) {
+            cmdInTx.accept(startNode);
+
+            tx.commit();
+        }
+    }
+
+    /**
+     * Add event listener to passed Ignite instances for cache event types.
+     *
+     * @param igns Ignite instances.
+     */
+    private void registerEventListeners(Ignite... igns) {
+        if (igns != null) {
+            for (Ignite ign : igns) {
+                ign.events().enableLocal(CACHE_EVENT_TYPES);
+                ign.events().localListen((IgnitePredicate<Event>)event -> {
+                    CacheEvent cacheEvt = (CacheEvent)event;
+
+                    if (!TX_LABEL.equals(cacheEvt.txLabel())) {
+                        log.error("Has been received event with incorrect label " + cacheEvt.txLabel() + " ," +
+                            " expected " + TX_LABEL + " label");
+
+                        wrongEvts.add(cacheEvt);
+                    }
+
+                    return true;
+                }, CACHE_EVENT_TYPES);
+            }
+        }
+    }
+
+    /**
+     * Create cache with passed number of backups and determinate primary and backup keys. If cache was created before
+     * it will be removed before create new one.
+     *
+     * @param cacheBackups Number of backups for cache.
+     * @throws InterruptedException In case of fail.
+     */
+    private void prepareCache(int cacheBackups) throws InterruptedException {
+        IgniteCache<Object, Object> cache = client().cache(CACHE_NAME);
+
+        if (cache != null)
+            cache.destroy();
+
+        client().createCache(
+            new CacheConfiguration<Integer, Integer>()
+                .setName(CACHE_NAME)
+                .setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL)
+                .setCacheMode(CacheMode.PARTITIONED)
+                .setBackups(cacheBackups)
+        );
+
+        awaitPartitionMapExchange();
+
+        IgnitePair<Integer> keys = evaluatePrimaryAndBackupKeys(0, 0);
+
+        primaryKey = keys.get1();
+        backupKey = keys.get2();
+    }
+
+    /**
+     * Evaluate primary and backup keys.
+     *
+     * @param primaryKeyStart Value from need to start calculate primary key.
+     * @param backupKeyStart Value from need to start calculate backup key.
+     * @return Pair of result. The first result is found primary key. The second is found backup key.
+     */
+    private IgnitePair<Integer> evaluatePrimaryAndBackupKeys(final int primaryKeyStart, final int backupKeyStart) {
+        int primaryKey = primaryKeyStart;
+        int backupKey = backupKeyStart;
+
+        while (!client().affinity(CACHE_NAME).isPrimary(((IgniteKernal)primary()).localNode(), primaryKey))
+            primaryKey++;
+
+        while (!client().affinity(CACHE_NAME).isBackup(((IgniteKernal)primary()).localNode(), backupKey)
+            && backupKey < 100 + backupKeyStart)
+            backupKey++;
+
+        return new IgnitePair<>(primaryKey, backupKey);
+    }
+
+    /**
+     * Return primary node.
+     *
+     * @return Primary node.
+     */
+    private Ignite primary() {
+        return ignite(0);
+    }
+
+    /**
+     * Return first backup node.
+     *
+     * @return First backup node.
+     */
+    private Ignite backup1() {
+        return ignite(1);
+    }
+
+    /**
+     * Return second backup node.
+     *
+     * @return Second backup node.
+     */
+    private Ignite backup2() {
+        return ignite(2);
+    }
+
+    /**
+     * Return client node.
+     *
+     * @return Client node.
+     */
+    private Ignite client() {
+        return ignite(3);
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryAbstractTest.java
index f347525..3e7b791 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryAbstractTest.java
@@ -170,8 +170,6 @@ public abstract class CacheGetEntryAbstractTest extends GridCacheAbstractSelfTes
      * @throws Exception If failed.
      */
     public void testLocalTransactional() throws Exception {
-        // TODO: fails since d13520e9a05bd9e9b987529472d6317951b72f96, need to review changes.
-
         CacheConfiguration cfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
 
         cfg.setWriteSynchronizationMode(FULL_SYNC);
@@ -214,7 +212,7 @@ public abstract class CacheGetEntryAbstractTest extends GridCacheAbstractSelfTes
      * @param cfg Cache configuration.
      * @throws Exception If failed.
      */
-    private void test(CacheConfiguration cfg) throws Exception {
+    protected void test(CacheConfiguration cfg) throws Exception {
         test(cfg, true);
 
         test(cfg, false);

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryOptimisticReadCommittedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryOptimisticReadCommittedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryOptimisticReadCommittedSelfTest.java
new file mode 100644
index 0000000..0927546
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryOptimisticReadCommittedSelfTest.java
@@ -0,0 +1,36 @@
+/*
+ * 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.transactions.TransactionConcurrency;
+import org.apache.ignite.transactions.TransactionIsolation;
+
+/**
+ * Test getEntry and getEntries methods.
+ */
+public class CacheGetEntryOptimisticReadCommittedSelfTest extends CacheGetEntryAbstractTest {
+    /** {@inheritDoc} */
+    @Override protected TransactionConcurrency concurrency() {
+        return TransactionConcurrency.OPTIMISTIC;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected TransactionIsolation isolation() {
+        return TransactionIsolation.READ_COMMITTED;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryOptimisticReadCommittedSeltTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryOptimisticReadCommittedSeltTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryOptimisticReadCommittedSeltTest.java
deleted file mode 100644
index c04612d..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryOptimisticReadCommittedSeltTest.java
+++ /dev/null
@@ -1,36 +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.transactions.TransactionConcurrency;
-import org.apache.ignite.transactions.TransactionIsolation;
-
-/**
- * Test getEntry and getEntries methods.
- */
-public class CacheGetEntryOptimisticReadCommittedSeltTest extends CacheGetEntryAbstractTest {
-    /** {@inheritDoc} */
-    @Override protected TransactionConcurrency concurrency() {
-        return TransactionConcurrency.OPTIMISTIC;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected TransactionIsolation isolation() {
-        return TransactionIsolation.READ_COMMITTED;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryOptimisticRepeatableReadSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryOptimisticRepeatableReadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryOptimisticRepeatableReadSelfTest.java
new file mode 100644
index 0000000..2c6a204
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryOptimisticRepeatableReadSelfTest.java
@@ -0,0 +1,36 @@
+/*
+ * 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.transactions.TransactionConcurrency;
+import org.apache.ignite.transactions.TransactionIsolation;
+
+/**
+ * Test getEntry and getEntries methods.
+ */
+public class CacheGetEntryOptimisticRepeatableReadSelfTest extends CacheGetEntryAbstractTest {
+    /** {@inheritDoc} */
+    @Override protected TransactionConcurrency concurrency() {
+        return TransactionConcurrency.OPTIMISTIC;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected TransactionIsolation isolation() {
+        return TransactionIsolation.REPEATABLE_READ;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryOptimisticRepeatableReadSeltTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryOptimisticRepeatableReadSeltTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryOptimisticRepeatableReadSeltTest.java
deleted file mode 100644
index 6153869..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryOptimisticRepeatableReadSeltTest.java
+++ /dev/null
@@ -1,36 +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.transactions.TransactionConcurrency;
-import org.apache.ignite.transactions.TransactionIsolation;
-
-/**
- * Test getEntry and getEntries methods.
- */
-public class CacheGetEntryOptimisticRepeatableReadSeltTest extends CacheGetEntryAbstractTest {
-    /** {@inheritDoc} */
-    @Override protected TransactionConcurrency concurrency() {
-        return TransactionConcurrency.OPTIMISTIC;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected TransactionIsolation isolation() {
-        return TransactionIsolation.REPEATABLE_READ;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryOptimisticSerializableSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryOptimisticSerializableSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryOptimisticSerializableSelfTest.java
new file mode 100644
index 0000000..63161e2
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryOptimisticSerializableSelfTest.java
@@ -0,0 +1,36 @@
+/*
+ * 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.transactions.TransactionConcurrency;
+import org.apache.ignite.transactions.TransactionIsolation;
+
+/**
+ * Test getEntry and getEntries methods.
+ */
+public class CacheGetEntryOptimisticSerializableSelfTest extends CacheGetEntryAbstractTest {
+    /** {@inheritDoc} */
+    @Override protected TransactionConcurrency concurrency() {
+        return TransactionConcurrency.OPTIMISTIC;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected TransactionIsolation isolation() {
+        return TransactionIsolation.SERIALIZABLE;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryOptimisticSerializableSeltTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryOptimisticSerializableSeltTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryOptimisticSerializableSeltTest.java
deleted file mode 100644
index 6ded4a9..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryOptimisticSerializableSeltTest.java
+++ /dev/null
@@ -1,36 +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.transactions.TransactionConcurrency;
-import org.apache.ignite.transactions.TransactionIsolation;
-
-/**
- * Test getEntry and getEntries methods.
- */
-public class CacheGetEntryOptimisticSerializableSeltTest extends CacheGetEntryAbstractTest {
-    /** {@inheritDoc} */
-    @Override protected TransactionConcurrency concurrency() {
-        return TransactionConcurrency.OPTIMISTIC;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected TransactionIsolation isolation() {
-        return TransactionIsolation.SERIALIZABLE;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryPessimisticReadCommittedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryPessimisticReadCommittedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryPessimisticReadCommittedSelfTest.java
new file mode 100644
index 0000000..0a291f7
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryPessimisticReadCommittedSelfTest.java
@@ -0,0 +1,36 @@
+/*
+ * 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.transactions.TransactionConcurrency;
+import org.apache.ignite.transactions.TransactionIsolation;
+
+/**
+ * Test getEntry and getEntries methods.
+ */
+public class CacheGetEntryPessimisticReadCommittedSelfTest extends CacheGetEntryAbstractTest {
+    /** {@inheritDoc} */
+    @Override protected TransactionConcurrency concurrency() {
+        return TransactionConcurrency.PESSIMISTIC;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected TransactionIsolation isolation() {
+        return TransactionIsolation.READ_COMMITTED;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryPessimisticReadCommittedSeltTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryPessimisticReadCommittedSeltTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryPessimisticReadCommittedSeltTest.java
deleted file mode 100644
index 975d271..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryPessimisticReadCommittedSeltTest.java
+++ /dev/null
@@ -1,36 +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.transactions.TransactionConcurrency;
-import org.apache.ignite.transactions.TransactionIsolation;
-
-/**
- * Test getEntry and getEntries methods.
- */
-public class CacheGetEntryPessimisticReadCommittedSeltTest extends CacheGetEntryAbstractTest {
-    /** {@inheritDoc} */
-    @Override protected TransactionConcurrency concurrency() {
-        return TransactionConcurrency.PESSIMISTIC;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected TransactionIsolation isolation() {
-        return TransactionIsolation.READ_COMMITTED;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryPessimisticRepeatableReadSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryPessimisticRepeatableReadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryPessimisticRepeatableReadSelfTest.java
new file mode 100644
index 0000000..906b726
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryPessimisticRepeatableReadSelfTest.java
@@ -0,0 +1,105 @@
+/*
+ * 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.configuration.CacheConfiguration;
+import org.apache.ignite.configuration.NearCacheConfiguration;
+import org.apache.ignite.transactions.TransactionConcurrency;
+import org.apache.ignite.transactions.TransactionIsolation;
+
+import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT;
+import static org.apache.ignite.cache.CacheMode.LOCAL;
+import static org.apache.ignite.cache.CacheMode.PARTITIONED;
+import static org.apache.ignite.cache.CacheMode.REPLICATED;
+import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
+
+/**
+ * Test getEntry and getEntries methods.
+ */
+public class CacheGetEntryPessimisticRepeatableReadSelfTest extends CacheGetEntryAbstractTest {
+    /** {@inheritDoc} */
+    @Override protected TransactionConcurrency concurrency() {
+        return TransactionConcurrency.PESSIMISTIC;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected TransactionIsolation isolation() {
+        return TransactionIsolation.REPEATABLE_READ;
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testNearTransactionalMvcc() throws Exception {
+        fail("https://issues.apache.org/jira/browse/IGNITE-7187");
+
+        CacheConfiguration cfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
+
+        cfg.setWriteSynchronizationMode(FULL_SYNC);
+        cfg.setCacheMode(PARTITIONED);
+        cfg.setAtomicityMode(TRANSACTIONAL_SNAPSHOT);
+        cfg.setName("nearT");
+        cfg.setNearConfiguration(new NearCacheConfiguration());
+
+        test(cfg);
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testPartitionedTransactionalMvcc() throws Exception {
+        CacheConfiguration cfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
+
+        cfg.setWriteSynchronizationMode(FULL_SYNC);
+        cfg.setCacheMode(PARTITIONED);
+        cfg.setAtomicityMode(TRANSACTIONAL_SNAPSHOT);
+        cfg.setName("partitionedT");
+
+        test(cfg);
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testLocalTransactionalMvcc() throws Exception {
+        fail("https://issues.apache.org/jira/browse/IGNITE-9530");
+
+        CacheConfiguration cfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
+
+        cfg.setWriteSynchronizationMode(FULL_SYNC);
+        cfg.setCacheMode(LOCAL);
+        cfg.setAtomicityMode(TRANSACTIONAL_SNAPSHOT);
+        cfg.setName("localT");
+
+        test(cfg);
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testReplicatedTransactionalMvcc() throws Exception {
+        CacheConfiguration cfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
+
+        cfg.setWriteSynchronizationMode(FULL_SYNC);
+        cfg.setCacheMode(REPLICATED);
+        cfg.setAtomicityMode(TRANSACTIONAL_SNAPSHOT);
+        cfg.setName("replicatedT");
+
+        test(cfg);
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryPessimisticRepeatableReadSeltTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryPessimisticRepeatableReadSeltTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryPessimisticRepeatableReadSeltTest.java
deleted file mode 100644
index 4aa693c..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryPessimisticRepeatableReadSeltTest.java
+++ /dev/null
@@ -1,40 +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.transactions.TransactionConcurrency;
-import org.apache.ignite.transactions.TransactionIsolation;
-
-/**
- * Test getEntry and getEntries methods.
- */
-public class CacheGetEntryPessimisticRepeatableReadSeltTest extends CacheGetEntryAbstractTest {
-    /** {@inheritDoc} */
-    @Override protected TransactionConcurrency concurrency() {
-        return TransactionConcurrency.PESSIMISTIC;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected TransactionIsolation isolation() {
-        return TransactionIsolation.REPEATABLE_READ;
-    }
-
-    @Override public void testReplicatedTransactional() throws Exception {
-        super.testReplicatedTransactional();
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryPessimisticSerializableSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryPessimisticSerializableSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryPessimisticSerializableSelfTest.java
new file mode 100644
index 0000000..dfaed7e
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryPessimisticSerializableSelfTest.java
@@ -0,0 +1,36 @@
+/*
+ * 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.transactions.TransactionConcurrency;
+import org.apache.ignite.transactions.TransactionIsolation;
+
+/**
+ * Test getEntry and getEntries methods.
+ */
+public class CacheGetEntryPessimisticSerializableSelfTest extends CacheGetEntryAbstractTest {
+    /** {@inheritDoc} */
+    @Override protected TransactionConcurrency concurrency() {
+        return TransactionConcurrency.PESSIMISTIC;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected TransactionIsolation isolation() {
+        return TransactionIsolation.SERIALIZABLE;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryPessimisticSerializableSeltTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryPessimisticSerializableSeltTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryPessimisticSerializableSeltTest.java
deleted file mode 100644
index 70f71ce..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryPessimisticSerializableSeltTest.java
+++ /dev/null
@@ -1,36 +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.transactions.TransactionConcurrency;
-import org.apache.ignite.transactions.TransactionIsolation;
-
-/**
- * Test getEntry and getEntries methods.
- */
-public class CacheGetEntryPessimisticSerializableSeltTest extends CacheGetEntryAbstractTest {
-    /** {@inheritDoc} */
-    @Override protected TransactionConcurrency concurrency() {
-        return TransactionConcurrency.PESSIMISTIC;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected TransactionIsolation isolation() {
-        return TransactionIsolation.SERIALIZABLE;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapMapEntrySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapMapEntrySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapMapEntrySelfTest.java
index e520d45..f2e12ad 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapMapEntrySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapMapEntrySelfTest.java
@@ -25,9 +25,11 @@ import org.apache.ignite.internal.IgniteKernal;
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheEntry;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridNearCacheEntry;
 import org.apache.ignite.internal.processors.cache.local.GridLocalCacheEntry;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
+import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT;
 import static org.apache.ignite.cache.CacheMode.LOCAL;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 import static org.apache.ignite.cache.CacheMode.REPLICATED;
@@ -76,6 +78,9 @@ public class CacheOffheapMapEntrySelfTest extends GridCacheAbstractSelfTest {
         cfg.setAtomicityMode(atomicityMode);
         cfg.setName(cacheName);
 
+        if (atomicityMode == TRANSACTIONAL_SNAPSHOT && !MvccFeatureChecker.isSupported(MvccFeatureChecker.Feature.NEAR_CACHE))
+            cfg.setNearConfiguration(null);
+
         return cfg;
     }
 
@@ -87,13 +92,22 @@ public class CacheOffheapMapEntrySelfTest extends GridCacheAbstractSelfTest {
 
         checkCacheMapEntry(TRANSACTIONAL, LOCAL, GridLocalCacheEntry.class);
 
+        if (MvccFeatureChecker.isSupported(MvccFeatureChecker.Feature.LOCAL_CACHE))
+            checkCacheMapEntry(TRANSACTIONAL_SNAPSHOT, LOCAL, GridLocalCacheEntry.class);
+
         checkCacheMapEntry(ATOMIC, PARTITIONED, GridNearCacheEntry.class);
 
         checkCacheMapEntry(TRANSACTIONAL, PARTITIONED, GridNearCacheEntry.class);
 
+        if (MvccFeatureChecker.isSupported(MvccFeatureChecker.Feature.CACHE_STORE))
+            checkCacheMapEntry(TRANSACTIONAL_SNAPSHOT, PARTITIONED, GridDhtCacheEntry.class);
+
         checkCacheMapEntry(ATOMIC, REPLICATED, GridDhtCacheEntry.class);
 
         checkCacheMapEntry(TRANSACTIONAL, REPLICATED, GridDhtCacheEntry.class);
+
+        if (MvccFeatureChecker.isSupported(MvccFeatureChecker.Feature.CACHE_STORE))
+            checkCacheMapEntry(TRANSACTIONAL_SNAPSHOT, REPLICATED, GridDhtCacheEntry.class);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheReadThroughLocalRestartSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheReadThroughLocalRestartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheReadThroughLocalRestartSelfTest.java
index 58fa8d6..5e8b1eb 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheReadThroughLocalRestartSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheReadThroughLocalRestartSelfTest.java
@@ -18,6 +18,7 @@
 package org.apache.ignite.internal.processors.cache;
 
 import org.apache.ignite.cache.CacheMode;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 
 import static org.apache.ignite.cache.CacheMode.LOCAL;
 
@@ -29,4 +30,11 @@ public class CacheReadThroughLocalRestartSelfTest extends CacheReadThroughRestar
     @Override protected CacheMode cacheMode() {
         return LOCAL;
     }
+
+    /** {@inheritDoc} */
+    @Override public void setUp() throws Exception {
+        MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE);
+
+        super.setUp();
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheReadThroughRestartSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheReadThroughRestartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheReadThroughRestartSelfTest.java
index 422ed58..5b79f7f 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheReadThroughRestartSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheReadThroughRestartSelfTest.java
@@ -27,6 +27,7 @@ import org.apache.ignite.configuration.TransactionConfiguration;
 import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 import org.apache.ignite.transactions.Transaction;
 import org.apache.ignite.transactions.TransactionConcurrency;
 import org.apache.ignite.transactions.TransactionIsolation;
@@ -42,6 +43,13 @@ public class CacheReadThroughRestartSelfTest extends GridCacheAbstractSelfTest {
     private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
 
     /** {@inheritDoc} */
+    @Override public void setUp() throws Exception {
+        MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE);
+
+        super.setUp();
+    }
+
+    /** {@inheritDoc} */
     @Override protected int gridCount() {
         return 2;
     }
@@ -116,6 +124,9 @@ public class CacheReadThroughRestartSelfTest extends GridCacheAbstractSelfTest {
 
         for (TransactionConcurrency txConcurrency : TransactionConcurrency.values()) {
             for (TransactionIsolation txIsolation : TransactionIsolation.values()) {
+                if (MvccFeatureChecker.forcedMvcc() && !MvccFeatureChecker.isSupported(txConcurrency, txIsolation))
+                    continue;
+
                 try (Transaction tx = ignite.transactions().txStart(txConcurrency, txIsolation, 100000, 1000)) {
                     for (int k = 0; k < 1000; k++) {
                         String key = "key" + k;

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheRemoveAllSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheRemoveAllSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheRemoveAllSelfTest.java
index a27bdda..cccb92a 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheRemoveAllSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheRemoveAllSelfTest.java
@@ -24,12 +24,21 @@ import org.apache.ignite.cache.CachePeekMode;
 import org.apache.ignite.internal.IgniteInternalFuture;
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.testframework.GridTestUtils;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 
 /**
  * Test remove all method.
  */
 public class CacheRemoveAllSelfTest extends GridCacheAbstractSelfTest {
     /** {@inheritDoc} */
+    @Override public void setUp() throws Exception {
+        if (MvccFeatureChecker.forcedMvcc())
+            fail("https://issues.apache.org/jira/browse/IGNITE-10082");
+
+        super.setUp();
+    }
+
+    /** {@inheritDoc} */
     @Override protected long getTestTimeout() {
         return 2 * 60 * 1000;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStopAndDestroySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStopAndDestroySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStopAndDestroySelfTest.java
index 6239b52..a204ddf 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStopAndDestroySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStopAndDestroySelfTest.java
@@ -29,6 +29,7 @@ import javax.cache.configuration.MutableConfiguration;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.IgniteException;
+import org.apache.ignite.cache.CacheAtomicityMode;
 import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.DataStorageConfiguration;
@@ -47,6 +48,7 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
 import org.apache.ignite.testframework.GridTestUtils;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 
 import static org.apache.ignite.cache.CacheMode.LOCAL;
@@ -150,6 +152,7 @@ public class CacheStopAndDestroySelfTest extends GridCommonAbstractTest {
 
         cfg.setName(CACHE_NAME_DHT);
         cfg.setCacheMode(PARTITIONED);
+        cfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
         cfg.setNearConfiguration(null);
 
         return cfg;
@@ -163,6 +166,7 @@ public class CacheStopAndDestroySelfTest extends GridCommonAbstractTest {
 
         cfg.setName(CACHE_NAME_CLIENT);
         cfg.setCacheMode(PARTITIONED);
+        cfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
         cfg.setNearConfiguration(null);
 
         return cfg;
@@ -176,6 +180,7 @@ public class CacheStopAndDestroySelfTest extends GridCommonAbstractTest {
 
         cfg.setName(CACHE_NAME_NEAR);
         cfg.setCacheMode(PARTITIONED);
+        cfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
         cfg.setNearConfiguration(new NearCacheConfiguration());
 
         return cfg;
@@ -190,6 +195,7 @@ public class CacheStopAndDestroySelfTest extends GridCommonAbstractTest {
         cfg.setName(CACHE_NAME_LOC);
         cfg.setCacheMode(LOCAL);
         cfg.setNearConfiguration(null);
+        cfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
 
         return cfg;
     }
@@ -280,6 +286,8 @@ public class CacheStopAndDestroySelfTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testNearDoubleDestroy() throws Exception {
+        MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE);
+
         startGridsMultiThreaded(gridCount());
 
         nearDestroy();
@@ -320,6 +328,8 @@ public class CacheStopAndDestroySelfTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testLocalDoubleDestroy() throws Exception {
+        MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE);
+
         startGridsMultiThreaded(gridCount());
 
         localDestroy();
@@ -563,6 +573,8 @@ public class CacheStopAndDestroySelfTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testNearClose() throws Exception {
+        MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE);
+
         startGridsMultiThreaded(gridCount());
 
         IgniteCache<String, String> cache0 = grid(0).getOrCreateCache(getNearConfig());
@@ -636,6 +648,8 @@ public class CacheStopAndDestroySelfTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testNearCloseWithTry() throws Exception {
+        MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE);
+
         startGridsMultiThreaded(gridCount());
 
         String curVal = null;
@@ -674,6 +688,8 @@ public class CacheStopAndDestroySelfTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testLocalClose() throws Exception {
+        MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE);
+
         memCfg = new DataStorageConfiguration();
 
         startGridsMultiThreaded(gridCount());
@@ -725,6 +741,8 @@ public class CacheStopAndDestroySelfTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testLocalCloseWithTry() throws Exception {
+        MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE);
+
         memCfg = new DataStorageConfiguration();
 
         startGridsMultiThreaded(gridCount());

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStoreUsageMultinodeDynamicStartTxTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStoreUsageMultinodeDynamicStartTxTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStoreUsageMultinodeDynamicStartTxTest.java
index 4511fc5..e217a1f 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStoreUsageMultinodeDynamicStartTxTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStoreUsageMultinodeDynamicStartTxTest.java
@@ -18,6 +18,7 @@
 package org.apache.ignite.internal.processors.cache;
 
 import org.apache.ignite.cache.CacheAtomicityMode;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
 
@@ -26,6 +27,13 @@ import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
  */
 public class CacheStoreUsageMultinodeDynamicStartTxTest extends CacheStoreUsageMultinodeDynamicStartAbstractTest {
     /** {@inheritDoc} */
+    @Override public void setUp() throws Exception {
+        MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE);
+
+        super.setUp();
+    }
+
+    /** {@inheritDoc} */
     @Override protected CacheAtomicityMode atomicityMode() {
         return TRANSACTIONAL;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStoreUsageMultinodeStaticStartTxTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStoreUsageMultinodeStaticStartTxTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStoreUsageMultinodeStaticStartTxTest.java
index 2f11fc8..8fa7e65 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStoreUsageMultinodeStaticStartTxTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStoreUsageMultinodeStaticStartTxTest.java
@@ -18,6 +18,7 @@
 package org.apache.ignite.internal.processors.cache;
 
 import org.apache.ignite.cache.CacheAtomicityMode;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
 
@@ -26,6 +27,13 @@ import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
  */
 public class CacheStoreUsageMultinodeStaticStartTxTest extends CacheStoreUsageMultinodeStaticStartAbstractTest {
     /** {@inheritDoc} */
+    @Override public void setUp() throws Exception {
+        MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE);
+
+        super.setUp();
+    }
+
+    /** {@inheritDoc} */
     @Override protected CacheAtomicityMode atomicityMode() {
         return TRANSACTIONAL;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheTxNotAllowReadFromBackupTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheTxNotAllowReadFromBackupTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheTxNotAllowReadFromBackupTest.java
index f0ec084..fad2c61 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheTxNotAllowReadFromBackupTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheTxNotAllowReadFromBackupTest.java
@@ -189,6 +189,72 @@ public class CacheTxNotAllowReadFromBackupTest extends GridCommonAbstractTest {
     }
 
     /**
+     * @throws Exception If failed.
+     */
+    public void testBackupConsistencyReplicatedMvcc() throws Exception {
+        CacheConfiguration<Integer, Integer> cfg = new CacheConfiguration<>("test-cache");
+
+        cfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT);
+        cfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.PRIMARY_SYNC);
+        cfg.setCacheMode(CacheMode.REPLICATED);
+        cfg.setReadFromBackup(false);
+
+        checkBackupConsistency(cfg, TransactionConcurrency.PESSIMISTIC, TransactionIsolation.REPEATABLE_READ);
+
+        checkBackupConsistencyGetAll(cfg, TransactionConcurrency.PESSIMISTIC, TransactionIsolation.REPEATABLE_READ);
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testBackupConsistencyReplicatedFullSyncMvcc() throws Exception {
+        CacheConfiguration<Integer, Integer> cfg = new CacheConfiguration<>("test-cache");
+
+        cfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT);
+        cfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
+        cfg.setCacheMode(CacheMode.REPLICATED);
+        cfg.setReadFromBackup(false);
+
+        checkBackupConsistency(cfg, TransactionConcurrency.PESSIMISTIC, TransactionIsolation.REPEATABLE_READ);
+
+        checkBackupConsistencyGetAll(cfg, TransactionConcurrency.PESSIMISTIC, TransactionIsolation.REPEATABLE_READ);
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testBackupConsistencyPartitionedMvcc() throws Exception {
+        CacheConfiguration<Integer, Integer> cfg = new CacheConfiguration<>("test-cache");
+
+        cfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT);
+        cfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.PRIMARY_SYNC);
+        cfg.setCacheMode(CacheMode.PARTITIONED);
+        cfg.setBackups(NODES - 1);
+        cfg.setReadFromBackup(false);
+
+        checkBackupConsistency(cfg, TransactionConcurrency.PESSIMISTIC, TransactionIsolation.REPEATABLE_READ);
+
+        checkBackupConsistencyGetAll(cfg, TransactionConcurrency.PESSIMISTIC, TransactionIsolation.REPEATABLE_READ);
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testBackupConsistencyPartitionedFullSyncMvcc() throws Exception {
+        CacheConfiguration<Integer, Integer> cfg = new CacheConfiguration<>("test-cache");
+
+        cfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT);
+        cfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
+        cfg.setCacheMode(CacheMode.PARTITIONED);
+        cfg.setBackups(NODES - 1);
+        cfg.setReadFromBackup(false);
+
+        checkBackupConsistency(cfg, TransactionConcurrency.PESSIMISTIC, TransactionIsolation.REPEATABLE_READ);
+
+        checkBackupConsistencyGetAll(cfg, TransactionConcurrency.PESSIMISTIC, TransactionIsolation.REPEATABLE_READ);
+    }
+
+    /**
      * @param ccfg Cache configuration.
      * @throws Exception If failed.
      */


[26/37] ignite git commit: IGNITE-10522 Fix checkpoint tmp files doesn't not removed on start node - Fixes #5571.

Posted by ak...@apache.org.
IGNITE-10522 Fix checkpoint tmp files doesn't not removed on start node - Fixes #5571.

Signed-off-by: Dmitriy Govorukhin <dm...@gmail.com>


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

Branch: refs/heads/ignite-10189
Commit: 472889d2e4f32a0fe7119e5fa44dcbaba84269f7
Parents: 57ccf9b
Author: Anton Kalashnikov <ka...@yandex.ru>
Authored: Fri Dec 7 13:33:49 2018 +0300
Committer: Dmitriy Govorukhin <dm...@gmail.com>
Committed: Fri Dec 7 13:33:49 2018 +0300

----------------------------------------------------------------------
 .../GridCacheDatabaseSharedManager.java         |    6 +-
 .../persistence/file/FilePageStoreManager.java  |    6 +
 .../ignite/internal/util/IgniteUtils.java       |    2 +-
 .../testframework/junits/GridAbstractTest.java  |    4 +-
 .../db/wal/IgniteWalRecoveryTest.java           | 1125 ++++++++----------
 5 files changed, 532 insertions(+), 611 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/472889d2/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
index 95a99fb..fd56262 100755
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
@@ -174,6 +174,7 @@ import static org.apache.ignite.IgniteSystemProperties.IGNITE_PDS_WAL_REBALANCE_
 import static org.apache.ignite.failure.FailureType.CRITICAL_ERROR;
 import static org.apache.ignite.failure.FailureType.SYSTEM_WORKER_TERMINATION;
 import static org.apache.ignite.internal.pagemem.wal.record.WALRecord.RecordType.CHECKPOINT_RECORD;
+import static org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager.TMP_FILE_MATCHER;
 import static org.apache.ignite.internal.util.IgniteUtils.checkpointBufferSize;
 
 /**
@@ -537,10 +538,7 @@ public class GridCacheDatabaseSharedManager extends IgniteCacheDatabaseSharedMan
      */
     @Override public void cleanupTempCheckpointDirectory() throws IgniteCheckedException {
         try {
-            try (DirectoryStream<Path> files = Files.newDirectoryStream(
-                cpDir.toPath(),
-                path -> path.endsWith(FilePageStoreManager.TMP_SUFFIX))
-            ) {
+            try (DirectoryStream<Path> files = Files.newDirectoryStream(cpDir.toPath(), TMP_FILE_MATCHER::matches)) {
                 for (Path path : files)
                     Files.delete(path);
             }

http://git-wip-us.apache.org/repos/asf/ignite/blob/472889d2/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/FilePageStoreManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/FilePageStoreManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/FilePageStoreManager.java
index 86560ba..3544485 100755
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/FilePageStoreManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/FilePageStoreManager.java
@@ -27,8 +27,10 @@ import java.io.InputStream;
 import java.io.OutputStream;
 import java.nio.ByteBuffer;
 import java.nio.file.DirectoryStream;
+import java.nio.file.FileSystems;
 import java.nio.file.Files;
 import java.nio.file.Path;
+import java.nio.file.PathMatcher;
 import java.nio.file.StandardCopyOption;
 import java.util.AbstractList;
 import java.util.Arrays;
@@ -118,6 +120,10 @@ public class FilePageStoreManager extends GridCacheSharedManagerAdapter implemen
     /** */
     public static final String META_STORAGE_NAME = "metastorage";
 
+    /** Matcher for searching of *.tmp files. */
+    public static final PathMatcher TMP_FILE_MATCHER =
+        FileSystems.getDefault().getPathMatcher("glob:**" + TMP_SUFFIX);
+
     /** Marshaller. */
     private static final Marshaller marshaller = new JdkMarshaller();
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/472889d2/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
index 6da5c6e..2f8eb1c 100755
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
@@ -3585,7 +3585,7 @@ public abstract class IgniteUtils {
             }
         }
 
-        if (path.endsWith("jar")) {
+        if (path.toFile().getName().endsWith("jar")) {
             try {
                 // Why do we do this?
                 new JarFile(path.toString(), false).close();

http://git-wip-us.apache.org/repos/asf/ignite/blob/472889d2/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java
index 1db255c..42a2e60 100755
--- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java
@@ -17,6 +17,8 @@
 
 package org.apache.ignite.testframework.junits;
 
+import javax.cache.configuration.Factory;
+import javax.cache.configuration.FactoryBuilder;
 import java.io.ObjectStreamException;
 import java.io.Serializable;
 import java.lang.annotation.Annotation;
@@ -41,8 +43,6 @@ import java.util.concurrent.ConcurrentMap;
 import java.util.concurrent.TimeoutException;
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.concurrent.atomic.AtomicReference;
-import javax.cache.configuration.Factory;
-import javax.cache.configuration.FactoryBuilder;
 import junit.framework.TestCase;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;

http://git-wip-us.apache.org/repos/asf/ignite/blob/472889d2/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRecoveryTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRecoveryTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRecoveryTest.java
index 04e90d5..e64800a 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRecoveryTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRecoveryTest.java
@@ -58,9 +58,9 @@ import org.apache.ignite.configuration.DataRegionConfiguration;
 import org.apache.ignite.configuration.DataStorageConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.configuration.WALMode;
-import org.apache.ignite.internal.DiscoverySpiTestListener;
 import org.apache.ignite.failure.FailureHandler;
 import org.apache.ignite.failure.NoOpFailureHandler;
+import org.apache.ignite.internal.DiscoverySpiTestListener;
 import org.apache.ignite.internal.IgniteEx;
 import org.apache.ignite.internal.IgniteInternalFuture;
 import org.apache.ignite.internal.IgniteInterruptedCheckedException;
@@ -109,6 +109,7 @@ import org.apache.ignite.transactions.TransactionConcurrency;
 import org.apache.ignite.transactions.TransactionIsolation;
 import org.junit.Assert;
 
+import static org.apache.ignite.configuration.DataStorageConfiguration.DFLT_CHECKPOINT_FREQ;
 import static org.apache.ignite.internal.IgniteNodeAttributes.ATTR_IGNITE_INSTANCE_NAME;
 import static org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager.CACHE_DATA_FILENAME;
 import static org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager.DFLT_STORE_DIR;
@@ -124,6 +125,12 @@ public class IgniteWalRecoveryTest extends GridCommonAbstractTest {
     private static final int LARGE_ARR_SIZE = 1025;
 
     /** */
+    private static final int LARGE_ENTRY_COUNT = 500;
+
+    /** */
+    private static final int ENTRY_COUNT = 2_000;
+
+    /** */
     private boolean fork;
 
     /** */
@@ -139,20 +146,24 @@ public class IgniteWalRecoveryTest extends GridCommonAbstractTest {
     private static final String LOC_CACHE_NAME = "local";
 
     /** */
-    private boolean renamed;
+    private boolean renamed = false;
 
     /** */
-    private int walSegmentSize;
+    private int walSegmentSize = 16 * 1024 * 1024;
 
     /** */
     private int walSegments = 10;
 
     /** Log only. */
-    private boolean logOnly;
+    private boolean logOnly = false;
 
     /** */
     private long customFailureDetectionTimeout = -1;
 
+    /** */
+    private long checkpointFrequency = DFLT_CHECKPOINT_FREQ;
+    ;
+
     /** {@inheritDoc} */
     @Override protected boolean isMultiJvm() {
         return fork;
@@ -202,6 +213,8 @@ public class IgniteWalRecoveryTest extends GridCommonAbstractTest {
 
         dbCfg.setWalSegments(walSegments);
 
+        dbCfg.setCheckpointFrequency(checkpointFrequency);
+
         cfg.setDataStorageConfiguration(dbCfg);
 
         BinaryConfiguration binCfg = new BinaryConfiguration();
@@ -224,16 +237,12 @@ public class IgniteWalRecoveryTest extends GridCommonAbstractTest {
         stopAllGrids();
 
         cleanPersistenceDir();
-
-        renamed = false;
     }
 
     /** {@inheritDoc} */
     @Override protected void afterTest() throws Exception {
         stopAllGrids();
 
-        logOnly = false;
-
         cleanPersistenceDir();
     }
 
@@ -326,174 +335,159 @@ public class IgniteWalRecoveryTest extends GridCommonAbstractTest {
      * @throws Exception If fail.
      */
     public void testSwitchClassLoader() throws Exception {
-        try {
-            final IgniteEx igniteEx = startGrid(1);
+        final IgniteEx igniteEx = startGrid(1);
 
-            // CustomDiscoveryMessage will trigger service tasks
-            startGrid(2);
+        // CustomDiscoveryMessage will trigger service tasks
+        startGrid(2);
 
-            igniteEx.cluster().active(true);
+        igniteEx.cluster().active(true);
 
-            IgniteCache<Integer, EnumVal> cache = igniteEx.cache(CACHE_NAME);
+        IgniteCache<Integer, EnumVal> cache = igniteEx.cache(CACHE_NAME);
 
-            final ClassLoader oldCl = Thread.currentThread().getContextClassLoader();
-            final ClassLoader newCl = getExternalClassLoader();
+        final ClassLoader oldCl = Thread.currentThread().getContextClassLoader();
+        final ClassLoader newCl = getExternalClassLoader();
 
-            Thread.currentThread().setContextClassLoader(newCl);
+        Thread.currentThread().setContextClassLoader(newCl);
 
-            for (int i = 0; i < 10; i++)
-                cache.put(i, i % 2 == 0 ? EnumVal.VAL1 : EnumVal.VAL2);
+        for (int i = 0; i < 10; i++)
+            cache.put(i, i % 2 == 0 ? EnumVal.VAL1 : EnumVal.VAL2);
 
-            for (int i = 0; i < 10; i++)
-                assert cache.containsKey(i);
+        for (int i = 0; i < 10; i++)
+            assert cache.containsKey(i);
 
-            // Invokes ClearTask with new class loader
-            cache.clear();
+        // Invokes ClearTask with new class loader
+        cache.clear();
 
-            Thread.currentThread().setContextClassLoader(oldCl);
+        Thread.currentThread().setContextClassLoader(oldCl);
 
-            for (int i = 0; i < 10; i++)
-                cache.put(i, i % 2 == 0 ? EnumVal.VAL1 : EnumVal.VAL2);
+        for (int i = 0; i < 10; i++)
+            cache.put(i, i % 2 == 0 ? EnumVal.VAL1 : EnumVal.VAL2);
 
-            for (int i = 0; i < 10; i++)
-                assert cache.containsKey(i);
-        }
-        finally {
-            stopAllGrids();
-        }
+        for (int i = 0; i < 10; i++)
+            assert cache.containsKey(i);
     }
 
     /**
      * @throws Exception if failed.
      */
     public void testWalSimple() throws Exception {
-        try {
-            IgniteEx ignite = startGrid(1);
-
-            ignite.cluster().active(true);
-
-            IgniteCache<Object, Object> cache = ignite.cache(CACHE_NAME);
-
-            info(" --> step1");
-
-            for (int i = 0; i < 10_000; i += 2)
-                cache.put(i, new IndexedObject(i));
-
-            info(" --> step2");
+        IgniteEx ignite = startGrid(1);
 
-            for (int i = 0; i < 10_000; i += 3)
-                cache.put(i, new IndexedObject(i * 2));
+        ignite.cluster().active(true);
 
-            info(" --> step3");
+        IgniteCache<Object, Object> cache = ignite.cache(CACHE_NAME);
 
-            for (int i = 0; i < 10_000; i += 7)
-                cache.put(i, new IndexedObject(i * 3));
+        info(" --> step1");
 
-            info(" --> check1");
+        for (int i = 0; i < 10_000; i += 2)
+            cache.put(i, new IndexedObject(i));
 
-            // Check.
-            for (int i = 0; i < 10_000; i++) {
-                IndexedObject o;
+        info(" --> step2");
 
-                if (i % 7 == 0)
-                    o = new IndexedObject(i * 3);
-                else if (i % 3 == 0)
-                    o = new IndexedObject(i * 2);
-                else if (i % 2 == 0)
-                    o = new IndexedObject(i);
-                else
-                    o = null;
+        for (int i = 0; i < 10_000; i += 3)
+            cache.put(i, new IndexedObject(i * 2));
 
-                assertEquals(o, cache.get(i));
-            }
+        info(" --> step3");
 
-            stopGrid(1);
+        for (int i = 0; i < 10_000; i += 7)
+            cache.put(i, new IndexedObject(i * 3));
 
-            ignite = startGrid(1);
+        info(" --> check1");
 
-            ignite.cluster().active(true);
+        // Check.
+        for (int i = 0; i < 10_000; i++) {
+            IndexedObject o;
+
+            if (i % 7 == 0)
+                o = new IndexedObject(i * 3);
+            else if (i % 3 == 0)
+                o = new IndexedObject(i * 2);
+            else if (i % 2 == 0)
+                o = new IndexedObject(i);
+            else
+                o = null;
+
+            assertEquals(o, cache.get(i));
+        }
 
-            cache = ignite.cache(CACHE_NAME);
+        stopGrid(1);
 
-            info(" --> check2");
+        ignite = startGrid(1);
 
-            // Check.
-            for (int i = 0; i < 10_000; i++) {
-                IndexedObject o;
+        ignite.cluster().active(true);
 
-                if (i % 7 == 0)
-                    o = new IndexedObject(i * 3);
-                else if (i % 3 == 0)
-                    o = new IndexedObject(i * 2);
-                else if (i % 2 == 0)
-                    o = new IndexedObject(i);
-                else
-                    o = null;
+        cache = ignite.cache(CACHE_NAME);
 
-                assertEquals(o, cache.get(i));
-            }
+        info(" --> check2");
 
-            info(" --> ok");
-        }
-        finally {
-            stopAllGrids();
+        // Check.
+        for (int i = 0; i < 10_000; i++) {
+            IndexedObject o;
+
+            if (i % 7 == 0)
+                o = new IndexedObject(i * 3);
+            else if (i % 3 == 0)
+                o = new IndexedObject(i * 2);
+            else if (i % 2 == 0)
+                o = new IndexedObject(i);
+            else
+                o = null;
+
+            assertEquals(o, cache.get(i));
         }
+
+        info(" --> ok");
     }
 
     /**
      * @throws Exception If fail.
      */
     public void testWalLargeValue() throws Exception {
-        try {
-            IgniteEx ignite = startGrid(1);
+        IgniteEx ignite = startGrid(1);
 
-            ignite.cluster().active(true);
+        ignite.cluster().active(true);
 
-            IgniteCache<Object, Object> cache = ignite.cache(CACHE_NAME);
+        IgniteCache<Object, Object> cache = ignite.cache(CACHE_NAME);
 
-            for (int i = 0; i < 10_000; i++) {
-                final byte[] data = new byte[i];
+        for (int i = 0; i < 10_000; i++) {
+            final byte[] data = new byte[i];
 
-                Arrays.fill(data, (byte)i);
+            Arrays.fill(data, (byte)i);
 
-                cache.put(i, data);
+            cache.put(i, data);
 
-                if (i % 1000 == 0)
-                    X.println(" ---> put: " + i);
-            }
+            if (i % 1000 == 0)
+                X.println(" ---> put: " + i);
+        }
 
-            stopGrid(1);
+        stopGrid(1);
 
-            ignite = startGrid(1);
+        ignite = startGrid(1);
 
-            ignite.cluster().active(true);
+        ignite.cluster().active(true);
 
-            cache = ignite.cache(CACHE_NAME);
+        cache = ignite.cache(CACHE_NAME);
 
-            info(" --> check2");
+        info(" --> check2");
 
-            for (int i = 0; i < 10_000; i++) {
-                final byte[] data = new byte[i];
+        for (int i = 0; i < 10_000; i++) {
+            final byte[] data = new byte[i];
 
-                Arrays.fill(data, (byte)i);
+            Arrays.fill(data, (byte)i);
 
-                final byte[] loaded = (byte[])cache.get(i);
+            final byte[] loaded = (byte[])cache.get(i);
 
-                Assert.assertArrayEquals(data, loaded);
+            Assert.assertArrayEquals(data, loaded);
 
-                if (i % 1000 == 0)
-                    X.println(" ---> get: " + i);
-            }
-        }
-        finally {
-            stopAllGrids();
+            if (i % 1000 == 0)
+                X.println(" ---> get: " + i);
         }
     }
 
     /**
-     * Check binary recover completes successfully when node stopped at the middle of checkpoint.
-     * Destroy cache_data.bin file for particular cache to emulate missing {@link DynamicCacheDescriptor}
-     * file (binary recovery should complete successfully in this case).
+     * Check binary recover completes successfully when node stopped at the middle of checkpoint. Destroy cache_data.bin
+     * file for particular cache to emulate missing {@link DynamicCacheDescriptor} file (binary recovery should complete
+     * successfully in this case).
      *
      * @throws Exception if failed.
      */
@@ -662,8 +656,6 @@ public class IgniteWalRecoveryTest extends GridCommonAbstractTest {
         }
         finally {
             customFailureDetectionTimeout = prevFDTimeout;
-
-            stopAllGrids();
         }
     }
 
@@ -675,65 +667,55 @@ public class IgniteWalRecoveryTest extends GridCommonAbstractTest {
 
         final long endTime = System.currentTimeMillis() + 60 * 1000;
 
-        try {
-            IgniteEx ignite = startGrid(1);
+        IgniteEx ignite = startGrid(1);
 
-            ignite.cluster().active(true);
+        ignite.cluster().active(true);
 
-            final IgniteCache<Object, Object> cache = ignite.cache(CACHE_NAME);
+        final IgniteCache<Object, Object> cache = ignite.cache(CACHE_NAME);
 
-            GridTestUtils.runMultiThreaded(new Callable<Void>() {
-                @Override public Void call() {
-                    Random rnd = ThreadLocalRandom.current();
+        GridTestUtils.runMultiThreaded(new Callable<Void>() {
+            @Override public Void call() {
+                Random rnd = ThreadLocalRandom.current();
 
-                    while (U.currentTimeMillis() < endTime)
-                        cache.put(rnd.nextInt(50_000), rnd.nextInt());
+                while (U.currentTimeMillis() < endTime)
+                    cache.put(rnd.nextInt(50_000), rnd.nextInt());
 
-                    return null;
-                }
-            }, 16, "put-thread");
-        }
-        finally {
-            stopAllGrids();
-        }
+                return null;
+            }
+        }, 16, "put-thread");
     }
 
     /**
      * @throws Exception If fail.
      */
     public void testWalRenameDirSimple() throws Exception {
-        try {
-            IgniteEx ignite = startGrid(1);
+        IgniteEx ignite = startGrid(1);
 
-            ignite.cluster().active(true);
+        ignite.cluster().active(true);
 
-            IgniteCache<Object, Object> cache = ignite.cache(CACHE_NAME);
+        IgniteCache<Object, Object> cache = ignite.cache(CACHE_NAME);
 
-            for (int i = 0; i < 100; i++)
-                cache.put(i, new IndexedObject(i));
+        for (int i = 0; i < 100; i++)
+            cache.put(i, new IndexedObject(i));
 
-            final Object consistentId = ignite.cluster().localNode().consistentId();
+        final Object consistentId = ignite.cluster().localNode().consistentId();
 
-            stopGrid(1);
+        stopGrid(1);
 
-            final File cacheDir = cacheDir(CACHE_NAME, consistentId.toString());
+        final File cacheDir = cacheDir(CACHE_NAME, consistentId.toString());
 
-            renamed = cacheDir.renameTo(new File(cacheDir.getParent(), "cache-" + RENAMED_CACHE_NAME));
+        renamed = cacheDir.renameTo(new File(cacheDir.getParent(), "cache-" + RENAMED_CACHE_NAME));
 
-            assert renamed;
+        assert renamed;
 
-            ignite = startGrid(1);
+        ignite = startGrid(1);
 
-            ignite.cluster().active(true);
+        ignite.cluster().active(true);
 
-            cache = ignite.cache(RENAMED_CACHE_NAME);
+        cache = ignite.cache(RENAMED_CACHE_NAME);
 
-            for (int i = 0; i < 100; i++)
-                assertEquals(new IndexedObject(i), cache.get(i));
-        }
-        finally {
-            stopAllGrids();
-        }
+        for (int i = 0; i < 100; i++)
+            assertEquals(new IndexedObject(i), cache.get(i));
     }
 
     /**
@@ -765,102 +747,92 @@ public class IgniteWalRecoveryTest extends GridCommonAbstractTest {
      * @throws Exception if failed.
      */
     public void testRecoveryNoCheckpoint() throws Exception {
-        try {
-            IgniteEx ctrlGrid = startGrid(0);
+        IgniteEx ctrlGrid = startGrid(0);
 
-            fork = true;
+        fork = true;
 
-            IgniteEx cacheGrid = startGrid(1);
+        IgniteEx cacheGrid = startGrid(1);
 
-            ctrlGrid.cluster().active(true);
+        ctrlGrid.cluster().active(true);
 
-            ctrlGrid.compute(ctrlGrid.cluster().forRemotes()).run(new LoadRunnable(false));
+        ctrlGrid.compute(ctrlGrid.cluster().forRemotes()).run(new LoadRunnable(false));
 
-            info("Killing remote process...");
+        info("Killing remote process...");
 
-            ((IgniteProcessProxy)cacheGrid).kill();
+        ((IgniteProcessProxy)cacheGrid).kill();
 
-            final IgniteEx g0 = ctrlGrid;
+        final IgniteEx g0 = ctrlGrid;
 
-            GridTestUtils.waitForCondition(new PA() {
-                /** {@inheritDoc} */
-                @Override public boolean apply() {
-                    return g0.cluster().nodes().size() == 1;
-                }
-            }, getTestTimeout());
+        GridTestUtils.waitForCondition(new PA() {
+            /** {@inheritDoc} */
+            @Override public boolean apply() {
+                return g0.cluster().nodes().size() == 1;
+            }
+        }, getTestTimeout());
 
-            fork = false;
+        fork = false;
 
-            // Now start the grid and verify that updates were restored from WAL.
-            cacheGrid = startGrid(1);
+        // Now start the grid and verify that updates were restored from WAL.
+        cacheGrid = startGrid(1);
 
-            IgniteCache<Object, Object> cache = cacheGrid.cache(CACHE_NAME);
+        IgniteCache<Object, Object> cache = cacheGrid.cache(CACHE_NAME);
 
-            for (int i = 0; i < 10_000; i++)
-                assertEquals(new IndexedObject(i), cache.get(i));
+        for (int i = 0; i < ENTRY_COUNT; i++)
+            assertEquals(new IndexedObject(i), cache.get(i));
 
-            List<List<?>> res = cache.query(new SqlFieldsQuery("select count(iVal) from IndexedObject")).getAll();
+        List<List<?>> res = cache.query(new SqlFieldsQuery("select count(iVal) from IndexedObject")).getAll();
 
-            assertEquals(1, res.size());
-            assertEquals(10_000L, res.get(0).get(0));
+        assertEquals(1, res.size());
+        assertEquals((long)ENTRY_COUNT, res.get(0).get(0));
 
-            IgniteCache<Object, Object> locCache = cacheGrid.cache(LOC_CACHE_NAME);
+        IgniteCache<Object, Object> locCache = cacheGrid.cache(LOC_CACHE_NAME);
 
-            for (int i = 0; i < 10_000; i++)
-                assertEquals(new IndexedObject(i), locCache.get(i));
-        }
-        finally {
-            stopAllGrids();
-        }
+        for (int i = 0; i < ENTRY_COUNT; i++)
+            assertEquals(new IndexedObject(i), locCache.get(i));
     }
 
     /**
      * @throws Exception if failed.
      */
     public void testRecoveryLargeNoCheckpoint() throws Exception {
-        try {
-            IgniteEx ctrlGrid = startGrid(0);
+        IgniteEx ctrlGrid = startGrid(0);
 
-            fork = true;
+        fork = true;
 
-            IgniteEx cacheGrid = startGrid(1);
+        IgniteEx cacheGrid = startGrid(1);
 
-            ctrlGrid.cluster().active(true);
+        ctrlGrid.cluster().active(true);
 
-            ctrlGrid.compute(ctrlGrid.cluster().forRemotes()).run(new LargeLoadRunnable(false));
+        ctrlGrid.compute(ctrlGrid.cluster().forRemotes()).run(new LargeLoadRunnable(false));
 
-            info("Killing remote process...");
+        info("Killing remote process...");
 
-            ((IgniteProcessProxy)cacheGrid).kill();
+        ((IgniteProcessProxy)cacheGrid).kill();
 
-            final IgniteEx g0 = ctrlGrid;
+        final IgniteEx g0 = ctrlGrid;
 
-            GridTestUtils.waitForCondition(new PA() {
-                /** {@inheritDoc} */
-                @Override public boolean apply() {
-                    return g0.cluster().nodes().size() == 1;
-                }
-            }, getTestTimeout());
+        GridTestUtils.waitForCondition(new PA() {
+            /** {@inheritDoc} */
+            @Override public boolean apply() {
+                return g0.cluster().nodes().size() == 1;
+            }
+        }, getTestTimeout());
 
-            fork = false;
+        fork = false;
 
-            // Now start the grid and verify that updates were restored from WAL.
-            cacheGrid = startGrid(1);
+        // Now start the grid and verify that updates were restored from WAL.
+        cacheGrid = startGrid(1);
 
-            IgniteCache<Object, Object> cache = cacheGrid.cache(CACHE_NAME);
-            IgniteCache<Object, Object> locCache = cacheGrid.cache(LOC_CACHE_NAME);
+        IgniteCache<Object, Object> cache = cacheGrid.cache(CACHE_NAME);
+        IgniteCache<Object, Object> locCache = cacheGrid.cache(LOC_CACHE_NAME);
 
-            for (int i = 0; i < 1000; i++) {
-                final long[] data = new long[LARGE_ARR_SIZE];
+        for (int i = 0; i < LARGE_ENTRY_COUNT; i++) {
+            final long[] data = new long[LARGE_ARR_SIZE];
 
-                Arrays.fill(data, i);
+            Arrays.fill(data, i);
 
-                Assert.assertArrayEquals(data, (long[])cache.get(i));
-                Assert.assertArrayEquals(data, (long[])locCache.get(i));
-            }
-        }
-        finally {
-            stopAllGrids();
+            Assert.assertArrayEquals(data, (long[])cache.get(i));
+            Assert.assertArrayEquals(data, (long[])locCache.get(i));
         }
     }
 
@@ -873,76 +845,70 @@ public class IgniteWalRecoveryTest extends GridCommonAbstractTest {
      * @throws Exception if failed.
      */
     public void testRandomCrash() throws Exception {
-        try {
-            IgniteEx ctrlGrid = startGrid(0);
+        checkpointFrequency = 2_000 + new Random().nextInt(4_000);
 
-            fork = true;
+        IgniteEx ctrlGrid = startGrid(0);
 
-            IgniteEx cacheGrid = startGrid(1);
+        fork = true;
 
-            ctrlGrid.cluster().active(true);
+        IgniteEx cacheGrid = startGrid(1);
 
-            IgniteCompute rmt = ctrlGrid.compute(ctrlGrid.cluster().forRemotes());
+        ctrlGrid.cluster().active(true);
 
-            rmt.run(new LoadRunnable(false));
+        IgniteCompute rmt = ctrlGrid.compute(ctrlGrid.cluster().forRemotes());
 
-            info(">>> Finished cache population.");
+        rmt.run(new LoadRunnable(false));
 
-            rmt.run(new AsyncLoadRunnable());
+        info(">>> Finished cache population.");
 
-            Thread.sleep(20_000);
+        rmt.run(new AsyncLoadRunnable());
 
-            info(">>> Killing remote process...");
+        Thread.sleep(5_000);
 
-            ((IgniteProcessProxy)cacheGrid).kill();
+        info(">>> Killing remote process...");
 
-            startGrid(1);
+        ((IgniteProcessProxy)cacheGrid).kill();
 
-            Boolean res = rmt.call(new VerifyCallable());
+        startGrid(1);
 
-            assertTrue(res);
-        }
-        finally {
-            stopAllGrids();
-        }
+        Boolean res = rmt.call(new VerifyCallable());
+
+        assertTrue(res);
     }
 
     /**
      * @throws Exception if failed.
      */
     public void testLargeRandomCrash() throws Exception {
-        try {
-            IgniteEx ctrlGrid = startGrid(0);
+        checkpointFrequency = 2_000 + new Random().nextInt(4_000);
 
-            fork = true;
+        IgniteEx ctrlGrid = startGrid(0);
 
-            IgniteEx cacheGrid = startGrid(1);
+        fork = true;
 
-            ctrlGrid.cluster().active(true);
+        IgniteEx cacheGrid = startGrid(1);
 
-            IgniteCompute rmt = ctrlGrid.compute(ctrlGrid.cluster().forRemotes());
+        ctrlGrid.cluster().active(true);
 
-            rmt.run(new LargeLoadRunnable(false));
+        IgniteCompute rmt = ctrlGrid.compute(ctrlGrid.cluster().forRemotes());
 
-            info(">>> Finished cache population.");
+        rmt.run(new LargeLoadRunnable(false));
 
-            rmt.run(new AsyncLargeLoadRunnable());
+        info(">>> Finished cache population.");
 
-            Thread.sleep(20_000);
+        rmt.run(new AsyncLargeLoadRunnable());
 
-            info(">>> Killing remote process...");
+        Thread.sleep(5_000);
 
-            ((IgniteProcessProxy)cacheGrid).kill();
+        info(">>> Killing remote process...");
 
-            startGrid(1);
+        ((IgniteProcessProxy)cacheGrid).kill();
 
-            Boolean res = rmt.call(new VerifyLargeCallable());
+        startGrid(1);
 
-            assertTrue(res);
-        }
-        finally {
-            stopAllGrids();
-        }
+        Boolean res = rmt.call(new VerifyLargeCallable());
+
+        assertTrue(res);
     }
 
     /**
@@ -959,68 +925,58 @@ public class IgniteWalRecoveryTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testDestroyCache() throws Exception {
-        try {
-            IgniteEx ignite = startGrid(1);
+        IgniteEx ignite = startGrid(1);
 
-            ignite.cluster().active(true);
+        ignite.cluster().active(true);
 
-            IgniteCache<Object, Object> cache = ignite.getOrCreateCache("test");
+        IgniteCache<Object, Object> cache = ignite.getOrCreateCache("test");
 
-            cache.put(1, new IndexedObject(1));
+        cache.put(1, new IndexedObject(1));
 
-            ignite.destroyCache("test");
+        ignite.destroyCache("test");
 
-            cache = ignite.getOrCreateCache("test");
+        cache = ignite.getOrCreateCache("test");
 
-            // No entry available after cache destroy.
-            assertNull(cache.get(1));
-        }
-        finally {
-            stopAllGrids();
-        }
+        // No entry available after cache destroy.
+        assertNull(cache.get(1));
     }
 
     /**
      * @throws Exception If fail.
      */
     public void testEvictPartition() throws Exception {
-        try {
-            Ignite ignite1 = startGrid("node1");
+        Ignite ignite1 = startGrid("node1");
 
-            ignite1.cluster().active(true);
+        ignite1.cluster().active(true);
 
-            IgniteCache<Object, Object> cache1 = ignite1.cache(CACHE_NAME);
+        IgniteCache<Object, Object> cache1 = ignite1.cache(CACHE_NAME);
 
-            for (int i = 0; i < 100; i++)
-                cache1.put(i, new IndexedObject(i));
+        for (int i = 0; i < 100; i++)
+            cache1.put(i, new IndexedObject(i));
 
-            Ignite ignite2 = startGrid("node2");
+        Ignite ignite2 = startGrid("node2");
 
-            IgniteCache<Object, Object> cache2 = ignite2.cache(CACHE_NAME);
+        IgniteCache<Object, Object> cache2 = ignite2.cache(CACHE_NAME);
 
-            for (int i = 0; i < 100; i++) {
-                assertEquals(new IndexedObject(i), cache1.get(i));
-                assertEquals(new IndexedObject(i), cache2.get(i));
-            }
+        for (int i = 0; i < 100; i++) {
+            assertEquals(new IndexedObject(i), cache1.get(i));
+            assertEquals(new IndexedObject(i), cache2.get(i));
+        }
 
-            ignite1.close();
-            ignite2.close();
+        ignite1.close();
+        ignite2.close();
 
-            ignite1 = startGrid("node1");
-            ignite2 = startGrid("node2");
+        ignite1 = startGrid("node1");
+        ignite2 = startGrid("node2");
 
-            ignite1.cluster().active(true);
+        ignite1.cluster().active(true);
 
-            cache1 = ignite1.cache(CACHE_NAME);
-            cache2 = ignite2.cache(CACHE_NAME);
+        cache1 = ignite1.cache(CACHE_NAME);
+        cache2 = ignite2.cache(CACHE_NAME);
 
-            for (int i = 0; i < 100; i++) {
-                assertEquals(new IndexedObject(i), cache1.get(i));
-                assertEquals(new IndexedObject(i), cache2.get(i));
-            }
-        }
-        finally {
-            stopAllGrids();
+        for (int i = 0; i < 100; i++) {
+            assertEquals(new IndexedObject(i), cache1.get(i));
+            assertEquals(new IndexedObject(i), cache2.get(i));
         }
     }
 
@@ -1028,64 +984,58 @@ public class IgniteWalRecoveryTest extends GridCommonAbstractTest {
      * @throws Exception If fail.
      */
     public void testMetastorage() throws Exception {
-        try {
-            int cnt = 5000;
+        int cnt = 5000;
 
-            IgniteEx ignite0 = (IgniteEx)startGrid("node1");
-            IgniteEx ignite1 = (IgniteEx)startGrid("node2");
+        IgniteEx ignite0 = (IgniteEx)startGrid("node1");
+        IgniteEx ignite1 = (IgniteEx)startGrid("node2");
 
-            ignite1.cluster().active(true);
+        ignite1.cluster().active(true);
 
-            GridCacheSharedContext<Object, Object> sharedCtx0 = ignite0.context().cache().context();
-            GridCacheSharedContext<Object, Object> sharedCtx1 = ignite1.context().cache().context();
+        GridCacheSharedContext<Object, Object> sharedCtx0 = ignite0.context().cache().context();
+        GridCacheSharedContext<Object, Object> sharedCtx1 = ignite1.context().cache().context();
 
-            MetaStorage storage0 = sharedCtx0.database().metaStorage();
-            MetaStorage storage1 = sharedCtx1.database().metaStorage();
+        MetaStorage storage0 = sharedCtx0.database().metaStorage();
+        MetaStorage storage1 = sharedCtx1.database().metaStorage();
 
-            assert storage0 != null;
+        assert storage0 != null;
 
-            for (int i = 0; i < cnt; i++) {
-                sharedCtx0.database().checkpointReadLock();
+        for (int i = 0; i < cnt; i++) {
+            sharedCtx0.database().checkpointReadLock();
 
-                try {
-                    storage0.putData(String.valueOf(i), new byte[] {(byte)(i % 256), 2, 3});
-                }
-                finally {
-                    sharedCtx0.database().checkpointReadUnlock();
-                }
+            try {
+                storage0.putData(String.valueOf(i), new byte[] {(byte)(i % 256), 2, 3});
+            }
+            finally {
+                sharedCtx0.database().checkpointReadUnlock();
+            }
 
-                byte[] b1 = new byte[i + 3];
-                b1[0] = 1;
-                b1[1] = 2;
-                b1[2] = 3;
+            byte[] b1 = new byte[i + 3];
+            b1[0] = 1;
+            b1[1] = 2;
+            b1[2] = 3;
 
-                sharedCtx1.database().checkpointReadLock();
+            sharedCtx1.database().checkpointReadLock();
 
-                try {
-                    storage1.putData(String.valueOf(i), b1);
-                }
-                finally {
-                    sharedCtx1.database().checkpointReadUnlock();
-                }
+            try {
+                storage1.putData(String.valueOf(i), b1);
             }
-
-            for (int i = 0; i < cnt; i++) {
-                byte[] d1 = storage0.getData(String.valueOf(i));
-                assertEquals(3, d1.length);
-                assertEquals((byte)(i % 256), d1[0]);
-                assertEquals(2, d1[1]);
-                assertEquals(3, d1[2]);
-
-                byte[] d2 = storage1.getData(String.valueOf(i));
-                assertEquals(i + 3, d2.length);
-                assertEquals(1, d2[0]);
-                assertEquals(2, d2[1]);
-                assertEquals(3, d2[2]);
+            finally {
+                sharedCtx1.database().checkpointReadUnlock();
             }
-
         }
-        finally {
-            stopAllGrids();
+
+        for (int i = 0; i < cnt; i++) {
+            byte[] d1 = storage0.getData(String.valueOf(i));
+            assertEquals(3, d1.length);
+            assertEquals((byte)(i % 256), d1[0]);
+            assertEquals(2, d1[1]);
+            assertEquals(3, d1[2]);
+
+            byte[] d2 = storage1.getData(String.valueOf(i));
+            assertEquals(i + 3, d2.length);
+            assertEquals(1, d2[0]);
+            assertEquals(2, d2[1]);
+            assertEquals(3, d2[2]);
         }
     }
 
@@ -1093,46 +1043,40 @@ public class IgniteWalRecoveryTest extends GridCommonAbstractTest {
      * @throws Exception If fail.
      */
     public void testMetastorageLargeArray() throws Exception {
-        try {
-            int cnt = 5000;
-            int arraySize = 32_768;
+        int cnt = 5000;
+        int arraySize = 32_768;
 
-            IgniteEx ignite = (IgniteEx)startGrid("node1");
+        IgniteEx ignite = (IgniteEx)startGrid("node1");
 
-            ignite.cluster().active(true);
+        ignite.cluster().active(true);
 
-            GridCacheSharedContext<Object, Object> sharedCtx = ignite.context().cache().context();
+        GridCacheSharedContext<Object, Object> sharedCtx = ignite.context().cache().context();
 
-            MetaStorage storage = sharedCtx.database().metaStorage();
+        MetaStorage storage = sharedCtx.database().metaStorage();
 
-            for (int i = 0; i < cnt; i++) {
-                byte[] b1 = new byte[arraySize];
-                for (int k = 0; k < arraySize; k++) {
-                    b1[k] = (byte)(k % 100);
-                }
+        for (int i = 0; i < cnt; i++) {
+            byte[] b1 = new byte[arraySize];
+            for (int k = 0; k < arraySize; k++) {
+                b1[k] = (byte)(k % 100);
+            }
 
-                sharedCtx.database().checkpointReadLock();
+            sharedCtx.database().checkpointReadLock();
 
-                try {
-                    storage.putData(String.valueOf(i), b1);
-                }
-                finally {
-                    sharedCtx.database().checkpointReadUnlock();
-                }
+            try {
+                storage.putData(String.valueOf(i), b1);
             }
+            finally {
+                sharedCtx.database().checkpointReadUnlock();
+            }
+        }
 
-            for (int i = 0; i < cnt; i++) {
-                byte[] d2 = storage.getData(String.valueOf(i));
-                assertEquals(arraySize, d2.length);
+        for (int i = 0; i < cnt; i++) {
+            byte[] d2 = storage.getData(String.valueOf(i));
+            assertEquals(arraySize, d2.length);
 
-                for (int k = 0; k < arraySize; k++) {
-                    assertEquals((byte)(k % 100), d2[k]);
-                }
+            for (int k = 0; k < arraySize; k++) {
+                assertEquals((byte)(k % 100), d2[k]);
             }
-
-        }
-        finally {
-            stopAllGrids();
         }
     }
 
@@ -1140,52 +1084,46 @@ public class IgniteWalRecoveryTest extends GridCommonAbstractTest {
      * @throws Exception If fail.
      */
     public void testMetastorageRemove() throws Exception {
-        try {
-            int cnt = 400;
+        int cnt = 400;
 
-            IgniteEx ignite0 = (IgniteEx)startGrid("node1");
+        IgniteEx ignite0 = (IgniteEx)startGrid("node1");
 
-            ignite0.cluster().active(true);
+        ignite0.cluster().active(true);
 
-            GridCacheSharedContext<Object, Object> sharedCtx0 = ignite0.context().cache().context();
+        GridCacheSharedContext<Object, Object> sharedCtx0 = ignite0.context().cache().context();
 
-            MetaStorage storage = sharedCtx0.database().metaStorage();
+        MetaStorage storage = sharedCtx0.database().metaStorage();
 
-            assert storage != null;
+        assert storage != null;
 
-            for (int i = 0; i < cnt; i++) {
-                sharedCtx0.database().checkpointReadLock();
+        for (int i = 0; i < cnt; i++) {
+            sharedCtx0.database().checkpointReadLock();
 
-                try {
-                    storage.putData(String.valueOf(i), new byte[] {1, 2, 3});
-                }
-                finally {
-                    sharedCtx0.database().checkpointReadUnlock();
-                }
+            try {
+                storage.putData(String.valueOf(i), new byte[] {1, 2, 3});
             }
+            finally {
+                sharedCtx0.database().checkpointReadUnlock();
+            }
+        }
 
-            for (int i = 0; i < 10; i++) {
-                sharedCtx0.database().checkpointReadLock();
+        for (int i = 0; i < 10; i++) {
+            sharedCtx0.database().checkpointReadLock();
 
-                try {
-                    storage.removeData(String.valueOf(i));
-                }
-                finally {
-                    sharedCtx0.database().checkpointReadUnlock();
-                }
+            try {
+                storage.removeData(String.valueOf(i));
             }
-
-            for (int i = 10; i < cnt; i++) {
-                byte[] d1 = storage.getData(String.valueOf(i));
-                assertEquals(3, d1.length);
-                assertEquals(1, d1[0]);
-                assertEquals(2, d1[1]);
-                assertEquals(3, d1[2]);
+            finally {
+                sharedCtx0.database().checkpointReadUnlock();
             }
-
         }
-        finally {
-            stopAllGrids();
+
+        for (int i = 10; i < cnt; i++) {
+            byte[] d1 = storage.getData(String.valueOf(i));
+            assertEquals(3, d1.length);
+            assertEquals(1, d1[0]);
+            assertEquals(2, d1[1]);
+            assertEquals(3, d1[2]);
         }
     }
 
@@ -1245,55 +1183,50 @@ public class IgniteWalRecoveryTest extends GridCommonAbstractTest {
      * @throws Exception If fail.
      */
     public void testMetastorageWalRestore() throws Exception {
-        try {
-            int cnt = 2000;
+        int cnt = 2000;
 
-            IgniteEx ignite0 = startGrid(0);
+        IgniteEx ignite0 = startGrid(0);
 
-            ignite0.cluster().active(true);
+        ignite0.cluster().active(true);
 
-            GridCacheSharedContext<Object, Object> sharedCtx0 = ignite0.context().cache().context();
+        GridCacheSharedContext<Object, Object> sharedCtx0 = ignite0.context().cache().context();
 
-            MetaStorage storage = sharedCtx0.database().metaStorage();
+        MetaStorage storage = sharedCtx0.database().metaStorage();
 
-            assert storage != null;
+        assert storage != null;
 
-            for (int i = 0; i < cnt; i++) {
-                sharedCtx0.database().checkpointReadLock();
+        for (int i = 0; i < cnt; i++) {
+            sharedCtx0.database().checkpointReadLock();
 
-                try {
-                    storage.putData(String.valueOf(i), new byte[] {1, 2, 3});
-                }
-                finally {
-                    sharedCtx0.database().checkpointReadUnlock();
-                }
+            try {
+                storage.putData(String.valueOf(i), new byte[] {1, 2, 3});
             }
-
-            for (int i = 0; i < cnt; i++) {
-                byte[] value = storage.getData(String.valueOf(i));
-                assert value != null;
-                assert value.length == 3;
+            finally {
+                sharedCtx0.database().checkpointReadUnlock();
             }
+        }
+
+        for (int i = 0; i < cnt; i++) {
+            byte[] value = storage.getData(String.valueOf(i));
+            assert value != null;
+            assert value.length == 3;
+        }
 
-            stopGrid(0);
+        stopGrid(0);
 
-            ignite0 = startGrid(0);
+        ignite0 = startGrid(0);
 
-            ignite0.cluster().active(true);
+        ignite0.cluster().active(true);
 
-            sharedCtx0 = ignite0.context().cache().context();
+        sharedCtx0 = ignite0.context().cache().context();
 
-            storage = sharedCtx0.database().metaStorage();
+        storage = sharedCtx0.database().metaStorage();
 
-            assert storage != null;
+        assert storage != null;
 
-            for (int i = 0; i < cnt; i++) {
-                byte[] value = storage.getData(String.valueOf(i));
-                assert value != null;
-            }
-        }
-        finally {
-            stopAllGrids();
+        for (int i = 0; i < cnt; i++) {
+            byte[] value = storage.getData(String.valueOf(i));
+            assert value != null;
         }
     }
 
@@ -1301,203 +1234,193 @@ public class IgniteWalRecoveryTest extends GridCommonAbstractTest {
      * @throws Exception if failed.
      */
     public void testAbsentDeadlock_Iterator_RollOver_Archivation() throws Exception {
-        try {
-            walSegments = 2;
+        walSegments = 2;
 
-            walSegmentSize = 512 * 1024;
+        walSegmentSize = 512 * 1024;
 
-            IgniteEx ignite0 = (IgniteEx)startGrid("node0");
+        IgniteEx ignite0 = (IgniteEx)startGrid("node0");
 
-            ignite0.active(true);
+        ignite0.active(true);
 
-            IgniteCache<Object, Object> cache0 = ignite0.cache(CACHE_NAME);
+        IgniteCache<Object, Object> cache0 = ignite0.cache(CACHE_NAME);
 
-            for (int i = 0; i < 100; i++)
-                cache0.put(i, new IndexedObject(i));
+        for (int i = 0; i < 100; i++)
+            cache0.put(i, new IndexedObject(i));
 
-            GridCacheSharedContext<Object, Object> sharedCtx = ignite0.context().cache().context();
+        GridCacheSharedContext<Object, Object> sharedCtx = ignite0.context().cache().context();
 
-            GridCacheDatabaseSharedManager db = (GridCacheDatabaseSharedManager)sharedCtx.database();
+        GridCacheDatabaseSharedManager db = (GridCacheDatabaseSharedManager)sharedCtx.database();
 
-            db.waitForCheckpoint("test");
-            db.enableCheckpoints(false).get();
+        db.waitForCheckpoint("test");
+        db.enableCheckpoints(false).get();
 
-            // Log something to know where to start.
-            WALPointer ptr = sharedCtx.wal().log(new MemoryRecoveryRecord(U.currentTimeMillis()));
+        // Log something to know where to start.
+        WALPointer ptr = sharedCtx.wal().log(new MemoryRecoveryRecord(U.currentTimeMillis()));
 
-            info("Replay marker: " + ptr);
+        info("Replay marker: " + ptr);
 
-            for (int i = 100; i < 200; i++)
-                cache0.put(i, new IndexedObject(i));
+        for (int i = 100; i < 200; i++)
+            cache0.put(i, new IndexedObject(i));
 
-            CountDownLatch insertFinished = new CountDownLatch(1);
-            GridTestUtils.runAsync(
-                () -> {
-                    try (WALIterator it = sharedCtx.wal().replay(ptr)) {
-                        if (it.hasNext()) {
-                            it.next();
+        CountDownLatch insertFinished = new CountDownLatch(1);
+        GridTestUtils.runAsync(
+            () -> {
+                try (WALIterator it = sharedCtx.wal().replay(ptr)) {
+                    if (it.hasNext()) {
+                        it.next();
 
-                            insertFinished.await();
-                        }
+                        insertFinished.await();
                     }
-
-                    return null;
                 }
-            );
 
-            IgniteInternalFuture<Object> future = GridTestUtils.runAsync(
-                () -> {
-                    for (int i = 0; i < 10000; i++)
-                        cache0.put(i, new IndexedObject(i));
+                return null;
+            }
+        );
 
-                    return null;
-                }
-            );
+        IgniteInternalFuture<Object> future = GridTestUtils.runAsync(
+            () -> {
+                for (int i = 0; i < 10000; i++)
+                    cache0.put(i, new IndexedObject(i));
 
-            future.get();
+                return null;
+            }
+        );
 
-            insertFinished.countDown();
+        future.get();
 
-            ignite0.close();
-        }
-        finally {
-            stopAllGrids();
-        }
+        insertFinished.countDown();
+
+        ignite0.close();
     }
 
     /**
      * @throws Exception if failed.
      */
     public void testApplyDeltaRecords() throws Exception {
-        try {
-            IgniteEx ignite0 = (IgniteEx)startGrid("node0");
+        IgniteEx ignite0 = (IgniteEx)startGrid("node0");
 
-            ignite0.cluster().active(true);
+        ignite0.cluster().active(true);
 
-            IgniteCache<Object, Object> cache0 = ignite0.cache(CACHE_NAME);
+        IgniteCache<Object, Object> cache0 = ignite0.cache(CACHE_NAME);
 
-            for (int i = 0; i < 1000; i++)
-                cache0.put(i, new IndexedObject(i));
+        for (int i = 0; i < 1000; i++)
+            cache0.put(i, new IndexedObject(i));
 
-            GridCacheSharedContext<Object, Object> sharedCtx = ignite0.context().cache().context();
+        GridCacheSharedContext<Object, Object> sharedCtx = ignite0.context().cache().context();
 
-            GridCacheDatabaseSharedManager db = (GridCacheDatabaseSharedManager)sharedCtx.database();
+        GridCacheDatabaseSharedManager db = (GridCacheDatabaseSharedManager)sharedCtx.database();
 
-            db.waitForCheckpoint("test");
-            db.enableCheckpoints(false).get();
+        db.waitForCheckpoint("test");
+        db.enableCheckpoints(false).get();
 
-            // Log something to know where to start.
-            WALPointer ptr = sharedCtx.wal().log(new MemoryRecoveryRecord(U.currentTimeMillis()));
+        // Log something to know where to start.
+        WALPointer ptr = sharedCtx.wal().log(new MemoryRecoveryRecord(U.currentTimeMillis()));
 
-            info("Replay marker: " + ptr);
+        info("Replay marker: " + ptr);
 
-            for (int i = 1000; i < 5000; i++)
-                cache0.put(i, new IndexedObject(i));
+        for (int i = 1000; i < 5000; i++)
+            cache0.put(i, new IndexedObject(i));
 
-            info("Done puts...");
+        info("Done puts...");
 
-            for (int i = 2_000; i < 3_000; i++)
-                cache0.remove(i);
+        for (int i = 2_000; i < 3_000; i++)
+            cache0.remove(i);
 
-            info("Done removes...");
+        info("Done removes...");
 
-            for (int i = 5000; i < 6000; i++)
-                cache0.put(i, new IndexedObject(i));
+        for (int i = 5000; i < 6000; i++)
+            cache0.put(i, new IndexedObject(i));
 
-            info("Done puts...");
+        info("Done puts...");
 
-            Map<FullPageId, byte[]> rolledPages = new HashMap<>();
+        Map<FullPageId, byte[]> rolledPages = new HashMap<>();
 
-            int pageSize = sharedCtx.database().pageSize();
+        int pageSize = sharedCtx.database().pageSize();
 
-            ByteBuffer buf = ByteBuffer.allocateDirect(pageSize);
+        ByteBuffer buf = ByteBuffer.allocateDirect(pageSize);
 
-            // Now check that deltas can be correctly applied.
-            try (WALIterator it = sharedCtx.wal().replay(ptr)) {
-                while (it.hasNext()) {
-                    IgniteBiTuple<WALPointer, WALRecord> tup = it.next();
+        // Now check that deltas can be correctly applied.
+        try (WALIterator it = sharedCtx.wal().replay(ptr)) {
+            while (it.hasNext()) {
+                IgniteBiTuple<WALPointer, WALRecord> tup = it.next();
 
-                    WALRecord rec = tup.get2();
+                WALRecord rec = tup.get2();
 
-                    if (rec instanceof PageSnapshot) {
-                        PageSnapshot page = (PageSnapshot)rec;
+                if (rec instanceof PageSnapshot) {
+                    PageSnapshot page = (PageSnapshot)rec;
 
-                        rolledPages.put(page.fullPageId(), page.pageData());
-                    }
-                    else if (rec instanceof PageDeltaRecord) {
-                        PageDeltaRecord delta = (PageDeltaRecord)rec;
+                    rolledPages.put(page.fullPageId(), page.pageData());
+                }
+                else if (rec instanceof PageDeltaRecord) {
+                    PageDeltaRecord delta = (PageDeltaRecord)rec;
 
-                        FullPageId fullId = new FullPageId(delta.pageId(), delta.groupId());
+                    FullPageId fullId = new FullPageId(delta.pageId(), delta.groupId());
 
-                        byte[] pageData = rolledPages.get(fullId);
+                    byte[] pageData = rolledPages.get(fullId);
 
-                        if (pageData == null) {
-                            pageData = new byte[pageSize];
+                    if (pageData == null) {
+                        pageData = new byte[pageSize];
 
-                            rolledPages.put(fullId, pageData);
-                        }
+                        rolledPages.put(fullId, pageData);
+                    }
 
-                        assertNotNull("Missing page snapshot [page=" + fullId + ", delta=" + delta + ']', pageData);
+                    assertNotNull("Missing page snapshot [page=" + fullId + ", delta=" + delta + ']', pageData);
 
-                        buf.order(ByteOrder.nativeOrder());
+                    buf.order(ByteOrder.nativeOrder());
 
-                        buf.position(0);
-                        buf.put(pageData);
-                        buf.position(0);
+                    buf.position(0);
+                    buf.put(pageData);
+                    buf.position(0);
 
-                        delta.applyDelta(sharedCtx.database().dataRegion(null).pageMemory(),
-                            GridUnsafe.bufferAddress(buf));
+                    delta.applyDelta(sharedCtx.database().dataRegion(null).pageMemory(),
+                        GridUnsafe.bufferAddress(buf));
 
-                        buf.position(0);
+                    buf.position(0);
 
-                        buf.get(pageData);
-                    }
+                    buf.get(pageData);
                 }
             }
+        }
 
-            info("Done apply...");
+        info("Done apply...");
 
-            PageMemoryEx pageMem = (PageMemoryEx)db.dataRegion(null).pageMemory();
+        PageMemoryEx pageMem = (PageMemoryEx)db.dataRegion(null).pageMemory();
 
-            for (Map.Entry<FullPageId, byte[]> entry : rolledPages.entrySet()) {
-                FullPageId fullId = entry.getKey();
+        for (Map.Entry<FullPageId, byte[]> entry : rolledPages.entrySet()) {
+            FullPageId fullId = entry.getKey();
 
-                ignite0.context().cache().context().database().checkpointReadLock();
+            ignite0.context().cache().context().database().checkpointReadLock();
+
+            try {
+                long page = pageMem.acquirePage(fullId.groupId(), fullId.pageId(), true);
 
                 try {
-                    long page = pageMem.acquirePage(fullId.groupId(), fullId.pageId(), true);
+                    long bufPtr = pageMem.writeLock(fullId.groupId(), fullId.pageId(), page, true);
 
                     try {
-                        long bufPtr = pageMem.writeLock(fullId.groupId(), fullId.pageId(), page, true);
+                        byte[] data = entry.getValue();
 
-                        try {
-                            byte[] data = entry.getValue();
+                        for (int i = 0; i < data.length; i++) {
+                            if (fullId.pageId() == TrackingPageIO.VERSIONS.latest().trackingPageFor(fullId.pageId(), db.pageSize()))
+                                continue; // Skip tracking pages.
 
-                            for (int i = 0; i < data.length; i++) {
-                                if (fullId.pageId() == TrackingPageIO.VERSIONS.latest().trackingPageFor(fullId.pageId(), db.pageSize()))
-                                    continue; // Skip tracking pages.
-
-                                assertEquals("page=" + fullId + ", pos=" + i, PageUtils.getByte(bufPtr, i), data[i]);
-                            }
-                        }
-                        finally {
-                            pageMem.writeUnlock(fullId.groupId(), fullId.pageId(), page, null, false, true);
+                            assertEquals("page=" + fullId + ", pos=" + i, PageUtils.getByte(bufPtr, i), data[i]);
                         }
                     }
                     finally {
-                        pageMem.releasePage(fullId.groupId(), fullId.pageId(), page);
+                        pageMem.writeUnlock(fullId.groupId(), fullId.pageId(), page, null, false, true);
                     }
                 }
                 finally {
-                    ignite0.context().cache().context().database().checkpointReadUnlock();
+                    pageMem.releasePage(fullId.groupId(), fullId.pageId(), page);
                 }
             }
-
-            ignite0.close();
-        }
-        finally {
-            stopAllGrids();
+            finally {
+                ignite0.context().cache().context().database().checkpointReadUnlock();
+            }
         }
+
+        ignite0.close();
     }
 
     /**
@@ -1506,73 +1429,68 @@ public class IgniteWalRecoveryTest extends GridCommonAbstractTest {
      * @throws Exception If fail.
      */
     public void testRecoveryOnTransactionalAndPartitionedCache() throws Exception {
-        IgniteEx ignite = (IgniteEx) startGrids(3);
+        IgniteEx ignite = (IgniteEx)startGrids(3);
         ignite.cluster().active(true);
 
-        try {
-            final String cacheName = "transactional";
+        final String cacheName = "transactional";
 
-            CacheConfiguration<Object, Object> cacheConfiguration = new CacheConfiguration<>(cacheName)
-                .setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL)
-                .setAffinity(new RendezvousAffinityFunction(false, 32))
-                .setCacheMode(CacheMode.PARTITIONED)
-                .setRebalanceMode(CacheRebalanceMode.SYNC)
-                .setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC)
-                .setBackups(2);
+        CacheConfiguration<Object, Object> cacheConfiguration = new CacheConfiguration<>(cacheName)
+            .setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL)
+            .setAffinity(new RendezvousAffinityFunction(false, 32))
+            .setCacheMode(CacheMode.PARTITIONED)
+            .setRebalanceMode(CacheRebalanceMode.SYNC)
+            .setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC)
+            .setBackups(2);
 
-            ignite.createCache(cacheConfiguration);
+        ignite.createCache(cacheConfiguration);
 
-            IgniteCache<Object, Object> cache = ignite.cache(cacheName);
-            Map<Object, Object> map = new HashMap<>();
+        IgniteCache<Object, Object> cache = ignite.cache(cacheName);
+        Map<Object, Object> map = new HashMap<>();
 
-            final int transactions = 100;
-            final int operationsPerTransaction = 40;
+        final int transactions = 100;
+        final int operationsPerTransaction = 40;
 
-            Random random = new Random();
+        Random random = new Random();
 
-            for (int t = 1; t <= transactions; t++) {
-                Transaction tx = ignite.transactions().txStart(
-                    TransactionConcurrency.OPTIMISTIC, TransactionIsolation.READ_COMMITTED);
+        for (int t = 1; t <= transactions; t++) {
+            Transaction tx = ignite.transactions().txStart(
+                TransactionConcurrency.OPTIMISTIC, TransactionIsolation.READ_COMMITTED);
 
-                Map<Object, Object> changesInTransaction = new HashMap<>();
-
-                for (int op = 0; op < operationsPerTransaction; op++) {
-                    int key = random.nextInt(1000) + 1;
+            Map<Object, Object> changesInTransaction = new HashMap<>();
 
-                    Object value = random.nextBoolean() ? randomString(random) + key : new BigObject(key);
+            for (int op = 0; op < operationsPerTransaction; op++) {
+                int key = random.nextInt(1000) + 1;
 
-                    changesInTransaction.put(key, value);
+                Object value = random.nextBoolean() ? randomString(random) + key : new BigObject(key);
 
-                    cache.put(key, value);
-                }
+                changesInTransaction.put(key, value);
 
-                if (random.nextBoolean()) {
-                    tx.commit();
-                    map.putAll(changesInTransaction);
-                }
-                else {
-                    tx.rollback();
-                }
+                cache.put(key, value);
+            }
 
-                if (t % 50 == 0)
-                    log.info("Finished transaction " + t);
+            if (random.nextBoolean()) {
+                tx.commit();
+                map.putAll(changesInTransaction);
+            }
+            else {
+                tx.rollback();
             }
 
-            stopAllGrids();
+            if (t % 50 == 0)
+                log.info("Finished transaction " + t);
+        }
 
-            ignite = (IgniteEx) startGrids(3);
-            ignite.cluster().active(true);
+        stopAllGrids();
 
-            cache = ignite.cache(cacheName);
+        ignite = (IgniteEx)startGrids(3);
+        ignite.cluster().active(true);
 
-            for (Object key : map.keySet()) {
-                Object expectedValue = map.get(key);
-                Object actualValue = cache.get(key);
-                Assert.assertEquals("Unexpected value for key " + key, expectedValue, actualValue);
-            }
-        }
-        finally {
-            stopAllGrids();
+        cache = ignite.cache(cacheName);
+
+        for (Object key : map.keySet()) {
+            Object expectedValue = map.get(key);
+            Object actualValue = cache.get(key);
+            Assert.assertEquals("Unexpected value for key " + key, expectedValue, actualValue);
         }
     }
 
@@ -1584,7 +1502,7 @@ public class IgniteWalRecoveryTest extends GridCommonAbstractTest {
     public void testTxRecordsConsistency() throws Exception {
         System.setProperty(IgniteSystemProperties.IGNITE_WAL_LOG_TX_RECORDS, "true");
 
-        IgniteEx ignite = (IgniteEx) startGrids(3);
+        IgniteEx ignite = (IgniteEx)startGrids(3);
         ignite.cluster().active(true);
 
         try {
@@ -1688,7 +1606,6 @@ public class IgniteWalRecoveryTest extends GridCommonAbstractTest {
         }
         finally {
             System.clearProperty(IgniteSystemProperties.IGNITE_WAL_LOG_TX_RECORDS);
-            stopAllGrids();
         }
     }
 
@@ -1801,7 +1718,7 @@ public class IgniteWalRecoveryTest extends GridCommonAbstractTest {
             IgniteCache<Object, Object> cache = ignite.cache(CACHE_NAME);
             IgniteCache<Object, Object> locCache = ignite.cache(LOC_CACHE_NAME);
 
-            for (int i = 0; i < 10_000; i++) {
+            for (int i = 0; i < ENTRY_COUNT; i++) {
                 cache.put(i, new IndexedObject(i));
                 locCache.put(i, new IndexedObject(i));
             }
@@ -1888,7 +1805,7 @@ public class IgniteWalRecoveryTest extends GridCommonAbstractTest {
             IgniteCache<Object, Object> cache = ignite.cache(CACHE_NAME);
             IgniteCache<Object, Object> locCache = ignite.cache(LOC_CACHE_NAME);
 
-            for (int i = 0; i < 10_000; i++) {
+            for (int i = 0; i < ENTRY_COUNT; i++) {
                 {
                     Object val = cache.get(i);
 
@@ -1959,7 +1876,7 @@ public class IgniteWalRecoveryTest extends GridCommonAbstractTest {
             IgniteCache<Object, Object> cache = ignite.cache(CACHE_NAME);
             IgniteCache<Object, Object> locCache = ignite.cache(LOC_CACHE_NAME);
 
-            for (int i = 0; i < 1000; i++) {
+            for (int i = 0; i < LARGE_ENTRY_COUNT; i++) {
                 final long[] data = new long[LARGE_ARR_SIZE];
 
                 Arrays.fill(data, i);
@@ -2053,7 +1970,7 @@ public class IgniteWalRecoveryTest extends GridCommonAbstractTest {
 
             IgniteCache<Object, Object> cache = ignite.cache(CACHE_NAME);
 
-            for (int i = 0; i < 1000; i++) {
+            for (int i = 0; i < LARGE_ENTRY_COUNT; i++) {
                 final long[] data = new long[LARGE_ARR_SIZE];
 
                 Arrays.fill(data, i);


[15/37] ignite git commit: IGNITE-10355 Tx rollback failure on put operations with caches whose topology fails validation - Fixes #5453.

Posted by ak...@apache.org.
IGNITE-10355 Tx rollback failure on put operations with caches whose topology fails validation - Fixes #5453.

Signed-off-by: Ivan Rakov <ir...@apache.org>


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

Branch: refs/heads/ignite-10189
Commit: bf75ef22d194c84c5cef99f5f28be221a4a468a8
Parents: d267236
Author: Dmitriy Sorokin <d....@gmail.com>
Authored: Thu Dec 6 17:43:27 2018 +0300
Committer: Ivan Rakov <ir...@apache.org>
Committed: Thu Dec 6 17:43:27 2018 +0300

----------------------------------------------------------------------
 .../processors/cache/GridCacheUtils.java        |  2 +-
 .../cache/distributed/near/GridNearTxLocal.java | 21 +++++++++++++-------
 2 files changed, 15 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/bf75ef22/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
index 12b6566..ebc1d11 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
@@ -1317,7 +1317,7 @@ public class GridCacheUtils {
 
         if (e instanceof CachePartialUpdateCheckedException)
             return new CachePartialUpdateException((CachePartialUpdateCheckedException)e);
-        else if (e instanceof ClusterTopologyServerNotFoundException)
+        else if (e.hasCause(ClusterTopologyServerNotFoundException.class))
             return new CacheServerNotFoundException(e.getMessage(), e);
         else if (e instanceof SchemaOperationException)
             return new CacheException(e.getMessage(), e);

http://git-wip-us.apache.org/repos/asf/ignite/blob/bf75ef22/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java
index 9f1f86d..ef74de4 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java
@@ -3917,16 +3917,23 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter implements GridTimeou
                 fut.listen(new IgniteInClosure<IgniteInternalFuture<IgniteInternalTx>>() {
                     @Override public void apply(IgniteInternalFuture<IgniteInternalTx> fut0) {
                         if (FINISH_FUT_UPD.compareAndSet(tx, fut, rollbackFut)) {
-                            if (tx.state() == COMMITTED) {
-                                if (log.isDebugEnabled())
-                                    log.debug("Failed to rollback, transaction is already committed: " + tx);
+                            switch (tx.state()) {
+                                case COMMITTED:
+                                    if (log.isDebugEnabled())
+                                        log.debug("Failed to rollback, transaction is already committed: " + tx);
+
+                                    // Fall-through.
 
-                                rollbackFut.forceFinish();
+                                case ROLLED_BACK:
+                                    rollbackFut.forceFinish();
+
+                                    assert rollbackFut.isDone() : rollbackFut;
+
+                                    break;
 
-                                assert rollbackFut.isDone() : rollbackFut;
+                                default: // First finish attempt was unsuccessful. Try again.
+                                    rollbackFut.finish(false, clearThreadMap, onTimeout);
                             }
-                            else // First finish attempt was unsuccessful. Try again.
-                                rollbackFut.finish(false, clearThreadMap, onTimeout);
                         }
                         else {
                             finishFut.listen(new IgniteInClosure<IgniteInternalFuture<IgniteInternalTx>>() {


[12/37] ignite git commit: IGNITE-8370 Web Console: Updated type.

Posted by ak...@apache.org.
IGNITE-8370 Web Console: Updated type.


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

Branch: refs/heads/ignite-10189
Commit: 24a50e1045a759aff584b5d651cc46ce9047394b
Parents: 63b1422
Author: Ilya Borisov <kl...@gmail.com>
Authored: Thu Dec 6 11:41:48 2018 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Thu Dec 6 11:41:48 2018 +0700

----------------------------------------------------------------------
 modules/web-console/frontend/app/types/index.ts | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/24a50e10/modules/web-console/frontend/app/types/index.ts
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/types/index.ts b/modules/web-console/frontend/app/types/index.ts
index 333c00b..df6a169 100644
--- a/modules/web-console/frontend/app/types/index.ts
+++ b/modules/web-console/frontend/app/types/index.ts
@@ -23,11 +23,12 @@ interface ITfMetatagsConfig {
 
 export interface IIgniteNg1StateDeclaration extends Ng1StateDeclaration {
     /**
-     * Whether to store state as last visited in local storage or not.
-     * true - will be saved
-     * false (default) - won't be saved
+     * Whether to store state as last visited in local storage or not:
+     * `true` - will be saved
+     * `false` (default) - won't be saved
      * @type {boolean}
      */
     unsaved?: boolean,
-    tfMetaTags: ITfMetatagsConfig
+    tfMetaTags: ITfMetatagsConfig,
+    permission?: string
 }


[02/37] ignite git commit: IGNITE-10049: MVCC: Create "Cache 4" test suite for MVCC mode. This closes #5499.

Posted by ak...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheReadFromBackupTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheReadFromBackupTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheReadFromBackupTest.java
index 2bb5fbb..652aba0 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheReadFromBackupTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheReadFromBackupTest.java
@@ -50,6 +50,7 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
+import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 import static org.apache.ignite.cache.CacheMode.REPLICATED;
 
@@ -87,7 +88,23 @@ public class IgniteCacheReadFromBackupTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testGetFromBackupStoreReadThroughEnabled() throws Exception {
-        for (CacheConfiguration<Object, Object> ccfg : cacheConfigurations()) {
+        checkGetFromBackupStoreReadThroughEnabled(cacheConfigurations());
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testMvccGetFromBackupStoreReadThroughEnabled() throws Exception {
+        fail("https://issues.apache.org/jira/browse/IGNITE-10274");
+
+        checkGetFromBackupStoreReadThroughEnabled(mvccCacheConfigurations());
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    private void checkGetFromBackupStoreReadThroughEnabled(List<CacheConfiguration<Object, Object>> cacheCfgs) throws Exception {
+        for (CacheConfiguration<Object, Object> ccfg : cacheCfgs) {
             ccfg.setCacheStoreFactory(new TestStoreFactory());
             ccfg.setReadThrough(true);
 
@@ -131,7 +148,23 @@ public class IgniteCacheReadFromBackupTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testGetFromBackupStoreReadThroughDisabled() throws Exception {
-        for (CacheConfiguration<Object, Object> ccfg : cacheConfigurations()) {
+        checkGetFromBackupStoreReadThroughDisabled(cacheConfigurations());
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testMvccGetFromBackupStoreReadThroughDisabled() throws Exception {
+        fail("https://issues.apache.org/jira/browse/IGNITE-10274");
+
+        checkGetFromBackupStoreReadThroughDisabled(mvccCacheConfigurations());
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    private void checkGetFromBackupStoreReadThroughDisabled(List<CacheConfiguration<Object, Object>> cacheCfgs) throws Exception {
+        for (CacheConfiguration<Object, Object> ccfg : cacheCfgs) {
             ccfg.setCacheStoreFactory(new TestStoreFactory());
             ccfg.setReadThrough(false);
 
@@ -159,7 +192,23 @@ public class IgniteCacheReadFromBackupTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testGetFromPrimaryPreloadInProgress() throws Exception {
-        for (final CacheConfiguration<Object, Object> ccfg : cacheConfigurations()) {
+        checkGetFromPrimaryPreloadInProgress(cacheConfigurations());
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testMvccGetFromPrimaryPreloadInProgress() throws Exception {
+        fail("https://issues.apache.org/jira/browse/IGNITE-10274");
+
+        checkGetFromPrimaryPreloadInProgress(mvccCacheConfigurations());
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    private void checkGetFromPrimaryPreloadInProgress(List<CacheConfiguration<Object, Object>> cacheCfgs) throws Exception {
+        for (final CacheConfiguration<Object, Object> ccfg : cacheCfgs) {
             boolean near = (ccfg.getNearConfiguration() != null);
 
             log.info("Test cache [mode=" + ccfg.getCacheMode() +
@@ -245,7 +294,24 @@ public class IgniteCacheReadFromBackupTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testNoPrimaryReadPreloadFinished() throws Exception {
-        for (CacheConfiguration<Object, Object> ccfg : cacheConfigurations()) {
+        checkNoPrimaryReadPreloadFinished(cacheConfigurations());
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testMvccNoPrimaryReadPreloadFinished() throws Exception {
+        fail("https://issues.apache.org/jira/browse/IGNITE-10274");
+
+        checkNoPrimaryReadPreloadFinished(mvccCacheConfigurations());
+
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    private void checkNoPrimaryReadPreloadFinished(List<CacheConfiguration<Object, Object>> cacheCfgs) throws Exception {
+        for (CacheConfiguration<Object, Object> ccfg : cacheCfgs) {
             boolean near = (ccfg.getNearConfiguration() != null);
 
             log.info("Test cache [mode=" + ccfg.getCacheMode() +
@@ -370,6 +436,21 @@ public class IgniteCacheReadFromBackupTest extends GridCommonAbstractTest {
     }
 
     /**
+     * @return Cache configurations to test.
+     */
+    private List<CacheConfiguration<Object, Object>> mvccCacheConfigurations() {
+        List<CacheConfiguration<Object, Object>> ccfgs = new ArrayList<>();
+
+        ccfgs.add(cacheConfiguration(REPLICATED, TRANSACTIONAL_SNAPSHOT, 0, false));
+
+        ccfgs.add(cacheConfiguration(PARTITIONED, TRANSACTIONAL_SNAPSHOT, 1, false));
+        ccfgs.add(cacheConfiguration(PARTITIONED, TRANSACTIONAL_SNAPSHOT, 1, true));
+        ccfgs.add(cacheConfiguration(PARTITIONED, TRANSACTIONAL_SNAPSHOT, 2, false));
+
+        return ccfgs;
+    }
+
+    /**
      * @param cacheMode Cache mode.
      * @param atomicityMode Cache atomicity mode.
      * @param backups Number of backups.

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheSingleGetMessageTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheSingleGetMessageTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheSingleGetMessageTest.java
index 974bcf2..df6100b 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheSingleGetMessageTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheSingleGetMessageTest.java
@@ -37,6 +37,7 @@ import org.apache.ignite.transactions.Transaction;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
+import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 import static org.apache.ignite.cache.CacheMode.REPLICATED;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
@@ -88,11 +89,25 @@ public class IgniteCacheSingleGetMessageTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testSingleGetMessage() throws Exception {
+        checkSingleGetMessage(cacheConfigurations());
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testMvccSingleGetMessage() throws Exception {
+        fail("https://issues.apache.org/jira/browse/IGNITE-7371");
+
+        checkSingleGetMessage(mvccCacheConfigurations());
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void checkSingleGetMessage(List<CacheConfiguration<Integer, Integer>> ccfgs) throws Exception {
         assertFalse(ignite(0).configuration().isClientMode());
         assertTrue(ignite(SRVS).configuration().isClientMode());
 
-        List<CacheConfiguration<Integer, Integer>> ccfgs = cacheConfigurations();
-
         for (int i = 0; i < ccfgs.size(); i++) {
             CacheConfiguration<Integer, Integer> ccfg = ccfgs.get(i);
 
@@ -282,6 +297,19 @@ public class IgniteCacheSingleGetMessageTest extends GridCommonAbstractTest {
     }
 
     /**
+     * @return Mvcc cache configurations to test.
+     */
+    private List<CacheConfiguration<Integer, Integer>> mvccCacheConfigurations() {
+        List<CacheConfiguration<Integer, Integer>> ccfgs = new ArrayList<>();
+
+        ccfgs.add(cacheConfiguration(PARTITIONED, TRANSACTIONAL_SNAPSHOT, FULL_SYNC, 0));
+        ccfgs.add(cacheConfiguration(PARTITIONED, TRANSACTIONAL_SNAPSHOT, FULL_SYNC, 1));
+        ccfgs.add(cacheConfiguration(REPLICATED, TRANSACTIONAL_SNAPSHOT, FULL_SYNC, 0));
+
+        return ccfgs;
+    }
+
+    /**
      * @param cacheMode Cache mode.
      * @param atomicityMode Cache atomicity mode.
      * @param syncMode Write synchronization mode.
@@ -297,7 +325,6 @@ public class IgniteCacheSingleGetMessageTest extends GridCommonAbstractTest {
 
         ccfg.setCacheMode(cacheMode);
         ccfg.setAtomicityMode(atomicityMode);
-        ccfg.setAtomicityMode(TRANSACTIONAL);
         ccfg.setWriteSynchronizationMode(syncMode);
 
         if (cacheMode == PARTITIONED)

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxPreloadAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxPreloadAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxPreloadAbstractTest.java
index b4af2a8..65e9f37 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxPreloadAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxPreloadAbstractTest.java
@@ -32,6 +32,7 @@ import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.internal.IgniteInternalFuture;
 import org.apache.ignite.internal.processors.cache.GridCacheAbstractSelfTest;
 import org.apache.ignite.testframework.GridTestUtils;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 import org.apache.ignite.transactions.Transaction;
 import org.apache.ignite.transactions.TransactionConcurrency;
 import org.apache.ignite.transactions.TransactionIsolation;
@@ -78,6 +79,9 @@ public abstract class IgniteTxPreloadAbstractTest extends GridCacheAbstractSelfT
      * @throws Exception If failed.
      */
     public void testRemoteTxPreloading() throws Exception {
+        if (MvccFeatureChecker.forcedMvcc())
+            fail("https://issues.apache.org/jira/browse/IGNITE-10391");
+
         IgniteCache<String, Integer> cache = jcache(0);
 
         for (int i = 0; i < 10_000; i++)
@@ -147,13 +151,17 @@ public abstract class IgniteTxPreloadAbstractTest extends GridCacheAbstractSelfT
      * @throws Exception If failed.
      */
     public void testLocalTxPreloadingOptimistic() throws Exception {
-        testLocalTxPreloading(OPTIMISTIC);
+        if (!MvccFeatureChecker.forcedMvcc()) // Do not check optimistic tx for mvcc.
+            testLocalTxPreloading(OPTIMISTIC);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testLocalTxPreloadingPessimistic() throws Exception {
+        if (MvccFeatureChecker.forcedMvcc())
+            fail("https://issues.apache.org/jira/browse/IGNITE-10391");
+
         testLocalTxPreloading(PESSIMISTIC);
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheLockFailoverSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheLockFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheLockFailoverSelfTest.java
index ab94618..2ab36f2 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheLockFailoverSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheLockFailoverSelfTest.java
@@ -33,6 +33,7 @@ import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.lang.IgniteFutureTimeoutException;
 import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi;
 import org.apache.ignite.testframework.GridTestUtils;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 
 /**
  *
@@ -40,6 +41,13 @@ import org.apache.ignite.testframework.GridTestUtils;
 @SuppressWarnings("unchecked")
 public class IgniteCacheLockFailoverSelfTest extends GridCacheAbstractSelfTest {
     /** {@inheritDoc} */
+    @Override public void setUp() throws Exception {
+        MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.ENTRY_LOCK);
+
+        super.setUp();
+    }
+
+    /** {@inheritDoc} */
     @Override protected int gridCount() {
         return 2;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheMultiTxLockSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheMultiTxLockSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheMultiTxLockSelfTest.java
index bc3b13d..d7454fd 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheMultiTxLockSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheMultiTxLockSelfTest.java
@@ -22,6 +22,7 @@ import java.util.Collection;
 import java.util.TreeMap;
 import java.util.concurrent.ThreadLocalRandom;
 import java.util.concurrent.TimeUnit;
+import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.cache.eviction.lru.LruEvictionPolicy;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
@@ -33,6 +34,7 @@ import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
@@ -55,6 +57,16 @@ public class IgniteCacheMultiTxLockSelfTest extends GridCommonAbstractTest {
     /** */
     private boolean client;
 
+    /** Unexpected lock error. */
+    private volatile Throwable err;
+
+    /** {@inheritDoc} */
+    @Override public void setUp() throws Exception {
+        MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.ENTRY_LOCK);
+
+        super.setUp();
+    }
+
     /** {@inheritDoc} */
     @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
         IgniteConfiguration c = super.getConfiguration(igniteInstanceName);
@@ -120,6 +132,8 @@ public class IgniteCacheMultiTxLockSelfTest extends GridCommonAbstractTest {
     public void checkExplicitLock(int keys, boolean testClient) throws Exception {
         Collection<Thread> threads = new ArrayList<>();
 
+        err = null;
+
         try {
             // Start grid 1.
             IgniteEx grid1 = startGrid(1);
@@ -171,6 +185,8 @@ public class IgniteCacheMultiTxLockSelfTest extends GridCommonAbstractTest {
 
                 assertEquals("txMap is not empty:" + i, 0, tm.idMapSize());
             }
+
+            assertNull(err);
         }
         finally {
             stopAllGrids();
@@ -214,7 +230,7 @@ public class IgniteCacheMultiTxLockSelfTest extends GridCommonAbstractTest {
                             else
                                 cache.removeAll(vals.keySet());
                         }
-                        catch (Exception e) {
+                        catch (IgniteCheckedException e) {
                             U.error(log(), "Failed cache operation.", e);
                         }
                         finally {
@@ -223,8 +239,12 @@ public class IgniteCacheMultiTxLockSelfTest extends GridCommonAbstractTest {
 
                         U.sleep(100);
                     }
-                    catch (Exception e){
+                    catch (Throwable e){
                         U.error(log(), "Failed unlock.", e);
+
+                        err = e;
+
+                        return;
                     }
                 }
             }

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCrossCacheMvccTxSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCrossCacheMvccTxSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCrossCacheMvccTxSelfTest.java
new file mode 100644
index 0000000..63a255e
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCrossCacheMvccTxSelfTest.java
@@ -0,0 +1,39 @@
+/*
+ * 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.dht;
+
+import org.apache.ignite.cache.CacheAtomicityMode;
+
+import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC;
+import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_READ;
+
+/**
+ *
+ */
+public class IgniteCrossCacheMvccTxSelfTest extends IgniteCrossCacheTxAbstractSelfTest {
+    /** {@inheritDoc} */
+    @Override public CacheAtomicityMode atomicityMode() {
+        return CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT;
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testPessimisticRepeatableRead() throws Exception {
+        checkTxsSingleOp(PESSIMISTIC, REPEATABLE_READ);
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCrossCacheTxAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCrossCacheTxAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCrossCacheTxAbstractSelfTest.java
new file mode 100644
index 0000000..5224daf
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCrossCacheTxAbstractSelfTest.java
@@ -0,0 +1,181 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.cache.distributed.dht;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.ThreadLocalRandom;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.cache.CacheAtomicityMode;
+import org.apache.ignite.cluster.ClusterNode;
+import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.configuration.NearCacheConfiguration;
+import org.apache.ignite.internal.IgniteEx;
+import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
+import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.apache.ignite.transactions.Transaction;
+import org.apache.ignite.transactions.TransactionConcurrency;
+import org.apache.ignite.transactions.TransactionIsolation;
+
+import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
+
+/**
+ * Tests specific combinations of cross-cache transactions.
+ */
+public abstract class IgniteCrossCacheTxAbstractSelfTest extends GridCommonAbstractTest {
+    /** */
+    private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
+
+    /** */
+    private static final String FIRST_CACHE = "FirstCache";
+
+    /** */
+    private static final String SECOND_CACHE = "SecondCache";
+
+    /** */
+    private static final int TX_CNT = 500;
+
+    /** {@inheritDoc} */
+    @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
+        IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
+
+        ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setIpFinder(IP_FINDER);
+
+        return cfg;
+    }
+
+    /**
+     * @return Node count for this test.
+     */
+    private int nodeCount() {
+        return 4;
+    }
+
+    /**
+     * @return {@code True} if near cache should be enabled.
+     */
+    protected boolean nearEnabled() {
+        return false;
+    }
+
+    /** {@inheritDoc} */
+    @SuppressWarnings("unchecked")
+    @Override protected void beforeTestsStarted() throws Exception {
+        startGridsMultiThreaded(nodeCount());
+
+        CacheConfiguration firstCfg = new CacheConfiguration(FIRST_CACHE);
+        firstCfg.setBackups(1);
+        firstCfg.setAtomicityMode(atomicityMode());
+        firstCfg.setWriteSynchronizationMode(FULL_SYNC);
+
+        grid(0).createCache(firstCfg);
+
+        CacheConfiguration secondCfg = new CacheConfiguration(SECOND_CACHE);
+        secondCfg.setBackups(1);
+        secondCfg.setAtomicityMode(atomicityMode());
+        secondCfg.setWriteSynchronizationMode(FULL_SYNC);
+
+        if (nearEnabled())
+            secondCfg.setNearConfiguration(new NearCacheConfiguration());
+
+        grid(0).createCache(secondCfg);
+    }
+
+    /**
+     * @return Atomicity mode.
+     */
+    public abstract CacheAtomicityMode atomicityMode();
+
+    /**
+     * @param concurrency Concurrency.
+     * @param isolation Isolation.
+     * @throws Exception If failed.
+     */
+    protected void checkTxsSingleOp(TransactionConcurrency concurrency, TransactionIsolation isolation) throws Exception {
+        Map<Integer, String> firstCheck = new HashMap<>();
+        Map<Integer, String> secondCheck = new HashMap<>();
+
+        for (int i = 0; i < TX_CNT; i++) {
+            int grid = ThreadLocalRandom.current().nextInt(nodeCount());
+
+            IgniteCache<Integer, String> first = grid(grid).cache(FIRST_CACHE);
+            IgniteCache<Integer, String> second = grid(grid).cache(SECOND_CACHE);
+
+            try (Transaction tx = grid(grid).transactions().txStart(concurrency, isolation)) {
+                try {
+                    int size = ThreadLocalRandom.current().nextInt(24) + 1;
+
+                    for (int k = 0; k < size; k++) {
+                        boolean rnd = ThreadLocalRandom.current().nextBoolean();
+
+                        IgniteCache<Integer, String> cache = rnd ? first : second;
+                        Map<Integer, String> check = rnd ? firstCheck : secondCheck;
+
+                        String val = rnd ? "first" + i : "second" + i;
+
+                        cache.put(k, val);
+                        check.put(k, val);
+                    }
+
+                    tx.commit();
+                }
+                catch (Throwable e) {
+                    e.printStackTrace();
+
+                    throw e;
+                }
+            }
+
+            if (i > 0 && i % 100 == 0)
+                info("Finished iteration: " + i);
+        }
+
+        for (int g = 0; g < nodeCount(); g++) {
+            IgniteEx grid = grid(g);
+
+            assertEquals(0, grid.context().cache().context().tm().idMapSize());
+
+            ClusterNode locNode = grid.localNode();
+
+            IgniteCache<Object, Object> firstCache = grid.cache(FIRST_CACHE);
+
+            for (Map.Entry<Integer, String> entry : firstCheck.entrySet()) {
+                boolean primary = grid.affinity(FIRST_CACHE).isPrimary(locNode, entry.getKey());
+
+                boolean backup = grid.affinity(FIRST_CACHE).isBackup(locNode, entry.getKey());
+
+                assertEquals("Invalid value found first cache [primary=" + primary + ", backup=" + backup +
+                        ", node=" + locNode.id() + ", key=" + entry.getKey() + ']',
+                    entry.getValue(), firstCache.get(entry.getKey()));
+            }
+
+            for (Map.Entry<Integer, String> entry : secondCheck.entrySet()) {
+                boolean primary = grid.affinity(SECOND_CACHE).isPrimary(locNode, entry.getKey());
+
+                boolean backup = grid.affinity(SECOND_CACHE).isBackup(locNode, entry.getKey());
+
+                assertEquals("Invalid value found second cache [primary=" + primary + ", backup=" + backup +
+                        ", node=" + locNode.id() + ", key=" + entry.getKey() + ']',
+                    entry.getValue(), grid.cache(SECOND_CACHE).get(entry.getKey()));
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCrossCacheTxSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCrossCacheTxSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCrossCacheTxSelfTest.java
index 91c6685..3b0106c 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCrossCacheTxSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCrossCacheTxSelfTest.java
@@ -14,28 +14,10 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.apache.ignite.internal.processors.cache.distributed.dht;
 
-import java.util.HashMap;
-import java.util.Map;
-import java.util.concurrent.ThreadLocalRandom;
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cluster.ClusterNode;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.configuration.NearCacheConfiguration;
-import org.apache.ignite.internal.IgniteEx;
-import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
-import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
-import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
-import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
-import org.apache.ignite.transactions.Transaction;
-import org.apache.ignite.transactions.TransactionConcurrency;
-import org.apache.ignite.transactions.TransactionIsolation;
+import org.apache.ignite.cache.CacheAtomicityMode;
 
-import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
 import static org.apache.ignite.transactions.TransactionConcurrency.OPTIMISTIC;
 import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC;
 import static org.apache.ignite.transactions.TransactionIsolation.READ_COMMITTED;
@@ -43,65 +25,12 @@ import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_REA
 import static org.apache.ignite.transactions.TransactionIsolation.SERIALIZABLE;
 
 /**
- * Tests specific combinations of cross-cache transactions.
+ *
  */
-public class IgniteCrossCacheTxSelfTest extends GridCommonAbstractTest {
-    /** */
-    private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
-
-    /** */
-    private static final String FIRST_CACHE = "FirstCache";
-
-    /** */
-    private static final String SECOND_CACHE = "SecondCache";
-
-    /** */
-    private static final int TX_CNT = 500;
-
-    /** {@inheritDoc} */
-    @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
-        IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
-
-        ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setIpFinder(IP_FINDER);
-
-        return cfg;
-    }
-
-    /**
-     * @return Node count for this test.
-     */
-    private int nodeCount() {
-        return 4;
-    }
-
-    /**
-     * @return {@code True} if near cache should be enabled.
-     */
-    protected boolean nearEnabled() {
-        return false;
-    }
-
+public class IgniteCrossCacheTxSelfTest extends IgniteCrossCacheTxAbstractSelfTest {
     /** {@inheritDoc} */
-    @SuppressWarnings("unchecked")
-    @Override protected void beforeTestsStarted() throws Exception {
-        startGridsMultiThreaded(nodeCount());
-
-        CacheConfiguration firstCfg = new CacheConfiguration(FIRST_CACHE);
-        firstCfg.setBackups(1);
-        firstCfg.setAtomicityMode(TRANSACTIONAL);
-        firstCfg.setWriteSynchronizationMode(FULL_SYNC);
-
-        grid(0).createCache(firstCfg);
-
-        CacheConfiguration secondCfg = new CacheConfiguration(SECOND_CACHE);
-        secondCfg.setBackups(1);
-        secondCfg.setAtomicityMode(TRANSACTIONAL);
-        secondCfg.setWriteSynchronizationMode(FULL_SYNC);
-
-        if (nearEnabled())
-            secondCfg.setNearConfiguration(new NearCacheConfiguration());
-
-        grid(0).createCache(secondCfg);
+    @Override public CacheAtomicityMode atomicityMode() {
+        return CacheAtomicityMode.TRANSACTIONAL;
     }
 
     /**
@@ -139,78 +68,4 @@ public class IgniteCrossCacheTxSelfTest extends GridCommonAbstractTest {
         checkTxsSingleOp(OPTIMISTIC, SERIALIZABLE);
     }
 
-    /**
-     * @param concurrency Concurrency.
-     * @param isolation Isolation.
-     * @throws Exception If failed.
-     */
-    private void checkTxsSingleOp(TransactionConcurrency concurrency, TransactionIsolation isolation) throws Exception {
-        Map<Integer, String> firstCheck = new HashMap<>();
-        Map<Integer, String> secondCheck = new HashMap<>();
-
-        for (int i = 0; i < TX_CNT; i++) {
-            int grid = ThreadLocalRandom.current().nextInt(nodeCount());
-
-            IgniteCache<Integer, String> first = grid(grid).cache(FIRST_CACHE);
-            IgniteCache<Integer, String> second = grid(grid).cache(SECOND_CACHE);
-
-            try (Transaction tx = grid(grid).transactions().txStart(concurrency, isolation)) {
-                try {
-                    int size = ThreadLocalRandom.current().nextInt(24) + 1;
-
-                    for (int k = 0; k < size; k++) {
-                        boolean rnd = ThreadLocalRandom.current().nextBoolean();
-
-                        IgniteCache<Integer, String> cache = rnd ? first : second;
-                        Map<Integer, String> check = rnd ? firstCheck : secondCheck;
-
-                        String val = rnd ? "first" + i : "second" + i;
-
-                        cache.put(k, val);
-                        check.put(k, val);
-                    }
-
-                    tx.commit();
-                }
-                catch (Throwable e) {
-                    e.printStackTrace();
-
-                    throw e;
-                }
-            }
-
-            if (i > 0 && i % 100 == 0)
-                info("Finished iteration: " + i);
-        }
-
-        for (int g = 0; g < nodeCount(); g++) {
-            IgniteEx grid = grid(g);
-
-            assertEquals(0, grid.context().cache().context().tm().idMapSize());
-
-            ClusterNode locNode = grid.localNode();
-
-            IgniteCache<Object, Object> firstCache = grid.cache(FIRST_CACHE);
-
-            for (Map.Entry<Integer, String> entry : firstCheck.entrySet()) {
-                boolean primary = grid.affinity(FIRST_CACHE).isPrimary(locNode, entry.getKey());
-
-                boolean backup = grid.affinity(FIRST_CACHE).isBackup(locNode, entry.getKey());
-
-                assertEquals("Invalid value found first cache [primary=" + primary + ", backup=" + backup +
-                        ", node=" + locNode.id() + ", key=" + entry.getKey() + ']',
-                    entry.getValue(), firstCache.get(entry.getKey()));
-            }
-
-            for (Map.Entry<Integer, String> entry : secondCheck.entrySet()) {
-                boolean primary = grid.affinity(SECOND_CACHE).isPrimary(locNode, entry.getKey());
-
-                boolean backup = grid.affinity(SECOND_CACHE).isBackup(locNode, entry.getKey());
-
-                assertEquals("Invalid value found second cache [primary=" + primary + ", backup=" + backup +
-                        ", node=" + locNode.id() + ", key=" + entry.getKey() + ']',
-                    entry.getValue(), grid.cache(SECOND_CACHE).get(entry.getKey()));
-            }
-        }
-    }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearTxPreloadSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearTxPreloadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearTxPreloadSelfTest.java
index caf6cc7..96b932a 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearTxPreloadSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearTxPreloadSelfTest.java
@@ -21,6 +21,7 @@ import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.NearCacheConfiguration;
 import org.apache.ignite.internal.processors.cache.distributed.IgniteTxPreloadAbstractTest;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 
@@ -29,6 +30,13 @@ import static org.apache.ignite.cache.CacheMode.PARTITIONED;
  */
 public class GridCacheNearTxPreloadSelfTest extends IgniteTxPreloadAbstractTest {
     /** {@inheritDoc} */
+    @Override public void setUp() throws Exception {
+        MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE);
+
+        super.setUp();
+    }
+
+    /** {@inheritDoc} */
     @Override protected CacheMode cacheMode() {
         return PARTITIONED;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedEventSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedEventSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedEventSelfTest.java
index 1c79db7..54eb32d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedEventSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedEventSelfTest.java
@@ -21,6 +21,7 @@ import org.apache.ignite.cache.CacheWriteSynchronizationMode;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.NearCacheConfiguration;
 import org.apache.ignite.internal.processors.cache.distributed.GridCacheEventAbstractTest;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
@@ -31,6 +32,13 @@ import static org.apache.ignite.cache.CacheRebalanceMode.SYNC;
  */
 public class GridCachePartitionedEventSelfTest extends GridCacheEventAbstractTest {
     /** {@inheritDoc} */
+    @Override public void setUp() throws Exception {
+        MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_EVENTS);
+
+        super.setUp();
+    }
+
+    /** {@inheritDoc} */
     @Override protected CacheConfiguration cacheConfiguration(String igniteInstanceName) throws Exception {
         CacheConfiguration cfg = defaultCacheConfiguration();
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearOnlyTxTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearOnlyTxTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearOnlyTxTest.java
index ca12a99..d86fa91 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearOnlyTxTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearOnlyTxTest.java
@@ -29,6 +29,7 @@ import org.apache.ignite.configuration.NearCacheConfiguration;
 import org.apache.ignite.internal.IgniteInternalFuture;
 import org.apache.ignite.internal.processors.cache.IgniteCacheAbstractTest;
 import org.apache.ignite.testframework.GridTestUtils;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 import org.apache.ignite.transactions.Transaction;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
@@ -41,6 +42,13 @@ import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_REA
  */
 public class IgniteCacheNearOnlyTxTest extends IgniteCacheAbstractTest {
     /** {@inheritDoc} */
+    @Override public void setUp() throws Exception {
+        MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE);
+
+        super.setUp();
+    }
+
+    /** {@inheritDoc} */
     @Override protected int gridCount() {
         return 2;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/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 ad9bce0..76f0d17 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
@@ -22,6 +22,7 @@ import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.cache.CachePeekMode;
 import org.apache.ignite.configuration.NearCacheConfiguration;
 import org.apache.ignite.internal.processors.cache.GridCacheAbstractSelfTest;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 import org.apache.ignite.transactions.Transaction;
 
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
@@ -34,6 +35,13 @@ import static org.apache.ignite.transactions.TransactionIsolation.READ_COMMITTED
 @SuppressWarnings("RedundantMethodOverride")
 public class IgniteCacheNearReadCommittedTest extends GridCacheAbstractSelfTest {
     /** {@inheritDoc} */
+    @Override public void setUp() throws Exception {
+        MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE);
+
+        super.setUp();
+    }
+
+    /** {@inheritDoc} */
     @Override protected int gridCount() {
         return 2;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheLoadAllAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheLoadAllAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheLoadAllAbstractTest.java
index 6b4f976..3d9b7bd 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheLoadAllAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheLoadAllAbstractTest.java
@@ -22,6 +22,7 @@ import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
 import javax.cache.Cache;
 import javax.cache.configuration.Factory;
 import javax.cache.integration.CacheLoader;
@@ -34,7 +35,7 @@ import org.apache.ignite.cache.affinity.Affinity;
 import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.internal.processors.cache.IgniteCacheAbstractTest;
-import java.util.concurrent.ConcurrentHashMap;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 
 /**
  * Test for {@link Cache#loadAll(Set, boolean, CompletionListener)}.
@@ -47,6 +48,13 @@ public abstract class IgniteCacheLoadAllAbstractTest extends IgniteCacheAbstract
     private static ConcurrentHashMap<Object, Object> storeMap;
 
     /** {@inheritDoc} */
+    @Override public void setUp() throws Exception {
+        MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE);
+
+        super.setUp();
+    }
+
+    /** {@inheritDoc} */
     @SuppressWarnings("unchecked")
     @Override protected CacheConfiguration cacheConfiguration(String igniteInstanceName) throws Exception {
         CacheConfiguration ccfg = super.cacheConfiguration(igniteInstanceName);

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLoaderWriterTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLoaderWriterTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLoaderWriterTest.java
index fc4ec78..75a4cd9 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLoaderWriterTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLoaderWriterTest.java
@@ -20,6 +20,7 @@ package org.apache.ignite.internal.processors.cache.integration;
 import org.apache.ignite.cache.CacheAtomicityMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.configuration.NearCacheConfiguration;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
@@ -29,6 +30,13 @@ import static org.apache.ignite.cache.CacheMode.PARTITIONED;
  */
 public class IgniteCacheTxLoaderWriterTest extends IgniteCacheLoaderWriterAbstractTest {
     /** {@inheritDoc} */
+    @Override public void setUp() throws Exception {
+        MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE);
+
+        super.setUp();
+    }
+
+    /** {@inheritDoc} */
     @Override protected int gridCount() {
         return 3;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalLoadAllTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalLoadAllTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalLoadAllTest.java
index 97374bf..645a9ff 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalLoadAllTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalLoadAllTest.java
@@ -20,6 +20,7 @@ package org.apache.ignite.internal.processors.cache.integration;
 import org.apache.ignite.cache.CacheAtomicityMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.configuration.NearCacheConfiguration;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
 import static org.apache.ignite.cache.CacheMode.LOCAL;
@@ -29,6 +30,12 @@ import static org.apache.ignite.cache.CacheMode.LOCAL;
  */
 public class IgniteCacheTxLocalLoadAllTest extends IgniteCacheLoadAllAbstractTest {
     /** {@inheritDoc} */
+    @Override public void setUp() throws Exception {
+        MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE);
+
+        super.setUp();
+    }
+    /** {@inheritDoc} */
     @Override protected int gridCount() {
         return 1;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoLoadPreviousValueTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoLoadPreviousValueTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoLoadPreviousValueTest.java
index 686b4ca..2e52a63 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoLoadPreviousValueTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoLoadPreviousValueTest.java
@@ -20,6 +20,7 @@ package org.apache.ignite.internal.processors.cache.integration;
 import org.apache.ignite.cache.CacheAtomicityMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.configuration.NearCacheConfiguration;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
 import static org.apache.ignite.cache.CacheMode.LOCAL;
@@ -29,6 +30,13 @@ import static org.apache.ignite.cache.CacheMode.LOCAL;
  */
 public class IgniteCacheTxLocalNoLoadPreviousValueTest extends IgniteCacheNoLoadPreviousValueAbstractTest {
     /** {@inheritDoc} */
+    @Override public void setUp() throws Exception {
+        MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE);
+
+        super.setUp();
+    }
+
+    /** {@inheritDoc} */
     @Override protected int gridCount() {
         return 1;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoReadThroughTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoReadThroughTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoReadThroughTest.java
index 5235c9d..e25a965 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoReadThroughTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoReadThroughTest.java
@@ -20,6 +20,7 @@ package org.apache.ignite.internal.processors.cache.integration;
 import org.apache.ignite.cache.CacheAtomicityMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.configuration.NearCacheConfiguration;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
 import static org.apache.ignite.cache.CacheMode.LOCAL;
@@ -29,6 +30,13 @@ import static org.apache.ignite.cache.CacheMode.LOCAL;
  */
 public class IgniteCacheTxLocalNoReadThroughTest extends IgniteCacheNoReadThroughAbstractTest {
     /** {@inheritDoc} */
+    @Override public void setUp() throws Exception {
+        MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE);
+
+        super.setUp();
+    }
+
+    /** {@inheritDoc} */
     @Override protected int gridCount() {
         return 1;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoWriteThroughTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoWriteThroughTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoWriteThroughTest.java
index 7985c57..ddc9352 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoWriteThroughTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoWriteThroughTest.java
@@ -20,6 +20,7 @@ package org.apache.ignite.internal.processors.cache.integration;
 import org.apache.ignite.cache.CacheAtomicityMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.configuration.NearCacheConfiguration;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
 import static org.apache.ignite.cache.CacheMode.LOCAL;
@@ -29,6 +30,13 @@ import static org.apache.ignite.cache.CacheMode.LOCAL;
  */
 public class IgniteCacheTxLocalNoWriteThroughTest extends IgniteCacheNoWriteThroughAbstractTest {
     /** {@inheritDoc} */
+    @Override public void setUp() throws Exception {
+        MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE);
+
+        super.setUp();
+    }
+
+    /** {@inheritDoc} */
     @Override protected int gridCount() {
         return 1;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNearEnabledNoLoadPreviousValueTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNearEnabledNoLoadPreviousValueTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNearEnabledNoLoadPreviousValueTest.java
index ce42e39..c343402 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNearEnabledNoLoadPreviousValueTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNearEnabledNoLoadPreviousValueTest.java
@@ -18,12 +18,20 @@
 package org.apache.ignite.internal.processors.cache.integration;
 
 import org.apache.ignite.configuration.NearCacheConfiguration;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 
 /**
  *
  */
 public class IgniteCacheTxNearEnabledNoLoadPreviousValueTest extends IgniteCacheTxNoLoadPreviousValueTest {
     /** {@inheritDoc} */
+    @Override public void setUp() throws Exception {
+        MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE);
+
+        super.setUp();
+    }
+
+    /** {@inheritDoc} */
     @Override protected NearCacheConfiguration nearConfiguration() {
         return new NearCacheConfiguration();
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNearEnabledNoWriteThroughTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNearEnabledNoWriteThroughTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNearEnabledNoWriteThroughTest.java
index ea12cce..be9bc34 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNearEnabledNoWriteThroughTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNearEnabledNoWriteThroughTest.java
@@ -18,12 +18,20 @@
 package org.apache.ignite.internal.processors.cache.integration;
 
 import org.apache.ignite.configuration.NearCacheConfiguration;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 
 /**
  *
  */
 public class IgniteCacheTxNearEnabledNoWriteThroughTest extends IgniteCacheTxNoWriteThroughTest {
     /** {@inheritDoc} */
+    @Override public void setUp() throws Exception {
+        MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE);
+
+        super.setUp();
+    }
+
+    /** {@inheritDoc} */
     @Override protected NearCacheConfiguration nearConfiguration() {
         return new NearCacheConfiguration();
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNoLoadPreviousValueTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNoLoadPreviousValueTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNoLoadPreviousValueTest.java
index ce9ef9b..094aa1a 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNoLoadPreviousValueTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNoLoadPreviousValueTest.java
@@ -20,6 +20,7 @@ package org.apache.ignite.internal.processors.cache.integration;
 import org.apache.ignite.cache.CacheAtomicityMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.configuration.NearCacheConfiguration;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
@@ -29,6 +30,13 @@ import static org.apache.ignite.cache.CacheMode.PARTITIONED;
  */
 public class IgniteCacheTxNoLoadPreviousValueTest extends IgniteCacheNoLoadPreviousValueAbstractTest {
     /** {@inheritDoc} */
+    @Override public void setUp() throws Exception {
+        MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE);
+
+        super.setUp();
+    }
+
+    /** {@inheritDoc} */
     @Override protected int gridCount() {
         return 3;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNoReadThroughTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNoReadThroughTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNoReadThroughTest.java
index 90bc768..a94caff 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNoReadThroughTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNoReadThroughTest.java
@@ -20,6 +20,7 @@ package org.apache.ignite.internal.processors.cache.integration;
 import org.apache.ignite.cache.CacheAtomicityMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.configuration.NearCacheConfiguration;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
@@ -29,6 +30,13 @@ import static org.apache.ignite.cache.CacheMode.PARTITIONED;
  */
 public class IgniteCacheTxNoReadThroughTest extends IgniteCacheNoReadThroughAbstractTest {
     /** {@inheritDoc} */
+    @Override public void setUp() throws Exception {
+        MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE);
+
+        super.setUp();
+    }
+
+    /** {@inheritDoc} */
     @Override protected int gridCount() {
         return 3;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNoWriteThroughTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNoWriteThroughTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNoWriteThroughTest.java
index 325d969..e984dfb 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNoWriteThroughTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNoWriteThroughTest.java
@@ -20,6 +20,7 @@ package org.apache.ignite.internal.processors.cache.integration;
 import org.apache.ignite.cache.CacheAtomicityMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.configuration.NearCacheConfiguration;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
@@ -29,6 +30,13 @@ import static org.apache.ignite.cache.CacheMode.PARTITIONED;
  */
 public class IgniteCacheTxNoWriteThroughTest extends IgniteCacheNoWriteThroughAbstractTest {
     /** {@inheritDoc} */
+    @Override public void setUp() throws Exception {
+        MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE);
+
+        super.setUp();
+    }
+
+    /** {@inheritDoc} */
     @Override protected int gridCount() {
         return 3;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxStoreSessionTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxStoreSessionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxStoreSessionTest.java
index b9e884b..77f54af 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxStoreSessionTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxStoreSessionTest.java
@@ -25,6 +25,7 @@ import org.apache.ignite.cache.CacheAtomicityMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.configuration.NearCacheConfiguration;
 import org.apache.ignite.internal.util.typedef.F;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 import org.apache.ignite.transactions.Transaction;
 import org.apache.ignite.transactions.TransactionConcurrency;
 import org.apache.ignite.transactions.TransactionIsolation;
@@ -39,6 +40,13 @@ import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_REA
  */
 public class IgniteCacheTxStoreSessionTest extends IgniteCacheStoreSessionAbstractTest {
     /** {@inheritDoc} */
+    @Override public void setUp() throws Exception {
+        MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE);
+
+        super.setUp();
+    }
+
+    /** {@inheritDoc} */
     @Override protected int gridCount() {
         return 3;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxStoreSessionWriteBehindCoalescingTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxStoreSessionWriteBehindCoalescingTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxStoreSessionWriteBehindCoalescingTest.java
index a90b4f1..ea2b8a3 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxStoreSessionWriteBehindCoalescingTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxStoreSessionWriteBehindCoalescingTest.java
@@ -22,6 +22,7 @@ import javax.cache.Cache;
 import javax.cache.integration.CacheWriterException;
 import org.apache.ignite.cache.CacheAtomicityMode;
 import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
 
@@ -31,6 +32,13 @@ import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
  */
 public class IgniteCacheTxStoreSessionWriteBehindCoalescingTest extends IgniteCacheStoreSessionWriteBehindAbstractTest {
     /** {@inheritDoc} */
+    @Override public void setUp() throws Exception {
+        MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE);
+
+        super.setUp();
+    }
+
+    /** {@inheritDoc} */
     @Override protected CacheAtomicityMode atomicityMode() {
         return TRANSACTIONAL;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxStoreSessionWriteBehindTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxStoreSessionWriteBehindTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxStoreSessionWriteBehindTest.java
index b72aba3..ae6bcae 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxStoreSessionWriteBehindTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxStoreSessionWriteBehindTest.java
@@ -18,6 +18,7 @@
 package org.apache.ignite.internal.processors.cache.integration;
 
 import org.apache.ignite.cache.CacheAtomicityMode;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
 
@@ -26,6 +27,13 @@ import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
  */
 public class IgniteCacheTxStoreSessionWriteBehindTest extends IgniteCacheStoreSessionWriteBehindAbstractTest {
     /** {@inheritDoc} */
+    @Override public void setUp() throws Exception {
+        MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE);
+
+        super.setUp();
+    }
+
+    /** {@inheritDoc} */
     @Override protected CacheAtomicityMode atomicityMode() {
         return TRANSACTIONAL;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryLocalTransactionalSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryLocalTransactionalSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryLocalTransactionalSelfTest.java
index d7fc938..b217703 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryLocalTransactionalSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryLocalTransactionalSelfTest.java
@@ -19,6 +19,7 @@ package org.apache.ignite.internal.processors.cache.version;
 
 import org.apache.ignite.cache.CacheAtomicityMode;
 import org.apache.ignite.cache.CacheMode;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 
 /**
  *
@@ -38,4 +39,12 @@ public class CacheVersionedEntryLocalTransactionalSelfTest extends CacheVersione
     @Override protected CacheAtomicityMode atomicityMode() {
         return CacheAtomicityMode.TRANSACTIONAL;
     }
+
+    /** {@inheritDoc} */
+    @Override public void setUp() throws Exception {
+        MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE);
+
+        super.setUp();
+    }
+
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/testframework/MvccFeatureChecker.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/MvccFeatureChecker.java b/modules/core/src/test/java/org/apache/ignite/testframework/MvccFeatureChecker.java
index 183c2eb..c70d447 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/MvccFeatureChecker.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/MvccFeatureChecker.java
@@ -19,10 +19,15 @@ package org.apache.ignite.testframework;
 
 import org.apache.ignite.IgniteSystemProperties;
 import org.apache.ignite.cache.CacheMode;
+import org.apache.ignite.internal.processors.query.IgniteSQLException;
+import org.apache.ignite.internal.util.typedef.X;
 import org.apache.ignite.transactions.TransactionConcurrency;
 import org.apache.ignite.transactions.TransactionIsolation;
 
 import static org.apache.ignite.IgniteSystemProperties.IGNITE_FORCE_MVCC_MODE_IN_TESTS;
+import static org.apache.ignite.internal.processors.cache.query.IgniteQueryErrorCode.TRANSACTION_SERIALIZATION_ERROR;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.fail;
 
 /**
@@ -107,11 +112,26 @@ public class MvccFeatureChecker {
     }
 
     /**
+     * TODO proper exception handling after https://issues.apache.org/jira/browse/IGNITE-9470
+     * Checks if given exception was caused by MVCC write conflict.
+     *
+     * @param e Exception.
+     */
+    public static void assertMvccWriteConflict(Exception e) {
+        IgniteSQLException sqlEx = X.cause(e, IgniteSQLException.class);
+
+        assertNotNull(sqlEx);
+
+        assertEquals(TRANSACTION_SERIALIZATION_ERROR, sqlEx.statusCode());
+    }
+
+    /**
      * Fails if feature is not supported in Mvcc mode.
      *
      * @param feature Mvcc feature.
      * @throws AssertionError If failed.
      */
+    @SuppressWarnings("fallthrough")
     private static void validateFeature(Feature feature) {
         switch (feature) {
             case NEAR_CACHE:

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite2.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite2.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite2.java
index 5818653..3c070bc 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite2.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite2.java
@@ -115,6 +115,7 @@ public class IgniteCacheMvccTestSuite2 extends TestSuite {
         ignoredTests.add(CacheOptimisticTransactionsWithFilterSingleServerTest.class);
         ignoredTests.add(CacheOptimisticTransactionsWithFilterTest.class);
 
+        // Irrelevant Tx tests.
         ignoredTests.add(IgniteOnePhaseCommitInvokeTest.class);
         ignoredTests.add(IgniteOnePhaseCommitNearReadersTest.class);
         ignoredTests.add(GridCacheDhtPreloadOnheapSelfTest.class);

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite4.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite4.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite4.java
new file mode 100644
index 0000000..9933633
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite4.java
@@ -0,0 +1,197 @@
+/*
+ * 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.testsuites;
+
+import java.util.HashSet;
+import junit.framework.TestSuite;
+import org.apache.ignite.IgniteSystemProperties;
+import org.apache.ignite.cache.store.CacheStoreListenerRWThroughDisabledAtomicCacheTest;
+import org.apache.ignite.internal.processors.cache.CacheConnectionLeakStoreTxTest;
+import org.apache.ignite.internal.processors.cache.CacheGetEntryOptimisticReadCommittedSelfTest;
+import org.apache.ignite.internal.processors.cache.CacheGetEntryOptimisticRepeatableReadSelfTest;
+import org.apache.ignite.internal.processors.cache.CacheGetEntryOptimisticSerializableSelfTest;
+import org.apache.ignite.internal.processors.cache.CacheGetEntryPessimisticReadCommittedSelfTest;
+import org.apache.ignite.internal.processors.cache.CacheGetEntryPessimisticRepeatableReadSelfTest;
+import org.apache.ignite.internal.processors.cache.CacheGetEntryPessimisticSerializableSelfTest;
+import org.apache.ignite.internal.processors.cache.CacheOffheapMapEntrySelfTest;
+import org.apache.ignite.internal.processors.cache.CacheReadThroughAtomicRestartSelfTest;
+import org.apache.ignite.internal.processors.cache.CacheReadThroughLocalAtomicRestartSelfTest;
+import org.apache.ignite.internal.processors.cache.CacheReadThroughReplicatedAtomicRestartSelfTest;
+import org.apache.ignite.internal.processors.cache.CacheStoreUsageMultinodeDynamicStartAtomicTest;
+import org.apache.ignite.internal.processors.cache.CacheStoreUsageMultinodeStaticStartAtomicTest;
+import org.apache.ignite.internal.processors.cache.CacheTxNotAllowReadFromBackupTest;
+import org.apache.ignite.internal.processors.cache.GridCacheMultinodeUpdateAtomicNearEnabledSelfTest;
+import org.apache.ignite.internal.processors.cache.GridCacheMultinodeUpdateAtomicSelfTest;
+import org.apache.ignite.internal.processors.cache.GridCacheVersionMultinodeTest;
+import org.apache.ignite.internal.processors.cache.IgniteCacheAtomicCopyOnReadDisabledTest;
+import org.apache.ignite.internal.processors.cache.IgniteCacheAtomicLocalPeekModesTest;
+import org.apache.ignite.internal.processors.cache.IgniteCacheAtomicLocalStoreValueTest;
+import org.apache.ignite.internal.processors.cache.IgniteCacheAtomicNearEnabledStoreValueTest;
+import org.apache.ignite.internal.processors.cache.IgniteCacheAtomicNearPeekModesTest;
+import org.apache.ignite.internal.processors.cache.IgniteCacheAtomicPeekModesTest;
+import org.apache.ignite.internal.processors.cache.IgniteCacheAtomicReplicatedPeekModesTest;
+import org.apache.ignite.internal.processors.cache.IgniteCacheAtomicStoreValueTest;
+import org.apache.ignite.internal.processors.cache.IgniteCacheConfigurationDefaultTemplateTest;
+import org.apache.ignite.internal.processors.cache.IgniteCacheContainsKeyAtomicTest;
+import org.apache.ignite.internal.processors.cache.IgniteCacheInvokeReadThroughSingleNodeTest;
+import org.apache.ignite.internal.processors.cache.IgniteCacheInvokeReadThroughTest;
+import org.apache.ignite.internal.processors.cache.IgniteCacheStartTest;
+import org.apache.ignite.internal.processors.cache.IgniteClientCacheInitializationFailTest;
+import org.apache.ignite.internal.processors.cache.IgniteDynamicCacheStartNoExchangeTimeoutTest;
+import org.apache.ignite.internal.processors.cache.IgniteDynamicCacheStartSelfTest;
+import org.apache.ignite.internal.processors.cache.IgniteDynamicCacheStartStopConcurrentTest;
+import org.apache.ignite.internal.processors.cache.IgniteDynamicClientCacheStartSelfTest;
+import org.apache.ignite.internal.processors.cache.IgniteExchangeFutureHistoryTest;
+import org.apache.ignite.internal.processors.cache.IgniteInternalCacheTypesTest;
+import org.apache.ignite.internal.processors.cache.IgniteStartCacheInTransactionAtomicSelfTest;
+import org.apache.ignite.internal.processors.cache.IgniteSystemCacheOnClientTest;
+import org.apache.ignite.internal.processors.cache.MarshallerCacheJobRunNodeRestartTest;
+import org.apache.ignite.internal.processors.cache.distributed.CacheDiscoveryDataConcurrentJoinTest;
+import org.apache.ignite.internal.processors.cache.distributed.CacheGetFutureHangsSelfTest;
+import org.apache.ignite.internal.processors.cache.distributed.CacheGroupsPreloadTest;
+import org.apache.ignite.internal.processors.cache.distributed.CacheNoValueClassOnServerNodeTest;
+import org.apache.ignite.internal.processors.cache.distributed.CacheResultIsNotNullOnPartitionLossTest;
+import org.apache.ignite.internal.processors.cache.distributed.IgniteCacheCreatePutTest;
+import org.apache.ignite.internal.processors.cache.distributed.IgniteCacheFailedUpdateResponseTest;
+import org.apache.ignite.internal.processors.cache.distributed.IgniteCacheReadFromBackupTest;
+import org.apache.ignite.internal.processors.cache.distributed.IgniteCacheSingleGetMessageTest;
+import org.apache.ignite.internal.processors.cache.distributed.dht.IgniteCrossCacheMvccTxSelfTest;
+import org.apache.ignite.internal.processors.cache.distributed.dht.IgniteCrossCacheTxSelfTest;
+import org.apache.ignite.internal.processors.cache.integration.IgniteCacheAtomicLoadAllTest;
+import org.apache.ignite.internal.processors.cache.integration.IgniteCacheAtomicLoaderWriterTest;
+import org.apache.ignite.internal.processors.cache.integration.IgniteCacheAtomicLocalLoadAllTest;
+import org.apache.ignite.internal.processors.cache.integration.IgniteCacheAtomicLocalNoLoadPreviousValueTest;
+import org.apache.ignite.internal.processors.cache.integration.IgniteCacheAtomicLocalNoReadThroughTest;
+import org.apache.ignite.internal.processors.cache.integration.IgniteCacheAtomicLocalNoWriteThroughTest;
+import org.apache.ignite.internal.processors.cache.integration.IgniteCacheAtomicNearEnabledNoLoadPreviousValueTest;
+import org.apache.ignite.internal.processors.cache.integration.IgniteCacheAtomicNearEnabledNoReadThroughTest;
+import org.apache.ignite.internal.processors.cache.integration.IgniteCacheAtomicNearEnabledNoWriteThroughTest;
+import org.apache.ignite.internal.processors.cache.integration.IgniteCacheAtomicNoLoadPreviousValueTest;
+import org.apache.ignite.internal.processors.cache.integration.IgniteCacheAtomicNoReadThroughTest;
+import org.apache.ignite.internal.processors.cache.integration.IgniteCacheAtomicNoWriteThroughTest;
+import org.apache.ignite.internal.processors.cache.integration.IgniteCacheAtomicStoreSessionTest;
+import org.apache.ignite.internal.processors.cache.integration.IgniteCacheAtomicStoreSessionWriteBehindTest;
+import org.apache.ignite.internal.processors.cache.integration.IgniteCacheJdbcBlobStoreNodeRestartTest;
+import org.apache.ignite.internal.processors.cache.version.CacheVersionedEntryLocalAtomicSwapDisabledSelfTest;
+import org.apache.ignite.internal.processors.cache.version.CacheVersionedEntryPartitionedAtomicSelfTest;
+import org.apache.ignite.internal.processors.cache.version.CacheVersionedEntryReplicatedAtomicSelfTest;
+
+/**
+ *
+ */
+public class IgniteCacheMvccTestSuite4 extends TestSuite {
+    /**
+     * @return IgniteCache test suite.
+     */
+    public static TestSuite suite() {
+        System.setProperty(IgniteSystemProperties.IGNITE_FORCE_MVCC_MODE_IN_TESTS, "true");
+
+        HashSet<Class> ignoredTests = new HashSet<>(128);
+
+        // Skip classes that already contains Mvcc tests
+        ignoredTests.add(GridCacheVersionMultinodeTest.class);
+        ignoredTests.add(IgniteCacheCreatePutTest.class);
+        ignoredTests.add(IgniteClientCacheInitializationFailTest.class);
+        ignoredTests.add(IgniteCacheFailedUpdateResponseTest.class);
+        ignoredTests.add(CacheGetEntryPessimisticRepeatableReadSelfTest.class);
+        ignoredTests.add(CacheTxNotAllowReadFromBackupTest.class);
+        ignoredTests.add(CacheOffheapMapEntrySelfTest.class);
+        ignoredTests.add(CacheGroupsPreloadTest.class);
+        ignoredTests.add(CacheConnectionLeakStoreTxTest.class);
+        ignoredTests.add(IgniteCacheInvokeReadThroughTest.class);
+        ignoredTests.add(IgniteCacheInvokeReadThroughSingleNodeTest.class);
+        ignoredTests.add(IgniteDynamicCacheStartSelfTest.class);
+        ignoredTests.add(IgniteDynamicClientCacheStartSelfTest.class);
+        ignoredTests.add(IgniteDynamicCacheStartNoExchangeTimeoutTest.class);
+        ignoredTests.add(IgniteCacheSingleGetMessageTest.class);
+        ignoredTests.add(IgniteCacheReadFromBackupTest.class);
+
+        // Optimistic tx tests.
+        ignoredTests.add(CacheGetEntryOptimisticReadCommittedSelfTest.class);
+        ignoredTests.add(CacheGetEntryOptimisticRepeatableReadSelfTest.class);
+        ignoredTests.add(CacheGetEntryOptimisticSerializableSelfTest.class);
+
+        // Irrelevant Tx tests.
+        ignoredTests.add(CacheGetEntryPessimisticReadCommittedSelfTest.class);
+        ignoredTests.add(CacheGetEntryPessimisticSerializableSelfTest.class);
+
+        // Atomic cache tests.
+        ignoredTests.add(GridCacheMultinodeUpdateAtomicSelfTest.class);
+        ignoredTests.add(GridCacheMultinodeUpdateAtomicNearEnabledSelfTest.class);
+        ignoredTests.add(IgniteCacheAtomicLoadAllTest.class);
+        ignoredTests.add(IgniteCacheAtomicLocalLoadAllTest.class);
+        ignoredTests.add(IgniteCacheAtomicLoaderWriterTest.class);
+        ignoredTests.add(IgniteCacheAtomicStoreSessionTest.class);
+        ignoredTests.add(IgniteCacheAtomicStoreSessionWriteBehindTest.class);
+        ignoredTests.add(IgniteCacheAtomicNoReadThroughTest.class);
+        ignoredTests.add(IgniteCacheAtomicNearEnabledNoReadThroughTest.class);
+        ignoredTests.add(IgniteCacheAtomicLocalNoReadThroughTest.class);
+        ignoredTests.add(IgniteCacheAtomicNoLoadPreviousValueTest.class);
+        ignoredTests.add(IgniteCacheAtomicNearEnabledNoLoadPreviousValueTest.class);
+        ignoredTests.add(IgniteCacheAtomicLocalNoLoadPreviousValueTest.class);
+        ignoredTests.add(IgniteCacheAtomicNoWriteThroughTest.class);
+        ignoredTests.add(IgniteCacheAtomicNearEnabledNoWriteThroughTest.class);
+        ignoredTests.add(IgniteCacheAtomicLocalNoWriteThroughTest.class);
+        ignoredTests.add(IgniteCacheAtomicPeekModesTest.class);
+        ignoredTests.add(IgniteCacheAtomicNearPeekModesTest.class);
+        ignoredTests.add(IgniteCacheAtomicReplicatedPeekModesTest.class);
+        ignoredTests.add(IgniteCacheAtomicLocalPeekModesTest.class);
+        ignoredTests.add(IgniteCacheAtomicCopyOnReadDisabledTest.class);
+        ignoredTests.add(IgniteCacheAtomicLocalStoreValueTest.class);
+        ignoredTests.add(IgniteCacheAtomicStoreValueTest.class);
+        ignoredTests.add(IgniteCacheAtomicNearEnabledStoreValueTest.class);
+        ignoredTests.add(CacheStoreListenerRWThroughDisabledAtomicCacheTest.class);
+        ignoredTests.add(CacheStoreUsageMultinodeStaticStartAtomicTest.class);
+        ignoredTests.add(CacheStoreUsageMultinodeDynamicStartAtomicTest.class);
+        ignoredTests.add(IgniteStartCacheInTransactionAtomicSelfTest.class);
+        ignoredTests.add(CacheReadThroughReplicatedAtomicRestartSelfTest.class);
+        ignoredTests.add(CacheReadThroughLocalAtomicRestartSelfTest.class);
+        ignoredTests.add(CacheReadThroughAtomicRestartSelfTest.class);
+        ignoredTests.add(CacheVersionedEntryLocalAtomicSwapDisabledSelfTest.class);
+        ignoredTests.add(CacheVersionedEntryPartitionedAtomicSelfTest.class);
+        ignoredTests.add(CacheGetFutureHangsSelfTest.class);
+        ignoredTests.add(IgniteCacheContainsKeyAtomicTest.class);
+        ignoredTests.add(CacheVersionedEntryReplicatedAtomicSelfTest.class);
+        ignoredTests.add(CacheResultIsNotNullOnPartitionLossTest.class);
+
+        // Other non-tx tests.
+        ignoredTests.add(IgniteDynamicCacheStartStopConcurrentTest.class);
+        ignoredTests.add(IgniteCacheConfigurationDefaultTemplateTest.class);
+        ignoredTests.add(IgniteCacheStartTest.class);
+        ignoredTests.add(CacheDiscoveryDataConcurrentJoinTest.class);
+        ignoredTests.add(IgniteCacheJdbcBlobStoreNodeRestartTest.class);
+        ignoredTests.add(IgniteInternalCacheTypesTest.class);
+        ignoredTests.add(IgniteExchangeFutureHistoryTest.class);
+        ignoredTests.add(CacheNoValueClassOnServerNodeTest.class);
+        ignoredTests.add(IgniteSystemCacheOnClientTest.class);
+        ignoredTests.add(MarshallerCacheJobRunNodeRestartTest.class);
+
+        // Skip classes which Mvcc implementations are added in this method below.
+        // TODO IGNITE-10175: refactor these tests (use assume) to support both mvcc and non-mvcc modes after moving to JUnit4/5.
+        ignoredTests.add(IgniteCrossCacheTxSelfTest.class);
+
+        TestSuite suite = new TestSuite("IgniteCache Mvcc Test Suite part 4");
+
+        suite.addTest(IgniteCacheTestSuite4.suite(ignoredTests));
+
+        // Add Mvcc clones.
+        suite.addTestSuite(IgniteCrossCacheMvccTxSelfTest.class);
+
+        return suite;
+    }
+}


[35/37] ignite git commit: IGNITE-10382: [ML] Move datasets from example to ml module

Posted by ak...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/86a788f3/examples/src/main/resources/datasets/iris.txt
----------------------------------------------------------------------
diff --git a/examples/src/main/resources/datasets/iris.txt b/examples/src/main/resources/datasets/iris.txt
deleted file mode 100644
index 18f5f7c..0000000
--- a/examples/src/main/resources/datasets/iris.txt
+++ /dev/null
@@ -1,150 +0,0 @@
-1.0	5.1	3.5	1.4	0.2
-1.0	4.9	3.0	1.4	0.2
-1.0	4.7	3.2	1.3	0.2
-1.0	4.6	3.1	1.5	0.2
-1.0	5.0	3.6	1.4	0.2
-1.0	5.4	3.9	1.7	0.4
-1.0	4.6	3.4	1.4	0.3
-1.0	5.0	3.4	1.5	0.2
-1.0	4.4	2.9	1.4	0.2
-1.0	4.9	3.1	1.5	0.1
-1.0	5.4	3.7	1.5	0.2
-1.0	4.8	3.4	1.6	0.2
-1.0	4.8	3.0	1.4	0.1
-1.0	4.3	3.0	1.1	0.1
-1.0	5.8	4.0	1.2	0.2
-1.0	5.7	4.4	1.5	0.4
-1.0	5.4	3.9	1.3	0.4
-1.0	5.1	3.5	1.4	0.3
-1.0	5.7	3.8	1.7	0.3
-1.0	5.1	3.8	1.5	0.3
-1.0	5.4	3.4	1.7	0.2
-1.0	5.1	3.7	1.5	0.4
-1.0	4.6	3.6	1.0	0.2
-1.0	5.1	3.3	1.7	0.5
-1.0	4.8	3.4	1.9	0.2
-1.0	5.0	3.0	1.6	0.2
-1.0	5.0	3.4	1.6	0.4
-1.0	5.2	3.5	1.5	0.2
-1.0	5.2	3.4	1.4	0.2
-1.0	4.7	3.2	1.6	0.2
-1.0	4.8	3.1	1.6	0.2
-1.0	5.4	3.4	1.5	0.4
-1.0	5.2	4.1	1.5	0.1
-1.0	5.5	4.2	1.4	0.2
-1.0	4.9	3.1	1.5	0.1
-1.0	5.0	3.2	1.2	0.2
-1.0	5.5	3.5	1.3	0.2
-1.0	4.9	3.1	1.5	0.1
-1.0	4.4	3.0	1.3	0.2
-1.0	5.1	3.4	1.5	0.2
-1.0	5.0	3.5	1.3	0.3
-1.0	4.5	2.3	1.3	0.3
-1.0	4.4	3.2	1.3	0.2
-1.0	5.0	3.5	1.6	0.6
-1.0	5.1	3.8	1.9	0.4
-1.0	4.8	3.0	1.4	0.3
-1.0	5.1	3.8	1.6	0.2
-1.0	4.6	3.2	1.4	0.2
-1.0	5.3	3.7	1.5	0.2
-1.0	5.0	3.3	1.4	0.2
-2.0	7.0	3.2	4.7	1.4
-2.0	6.4	3.2	4.5	1.5
-2.0	6.9	3.1	4.9	1.5
-2.0	5.5	2.3	4.0	1.3
-2.0	6.5	2.8	4.6	1.5
-2.0	5.7	2.8	4.5	1.3
-2.0	6.3	3.3	4.7	1.6
-2.0	4.9	2.4	3.3	1.0
-2.0	6.6	2.9	4.6	1.3
-2.0	5.2	2.7	3.9	1.4
-2.0	5.0	2.0	3.5	1.0
-2.0	5.9	3.0	4.2	1.5
-2.0	6.0	2.2	4.0	1.0
-2.0	6.1	2.9	4.7	1.4
-2.0	5.6	2.9	3.6	1.3
-2.0	6.7	3.1	4.4	1.4
-2.0	5.6	3.0	4.5	1.5
-2.0	5.8	2.7	4.1	1.0
-2.0	6.2	2.2	4.5	1.5
-2.0	5.6	2.5	3.9	1.1
-2.0	5.9	3.2	4.8	1.8
-2.0	6.1	2.8	4.0	1.3
-2.0	6.3	2.5	4.9	1.5
-2.0	6.1	2.8	4.7	1.2
-2.0	6.4	2.9	4.3	1.3
-2.0	6.6	3.0	4.4	1.4
-2.0	6.8	2.8	4.8	1.4
-2.0	6.7	3.0	5.0	1.7
-2.0	6.0	2.9	4.5	1.5
-2.0	5.7	2.6	3.5	1.0
-2.0	5.5	2.4	3.8	1.1
-2.0	5.5	2.4	3.7	1.0
-2.0	5.8	2.7	3.9	1.2
-2.0	6.0	2.7	5.1	1.6
-2.0	5.4	3.0	4.5	1.5
-2.0	6.0	3.4	4.5	1.6
-2.0	6.7	3.1	4.7	1.5
-2.0	6.3	2.3	4.4	1.3
-2.0	5.6	3.0	4.1	1.3
-2.0	5.5	2.5	4.0	1.3
-2.0	5.5	2.6	4.4	1.2
-2.0	6.1	3.0	4.6	1.4
-2.0	5.8	2.6	4.0	1.2
-2.0	5.0	2.3	3.3	1.0
-2.0	5.6	2.7	4.2	1.3
-2.0	5.7	3.0	4.2	1.2
-2.0	5.7	2.9	4.2	1.3
-2.0	6.2	2.9	4.3	1.3
-2.0	5.1	2.5	3.0	1.1
-2.0	5.7	2.8	4.1	1.3
-3.0	6.3	3.3	6.0	2.5
-3.0	5.8	2.7	5.1	1.9
-3.0	7.1	3.0	5.9	2.1
-3.0	6.3	2.9	5.6	1.8
-3.0	6.5	3.0	5.8	2.2
-3.0	7.6	3.0	6.6	2.1
-3.0	4.9	2.5	4.5	1.7
-3.0	7.3	2.9	6.3	1.8
-3.0	6.7	2.5	5.8	1.8
-3.0	7.2	3.6	6.1	2.5
-3.0	6.5	3.2	5.1	2.0
-3.0	6.4	2.7	5.3	1.9
-3.0	6.8	3.0	5.5	2.1
-3.0	5.7	2.5	5.0	2.0
-3.0	5.8	2.8	5.1	2.4
-3.0	6.4	3.2	5.3	2.3
-3.0	6.5	3.0	5.5	1.8
-3.0	7.7	3.8	6.7	2.2
-3.0	7.7	2.6	6.9	2.3
-3.0	6.0	2.2	5.0	1.5
-3.0	6.9	3.2	5.7	2.3
-3.0	5.6	2.8	4.9	2.0
-3.0	7.7	2.8	6.7	2.0
-3.0	6.3	2.7	4.9	1.8
-3.0	6.7	3.3	5.7	2.1
-3.0	7.2	3.2	6.0	1.8
-3.0	6.2	2.8	4.8	1.8
-3.0	6.1	3.0	4.9	1.8
-3.0	6.4	2.8	5.6	2.1
-3.0	7.2	3.0	5.8	1.6
-3.0	7.4	2.8	6.1	1.9
-3.0	7.9	3.8	6.4	2.0
-3.0	6.4	2.8	5.6	2.2
-3.0	6.3	2.8	5.1	1.5
-3.0	6.1	2.6	5.6	1.4
-3.0	7.7	3.0	6.1	2.3
-3.0	6.3	3.4	5.6	2.4
-3.0	6.4	3.1	5.5	1.8
-3.0	6.0	3.0	4.8	1.8
-3.0	6.9	3.1	5.4	2.1
-3.0	6.7	3.1	5.6	2.4
-3.0	6.9	3.1	5.1	2.3
-3.0	5.8	2.7	5.1	1.9
-3.0	6.8	3.2	5.9	2.3
-3.0	6.7	3.3	5.7	2.5
-3.0	6.7	3.0	5.2	2.3
-3.0	6.3	2.5	5.0	1.9
-3.0	6.5	3.0	5.2	2.0
-3.0	6.2	3.4	5.4	2.3
-3.0	5.9	3.0	5.1	1.8

http://git-wip-us.apache.org/repos/asf/ignite/blob/86a788f3/examples/src/main/resources/datasets/mortalitydata.csv
----------------------------------------------------------------------
diff --git a/examples/src/main/resources/datasets/mortalitydata.csv b/examples/src/main/resources/datasets/mortalitydata.csv
deleted file mode 100644
index e4f3e41..0000000
--- a/examples/src/main/resources/datasets/mortalitydata.csv
+++ /dev/null
@@ -1,53 +0,0 @@
-8; 78; 284; 9.100000381; 109
-9.300000191; 68; 433; 8.699999809; 144
-7.5; 70; 739; 7.199999809; 113
-8.899999619; 96; 1792; 8.899999619; 97
-10.19999981; 74; 477; 8.300000191; 206
-8.300000191; 111; 362; 10.89999962; 124
-8.800000191; 77; 671; 10; 152
-8.800000191; 168; 636; 9.100000381; 162
-10.69999981; 82; 329; 8.699999809; 150
-11.69999981; 89; 634; 7.599999905; 134
-8.5; 149; 631; 10.80000019; 292
-8.300000191; 60; 257; 9.5; 108
-8.199999809; 96; 284; 8.800000191; 111
-7.900000095; 83; 603; 9.5; 182
-10.30000019; 130; 686; 8.699999809; 129
-7.400000095; 145; 345; 11.19999981; 158
-9.600000381; 112; 1357; 9.699999809; 186
-9.300000191; 131; 544; 9.600000381; 177
-10.60000038; 80; 205; 9.100000381; 127
-9.699999809; 130; 1264; 9.199999809; 179
-11.60000038; 140; 688; 8.300000191; 80
-8.100000381; 154; 354; 8.399999619; 103
-9.800000191; 118; 1632; 9.399999619; 101
-7.400000095; 94; 348; 9.800000191; 117
-9.399999619; 119; 370; 10.39999962; 88
-11.19999981; 153; 648; 9.899999619; 78
-9.100000381; 116; 366; 9.199999809; 102
-10.5; 97; 540; 10.30000019; 95
-11.89999962; 176; 680; 8.899999619; 80
-8.399999619; 75; 345; 9.600000381; 92
-5; 134; 525; 10.30000019; 126
-9.800000191; 161; 870; 10.39999962; 108
-9.800000191; 111; 669; 9.699999809; 77
-10.80000019; 114; 452; 9.600000381; 60
-10.10000038; 142; 430; 10.69999981; 71
-10.89999962; 238; 822; 10.30000019; 86
-9.199999809; 78; 190; 10.69999981; 93
-8.300000191; 196; 867; 9.600000381; 106
-7.300000191; 125; 969; 10.5; 162
-9.399999619; 82; 499; 7.699999809; 95
-9.399999619; 125; 925; 10.19999981; 91
-9.800000191; 129; 353; 9.899999619; 52
-3.599999905; 84; 288; 8.399999619; 110
-8.399999619; 183; 718; 10.39999962; 69
-10.80000019; 119; 540; 9.199999809; 57
-10.10000038; 180; 668; 13; 106
-9; 82; 347; 8.800000191; 40
-10; 71; 345; 9.199999809; 50
-11.30000019; 118; 463; 7.800000191; 35
-11.30000019; 121; 728; 8.199999809; 86
-12.80000019; 68; 383; 7.400000095; 57
-10; 112; 316; 10.39999962; 57
-6.699999809; 109; 388; 8.899999619; 94

http://git-wip-us.apache.org/repos/asf/ignite/blob/86a788f3/examples/src/main/resources/datasets/two_classed_iris.csv
----------------------------------------------------------------------
diff --git a/examples/src/main/resources/datasets/two_classed_iris.csv b/examples/src/main/resources/datasets/two_classed_iris.csv
deleted file mode 100644
index 872c699..0000000
--- a/examples/src/main/resources/datasets/two_classed_iris.csv
+++ /dev/null
@@ -1,100 +0,0 @@
-0	5.1	3.5	1.4	0.2
-0	4.9	3	1.4	0.2
-0	4.7	3.2	1.3	0.2
-0	4.6	3.1	1.5	0.2
-0	5	3.6	1.4	0.2
-0	5.4	3.9	1.7	0.4
-0	4.6	3.4	1.4	0.3
-0	5	3.4	1.5	0.2
-0	4.4	2.9	1.4	0.2
-0	4.9	3.1	1.5	0.1
-0	5.4	3.7	1.5	0.2
-0	4.8	3.4	1.6	0.2
-0	4.8	3	1.4	0.1
-0	4.3	3	1.1	0.1
-0	5.8	4	1.2	0.2
-0	5.7	4.4	1.5	0.4
-0	5.4	3.9	1.3	0.4
-0	5.1	3.5	1.4	0.3
-0	5.7	3.8	1.7	0.3
-0	5.1	3.8	1.5	0.3
-0	5.4	3.4	1.7	0.2
-0	5.1	3.7	1.5	0.4
-0	4.6	3.6	1	0.2
-0	5.1	3.3	1.7	0.5
-0	4.8	3.4	1.9	0.2
-0	5	3	1.6	0.2
-0	5	3.4	1.6	0.4
-0	5.2	3.5	1.5	0.2
-0	5.2	3.4	1.4	0.2
-0	4.7	3.2	1.6	0.2
-0	4.8	3.1	1.6	0.2
-0	5.4	3.4	1.5	0.4
-0	5.2	4.1	1.5	0.1
-0	5.5	4.2	1.4	0.2
-0	4.9	3.1	1.5	0.1
-0	5	3.2	1.2	0.2
-0	5.5	3.5	1.3	0.2
-0	4.9	3.1	1.5	0.1
-0	4.4	3	1.3	0.2
-0	5.1	3.4	1.5	0.2
-0	5	3.5	1.3	0.3
-0	4.5	2.3	1.3	0.3
-0	4.4	3.2	1.3	0.2
-0	5	3.5	1.6	0.6
-0	5.1	3.8	1.9	0.4
-0	4.8	3	1.4	0.3
-0	5.1	3.8	1.6	0.2
-0	4.6	3.2	1.4	0.2
-0	5.3	3.7	1.5	0.2
-0	5	3.3	1.4	0.2
-1	7	3.2	4.7	1.4
-1	6.4	3.2	4.5	1.5
-1	6.9	3.1	4.9	1.5
-1	5.5	2.3	4	1.3
-1	6.5	2.8	4.6	1.5
-1	5.7	2.8	4.5	1.3
-1	6.3	3.3	4.7	1.6
-1	4.9	2.4	3.3	1
-1	6.6	2.9	4.6	1.3
-1	5.2	2.7	3.9	1.4
-1	5	2	3.5	1
-1	5.9	3	4.2	1.5
-1	6	2.2	4	1
-1	6.1	2.9	4.7	1.4
-1	5.6	2.9	3.6	1.3
-1	6.7	3.1	4.4	1.4
-1	5.6	3	4.5	1.5
-1	5.8	2.7	4.1	1
-1	6.2	2.2	4.5	1.5
-1	5.6	2.5	3.9	1.1
-1	5.9	3.2	4.8	1.8
-1	6.1	2.8	4	1.3
-1	6.3	2.5	4.9	1.5
-1	6.1	2.8	4.7	1.2
-1	6.4	2.9	4.3	1.3
-1	6.6	3	4.4	1.4
-1	6.8	2.8	4.8	1.4
-1	6.7	3	5	1.7
-1	6	2.9	4.5	1.5
-1	5.7	2.6	3.5	1
-1	5.5	2.4	3.8	1.1
-1	5.5	2.4	3.7	1
-1	5.8	2.7	3.9	1.2
-1	6	2.7	5.1	1.6
-1	5.4	3	4.5	1.5
-1	6	3.4	4.5	1.6
-1	6.7	3.1	4.7	1.5
-1	6.3	2.3	4.4	1.3
-1	5.6	3	4.1	1.3
-1	5.5	2.5	4	1.3
-1	5.5	2.6	4.4	1.2
-1	6.1	3	4.6	1.4
-1	5.8	2.6	4	1.2
-1	5	2.3	3.3	1
-1	5.6	2.7	4.2	1.3
-1	5.7	3	4.2	1.2
-1	5.7	2.9	4.2	1.3
-1	6.2	2.9	4.3	1.3
-1	5.1	2.5	3	1.1
-1	5.7	2.8	4.1	1.3

http://git-wip-us.apache.org/repos/asf/ignite/blob/86a788f3/examples/src/main/resources/datasets/wine.txt
----------------------------------------------------------------------
diff --git a/examples/src/main/resources/datasets/wine.txt b/examples/src/main/resources/datasets/wine.txt
deleted file mode 100644
index a0b3962..0000000
--- a/examples/src/main/resources/datasets/wine.txt
+++ /dev/null
@@ -1,178 +0,0 @@
-1,14.23,1.71,2.43,15.6,127,2.8,3.06,.28,2.29,5.64,1.04,3.92,1065
-1,13.2,1.78,2.14,11.2,100,2.65,2.76,.26,1.28,4.38,1.05,3.4,1050
-1,13.16,2.36,2.67,18.6,101,2.8,3.24,.3,2.81,5.68,1.03,3.17,1185
-1,14.37,1.95,2.5,16.8,113,3.85,3.49,.24,2.18,7.8,.86,3.45,1480
-1,13.24,2.59,2.87,21,118,2.8,2.69,.39,1.82,4.32,1.04,2.93,735
-1,14.2,1.76,2.45,15.2,112,3.27,3.39,.34,1.97,6.75,1.05,2.85,1450
-1,14.39,1.87,2.45,14.6,96,2.5,2.52,.3,1.98,5.25,1.02,3.58,1290
-1,14.06,2.15,2.61,17.6,121,2.6,2.51,.31,1.25,5.05,1.06,3.58,1295
-1,14.83,1.64,2.17,14,97,2.8,2.98,.29,1.98,5.2,1.08,2.85,1045
-1,13.86,1.35,2.27,16,98,2.98,3.15,.22,1.85,7.22,1.01,3.55,1045
-1,14.1,2.16,2.3,18,105,2.95,3.32,.22,2.38,5.75,1.25,3.17,1510
-1,14.12,1.48,2.32,16.8,95,2.2,2.43,.26,1.57,5,1.17,2.82,1280
-1,13.75,1.73,2.41,16,89,2.6,2.76,.29,1.81,5.6,1.15,2.9,1320
-1,14.75,1.73,2.39,11.4,91,3.1,3.69,.43,2.81,5.4,1.25,2.73,1150
-1,14.38,1.87,2.38,12,102,3.3,3.64,.29,2.96,7.5,1.2,3,1547
-1,13.63,1.81,2.7,17.2,112,2.85,2.91,.3,1.46,7.3,1.28,2.88,1310
-1,14.3,1.92,2.72,20,120,2.8,3.14,.33,1.97,6.2,1.07,2.65,1280
-1,13.83,1.57,2.62,20,115,2.95,3.4,.4,1.72,6.6,1.13,2.57,1130
-1,14.19,1.59,2.48,16.5,108,3.3,3.93,.32,1.86,8.7,1.23,2.82,1680
-1,13.64,3.1,2.56,15.2,116,2.7,3.03,.17,1.66,5.1,.96,3.36,845
-1,14.06,1.63,2.28,16,126,3,3.17,.24,2.1,5.65,1.09,3.71,780
-1,12.93,3.8,2.65,18.6,102,2.41,2.41,.25,1.98,4.5,1.03,3.52,770
-1,13.71,1.86,2.36,16.6,101,2.61,2.88,.27,1.69,3.8,1.11,4,1035
-1,12.85,1.6,2.52,17.8,95,2.48,2.37,.26,1.46,3.93,1.09,3.63,1015
-1,13.5,1.81,2.61,20,96,2.53,2.61,.28,1.66,3.52,1.12,3.82,845
-1,13.05,2.05,3.22,25,124,2.63,2.68,.47,1.92,3.58,1.13,3.2,830
-1,13.39,1.77,2.62,16.1,93,2.85,2.94,.34,1.45,4.8,.92,3.22,1195
-1,13.3,1.72,2.14,17,94,2.4,2.19,.27,1.35,3.95,1.02,2.77,1285
-1,13.87,1.9,2.8,19.4,107,2.95,2.97,.37,1.76,4.5,1.25,3.4,915
-1,14.02,1.68,2.21,16,96,2.65,2.33,.26,1.98,4.7,1.04,3.59,1035
-1,13.73,1.5,2.7,22.5,101,3,3.25,.29,2.38,5.7,1.19,2.71,1285
-1,13.58,1.66,2.36,19.1,106,2.86,3.19,.22,1.95,6.9,1.09,2.88,1515
-1,13.68,1.83,2.36,17.2,104,2.42,2.69,.42,1.97,3.84,1.23,2.87,990
-1,13.76,1.53,2.7,19.5,132,2.95,2.74,.5,1.35,5.4,1.25,3,1235
-1,13.51,1.8,2.65,19,110,2.35,2.53,.29,1.54,4.2,1.1,2.87,1095
-1,13.48,1.81,2.41,20.5,100,2.7,2.98,.26,1.86,5.1,1.04,3.47,920
-1,13.28,1.64,2.84,15.5,110,2.6,2.68,.34,1.36,4.6,1.09,2.78,880
-1,13.05,1.65,2.55,18,98,2.45,2.43,.29,1.44,4.25,1.12,2.51,1105
-1,13.07,1.5,2.1,15.5,98,2.4,2.64,.28,1.37,3.7,1.18,2.69,1020
-1,14.22,3.99,2.51,13.2,128,3,3.04,.2,2.08,5.1,.89,3.53,760
-1,13.56,1.71,2.31,16.2,117,3.15,3.29,.34,2.34,6.13,.95,3.38,795
-1,13.41,3.84,2.12,18.8,90,2.45,2.68,.27,1.48,4.28,.91,3,1035
-1,13.88,1.89,2.59,15,101,3.25,3.56,.17,1.7,5.43,.88,3.56,1095
-1,13.24,3.98,2.29,17.5,103,2.64,2.63,.32,1.66,4.36,.82,3,680
-1,13.05,1.77,2.1,17,107,3,3,.28,2.03,5.04,.88,3.35,885
-1,14.21,4.04,2.44,18.9,111,2.85,2.65,.3,1.25,5.24,.87,3.33,1080
-1,14.38,3.59,2.28,16,102,3.25,3.17,.27,2.19,4.9,1.04,3.44,1065
-1,13.9,1.68,2.12,16,101,3.1,3.39,.21,2.14,6.1,.91,3.33,985
-1,14.1,2.02,2.4,18.8,103,2.75,2.92,.32,2.38,6.2,1.07,2.75,1060
-1,13.94,1.73,2.27,17.4,108,2.88,3.54,.32,2.08,8.90,1.12,3.1,1260
-1,13.05,1.73,2.04,12.4,92,2.72,3.27,.17,2.91,7.2,1.12,2.91,1150
-1,13.83,1.65,2.6,17.2,94,2.45,2.99,.22,2.29,5.6,1.24,3.37,1265
-1,13.82,1.75,2.42,14,111,3.88,3.74,.32,1.87,7.05,1.01,3.26,1190
-1,13.77,1.9,2.68,17.1,115,3,2.79,.39,1.68,6.3,1.13,2.93,1375
-1,13.74,1.67,2.25,16.4,118,2.6,2.9,.21,1.62,5.85,.92,3.2,1060
-1,13.56,1.73,2.46,20.5,116,2.96,2.78,.2,2.45,6.25,.98,3.03,1120
-1,14.22,1.7,2.3,16.3,118,3.2,3,.26,2.03,6.38,.94,3.31,970
-1,13.29,1.97,2.68,16.8,102,3,3.23,.31,1.66,6,1.07,2.84,1270
-1,13.72,1.43,2.5,16.7,108,3.4,3.67,.19,2.04,6.8,.89,2.87,1285
-2,12.37,.94,1.36,10.6,88,1.98,.57,.28,.42,1.95,1.05,1.82,520
-2,12.33,1.1,2.28,16,101,2.05,1.09,.63,.41,3.27,1.25,1.67,680
-2,12.64,1.36,2.02,16.8,100,2.02,1.41,.53,.62,5.75,.98,1.59,450
-2,13.67,1.25,1.92,18,94,2.1,1.79,.32,.73,3.8,1.23,2.46,630
-2,12.37,1.13,2.16,19,87,3.5,3.1,.19,1.87,4.45,1.22,2.87,420
-2,12.17,1.45,2.53,19,104,1.89,1.75,.45,1.03,2.95,1.45,2.23,355
-2,12.37,1.21,2.56,18.1,98,2.42,2.65,.37,2.08,4.6,1.19,2.3,678
-2,13.11,1.01,1.7,15,78,2.98,3.18,.26,2.28,5.3,1.12,3.18,502
-2,12.37,1.17,1.92,19.6,78,2.11,2,.27,1.04,4.68,1.12,3.48,510
-2,13.34,.94,2.36,17,110,2.53,1.3,.55,.42,3.17,1.02,1.93,750
-2,12.21,1.19,1.75,16.8,151,1.85,1.28,.14,2.5,2.85,1.28,3.07,718
-2,12.29,1.61,2.21,20.4,103,1.1,1.02,.37,1.46,3.05,.906,1.82,870
-2,13.86,1.51,2.67,25,86,2.95,2.86,.21,1.87,3.38,1.36,3.16,410
-2,13.49,1.66,2.24,24,87,1.88,1.84,.27,1.03,3.74,.98,2.78,472
-2,12.99,1.67,2.6,30,139,3.3,2.89,.21,1.96,3.35,1.31,3.5,985
-2,11.96,1.09,2.3,21,101,3.38,2.14,.13,1.65,3.21,.99,3.13,886
-2,11.66,1.88,1.92,16,97,1.61,1.57,.34,1.15,3.8,1.23,2.14,428
-2,13.03,.9,1.71,16,86,1.95,2.03,.24,1.46,4.6,1.19,2.48,392
-2,11.84,2.89,2.23,18,112,1.72,1.32,.43,.95,2.65,.96,2.52,500
-2,12.33,.99,1.95,14.8,136,1.9,1.85,.35,2.76,3.4,1.06,2.31,750
-2,12.7,3.87,2.4,23,101,2.83,2.55,.43,1.95,2.57,1.19,3.13,463
-2,12,.92,2,19,86,2.42,2.26,.3,1.43,2.5,1.38,3.12,278
-2,12.72,1.81,2.2,18.8,86,2.2,2.53,.26,1.77,3.9,1.16,3.14,714
-2,12.08,1.13,2.51,24,78,2,1.58,.4,1.4,2.2,1.31,2.72,630
-2,13.05,3.86,2.32,22.5,85,1.65,1.59,.61,1.62,4.8,.84,2.01,515
-2,11.84,.89,2.58,18,94,2.2,2.21,.22,2.35,3.05,.79,3.08,520
-2,12.67,.98,2.24,18,99,2.2,1.94,.3,1.46,2.62,1.23,3.16,450
-2,12.16,1.61,2.31,22.8,90,1.78,1.69,.43,1.56,2.45,1.33,2.26,495
-2,11.65,1.67,2.62,26,88,1.92,1.61,.4,1.34,2.6,1.36,3.21,562
-2,11.64,2.06,2.46,21.6,84,1.95,1.69,.48,1.35,2.8,1,2.75,680
-2,12.08,1.33,2.3,23.6,70,2.2,1.59,.42,1.38,1.74,1.07,3.21,625
-2,12.08,1.83,2.32,18.5,81,1.6,1.5,.52,1.64,2.4,1.08,2.27,480
-2,12,1.51,2.42,22,86,1.45,1.25,.5,1.63,3.6,1.05,2.65,450
-2,12.69,1.53,2.26,20.7,80,1.38,1.46,.58,1.62,3.05,.96,2.06,495
-2,12.29,2.83,2.22,18,88,2.45,2.25,.25,1.99,2.15,1.15,3.3,290
-2,11.62,1.99,2.28,18,98,3.02,2.26,.17,1.35,3.25,1.16,2.96,345
-2,12.47,1.52,2.2,19,162,2.5,2.27,.32,3.28,2.6,1.16,2.63,937
-2,11.81,2.12,2.74,21.5,134,1.6,.99,.14,1.56,2.5,.95,2.26,625
-2,12.29,1.41,1.98,16,85,2.55,2.5,.29,1.77,2.9,1.23,2.74,428
-2,12.37,1.07,2.1,18.5,88,3.52,3.75,.24,1.95,4.5,1.04,2.77,660
-2,12.29,3.17,2.21,18,88,2.85,2.99,.45,2.81,2.3,1.42,2.83,406
-2,12.08,2.08,1.7,17.5,97,2.23,2.17,.26,1.4,3.3,1.27,2.96,710
-2,12.6,1.34,1.9,18.5,88,1.45,1.36,.29,1.35,2.45,1.04,2.77,562
-2,12.34,2.45,2.46,21,98,2.56,2.11,.34,1.31,2.8,.8,3.38,438
-2,11.82,1.72,1.88,19.5,86,2.5,1.64,.37,1.42,2.06,.94,2.44,415
-2,12.51,1.73,1.98,20.5,85,2.2,1.92,.32,1.48,2.94,1.04,3.57,672
-2,12.42,2.55,2.27,22,90,1.68,1.84,.66,1.42,2.7,.86,3.3,315
-2,12.25,1.73,2.12,19,80,1.65,2.03,.37,1.63,3.4,1,3.17,510
-2,12.72,1.75,2.28,22.5,84,1.38,1.76,.48,1.63,3.3,.88,2.42,488
-2,12.22,1.29,1.94,19,92,2.36,2.04,.39,2.08,2.7,.86,3.02,312
-2,11.61,1.35,2.7,20,94,2.74,2.92,.29,2.49,2.65,.96,3.26,680
-2,11.46,3.74,1.82,19.5,107,3.18,2.58,.24,3.58,2.9,.75,2.81,562
-2,12.52,2.43,2.17,21,88,2.55,2.27,.26,1.22,2,.9,2.78,325
-2,11.76,2.68,2.92,20,103,1.75,2.03,.6,1.05,3.8,1.23,2.5,607
-2,11.41,.74,2.5,21,88,2.48,2.01,.42,1.44,3.08,1.1,2.31,434
-2,12.08,1.39,2.5,22.5,84,2.56,2.29,.43,1.04,2.9,.93,3.19,385
-2,11.03,1.51,2.2,21.5,85,2.46,2.17,.52,2.01,1.9,1.71,2.87,407
-2,11.82,1.47,1.99,20.8,86,1.98,1.6,.3,1.53,1.95,.95,3.33,495
-2,12.42,1.61,2.19,22.5,108,2,2.09,.34,1.61,2.06,1.06,2.96,345
-2,12.77,3.43,1.98,16,80,1.63,1.25,.43,.83,3.4,.7,2.12,372
-2,12,3.43,2,19,87,2,1.64,.37,1.87,1.28,.93,3.05,564
-2,11.45,2.4,2.42,20,96,2.9,2.79,.32,1.83,3.25,.8,3.39,625
-2,11.56,2.05,3.23,28.5,119,3.18,5.08,.47,1.87,6,.93,3.69,465
-2,12.42,4.43,2.73,26.5,102,2.2,2.13,.43,1.71,2.08,.92,3.12,365
-2,13.05,5.8,2.13,21.5,86,2.62,2.65,.3,2.01,2.6,.73,3.1,380
-2,11.87,4.31,2.39,21,82,2.86,3.03,.21,2.91,2.8,.75,3.64,380
-2,12.07,2.16,2.17,21,85,2.6,2.65,.37,1.35,2.76,.86,3.28,378
-2,12.43,1.53,2.29,21.5,86,2.74,3.15,.39,1.77,3.94,.69,2.84,352
-2,11.79,2.13,2.78,28.5,92,2.13,2.24,.58,1.76,3,.97,2.44,466
-2,12.37,1.63,2.3,24.5,88,2.22,2.45,.4,1.9,2.12,.89,2.78,342
-2,12.04,4.3,2.38,22,80,2.1,1.75,.42,1.35,2.6,.79,2.57,580
-3,12.86,1.35,2.32,18,122,1.51,1.25,.21,.94,4.1,.76,1.29,630
-3,12.88,2.99,2.4,20,104,1.3,1.22,.24,.83,5.4,.74,1.42,530
-3,12.81,2.31,2.4,24,98,1.15,1.09,.27,.83,5.7,.66,1.36,560
-3,12.7,3.55,2.36,21.5,106,1.7,1.2,.17,.84,5,.78,1.29,600
-3,12.51,1.24,2.25,17.5,85,2,.58,.6,1.25,5.45,.75,1.51,650
-3,12.6,2.46,2.2,18.5,94,1.62,.66,.63,.94,7.1,.73,1.58,695
-3,12.25,4.72,2.54,21,89,1.38,.47,.53,.8,3.85,.75,1.27,720
-3,12.53,5.51,2.64,25,96,1.79,.6,.63,1.1,5,.82,1.69,515
-3,13.49,3.59,2.19,19.5,88,1.62,.48,.58,.88,5.7,.81,1.82,580
-3,12.84,2.96,2.61,24,101,2.32,.6,.53,.81,4.92,.89,2.15,590
-3,12.93,2.81,2.7,21,96,1.54,.5,.53,.75,4.6,.77,2.31,600
-3,13.36,2.56,2.35,20,89,1.4,.5,.37,.64,5.6,.7,2.47,780
-3,13.52,3.17,2.72,23.5,97,1.55,.52,.5,.55,4.35,.89,2.06,520
-3,13.62,4.95,2.35,20,92,2,.8,.47,1.02,4.4,.91,2.05,550
-3,12.25,3.88,2.2,18.5,112,1.38,.78,.29,1.14,8.21,.65,2,855
-3,13.16,3.57,2.15,21,102,1.5,.55,.43,1.3,4,.6,1.68,830
-3,13.88,5.04,2.23,20,80,.98,.34,.4,.68,4.9,.58,1.33,415
-3,12.87,4.61,2.48,21.5,86,1.7,.65,.47,.86,7.65,.54,1.86,625
-3,13.32,3.24,2.38,21.5,92,1.93,.76,.45,1.25,8.42,.55,1.62,650
-3,13.08,3.9,2.36,21.5,113,1.41,1.39,.34,1.14,9.40,.57,1.33,550
-3,13.5,3.12,2.62,24,123,1.4,1.57,.22,1.25,8.60,.59,1.3,500
-3,12.79,2.67,2.48,22,112,1.48,1.36,.24,1.26,10.8,.48,1.47,480
-3,13.11,1.9,2.75,25.5,116,2.2,1.28,.26,1.56,7.1,.61,1.33,425
-3,13.23,3.3,2.28,18.5,98,1.8,.83,.61,1.87,10.52,.56,1.51,675
-3,12.58,1.29,2.1,20,103,1.48,.58,.53,1.4,7.6,.58,1.55,640
-3,13.17,5.19,2.32,22,93,1.74,.63,.61,1.55,7.9,.6,1.48,725
-3,13.84,4.12,2.38,19.5,89,1.8,.83,.48,1.56,9.01,.57,1.64,480
-3,12.45,3.03,2.64,27,97,1.9,.58,.63,1.14,7.5,.67,1.73,880
-3,14.34,1.68,2.7,25,98,2.8,1.31,.53,2.7,13,.57,1.96,660
-3,13.48,1.67,2.64,22.5,89,2.6,1.1,.52,2.29,11.75,.57,1.78,620
-3,12.36,3.83,2.38,21,88,2.3,.92,.5,1.04,7.65,.56,1.58,520
-3,13.69,3.26,2.54,20,107,1.83,.56,.5,.8,5.88,.96,1.82,680
-3,12.85,3.27,2.58,22,106,1.65,.6,.6,.96,5.58,.87,2.11,570
-3,12.96,3.45,2.35,18.5,106,1.39,.7,.4,.94,5.28,.68,1.75,675
-3,13.78,2.76,2.3,22,90,1.35,.68,.41,1.03,9.58,.7,1.68,615
-3,13.73,4.36,2.26,22.5,88,1.28,.47,.52,1.15,6.62,.78,1.75,520
-3,13.45,3.7,2.6,23,111,1.7,.92,.43,1.46,10.68,.85,1.56,695
-3,12.82,3.37,2.3,19.5,88,1.48,.66,.4,.97,10.26,.72,1.75,685
-3,13.58,2.58,2.69,24.5,105,1.55,.84,.39,1.54,8.66,.74,1.8,750
-3,13.4,4.6,2.86,25,112,1.98,.96,.27,1.11,8.5,.67,1.92,630
-3,12.2,3.03,2.32,19,96,1.25,.49,.4,.73,5.5,.66,1.83,510
-3,12.77,2.39,2.28,19.5,86,1.39,.51,.48,.64,9.899999,.57,1.63,470
-3,14.16,2.51,2.48,20,91,1.68,.7,.44,1.24,9.7,.62,1.71,660
-3,13.71,5.65,2.45,20.5,95,1.68,.61,.52,1.06,7.7,.64,1.74,740
-3,13.4,3.91,2.48,23,102,1.8,.75,.43,1.41,7.3,.7,1.56,750
-3,13.27,4.28,2.26,20,120,1.59,.69,.43,1.35,10.2,.59,1.56,835
-3,13.17,2.59,2.37,20,120,1.65,.68,.53,1.46,9.3,.6,1.62,840
-3,14.13,4.1,2.74,24.5,96,2.05,.76,.56,1.35,9.2,.61,1.6,560

http://git-wip-us.apache.org/repos/asf/ignite/blob/86a788f3/modules/ml/src/main/java/org/apache/ignite/ml/util/MLSandboxDatasets.java
----------------------------------------------------------------------
diff --git a/modules/ml/src/main/java/org/apache/ignite/ml/util/MLSandboxDatasets.java b/modules/ml/src/main/java/org/apache/ignite/ml/util/MLSandboxDatasets.java
new file mode 100644
index 0000000..84ae8f6
--- /dev/null
+++ b/modules/ml/src/main/java/org/apache/ignite/ml/util/MLSandboxDatasets.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.ml.util;
+
+/**
+ * The names of popular datasets used in examples.
+ */
+public enum MLSandboxDatasets {
+    /** The full Iris dataset from Machine Learning Repository. */
+    IRIS("modules/ml/src/main/resources/datasets/iris.txt", false, "\t"),
+
+    /** The Titanic dataset from Kaggle competition. */
+    TITANIC("modules/ml/src/main/resources/datasets/titanic.csv", true, ";"),
+
+    /** The 1st and 2nd classes from the Iris dataset. */
+    TWO_CLASSED_IRIS("modules/ml/src/main/resources/datasets/two_classed_iris.csv", false, "\t"),
+
+    /** The dataset is about different computers' properties based on https://archive.ics.uci.edu/ml/datasets/Computer+Hardware. */
+    CLEARED_MACHINES("modules/ml/src/main/resources/datasets/cleared_machines.csv", false, ";"),
+
+    /**
+     * The health data is related to death rate based on; doctor availability, hospital availability,
+     * annual per capita income, and population density people per square mile.
+     */
+    MORTALITY_DATA("modules/ml/src/main/resources/datasets/mortalitydata.csv", false, ";"),
+
+    /**
+     * The preprocessed Glass dataset from the Machine Learning Repository https://archive.ics.uci.edu/ml/datasets/Glass+Identification
+     * There are 3 classes with labels: 1 {building_windows_float_processed}, 3 {vehicle_windows_float_processed}, 7 {headlamps}.
+     * Feature names: 'Na-Sodium', 'Mg-Magnesium', 'Al-Aluminum', 'Ba-Barium', 'Fe-Iron'.
+     */
+    GLASS_IDENTIFICATION("modules/ml/src/main/resources/datasets/glass_identification.csv", false, ";"),
+
+    /** The Wine recognition data. Could be found <a href="https://archive.ics.uci.edu/ml/machine-learning-databases/wine/">here</a>. */
+    WINE_RECOGNITION("modules/ml/src/main/resources/datasets/wine.txt", false, ","),
+
+    /** The Boston house-prices dataset. Could be found <a href="https://archive.ics.uci.edu/ml/machine-learning-databases/housing/">here</a>. */
+    BOSTON_HOUSE_PRICES("modules/ml/src/main/resources/datasets/boston_housing_dataset.txt", false, ",");
+
+    /** Filename. */
+    private final String filename;
+
+    /** The csv file has header. */
+    private final boolean hasHeader;
+
+    /** The separator between words. */
+    private final String separator;
+
+    /**
+     * @param filename Filename.
+     * @param hasHeader The csv file has header.
+     * @param separator The special sign to separate the line on words.
+     */
+    MLSandboxDatasets(final String filename, boolean hasHeader, String separator) {
+        this.filename = filename;
+        this.hasHeader = hasHeader;
+        this.separator = separator;
+    }
+
+    /** */
+    public String getFileName() { return filename; }
+
+    /** */
+    public boolean hasHeader() {
+        return hasHeader;
+    }
+
+    /** */
+    public String getSeparator() {
+        return separator;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/86a788f3/modules/ml/src/main/java/org/apache/ignite/ml/util/SandboxMLCache.java
----------------------------------------------------------------------
diff --git a/modules/ml/src/main/java/org/apache/ignite/ml/util/SandboxMLCache.java b/modules/ml/src/main/java/org/apache/ignite/ml/util/SandboxMLCache.java
new file mode 100644
index 0000000..57bf961
--- /dev/null
+++ b/modules/ml/src/main/java/org/apache/ignite/ml/util/SandboxMLCache.java
@@ -0,0 +1,133 @@
+/*
+ * 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.ml.util;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.nio.file.Paths;
+import java.text.NumberFormat;
+import java.text.ParseException;
+import java.util.Locale;
+import java.util.Scanner;
+import java.util.UUID;
+import org.apache.ignite.Ignite;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction;
+import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.internal.util.IgniteUtils;
+import org.apache.ignite.ml.math.exceptions.knn.FileParsingException;
+import org.apache.ignite.ml.math.primitives.vector.Vector;
+import org.apache.ignite.ml.math.primitives.vector.VectorUtils;
+
+
+/**
+ * Common utility code used in some ML examples to set up test cache.
+ */
+public class SandboxMLCache {
+    /** */
+    private final Ignite ignite;
+
+    /** */
+    public SandboxMLCache(Ignite ignite) {
+        this.ignite = ignite;
+    }
+
+    /**
+     * Fills cache with data and returns it.
+     *
+     * @param data Data to fill the cache with.
+     * @return Filled Ignite Cache.
+     */
+    public IgniteCache<Integer, double[]> fillCacheWith(double[][] data) {
+        CacheConfiguration<Integer, double[]> cacheConfiguration = new CacheConfiguration<>();
+        cacheConfiguration.setName("TEST_" + UUID.randomUUID());
+        cacheConfiguration.setAffinity(new RendezvousAffinityFunction(false, 10));
+
+        IgniteCache<Integer, double[]> cache = ignite.createCache(cacheConfiguration);
+
+        for (int i = 0; i < data.length; i++)
+            cache.put(i, data[i]);
+
+        return cache;
+    }
+
+    /**
+     * Fills cache with data and returns it.
+     *
+     * @param dataset The chosen dataset.
+     * @return Filled Ignite Cache.
+     * @throws FileNotFoundException If file not found.
+     */
+    public IgniteCache<Integer, Vector> fillCacheWith(MLSandboxDatasets dataset) throws FileNotFoundException {
+
+        IgniteCache<Integer, Vector> cache = getCache();
+
+        String fileName = dataset.getFileName();
+
+        File file = IgniteUtils.resolveIgnitePath(fileName);
+
+        if (file == null)
+            throw new FileNotFoundException(fileName);
+
+        Scanner scanner = new Scanner(file);
+
+        int cnt = 0;
+        while (scanner.hasNextLine()) {
+            String row = scanner.nextLine();
+            if(dataset.hasHeader() && cnt == 0) {
+                cnt++;
+                continue;
+            }
+
+            String[] cells = row.split(dataset.getSeparator());
+
+            double[] data = new double[cells.length];
+            NumberFormat format = NumberFormat.getInstance(Locale.FRANCE);
+
+            for (int i = 0; i < cells.length; i++)
+                try{
+                    if(cells[i].equals("")) data[i] = Double.NaN;
+                    else data[i] = Double.valueOf(cells[i]);
+                } catch (java.lang.NumberFormatException e) {
+                    try {
+                        data[i] = format.parse(cells[i]).doubleValue();
+                    }
+                    catch (ParseException e1) {
+                        throw new FileParsingException(cells[i], i, Paths.get(dataset.getFileName()));
+                    }
+                }
+            cache.put(cnt++, VectorUtils.of(data));
+        }
+        return cache;
+
+    }
+
+    /**
+     * Fills cache with data and returns it.
+     *
+     * @return Filled Ignite Cache.
+     */
+    private IgniteCache<Integer, Vector> getCache() {
+
+        CacheConfiguration<Integer, Vector> cacheConfiguration = new CacheConfiguration<>();
+        cacheConfiguration.setName("TUTORIAL_" + UUID.randomUUID());
+        cacheConfiguration.setAffinity(new RendezvousAffinityFunction(false, 10));
+
+        return ignite.createCache(cacheConfiguration);
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/86a788f3/modules/ml/src/main/resources/datasets/boston_housing_dataset.txt
----------------------------------------------------------------------
diff --git a/modules/ml/src/main/resources/datasets/boston_housing_dataset.txt b/modules/ml/src/main/resources/datasets/boston_housing_dataset.txt
new file mode 100644
index 0000000..654a340
--- /dev/null
+++ b/modules/ml/src/main/resources/datasets/boston_housing_dataset.txt
@@ -0,0 +1,505 @@
+0.02731,0.00,7.070,0,0.4690,6.4210,78.90,4.9671,2,242.0,17.80,396.90,9.14,21.60
+0.02729,0.00,7.070,0,0.4690,7.1850,61.10,4.9671,2,242.0,17.80,392.83,4.03,34.70
+0.03237,0.00,2.180,0,0.4580,6.9980,45.80,6.0622,3,222.0,18.70,394.63,2.94,33.40
+0.06905,0.00,2.180,0,0.4580,7.1470,54.20,6.0622,3,222.0,18.70,396.90,5.33,36.20
+0.02985,0.00,2.180,0,0.4580,6.4300,58.70,6.0622,3,222.0,18.70,394.12,5.21,28.70
+0.08829,12.50,7.870,0,0.5240,6.0120,66.60,5.5605,5,311.0,15.20,395.60,12.43,22.90
+0.14455,12.50,7.870,0,0.5240,6.1720,96.10,5.9505,5,311.0,15.20,396.90,19.15,27.10
+0.21124,12.50,7.870,0,0.5240,5.6310,100.00,6.0821,5,311.0,15.20,386.63,29.93,16.50
+0.17004,12.50,7.870,0,0.5240,6.0040,85.90,6.5921,5,311.0,15.20,386.71,17.10,18.90
+0.22489,12.50,7.870,0,0.5240,6.3770,94.30,6.3467,5,311.0,15.20,392.52,20.45,15.00
+0.11747,12.50,7.870,0,0.5240,6.0090,82.90,6.2267,5,311.0,15.20,396.90,13.27,18.90
+0.09378,12.50,7.870,0,0.5240,5.8890,39.00,5.4509,5,311.0,15.20,390.50,15.71,21.70
+0.62976,0.00,8.140,0,0.5380,5.9490,61.80,4.7075,4,307.0,21.00,396.90,8.26,20.40
+0.63796,0.00,8.140,0,0.5380,6.0960,84.50,4.4619,4,307.0,21.00,380.02,10.26,18.20
+0.62739,0.00,8.140,0,0.5380,5.8340,56.50,4.4986,4,307.0,21.00,395.62,8.47,19.90
+1.05393,0.00,8.140,0,0.5380,5.9350,29.30,4.4986,4,307.0,21.00,386.85,6.58,23.10
+0.78420,0.00,8.140,0,0.5380,5.9900,81.70,4.2579,4,307.0,21.00,386.75,14.67,17.50
+0.80271,0.00,8.140,0,0.5380,5.4560,36.60,3.7965,4,307.0,21.00,288.99,11.69,20.20
+0.72580,0.00,8.140,0,0.5380,5.7270,69.50,3.7965,4,307.0,21.00,390.95,11.28,18.20
+1.25179,0.00,8.140,0,0.5380,5.5700,98.10,3.7979,4,307.0,21.00,376.57,21.02,13.60
+0.85204,0.00,8.140,0,0.5380,5.9650,89.20,4.0123,4,307.0,21.00,392.53,13.83,19.60
+1.23247,0.00,8.140,0,0.5380,6.1420,91.70,3.9769,4,307.0,21.00,396.90,18.72,15.20
+0.98843,0.00,8.140,0,0.5380,5.8130,100.00,4.0952,4,307.0,21.00,394.54,19.88,14.50
+0.75026,0.00,8.140,0,0.5380,5.9240,94.10,4.3996,4,307.0,21.00,394.33,16.30,15.60
+0.84054,0.00,8.140,0,0.5380,5.5990,85.70,4.4546,4,307.0,21.00,303.42,16.51,13.90
+0.67191,0.00,8.140,0,0.5380,5.8130,90.30,4.6820,4,307.0,21.00,376.88,14.81,16.60
+0.95577,0.00,8.140,0,0.5380,6.0470,88.80,4.4534,4,307.0,21.00,306.38,17.28,14.80
+0.77299,0.00,8.140,0,0.5380,6.4950,94.40,4.4547,4,307.0,21.00,387.94,12.80,18.40
+1.00245,0.00,8.140,0,0.5380,6.6740,87.30,4.2390,4,307.0,21.00,380.23,11.98,21.00
+1.13081,0.00,8.140,0,0.5380,5.7130,94.10,4.2330,4,307.0,21.00,360.17,22.60,12.70
+1.35472,0.00,8.140,0,0.5380,6.0720,100.00,4.1750,4,307.0,21.00,376.73,13.04,14.50
+1.38799,0.00,8.140,0,0.5380,5.9500,82.00,3.9900,4,307.0,21.00,232.60,27.71,13.20
+1.15172,0.00,8.140,0,0.5380,5.7010,95.00,3.7872,4,307.0,21.00,358.77,18.35,13.10
+1.61282,0.00,8.140,0,0.5380,6.0960,96.90,3.7598,4,307.0,21.00,248.31,20.34,13.50
+0.06417,0.00,5.960,0,0.4990,5.9330,68.20,3.3603,5,279.0,19.20,396.90,9.68,18.90
+0.09744,0.00,5.960,0,0.4990,5.8410,61.40,3.3779,5,279.0,19.20,377.56,11.41,20.00
+0.08014,0.00,5.960,0,0.4990,5.8500,41.50,3.9342,5,279.0,19.20,396.90,8.77,21.00
+0.17505,0.00,5.960,0,0.4990,5.9660,30.20,3.8473,5,279.0,19.20,393.43,10.13,24.70
+0.02763,75.00,2.950,0,0.4280,6.5950,21.80,5.4011,3,252.0,18.30,395.63,4.32,30.80
+0.03359,75.00,2.950,0,0.4280,7.0240,15.80,5.4011,3,252.0,18.30,395.62,1.98,34.90
+0.12744,0.00,6.910,0,0.4480,6.7700,2.90,5.7209,3,233.0,17.90,385.41,4.84,26.60
+0.14150,0.00,6.910,0,0.4480,6.1690,6.60,5.7209,3,233.0,17.90,383.37,5.81,25.30
+0.15936,0.00,6.910,0,0.4480,6.2110,6.50,5.7209,3,233.0,17.90,394.46,7.44,24.70
+0.12269,0.00,6.910,0,0.4480,6.0690,40.00,5.7209,3,233.0,17.90,389.39,9.55,21.20
+0.17142,0.00,6.910,0,0.4480,5.6820,33.80,5.1004,3,233.0,17.90,396.90,10.21,19.30
+0.18836,0.00,6.910,0,0.4480,5.7860,33.30,5.1004,3,233.0,17.90,396.90,14.15,20.00
+0.22927,0.00,6.910,0,0.4480,6.0300,85.50,5.6894,3,233.0,17.90,392.74,18.80,16.60
+0.25387,0.00,6.910,0,0.4480,5.3990,95.30,5.8700,3,233.0,17.90,396.90,30.81,14.40
+0.21977,0.00,6.910,0,0.4480,5.6020,62.00,6.0877,3,233.0,17.90,396.90,16.20,19.40
+0.08873,21.00,5.640,0,0.4390,5.9630,45.70,6.8147,4,243.0,16.80,395.56,13.45,19.70
+0.04337,21.00,5.640,0,0.4390,6.1150,63.00,6.8147,4,243.0,16.80,393.97,9.43,20.50
+0.05360,21.00,5.640,0,0.4390,6.5110,21.10,6.8147,4,243.0,16.80,396.90,5.28,25.00
+0.04981,21.00,5.640,0,0.4390,5.9980,21.40,6.8147,4,243.0,16.80,396.90,8.43,23.40
+0.01360,75.00,4.000,0,0.4100,5.8880,47.60,7.3197,3,469.0,21.10,396.90,14.80,18.90
+0.01311,90.00,1.220,0,0.4030,7.2490,21.90,8.6966,5,226.0,17.90,395.93,4.81,35.40
+0.02055,85.00,0.740,0,0.4100,6.3830,35.70,9.1876,2,313.0,17.30,396.90,5.77,24.70
+0.01432,100.00,1.320,0,0.4110,6.8160,40.50,8.3248,5,256.0,15.10,392.90,3.95,31.60
+0.15445,25.00,5.130,0,0.4530,6.1450,29.20,7.8148,8,284.0,19.70,390.68,6.86,23.30
+0.10328,25.00,5.130,0,0.4530,5.9270,47.20,6.9320,8,284.0,19.70,396.90,9.22,19.60
+0.14932,25.00,5.130,0,0.4530,5.7410,66.20,7.2254,8,284.0,19.70,395.11,13.15,18.70
+0.17171,25.00,5.130,0,0.4530,5.9660,93.40,6.8185,8,284.0,19.70,378.08,14.44,16.00
+0.11027,25.00,5.130,0,0.4530,6.4560,67.80,7.2255,8,284.0,19.70,396.90,6.73,22.20
+0.12650,25.00,5.130,0,0.4530,6.7620,43.40,7.9809,8,284.0,19.70,395.58,9.50,25.00
+0.01951,17.50,1.380,0,0.4161,7.1040,59.50,9.2229,3,216.0,18.60,393.24,8.05,33.00
+0.03584,80.00,3.370,0,0.3980,6.2900,17.80,6.6115,4,337.0,16.10,396.90,4.67,23.50
+0.04379,80.00,3.370,0,0.3980,5.7870,31.10,6.6115,4,337.0,16.10,396.90,10.24,19.40
+0.05789,12.50,6.070,0,0.4090,5.8780,21.40,6.4980,4,345.0,18.90,396.21,8.10,22.00
+0.13554,12.50,6.070,0,0.4090,5.5940,36.80,6.4980,4,345.0,18.90,396.90,13.09,17.40
+0.12816,12.50,6.070,0,0.4090,5.8850,33.00,6.4980,4,345.0,18.90,396.90,8.79,20.90
+0.08826,0.00,10.810,0,0.4130,6.4170,6.60,5.2873,4,305.0,19.20,383.73,6.72,24.20
+0.15876,0.00,10.810,0,0.4130,5.9610,17.50,5.2873,4,305.0,19.20,376.94,9.88,21.70
+0.09164,0.00,10.810,0,0.4130,6.0650,7.80,5.2873,4,305.0,19.20,390.91,5.52,22.80
+0.19539,0.00,10.810,0,0.4130,6.2450,6.20,5.2873,4,305.0,19.20,377.17,7.54,23.40
+0.07896,0.00,12.830,0,0.4370,6.2730,6.00,4.2515,5,398.0,18.70,394.92,6.78,24.10
+0.09512,0.00,12.830,0,0.4370,6.2860,45.00,4.5026,5,398.0,18.70,383.23,8.94,21.40
+0.10153,0.00,12.830,0,0.4370,6.2790,74.50,4.0522,5,398.0,18.70,373.66,11.97,20.00
+0.08707,0.00,12.830,0,0.4370,6.1400,45.80,4.0905,5,398.0,18.70,386.96,10.27,20.80
+0.05646,0.00,12.830,0,0.4370,6.2320,53.70,5.0141,5,398.0,18.70,386.40,12.34,21.20
+0.08387,0.00,12.830,0,0.4370,5.8740,36.60,4.5026,5,398.0,18.70,396.06,9.10,20.30
+0.04113,25.00,4.860,0,0.4260,6.7270,33.50,5.4007,4,281.0,19.00,396.90,5.29,28.00
+0.04462,25.00,4.860,0,0.4260,6.6190,70.40,5.4007,4,281.0,19.00,395.63,7.22,23.90
+0.03659,25.00,4.860,0,0.4260,6.3020,32.20,5.4007,4,281.0,19.00,396.90,6.72,24.80
+0.03551,25.00,4.860,0,0.4260,6.1670,46.70,5.4007,4,281.0,19.00,390.64,7.51,22.90
+0.05059,0.00,4.490,0,0.4490,6.3890,48.00,4.7794,3,247.0,18.50,396.90,9.62,23.90
+0.05735,0.00,4.490,0,0.4490,6.6300,56.10,4.4377,3,247.0,18.50,392.30,6.53,26.60
+0.05188,0.00,4.490,0,0.4490,6.0150,45.10,4.4272,3,247.0,18.50,395.99,12.86,22.50
+0.07151,0.00,4.490,0,0.4490,6.1210,56.80,3.7476,3,247.0,18.50,395.15,8.44,22.20
+0.05660,0.00,3.410,0,0.4890,7.0070,86.30,3.4217,2,270.0,17.80,396.90,5.50,23.60
+0.05302,0.00,3.410,0,0.4890,7.0790,63.10,3.4145,2,270.0,17.80,396.06,5.70,28.70
+0.04684,0.00,3.410,0,0.4890,6.4170,66.10,3.0923,2,270.0,17.80,392.18,8.81,22.60
+0.03932,0.00,3.410,0,0.4890,6.4050,73.90,3.0921,2,270.0,17.80,393.55,8.20,22.00
+0.04203,28.00,15.040,0,0.4640,6.4420,53.60,3.6659,4,270.0,18.20,395.01,8.16,22.90
+0.02875,28.00,15.040,0,0.4640,6.2110,28.90,3.6659,4,270.0,18.20,396.33,6.21,25.00
+0.04294,28.00,15.040,0,0.4640,6.2490,77.30,3.6150,4,270.0,18.20,396.90,10.59,20.60
+0.12204,0.00,2.890,0,0.4450,6.6250,57.80,3.4952,2,276.0,18.00,357.98,6.65,28.40
+0.11504,0.00,2.890,0,0.4450,6.1630,69.60,3.4952,2,276.0,18.00,391.83,11.34,21.40
+0.12083,0.00,2.890,0,0.4450,8.0690,76.00,3.4952,2,276.0,18.00,396.90,4.21,38.70
+0.08187,0.00,2.890,0,0.4450,7.8200,36.90,3.4952,2,276.0,18.00,393.53,3.57,43.80
+0.06860,0.00,2.890,0,0.4450,7.4160,62.50,3.4952,2,276.0,18.00,396.90,6.19,33.20
+0.14866,0.00,8.560,0,0.5200,6.7270,79.90,2.7778,5,384.0,20.90,394.76,9.42,27.50
+0.11432,0.00,8.560,0,0.5200,6.7810,71.30,2.8561,5,384.0,20.90,395.58,7.67,26.50
+0.22876,0.00,8.560,0,0.5200,6.4050,85.40,2.7147,5,384.0,20.90,70.80,10.63,18.60
+0.21161,0.00,8.560,0,0.5200,6.1370,87.40,2.7147,5,384.0,20.90,394.47,13.44,19.30
+0.13960,0.00,8.560,0,0.5200,6.1670,90.00,2.4210,5,384.0,20.90,392.69,12.33,20.10
+0.13262,0.00,8.560,0,0.5200,5.8510,96.70,2.1069,5,384.0,20.90,394.05,16.47,19.50
+0.17120,0.00,8.560,0,0.5200,5.8360,91.90,2.2110,5,384.0,20.90,395.67,18.66,19.50
+0.13117,0.00,8.560,0,0.5200,6.1270,85.20,2.1224,5,384.0,20.90,387.69,14.09,20.40
+0.12802,0.00,8.560,0,0.5200,6.4740,97.10,2.4329,5,384.0,20.90,395.24,12.27,19.80
+0.26363,0.00,8.560,0,0.5200,6.2290,91.20,2.5451,5,384.0,20.90,391.23,15.55,19.40
+0.10793,0.00,8.560,0,0.5200,6.1950,54.40,2.7778,5,384.0,20.90,393.49,13.00,21.70
+0.10084,0.00,10.010,0,0.5470,6.7150,81.60,2.6775,6,432.0,17.80,395.59,10.16,22.80
+0.12329,0.00,10.010,0,0.5470,5.9130,92.90,2.3534,6,432.0,17.80,394.95,16.21,18.80
+0.22212,0.00,10.010,0,0.5470,6.0920,95.40,2.5480,6,432.0,17.80,396.90,17.09,18.70
+0.14231,0.00,10.010,0,0.5470,6.2540,84.20,2.2565,6,432.0,17.80,388.74,10.45,18.50
+0.17134,0.00,10.010,0,0.5470,5.9280,88.20,2.4631,6,432.0,17.80,344.91,15.76,18.30
+0.13158,0.00,10.010,0,0.5470,6.1760,72.50,2.7301,6,432.0,17.80,393.30,12.04,21.20
+0.15098,0.00,10.010,0,0.5470,6.0210,82.60,2.7474,6,432.0,17.80,394.51,10.30,19.20
+0.13058,0.00,10.010,0,0.5470,5.8720,73.10,2.4775,6,432.0,17.80,338.63,15.37,20.40
+0.14476,0.00,10.010,0,0.5470,5.7310,65.20,2.7592,6,432.0,17.80,391.50,13.61,19.30
+0.06899,0.00,25.650,0,0.5810,5.8700,69.70,2.2577,2,188.0,19.10,389.15,14.37,22.00
+0.07165,0.00,25.650,0,0.5810,6.0040,84.10,2.1974,2,188.0,19.10,377.67,14.27,20.30
+0.09299,0.00,25.650,0,0.5810,5.9610,92.90,2.0869,2,188.0,19.10,378.09,17.93,20.50
+0.15038,0.00,25.650,0,0.5810,5.8560,97.00,1.9444,2,188.0,19.10,370.31,25.41,17.30
+0.09849,0.00,25.650,0,0.5810,5.8790,95.80,2.0063,2,188.0,19.10,379.38,17.58,18.80
+0.16902,0.00,25.650,0,0.5810,5.9860,88.40,1.9929,2,188.0,19.10,385.02,14.81,21.40
+0.38735,0.00,25.650,0,0.5810,5.6130,95.60,1.7572,2,188.0,19.10,359.29,27.26,15.70
+0.25915,0.00,21.890,0,0.6240,5.6930,96.00,1.7883,4,437.0,21.20,392.11,17.19,16.20
+0.32543,0.00,21.890,0,0.6240,6.4310,98.80,1.8125,4,437.0,21.20,396.90,15.39,18.00
+0.88125,0.00,21.890,0,0.6240,5.6370,94.70,1.9799,4,437.0,21.20,396.90,18.34,14.30
+0.34006,0.00,21.890,0,0.6240,6.4580,98.90,2.1185,4,437.0,21.20,395.04,12.60,19.20
+1.19294,0.00,21.890,0,0.6240,6.3260,97.70,2.2710,4,437.0,21.20,396.90,12.26,19.60
+0.59005,0.00,21.890,0,0.6240,6.3720,97.90,2.3274,4,437.0,21.20,385.76,11.12,23.00
+0.32982,0.00,21.890,0,0.6240,5.8220,95.40,2.4699,4,437.0,21.20,388.69,15.03,18.40
+0.97617,0.00,21.890,0,0.6240,5.7570,98.40,2.3460,4,437.0,21.20,262.76,17.31,15.60
+0.55778,0.00,21.890,0,0.6240,6.3350,98.20,2.1107,4,437.0,21.20,394.67,16.96,18.10
+0.32264,0.00,21.890,0,0.6240,5.9420,93.50,1.9669,4,437.0,21.20,378.25,16.90,17.40
+0.35233,0.00,21.890,0,0.6240,6.4540,98.40,1.8498,4,437.0,21.20,394.08,14.59,17.10
+0.24980,0.00,21.890,0,0.6240,5.8570,98.20,1.6686,4,437.0,21.20,392.04,21.32,13.30
+0.54452,0.00,21.890,0,0.6240,6.1510,97.90,1.6687,4,437.0,21.20,396.90,18.46,17.80
+0.29090,0.00,21.890,0,0.6240,6.1740,93.60,1.6119,4,437.0,21.20,388.08,24.16,14.00
+1.62864,0.00,21.890,0,0.6240,5.0190,100.00,1.4394,4,437.0,21.20,396.90,34.41,14.40
+3.32105,0.00,19.580,1,0.8710,5.4030,100.00,1.3216,5,403.0,14.70,396.90,26.82,13.40
+4.09740,0.00,19.580,0,0.8710,5.4680,100.00,1.4118,5,403.0,14.70,396.90,26.42,15.60
+2.77974,0.00,19.580,0,0.8710,4.9030,97.80,1.3459,5,403.0,14.70,396.90,29.29,11.80
+2.37934,0.00,19.580,0,0.8710,6.1300,100.00,1.4191,5,403.0,14.70,172.91,27.80,13.80
+2.15505,0.00,19.580,0,0.8710,5.6280,100.00,1.5166,5,403.0,14.70,169.27,16.65,15.60
+2.36862,0.00,19.580,0,0.8710,4.9260,95.70,1.4608,5,403.0,14.70,391.71,29.53,14.60
+2.33099,0.00,19.580,0,0.8710,5.1860,93.80,1.5296,5,403.0,14.70,356.99,28.32,17.80
+2.73397,0.00,19.580,0,0.8710,5.5970,94.90,1.5257,5,403.0,14.70,351.85,21.45,15.40
+1.65660,0.00,19.580,0,0.8710,6.1220,97.30,1.6180,5,403.0,14.70,372.80,14.10,21.50
+1.49632,0.00,19.580,0,0.8710,5.4040,100.00,1.5916,5,403.0,14.70,341.60,13.28,19.60
+1.12658,0.00,19.580,1,0.8710,5.0120,88.00,1.6102,5,403.0,14.70,343.28,12.12,15.30
+2.14918,0.00,19.580,0,0.8710,5.7090,98.50,1.6232,5,403.0,14.70,261.95,15.79,19.40
+1.41385,0.00,19.580,1,0.8710,6.1290,96.00,1.7494,5,403.0,14.70,321.02,15.12,17.00
+3.53501,0.00,19.580,1,0.8710,6.1520,82.60,1.7455,5,403.0,14.70,88.01,15.02,15.60
+2.44668,0.00,19.580,0,0.8710,5.2720,94.00,1.7364,5,403.0,14.70,88.63,16.14,13.10
+1.22358,0.00,19.580,0,0.6050,6.9430,97.40,1.8773,5,403.0,14.70,363.43,4.59,41.30
+1.34284,0.00,19.580,0,0.6050,6.0660,100.00,1.7573,5,403.0,14.70,353.89,6.43,24.30
+1.42502,0.00,19.580,0,0.8710,6.5100,100.00,1.7659,5,403.0,14.70,364.31,7.39,23.30
+1.27346,0.00,19.580,1,0.6050,6.2500,92.60,1.7984,5,403.0,14.70,338.92,5.50,27.00
+1.46336,0.00,19.580,0,0.6050,7.4890,90.80,1.9709,5,403.0,14.70,374.43,1.73,50.00
+1.83377,0.00,19.580,1,0.6050,7.8020,98.20,2.0407,5,403.0,14.70,389.61,1.92,50.00
+1.51902,0.00,19.580,1,0.6050,8.3750,93.90,2.1620,5,403.0,14.70,388.45,3.32,50.00
+2.24236,0.00,19.580,0,0.6050,5.8540,91.80,2.4220,5,403.0,14.70,395.11,11.64,22.70
+2.92400,0.00,19.580,0,0.6050,6.1010,93.00,2.2834,5,403.0,14.70,240.16,9.81,25.00
+2.01019,0.00,19.580,0,0.6050,7.9290,96.20,2.0459,5,403.0,14.70,369.30,3.70,50.00
+1.80028,0.00,19.580,0,0.6050,5.8770,79.20,2.4259,5,403.0,14.70,227.61,12.14,23.80
+2.30040,0.00,19.580,0,0.6050,6.3190,96.10,2.1000,5,403.0,14.70,297.09,11.10,23.80
+2.44953,0.00,19.580,0,0.6050,6.4020,95.20,2.2625,5,403.0,14.70,330.04,11.32,22.30
+1.20742,0.00,19.580,0,0.6050,5.8750,94.60,2.4259,5,403.0,14.70,292.29,14.43,17.40
+2.31390,0.00,19.580,0,0.6050,5.8800,97.30,2.3887,5,403.0,14.70,348.13,12.03,19.10
+0.13914,0.00,4.050,0,0.5100,5.5720,88.50,2.5961,5,296.0,16.60,396.90,14.69,23.10
+0.09178,0.00,4.050,0,0.5100,6.4160,84.10,2.6463,5,296.0,16.60,395.50,9.04,23.60
+0.08447,0.00,4.050,0,0.5100,5.8590,68.70,2.7019,5,296.0,16.60,393.23,9.64,22.60
+0.06664,0.00,4.050,0,0.5100,6.5460,33.10,3.1323,5,296.0,16.60,390.96,5.33,29.40
+0.07022,0.00,4.050,0,0.5100,6.0200,47.20,3.5549,5,296.0,16.60,393.23,10.11,23.20
+0.05425,0.00,4.050,0,0.5100,6.3150,73.40,3.3175,5,296.0,16.60,395.60,6.29,24.60
+0.06642,0.00,4.050,0,0.5100,6.8600,74.40,2.9153,5,296.0,16.60,391.27,6.92,29.90
+0.05780,0.00,2.460,0,0.4880,6.9800,58.40,2.8290,3,193.0,17.80,396.90,5.04,37.20
+0.06588,0.00,2.460,0,0.4880,7.7650,83.30,2.7410,3,193.0,17.80,395.56,7.56,39.80
+0.06888,0.00,2.460,0,0.4880,6.1440,62.20,2.5979,3,193.0,17.80,396.90,9.45,36.20
+0.09103,0.00,2.460,0,0.4880,7.1550,92.20,2.7006,3,193.0,17.80,394.12,4.82,37.90
+0.10008,0.00,2.460,0,0.4880,6.5630,95.60,2.8470,3,193.0,17.80,396.90,5.68,32.50
+0.08308,0.00,2.460,0,0.4880,5.6040,89.80,2.9879,3,193.0,17.80,391.00,13.98,26.40
+0.06047,0.00,2.460,0,0.4880,6.1530,68.80,3.2797,3,193.0,17.80,387.11,13.15,29.60
+0.05602,0.00,2.460,0,0.4880,7.8310,53.60,3.1992,3,193.0,17.80,392.63,4.45,50.00
+0.07875,45.00,3.440,0,0.4370,6.7820,41.10,3.7886,5,398.0,15.20,393.87,6.68,32.00
+0.12579,45.00,3.440,0,0.4370,6.5560,29.10,4.5667,5,398.0,15.20,382.84,4.56,29.80
+0.08370,45.00,3.440,0,0.4370,7.1850,38.90,4.5667,5,398.0,15.20,396.90,5.39,34.90
+0.09068,45.00,3.440,0,0.4370,6.9510,21.50,6.4798,5,398.0,15.20,377.68,5.10,37.00
+0.06911,45.00,3.440,0,0.4370,6.7390,30.80,6.4798,5,398.0,15.20,389.71,4.69,30.50
+0.08664,45.00,3.440,0,0.4370,7.1780,26.30,6.4798,5,398.0,15.20,390.49,2.87,36.40
+0.02187,60.00,2.930,0,0.4010,6.8000,9.90,6.2196,1,265.0,15.60,393.37,5.03,31.10
+0.01439,60.00,2.930,0,0.4010,6.6040,18.80,6.2196,1,265.0,15.60,376.70,4.38,29.10
+0.01381,80.00,0.460,0,0.4220,7.8750,32.00,5.6484,4,255.0,14.40,394.23,2.97,50.00
+0.04011,80.00,1.520,0,0.4040,7.2870,34.10,7.3090,2,329.0,12.60,396.90,4.08,33.30
+0.04666,80.00,1.520,0,0.4040,7.1070,36.60,7.3090,2,329.0,12.60,354.31,8.61,30.30
+0.03768,80.00,1.520,0,0.4040,7.2740,38.30,7.3090,2,329.0,12.60,392.20,6.62,34.60
+0.03150,95.00,1.470,0,0.4030,6.9750,15.30,7.6534,3,402.0,17.00,396.90,4.56,34.90
+0.01778,95.00,1.470,0,0.4030,7.1350,13.90,7.6534,3,402.0,17.00,384.30,4.45,32.90
+0.03445,82.50,2.030,0,0.4150,6.1620,38.40,6.2700,2,348.0,14.70,393.77,7.43,24.10
+0.02177,82.50,2.030,0,0.4150,7.6100,15.70,6.2700,2,348.0,14.70,395.38,3.11,42.30
+0.03510,95.00,2.680,0,0.4161,7.8530,33.20,5.1180,4,224.0,14.70,392.78,3.81,48.50
+0.02009,95.00,2.680,0,0.4161,8.0340,31.90,5.1180,4,224.0,14.70,390.55,2.88,50.00
+0.13642,0.00,10.590,0,0.4890,5.8910,22.30,3.9454,4,277.0,18.60,396.90,10.87,22.60
+0.22969,0.00,10.590,0,0.4890,6.3260,52.50,4.3549,4,277.0,18.60,394.87,10.97,24.40
+0.25199,0.00,10.590,0,0.4890,5.7830,72.70,4.3549,4,277.0,18.60,389.43,18.06,22.50
+0.13587,0.00,10.590,1,0.4890,6.0640,59.10,4.2392,4,277.0,18.60,381.32,14.66,24.40
+0.43571,0.00,10.590,1,0.4890,5.3440,100.00,3.8750,4,277.0,18.60,396.90,23.09,20.00
+0.17446,0.00,10.590,1,0.4890,5.9600,92.10,3.8771,4,277.0,18.60,393.25,17.27,21.70
+0.37578,0.00,10.590,1,0.4890,5.4040,88.60,3.6650,4,277.0,18.60,395.24,23.98,19.30
+0.21719,0.00,10.590,1,0.4890,5.8070,53.80,3.6526,4,277.0,18.60,390.94,16.03,22.40
+0.14052,0.00,10.590,0,0.4890,6.3750,32.30,3.9454,4,277.0,18.60,385.81,9.38,28.10
+0.28955,0.00,10.590,0,0.4890,5.4120,9.80,3.5875,4,277.0,18.60,348.93,29.55,23.70
+0.19802,0.00,10.590,0,0.4890,6.1820,42.40,3.9454,4,277.0,18.60,393.63,9.47,25.00
+0.04560,0.00,13.890,1,0.5500,5.8880,56.00,3.1121,5,276.0,16.40,392.80,13.51,23.30
+0.07013,0.00,13.890,0,0.5500,6.6420,85.10,3.4211,5,276.0,16.40,392.78,9.69,28.70
+0.11069,0.00,13.890,1,0.5500,5.9510,93.80,2.8893,5,276.0,16.40,396.90,17.92,21.50
+0.11425,0.00,13.890,1,0.5500,6.3730,92.40,3.3633,5,276.0,16.40,393.74,10.50,23.00
+0.35809,0.00,6.200,1,0.5070,6.9510,88.50,2.8617,8,307.0,17.40,391.70,9.71,26.70
+0.40771,0.00,6.200,1,0.5070,6.1640,91.30,3.0480,8,307.0,17.40,395.24,21.46,21.70
+0.62356,0.00,6.200,1,0.5070,6.8790,77.70,3.2721,8,307.0,17.40,390.39,9.93,27.50
+0.61470,0.00,6.200,0,0.5070,6.6180,80.80,3.2721,8,307.0,17.40,396.90,7.60,30.10
+0.31533,0.00,6.200,0,0.5040,8.2660,78.30,2.8944,8,307.0,17.40,385.05,4.14,44.80
+0.52693,0.00,6.200,0,0.5040,8.7250,83.00,2.8944,8,307.0,17.40,382.00,4.63,50.00
+0.38214,0.00,6.200,0,0.5040,8.0400,86.50,3.2157,8,307.0,17.40,387.38,3.13,37.60
+0.41238,0.00,6.200,0,0.5040,7.1630,79.90,3.2157,8,307.0,17.40,372.08,6.36,31.60
+0.29819,0.00,6.200,0,0.5040,7.6860,17.00,3.3751,8,307.0,17.40,377.51,3.92,46.70
+0.44178,0.00,6.200,0,0.5040,6.5520,21.40,3.3751,8,307.0,17.40,380.34,3.76,31.50
+0.53700,0.00,6.200,0,0.5040,5.9810,68.10,3.6715,8,307.0,17.40,378.35,11.65,24.30
+0.46296,0.00,6.200,0,0.5040,7.4120,76.90,3.6715,8,307.0,17.40,376.14,5.25,31.70
+0.57529,0.00,6.200,0,0.5070,8.3370,73.30,3.8384,8,307.0,17.40,385.91,2.47,41.70
+0.33147,0.00,6.200,0,0.5070,8.2470,70.40,3.6519,8,307.0,17.40,378.95,3.95,48.30
+0.44791,0.00,6.200,1,0.5070,6.7260,66.50,3.6519,8,307.0,17.40,360.20,8.05,29.00
+0.33045,0.00,6.200,0,0.5070,6.0860,61.50,3.6519,8,307.0,17.40,376.75,10.88,24.00
+0.52058,0.00,6.200,1,0.5070,6.6310,76.50,4.1480,8,307.0,17.40,388.45,9.54,25.10
+0.51183,0.00,6.200,0,0.5070,7.3580,71.60,4.1480,8,307.0,17.40,390.07,4.73,31.50
+0.08244,30.00,4.930,0,0.4280,6.4810,18.50,6.1899,6,300.0,16.60,379.41,6.36,23.70
+0.09252,30.00,4.930,0,0.4280,6.6060,42.20,6.1899,6,300.0,16.60,383.78,7.37,23.30
+0.11329,30.00,4.930,0,0.4280,6.8970,54.30,6.3361,6,300.0,16.60,391.25,11.38,22.00
+0.10612,30.00,4.930,0,0.4280,6.0950,65.10,6.3361,6,300.0,16.60,394.62,12.40,20.10
+0.10290,30.00,4.930,0,0.4280,6.3580,52.90,7.0355,6,300.0,16.60,372.75,11.22,22.20
+0.12757,30.00,4.930,0,0.4280,6.3930,7.80,7.0355,6,300.0,16.60,374.71,5.19,23.70
+0.20608,22.00,5.860,0,0.4310,5.5930,76.50,7.9549,7,330.0,19.10,372.49,12.50,17.60
+0.19133,22.00,5.860,0,0.4310,5.6050,70.20,7.9549,7,330.0,19.10,389.13,18.46,18.50
+0.33983,22.00,5.860,0,0.4310,6.1080,34.90,8.0555,7,330.0,19.10,390.18,9.16,24.30
+0.19657,22.00,5.860,0,0.4310,6.2260,79.20,8.0555,7,330.0,19.10,376.14,10.15,20.50
+0.16439,22.00,5.860,0,0.4310,6.4330,49.10,7.8265,7,330.0,19.10,374.71,9.52,24.50
+0.19073,22.00,5.860,0,0.4310,6.7180,17.50,7.8265,7,330.0,19.10,393.74,6.56,26.20
+0.14030,22.00,5.860,0,0.4310,6.4870,13.00,7.3967,7,330.0,19.10,396.28,5.90,24.40
+0.21409,22.00,5.860,0,0.4310,6.4380,8.90,7.3967,7,330.0,19.10,377.07,3.59,24.80
+0.08221,22.00,5.860,0,0.4310,6.9570,6.80,8.9067,7,330.0,19.10,386.09,3.53,29.60
+0.36894,22.00,5.860,0,0.4310,8.2590,8.40,8.9067,7,330.0,19.10,396.90,3.54,42.80
+0.04819,80.00,3.640,0,0.3920,6.1080,32.00,9.2203,1,315.0,16.40,392.89,6.57,21.90
+0.03548,80.00,3.640,0,0.3920,5.8760,19.10,9.2203,1,315.0,16.40,395.18,9.25,20.90
+0.01538,90.00,3.750,0,0.3940,7.4540,34.20,6.3361,3,244.0,15.90,386.34,3.11,44.00
+0.61154,20.00,3.970,0,0.6470,8.7040,86.90,1.8010,5,264.0,13.00,389.70,5.12,50.00
+0.66351,20.00,3.970,0,0.6470,7.3330,100.00,1.8946,5,264.0,13.00,383.29,7.79,36.00
+0.65665,20.00,3.970,0,0.6470,6.8420,100.00,2.0107,5,264.0,13.00,391.93,6.90,30.10
+0.54011,20.00,3.970,0,0.6470,7.2030,81.80,2.1121,5,264.0,13.00,392.80,9.59,33.80
+0.53412,20.00,3.970,0,0.6470,7.5200,89.40,2.1398,5,264.0,13.00,388.37,7.26,43.10
+0.52014,20.00,3.970,0,0.6470,8.3980,91.50,2.2885,5,264.0,13.00,386.86,5.91,48.80
+0.82526,20.00,3.970,0,0.6470,7.3270,94.50,2.0788,5,264.0,13.00,393.42,11.25,31.00
+0.55007,20.00,3.970,0,0.6470,7.2060,91.60,1.9301,5,264.0,13.00,387.89,8.10,36.50
+0.76162,20.00,3.970,0,0.6470,5.5600,62.80,1.9865,5,264.0,13.00,392.40,10.45,22.80
+0.78570,20.00,3.970,0,0.6470,7.0140,84.60,2.1329,5,264.0,13.00,384.07,14.79,30.70
+0.57834,20.00,3.970,0,0.5750,8.2970,67.00,2.4216,5,264.0,13.00,384.54,7.44,50.00
+0.54050,20.00,3.970,0,0.5750,7.4700,52.60,2.8720,5,264.0,13.00,390.30,3.16,43.50
+0.09065,20.00,6.960,1,0.4640,5.9200,61.50,3.9175,3,223.0,18.60,391.34,13.65,20.70
+0.29916,20.00,6.960,0,0.4640,5.8560,42.10,4.4290,3,223.0,18.60,388.65,13.00,21.10
+0.16211,20.00,6.960,0,0.4640,6.2400,16.30,4.4290,3,223.0,18.60,396.90,6.59,25.20
+0.11460,20.00,6.960,0,0.4640,6.5380,58.70,3.9175,3,223.0,18.60,394.96,7.73,24.40
+0.22188,20.00,6.960,1,0.4640,7.6910,51.80,4.3665,3,223.0,18.60,390.77,6.58,35.20
+0.05644,40.00,6.410,1,0.4470,6.7580,32.90,4.0776,4,254.0,17.60,396.90,3.53,32.40
+0.09604,40.00,6.410,0,0.4470,6.8540,42.80,4.2673,4,254.0,17.60,396.90,2.98,32.00
+0.10469,40.00,6.410,1,0.4470,7.2670,49.00,4.7872,4,254.0,17.60,389.25,6.05,33.20
+0.06127,40.00,6.410,1,0.4470,6.8260,27.60,4.8628,4,254.0,17.60,393.45,4.16,33.10
+0.07978,40.00,6.410,0,0.4470,6.4820,32.10,4.1403,4,254.0,17.60,396.90,7.19,29.10
+0.21038,20.00,3.330,0,0.4429,6.8120,32.20,4.1007,5,216.0,14.90,396.90,4.85,35.10
+0.03578,20.00,3.330,0,0.4429,7.8200,64.50,4.6947,5,216.0,14.90,387.31,3.76,45.40
+0.03705,20.00,3.330,0,0.4429,6.9680,37.20,5.2447,5,216.0,14.90,392.23,4.59,35.40
+0.06129,20.00,3.330,1,0.4429,7.6450,49.70,5.2119,5,216.0,14.90,377.07,3.01,46.00
+0.01501,90.00,1.210,1,0.4010,7.9230,24.80,5.8850,1,198.0,13.60,395.52,3.16,50.00
+0.00906,90.00,2.970,0,0.4000,7.0880,20.80,7.3073,1,285.0,15.30,394.72,7.85,32.20
+0.01096,55.00,2.250,0,0.3890,6.4530,31.90,7.3073,1,300.0,15.30,394.72,8.23,22.00
+0.01965,80.00,1.760,0,0.3850,6.2300,31.50,9.0892,1,241.0,18.20,341.60,12.93,20.10
+0.03871,52.50,5.320,0,0.4050,6.2090,31.30,7.3172,6,293.0,16.60,396.90,7.14,23.20
+0.04590,52.50,5.320,0,0.4050,6.3150,45.60,7.3172,6,293.0,16.60,396.90,7.60,22.30
+0.04297,52.50,5.320,0,0.4050,6.5650,22.90,7.3172,6,293.0,16.60,371.72,9.51,24.80
+0.03502,80.00,4.950,0,0.4110,6.8610,27.90,5.1167,4,245.0,19.20,396.90,3.33,28.50
+0.07886,80.00,4.950,0,0.4110,7.1480,27.70,5.1167,4,245.0,19.20,396.90,3.56,37.30
+0.03615,80.00,4.950,0,0.4110,6.6300,23.40,5.1167,4,245.0,19.20,396.90,4.70,27.90
+0.08265,0.00,13.920,0,0.4370,6.1270,18.40,5.5027,4,289.0,16.00,396.90,8.58,23.90
+0.08199,0.00,13.920,0,0.4370,6.0090,42.30,5.5027,4,289.0,16.00,396.90,10.40,21.70
+0.12932,0.00,13.920,0,0.4370,6.6780,31.10,5.9604,4,289.0,16.00,396.90,6.27,28.60
+0.05372,0.00,13.920,0,0.4370,6.5490,51.00,5.9604,4,289.0,16.00,392.85,7.39,27.10
+0.14103,0.00,13.920,0,0.4370,5.7900,58.00,6.3200,4,289.0,16.00,396.90,15.84,20.30
+0.06466,70.00,2.240,0,0.4000,6.3450,20.10,7.8278,5,358.0,14.80,368.24,4.97,22.50
+0.05561,70.00,2.240,0,0.4000,7.0410,10.00,7.8278,5,358.0,14.80,371.58,4.74,29.00
+0.04417,70.00,2.240,0,0.4000,6.8710,47.40,7.8278,5,358.0,14.80,390.86,6.07,24.80
+0.03537,34.00,6.090,0,0.4330,6.5900,40.40,5.4917,7,329.0,16.10,395.75,9.50,22.00
+0.09266,34.00,6.090,0,0.4330,6.4950,18.40,5.4917,7,329.0,16.10,383.61,8.67,26.40
+0.10000,34.00,6.090,0,0.4330,6.9820,17.70,5.4917,7,329.0,16.10,390.43,4.86,33.10
+0.05515,33.00,2.180,0,0.4720,7.2360,41.10,4.0220,7,222.0,18.40,393.68,6.93,36.10
+0.05479,33.00,2.180,0,0.4720,6.6160,58.10,3.3700,7,222.0,18.40,393.36,8.93,28.40
+0.07503,33.00,2.180,0,0.4720,7.4200,71.90,3.0992,7,222.0,18.40,396.90,6.47,33.40
+0.04932,33.00,2.180,0,0.4720,6.8490,70.30,3.1827,7,222.0,18.40,396.90,7.53,28.20
+0.49298,0.00,9.900,0,0.5440,6.6350,82.50,3.3175,4,304.0,18.40,396.90,4.54,22.80
+0.34940,0.00,9.900,0,0.5440,5.9720,76.70,3.1025,4,304.0,18.40,396.24,9.97,20.30
+2.63548,0.00,9.900,0,0.5440,4.9730,37.80,2.5194,4,304.0,18.40,350.45,12.64,16.10
+0.79041,0.00,9.900,0,0.5440,6.1220,52.80,2.6403,4,304.0,18.40,396.90,5.98,22.10
+0.26169,0.00,9.900,0,0.5440,6.0230,90.40,2.8340,4,304.0,18.40,396.30,11.72,19.40
+0.26938,0.00,9.900,0,0.5440,6.2660,82.80,3.2628,4,304.0,18.40,393.39,7.90,21.60
+0.36920,0.00,9.900,0,0.5440,6.5670,87.30,3.6023,4,304.0,18.40,395.69,9.28,23.80
+0.25356,0.00,9.900,0,0.5440,5.7050,77.70,3.9450,4,304.0,18.40,396.42,11.50,16.20
+0.31827,0.00,9.900,0,0.5440,5.9140,83.20,3.9986,4,304.0,18.40,390.70,18.33,17.80
+0.24522,0.00,9.900,0,0.5440,5.7820,71.70,4.0317,4,304.0,18.40,396.90,15.94,19.80
+0.40202,0.00,9.900,0,0.5440,6.3820,67.20,3.5325,4,304.0,18.40,395.21,10.36,23.10
+0.47547,0.00,9.900,0,0.5440,6.1130,58.80,4.0019,4,304.0,18.40,396.23,12.73,21.00
+0.16760,0.00,7.380,0,0.4930,6.4260,52.30,4.5404,5,287.0,19.60,396.90,7.20,23.80
+0.18159,0.00,7.380,0,0.4930,6.3760,54.30,4.5404,5,287.0,19.60,396.90,6.87,23.10
+0.35114,0.00,7.380,0,0.4930,6.0410,49.90,4.7211,5,287.0,19.60,396.90,7.70,20.40
+0.28392,0.00,7.380,0,0.4930,5.7080,74.30,4.7211,5,287.0,19.60,391.13,11.74,18.50
+0.34109,0.00,7.380,0,0.4930,6.4150,40.10,4.7211,5,287.0,19.60,396.90,6.12,25.00
+0.19186,0.00,7.380,0,0.4930,6.4310,14.70,5.4159,5,287.0,19.60,393.68,5.08,24.60
+0.30347,0.00,7.380,0,0.4930,6.3120,28.90,5.4159,5,287.0,19.60,396.90,6.15,23.00
+0.24103,0.00,7.380,0,0.4930,6.0830,43.70,5.4159,5,287.0,19.60,396.90,12.79,22.20
+0.06617,0.00,3.240,0,0.4600,5.8680,25.80,5.2146,4,430.0,16.90,382.44,9.97,19.30
+0.06724,0.00,3.240,0,0.4600,6.3330,17.20,5.2146,4,430.0,16.90,375.21,7.34,22.60
+0.04544,0.00,3.240,0,0.4600,6.1440,32.20,5.8736,4,430.0,16.90,368.57,9.09,19.80
+0.05023,35.00,6.060,0,0.4379,5.7060,28.40,6.6407,1,304.0,16.90,394.02,12.43,17.10
+0.03466,35.00,6.060,0,0.4379,6.0310,23.30,6.6407,1,304.0,16.90,362.25,7.83,19.40
+0.05083,0.00,5.190,0,0.5150,6.3160,38.10,6.4584,5,224.0,20.20,389.71,5.68,22.20
+0.03738,0.00,5.190,0,0.5150,6.3100,38.50,6.4584,5,224.0,20.20,389.40,6.75,20.70
+0.03961,0.00,5.190,0,0.5150,6.0370,34.50,5.9853,5,224.0,20.20,396.90,8.01,21.10
+0.03427,0.00,5.190,0,0.5150,5.8690,46.30,5.2311,5,224.0,20.20,396.90,9.80,19.50
+0.03041,0.00,5.190,0,0.5150,5.8950,59.60,5.6150,5,224.0,20.20,394.81,10.56,18.50
+0.03306,0.00,5.190,0,0.5150,6.0590,37.30,4.8122,5,224.0,20.20,396.14,8.51,20.60
+0.05497,0.00,5.190,0,0.5150,5.9850,45.40,4.8122,5,224.0,20.20,396.90,9.74,19.00
+0.06151,0.00,5.190,0,0.5150,5.9680,58.50,4.8122,5,224.0,20.20,396.90,9.29,18.70
+0.01301,35.00,1.520,0,0.4420,7.2410,49.30,7.0379,1,284.0,15.50,394.74,5.49,32.70
+0.02498,0.00,1.890,0,0.5180,6.5400,59.70,6.2669,1,422.0,15.90,389.96,8.65,16.50
+0.02543,55.00,3.780,0,0.4840,6.6960,56.40,5.7321,5,370.0,17.60,396.90,7.18,23.90
+0.03049,55.00,3.780,0,0.4840,6.8740,28.10,6.4654,5,370.0,17.60,387.97,4.61,31.20
+0.03113,0.00,4.390,0,0.4420,6.0140,48.50,8.0136,3,352.0,18.80,385.64,10.53,17.50
+0.06162,0.00,4.390,0,0.4420,5.8980,52.30,8.0136,3,352.0,18.80,364.61,12.67,17.20
+0.01870,85.00,4.150,0,0.4290,6.5160,27.70,8.5353,4,351.0,17.90,392.43,6.36,23.10
+0.01501,80.00,2.010,0,0.4350,6.6350,29.70,8.3440,4,280.0,17.00,390.94,5.99,24.50
+0.02899,40.00,1.250,0,0.4290,6.9390,34.50,8.7921,1,335.0,19.70,389.85,5.89,26.60
+0.06211,40.00,1.250,0,0.4290,6.4900,44.40,8.7921,1,335.0,19.70,396.90,5.98,22.90
+0.07950,60.00,1.690,0,0.4110,6.5790,35.90,10.7103,4,411.0,18.30,370.78,5.49,24.10
+0.07244,60.00,1.690,0,0.4110,5.8840,18.50,10.7103,4,411.0,18.30,392.33,7.79,18.60
+0.01709,90.00,2.020,0,0.4100,6.7280,36.10,12.1265,5,187.0,17.00,384.46,4.50,30.10
+0.04301,80.00,1.910,0,0.4130,5.6630,21.90,10.5857,4,334.0,22.00,382.80,8.05,18.20
+0.10659,80.00,1.910,0,0.4130,5.9360,19.50,10.5857,4,334.0,22.00,376.04,5.57,20.60
+8.98296,0.00,18.100,1,0.7700,6.2120,97.40,2.1222,24,666.0,20.20,377.73,17.60,17.80
+3.84970,0.00,18.100,1,0.7700,6.3950,91.00,2.5052,24,666.0,20.20,391.34,13.27,21.70
+5.20177,0.00,18.100,1,0.7700,6.1270,83.40,2.7227,24,666.0,20.20,395.43,11.48,22.70
+4.26131,0.00,18.100,0,0.7700,6.1120,81.30,2.5091,24,666.0,20.20,390.74,12.67,22.60
+4.54192,0.00,18.100,0,0.7700,6.3980,88.00,2.5182,24,666.0,20.20,374.56,7.79,25.00
+3.83684,0.00,18.100,0,0.7700,6.2510,91.10,2.2955,24,666.0,20.20,350.65,14.19,19.90
+3.67822,0.00,18.100,0,0.7700,5.3620,96.20,2.1036,24,666.0,20.20,380.79,10.19,20.80
+4.22239,0.00,18.100,1,0.7700,5.8030,89.00,1.9047,24,666.0,20.20,353.04,14.64,16.80
+3.47428,0.00,18.100,1,0.7180,8.7800,82.90,1.9047,24,666.0,20.20,354.55,5.29,21.90
+4.55587,0.00,18.100,0,0.7180,3.5610,87.90,1.6132,24,666.0,20.20,354.70,7.12,27.50
+3.69695,0.00,18.100,0,0.7180,4.9630,91.40,1.7523,24,666.0,20.20,316.03,14.00,21.90
+13.52220,0.00,18.100,0,0.6310,3.8630,100.00,1.5106,24,666.0,20.20,131.42,13.33,23.10
+4.89822,0.00,18.100,0,0.6310,4.9700,100.00,1.3325,24,666.0,20.20,375.52,3.26,50.00
+5.66998,0.00,18.100,1,0.6310,6.6830,96.80,1.3567,24,666.0,20.20,375.33,3.73,50.00
+6.53876,0.00,18.100,1,0.6310,7.0160,97.50,1.2024,24,666.0,20.20,392.05,2.96,50.00
+9.23230,0.00,18.100,0,0.6310,6.2160,100.00,1.1691,24,666.0,20.20,366.15,9.53,50.00
+8.26725,0.00,18.100,1,0.6680,5.8750,89.60,1.1296,24,666.0,20.20,347.88,8.88,50.00
+11.10810,0.00,18.100,0,0.6680,4.9060,100.00,1.1742,24,666.0,20.20,396.90,34.77,13.80
+18.49820,0.00,18.100,0,0.6680,4.1380,100.00,1.1370,24,666.0,20.20,396.90,37.97,13.80
+19.60910,0.00,18.100,0,0.6710,7.3130,97.90,1.3163,24,666.0,20.20,396.90,13.44,15.00
+15.28800,0.00,18.100,0,0.6710,6.6490,93.30,1.3449,24,666.0,20.20,363.02,23.24,13.90
+9.82349,0.00,18.100,0,0.6710,6.7940,98.80,1.3580,24,666.0,20.20,396.90,21.24,13.30
+23.64820,0.00,18.100,0,0.6710,6.3800,96.20,1.3861,24,666.0,20.20,396.90,23.69,13.10
+17.86670,0.00,18.100,0,0.6710,6.2230,100.00,1.3861,24,666.0,20.20,393.74,21.78,10.20
+88.97620,0.00,18.100,0,0.6710,6.9680,91.90,1.4165,24,666.0,20.20,396.90,17.21,10.40
+15.87440,0.00,18.100,0,0.6710,6.5450,99.10,1.5192,24,666.0,20.20,396.90,21.08,10.90
+9.18702,0.00,18.100,0,0.7000,5.5360,100.00,1.5804,24,666.0,20.20,396.90,23.60,11.30
+7.99248,0.00,18.100,0,0.7000,5.5200,100.00,1.5331,24,666.0,20.20,396.90,24.56,12.30
+20.08490,0.00,18.100,0,0.7000,4.3680,91.20,1.4395,24,666.0,20.20,285.83,30.63,8.80
+16.81180,0.00,18.100,0,0.7000,5.2770,98.10,1.4261,24,666.0,20.20,396.90,30.81,7.20
+24.39380,0.00,18.100,0,0.7000,4.6520,100.00,1.4672,24,666.0,20.20,396.90,28.28,10.50
+22.59710,0.00,18.100,0,0.7000,5.0000,89.50,1.5184,24,666.0,20.20,396.90,31.99,7.40
+14.33370,0.00,18.100,0,0.7000,4.8800,100.00,1.5895,24,666.0,20.20,372.92,30.62,10.20
+8.15174,0.00,18.100,0,0.7000,5.3900,98.90,1.7281,24,666.0,20.20,396.90,20.85,11.50
+6.96215,0.00,18.100,0,0.7000,5.7130,97.00,1.9265,24,666.0,20.20,394.43,17.11,15.10
+5.29305,0.00,18.100,0,0.7000,6.0510,82.50,2.1678,24,666.0,20.20,378.38,18.76,23.20
+11.57790,0.00,18.100,0,0.7000,5.0360,97.00,1.7700,24,666.0,20.20,396.90,25.68,9.70
+8.64476,0.00,18.100,0,0.6930,6.1930,92.60,1.7912,24,666.0,20.20,396.90,15.17,13.80
+13.35980,0.00,18.100,0,0.6930,5.8870,94.70,1.7821,24,666.0,20.20,396.90,16.35,12.70
+8.71675,0.00,18.100,0,0.6930,6.4710,98.80,1.7257,24,666.0,20.20,391.98,17.12,13.10
+5.87205,0.00,18.100,0,0.6930,6.4050,96.00,1.6768,24,666.0,20.20,396.90,19.37,12.50
+7.67202,0.00,18.100,0,0.6930,5.7470,98.90,1.6334,24,666.0,20.20,393.10,19.92,8.50
+38.35180,0.00,18.100,0,0.6930,5.4530,100.00,1.4896,24,666.0,20.20,396.90,30.59,5.00
+9.91655,0.00,18.100,0,0.6930,5.8520,77.80,1.5004,24,666.0,20.20,338.16,29.97,6.30
+25.04610,0.00,18.100,0,0.6930,5.9870,100.00,1.5888,24,666.0,20.20,396.90,26.77,5.60
+14.23620,0.00,18.100,0,0.6930,6.3430,100.00,1.5741,24,666.0,20.20,396.90,20.32,7.20
+9.59571,0.00,18.100,0,0.6930,6.4040,100.00,1.6390,24,666.0,20.20,376.11,20.31,12.10
+24.80170,0.00,18.100,0,0.6930,5.3490,96.00,1.7028,24,666.0,20.20,396.90,19.77,8.30
+41.52920,0.00,18.100,0,0.6930,5.5310,85.40,1.6074,24,666.0,20.20,329.46,27.38,8.50
+67.92080,0.00,18.100,0,0.6930,5.6830,100.00,1.4254,24,666.0,20.20,384.97,22.98,5.00
+20.71620,0.00,18.100,0,0.6590,4.1380,100.00,1.1781,24,666.0,20.20,370.22,23.34,11.90
+11.95110,0.00,18.100,0,0.6590,5.6080,100.00,1.2852,24,666.0,20.20,332.09,12.13,27.90
+7.40389,0.00,18.100,0,0.5970,5.6170,97.90,1.4547,24,666.0,20.20,314.64,26.40,17.20
+14.43830,0.00,18.100,0,0.5970,6.8520,100.00,1.4655,24,666.0,20.20,179.36,19.78,27.50
+51.13580,0.00,18.100,0,0.5970,5.7570,100.00,1.4130,24,666.0,20.20,2.60,10.11,15.00
+14.05070,0.00,18.100,0,0.5970,6.6570,100.00,1.5275,24,666.0,20.20,35.05,21.22,17.20
+18.81100,0.00,18.100,0,0.5970,4.6280,100.00,1.5539,24,666.0,20.20,28.79,34.37,17.90
+28.65580,0.00,18.100,0,0.5970,5.1550,100.00,1.5894,24,666.0,20.20,210.97,20.08,16.30
+45.74610,0.00,18.100,0,0.6930,4.5190,100.00,1.6582,24,666.0,20.20,88.27,36.98,7.00
+18.08460,0.00,18.100,0,0.6790,6.4340,100.00,1.8347,24,666.0,20.20,27.25,29.05,7.20
+10.83420,0.00,18.100,0,0.6790,6.7820,90.80,1.8195,24,666.0,20.20,21.57,25.79,7.50
+25.94060,0.00,18.100,0,0.6790,5.3040,89.10,1.6475,24,666.0,20.20,127.36,26.64,10.40
+73.53410,0.00,18.100,0,0.6790,5.9570,100.00,1.8026,24,666.0,20.20,16.45,20.62,8.80
+11.81230,0.00,18.100,0,0.7180,6.8240,76.50,1.7940,24,666.0,20.20,48.45,22.74,8.40
+11.08740,0.00,18.100,0,0.7180,6.4110,100.00,1.8589,24,666.0,20.20,318.75,15.02,16.70
+7.02259,0.00,18.100,0,0.7180,6.0060,95.30,1.8746,24,666.0,20.20,319.98,15.70,14.20
+12.04820,0.00,18.100,0,0.6140,5.6480,87.60,1.9512,24,666.0,20.20,291.55,14.10,20.80
+7.05042,0.00,18.100,0,0.6140,6.1030,85.10,2.0218,24,666.0,20.20,2.52,23.29,13.40
+8.79212,0.00,18.100,0,0.5840,5.5650,70.60,2.0635,24,666.0,20.20,3.65,17.16,11.70
+15.86030,0.00,18.100,0,0.6790,5.8960,95.40,1.9096,24,666.0,20.20,7.68,24.39,8.30
+12.24720,0.00,18.100,0,0.5840,5.8370,59.70,1.9976,24,666.0,20.20,24.65,15.69,10.20
+37.66190,0.00,18.100,0,0.6790,6.2020,78.70,1.8629,24,666.0,20.20,18.82,14.52,10.90
+7.36711,0.00,18.100,0,0.6790,6.1930,78.10,1.9356,24,666.0,20.20,96.73,21.52,11.00
+9.33889,0.00,18.100,0,0.6790,6.3800,95.60,1.9682,24,666.0,20.20,60.72,24.08,9.50
+8.49213,0.00,18.100,0,0.5840,6.3480,86.10,2.0527,24,666.0,20.20,83.45,17.64,14.50
+10.06230,0.00,18.100,0,0.5840,6.8330,94.30,2.0882,24,666.0,20.20,81.33,19.69,14.10
+6.44405,0.00,18.100,0,0.5840,6.4250,74.80,2.2004,24,666.0,20.20,97.95,12.03,16.10
+5.58107,0.00,18.100,0,0.7130,6.4360,87.90,2.3158,24,666.0,20.20,100.19,16.22,14.30
+13.91340,0.00,18.100,0,0.7130,6.2080,95.00,2.2222,24,666.0,20.20,100.63,15.17,11.70
+11.16040,0.00,18.100,0,0.7400,6.6290,94.60,2.1247,24,666.0,20.20,109.85,23.27,13.40
+14.42080,0.00,18.100,0,0.7400,6.4610,93.30,2.0026,24,666.0,20.20,27.49,18.05,9.60
+15.17720,0.00,18.100,0,0.7400,6.1520,100.00,1.9142,24,666.0,20.20,9.32,26.45,8.70
+13.67810,0.00,18.100,0,0.7400,5.9350,87.90,1.8206,24,666.0,20.20,68.95,34.02,8.40
+9.39063,0.00,18.100,0,0.7400,5.6270,93.90,1.8172,24,666.0,20.20,396.90,22.88,12.80
+22.05110,0.00,18.100,0,0.7400,5.8180,92.40,1.8662,24,666.0,20.20,391.45,22.11,10.50
+9.72418,0.00,18.100,0,0.7400,6.4060,97.20,2.0651,24,666.0,20.20,385.96,19.52,17.10
+5.66637,0.00,18.100,0,0.7400,6.2190,100.00,2.0048,24,666.0,20.20,395.69,16.59,18.40
+9.96654,0.00,18.100,0,0.7400,6.4850,100.00,1.9784,24,666.0,20.20,386.73,18.85,15.40
+12.80230,0.00,18.100,0,0.7400,5.8540,96.60,1.8956,24,666.0,20.20,240.52,23.79,10.80
+10.67180,0.00,18.100,0,0.7400,6.4590,94.80,1.9879,24,666.0,20.20,43.06,23.98,11.80
+6.28807,0.00,18.100,0,0.7400,6.3410,96.40,2.0720,24,666.0,20.20,318.01,17.79,14.90
+9.92485,0.00,18.100,0,0.7400,6.2510,96.60,2.1980,24,666.0,20.20,388.52,16.44,12.60
+9.32909,0.00,18.100,0,0.7130,6.1850,98.70,2.2616,24,666.0,20.20,396.90,18.13,14.10
+7.52601,0.00,18.100,0,0.7130,6.4170,98.30,2.1850,24,666.0,20.20,304.21,19.31,13.00
+6.71772,0.00,18.100,0,0.7130,6.7490,92.60,2.3236,24,666.0,20.20,0.32,17.44,13.40
+5.44114,0.00,18.100,0,0.7130,6.6550,98.20,2.3552,24,666.0,20.20,355.29,17.73,15.20
+5.09017,0.00,18.100,0,0.7130,6.2970,91.80,2.3682,24,666.0,20.20,385.09,17.27,16.10
+8.24809,0.00,18.100,0,0.7130,7.3930,99.30,2.4527,24,666.0,20.20,375.87,16.74,17.80
+9.51363,0.00,18.100,0,0.7130,6.7280,94.10,2.4961,24,666.0,20.20,6.68,18.71,14.90
+4.75237,0.00,18.100,0,0.7130,6.5250,86.50,2.4358,24,666.0,20.20,50.92,18.13,14.10
+4.66883,0.00,18.100,0,0.7130,5.9760,87.90,2.5806,24,666.0,20.20,10.48,19.01,12.70
+8.20058,0.00,18.100,0,0.7130,5.9360,80.30,2.7792,24,666.0,20.20,3.50,16.94,13.50
+7.75223,0.00,18.100,0,0.7130,6.3010,83.70,2.7831,24,666.0,20.20,272.21,16.23,14.90
+6.80117,0.00,18.100,0,0.7130,6.0810,84.40,2.7175,24,666.0,20.20,396.90,14.70,20.00
+4.81213,0.00,18.100,0,0.7130,6.7010,90.00,2.5975,24,666.0,20.20,255.23,16.42,16.40
+3.69311,0.00,18.100,0,0.7130,6.3760,88.40,2.5671,24,666.0,20.20,391.43,14.65,17.70
+6.65492,0.00,18.100,0,0.7130,6.3170,83.00,2.7344,24,666.0,20.20,396.90,13.99,19.50
+5.82115,0.00,18.100,0,0.7130,6.5130,89.90,2.8016,24,666.0,20.20,393.82,10.29,20.20
+7.83932,0.00,18.100,0,0.6550,6.2090,65.40,2.9634,24,666.0,20.20,396.90,13.22,21.40
+3.16360,0.00,18.100,0,0.6550,5.7590,48.20,3.0665,24,666.0,20.20,334.40,14.13,19.90
+3.77498,0.00,18.100,0,0.6550,5.9520,84.70,2.8715,24,666.0,20.20,22.01,17.15,19.00
+4.42228,0.00,18.100,0,0.5840,6.0030,94.50,2.5403,24,666.0,20.20,331.29,21.32,19.10
+15.57570,0.00,18.100,0,0.5800,5.9260,71.00,2.9084,24,666.0,20.20,368.74,18.13,19.10
+13.07510,0.00,18.100,0,0.5800,5.7130,56.70,2.8237,24,666.0,20.20,396.90,14.76,20.10
+4.34879,0.00,18.100,0,0.5800,6.1670,84.00,3.0334,24,666.0,20.20,396.90,16.29,19.90
+4.03841,0.00,18.100,0,0.5320,6.2290,90.70,3.0993,24,666.0,20.20,395.33,12.87,19.60
+3.56868,0.00,18.100,0,0.5800,6.4370,75.00,2.8965,24,666.0,20.20,393.37,14.36,23.20
+4.64689,0.00,18.100,0,0.6140,6.9800,67.60,2.5329,24,666.0,20.20,374.68,11.66,29.80
+8.05579,0.00,18.100,0,0.5840,5.4270,95.40,2.4298,24,666.0,20.20,352.58,18.14,13.80
+6.39312,0.00,18.100,0,0.5840,6.1620,97.40,2.2060,24,666.0,20.20,302.76,24.10,13.30
+4.87141,0.00,18.100,0,0.6140,6.4840,93.60,2.3053,24,666.0,20.20,396.21,18.68,16.70
+15.02340,0.00,18.100,0,0.6140,5.3040,97.30,2.1007,24,666.0,20.20,349.48,24.91,12.00
+10.23300,0.00,18.100,0,0.6140,6.1850,96.70,2.1705,24,666.0,20.20,379.70,18.03,14.60
+14.33370,0.00,18.100,0,0.6140,6.2290,88.00,1.9512,24,666.0,20.20,383.32,13.11,21.40
+5.82401,0.00,18.100,0,0.5320,6.2420,64.70,3.4242,24,666.0,20.20,396.90,10.74,23.00
+5.70818,0.00,18.100,0,0.5320,6.7500,74.90,3.3317,24,666.0,20.20,393.07,7.74,23.70
+5.73116,0.00,18.100,0,0.5320,7.0610,77.00,3.4106,24,666.0,20.20,395.28,7.01,25.00
+2.81838,0.00,18.100,0,0.5320,5.7620,40.30,4.0983,24,666.0,20.20,392.92,10.42,21.80
+2.37857,0.00,18.100,0,0.5830,5.8710,41.90,3.7240,24,666.0,20.20,370.73,13.34,20.60
+3.67367,0.00,18.100,0,0.5830,6.3120,51.90,3.9917,24,666.0,20.20,388.62,10.58,21.20
+5.69175,0.00,18.100,0,0.5830,6.1140,79.80,3.5459,24,666.0,20.20,392.68,14.98,19.10
+4.83567,0.00,18.100,0,0.5830,5.9050,53.20,3.1523,24,666.0,20.20,388.22,11.45,20.60
+0.15086,0.00,27.740,0,0.6090,5.4540,92.70,1.8209,4,711.0,20.10,395.09,18.06,15.20
+0.18337,0.00,27.740,0,0.6090,5.4140,98.30,1.7554,4,711.0,20.10,344.05,23.97,7.00
+0.20746,0.00,27.740,0,0.6090,5.0930,98.00,1.8226,4,711.0,20.10,318.43,29.68,8.10
+0.10574,0.00,27.740,0,0.6090,5.9830,98.80,1.8681,4,711.0,20.10,390.11,18.07,13.60
+0.11132,0.00,27.740,0,0.6090,5.9830,83.50,2.1099,4,711.0,20.10,396.90,13.35,20.10
+0.17331,0.00,9.690,0,0.5850,5.7070,54.00,2.3817,6,391.0,19.20,396.90,12.01,21.80
+0.27957,0.00,9.690,0,0.5850,5.9260,42.60,2.3817,6,391.0,19.20,396.90,13.59,24.50
+0.17899,0.00,9.690,0,0.5850,5.6700,28.80,2.7986,6,391.0,19.20,393.29,17.60,23.10
+0.28960,0.00,9.690,0,0.5850,5.3900,72.90,2.7986,6,391.0,19.20,396.90,21.14,19.70
+0.26838,0.00,9.690,0,0.5850,5.7940,70.60,2.8927,6,391.0,19.20,396.90,14.10,18.30
+0.23912,0.00,9.690,0,0.5850,6.0190,65.30,2.4091,6,391.0,19.20,396.90,12.92,21.20
+0.17783,0.00,9.690,0,0.5850,5.5690,73.50,2.3999,6,391.0,19.20,395.77,15.10,17.50
+0.22438,0.00,9.690,0,0.5850,6.0270,79.70,2.4982,6,391.0,19.20,396.90,14.33,16.80
+0.06263,0.00,11.930,0,0.5730,6.5930,69.10,2.4786,1,273.0,21.00,391.99,9.67,22.40
+0.04527,0.00,11.930,0,0.5730,6.1200,76.70,2.2875,1,273.0,21.00,396.90,9.08,20.60
+0.06076,0.00,11.930,0,0.5730,6.9760,91.00,2.1675,1,273.0,21.00,396.90,5.64,23.90
+0.10959,0.00,11.930,0,0.5730,6.7940,89.30,2.3889,1,273.0,21.00,393.45,6.48,22.00
+0.04741,0.00,11.930,0,0.5730,6.0300,80.80,2.5050,1,273.0,21.00,396.90,7.88,11.90

http://git-wip-us.apache.org/repos/asf/ignite/blob/86a788f3/modules/ml/src/main/resources/datasets/cleared_machines.csv
----------------------------------------------------------------------
diff --git a/modules/ml/src/main/resources/datasets/cleared_machines.csv b/modules/ml/src/main/resources/datasets/cleared_machines.csv
new file mode 100644
index 0000000..e22aac8
--- /dev/null
+++ b/modules/ml/src/main/resources/datasets/cleared_machines.csv
@@ -0,0 +1,209 @@
+199;125;256;6000;256;16;128
+253;29;8000;32000;32;8;32
+253;29;8000;32000;32;8;32
+253;29;8000;32000;32;8;32
+132;29;8000;16000;32;8;16
+290;26;8000;32000;64;8;32
+381;23;16000;32000;64;16;32
+381;23;16000;32000;64;16;32
+749;23;16000;64000;64;16;32
+1238;23;32000;64000;128;32;64
+23;400;1000;3000;0;1;2
+24;400;512;3500;4;1;6
+70;60;2000;8000;65;1;8
+117;50;4000;16000;65;1;8
+15;350;64;64;0;1;4
+64;200;512;16000;0;4;32
+23;167;524;2000;8;4;15
+29;143;512;5000;0;7;32
+22;143;1000;2000;0;5;16
+124;110;5000;5000;142;8;64
+35;143;1500;6300;0;5;32
+39;143;3100;6200;0;5;20
+40;143;2300;6200;0;6;64
+45;110;3100;6200;0;6;64
+28;320;128;6000;0;1;12
+21;320;512;2000;4;1;3
+28;320;256;6000;0;1;6
+22;320;256;3000;4;1;3
+28;320;512;5000;4;1;5
+27;320;256;5000;4;1;6
+102;25;1310;2620;131;12;24
+102;25;1310;2620;131;12;24
+74;50;2620;10480;30;12;24
+74;50;2620;10480;30;12;24
+138;56;5240;20970;30;12;24
+136;64;5240;20970;30;12;24
+23;50;500;2000;8;1;4
+29;50;1000;4000;8;1;5
+44;50;2000;8000;8;1;5
+30;50;1000;4000;8;3;5
+41;50;1000;8000;8;3;5
+74;50;2000;16000;8;3;5
+74;50;2000;16000;8;3;6
+74;50;2000;16000;8;3;6
+54;133;1000;12000;9;3;12
+41;133;1000;8000;9;3;12
+18;810;512;512;8;1;1
+28;810;1000;5000;0;1;1
+36;320;512;8000;4;1;5
+38;200;512;8000;8;1;8
+34;700;384;8000;0;1;1
+19;700;256;2000;0;1;1
+72;140;1000;16000;16;1;3
+36;200;1000;8000;0;1;2
+30;110;1000;4000;16;1;2
+56;110;1000;12000;16;1;2
+42;220;1000;8000;16;1;2
+34;800;256;8000;0;1;4
+34;800;256;8000;0;1;4
+34;800;256;8000;0;1;4
+34;800;256;8000;0;1;4
+34;800;256;8000;0;1;4
+19;125;512;1000;0;8;20
+75;75;2000;8000;64;1;38
+113;75;2000;16000;64;1;38
+157;75;2000;16000;128;1;38
+18;90;256;1000;0;3;10
+20;105;256;2000;0;3;10
+28;105;1000;4000;0;3;24
+33;105;2000;4000;8;3;19
+47;75;2000;8000;8;3;24
+54;75;3000;8000;8;3;48
+20;175;256;2000;0;3;24
+23;300;768;3000;0;6;24
+25;300;768;3000;6;6;24
+52;300;768;12000;6;6;24
+27;300;768;4500;0;1;24
+50;300;384;12000;6;1;24
+18;300;192;768;6;6;24
+53;180;768;12000;6;1;31
+23;330;1000;3000;0;2;4
+30;300;1000;4000;8;3;64
+73;300;1000;16000;8;2;112
+20;330;1000;2000;0;1;2
+25;330;1000;4000;0;3;6
+28;140;2000;4000;0;3;6
+29;140;2000;4000;0;4;8
+32;140;2000;4000;8;1;20
+175;140;2000;32000;32;1;20
+57;140;2000;8000;32;1;54
+181;140;2000;32000;32;1;54
+181;140;2000;32000;32;1;54
+32;140;2000;4000;8;1;20
+82;57;4000;16000;1;6;12
+171;57;4000;24000;64;12;16
+361;26;16000;32000;64;16;24
+350;26;16000;32000;64;8;24
+220;26;8000;32000;0;8;24
+113;26;8000;16000;0;8;16
+15;480;96;512;0;1;1
+21;203;1000;2000;0;1;5
+35;115;512;6000;16;1;6
+18;1100;512;1500;0;1;1
+20;1100;768;2000;0;1;1
+20;600;768;2000;0;1;1
+28;400;2000;4000;0;1;1
+45;400;4000;8000;0;1;1
+18;900;1000;1000;0;1;2
+17;900;512;1000;0;1;2
+26;900;1000;4000;4;1;2
+28;900;1000;4000;8;1;2
+28;900;2000;4000;0;3;6
+31;225;2000;4000;8;3;6
+31;225;2000;4000;8;3;6
+42;180;2000;8000;8;1;6
+76;185;2000;16000;16;1;6
+76;180;2000;16000;16;1;6
+26;225;1000;4000;2;3;6
+59;25;2000;12000;8;1;4
+65;25;2000;12000;16;3;5
+101;17;4000;16000;8;6;12
+116;17;4000;16000;32;6;12
+18;1500;768;1000;0;0;0
+20;1500;768;2000;0;0;0
+20;800;768;2000;0;0;0
+30;50;2000;4000;0;3;6
+44;50;2000;8000;8;3;6
+44;50;2000;8000;8;1;6
+82;50;2000;16000;24;1;6
+82;50;2000;16000;24;1;6
+128;50;8000;16000;48;1;10
+37;100;1000;8000;0;2;6
+46;100;1000;8000;24;2;6
+46;100;1000;8000;24;3;6
+80;50;2000;16000;12;3;16
+88;50;2000;16000;24;6;16
+88;50;2000;16000;24;6;16
+33;150;512;4000;0;8;128
+46;115;2000;8000;16;1;3
+29;115;2000;4000;2;1;5
+53;92;2000;8000;32;1;6
+53;92;2000;8000;32;1;6
+41;92;2000;8000;4;1;6
+86;75;4000;16000;16;1;6
+95;60;4000;16000;32;1;6
+107;60;2000;16000;64;5;8
+117;60;4000;16000;64;5;8
+119;50;4000;16000;64;5;10
+120;72;4000;16000;64;8;16
+48;72;2000;8000;16;6;8
+126;40;8000;16000;32;8;16
+266;40;8000;32000;64;8;24
+270;35;8000;32000;64;8;24
+426;38;16000;32000;128;16;32
+151;48;4000;24000;32;8;24
+267;38;8000;32000;64;8;24
+603;30;16000;32000;256;16;24
+19;112;1000;1000;0;1;4
+21;84;1000;2000;0;1;6
+26;56;1000;4000;0;1;6
+35;56;2000;6000;0;1;8
+41;56;2000;8000;0;1;8
+47;56;4000;8000;0;1;8
+62;56;4000;12000;0;1;8
+78;56;4000;16000;0;1;8
+80;38;4000;8000;32;16;32
+80;38;4000;8000;32;16;32
+142;38;8000;16000;64;4;8
+281;38;8000;24000;160;4;8
+190;38;4000;16000;128;16;32
+21;200;1000;2000;0;1;2
+25;200;1000;4000;0;1;4
+67;200;2000;8000;64;1;5
+24;250;512;4000;0;1;7
+24;250;512;4000;0;4;7
+64;250;1000;16000;1;1;8
+25;160;512;4000;2;1;5
+20;160;512;2000;2;3;8
+29;160;1000;4000;8;1;14
+43;160;1000;8000;16;1;14
+53;160;2000;8000;32;1;13
+19;240;512;1000;8;1;3
+22;240;512;2000;8;1;5
+31;105;2000;4000;8;3;8
+41;105;2000;6000;16;6;16
+47;105;2000;8000;16;4;14
+99;52;4000;16000;32;4;12
+67;70;4000;12000;8;6;8
+81;59;4000;12000;32;6;12
+149;59;8000;16000;64;12;24
+183;26;8000;24000;32;8;16
+275;26;8000;32000;64;12;16
+382;26;8000;32000;128;24;32
+56;116;2000;8000;32;5;28
+182;50;2000;32000;24;6;26
+227;50;2000;32000;48;26;52
+341;50;2000;32000;112;52;104
+360;50;4000;32000;112;52;104
+919;30;8000;64000;96;12;176
+978;30;8000;64000;128;12;176
+24;180;262;4000;0;1;3
+24;180;512;4000;0;1;3
+24;180;262;4000;0;1;3
+24;180;512;4000;0;1;3
+37;124;1000;8000;0;1;8
+50;98;1000;8000;32;2;8
+41;125;2000;8000;0;2;14
+47;480;512;8000;32;0;0
+25;480;1000;4000;0;0;0

http://git-wip-us.apache.org/repos/asf/ignite/blob/86a788f3/modules/ml/src/main/resources/datasets/glass_identification.csv
----------------------------------------------------------------------
diff --git a/modules/ml/src/main/resources/datasets/glass_identification.csv b/modules/ml/src/main/resources/datasets/glass_identification.csv
new file mode 100644
index 0000000..ae1d6d1
--- /dev/null
+++ b/modules/ml/src/main/resources/datasets/glass_identification.csv
@@ -0,0 +1,116 @@
+1; 1.52101; 4.49; 1.10; 0.00; 0.00
+1; 1.51761; 3.60; 1.36; 0.00; 0.00
+1; 1.51618; 3.55; 1.54; 0.00; 0.00
+1; 1.51766; 3.69; 1.29; 0.00; 0.00
+1; 1.51742; 3.62; 1.24; 0.00; 0.00
+1; 1.51596; 3.61; 1.62; 0.00; 0.26
+1; 1.51743; 3.60; 1.14; 0.00; 0.00
+1; 1.51756; 3.61; 1.05; 0.00; 0.00
+1; 1.51918; 3.58; 1.37; 0.00; 0.00
+1; 1.51755; 3.60; 1.36; 0.00; 0.11
+1; 1.51571; 3.46; 1.56; 0.00; 0.24
+1; 1.51763; 3.66; 1.27; 0.00; 0.00
+1; 1.51589; 3.43; 1.40; 0.00; 0.24
+1; 1.51748; 3.56; 1.27; 0.00; 0.17
+1; 1.51763; 3.59; 1.31; 0.00; 0.00
+1; 1.51761; 3.54; 1.23; 0.00; 0.00
+1; 1.51784; 3.67; 1.16; 0.00; 0.00
+1; 1.52196; 3.85; 0.89; 0.00; 0.00
+1; 1.51911; 3.73; 1.18; 0.00; 0.00
+1; 1.51735; 3.54; 1.69; 0.00; 0.07
+1; 1.51750; 3.55; 1.49; 0.00; 0.19
+1; 1.51966; 3.75; 0.29; 0.00; 0.00
+1; 1.51736; 3.62; 1.29; 0.00; 0.00
+1; 1.51751; 3.57; 1.35; 0.00; 0.00
+1; 1.51720; 3.50; 1.15; 0.00; 0.00
+1; 1.51764; 3.54; 1.21; 0.00; 0.00
+1; 1.51793; 3.48; 1.41; 0.00; 0.00
+1; 1.51721; 3.48; 1.33; 0.00; 0.00
+1; 1.51768; 3.52; 1.43; 0.00; 0.00
+1; 1.51784; 3.49; 1.28; 0.00; 0.00
+1; 1.51768; 3.56; 1.30; 0.00; 0.14
+1; 1.51747; 3.50; 1.14; 0.00; 0.00
+1; 1.51775; 3.48; 1.23; 0.09; 0.22
+1; 1.51753; 3.47; 1.38; 0.00; 0.06
+1; 1.51783; 3.54; 1.34; 0.00; 0.00
+1; 1.51567; 3.45; 1.21; 0.00; 0.00
+1; 1.51909; 3.53; 1.32; 0.11; 0.00
+1; 1.51797; 3.48; 1.35; 0.00; 0.00
+1; 1.52213; 3.82; 0.47; 0.00; 0.00
+1; 1.52213; 3.82; 0.47; 0.00; 0.00
+1; 1.51793; 3.50; 1.12; 0.00; 0.00
+1; 1.51755; 3.42; 1.20; 0.00; 0.00
+1; 1.51779; 3.39; 1.33; 0.00; 0.00
+1; 1.52210; 3.84; 0.72; 0.00; 0.00
+1; 1.51786; 3.43; 1.19; 0.00; 0.30
+1; 1.51900; 3.48; 1.35; 0.00; 0.00
+1; 1.51869; 3.37; 1.18; 0.00; 0.16
+1; 1.52667; 3.70; 0.71; 0.00; 0.10
+1; 1.52223; 3.77; 0.79; 0.00; 0.00
+1; 1.51898; 3.35; 1.23; 0.00; 0.00
+1; 1.52320; 3.72; 0.51; 0.00; 0.16
+1; 1.51926; 3.33; 1.28; 0.00; 0.11
+1; 1.51808; 2.87; 1.19; 0.00; 0.00
+1; 1.51837; 2.84; 1.28; 0.00; 0.00
+1; 1.51778; 2.81; 1.29; 0.00; 0.09
+1; 1.51769; 2.71; 1.29; 0.00; 0.24
+1; 1.51215; 3.47; 1.12; 0.00; 0.31
+1; 1.51824; 3.48; 1.29; 0.00; 0.00
+1; 1.51754; 3.74; 1.17; 0.00; 0.00
+1; 1.51754; 3.66; 1.19; 0.00; 0.11
+1; 1.51905; 3.62; 1.11; 0.00; 0.00
+1; 1.51977; 3.58; 1.32; 0.69; 0.00
+1; 1.52172; 3.86; 0.88; 0.00; 0.11
+1; 1.52227; 3.81; 0.78; 0.00; 0.00
+1; 1.52172; 3.74; 0.90; 0.00; 0.07
+1; 1.52099; 3.59; 1.12; 0.00; 0.00
+1; 1.52152; 3.65; 0.87; 0.00; 0.17
+1; 1.52152; 3.65; 0.87; 0.00; 0.17
+1; 1.52152; 3.58; 0.90; 0.00; 0.16
+1; 1.52300; 3.58; 0.82; 0.00; 0.03
+3; 1.51769; 3.66; 1.11; 0.00; 0.00
+3; 1.51610; 3.53; 1.34; 0.00; 0.00
+3; 1.51670; 3.57; 1.38; 0.00; 0.10
+3; 1.51643; 3.52; 1.35; 0.00; 0.00
+3; 1.51665; 3.45; 1.76; 0.00; 0.17
+3; 1.52127; 3.90; 0.83; 0.00; 0.00
+3; 1.51779; 3.65; 0.65; 0.00; 0.00
+3; 1.51610; 3.40; 1.22; 0.00; 0.00
+3; 1.51694; 3.58; 1.31; 0.00; 0.00
+3; 1.51646; 3.40; 1.26; 0.00; 0.00
+3; 1.51655; 3.39; 1.28; 0.00; 0.00
+3; 1.52121; 3.76; 0.58; 0.00; 0.00
+3; 1.51776; 3.41; 1.52; 0.00; 0.00
+3; 1.51796; 3.36; 1.63; 0.00; 0.09
+3; 1.51832; 3.34; 1.54; 0.00; 0.00
+3; 1.51934; 3.54; 0.75; 0.15; 0.24
+3; 1.52211; 3.78; 0.91; 0.00; 0.37
+7; 1.51131; 3.20; 1.81; 1.19; 0.00
+7; 1.51838; 3.26; 2.22; 1.63; 0.00
+7; 1.52315; 3.34; 1.23; 0.00; 0.00
+7; 1.52247; 2.20; 2.06; 0.00; 0.00
+7; 1.52365; 1.83; 1.31; 1.68; 0.00
+7; 1.51613; 1.78; 1.79; 0.76; 0.00
+7; 1.51602; 0.00; 2.38; 0.64; 0.09
+7; 1.51623; 0.00; 2.79; 0.40; 0.09
+7; 1.51719; 0.00; 2.00; 1.59; 0.08
+7; 1.51683; 0.00; 1.98; 1.57; 0.07
+7; 1.51545; 0.00; 2.68; 0.61; 0.05
+7; 1.51556; 0.00; 2.54; 0.81; 0.01
+7; 1.51727; 0.00; 2.34; 0.66; 0.00
+7; 1.51531; 0.00; 2.66; 0.64; 0.00
+7; 1.51609; 0.00; 2.51; 0.53; 0.00
+7; 1.51508; 0.00; 2.25; 0.63; 0.00
+7; 1.51653; 0.00; 1.19; 0.00; 0.00
+7; 1.51514; 0.00; 2.42; 0.56; 0.00
+7; 1.51658; 0.00; 1.99; 1.71; 0.00
+7; 1.51617; 0.00; 2.27; 0.67; 0.00
+7; 1.51732; 0.00; 1.80; 1.55; 0.00
+7; 1.51645; 0.00; 1.87; 1.38; 0.00
+7; 1.51831; 0.00; 1.82; 2.88; 0.00
+7; 1.51640; 0.00; 2.74; 0.54; 0.00
+7; 1.51623; 0.00; 2.88; 1.06; 0.00
+7; 1.51685; 0.00; 1.99; 1.59; 0.00
+7; 1.52065; 0.00; 2.02; 1.64; 0.00
+7; 1.51651; 0.00; 1.94; 1.57; 0.00
+7; 1.51711; 0.00; 2.08; 1.67; 0.00

http://git-wip-us.apache.org/repos/asf/ignite/blob/86a788f3/modules/ml/src/main/resources/datasets/iris.txt
----------------------------------------------------------------------
diff --git a/modules/ml/src/main/resources/datasets/iris.txt b/modules/ml/src/main/resources/datasets/iris.txt
new file mode 100644
index 0000000..18f5f7c
--- /dev/null
+++ b/modules/ml/src/main/resources/datasets/iris.txt
@@ -0,0 +1,150 @@
+1.0	5.1	3.5	1.4	0.2
+1.0	4.9	3.0	1.4	0.2
+1.0	4.7	3.2	1.3	0.2
+1.0	4.6	3.1	1.5	0.2
+1.0	5.0	3.6	1.4	0.2
+1.0	5.4	3.9	1.7	0.4
+1.0	4.6	3.4	1.4	0.3
+1.0	5.0	3.4	1.5	0.2
+1.0	4.4	2.9	1.4	0.2
+1.0	4.9	3.1	1.5	0.1
+1.0	5.4	3.7	1.5	0.2
+1.0	4.8	3.4	1.6	0.2
+1.0	4.8	3.0	1.4	0.1
+1.0	4.3	3.0	1.1	0.1
+1.0	5.8	4.0	1.2	0.2
+1.0	5.7	4.4	1.5	0.4
+1.0	5.4	3.9	1.3	0.4
+1.0	5.1	3.5	1.4	0.3
+1.0	5.7	3.8	1.7	0.3
+1.0	5.1	3.8	1.5	0.3
+1.0	5.4	3.4	1.7	0.2
+1.0	5.1	3.7	1.5	0.4
+1.0	4.6	3.6	1.0	0.2
+1.0	5.1	3.3	1.7	0.5
+1.0	4.8	3.4	1.9	0.2
+1.0	5.0	3.0	1.6	0.2
+1.0	5.0	3.4	1.6	0.4
+1.0	5.2	3.5	1.5	0.2
+1.0	5.2	3.4	1.4	0.2
+1.0	4.7	3.2	1.6	0.2
+1.0	4.8	3.1	1.6	0.2
+1.0	5.4	3.4	1.5	0.4
+1.0	5.2	4.1	1.5	0.1
+1.0	5.5	4.2	1.4	0.2
+1.0	4.9	3.1	1.5	0.1
+1.0	5.0	3.2	1.2	0.2
+1.0	5.5	3.5	1.3	0.2
+1.0	4.9	3.1	1.5	0.1
+1.0	4.4	3.0	1.3	0.2
+1.0	5.1	3.4	1.5	0.2
+1.0	5.0	3.5	1.3	0.3
+1.0	4.5	2.3	1.3	0.3
+1.0	4.4	3.2	1.3	0.2
+1.0	5.0	3.5	1.6	0.6
+1.0	5.1	3.8	1.9	0.4
+1.0	4.8	3.0	1.4	0.3
+1.0	5.1	3.8	1.6	0.2
+1.0	4.6	3.2	1.4	0.2
+1.0	5.3	3.7	1.5	0.2
+1.0	5.0	3.3	1.4	0.2
+2.0	7.0	3.2	4.7	1.4
+2.0	6.4	3.2	4.5	1.5
+2.0	6.9	3.1	4.9	1.5
+2.0	5.5	2.3	4.0	1.3
+2.0	6.5	2.8	4.6	1.5
+2.0	5.7	2.8	4.5	1.3
+2.0	6.3	3.3	4.7	1.6
+2.0	4.9	2.4	3.3	1.0
+2.0	6.6	2.9	4.6	1.3
+2.0	5.2	2.7	3.9	1.4
+2.0	5.0	2.0	3.5	1.0
+2.0	5.9	3.0	4.2	1.5
+2.0	6.0	2.2	4.0	1.0
+2.0	6.1	2.9	4.7	1.4
+2.0	5.6	2.9	3.6	1.3
+2.0	6.7	3.1	4.4	1.4
+2.0	5.6	3.0	4.5	1.5
+2.0	5.8	2.7	4.1	1.0
+2.0	6.2	2.2	4.5	1.5
+2.0	5.6	2.5	3.9	1.1
+2.0	5.9	3.2	4.8	1.8
+2.0	6.1	2.8	4.0	1.3
+2.0	6.3	2.5	4.9	1.5
+2.0	6.1	2.8	4.7	1.2
+2.0	6.4	2.9	4.3	1.3
+2.0	6.6	3.0	4.4	1.4
+2.0	6.8	2.8	4.8	1.4
+2.0	6.7	3.0	5.0	1.7
+2.0	6.0	2.9	4.5	1.5
+2.0	5.7	2.6	3.5	1.0
+2.0	5.5	2.4	3.8	1.1
+2.0	5.5	2.4	3.7	1.0
+2.0	5.8	2.7	3.9	1.2
+2.0	6.0	2.7	5.1	1.6
+2.0	5.4	3.0	4.5	1.5
+2.0	6.0	3.4	4.5	1.6
+2.0	6.7	3.1	4.7	1.5
+2.0	6.3	2.3	4.4	1.3
+2.0	5.6	3.0	4.1	1.3
+2.0	5.5	2.5	4.0	1.3
+2.0	5.5	2.6	4.4	1.2
+2.0	6.1	3.0	4.6	1.4
+2.0	5.8	2.6	4.0	1.2
+2.0	5.0	2.3	3.3	1.0
+2.0	5.6	2.7	4.2	1.3
+2.0	5.7	3.0	4.2	1.2
+2.0	5.7	2.9	4.2	1.3
+2.0	6.2	2.9	4.3	1.3
+2.0	5.1	2.5	3.0	1.1
+2.0	5.7	2.8	4.1	1.3
+3.0	6.3	3.3	6.0	2.5
+3.0	5.8	2.7	5.1	1.9
+3.0	7.1	3.0	5.9	2.1
+3.0	6.3	2.9	5.6	1.8
+3.0	6.5	3.0	5.8	2.2
+3.0	7.6	3.0	6.6	2.1
+3.0	4.9	2.5	4.5	1.7
+3.0	7.3	2.9	6.3	1.8
+3.0	6.7	2.5	5.8	1.8
+3.0	7.2	3.6	6.1	2.5
+3.0	6.5	3.2	5.1	2.0
+3.0	6.4	2.7	5.3	1.9
+3.0	6.8	3.0	5.5	2.1
+3.0	5.7	2.5	5.0	2.0
+3.0	5.8	2.8	5.1	2.4
+3.0	6.4	3.2	5.3	2.3
+3.0	6.5	3.0	5.5	1.8
+3.0	7.7	3.8	6.7	2.2
+3.0	7.7	2.6	6.9	2.3
+3.0	6.0	2.2	5.0	1.5
+3.0	6.9	3.2	5.7	2.3
+3.0	5.6	2.8	4.9	2.0
+3.0	7.7	2.8	6.7	2.0
+3.0	6.3	2.7	4.9	1.8
+3.0	6.7	3.3	5.7	2.1
+3.0	7.2	3.2	6.0	1.8
+3.0	6.2	2.8	4.8	1.8
+3.0	6.1	3.0	4.9	1.8
+3.0	6.4	2.8	5.6	2.1
+3.0	7.2	3.0	5.8	1.6
+3.0	7.4	2.8	6.1	1.9
+3.0	7.9	3.8	6.4	2.0
+3.0	6.4	2.8	5.6	2.2
+3.0	6.3	2.8	5.1	1.5
+3.0	6.1	2.6	5.6	1.4
+3.0	7.7	3.0	6.1	2.3
+3.0	6.3	3.4	5.6	2.4
+3.0	6.4	3.1	5.5	1.8
+3.0	6.0	3.0	4.8	1.8
+3.0	6.9	3.1	5.4	2.1
+3.0	6.7	3.1	5.6	2.4
+3.0	6.9	3.1	5.1	2.3
+3.0	5.8	2.7	5.1	1.9
+3.0	6.8	3.2	5.9	2.3
+3.0	6.7	3.3	5.7	2.5
+3.0	6.7	3.0	5.2	2.3
+3.0	6.3	2.5	5.0	1.9
+3.0	6.5	3.0	5.2	2.0
+3.0	6.2	3.4	5.4	2.3
+3.0	5.9	3.0	5.1	1.8

http://git-wip-us.apache.org/repos/asf/ignite/blob/86a788f3/modules/ml/src/main/resources/datasets/mortalitydata.csv
----------------------------------------------------------------------
diff --git a/modules/ml/src/main/resources/datasets/mortalitydata.csv b/modules/ml/src/main/resources/datasets/mortalitydata.csv
new file mode 100644
index 0000000..e4f3e41
--- /dev/null
+++ b/modules/ml/src/main/resources/datasets/mortalitydata.csv
@@ -0,0 +1,53 @@
+8; 78; 284; 9.100000381; 109
+9.300000191; 68; 433; 8.699999809; 144
+7.5; 70; 739; 7.199999809; 113
+8.899999619; 96; 1792; 8.899999619; 97
+10.19999981; 74; 477; 8.300000191; 206
+8.300000191; 111; 362; 10.89999962; 124
+8.800000191; 77; 671; 10; 152
+8.800000191; 168; 636; 9.100000381; 162
+10.69999981; 82; 329; 8.699999809; 150
+11.69999981; 89; 634; 7.599999905; 134
+8.5; 149; 631; 10.80000019; 292
+8.300000191; 60; 257; 9.5; 108
+8.199999809; 96; 284; 8.800000191; 111
+7.900000095; 83; 603; 9.5; 182
+10.30000019; 130; 686; 8.699999809; 129
+7.400000095; 145; 345; 11.19999981; 158
+9.600000381; 112; 1357; 9.699999809; 186
+9.300000191; 131; 544; 9.600000381; 177
+10.60000038; 80; 205; 9.100000381; 127
+9.699999809; 130; 1264; 9.199999809; 179
+11.60000038; 140; 688; 8.300000191; 80
+8.100000381; 154; 354; 8.399999619; 103
+9.800000191; 118; 1632; 9.399999619; 101
+7.400000095; 94; 348; 9.800000191; 117
+9.399999619; 119; 370; 10.39999962; 88
+11.19999981; 153; 648; 9.899999619; 78
+9.100000381; 116; 366; 9.199999809; 102
+10.5; 97; 540; 10.30000019; 95
+11.89999962; 176; 680; 8.899999619; 80
+8.399999619; 75; 345; 9.600000381; 92
+5; 134; 525; 10.30000019; 126
+9.800000191; 161; 870; 10.39999962; 108
+9.800000191; 111; 669; 9.699999809; 77
+10.80000019; 114; 452; 9.600000381; 60
+10.10000038; 142; 430; 10.69999981; 71
+10.89999962; 238; 822; 10.30000019; 86
+9.199999809; 78; 190; 10.69999981; 93
+8.300000191; 196; 867; 9.600000381; 106
+7.300000191; 125; 969; 10.5; 162
+9.399999619; 82; 499; 7.699999809; 95
+9.399999619; 125; 925; 10.19999981; 91
+9.800000191; 129; 353; 9.899999619; 52
+3.599999905; 84; 288; 8.399999619; 110
+8.399999619; 183; 718; 10.39999962; 69
+10.80000019; 119; 540; 9.199999809; 57
+10.10000038; 180; 668; 13; 106
+9; 82; 347; 8.800000191; 40
+10; 71; 345; 9.199999809; 50
+11.30000019; 118; 463; 7.800000191; 35
+11.30000019; 121; 728; 8.199999809; 86
+12.80000019; 68; 383; 7.400000095; 57
+10; 112; 316; 10.39999962; 57
+6.699999809; 109; 388; 8.899999619; 94


[37/37] ignite git commit: Merge branches 'ignite-10189' and 'master' of https://git-wip-us.apache.org/repos/asf/ignite into ignite-10189

Posted by ak...@apache.org.
Merge branches 'ignite-10189' and 'master' of https://git-wip-us.apache.org/repos/asf/ignite into ignite-10189


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

Branch: refs/heads/ignite-10189
Commit: 6ae44a775ecd807ee1e84aa1fb1403e8c13d6e04
Parents: 5a0c517 86a788f
Author: Alexey Kuznetsov <ak...@apache.org>
Authored: Mon Dec 10 13:29:17 2018 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Mon Dec 10 13:29:17 2018 +0700

----------------------------------------------------------------------
 .../clustering/KMeansClusterizationExample.java |    4 +-
 ...niteFunctionDistributedInferenceExample.java |    4 +-
 .../ml/knn/KNNClassificationExample.java        |    4 +-
 .../examples/ml/knn/KNNRegressionExample.java   |    4 +-
 .../GaussianNaiveBayesTrainerExample.java       |    4 +-
 .../LinearRegressionLSQRTrainerExample.java     |    4 +-
 ...ssionLSQRTrainerWithMinMaxScalerExample.java |    4 +-
 .../LinearRegressionSGDTrainerExample.java      |    4 +-
 ...ggedLogisticRegressionSGDTrainerExample.java |    4 +-
 .../LogisticRegressionSGDTrainerExample.java    |    4 +-
 .../split/TrainTestDatasetSplitterExample.java  |    4 +-
 .../ml/svm/SVMBinaryClassificationExample.java  |    4 +-
 .../GDBOnTreesRegressionTrainerExample.java     |    2 +-
 .../RandomForestClassificationExample.java      |    4 +-
 .../RandomForestRegressionExample.java          |    4 +-
 .../examples/ml/util/MLSandboxDatasets.java     |   87 -
 .../ignite/examples/ml/util/SandboxMLCache.java |  133 --
 .../datasets/boston_housing_dataset.txt         |  505 -----
 .../resources/datasets/cleared_machines.csv     |  209 --
 .../resources/datasets/glass_identification.csv |  116 -
 examples/src/main/resources/datasets/iris.txt   |  150 --
 .../main/resources/datasets/mortalitydata.csv   |   53 -
 .../resources/datasets/two_classed_iris.csv     |  100 -
 examples/src/main/resources/datasets/wine.txt   |  178 --
 .../internal/jdbc2/JdbcMetadataSelfTest.java    |   72 +-
 .../ignite/jdbc/JdbcMetadataSelfTest.java       |   69 +-
 .../jdbc/thin/JdbcThinMetadataSelfTest.java     |   50 +-
 .../configuration/DiskPageCompression.java      |   17 +-
 .../configuration/IgniteConfiguration.java      |   12 +-
 .../ignite/internal/IgniteInternalFuture.java   |    4 +
 .../apache/ignite/internal/IgniteKernal.java    |    8 +-
 .../internal/commandline/CommandHandler.java    |   24 +-
 .../commandline/cache/CacheArguments.java       |   18 +
 .../apache/ignite/internal/jdbc/JdbcUtils.java  |   11 +-
 .../internal/jdbc/thin/JdbcThinUtils.java       |   11 +-
 .../apache/ignite/internal/jdbc2/JdbcUtils.java |    7 +-
 .../internal/pagemem/PageIdAllocator.java       |    5 +-
 .../cache/CacheGroupMetricsMXBeanImpl.java      |    7 +
 .../GridCachePartitionExchangeManager.java      |    4 +-
 .../processors/cache/GridCachePreloader.java    |   10 +
 .../cache/GridCachePreloaderAdapter.java        |   10 +
 .../processors/cache/GridCacheProcessor.java    |  124 +-
 .../processors/cache/GridCacheUtils.java        |    2 +-
 .../dht/preloader/GridDhtPartitionDemander.java |    3 +
 .../GridDhtPartitionSupplyMessage.java          |    3 +
 .../GridDhtPartitionsExchangeFuture.java        |    8 +-
 .../preloader/GridDhtPartitionsFullMessage.java |    5 +-
 .../dht/preloader/GridDhtPreloader.java         |   51 +-
 .../cache/distributed/near/GridNearTxLocal.java |   21 +-
 .../persistence/DataRegionMetricsImpl.java      |   19 +
 .../GridCacheDatabaseSharedManager.java         |    6 +-
 .../persistence/file/FilePageStoreManager.java  |   18 +-
 .../persistence/metastorage/MetaStorage.java    |  408 +++-
 .../metastorage/MetastorageDataRow.java         |    3 +-
 .../metastorage/MetastorageTree.java            |   11 +-
 .../cache/transactions/IgniteTxAdapter.java     |    4 +-
 .../verify/VerifyBackupPartitionsTaskV2.java    |   97 +-
 .../ignite/internal/util/IgniteUtils.java       |   68 +-
 .../internal/util/future/GridFutureAdapter.java |   20 +-
 .../internal/visor/VisorMultiNodeTask.java      |    2 +-
 .../visor/cache/VisorCacheConfiguration.java    |   38 +
 .../VisorCacheRebalanceCollectorJobResult.java  |   91 +
 .../node/VisorCacheRebalanceCollectorTask.java  |  194 ++
 .../VisorCacheRebalanceCollectorTaskArg.java    |   54 +
 .../VisorCacheRebalanceCollectorTaskResult.java |   92 +
 .../node/VisorExecutorServiceConfiguration.java |    4 +-
 .../visor/node/VisorNodeBaselineStatus.java     |   45 +
 .../visor/node/VisorNodeDataCollectorJob.java   |   74 +-
 .../node/VisorNodeDataCollectorTaskResult.java  |    3 +-
 .../visor/node/VisorPersistenceMetrics.java     |   34 +-
 .../internal/visor/util/VisorTaskUtils.java     |   43 +
 .../internal/visor/verify/CacheFilterEnum.java  |   52 +
 .../verify/VisorIdleVerifyDumpTaskArg.java      |   30 +-
 ...RWThroughDisabledTransactionalCacheTest.java |    8 +
 ...heStoreSessionListenerLifecycleSelfTest.java |    8 +
 ...reSessionListenerWriteBehindEnabledTest.java |    8 +
 .../CacheJdbcStoreSessionListenerSelfTest.java  |    8 +
 .../internal/GridNodeMetricsLogPdsSelfTest.java |    9 +-
 .../GridCacheTxLoadFromStoreOnLockSelfTest.java |    8 +
 .../cache/CacheClientStoreSelfTest.java         |    8 +
 .../cache/CacheConnectionLeakStoreTxTest.java   |   20 +
 .../cache/CacheEventWithTxLabelTest.java        |  494 +++++
 .../cache/CacheGetEntryAbstractTest.java        |    4 +-
 ...GetEntryOptimisticReadCommittedSelfTest.java |   36 +
 ...GetEntryOptimisticReadCommittedSeltTest.java |   36 -
 ...etEntryOptimisticRepeatableReadSelfTest.java |   36 +
 ...etEntryOptimisticRepeatableReadSeltTest.java |   36 -
 ...eGetEntryOptimisticSerializableSelfTest.java |   36 +
 ...eGetEntryOptimisticSerializableSeltTest.java |   36 -
 ...etEntryPessimisticReadCommittedSelfTest.java |   36 +
 ...etEntryPessimisticReadCommittedSeltTest.java |   36 -
 ...tEntryPessimisticRepeatableReadSelfTest.java |  105 +
 ...tEntryPessimisticRepeatableReadSeltTest.java |   40 -
 ...GetEntryPessimisticSerializableSelfTest.java |   36 +
 ...GetEntryPessimisticSerializableSeltTest.java |   36 -
 .../cache/CacheGroupMetricsMBeanTest.java       |   20 +-
 .../cache/CacheMetricsManageTest.java           |   11 +-
 .../cache/CacheOffheapMapEntrySelfTest.java     |   14 +
 .../processors/cache/CachePutIfAbsentTest.java  |    4 +
 .../CacheReadThroughLocalRestartSelfTest.java   |    8 +
 .../cache/CacheReadThroughRestartSelfTest.java  |   11 +
 .../cache/CacheRemoveAllSelfTest.java           |    9 +
 .../cache/CacheStopAndDestroySelfTest.java      |   18 +
 ...heStoreUsageMultinodeDynamicStartTxTest.java |    8 +
 ...cheStoreUsageMultinodeStaticStartTxTest.java |    8 +
 .../CacheTxNotAllowReadFromBackupTest.java      |   66 +
 .../cache/CashEventWithTxLabelTest.java         |  487 -----
 .../processors/cache/CrossCacheLockTest.java    |    8 +
 .../cache/GridCacheAbstractSelfTest.java        |    4 +-
 .../GridCacheMarshallingNodeJoinSelfTest.java   |    8 +
 ...ridCacheMultinodeUpdateAbstractSelfTest.java |   17 +-
 ...inodeUpdateNearEnabledNoBackupsSelfTest.java |    6 +-
 ...CacheMultinodeUpdateNearEnabledSelfTest.java |   13 +-
 ...ridCacheStoreManagerDeserializationTest.java |   10 +-
 .../cache/GridCacheVersionMultinodeTest.java    |   35 +-
 ...iteCacheInvokeReadThroughSingleNodeTest.java |   46 +
 .../cache/IgniteCacheInvokeReadThroughTest.java |   55 +
 .../IgniteCacheReadThroughStoreCallTest.java    |    8 +
 .../IgniteCacheTxCopyOnReadDisabledTest.java    |    7 +
 .../cache/IgniteCacheTxLocalPeekModesTest.java  |    8 +
 .../cache/IgniteCacheTxLocalStoreValueTest.java |    8 +
 .../IgniteCacheTxNearEnabledStoreValueTest.java |    8 +
 .../cache/IgniteCacheTxNearPeekModesTest.java   |    9 +
 .../cache/IgniteCacheTxPeekModesTest.java       |    9 +-
 .../cache/IgniteCacheTxStoreValueTest.java      |    8 +
 ...IgniteClientCacheInitializationFailTest.java |   37 +-
 .../cache/IgniteDynamicCacheFilterTest.java     |    2 +
 ...ynamicCacheStartCoordinatorFailoverTest.java |    3 +
 ...ynamicCacheStartFailWithPersistenceTest.java |    4 +
 ...eDynamicCacheStartNoExchangeTimeoutTest.java |   36 +-
 .../cache/IgniteDynamicCacheStartSelfTest.java  |   14 +
 ...niteDynamicCacheWithConfigStartSelfTest.java |    2 +
 .../IgniteDynamicClientCacheStartSelfTest.java  |    8 +-
 .../IgniteStartCacheInTransactionSelfTest.java  |    3 +
 .../cache/MvccCacheGroupMetricsMBeanTest.java   |   29 +
 .../cache/WalModeChangeAbstractSelfTest.java    |    3 +
 .../cache/WalModeChangeAdvancedSelfTest.java    |    4 +
 .../distributed/CacheAffinityEarlyTest.java     |    2 +-
 .../CacheDataLossOnPartitionMoveTest.java       |    6 +-
 .../distributed/CacheGroupsPreloadTest.java     |   44 +
 .../CachePageWriteLockUnlockTest.java           |    6 +-
 .../cache/distributed/CacheStartOnJoinTest.java |   14 +-
 .../IgniteCacheCreatePutMultiNodeSelfTest.java  |   17 +-
 .../distributed/IgniteCacheCreatePutTest.java   |   11 +
 .../IgniteCacheFailedUpdateResponseTest.java    |   41 +-
 .../distributed/IgniteCachePrimarySyncTest.java |   53 +-
 .../IgniteCacheReadFromBackupTest.java          |   89 +-
 .../IgniteCacheSingleGetMessageTest.java        |   33 +-
 .../IgniteTxCachePrimarySyncTest.java           |   96 +-
 ...teSynchronizationModesMultithreadedTest.java |   78 +-
 .../IgniteTxConcurrentRemoveObjectsTest.java    |   52 +-
 .../IgniteTxPreloadAbstractTest.java            |   10 +-
 .../dht/IgniteCacheLockFailoverSelfTest.java    |    8 +
 .../dht/IgniteCacheMultiTxLockSelfTest.java     |   24 +-
 .../dht/IgniteCrossCacheMvccTxSelfTest.java     |   39 +
 .../dht/IgniteCrossCacheTxAbstractSelfTest.java |  181 ++
 .../dht/IgniteCrossCacheTxSelfTest.java         |  155 +-
 .../near/GridCacheNearTxPreloadSelfTest.java    |    8 +
 .../near/GridCachePartitionedEventSelfTest.java |    8 +
 .../near/IgniteCacheNearOnlyTxTest.java         |    8 +
 .../near/IgniteCacheNearReadCommittedTest.java  |    8 +
 ...cheRebalancingPartitionCountersMvccTest.java |   29 +
 ...idCacheRebalancingPartitionCountersTest.java |    9 +
 ...cheRebalancingWithAsyncClearingMvccTest.java |   36 +
 ...idCacheRebalancingWithAsyncClearingTest.java |    9 +
 ...balanceOnCachesStoppingOrDestroyingTest.java |  279 +++
 .../PageEvictionMultinodeAbstractTest.java      |    4 +
 .../IgniteCacheLoadAllAbstractTest.java         |   10 +-
 .../IgniteCacheTxLoaderWriterTest.java          |    8 +
 .../IgniteCacheTxLocalLoadAllTest.java          |    7 +
 ...niteCacheTxLocalNoLoadPreviousValueTest.java |    8 +
 .../IgniteCacheTxLocalNoReadThroughTest.java    |    8 +
 .../IgniteCacheTxLocalNoWriteThroughTest.java   |    8 +
 ...cheTxNearEnabledNoLoadPreviousValueTest.java |    8 +
 ...iteCacheTxNearEnabledNoWriteThroughTest.java |    8 +
 .../IgniteCacheTxNoLoadPreviousValueTest.java   |    8 +
 .../IgniteCacheTxNoReadThroughTest.java         |    8 +
 .../IgniteCacheTxNoWriteThroughTest.java        |    8 +
 .../IgniteCacheTxStoreSessionTest.java          |    8 +
 ...TxStoreSessionWriteBehindCoalescingTest.java |    8 +
 ...gniteCacheTxStoreSessionWriteBehindTest.java |    8 +
 .../IgnitePdsCorruptedStoreTest.java            |    3 +-
 .../persistence/IgnitePdsTaskCancelingTest.java |    3 +
 .../db/IgnitePdsDataRegionMetricsTest.java      |   50 +-
 .../metastorage/IgniteMetaStorageBasicTest.java |  273 ++-
 ...tinuousQueryAsyncFailoverMvccTxSelfTest.java |    5 -
 ...heContinuousQueryFailoverMvccTxSelfTest.java |    5 -
 ...heWriteBehindStoreMultithreadedSelfTest.java |   35 +-
 ...IntegrityWithPrimaryIndexCorruptionTest.java |    9 +
 .../TxRollbackAsyncNearCacheTest.java           |    9 +
 .../cache/transactions/TxRollbackAsyncTest.java |   43 +-
 ...WithSmallTimeoutAndContentionOneKeyTest.java |   10 +
 ...ersionedEntryLocalTransactionalSelfTest.java |    9 +
 .../testframework/MvccFeatureChecker.java       |   20 +
 .../testframework/junits/GridAbstractTest.java  |    4 +-
 .../testsuites/IgniteCacheMvccTestSuite2.java   |    1 +
 .../testsuites/IgniteCacheMvccTestSuite4.java   |  197 ++
 .../testsuites/IgniteCacheMvccTestSuite7.java   |   76 +
 .../testsuites/IgniteCacheMvccTestSuite9.java   |   57 +
 .../testsuites/IgniteCacheTestSuite4.java       |  354 +--
 .../testsuites/IgniteCacheTestSuite7.java       |   56 +-
 .../testsuites/IgniteCacheTestSuite9.java       |   33 +-
 .../ignite/testsuites/IgnitePdsTestSuite4.java  |    6 +
 .../ignite/util/GridCommandHandlerTest.java     |  177 +-
 .../h2/twostep/GridReduceQueryExecutor.java     |  648 +-----
 .../h2/twostep/ReducePartitionMapResult.java    |   73 +
 .../query/h2/twostep/ReducePartitionMapper.java |  638 ++++++
 .../h2/twostep/ReducePartitionsSpecializer.java |   61 +
 .../db/wal/IgniteWalRecoveryTest.java           | 1125 +++++-----
 .../ignite/ml/util/MLSandboxDatasets.java       |   87 +
 .../apache/ignite/ml/util/SandboxMLCache.java   |  133 ++
 .../datasets/boston_housing_dataset.txt         |  505 +++++
 .../resources/datasets/cleared_machines.csv     |  209 ++
 .../resources/datasets/glass_identification.csv |  116 +
 modules/ml/src/main/resources/datasets/iris.txt |  150 ++
 .../main/resources/datasets/mortalitydata.csv   |   53 +
 .../ml/src/main/resources/datasets/titanic.csv  | 1310 ++++++++++++
 .../resources/datasets/two_classed_iris.csv     |  100 +
 modules/ml/src/main/resources/datasets/wine.txt |  178 ++
 .../LogisticRegressionSGDTrainerTest.java       |    2 +-
 modules/web-console/backend/app/schemas.js      |    4 +-
 .../web-console/backend/routes/activities.js    |    4 +-
 .../web-console/backend/services/activities.js  |    8 +-
 .../docker/compose/docker-compose.yml           |    3 +-
 .../app/components/ignite-chart/controller.js   |    1 +
 .../input-dialog/input-dialog.tpl.pug           |    1 -
 .../cache-edit-form/templates/memory.pug        |   37 +
 .../components/cluster-edit-form/controller.js  |    7 +-
 .../cluster-edit-form/templates/service.pug     |    4 +-
 .../query-actions-button/component.ts           |   28 +
 .../query-actions-button/controller.ts          |   53 +
 .../query-actions-button/template.pug           |   28 +
 .../components/queries-notebook/controller.js   | 1952 -----------------
 .../components/queries-notebook/controller.ts   | 2007 ++++++++++++++++++
 .../components/queries-notebook/index.js        |    2 +
 .../queries-notebook/template.tpl.pug           |   50 +-
 .../app/components/ui-grid/component.js         |    1 +
 modules/web-console/frontend/app/data/i18n.js   |    6 +-
 .../generator/ConfigurationGenerator.js         |    9 +
 .../configuration/generator/Maven.service.js    |    3 +
 .../generator/defaults/Cache.service.js         |    5 +-
 .../web-console/frontend/app/services/Caches.js |    8 +
 .../frontend/app/services/Version.service.js    |    6 +-
 modules/web-console/frontend/app/types/index.ts |    9 +-
 .../console/agent/handlers/ClusterListener.java |   10 +
 .../ignite/console/agent/rest/RestExecutor.java |   24 +-
 246 files changed, 12014 insertions(+), 6260 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/6ae44a77/modules/core/src/main/java/org/apache/ignite/internal/commandline/CommandHandler.java
----------------------------------------------------------------------


[03/37] ignite git commit: IGNITE-10049: MVCC: Create "Cache 4" test suite for MVCC mode. This closes #5499.

Posted by ak...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CashEventWithTxLabelTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CashEventWithTxLabelTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CashEventWithTxLabelTest.java
deleted file mode 100644
index da25288..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CashEventWithTxLabelTest.java
+++ /dev/null
@@ -1,487 +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 java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.function.Consumer;
-import java.util.function.Function;
-import java.util.stream.Collectors;
-import java.util.stream.IntStream;
-import org.apache.ignite.Ignite;
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheEntryProcessor;
-import org.apache.ignite.cache.CacheMode;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.events.CacheEvent;
-import org.apache.ignite.events.Event;
-import org.apache.ignite.internal.IgniteKernal;
-import org.apache.ignite.internal.util.lang.IgnitePair;
-import org.apache.ignite.lang.IgnitePredicate;
-import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
-import org.apache.ignite.transactions.Transaction;
-import org.apache.ignite.transactions.TransactionConcurrency;
-import org.apache.ignite.transactions.TransactionIsolation;
-import org.junit.Assert;
-
-import static org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_PUT;
-import static org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_READ;
-import static org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_REMOVED;
-
-/**
- * Test to check passing transaction's label for EVT_CACHE_OBJECT_READ, EVT_CACHE_OBJECT_PUT,
- * EVT_CACHE_OBJECT_REMOVED events.
- */
-public class CashEventWithTxLabelTest extends GridCommonAbstractTest {
-    /** Types event to be checked. */
-    private static final int[] CACHE_EVENT_TYPES = {EVT_CACHE_OBJECT_READ, EVT_CACHE_OBJECT_PUT, EVT_CACHE_OBJECT_REMOVED};
-
-    /** Transaction label. */
-    private static final String TX_LABEL = "TX_LABEL";
-
-    /** Number of server nodes. */
-    private static final int SRVS = 3;
-
-    /** Number of client nodes. */
-    private static final int CLIENTS = 1;
-
-    /** Cache name. */
-    public static final String CACHE_NAME = "cache";
-
-    /** Client or server mode to start Ignite instance. */
-    private static boolean client;
-
-    /** Key related to primary node. */
-    private Integer primaryKey = 0;
-
-    /** Key related to backup node. */
-    private Integer backupKey = 0;
-
-    /** Current cash backup count. */
-    private int backupCnt;
-
-    /** Current transaction isolation level. */
-    private TransactionIsolation isolation;
-
-    /** Current transaction concurrency level. */
-    private TransactionConcurrency concurrency;
-
-    /** All failed tests information, */
-    private ArrayList<String> errors = new ArrayList<>();
-
-    /** Count of errors on previous iteration of testing. */
-    private int prevErrCnt = 0;
-
-    /** List to keep all events with no tx label between run tests */
-    private static List<CacheEvent> wrongEvts = Collections.synchronizedList(new ArrayList<>());
-
-    /** Simple entry processor to use for tests */
-    private static CacheEntryProcessor entryProcessor = (CacheEntryProcessor)(entry, objects) -> entry.getValue();
-
-    /** {@inheritDoc} */
-    @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
-        return super.getConfiguration(igniteInstanceName).setClientMode(client);
-    }
-
-    /** {@inheritDoc} */
-    @Override protected void beforeTestsStarted() throws Exception {
-        super.beforeTestsStarted();
-
-        client = false;
-
-        startGridsMultiThreaded(SRVS);
-
-        client = true;
-
-        startGridsMultiThreaded(SRVS, CLIENTS);
-
-        client = false;
-
-        waitForDiscovery(primary(), backup1(), backup2(), client());
-
-        registerEventListeners(primary(), backup1(), backup2(), client());
-    }
-
-    /** {@inheritDoc} */
-    @Override protected void afterTestsStopped() throws Exception {
-        super.afterTestsStopped();
-
-        stopAllGrids();
-    }
-
-    /**
-     * Check all cases for passing transaction label in cash event.
-     *
-     * @throws Exception If failed.
-     */
-    public void testPassTxLabelInCashEventForAllCases() throws Exception {
-        Ignite[] nodes = {client(), primary(), backup1(), backup2()};
-
-        for (int backupCnt = 0; backupCnt < SRVS; backupCnt++) {
-            this.backupCnt = backupCnt;
-
-            prepareCache(backupCnt);
-
-            for (TransactionIsolation isolation : TransactionIsolation.values()) {
-                this.isolation = isolation;
-
-                for (TransactionConcurrency concurrency : TransactionConcurrency.values()) {
-                    this.concurrency = concurrency;
-
-                    for (int i = 0; i < nodes.length - 1; i++) {
-                        Ignite nodeForPut = nodes[i];
-                        Ignite nodeForGet = nodes[i + 1];
-
-                        singleWriteReadRemoveTest(nodeForPut, nodeForGet);
-
-                        multiWriteReadRemoveTest(nodeForPut, nodeForGet);
-
-                        singleNodeBatchWriteReadRemoveTest(nodeForPut, nodeForGet);
-
-                        multiNodeBatchWriteReadRemoveTest(nodeForPut, nodeForGet);
-
-                        writeInvokeRemoveTest(nodeForPut, nodeForGet);
-
-                        writeInvokeAllRemoveTest(nodeForPut, nodeForGet);
-                    }
-                }
-            }
-        }
-
-        String listOfFailedTests = String.join(",\n", errors);
-
-        Assert.assertTrue("Have been received " + prevErrCnt + " cache events with incorrect txlabel.\n" +
-                "Failed tests:" + listOfFailedTests,
-            errors.isEmpty());
-    }
-
-    /**
-     * Check error after run test. In case error occured information about failed test will be added to errors list.
-     *
-     * @param testName Name of test which result will be checked.
-     * @param node1 First node
-     * @param node2 Second node
-     */
-    private void checkResult(String testName, Ignite node1, Ignite node2) {
-        int currErrCnt = wrongEvts.size();
-
-        if (prevErrCnt != currErrCnt) {
-            prevErrCnt = currErrCnt;
-
-            errors.add(String.format("%s backCnt-%s, %s, %s, node1-%s, node2-%s",
-                testName, backupCnt, isolation, concurrency, nodeType(node1), nodeType(node2)));
-        }
-    }
-
-    /**
-     * @param node Ignite node
-     * @return Node type in the test
-     */
-    private String nodeType(Ignite node) {
-        if (client().equals(node))
-            return "CLIENT";
-        else if (primary().equals(node))
-            return "PRIMARY";
-        else if (backup1().equals(node))
-            return "BACKUP1";
-        else if (backup2().equals(node))
-            return "BACKUP2";
-        else
-            return "UNKNOWN";
-    }
-
-    /**
-     * Test single put, get, remove operations.
-     *
-     * @param instanceToPut Ignite instance to put test data.
-     * @param instanceToGet Ignite instance to get test data.
-     */
-    private void singleWriteReadRemoveTest(Ignite instanceToPut, Ignite instanceToGet) {
-        runTransactionally(instanceToPut, (Ignite ign) -> {
-            ign.cache(CACHE_NAME).put(primaryKey, 3);
-        });
-
-        runTransactionally(instanceToGet, (Ignite ign) -> {
-            ign.cache(CACHE_NAME).get(primaryKey);
-        });
-
-        runTransactionally(instanceToGet, (Ignite ign) -> {
-            ign.cache(CACHE_NAME).remove(primaryKey);
-        });
-
-        checkResult("singleWriteReadRemoveTest", instanceToPut, instanceToGet);
-    }
-
-    /**
-     * Test multi put, get, remove operations
-     *
-     * @param instanceToPut Ignite instance to put test data.
-     * @param instanceToGet Ignite instance to get test data.
-     */
-    private void multiWriteReadRemoveTest(Ignite instanceToPut, Ignite instanceToGet) {
-        runTransactionally(instanceToPut, (Ignite ign) -> {
-            ign.cache(CACHE_NAME).put(primaryKey, 2);
-            ign.cache(CACHE_NAME).put(backupKey, 3);
-        });
-
-        runTransactionally(instanceToGet, (Ignite ign) -> {
-            ign.cache(CACHE_NAME).get(primaryKey);
-            ign.cache(CACHE_NAME).get(backupKey);
-        });
-
-        runTransactionally(instanceToGet, (Ignite ign) -> {
-            ign.cache(CACHE_NAME).remove(primaryKey);
-            ign.cache(CACHE_NAME).remove(backupKey);
-        });
-
-        checkResult("multiWriteReadRemoveTest", instanceToPut, instanceToGet);
-    }
-
-    /**
-     * Test multi nodes batch write-read
-     *
-     * @param instanceToPut Ignite instance to put test data.
-     * @param instanceToGet Ignite instance to get test data.
-     */
-    private void multiNodeBatchWriteReadRemoveTest(Ignite instanceToPut, Ignite instanceToGet) {
-        Map<Integer, Integer> keyValuesMap = IntStream.range(0, 100).boxed()
-            .collect(Collectors.toMap(Function.identity(), Function.identity()));
-
-        runTransactionally(instanceToPut, (Ignite ign) -> {
-            ign.cache(CACHE_NAME).putAll(keyValuesMap);
-        });
-
-        runTransactionally(instanceToGet, (Ignite ign) -> {
-            ign.cache(CACHE_NAME).getAll(keyValuesMap.keySet());
-        });
-
-        runTransactionally(instanceToGet, (Ignite ign) -> {
-            ign.cache(CACHE_NAME).removeAll(keyValuesMap.keySet());
-        });
-
-        checkResult("multiNodeBatchWriteReadRemoveTest", instanceToPut, instanceToGet);
-    }
-
-    /**
-     * Test single node batch write-read-remove
-     *
-     * @param instanceToPut Ignite instance to put test data.
-     * @param instanceToGet Ignite instance to get test data.
-     */
-    private void singleNodeBatchWriteReadRemoveTest(Ignite instanceToPut, Ignite instanceToGet) {
-        IgnitePair<Integer> keys = evaluatePrimaryAndBackupKeys(primaryKey + 1, backupKey + 1);
-
-        Map<Integer, Integer> keyValuesMap = new HashMap<>();
-        keyValuesMap.put(primaryKey, 1);
-        keyValuesMap.put(keys.get1(), 2);
-
-        runTransactionally(instanceToPut, (Ignite ign) -> {
-            ign.cache(CACHE_NAME).putAll(keyValuesMap);
-        });
-
-        runTransactionally(instanceToGet, (Ignite ign) -> {
-            ign.cache(CACHE_NAME).getAll(keyValuesMap.keySet());
-        });
-
-        runTransactionally(instanceToGet, (Ignite ign) -> {
-            ign.cache(CACHE_NAME).removeAll(keyValuesMap.keySet());
-        });
-
-        checkResult("oneNodeBatchWriteReadRemoveTest", instanceToPut, instanceToGet);
-    }
-
-    /**
-     * Test put-invoke-remove
-     *
-     * @param instanceToPut Ignite instance to put test data.
-     * @param instanceToGet Ignite instance to get test data.
-     */
-    @SuppressWarnings("unchecked")
-    private void writeInvokeRemoveTest(Ignite instanceToPut, Ignite instanceToGet) {
-        runTransactionally(instanceToGet, (Ignite ign) -> {
-            ign.cache(CACHE_NAME).put(primaryKey, 3);
-        });
-
-        runTransactionally(instanceToPut, (Ignite ign) -> {
-            ign.cache(CACHE_NAME).invoke(primaryKey, entryProcessor);
-            ign.cache(CACHE_NAME).invoke(backupKey, entryProcessor);
-        });
-
-        runTransactionally(instanceToGet, (Ignite ign) -> {
-            ign.cache(CACHE_NAME).remove(primaryKey);
-        });
-
-        checkResult("writeInvokeRemoveTest", instanceToPut, instanceToGet);
-    }
-
-    /**
-     * Test putAll-invokeAll-removeAll
-     *
-     * @param instanceToPut Ignite instance to put test data.
-     * @param instanceToGet Ignite instance to get test data.
-     */
-    @SuppressWarnings("unchecked")
-    private void writeInvokeAllRemoveTest(Ignite instanceToPut, Ignite instanceToGet) {
-        Map<Integer, Integer> keyValuesMap = IntStream.range(0, 100).boxed()
-            .collect(Collectors.toMap(Function.identity(), Function.identity()));
-
-        runTransactionally(instanceToGet, (Ignite ign) -> {
-            ign.cache(CACHE_NAME).putAll(keyValuesMap);
-        });
-
-        runTransactionally(instanceToPut, (Ignite ign) -> {
-            ign.cache(CACHE_NAME).invokeAll(keyValuesMap.keySet(), entryProcessor);
-        });
-
-        runTransactionally(instanceToGet, (Ignite ign) -> {
-            ign.cache(CACHE_NAME).removeAll(keyValuesMap.keySet());
-        });
-
-        checkResult("WriteInvokeAllRemoveTest", instanceToPut, instanceToGet);
-    }
-
-    /**
-     * Run command in transaction.
-     *
-     * @param startNode Ignite node to start transaction and run passed command.
-     * @param cmdInTx Command which should be done in transaction.
-     */
-    private void runTransactionally(Ignite startNode, Consumer<Ignite> cmdInTx) {
-        try (Transaction tx = startNode.transactions().withLabel(TX_LABEL).txStart(concurrency, isolation)) {
-            cmdInTx.accept(startNode);
-
-            tx.commit();
-        }
-    }
-
-    /**
-     * Add event listener to passed Ignite instances for cache event types.
-     *
-     * @param igns Ignite instances.
-     */
-    private void registerEventListeners(Ignite... igns) {
-        if (igns != null) {
-            for (Ignite ign : igns) {
-                ign.events().enableLocal(CACHE_EVENT_TYPES);
-                ign.events().localListen((IgnitePredicate<Event>)event -> {
-                    CacheEvent cacheEvt = (CacheEvent)event;
-
-                    if (!TX_LABEL.equals(cacheEvt.txLabel())) {
-                        log.error("Has been received event with incorrect label " + cacheEvt.txLabel() + " ," +
-                            " expected " + TX_LABEL + " label");
-
-                        wrongEvts.add(cacheEvt);
-                    }
-
-                    return true;
-                }, CACHE_EVENT_TYPES);
-            }
-        }
-    }
-
-    /**
-     * Create cache with passed number of backups and determinate primary and backup keys. If cache was created before
-     * it will be removed before create new one.
-     *
-     * @param cacheBackups Number of backups for cache.
-     * @throws InterruptedException In case of fail.
-     */
-    private void prepareCache(int cacheBackups) throws InterruptedException {
-        IgniteCache<Object, Object> cache = client().cache(CACHE_NAME);
-
-        if (cache != null)
-            cache.destroy();
-
-        client().createCache(
-            new CacheConfiguration<Integer, Integer>()
-                .setName(CACHE_NAME)
-                .setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL)
-                .setCacheMode(CacheMode.PARTITIONED)
-                .setBackups(cacheBackups)
-        );
-
-        awaitPartitionMapExchange();
-
-        IgnitePair<Integer> keys = evaluatePrimaryAndBackupKeys(0, 0);
-
-        primaryKey = keys.get1();
-        backupKey = keys.get2();
-    }
-
-    /**
-     * Evaluate primary and backup keys.
-     *
-     * @param primaryKeyStart Value from need to start calculate primary key.
-     * @param backupKeyStart Value from need to start calculate backup key.
-     * @return Pair of result. The first result is found primary key. The second is found backup key.
-     */
-    private IgnitePair<Integer> evaluatePrimaryAndBackupKeys(final int primaryKeyStart, final int backupKeyStart) {
-        int primaryKey = primaryKeyStart;
-        int backupKey = backupKeyStart;
-
-        while (!client().affinity(CACHE_NAME).isPrimary(((IgniteKernal)primary()).localNode(), primaryKey))
-            primaryKey++;
-
-        while (!client().affinity(CACHE_NAME).isBackup(((IgniteKernal)primary()).localNode(), backupKey)
-            && backupKey < 100 + backupKeyStart)
-            backupKey++;
-
-        return new IgnitePair<>(primaryKey, backupKey);
-    }
-
-    /**
-     * Return primary node.
-     *
-     * @return Primary node.
-     */
-    private Ignite primary() {
-        return ignite(0);
-    }
-
-    /**
-     * Return first backup node.
-     *
-     * @return First backup node.
-     */
-    private Ignite backup1() {
-        return ignite(1);
-    }
-
-    /**
-     * Return second backup node.
-     *
-     * @return Second backup node.
-     */
-    private Ignite backup2() {
-        return ignite(2);
-    }
-
-    /**
-     * Return client node.
-     *
-     * @return Client node.
-     */
-    private Ignite client() {
-        return ignite(3);
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CrossCacheLockTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CrossCacheLockTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CrossCacheLockTest.java
index 8f0e20f..d609ec7 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CrossCacheLockTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CrossCacheLockTest.java
@@ -25,6 +25,7 @@ import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
@@ -46,6 +47,13 @@ public class CrossCacheLockTest extends GridCommonAbstractTest {
     private static final String CACHE2 = "cache2";
 
     /** {@inheritDoc} */
+    @Override public void setUp() throws Exception {
+        MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.ENTRY_LOCK);
+
+        super.setUp();
+    }
+
+    /** {@inheritDoc} */
     @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
         IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/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 346e9f9..2e64c52 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
@@ -53,6 +53,7 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
 import org.apache.ignite.testframework.GridTestUtils;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.apache.ignite.transactions.Transaction;
 import org.jetbrains.annotations.Nullable;
@@ -92,7 +93,8 @@ public abstract class GridCacheAbstractSelfTest extends GridCommonAbstractTest {
 
         assert cnt >= 1 : "At least one grid must be started";
 
-        initStoreStrategy();
+        if (!MvccFeatureChecker.forcedMvcc() || MvccFeatureChecker.isSupported(MvccFeatureChecker.Feature.CACHE_STORE))
+            initStoreStrategy();
 
         startGrids(cnt);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMarshallingNodeJoinSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMarshallingNodeJoinSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMarshallingNodeJoinSelfTest.java
index df3430f..c837e21 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMarshallingNodeJoinSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMarshallingNodeJoinSelfTest.java
@@ -39,6 +39,7 @@ import org.apache.ignite.internal.util.typedef.PE;
 import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.apache.ignite.transactions.Transaction;
 
@@ -52,6 +53,13 @@ public class GridCacheMarshallingNodeJoinSelfTest extends GridCommonAbstractTest
     private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
 
     /** {@inheritDoc} */
+    @Override public void setUp() throws Exception {
+        MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE);
+
+        super.setUp();
+    }
+
+    /** {@inheritDoc} */
     @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
         IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateAbstractSelfTest.java
index 800f4ba..2027117 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateAbstractSelfTest.java
@@ -29,6 +29,7 @@ import org.apache.ignite.testframework.GridTestUtils;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
+import static org.apache.ignite.testframework.MvccFeatureChecker.assertMvccWriteConflict;
 
 /**
  * Multinode update test.
@@ -97,8 +98,20 @@ public abstract class GridCacheMultinodeUpdateAbstractSelfTest extends GridCache
 
                     final IgniteCache<Integer, Integer> cache = grid(idx).cache(DEFAULT_CACHE_NAME);
 
-                    for (int i = 0; i < ITERATIONS_PER_THREAD && !failed; i++)
-                        cache.invoke(key, new IncProcessor());
+                        for (int i = 0; i < ITERATIONS_PER_THREAD && !failed; i++) {
+                            boolean updated = false;
+
+                            while (!updated) {
+                                try {
+                                    cache.invoke(key, new IncProcessor());
+
+                                    updated = true;
+                                }
+                                catch (Exception e) {
+                                    assertMvccWriteConflict(e);
+                                }
+                            }
+                        }
 
                     return null;
                 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateNearEnabledNoBackupsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateNearEnabledNoBackupsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateNearEnabledNoBackupsSelfTest.java
index fbfb994..aa9f029 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateNearEnabledNoBackupsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateNearEnabledNoBackupsSelfTest.java
@@ -18,6 +18,7 @@
 package org.apache.ignite.internal.processors.cache;
 
 import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 
 /**
  *
@@ -39,6 +40,9 @@ public class GridCacheMultinodeUpdateNearEnabledNoBackupsSelfTest extends GridCa
 
     /** {@inheritDoc} */
     @Override public void testInvoke() throws Exception {
-        fail("https://issues.apache.org/jira/browse/IGNITE-809");
+        if (!MvccFeatureChecker.forcedMvcc())
+            fail("https://issues.apache.org/jira/browse/IGNITE-809");
+        else
+            super.testInvoke();
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateNearEnabledSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateNearEnabledSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateNearEnabledSelfTest.java
index 4cdc7a4..c0738a3 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateNearEnabledSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateNearEnabledSelfTest.java
@@ -19,6 +19,7 @@ package org.apache.ignite.internal.processors.cache;
 
 import org.apache.ignite.cache.CacheAtomicityMode;
 import org.apache.ignite.configuration.NearCacheConfiguration;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
 
@@ -27,6 +28,13 @@ import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
  */
 public class GridCacheMultinodeUpdateNearEnabledSelfTest extends GridCacheMultinodeUpdateAbstractSelfTest {
     /** {@inheritDoc} */
+    @Override public void setUp() throws Exception {
+        MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE);
+
+        super.setUp();
+    }
+
+    /** {@inheritDoc} */
     @Override protected NearCacheConfiguration nearConfiguration() {
         return new NearCacheConfiguration();
     }
@@ -38,6 +46,9 @@ public class GridCacheMultinodeUpdateNearEnabledSelfTest extends GridCacheMultin
 
     /** {@inheritDoc} */
     @Override public void testInvoke() throws Exception {
-        fail("https://issues.apache.org/jira/browse/IGNITE-809");
+        if (!MvccFeatureChecker.forcedMvcc())
+            fail("https://issues.apache.org/jira/browse/IGNITE-809");
+        else
+            super.testInvoke();
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStoreManagerDeserializationTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStoreManagerDeserializationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStoreManagerDeserializationTest.java
index c63f242..124e284 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStoreManagerDeserializationTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStoreManagerDeserializationTest.java
@@ -42,6 +42,7 @@ import org.apache.ignite.marshaller.jdk.JdkMarshaller;
 import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
@@ -66,6 +67,13 @@ public class GridCacheStoreManagerDeserializationTest extends GridCommonAbstract
     /** Test cache name. */
     protected static final String CACHE_NAME = "cache_name";
 
+    /** {@inheritDoc} */
+    @Override public void setUp() throws Exception {
+        MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE);
+
+        super.setUp();
+    }
+
     /**
      * @return Cache mode.
      */
@@ -123,7 +131,7 @@ public class GridCacheStoreManagerDeserializationTest extends GridCommonAbstract
 
         cc.setBackups(0);
 
-        cc.setAtomicityMode(CacheAtomicityMode.ATOMIC);
+        cc.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
 
         return cc;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionMultinodeTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionMultinodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionMultinodeTest.java
index 0fd3fb9..ccecfb7 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionMultinodeTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionMultinodeTest.java
@@ -33,6 +33,7 @@ import org.jetbrains.annotations.Nullable;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
+import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 import static org.apache.ignite.transactions.TransactionConcurrency.OPTIMISTIC;
 import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC;
@@ -109,6 +110,30 @@ public class GridCacheVersionMultinodeTest extends GridCacheAbstractSelfTest {
     /**
      * @throws Exception If failed.
      */
+    public void testVersionMvccTx() throws Exception {
+        fail("https://issues.apache.org/jira/browse/IGNITE-8582");
+
+        atomicityMode = TRANSACTIONAL_SNAPSHOT;
+
+        checkVersion();
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testVersionMvccTxNearEnabled() throws Exception {
+        fail("https://issues.apache.org/jira/browse/IGNITE-7187");
+
+        atomicityMode = TRANSACTIONAL_SNAPSHOT;
+
+        near = true;
+
+        checkVersion();
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
     public void testVersionAtomicPrimary() throws Exception {
         atomicityMode = ATOMIC;
 
@@ -138,17 +163,19 @@ public class GridCacheVersionMultinodeTest extends GridCacheAbstractSelfTest {
             checkVersion(String.valueOf(i), null); // Update.
         }
 
-        if (atomicityMode == TRANSACTIONAL) {
+        if (atomicityMode != ATOMIC) {
             for (int i = 100; i < 200; i++) {
                 checkVersion(String.valueOf(i), PESSIMISTIC); // Create.
 
                 checkVersion(String.valueOf(i), PESSIMISTIC); // Update.
             }
 
-            for (int i = 200; i < 300; i++) {
-                checkVersion(String.valueOf(i), OPTIMISTIC); // Create.
+            if (atomicityMode != TRANSACTIONAL_SNAPSHOT) {
+                for (int i = 200; i < 300; i++) {
+                    checkVersion(String.valueOf(i), OPTIMISTIC); // Create.
 
-                checkVersion(String.valueOf(i), OPTIMISTIC); // Update.
+                    checkVersion(String.valueOf(i), OPTIMISTIC); // Update.
+                }
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughSingleNodeTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughSingleNodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughSingleNodeTest.java
index 406e5af..cb4410a 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughSingleNodeTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughSingleNodeTest.java
@@ -17,8 +17,11 @@
 
 package org.apache.ignite.internal.processors.cache;
 
+import org.apache.ignite.testframework.MvccFeatureChecker;
+
 import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
+import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT;
 import static org.apache.ignite.cache.CacheMode.LOCAL;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 import static org.apache.ignite.cache.CacheMode.REPLICATED;
@@ -28,6 +31,13 @@ import static org.apache.ignite.cache.CacheMode.REPLICATED;
  */
 public class IgniteCacheInvokeReadThroughSingleNodeTest extends IgniteCacheInvokeReadThroughAbstractTest {
     /** {@inheritDoc} */
+    @Override public void setUp() throws Exception {
+        MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE);
+
+        super.setUp();
+    }
+
+    /** {@inheritDoc} */
     @Override protected void startNodes() throws Exception {
         startGrid(0);
     }
@@ -87,4 +97,40 @@ public class IgniteCacheInvokeReadThroughSingleNodeTest extends IgniteCacheInvok
     public void testInvokeReadThroughTxLocal() throws Exception {
         invokeReadThrough(cacheConfiguration(LOCAL, TRANSACTIONAL, 0, false));
     }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testInvokeReadThroughMvccTx() throws Exception {
+        fail("https://issues.apache.org/jira/browse/IGNITE-8582");
+
+        invokeReadThrough(cacheConfiguration(PARTITIONED, TRANSACTIONAL_SNAPSHOT, 1, false));
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testInvokeReadThroughMvccTxNearCache() throws Exception {
+        fail("https://issues.apache.org/jira/browse/IGNITE-8582");
+
+        invokeReadThrough(cacheConfiguration(PARTITIONED, TRANSACTIONAL_SNAPSHOT, 1, true));
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testInvokeReadThroughMvccTxReplicated() throws Exception {
+        fail("https://issues.apache.org/jira/browse/IGNITE-8582");
+
+        invokeReadThrough(cacheConfiguration(REPLICATED, TRANSACTIONAL_SNAPSHOT, 0, false));
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testInvokeReadThroughMvccTxLocal() throws Exception {
+        fail("https://issues.apache.org/jira/browse/IGNITE-8582");
+
+        invokeReadThrough(cacheConfiguration(LOCAL, TRANSACTIONAL_SNAPSHOT, 0, false));
+    }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughTest.java
index 8fd3758..3866a18 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughTest.java
@@ -17,8 +17,11 @@
 
 package org.apache.ignite.internal.processors.cache;
 
+import org.apache.ignite.testframework.MvccFeatureChecker;
+
 import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
+import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 import static org.apache.ignite.cache.CacheMode.REPLICATED;
 
@@ -27,6 +30,13 @@ import static org.apache.ignite.cache.CacheMode.REPLICATED;
  */
 public class IgniteCacheInvokeReadThroughTest extends IgniteCacheInvokeReadThroughAbstractTest {
     /** {@inheritDoc} */
+    @Override public void setUp() throws Exception {
+        MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE);
+
+        super.setUp();
+    }
+
+    /** {@inheritDoc} */
     @Override protected void startNodes() throws Exception {
         startGridsMultiThreaded(4);
 
@@ -104,4 +114,49 @@ public class IgniteCacheInvokeReadThroughTest extends IgniteCacheInvokeReadThrou
     public void testInvokeReadThroughTxReplicated() throws Exception {
         invokeReadThrough(cacheConfiguration(REPLICATED, TRANSACTIONAL, 0, false));
     }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testInvokeReadThroughMvccTx0() throws Exception {
+        fail("https://issues.apache.org/jira/browse/IGNITE-8582");
+
+        invokeReadThrough(cacheConfiguration(PARTITIONED, TRANSACTIONAL_SNAPSHOT, 0, false));
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testInvokeReadThroughMvccTx1() throws Exception {
+        fail("https://issues.apache.org/jira/browse/IGNITE-8582");
+
+        invokeReadThrough(cacheConfiguration(PARTITIONED, TRANSACTIONAL_SNAPSHOT, 1, false));
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testInvokeReadThroughMvccTx2() throws Exception {
+        fail("https://issues.apache.org/jira/browse/IGNITE-8582");
+
+        invokeReadThrough(cacheConfiguration(PARTITIONED, TRANSACTIONAL_SNAPSHOT, 2, false));
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testInvokeReadThroughMvccTxNearCache() throws Exception {
+        fail("https://issues.apache.org/jira/browse/IGNITE-8582");
+
+        invokeReadThrough(cacheConfiguration(PARTITIONED, TRANSACTIONAL_SNAPSHOT, 1, true));
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testInvokeReadThroughMvccTxReplicated() throws Exception {
+        fail("https://issues.apache.org/jira/browse/IGNITE-8582");
+
+        invokeReadThrough(cacheConfiguration(REPLICATED, TRANSACTIONAL_SNAPSHOT, 0, false));
+    }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheReadThroughStoreCallTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheReadThroughStoreCallTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheReadThroughStoreCallTest.java
index 423c4a1..834be7f 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheReadThroughStoreCallTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheReadThroughStoreCallTest.java
@@ -39,6 +39,7 @@ import org.apache.ignite.lang.IgniteRunnable;
 import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.apache.ignite.transactions.Transaction;
 import org.apache.ignite.transactions.TransactionConcurrency;
@@ -65,6 +66,13 @@ public class IgniteCacheReadThroughStoreCallTest extends GridCommonAbstractTest
     protected boolean client;
 
     /** {@inheritDoc} */
+    @Override public void setUp() throws Exception {
+        MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE);
+
+        super.setUp();
+    }
+
+    /** {@inheritDoc} */
     @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
         IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxCopyOnReadDisabledTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxCopyOnReadDisabledTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxCopyOnReadDisabledTest.java
index 2909f0a..27bf171 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxCopyOnReadDisabledTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxCopyOnReadDisabledTest.java
@@ -18,6 +18,7 @@
 package org.apache.ignite.internal.processors.cache;
 
 import org.apache.ignite.cache.CacheAtomicityMode;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
 
@@ -26,6 +27,12 @@ import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
  */
 public class IgniteCacheTxCopyOnReadDisabledTest extends IgniteCacheCopyOnReadDisabledAbstractTest {
     /** {@inheritDoc} */
+    @Override public void setUp() throws Exception {
+        MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE);
+
+        super.setUp();
+    }
+    /** {@inheritDoc} */
     @Override protected CacheAtomicityMode atomicityMode() {
         return TRANSACTIONAL;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxLocalPeekModesTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxLocalPeekModesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxLocalPeekModesTest.java
index 3439590..26dbb7e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxLocalPeekModesTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxLocalPeekModesTest.java
@@ -19,6 +19,7 @@ package org.apache.ignite.internal.processors.cache;
 
 import org.apache.ignite.cache.CacheAtomicityMode;
 import org.apache.ignite.cache.CacheMode;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
 import static org.apache.ignite.cache.CacheMode.LOCAL;
@@ -28,6 +29,13 @@ import static org.apache.ignite.cache.CacheMode.LOCAL;
  */
 public class IgniteCacheTxLocalPeekModesTest extends IgniteCachePeekModesAbstractTest {
     /** {@inheritDoc} */
+    @Override public void setUp() throws Exception {
+        MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE);
+
+        super.setUp();
+    }
+
+    /** {@inheritDoc} */
     @Override protected CacheAtomicityMode atomicityMode() {
         return TRANSACTIONAL;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxLocalStoreValueTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxLocalStoreValueTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxLocalStoreValueTest.java
index b398726..a25fd90 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxLocalStoreValueTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxLocalStoreValueTest.java
@@ -20,6 +20,7 @@ package org.apache.ignite.internal.processors.cache;
 import org.apache.ignite.cache.CacheAtomicityMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.configuration.NearCacheConfiguration;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
 import static org.apache.ignite.cache.CacheMode.LOCAL;
@@ -29,6 +30,13 @@ import static org.apache.ignite.cache.CacheMode.LOCAL;
  */
 public class IgniteCacheTxLocalStoreValueTest extends IgniteCacheStoreValueAbstractTest {
     /** {@inheritDoc} */
+    @Override public void setUp() throws Exception {
+        MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE);
+
+        super.setUp();
+    }
+
+    /** {@inheritDoc} */
     @Override protected int gridCount() {
         return 1;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxNearEnabledStoreValueTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxNearEnabledStoreValueTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxNearEnabledStoreValueTest.java
index fc719fa..4dc2cf3 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxNearEnabledStoreValueTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxNearEnabledStoreValueTest.java
@@ -18,12 +18,20 @@
 package org.apache.ignite.internal.processors.cache;
 
 import org.apache.ignite.configuration.NearCacheConfiguration;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 
 /**
  *
  */
 public class IgniteCacheTxNearEnabledStoreValueTest extends IgniteCacheTxStoreValueTest {
     /** {@inheritDoc} */
+    @Override public void setUp() throws Exception {
+        MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE);
+
+        super.setUp();
+    }
+
+    /** {@inheritDoc} */
     @Override protected NearCacheConfiguration nearConfiguration() {
         return new NearCacheConfiguration();
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxNearPeekModesTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxNearPeekModesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxNearPeekModesTest.java
index aa4faaf..bd03983 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxNearPeekModesTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxNearPeekModesTest.java
@@ -17,11 +17,20 @@
 
 package org.apache.ignite.internal.processors.cache;
 
+import org.apache.ignite.testframework.MvccFeatureChecker;
+
 /**
  * Tests peek modes with near tx cache.
  */
 public class IgniteCacheTxNearPeekModesTest extends IgniteCacheTxPeekModesTest {
     /** {@inheritDoc} */
+    @Override public void setUp() throws Exception {
+        MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE);
+
+        super.setUp();
+    }
+
+    /** {@inheritDoc} */
     @Override protected boolean hasNearCache() {
         return true;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxPeekModesTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxPeekModesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxPeekModesTest.java
index ea22f53..b43ab9a 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxPeekModesTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxPeekModesTest.java
@@ -19,6 +19,7 @@ package org.apache.ignite.internal.processors.cache;
 
 import org.apache.ignite.cache.CacheAtomicityMode;
 import org.apache.ignite.cache.CacheMode;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
@@ -43,10 +44,10 @@ public class IgniteCacheTxPeekModesTest extends IgniteCachePeekModesAbstractTest
     }
 
     /** {@inheritDoc} */
-    @Override public void testLocalPeek() throws Exception {
-        // TODO: uncomment and re-open ticket if fails.
-//        fail("https://issues.apache.org/jira/browse/IGNITE-1824");
+    @Override public void testLocalEntries() throws Exception {
+         if (MvccFeatureChecker.forcedMvcc())
+             fail("https://issues.apache.org/jira/browse/IGNITE-10167");
 
-        super.testLocalPeek();
+        super.testLocalEntries();
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxStoreValueTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxStoreValueTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxStoreValueTest.java
index f3f52eb..f137e52 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxStoreValueTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxStoreValueTest.java
@@ -20,6 +20,7 @@ package org.apache.ignite.internal.processors.cache;
 import org.apache.ignite.cache.CacheAtomicityMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.configuration.NearCacheConfiguration;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
@@ -29,6 +30,13 @@ import static org.apache.ignite.cache.CacheMode.PARTITIONED;
  */
 public class IgniteCacheTxStoreValueTest extends IgniteCacheStoreValueAbstractTest {
     /** {@inheritDoc} */
+    @Override public void setUp() throws Exception {
+        MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.INTERCEPTOR);
+
+        super.setUp();
+    }
+
+    /** {@inheritDoc} */
     @Override protected int gridCount() {
         return 4;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientCacheInitializationFailTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientCacheInitializationFailTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientCacheInitializationFailTest.java
index 11f5138..c6179fb 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientCacheInitializationFailTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientCacheInitializationFailTest.java
@@ -79,12 +79,18 @@ public class IgniteClientCacheInitializationFailTest extends GridCommonAbstractT
     /** Tx cache name. */
     private static final String TX_CACHE_NAME = "tx-cache";
 
+    /** Mvcc tx cache name. */
+    private static final String MVCC_TX_CACHE_NAME = "mvcc-tx-cache";
+
     /** Near atomic cache name. */
     private static final String NEAR_ATOMIC_CACHE_NAME = "near-atomic-cache";
 
     /** Near tx cache name. */
     private static final String NEAR_TX_CACHE_NAME = "near-tx-cache";
 
+    /** Near mvcc tx cache name. */
+    private static final String NEAR_MVCC_TX_CACHE_NAME = "near-mvcc-tx-cache";
+
     /** Failed caches. */
     private static final Set<String> FAILED_CACHES;
 
@@ -95,6 +101,8 @@ public class IgniteClientCacheInitializationFailTest extends GridCommonAbstractT
         set.add(TX_CACHE_NAME);
         set.add(NEAR_ATOMIC_CACHE_NAME);
         set.add(NEAR_TX_CACHE_NAME);
+        set.add(MVCC_TX_CACHE_NAME);
+        set.add(NEAR_MVCC_TX_CACHE_NAME);
 
         FAILED_CACHES = Collections.unmodifiableSet(set);
     }
@@ -122,7 +130,13 @@ public class IgniteClientCacheInitializationFailTest extends GridCommonAbstractT
             ccfg2.setName(TX_CACHE_NAME);
             ccfg2.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
 
-            cfg.setCacheConfiguration(ccfg1, ccfg2);
+            CacheConfiguration<Integer, String> ccfg3 = new CacheConfiguration<>();
+
+            ccfg3.setIndexedTypes(Integer.class, String.class);
+            ccfg3.setName(MVCC_TX_CACHE_NAME);
+            ccfg3.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT);
+
+            cfg.setCacheConfiguration(ccfg1, ccfg2, ccfg3);
         }
         else {
             GridQueryProcessor.idxCls = FailedIndexing.class;
@@ -150,6 +164,13 @@ public class IgniteClientCacheInitializationFailTest extends GridCommonAbstractT
     /**
      * @throws Exception If failed.
      */
+    public void testMvccTransactionalCacheInitialization() throws Exception {
+        checkCacheInitialization(MVCC_TX_CACHE_NAME);
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
     public void testAtomicNearCacheInitialization() throws Exception {
         checkCacheInitialization(NEAR_ATOMIC_CACHE_NAME);
     }
@@ -162,6 +183,15 @@ public class IgniteClientCacheInitializationFailTest extends GridCommonAbstractT
     }
 
     /**
+     * @throws Exception If failed.
+     */
+    public void testMvccTransactionalNearCacheInitialization() throws Exception {
+        fail("https://issues.apache.org/jira/browse/IGNITE-7187");
+
+        checkCacheInitialization(NEAR_MVCC_TX_CACHE_NAME);
+    }
+
+    /**
      * @param cacheName Cache name.
      * @throws Exception If failed.
      */
@@ -199,12 +229,15 @@ public class IgniteClientCacheInitializationFailTest extends GridCommonAbstractT
                 IgniteCache<Integer, String> cache;
 
                 // Start cache with near enabled.
-                if (NEAR_ATOMIC_CACHE_NAME.equals(cacheName) || NEAR_TX_CACHE_NAME.equals(cacheName)) {
+                if (NEAR_ATOMIC_CACHE_NAME.equals(cacheName) || NEAR_TX_CACHE_NAME.equals(cacheName) ||
+                    NEAR_MVCC_TX_CACHE_NAME.equals(cacheName)) {
                     CacheConfiguration<Integer, String> ccfg = new CacheConfiguration<Integer, String>(cacheName)
                         .setNearConfiguration(new NearCacheConfiguration<Integer, String>());
 
                     if (NEAR_TX_CACHE_NAME.equals(cacheName))
                         ccfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
+                    else if (NEAR_MVCC_TX_CACHE_NAME.equals(cacheName))
+                        ccfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT);
 
                     cache = client.getOrCreateCache(ccfg);
                 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheFilterTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheFilterTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheFilterTest.java
index 53c1cb2..4d74172 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheFilterTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheFilterTest.java
@@ -21,6 +21,7 @@ import java.util.HashMap;
 import java.util.Map;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
+import org.apache.ignite.cache.CacheAtomicityMode;
 import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
@@ -60,6 +61,7 @@ public class IgniteDynamicCacheFilterTest extends GridCommonAbstractTest {
         ccfg.setRebalanceMode(SYNC);
 
         ccfg.setNodeFilter(new TestNodeFilter("A"));
+        ccfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
 
         if (attrVal != null) {
             Map<String, Object> attrs = new HashMap<>();

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartCoordinatorFailoverTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartCoordinatorFailoverTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartCoordinatorFailoverTest.java
index 87bc6b1..ce29c31 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartCoordinatorFailoverTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartCoordinatorFailoverTest.java
@@ -27,6 +27,7 @@ import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.IgniteDataStreamer;
 import org.apache.ignite.IgniteException;
+import org.apache.ignite.cache.CacheAtomicityMode;
 import org.apache.ignite.cache.affinity.AffinityFunctionContext;
 import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction;
 import org.apache.ignite.cluster.ClusterNode;
@@ -125,6 +126,8 @@ public class IgniteDynamicCacheStartCoordinatorFailoverTest extends GridCommonAb
 
         cfg.setName("test-coordinator-failover");
 
+        cfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
+
         cfg.setAffinity(new BrokenAffinityFunction(false, getTestIgniteInstanceName(2)));
 
         GridTestUtils.runAsync(new Callable<Object>() {

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartNoExchangeTimeoutTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartNoExchangeTimeoutTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartNoExchangeTimeoutTest.java
index c3e3e88..a00fd24 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartNoExchangeTimeoutTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartNoExchangeTimeoutTest.java
@@ -45,6 +45,7 @@ import org.jetbrains.annotations.NotNull;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
+import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
 
 /**
@@ -400,7 +401,7 @@ public class IgniteDynamicCacheStartNoExchangeTimeoutTest extends GridCommonAbst
         {
             CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
 
-            ccfg.setName("cache-4");
+            ccfg.setName("cache-6");
             ccfg.setAtomicityMode(TRANSACTIONAL);
             ccfg.setBackups(1);
             ccfg.setWriteSynchronizationMode(FULL_SYNC);
@@ -408,6 +409,39 @@ public class IgniteDynamicCacheStartNoExchangeTimeoutTest extends GridCommonAbst
             res.add(ccfg);
         }
 
+        {
+            CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
+
+            ccfg.setName("cache-7");
+            ccfg.setAtomicityMode(TRANSACTIONAL_SNAPSHOT);
+            ccfg.setBackups(0);
+            ccfg.setWriteSynchronizationMode(FULL_SYNC);
+
+            res.add(ccfg);
+        }
+
+        {
+            CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
+
+            ccfg.setName("cache-8");
+            ccfg.setAtomicityMode(TRANSACTIONAL_SNAPSHOT);
+            ccfg.setBackups(1);
+            ccfg.setWriteSynchronizationMode(FULL_SYNC);
+
+            res.add(ccfg);
+        }
+
+        {
+            CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
+
+            ccfg.setName("cache-9");
+            ccfg.setAtomicityMode(TRANSACTIONAL_SNAPSHOT);
+            ccfg.setBackups(1);
+            ccfg.setWriteSynchronizationMode(FULL_SYNC);
+
+            res.add(ccfg);
+        }
+
         return res;
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java
index 53de23f..b5b83ad 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java
@@ -281,6 +281,13 @@ public class IgniteDynamicCacheStartSelfTest extends GridCommonAbstractTest {
     /**
      * @throws Exception If failed.
      */
+    public void testStartStopCacheSimpleTransactionalMvcc() throws Exception {
+        checkStartStopCacheSimple(CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT);
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
     public void testStartStopCacheSimpleAtomic() throws Exception {
         checkStartStopCacheSimple(CacheAtomicityMode.ATOMIC);
     }
@@ -295,6 +302,13 @@ public class IgniteDynamicCacheStartSelfTest extends GridCommonAbstractTest {
     /**
      * @throws Exception If failed.
      */
+    public void testStartStopCachesSimpleTransactionalMvcc() throws Exception {
+        checkStartStopCachesSimple(CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT);
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
     public void testStartStopCachesSimpleAtomic() throws Exception {
         checkStartStopCachesSimple(CacheAtomicityMode.ATOMIC);
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheWithConfigStartSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheWithConfigStartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheWithConfigStartSelfTest.java
index ec6b82d..d366306 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheWithConfigStartSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheWithConfigStartSelfTest.java
@@ -17,6 +17,7 @@
 
 package org.apache.ignite.internal.processors.cache;
 
+import org.apache.ignite.cache.CacheAtomicityMode;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.internal.IgniteEx;
@@ -63,6 +64,7 @@ public class IgniteDynamicCacheWithConfigStartSelfTest extends GridCommonAbstrac
         CacheConfiguration<Object, Object> ccfg = new CacheConfiguration<>(CACHE_NAME);
 
         ccfg.setIndexedTypes(String.class, String.class);
+        ccfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
 
         return ccfg;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicClientCacheStartSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicClientCacheStartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicClientCacheStartSelfTest.java
index 0cb0856..69bf233 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicClientCacheStartSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicClientCacheStartSelfTest.java
@@ -44,7 +44,10 @@ import org.apache.ignite.testframework.GridTestUtils;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.jetbrains.annotations.Nullable;
 
-import static org.apache.ignite.cache.CacheAtomicityMode.*;
+import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
+import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
+import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT;
+import static org.apache.ignite.cache.CacheAtomicityMode.values;
 import static org.apache.ignite.cache.CacheMode.REPLICATED;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
 import static org.apache.ignite.internal.IgniteNodeAttributes.ATTR_IGNITE_INSTANCE_NAME;
@@ -394,8 +397,9 @@ public class IgniteDynamicClientCacheStartSelfTest extends GridCommonAbstractTes
 
         cfgs.addAll(cacheConfigurations(null, ATOMIC));
         cfgs.addAll(cacheConfigurations(null, TRANSACTIONAL));
+        cfgs.addAll(cacheConfigurations(null, TRANSACTIONAL_SNAPSHOT));
 
-        assertEquals(6, cfgs.size());
+        assertEquals(9, cfgs.size());
 
         Collection<IgniteCache> caches = client.getOrCreateCaches(cfgs);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteStartCacheInTransactionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteStartCacheInTransactionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteStartCacheInTransactionSelfTest.java
index b037a7b..f4d3b25 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteStartCacheInTransactionSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteStartCacheInTransactionSelfTest.java
@@ -30,6 +30,7 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
 import org.apache.ignite.testframework.GridTestUtils;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.apache.ignite.transactions.Transaction;
 
@@ -250,6 +251,8 @@ public class IgniteStartCacheInTransactionSelfTest extends GridCommonAbstractTes
         if (atomicityMode() != TRANSACTIONAL)
             return;
 
+        MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.ENTRY_LOCK);
+
         final Ignite ignite = grid(0);
 
         final String key = "key";

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAffinityEarlyTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAffinityEarlyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAffinityEarlyTest.java
index 46669ac..2f04870 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAffinityEarlyTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAffinityEarlyTest.java
@@ -156,7 +156,7 @@ public class CacheAffinityEarlyTest extends GridCommonAbstractTest {
         CacheConfiguration ccfg = defaultCacheConfiguration();
 
         ccfg.setCacheMode(CacheMode.PARTITIONED);
-        ccfg.setAtomicityMode(CacheAtomicityMode.ATOMIC);
+        ccfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
         ccfg.setBackups(1);
         ccfg.setNearConfiguration(null);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheGroupsPreloadTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheGroupsPreloadTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheGroupsPreloadTest.java
index 8859638..af223f4 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheGroupsPreloadTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheGroupsPreloadTest.java
@@ -106,6 +106,17 @@ public class CacheGroupsPreloadTest extends GridCommonAbstractTest {
     /**
      * @throws Exception If failed.
      */
+    public void testCachePreloadMvcc2() throws Exception {
+        fail("https://issues.apache.org/jira/browse/IGNITE-7187");
+
+        atomicityMode = CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT;
+
+        cachePreloadTest();
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
     public void testCachePreload3() throws Exception {
         cacheMode = CacheMode.REPLICATED;
 
@@ -125,6 +136,16 @@ public class CacheGroupsPreloadTest extends GridCommonAbstractTest {
     /**
      * @throws Exception If failed.
      */
+    public void testCachePreloadMvcc4() throws Exception {
+        cacheMode = CacheMode.REPLICATED;
+        atomicityMode = CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT;
+
+        cachePreloadTest();
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
     public void testCachePreload5() throws Exception {
         sameGrp = false;
 
@@ -144,6 +165,18 @@ public class CacheGroupsPreloadTest extends GridCommonAbstractTest {
     /**
      * @throws Exception If failed.
      */
+    public void testCachePreloadMvcc6() throws Exception {
+        fail("https://issues.apache.org/jira/browse/IGNITE-7187");
+
+        sameGrp = false;
+        atomicityMode = CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT;
+
+        cachePreloadTest();
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
     public void testCachePreload7() throws Exception {
         sameGrp = false;
         cacheMode = CacheMode.REPLICATED;
@@ -165,6 +198,17 @@ public class CacheGroupsPreloadTest extends GridCommonAbstractTest {
     /**
      * @throws Exception If failed.
      */
+    public void testCachePreloadMvcc8() throws Exception {
+        sameGrp = false;
+        cacheMode = CacheMode.REPLICATED;
+        atomicityMode = CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT;
+
+        cachePreloadTest();
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
     private void cachePreloadTest() throws Exception {
         IgniteCache<Object, Object> cache = startGrid(0).cache(CACHE1);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheStartOnJoinTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheStartOnJoinTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheStartOnJoinTest.java
index d59f470..54889e4 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheStartOnJoinTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheStartOnJoinTest.java
@@ -46,6 +46,7 @@ import org.apache.ignite.testframework.GridTestUtils;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
+import static org.apache.ignite.testframework.MvccFeatureChecker.assertMvccWriteConflict;
 
 /**
  *
@@ -184,7 +185,18 @@ public class CacheStartOnJoinTest extends GridCommonAbstractTest {
                     if (createCache) {
                         for (int c = 0; c < 5; c++) {
                             for (IgniteCache cache : node.getOrCreateCaches(cacheConfigurations())) {
-                                cache.put(c, c);
+                                boolean updated = false;
+
+                                while (!updated) {
+                                    try {
+                                        cache.put(c, c);
+
+                                        updated = true;
+                                    }
+                                    catch (Exception e) {
+                                        assertMvccWriteConflict(e);
+                                    }
+                                }
 
                                 assertEquals(c, cache.get(c));
                             }

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheCreatePutMultiNodeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheCreatePutMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheCreatePutMultiNodeSelfTest.java
index 23fc941..0b021a8 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheCreatePutMultiNodeSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheCreatePutMultiNodeSelfTest.java
@@ -34,6 +34,7 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
 import org.apache.ignite.testframework.GridTestUtils;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 
 /**
@@ -94,8 +95,18 @@ public class IgniteCacheCreatePutMultiNodeSelfTest extends GridCommonAbstractTes
 
                                 IgniteCache<Integer, Integer> cache = getCache(ignite, cacheName);
 
-                                for (int i = 0; i < 100; i++)
-                                    cache.getAndPut(i, i);
+                                for (int i = 0; i < 100; i++) {
+                                    while (true) {
+                                        try {
+                                            cache.getAndPut(i, i);
+
+                                            break;
+                                        }
+                                        catch (Exception e) {
+                                            MvccFeatureChecker.assertMvccWriteConflict(e);
+                                        }
+                                    }
+                                }
 
                                 barrier.await();
 
@@ -139,7 +150,7 @@ public class IgniteCacheCreatePutMultiNodeSelfTest extends GridCommonAbstractTes
         CacheConfiguration<Integer, Integer> ccfg = new CacheConfiguration<>(cacheName);
 
         ccfg.setCacheMode(CacheMode.PARTITIONED);
-        ccfg.setAtomicityMode(CacheAtomicityMode.ATOMIC);
+        ccfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
         ccfg.setBackups(1);
         ccfg.setNearConfiguration(null);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheCreatePutTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheCreatePutTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheCreatePutTest.java
index 646084c..5d6e895 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheCreatePutTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheCreatePutTest.java
@@ -37,9 +37,11 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
+import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 import static org.apache.ignite.cache.CacheMode.REPLICATED;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
+import static org.apache.ignite.testframework.MvccFeatureChecker.assertMvccWriteConflict;
 
 /**
  *
@@ -149,6 +151,7 @@ public class IgniteCacheCreatePutTest extends GridCommonAbstractTest {
 
         ignite0.createCache(cacheConfiguration("atomic-cache", ATOMIC));
         ignite0.createCache(cacheConfiguration("tx-cache", TRANSACTIONAL));
+        ignite0.createCache(cacheConfiguration("mvcc-tx-cache", TRANSACTIONAL_SNAPSHOT));
 
         final long stopTime = System.currentTimeMillis() + 60_000;
 
@@ -162,6 +165,7 @@ public class IgniteCacheCreatePutTest extends GridCommonAbstractTest {
 
                 IgniteCache cache1 = node.cache("atomic-cache");
                 IgniteCache cache2 = node.cache("tx-cache");
+                IgniteCache cache3 = node.cache("mvcc-tx-cache");
 
                 ThreadLocalRandom rnd = ThreadLocalRandom.current();
 
@@ -174,6 +178,13 @@ public class IgniteCacheCreatePutTest extends GridCommonAbstractTest {
 
                     cache2.put(key, key);
 
+                    try {
+                        cache3.put(key, key);
+                    }
+                    catch (Exception e) {
+                        assertMvccWriteConflict(e); // Do not retry.
+                    }
+
                     if (iter++ % 1000 == 0)
                         log.info("Update iteration: " + iter);
                 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/cf32fc7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheFailedUpdateResponseTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheFailedUpdateResponseTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheFailedUpdateResponseTest.java
index 3eca6b3..7414b88 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheFailedUpdateResponseTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheFailedUpdateResponseTest.java
@@ -40,11 +40,13 @@ import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.failure.FailureHandler;
 import org.apache.ignite.failure.NoOpFailureHandler;
 import org.apache.ignite.internal.IgniteEx;
+import org.apache.ignite.internal.processors.cache.IgniteCacheProxy;
 import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
+import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT;
 import static org.apache.ignite.testframework.GridTestUtils.assertThrows;
 import static org.apache.ignite.transactions.TransactionConcurrency.OPTIMISTIC;
 import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC;
@@ -53,7 +55,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_REA
 import static org.apache.ignite.transactions.TransactionIsolation.SERIALIZABLE;
 
 /**
- * Checks that no future hangs on non-srializable exceptions and values.
+ * Checks that no future hangs on non-serializable exceptions and values.
  */
 public class IgniteCacheFailedUpdateResponseTest extends GridCommonAbstractTest {
     /** Atomic cache. */
@@ -62,25 +64,34 @@ public class IgniteCacheFailedUpdateResponseTest extends GridCommonAbstractTest
     /** Tx cache. */
     private static final String TX_CACHE = "tx";
 
+    /** Mvcc tx cache. */
+    private static final String MVCC_TX_CACHE = "mvcc-tx";
+
     /** Atomic cache. */
     private IgniteCache<Object, Object> atomicCache;
 
     /** Tx cache. */
     private IgniteCache<Object, Object> txCache;
 
+    /** Mvcc tx cache. */
+    private IgniteCache<Object, Object> mvccTxCache;
+
     /** {@inheritDoc} */
     @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
         IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
 
         CacheConfiguration atomicCfg = new CacheConfiguration(ATOMIC_CACHE);
         CacheConfiguration txCfg = new CacheConfiguration(TX_CACHE);
+        CacheConfiguration mvccTxCfg = new CacheConfiguration(MVCC_TX_CACHE);
 
         atomicCfg.setBackups(1);
         txCfg.setBackups(1);
+        mvccTxCfg.setBackups(1);
 
         txCfg.setAtomicityMode(TRANSACTIONAL);
+        mvccTxCfg.setAtomicityMode(TRANSACTIONAL_SNAPSHOT);
 
-        cfg.setCacheConfiguration(atomicCfg, txCfg);
+        cfg.setCacheConfiguration(atomicCfg, txCfg, mvccTxCfg);
 
         cfg.setClientMode(igniteInstanceName.contains("client"));
 
@@ -100,6 +111,7 @@ public class IgniteCacheFailedUpdateResponseTest extends GridCommonAbstractTest
     @Override protected void beforeTest() throws Exception {
         atomicCache = grid("client").cache(ATOMIC_CACHE);
         txCache = grid("client").cache(TX_CACHE);
+        mvccTxCache = grid("client").cache(MVCC_TX_CACHE);
     }
 
     /** {@inheritDoc} */
@@ -142,10 +154,31 @@ public class IgniteCacheFailedUpdateResponseTest extends GridCommonAbstractTest
     }
 
     /**
+     * @throws Exception If failed.
+     */
+    public void testInvokeMvccTx() throws Exception {
+        testInvoke(mvccTxCache);
+        testInvokeAll(mvccTxCache);
+
+        IgniteEx client = grid("client");
+
+        Callable<Object> clos = new Callable<Object>() {
+            @Override public Object call() throws Exception {
+                testInvoke(mvccTxCache);
+                testInvokeAll(mvccTxCache);
+
+                return null;
+            }
+        };
+
+        doInTransaction(client, PESSIMISTIC, REPEATABLE_READ, clos);
+    }
+
+    /**
      * @param cache Cache.
      */
     private void testInvoke(final IgniteCache<Object, Object> cache) throws Exception {
-        Class<? extends Exception> exp = grid("client").transactions().tx() == null
+        Class<? extends Exception> exp = grid("client").transactions().tx() == null || ((IgniteCacheProxy)cache).context().mvccEnabled()
             ? EntryProcessorException.class
             : NonSerializableException.class;
 
@@ -181,7 +214,7 @@ public class IgniteCacheFailedUpdateResponseTest extends GridCommonAbstractTest
         assertNotNull(epRes);
 
         // In transactions EP will be invoked locally.
-        Class<? extends Exception> exp = grid("client").transactions().tx() == null
+        Class<? extends Exception> exp = grid("client").transactions().tx() == null || ((IgniteCacheProxy)cache).context().mvccEnabled()
             ? EntryProcessorException.class
             : NonSerializableException.class;
 


[30/37] ignite git commit: IGNITE-10610 Changed log from "error" to "warning" in VisorMultiNodeTask when no mapped jobs found.

Posted by ak...@apache.org.
IGNITE-10610 Changed log from "error" to "warning" in VisorMultiNodeTask when no mapped jobs found.


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

Branch: refs/heads/ignite-10189
Commit: ea63af0a713110222ba553a323cd152b8f78373c
Parents: c7fe467
Author: Vasiliy Sisko <vs...@gridgain.com>
Authored: Mon Dec 10 09:57:33 2018 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Mon Dec 10 09:57:33 2018 +0700

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


http://git-wip-us.apache.org/repos/asf/ignite/blob/ea63af0a/modules/core/src/main/java/org/apache/ignite/internal/visor/VisorMultiNodeTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/VisorMultiNodeTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/VisorMultiNodeTask.java
index 29ad519..dbf1c66 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/VisorMultiNodeTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/VisorMultiNodeTask.java
@@ -105,7 +105,7 @@ public abstract class VisorMultiNodeTask<A, R, J> implements ComputeTask<VisorTa
                     map.put(job(taskArg), node);
 
             if (map.isEmpty())
-                ignite.log().error("No mapped jobs: [task=" + getClass().getName() +
+                ignite.log().warning("No mapped jobs: [task=" + getClass().getName() +
                     ", topVer=" + ignite.cluster().topologyVersion() +
                     ", jobNids=" + nodeIds +
                     ", subGrid=" + U.toShortString(subgrid) + "]");


[14/37] ignite git commit: IGNITE-10549: [ML] LogisticRegressionSGDTrainerTest fails with BLAS

Posted by ak...@apache.org.
IGNITE-10549: [ML] LogisticRegressionSGDTrainerTest fails with BLAS

This closes #5577


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

Branch: refs/heads/ignite-10189
Commit: d267236e0697264edc186db5b53fe191538b519e
Parents: d045b84
Author: Alexey Platonov <ap...@gmail.com>
Authored: Thu Dec 6 13:16:07 2018 +0300
Committer: Yury Babak <yb...@gridgain.com>
Committed: Thu Dec 6 13:16:07 2018 +0300

----------------------------------------------------------------------
 .../ml/regressions/logistic/LogisticRegressionSGDTrainerTest.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/d267236e/modules/ml/src/test/java/org/apache/ignite/ml/regressions/logistic/LogisticRegressionSGDTrainerTest.java
----------------------------------------------------------------------
diff --git a/modules/ml/src/test/java/org/apache/ignite/ml/regressions/logistic/LogisticRegressionSGDTrainerTest.java b/modules/ml/src/test/java/org/apache/ignite/ml/regressions/logistic/LogisticRegressionSGDTrainerTest.java
index 7236820..c343ab9 100644
--- a/modules/ml/src/test/java/org/apache/ignite/ml/regressions/logistic/LogisticRegressionSGDTrainerTest.java
+++ b/modules/ml/src/test/java/org/apache/ignite/ml/regressions/logistic/LogisticRegressionSGDTrainerTest.java
@@ -48,7 +48,7 @@ public class LogisticRegressionSGDTrainerTest extends TrainerTest {
                 SimpleGDParameterUpdate::sumLocal, SimpleGDParameterUpdate::avg))
             .withMaxIterations(100000)
             .withLocIterations(100)
-            .withBatchSize(10)
+            .withBatchSize(14)
             .withSeed(123L);
 
         LogisticRegressionModel mdl = trainer.fit(


[08/37] ignite git commit: IGNITE-10437 Fixed flaky GridCacheWriteBehindStoreMultithreadedSelfTest.testFlushFromTheSameThreadWithCoalescing - Fixes #5522.

Posted by ak...@apache.org.
IGNITE-10437 Fixed flaky GridCacheWriteBehindStoreMultithreadedSelfTest.testFlushFromTheSameThreadWithCoalescing - Fixes #5522.

Signed-off-by: Alexey Goncharuk <al...@gmail.com>


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

Branch: refs/heads/ignite-10189
Commit: 5990bcdc53e9d4d59f724ff6dd6d54e9158339ee
Parents: 5fa79c6
Author: Dmitrii Ryabov <So...@gmail.com>
Authored: Wed Dec 5 19:42:58 2018 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Wed Dec 5 19:42:58 2018 +0300

----------------------------------------------------------------------
 ...heWriteBehindStoreMultithreadedSelfTest.java | 35 ++++++++++++--------
 1 file changed, 22 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/5990bcdc/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStoreMultithreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStoreMultithreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStoreMultithreadedSelfTest.java
index 4fce452..a9558aa 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStoreMultithreadedSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStoreMultithreadedSelfTest.java
@@ -187,33 +187,42 @@ public class GridCacheWriteBehindStoreMultithreadedSelfTest extends GridCacheWri
         // 50 milliseconds should be enough.
         delegate.setOperationDelay(50);
 
-        initStore(2, writeCoalescing);
+        Set<Integer> exp = null;
 
-        Set<Integer> exp;
+        int start = 0;
+        int end = 0;
 
-        int start = store.getWriteBehindTotalCriticalOverflowCount();
+        long startTime = System.currentTimeMillis();
 
-        try {
-            //We will have in total 5 * CACHE_SIZE keys that should be enough to grow map size to critical value.
-            exp = runPutGetRemoveMultithreaded(5, CACHE_SIZE);
-        }
-        finally {
-            log.info(">>> Done inserting, shutting down the store");
+        while (end - start == 0 && System.currentTimeMillis() - startTime < getTestTimeout()) {
+            initStore(2, writeCoalescing);
 
-            shutdownStore();
+            start = store.getWriteBehindTotalCriticalOverflowCount();
+
+            try {
+                //We will have in total 5 * CACHE_SIZE keys that should be enough to grow map size to critical value.
+                exp = runPutGetRemoveMultithreaded(5, CACHE_SIZE);
+            }
+            finally {
+                log.info(">>> Done inserting, shutting down the store");
+
+                shutdownStore();
+            }
+
+            end = store.getWriteBehindTotalCriticalOverflowCount();
         }
 
         // Restore delay.
         delegate.setOperationDelay(0);
 
-        Map<Integer, String> map = delegate.getMap();
-
-        int end = store.getWriteBehindTotalCriticalOverflowCount();
+        assertNotNull(exp);
 
         log.info(">>> There are " + exp.size() + " keys in store, " + (end - start) + " overflows detected");
 
         assertTrue("No cache overflows detected (a bug or too few keys or too few delay?)", end > start);
 
+        Map<Integer, String> map = delegate.getMap();
+
         Collection<Integer> extra = new HashSet<>(map.keySet());
 
         extra.removeAll(exp);


[10/37] ignite git commit: IGNITE-10564 Added tasks to collect rebalance metrics.

Posted by ak...@apache.org.
IGNITE-10564 Added tasks to collect rebalance metrics.

Co-authored-by: Alexey Kuznetsov <ak...@apache.org>


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

Branch: refs/heads/ignite-10189
Commit: ececcbcd1883a2cda5a2eb12e0f0deffddf6b829
Parents: 4c56adc
Author: Vasiliy Sisko <vs...@gridgain.com>
Authored: Thu Dec 6 11:30:08 2018 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Thu Dec 6 11:30:08 2018 +0700

----------------------------------------------------------------------
 .../VisorCacheRebalanceCollectorJobResult.java  |  91 +++++++++
 .../node/VisorCacheRebalanceCollectorTask.java  | 194 +++++++++++++++++++
 .../VisorCacheRebalanceCollectorTaskArg.java    |  54 ++++++
 .../VisorCacheRebalanceCollectorTaskResult.java |  92 +++++++++
 .../visor/node/VisorNodeBaselineStatus.java     |  45 +++++
 .../visor/node/VisorNodeDataCollectorJob.java   |  74 ++++---
 .../node/VisorNodeDataCollectorTaskResult.java  |   3 +-
 .../internal/visor/util/VisorTaskUtils.java     |  43 ++++
 8 files changed, 564 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/ececcbcd/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorCacheRebalanceCollectorJobResult.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorCacheRebalanceCollectorJobResult.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorCacheRebalanceCollectorJobResult.java
new file mode 100644
index 0000000..5bd818d
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorCacheRebalanceCollectorJobResult.java
@@ -0,0 +1,91 @@
+/*
+ * 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.visor.node;
+
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+import org.apache.ignite.internal.dto.IgniteDataTransferObject;
+import org.apache.ignite.internal.util.typedef.internal.S;
+import org.apache.ignite.internal.util.typedef.internal.U;
+
+/**
+ * Result object for cache rebalance job.
+ */
+public class VisorCacheRebalanceCollectorJobResult extends IgniteDataTransferObject {
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /** Rebalance percent. */
+    private double rebalance;
+
+    /** Node baseline state. */
+    private VisorNodeBaselineStatus baseline;
+
+    /**
+     * Default constructor.
+     */
+    public VisorCacheRebalanceCollectorJobResult() {
+        // No-op.
+    }
+
+    /**
+     * @return Rebalance progress.
+     */
+    public double getRebalance() {
+        return rebalance;
+    }
+
+    /**
+     * @param rebalance Rebalance progress.
+     */
+    public void setRebalance(double rebalance) {
+        this.rebalance = rebalance;
+    }
+
+    /**
+     * @return Node baseline status.
+     */
+    public VisorNodeBaselineStatus getBaseline() {
+        return baseline;
+    }
+
+    /**
+     * @param baseline Node baseline status.
+     */
+    public void setBaseline(VisorNodeBaselineStatus baseline) {
+        this.baseline = baseline;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void writeExternalData(ObjectOutput out) throws IOException {
+        out.writeDouble(rebalance);
+        U.writeEnum(out, baseline);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void readExternalData(byte protoVer, ObjectInput in) throws IOException, ClassNotFoundException {
+        rebalance = in.readDouble();
+        baseline = VisorNodeBaselineStatus.fromOrdinal(in.readByte());
+    }
+
+    /** {@inheritDoc} */
+    @Override public String toString() {
+        return S.toString(VisorCacheRebalanceCollectorJobResult.class, this);
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/ececcbcd/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorCacheRebalanceCollectorTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorCacheRebalanceCollectorTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorCacheRebalanceCollectorTask.java
new file mode 100644
index 0000000..eda9f94
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorCacheRebalanceCollectorTask.java
@@ -0,0 +1,194 @@
+/*
+ * 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.visor.node;
+
+import java.util.Collection;
+import java.util.List;
+import org.apache.ignite.cache.CacheMetrics;
+import org.apache.ignite.cluster.BaselineNode;
+import org.apache.ignite.compute.ComputeJobResult;
+import org.apache.ignite.internal.cluster.IgniteClusterEx;
+import org.apache.ignite.internal.processors.cache.CacheGroupContext;
+import org.apache.ignite.internal.processors.cache.GridCacheAdapter;
+import org.apache.ignite.internal.processors.cache.GridCacheProcessor;
+import org.apache.ignite.internal.processors.cache.GridCacheUtils;
+import org.apache.ignite.internal.processors.task.GridInternal;
+import org.apache.ignite.internal.util.typedef.internal.S;
+import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.internal.visor.VisorJob;
+import org.apache.ignite.internal.visor.VisorMultiNodeTask;
+import org.jetbrains.annotations.Nullable;
+
+import static org.apache.ignite.internal.visor.node.VisorNodeBaselineStatus.BASELINE_NOT_AVAILABLE;
+import static org.apache.ignite.internal.visor.node.VisorNodeBaselineStatus.NODE_IN_BASELINE;
+import static org.apache.ignite.internal.visor.node.VisorNodeBaselineStatus.NODE_NOT_IN_BASELINE;
+import static org.apache.ignite.internal.visor.util.VisorTaskUtils.MINIMAL_REBALANCE;
+import static org.apache.ignite.internal.visor.util.VisorTaskUtils.NOTHING_TO_REBALANCE;
+import static org.apache.ignite.internal.visor.util.VisorTaskUtils.REBALANCE_COMPLETE;
+import static org.apache.ignite.internal.visor.util.VisorTaskUtils.REBALANCE_NOT_AVAILABLE;
+import static org.apache.ignite.internal.visor.util.VisorTaskUtils.isProxyCache;
+import static org.apache.ignite.internal.visor.util.VisorTaskUtils.isRestartingCache;
+import static org.apache.ignite.internal.visor.util.VisorTaskUtils.log;
+
+/**
+ * Collects topology rebalance metrics.
+ */
+@GridInternal
+public class VisorCacheRebalanceCollectorTask extends VisorMultiNodeTask<VisorCacheRebalanceCollectorTaskArg,
+    VisorCacheRebalanceCollectorTaskResult, VisorCacheRebalanceCollectorJobResult> {
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /** {@inheritDoc} */
+    @Override protected VisorCacheRebalanceCollectorJob job(VisorCacheRebalanceCollectorTaskArg arg) {
+        return new VisorCacheRebalanceCollectorJob(arg, debug);
+    }
+
+    /** {@inheritDoc} */
+    @Nullable @Override protected VisorCacheRebalanceCollectorTaskResult reduce0(List<ComputeJobResult> results) {
+        return reduce(new VisorCacheRebalanceCollectorTaskResult(), results);
+    }
+
+    /**
+     * @param taskRes Task result.
+     * @param results Results.
+     * @return Topology rebalance metrics collector task result.
+     */
+    protected VisorCacheRebalanceCollectorTaskResult reduce(
+        VisorCacheRebalanceCollectorTaskResult taskRes,
+        List<ComputeJobResult> results
+    ) {
+        for (ComputeJobResult res : results) {
+            VisorCacheRebalanceCollectorJobResult jobRes = res.getData();
+
+            if (jobRes != null) {
+                if (res.getException() == null)
+                    taskRes.getRebalance().put(res.getNode().id(), jobRes.getRebalance());
+
+                taskRes.getBaseline().put(res.getNode().id(), jobRes.getBaseline());
+            }
+        }
+
+        return taskRes;
+    }
+
+    /**
+     * Job that collects rebalance metrics.
+     */
+    private static class VisorCacheRebalanceCollectorJob extends VisorJob<VisorCacheRebalanceCollectorTaskArg, VisorCacheRebalanceCollectorJobResult> {
+        /** */
+        private static final long serialVersionUID = 0L;
+
+        /**
+         * Create job with given argument.
+         *
+         * @param arg Job argument.
+         * @param debug Debug flag.
+         */
+        private VisorCacheRebalanceCollectorJob(VisorCacheRebalanceCollectorTaskArg arg, boolean debug) {
+            super(arg, debug);
+        }
+
+        /** {@inheritDoc} */
+        @Override protected VisorCacheRebalanceCollectorJobResult run(VisorCacheRebalanceCollectorTaskArg arg) {
+            VisorCacheRebalanceCollectorJobResult res = new VisorCacheRebalanceCollectorJobResult();
+
+            long start0 = U.currentTimeMillis();
+
+            try {
+                int partitions = 0;
+                double total = 0;
+                double ready = 0;
+
+                GridCacheProcessor cacheProc = ignite.context().cache();
+
+                boolean rebalanceInProgress = false;
+
+                for (CacheGroupContext grp: cacheProc.cacheGroups()) {
+                    String cacheName = grp.config().getName();
+
+                    if (isProxyCache(ignite, cacheName) || isRestartingCache(ignite, cacheName))
+                        continue;
+
+                    try {
+                        GridCacheAdapter ca = cacheProc.internalCache(cacheName);
+
+                        if (ca == null || !ca.context().started())
+                            continue;
+
+                        CacheMetrics cm = ca.localMetrics();
+
+                        partitions += cm.getTotalPartitionsCount();
+
+                        long keysTotal = cm.getEstimatedRebalancingKeys();
+                        long keysReady = cm.getRebalancedKeys();
+
+                        if (keysReady >= keysTotal)
+                            keysReady = Math.max(keysTotal - 1, 0);
+
+                        total += keysTotal;
+                        ready += keysReady;
+
+                        if (cm.getRebalancingPartitionsCount() > 0)
+                            rebalanceInProgress = true;
+                    }
+                    catch(IllegalStateException | IllegalArgumentException e) {
+                        if (debug && ignite.log() != null)
+                            ignite.log().error("Ignored cache group: " + grp.cacheOrGroupName(), e);
+                    }
+                }
+
+                if (partitions == 0)
+                    res.setRebalance(NOTHING_TO_REBALANCE);
+                else if (total == 0 && rebalanceInProgress)
+                    res.setRebalance(MINIMAL_REBALANCE);
+                else
+                    res.setRebalance(total > 0 ? Math.max(ready / total, MINIMAL_REBALANCE) : REBALANCE_COMPLETE);
+            }
+            catch (Exception e) {
+                res.setRebalance(REBALANCE_NOT_AVAILABLE);
+
+                ignite.log().error("Failed to collect rebalance metrics", e);
+            }
+
+            if (GridCacheUtils.isPersistenceEnabled(ignite.configuration())) {
+                IgniteClusterEx cluster = ignite.cluster();
+
+                Object consistentId = ignite.localNode().consistentId();
+
+                Collection<? extends BaselineNode> baseline = cluster.currentBaselineTopology();
+
+                boolean inBaseline = baseline.stream().anyMatch(n -> consistentId.equals(n.consistentId()));
+
+                res.setBaseline(inBaseline ? NODE_IN_BASELINE : NODE_NOT_IN_BASELINE);
+            }
+            else
+                res.setBaseline(BASELINE_NOT_AVAILABLE);
+
+            if (debug)
+                log(ignite.log(), "Collected rebalance metrics", getClass(), start0);
+
+            return res;
+        }
+
+        /** {@inheritDoc} */
+        @Override public String toString() {
+            return S.toString(VisorCacheRebalanceCollectorJob.class, this);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/ececcbcd/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorCacheRebalanceCollectorTaskArg.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorCacheRebalanceCollectorTaskArg.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorCacheRebalanceCollectorTaskArg.java
new file mode 100644
index 0000000..d97fd50
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorCacheRebalanceCollectorTaskArg.java
@@ -0,0 +1,54 @@
+/*
+ * 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.visor.node;
+
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+import org.apache.ignite.internal.util.typedef.internal.S;
+import org.apache.ignite.internal.visor.VisorDataTransferObject;
+
+/**
+ * Argument for {@link VisorCacheRebalanceCollectorTask} task.
+ */
+public class VisorCacheRebalanceCollectorTaskArg extends VisorDataTransferObject {
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /**
+     * Default constructor.
+     */
+    public VisorCacheRebalanceCollectorTaskArg() {
+        // No-op.
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void writeExternalData(ObjectOutput out) throws IOException {
+        // No-op.
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void readExternalData(byte protoVer, ObjectInput in) throws IOException, ClassNotFoundException {
+        // No-op.
+    }
+
+    /** {@inheritDoc} */
+    @Override public String toString() {
+        return S.toString(VisorCacheRebalanceCollectorTaskArg.class, this);
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/ececcbcd/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorCacheRebalanceCollectorTaskResult.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorCacheRebalanceCollectorTaskResult.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorCacheRebalanceCollectorTaskResult.java
new file mode 100644
index 0000000..1305cd2
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorCacheRebalanceCollectorTaskResult.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.internal.visor.node;
+
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+import org.apache.ignite.internal.dto.IgniteDataTransferObject;
+import org.apache.ignite.internal.util.typedef.internal.S;
+import org.apache.ignite.internal.util.typedef.internal.U;
+
+/**
+ * Result object for {@link VisorCacheRebalanceCollectorTask} task.
+ */
+public class VisorCacheRebalanceCollectorTaskResult extends IgniteDataTransferObject {
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /** Rebalance state on nodes. */
+    private Map<UUID, Double> rebalance = new HashMap<>();
+
+    /** Nodes baseline status. */
+    private Map<UUID, VisorNodeBaselineStatus> baseline = new HashMap<>();
+
+    /**
+     * Default constructor.
+     */
+    public VisorCacheRebalanceCollectorTaskResult() {
+        // No-op.
+    }
+
+    /**
+     * @return Rebalance on nodes.
+     */
+    public Map<UUID, Double> getRebalance() {
+        return rebalance;
+    }
+
+    /**
+     * @return Baseline.
+     */
+    public Map<UUID, VisorNodeBaselineStatus> getBaseline() {
+        return baseline;
+    }
+
+    /**
+     * Add specified results.
+     *
+     * @param res Results to add.
+     */
+    public void add(VisorCacheRebalanceCollectorTaskResult res) {
+        assert res != null;
+
+        rebalance.putAll(res.getRebalance());
+        baseline.putAll(res.getBaseline());
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void writeExternalData(ObjectOutput out) throws IOException {
+        U.writeMap(out, rebalance);
+        U.writeMap(out, baseline);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void readExternalData(byte protoVer, ObjectInput in) throws IOException, ClassNotFoundException {
+        rebalance = U.readMap(in);
+        baseline = U.readMap(in);
+    }
+
+    /** {@inheritDoc} */
+    @Override public String toString() {
+        return S.toString(VisorCacheRebalanceCollectorTaskResult.class, this);
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/ececcbcd/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeBaselineStatus.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeBaselineStatus.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeBaselineStatus.java
new file mode 100644
index 0000000..ea90be3
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeBaselineStatus.java
@@ -0,0 +1,45 @@
+/*
+ * 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.visor.node;
+
+import org.jetbrains.annotations.Nullable;
+
+/**
+ * Node baseline status.
+ */
+public enum VisorNodeBaselineStatus {
+    /** */
+    NODE_IN_BASELINE,
+    /** */
+    NODE_NOT_IN_BASELINE,
+    /** */
+    BASELINE_NOT_AVAILABLE;
+
+    /** Enumerated values. */
+    private static final VisorNodeBaselineStatus[] VALS = values();
+
+    /**
+     * Efficiently gets enumerated value from its ordinal.
+     *
+     * @param ord Ordinal value.
+     * @return Enumerated value or {@code null} if ordinal out of range.
+     */
+    @Nullable public static VisorNodeBaselineStatus fromOrdinal(int ord) {
+        return ord >= 0 && ord < VALS.length ? VALS[ord] : null;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/ececcbcd/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorJob.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorJob.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorJob.java
index 9025ed0..9a7d2b1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorJob.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorJob.java
@@ -28,8 +28,9 @@ import org.apache.ignite.cache.CacheMetrics;
 import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.configuration.FileSystemConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.internal.managers.discovery.GridDiscoveryManager;
+import org.apache.ignite.internal.processors.cache.CacheGroupContext;
 import org.apache.ignite.internal.processors.cache.GridCacheAdapter;
+import org.apache.ignite.internal.processors.cache.GridCacheContext;
 import org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager;
 import org.apache.ignite.internal.processors.cache.GridCacheProcessor;
 import org.apache.ignite.internal.processors.igfs.IgfsProcessorAdapter;
@@ -50,9 +51,15 @@ import static org.apache.ignite.internal.processors.cache.GridCacheUtils.isIgfsC
 import static org.apache.ignite.internal.processors.cache.GridCacheUtils.isSystemCache;
 import static org.apache.ignite.internal.visor.compute.VisorComputeMonitoringHolder.COMPUTE_MONITORING_HOLDER_KEY;
 import static org.apache.ignite.internal.visor.util.VisorTaskUtils.EVT_MAPPER;
+import static org.apache.ignite.internal.visor.util.VisorTaskUtils.MINIMAL_REBALANCE;
+import static org.apache.ignite.internal.visor.util.VisorTaskUtils.NOTHING_TO_REBALANCE;
+import static org.apache.ignite.internal.visor.util.VisorTaskUtils.REBALANCE_COMPLETE;
+import static org.apache.ignite.internal.visor.util.VisorTaskUtils.REBALANCE_NOT_AVAILABLE;
 import static org.apache.ignite.internal.visor.util.VisorTaskUtils.VISOR_TASK_EVTS;
 import static org.apache.ignite.internal.visor.util.VisorTaskUtils.checkExplicitTaskMonitoring;
 import static org.apache.ignite.internal.visor.util.VisorTaskUtils.collectEvents;
+import static org.apache.ignite.internal.visor.util.VisorTaskUtils.isProxyCache;
+import static org.apache.ignite.internal.visor.util.VisorTaskUtils.isRestartingCache;
 import static org.apache.ignite.internal.visor.util.VisorTaskUtils.log;
 
 /**
@@ -141,18 +148,6 @@ public class VisorNodeDataCollectorJob extends VisorJob<VisorNodeDataCollectorTa
     }
 
     /**
-     * @param cacheName Cache name to check.
-     * @return {@code true} if cache on local node is not a data cache or near cache disabled.
-     */
-    private boolean proxyCache(String cacheName) {
-        GridDiscoveryManager discovery = ignite.context().discovery();
-
-        ClusterNode locNode = ignite.localNode();
-
-        return !(discovery.cacheAffinityNode(locNode, cacheName) || discovery.cacheNearNode(locNode, cacheName));
-    }
-
-    /**
      * Collect memory metrics.
      *
      * @param res Job result.
@@ -194,38 +189,51 @@ public class VisorNodeDataCollectorJob extends VisorJob<VisorNodeDataCollectorTa
 
             List<VisorCache> resCaches = res.getCaches();
 
-            for (String cacheName : cacheProc.cacheNames()) {
-                if (proxyCache(cacheName))
-                    continue;
+            boolean rebalanceInProgress = false;
 
-                boolean sysCache = isSystemCache(cacheName);
+            for (CacheGroupContext grp : cacheProc.cacheGroups()) {
+                boolean first = true;
 
-                if (arg.getSystemCaches() || !(sysCache || isIgfsCache(cfg, cacheName))) {
+                for (GridCacheContext cache : grp.caches()) {
                     long start0 = U.currentTimeMillis();
 
+                    String cacheName = cache.name();
+
                     try {
+                        if (isProxyCache(ignite, cacheName) || isRestartingCache(ignite, cacheName))
+                            continue;
+
                         GridCacheAdapter ca = cacheProc.internalCache(cacheName);
 
                         if (ca == null || !ca.context().started())
                             continue;
 
-                        CacheMetrics cm = ca.localMetrics();
+                        if (first) {
+                            CacheMetrics cm = ca.localMetrics();
+
+                            partitions += cm.getTotalPartitionsCount();
+
+                            long keysTotal = cm.getEstimatedRebalancingKeys();
+                            long keysReady = cm.getRebalancedKeys();
+
+                            if (keysReady >= keysTotal)
+                                keysReady = Math.max(keysTotal - 1, 0);
 
-                        partitions += cm.getTotalPartitionsCount();
+                            total += keysTotal;
+                            ready += keysReady;
 
-                        long partTotal = cm.getEstimatedRebalancingKeys();
-                        long partReady = cm.getRebalancedKeys();
+                            if (!rebalanceInProgress && cm.getRebalancingPartitionsCount() > 0)
+                                rebalanceInProgress = true;
 
-                        if (partReady >= partTotal)
-                            partReady = Math.max(partTotal - 1, 0);
+                            first = false;
+                        }
 
-                        total += partTotal;
-                        ready += partReady;
+                        boolean addToRes = arg.getSystemCaches() || !(isSystemCache(cacheName) || isIgfsCache(cfg, cacheName));
 
-                        if (all || cacheGrps.contains(ca.configuration().getGroupName()))
+                        if (addToRes && (all || cacheGrps.contains(ca.configuration().getGroupName())))
                             resCaches.add(new VisorCache(ignite, ca, arg.isCollectCacheMetrics()));
                     }
-                    catch(IllegalStateException | IllegalArgumentException e) {
+                    catch (IllegalStateException | IllegalArgumentException e) {
                         if (debug && ignite.log() != null)
                             ignite.log().error("Ignored cache: " + cacheName, e);
                     }
@@ -237,11 +245,14 @@ public class VisorNodeDataCollectorJob extends VisorJob<VisorNodeDataCollectorTa
             }
 
             if (partitions == 0)
-                res.setRebalance(-1);
+                res.setRebalance(NOTHING_TO_REBALANCE);
+            else if (total == 0 && rebalanceInProgress)
+                res.setRebalance(MINIMAL_REBALANCE);
             else
-                res.setRebalance(total > 0 ? ready / total : 1);
+                res.setRebalance(total > 0 ? Math.max(ready / total, MINIMAL_REBALANCE) : REBALANCE_COMPLETE);
         }
         catch (Exception e) {
+            res.setRebalance(REBALANCE_NOT_AVAILABLE);
             res.setCachesEx(new VisorExceptionWrapper(e));
         }
     }
@@ -260,7 +271,8 @@ public class VisorNodeDataCollectorJob extends VisorJob<VisorNodeDataCollectorTa
 
                 FileSystemConfiguration igfsCfg = igfs.configuration();
 
-                if (proxyCache(igfsCfg.getDataCacheConfiguration().getName()) || proxyCache(igfsCfg.getMetaCacheConfiguration().getName()))
+                if (isProxyCache(ignite, igfsCfg.getDataCacheConfiguration().getName()) ||
+                    isProxyCache(ignite, igfsCfg.getMetaCacheConfiguration().getName()))
                     continue;
 
                 try {

http://git-wip-us.apache.org/repos/asf/ignite/blob/ececcbcd/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorTaskResult.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorTaskResult.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorTaskResult.java
index eb161f8..f8eb869 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorTaskResult.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorTaskResult.java
@@ -131,7 +131,8 @@ public class VisorNodeDataCollectorTaskResult extends VisorDataTransferObject {
             readyTopVers.isEmpty() &&
             pendingExchanges.isEmpty() &&
             persistenceMetrics.isEmpty() &&
-            persistenceMetricsEx.isEmpty();
+            persistenceMetricsEx.isEmpty() &&
+            rebalance.isEmpty();
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/ececcbcd/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorTaskUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorTaskUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorTaskUtils.java
index fda9ba1..7ab1ffc 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorTaskUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorTaskUtils.java
@@ -58,6 +58,10 @@ import org.apache.ignite.IgniteLogger;
 import org.apache.ignite.cache.eviction.AbstractEvictionPolicyFactory;
 import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.events.Event;
+import org.apache.ignite.internal.IgniteEx;
+import org.apache.ignite.internal.managers.discovery.GridDiscoveryManager;
+import org.apache.ignite.internal.processors.cache.IgniteCacheProxy;
+import org.apache.ignite.internal.processors.cache.IgniteCacheProxyImpl;
 import org.apache.ignite.internal.processors.igfs.IgfsEx;
 import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.internal.util.typedef.X;
@@ -110,6 +114,19 @@ public class VisorTaskUtils {
     public static final int LOG_FILES_COUNT_LIMIT = 5000;
 
     /** */
+    public static final int NOTHING_TO_REBALANCE = -1;
+
+    /** */
+    public static final int REBALANCE_NOT_AVAILABLE = -2;
+
+    /** */
+    public static final double MINIMAL_REBALANCE = 0.01;
+
+    /** */
+    public static final int REBALANCE_COMPLETE = 1;
+
+
+    /** */
     private static final int DFLT_BUFFER_SIZE = 4096;
 
     /** Only task event types that Visor should collect. */
@@ -1248,4 +1265,30 @@ public class VisorTaskUtils {
 
         return Arrays.asList(addrs);
     }
+
+    /**
+     * @param ignite Ignite.
+     * @param cacheName Cache name to check.
+     * @return {@code true} if cache on local node is not a data cache or near cache disabled.
+     */
+    public static boolean isProxyCache(IgniteEx ignite, String cacheName) {
+        GridDiscoveryManager discovery = ignite.context().discovery();
+
+        ClusterNode locNode = ignite.localNode();
+
+        return !(discovery.cacheAffinityNode(locNode, cacheName) || discovery.cacheNearNode(locNode, cacheName));
+    }
+
+    /**
+     * Check whether cache restarting in progress.
+     *
+     * @param ignite Grid.
+     * @param cacheName Cache name to check.
+     * @return {@code true} when cache restarting in progress.
+     */
+    public static boolean isRestartingCache(IgniteEx ignite, String cacheName)  {
+        IgniteCacheProxy<Object, Object> proxy = ignite.context().cache().jcache(cacheName);
+
+        return proxy instanceof IgniteCacheProxyImpl && ((IgniteCacheProxyImpl) proxy).isRestarting();
+    }
 }


[05/37] ignite git commit: IGNITE-10410: MVCC: Create "Cache 7" test suite for MVCC mode. This closes #5549.

Posted by ak...@apache.org.
IGNITE-10410: MVCC: Create "Cache 7" test suite for MVCC mode. This closes #5549.


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

Branch: refs/heads/ignite-10189
Commit: 9edd7861f6e08a27966d68f9b1400a8cf873c137
Parents: cf32fc7
Author: rkondakov <ko...@mail.ru>
Authored: Wed Dec 5 16:11:45 2018 +0300
Committer: Igor Seliverstov <gv...@gmail.com>
Committed: Wed Dec 5 16:11:45 2018 +0300

----------------------------------------------------------------------
 .../cache/CacheGroupMetricsMBeanTest.java       | 20 ++++--
 .../cache/CacheMetricsManageTest.java           | 11 ++-
 ...ynamicCacheStartFailWithPersistenceTest.java |  4 ++
 .../cache/MvccCacheGroupMetricsMBeanTest.java   | 29 ++++++++
 .../cache/WalModeChangeAbstractSelfTest.java    |  3 +
 .../cache/WalModeChangeAdvancedSelfTest.java    |  4 ++
 .../CacheDataLossOnPartitionMoveTest.java       |  6 +-
 .../CachePageWriteLockUnlockTest.java           |  6 +-
 ...cheRebalancingPartitionCountersMvccTest.java | 29 ++++++++
 ...idCacheRebalancingPartitionCountersTest.java |  9 +++
 ...cheRebalancingWithAsyncClearingMvccTest.java | 36 ++++++++++
 ...idCacheRebalancingWithAsyncClearingTest.java |  9 +++
 .../PageEvictionMultinodeAbstractTest.java      |  4 ++
 ...tinuousQueryAsyncFailoverMvccTxSelfTest.java |  5 --
 ...heContinuousQueryFailoverMvccTxSelfTest.java |  5 --
 ...IntegrityWithPrimaryIndexCorruptionTest.java |  9 +++
 .../TxRollbackAsyncNearCacheTest.java           |  9 +++
 .../cache/transactions/TxRollbackAsyncTest.java | 43 +++++++----
 ...WithSmallTimeoutAndContentionOneKeyTest.java | 10 +++
 .../testsuites/IgniteCacheMvccTestSuite7.java   | 76 ++++++++++++++++++++
 .../testsuites/IgniteCacheTestSuite4.java       |  2 +-
 .../testsuites/IgniteCacheTestSuite7.java       | 56 +++++++--------
 .../ignite/testsuites/IgnitePdsTestSuite4.java  |  3 +
 23 files changed, 324 insertions(+), 64 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/9edd7861/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGroupMetricsMBeanTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGroupMetricsMBeanTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGroupMetricsMBeanTest.java
index f8108eb..3cd730f 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGroupMetricsMBeanTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGroupMetricsMBeanTest.java
@@ -34,6 +34,7 @@ import javax.management.ObjectName;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.IgniteDataStreamer;
+import org.apache.ignite.cache.CacheAtomicityMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.cache.affinity.AffinityFunction;
 import org.apache.ignite.cache.affinity.AffinityFunctionContext;
@@ -132,21 +133,25 @@ public class CacheGroupMetricsMBeanTest extends GridCommonAbstractTest implement
             .setGroupName("group1")
             .setCacheMode(CacheMode.PARTITIONED)
             .setBackups(3)
-            .setAffinity(new RoundRobinVariableSizeAffinityFunction());
+            .setAffinity(new RoundRobinVariableSizeAffinityFunction())
+            .setAtomicityMode(atomicityMode());
 
         CacheConfiguration cCfg2 = new CacheConfiguration()
             .setName("cache2")
             .setGroupName("group2")
-            .setCacheMode(CacheMode.REPLICATED);
+            .setCacheMode(CacheMode.REPLICATED)
+            .setAtomicityMode(atomicityMode());
 
         CacheConfiguration cCfg3 = new CacheConfiguration()
             .setName("cache3")
             .setGroupName("group2")
-            .setCacheMode(CacheMode.REPLICATED);
+            .setCacheMode(CacheMode.REPLICATED)
+            .setAtomicityMode(atomicityMode());
 
         CacheConfiguration cCfg4 = new CacheConfiguration()
             .setName("cache4")
-            .setCacheMode(CacheMode.PARTITIONED);
+            .setCacheMode(CacheMode.PARTITIONED)
+            .setAtomicityMode(atomicityMode());
 
         cfg.setCacheConfiguration(cCfg1, cCfg2, cCfg3, cCfg4);
 
@@ -163,6 +168,13 @@ public class CacheGroupMetricsMBeanTest extends GridCommonAbstractTest implement
         return cfg;
     }
 
+    /**
+     * @return Cache atomicity mode.
+     */
+    protected CacheAtomicityMode atomicityMode() {
+        return CacheAtomicityMode.ATOMIC;
+    }
+
     /** {@inheritDoc} */
     @Override protected void afterTest() throws Exception {
         stopAllGrids();

http://git-wip-us.apache.org/repos/asf/ignite/blob/9edd7861/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheMetricsManageTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheMetricsManageTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheMetricsManageTest.java
index ae00ac9..94830be 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheMetricsManageTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheMetricsManageTest.java
@@ -52,6 +52,7 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
 import org.apache.ignite.testframework.GridTestUtils;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 
 /**
@@ -80,6 +81,9 @@ public class CacheMetricsManageTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testJmxNoPdsStatisticsEnable() throws Exception {
+        if (MvccFeatureChecker.forcedMvcc())
+            fail("https://issues.apache.org/jira/browse/IGNITE-9224");
+
         testJmxStatisticsEnable(false);
     }
 
@@ -87,6 +91,9 @@ public class CacheMetricsManageTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testJmxPdsStatisticsEnable() throws Exception {
+        if (MvccFeatureChecker.forcedMvcc())
+            fail("https://issues.apache.org/jira/browse/IGNITE-10421");
+
         testJmxStatisticsEnable(true);
     }
 
@@ -101,7 +108,7 @@ public class CacheMetricsManageTest extends GridCommonAbstractTest {
             .setName(CACHE1)
             .setGroupName(GROUP)
             .setCacheMode(CacheMode.PARTITIONED)
-            .setAtomicityMode(CacheAtomicityMode.ATOMIC);
+            .setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
 
         mgr1.createCache(CACHE1, cfg1);
 
@@ -490,7 +497,7 @@ public class CacheMetricsManageTest extends GridCommonAbstractTest {
             .setName(CACHE1)
             .setGroupName(GROUP)
             .setCacheMode(CacheMode.PARTITIONED)
-            .setAtomicityMode(CacheAtomicityMode.ATOMIC)
+            .setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL)
             .setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
 
         cfg.setCacheConfiguration(cacheCfg);

http://git-wip-us.apache.org/repos/asf/ignite/blob/9edd7861/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartFailWithPersistenceTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartFailWithPersistenceTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartFailWithPersistenceTest.java
index 8643b66..4826119 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartFailWithPersistenceTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartFailWithPersistenceTest.java
@@ -24,6 +24,7 @@ import org.apache.ignite.configuration.DataStorageConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.configuration.WALMode;
 import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 
 /**
  * Tests the recovery after a dynamic cache start failure, with enabled persistence.
@@ -57,6 +58,9 @@ public class IgniteDynamicCacheStartFailWithPersistenceTest extends IgniteAbstra
 
     /** {@inheritDoc} */
     @Override protected void beforeTestsStarted() throws Exception {
+        if (MvccFeatureChecker.forcedMvcc())
+            fail("https://issues.apache.org/jira/browse/IGNITE-10421");
+
         cleanPersistenceDir();
 
         startGrids(gridCount());

http://git-wip-us.apache.org/repos/asf/ignite/blob/9edd7861/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/MvccCacheGroupMetricsMBeanTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/MvccCacheGroupMetricsMBeanTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/MvccCacheGroupMetricsMBeanTest.java
new file mode 100644
index 0000000..2642eb5
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/MvccCacheGroupMetricsMBeanTest.java
@@ -0,0 +1,29 @@
+/*
+ * 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.cache.CacheAtomicityMode;
+
+/**
+ *
+ */
+public class MvccCacheGroupMetricsMBeanTest extends CacheGroupMetricsMBeanTest {
+    /** {@inheritDoc} */
+    @Override protected CacheAtomicityMode atomicityMode() {
+        return CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/9edd7861/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/WalModeChangeAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/WalModeChangeAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/WalModeChangeAbstractSelfTest.java
index 8c8ce53..467d6ff 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/WalModeChangeAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/WalModeChangeAbstractSelfTest.java
@@ -27,6 +27,7 @@ import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.internal.IgniteEx;
 import org.apache.ignite.internal.util.lang.IgniteInClosureX;
 import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
@@ -187,6 +188,8 @@ public abstract class WalModeChangeAbstractSelfTest extends WalModeChangeCommonA
             // Doesn't make sense for JDBC.
             return;
 
+        MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE);
+
         forAllNodes(new IgniteInClosureX<Ignite>() {
             @Override public void applyx(Ignite ignite) throws IgniteCheckedException {
                 createCache(ignite, cacheConfig(LOCAL).setDataRegionName(REGION_VOLATILE));

http://git-wip-us.apache.org/repos/asf/ignite/blob/9edd7861/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/WalModeChangeAdvancedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/WalModeChangeAdvancedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/WalModeChangeAdvancedSelfTest.java
index 5f2b4aa..f1e6e92 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/WalModeChangeAdvancedSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/WalModeChangeAdvancedSelfTest.java
@@ -32,6 +32,7 @@ import org.apache.ignite.internal.IgniteClientReconnectAbstractTest;
 import org.apache.ignite.internal.IgniteInternalFuture;
 import org.apache.ignite.testframework.GridTestUtils;
 import org.apache.ignite.testframework.GridTestUtils.SF;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
@@ -141,6 +142,9 @@ public class WalModeChangeAdvancedSelfTest extends WalModeChangeCommonAbstractSe
      * @throws Exception If failed.
      */
     public void testJoin() throws Exception {
+        if (MvccFeatureChecker.forcedMvcc())
+            fail("https://issues.apache.org/jira/browse/IGNITE-10421");
+
         checkJoin(false);
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/9edd7861/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheDataLossOnPartitionMoveTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheDataLossOnPartitionMoveTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheDataLossOnPartitionMoveTest.java
index 9ff0725..acbfa8c 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheDataLossOnPartitionMoveTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheDataLossOnPartitionMoveTest.java
@@ -36,13 +36,14 @@ import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.configuration.WALMode;
 import org.apache.ignite.internal.TestRecordingCommunicationSpi;
 import org.apache.ignite.internal.processors.cache.GridCacheUtils;
-import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtLocalPartition;
 import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionDemandMessage;
+import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtLocalPartition;
 import org.apache.ignite.internal.util.typedef.G;
 import org.apache.ignite.internal.util.typedef.internal.CU;
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.lang.IgniteBiPredicate;
 import org.apache.ignite.testframework.GridTestNode;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.jetbrains.annotations.Nullable;
 
@@ -119,6 +120,9 @@ public class CacheDataLossOnPartitionMoveTest extends GridCommonAbstractTest {
      * @throws Exception if failed.
      */
     public void testDataLossOnPartitionMove() throws Exception {
+        if (MvccFeatureChecker.forcedMvcc())
+            fail("https://issues.apache.org/jira/browse/IGNITE-10421");
+
         try {
             Ignite ignite = startGridsMultiThreaded(GRIDS_CNT / 2, false);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/9edd7861/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CachePageWriteLockUnlockTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CachePageWriteLockUnlockTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CachePageWriteLockUnlockTest.java
index 41c5882..5b24761 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CachePageWriteLockUnlockTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CachePageWriteLockUnlockTest.java
@@ -21,6 +21,7 @@ import java.util.Iterator;
 import javax.cache.Cache;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.cache.CacheAtomicityMode;
 import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.DataRegionConfiguration;
@@ -51,8 +52,9 @@ public class CachePageWriteLockUnlockTest extends GridCommonAbstractTest {
     @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
         IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
 
-        cfg.setCacheConfiguration(new CacheConfiguration(DEFAULT_CACHE_NAME).
-            setAffinity(new RendezvousAffinityFunction(false, 32)));
+        cfg.setCacheConfiguration(new CacheConfiguration(DEFAULT_CACHE_NAME)
+            .setAffinity(new RendezvousAffinityFunction(false, 32))
+            .setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL));
 
         cfg.setActiveOnStart(false);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/9edd7861/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingPartitionCountersMvccTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingPartitionCountersMvccTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingPartitionCountersMvccTest.java
new file mode 100644
index 0000000..4166cfc
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingPartitionCountersMvccTest.java
@@ -0,0 +1,29 @@
+/*
+ * 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.rebalancing;
+
+import org.apache.ignite.cache.CacheAtomicityMode;
+
+/**
+ *
+ */
+public class GridCacheRebalancingPartitionCountersMvccTest extends GridCacheRebalancingPartitionCountersTest {
+    /** {@inheritDoc} */
+    @Override protected CacheAtomicityMode atomicityMode() {
+        return CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/9edd7861/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingPartitionCountersTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingPartitionCountersTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingPartitionCountersTest.java
index 258e36e..6523eb9 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingPartitionCountersTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingPartitionCountersTest.java
@@ -24,6 +24,7 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import org.apache.ignite.IgniteCache;
+import org.apache.ignite.cache.CacheAtomicityMode;
 import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.DataRegionConfiguration;
@@ -61,6 +62,7 @@ public class GridCacheRebalancingPartitionCountersTest extends GridCommonAbstrac
                                 .setMaxSize(100L * 1024 * 1024))
                         .setWalMode(WALMode.LOG_ONLY))
                 .setCacheConfiguration(new CacheConfiguration(CACHE_NAME)
+                    .setAtomicityMode(atomicityMode())
                     .setBackups(2)
                     .setRebalanceBatchSize(4096) // Force to create several supply messages during rebalancing.
                     .setAffinity(
@@ -80,6 +82,13 @@ public class GridCacheRebalancingPartitionCountersTest extends GridCommonAbstrac
     }
 
     /**
+     * @return Cache atomicity mode.
+     */
+    protected CacheAtomicityMode atomicityMode() {
+        return CacheAtomicityMode.ATOMIC;
+    }
+
+    /**
      *
      */
     private boolean contains(int[] arr, int a) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/9edd7861/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingWithAsyncClearingMvccTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingWithAsyncClearingMvccTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingWithAsyncClearingMvccTest.java
new file mode 100644
index 0000000..a61d6d0
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingWithAsyncClearingMvccTest.java
@@ -0,0 +1,36 @@
+/*
+ * 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.rebalancing;
+
+import org.apache.ignite.cache.CacheAtomicityMode;
+
+/**
+ *
+ */
+public class GridCacheRebalancingWithAsyncClearingMvccTest extends GridCacheRebalancingWithAsyncClearingTest {
+    /** {@inheritDoc} */
+    @Override public void setUp() throws Exception {
+        fail("https://issues.apache.org/jira/browse/IGNITE-10421");
+
+        super.setUp();
+    }
+
+    /** {@inheritDoc} */
+    @Override protected CacheAtomicityMode atomicityMode() {
+        return CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/9edd7861/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingWithAsyncClearingTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingWithAsyncClearingTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingWithAsyncClearingTest.java
index 328653d..2b69439 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingWithAsyncClearingTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingWithAsyncClearingTest.java
@@ -21,6 +21,7 @@ import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.IgniteDataStreamer;
 import org.apache.ignite.IgniteSystemProperties;
+import org.apache.ignite.cache.CacheAtomicityMode;
 import org.apache.ignite.cache.CacheWriteSynchronizationMode;
 import org.apache.ignite.cache.PartitionLossPolicy;
 import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction;
@@ -65,6 +66,7 @@ public class GridCacheRebalancingWithAsyncClearingTest extends GridCommonAbstrac
         );
 
         cfg.setCacheConfiguration(new CacheConfiguration<>(CACHE_NAME)
+                .setAtomicityMode(atomicityMode())
                 .setBackups(2)
                 .setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC)
                 .setIndexedTypes(Integer.class, Integer.class)
@@ -94,6 +96,13 @@ public class GridCacheRebalancingWithAsyncClearingTest extends GridCommonAbstrac
     }
 
     /**
+     * @return Atomicity mode.
+     */
+    protected CacheAtomicityMode atomicityMode() {
+        return CacheAtomicityMode.ATOMIC;
+    }
+
+    /**
      * Test that partition clearing doesn't block partitions map exchange.
      *
      * @throws Exception If failed.

http://git-wip-us.apache.org/repos/asf/ignite/blob/9edd7861/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMultinodeAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMultinodeAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMultinodeAbstractTest.java
index 777c2d7..e30f1cf 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMultinodeAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMultinodeAbstractTest.java
@@ -25,6 +25,7 @@ import org.apache.ignite.cache.CachePeekMode;
 import org.apache.ignite.cache.CacheWriteSynchronizationMode;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 
 /**
  *
@@ -46,6 +47,9 @@ public abstract class PageEvictionMultinodeAbstractTest extends PageEvictionAbst
 
     /** {@inheritDoc} */
     @Override protected void beforeTestsStarted() throws Exception {
+        if (MvccFeatureChecker.forcedMvcc())
+            fail("https://issues.apache.org/jira/browse/IGNITE-10448");
+
         startGridsMultiThreaded(4, false);
 
         clientGrid = startGrid("client");

http://git-wip-us.apache.org/repos/asf/ignite/blob/9edd7861/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryAsyncFailoverMvccTxSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryAsyncFailoverMvccTxSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryAsyncFailoverMvccTxSelfTest.java
index 7c15f38..aa60aeb 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryAsyncFailoverMvccTxSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryAsyncFailoverMvccTxSelfTest.java
@@ -47,11 +47,6 @@ public class CacheContinuousQueryAsyncFailoverMvccTxSelfTest  extends CacheConti
     }
 
     /** {@inheritDoc} */
-    @Override public void testLeftPrimaryAndBackupNodes() throws Exception {
-        fail("https://issues.apache.org/jira/browse/IGNITE-10047");
-    }
-
-    /** {@inheritDoc} */
     @Override public void testFailoverStartStopBackup() throws Exception {
         fail("https://issues.apache.org/jira/browse/IGNITE-10391");
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/9edd7861/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverMvccTxSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverMvccTxSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverMvccTxSelfTest.java
index 2d578f2..df27087 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverMvccTxSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverMvccTxSelfTest.java
@@ -42,11 +42,6 @@ public class CacheContinuousQueryFailoverMvccTxSelfTest extends CacheContinuousQ
     }
 
     /** {@inheritDoc} */
-    @Override public void testLeftPrimaryAndBackupNodes() throws Exception {
-        fail("https://issues.apache.org/jira/browse/IGNITE-10047");
-    }
-
-    /** {@inheritDoc} */
     @Override public void testFailoverStartStopBackup() throws Exception {
         fail("https://issues.apache.org/jira/browse/IGNITE-10391");
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/9edd7861/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TransactionIntegrityWithPrimaryIndexCorruptionTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TransactionIntegrityWithPrimaryIndexCorruptionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TransactionIntegrityWithPrimaryIndexCorruptionTest.java
index fd31ee5..616bf97 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TransactionIntegrityWithPrimaryIndexCorruptionTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TransactionIntegrityWithPrimaryIndexCorruptionTest.java
@@ -34,6 +34,7 @@ import org.apache.ignite.internal.processors.cache.persistence.tree.io.PageIO;
 import org.apache.ignite.internal.processors.cache.persistence.tree.util.PageHandler;
 import org.apache.ignite.internal.processors.cache.tree.SearchRow;
 import org.apache.ignite.testframework.GridTestUtils;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 
 import static org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionState.OWNING;
 
@@ -45,6 +46,14 @@ public class TransactionIntegrityWithPrimaryIndexCorruptionTest extends Abstract
     private static volatile boolean corruptionEnabled;
 
     /** {@inheritDoc} */
+    @Override protected void beforeTest() throws Exception {
+        if (MvccFeatureChecker.forcedMvcc())
+            fail("https://issues.apache.org/jira/browse/IGNITE-10470");
+
+        super.beforeTest();
+    }
+
+    /** {@inheritDoc} */
     @Override protected void afterTest() throws Exception {
         corruptionEnabled = false;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/9edd7861/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackAsyncNearCacheTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackAsyncNearCacheTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackAsyncNearCacheTest.java
index 5caa1a0..dc115e1 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackAsyncNearCacheTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackAsyncNearCacheTest.java
@@ -17,6 +17,8 @@
 
 package org.apache.ignite.internal.processors.cache.transactions;
 
+import org.apache.ignite.testframework.MvccFeatureChecker;
+
 /**
  * Tests an ability to async rollback near transactions.
  */
@@ -25,4 +27,11 @@ public class TxRollbackAsyncNearCacheTest extends TxRollbackAsyncTest {
     @Override protected boolean nearCacheEnabled() {
         return true;
     }
+
+    /** {@inheritDoc} */
+    @Override public void setUp() throws Exception {
+        MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE);
+
+        super.setUp();
+    }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/9edd7861/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackAsyncTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackAsyncTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackAsyncTest.java
index d2e9804..8076746 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackAsyncTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackAsyncTest.java
@@ -59,6 +59,7 @@ import org.apache.ignite.internal.TestRecordingCommunicationSpi;
 import org.apache.ignite.internal.processors.cache.GridCacheContext;
 import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridNearLockRequest;
+import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxEnlistRequest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxFinishRequest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal;
 import org.apache.ignite.internal.util.future.GridFutureAdapter;
@@ -99,7 +100,6 @@ import static org.apache.ignite.testframework.GridTestUtils.runAsync;
 import static org.apache.ignite.testframework.GridTestUtils.waitForCondition;
 import static org.apache.ignite.transactions.TransactionConcurrency.OPTIMISTIC;
 import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC;
-import static org.apache.ignite.transactions.TransactionIsolation.READ_COMMITTED;
 import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_READ;
 import static org.apache.ignite.transactions.TransactionIsolation.SERIALIZABLE;
 import static org.apache.ignite.transactions.TransactionState.ROLLED_BACK;
@@ -127,14 +127,6 @@ public class TxRollbackAsyncTest extends GridCommonAbstractTest {
     public static final String LABEL = "wLockTx";
 
     /** {@inheritDoc} */
-    @Override protected void beforeTestsStarted() throws Exception {
-        if (MvccFeatureChecker.forcedMvcc())
-            fail("https://issues.apache.org/jira/browse/IGNITE-10410");
-
-        super.beforeTestsStarted();
-    }
-
-    /** {@inheritDoc} */
     @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
         IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
 
@@ -228,6 +220,9 @@ public class TxRollbackAsyncTest extends GridCommonAbstractTest {
      *
      */
     public void testRollbackSimple() throws Exception {
+        if (MvccFeatureChecker.forcedMvcc())
+            fail("https://issues.apache.org/jira/browse/IGNITE-7952");
+
         startClient();
 
         for (Ignite ignite : G.allGrids()) {
@@ -242,7 +237,7 @@ public class TxRollbackAsyncTest extends GridCommonAbstractTest {
      */
     private void testRollbackSimple0(Ignite near) throws Exception {
         // Normal rollback after put.
-        Transaction tx = near.transactions().txStart(PESSIMISTIC, READ_COMMITTED);
+        Transaction tx = near.transactions().txStart(PESSIMISTIC, REPEATABLE_READ);
 
         near.cache(CACHE_NAME).put(0, 0);
 
@@ -406,7 +401,7 @@ public class TxRollbackAsyncTest extends GridCommonAbstractTest {
                         txReadyFut.onDone(tx);
 
                         // Will block on lock request until rolled back asynchronously.
-                        Object o = tryLockNode.cache(CACHE_NAME).get(0);
+                        Object o = tryLockNode.cache(CACHE_NAME).getAndPut(0, 0);
 
                         assertNull(o); // If rolled back by close, previous get will return null.
                     }
@@ -496,6 +491,9 @@ public class TxRollbackAsyncTest extends GridCommonAbstractTest {
      *
      */
     public void testEnlistManyReadOptimistic() throws Exception {
+        if (MvccFeatureChecker.forcedMvcc())
+            return; // Optimistic transactions are not supported by MVCC.
+
         testEnlistMany(false, SERIALIZABLE, OPTIMISTIC);
     }
 
@@ -503,6 +501,9 @@ public class TxRollbackAsyncTest extends GridCommonAbstractTest {
      *
      */
     public void testEnlistManyWriteOptimistic() throws Exception {
+        if (MvccFeatureChecker.forcedMvcc())
+            return; // Optimistic transactions are not supported by MVCC.
+
         testEnlistMany(true, SERIALIZABLE, OPTIMISTIC);
     }
 
@@ -547,13 +548,20 @@ public class TxRollbackAsyncTest extends GridCommonAbstractTest {
      * Rollback tx while near lock request is delayed.
      */
     public void testRollbackDelayNearLockRequest() throws Exception {
+        if (MvccFeatureChecker.forcedMvcc())
+            fail("https://issues.apache.org/jira/browse/IGNITE-9470");
+
         final Ignite client = startClient();
 
         final Ignite prim = primaryNode(0, CACHE_NAME);
 
         final TestRecordingCommunicationSpi spi = (TestRecordingCommunicationSpi)client.configuration().getCommunicationSpi();
 
-        spi.blockMessages(GridNearLockRequest.class, prim.name());
+        boolean mvcc = MvccFeatureChecker.forcedMvcc();
+
+        Class msgCls = mvcc ? GridNearTxEnlistRequest.class : GridNearLockRequest.class;
+
+        spi.blockMessages(msgCls, prim.name());
 
         final IgniteInternalFuture<Void> rollbackFut = runAsync(new Callable<Void>() {
             @Override public Void call() throws Exception {
@@ -571,7 +579,7 @@ public class TxRollbackAsyncTest extends GridCommonAbstractTest {
             fail();
         }
         catch (CacheException e) {
-            assertTrue(X.hasCause(e, TransactionRollbackException.class));
+            assertTrue(X.getFullStackTrace(e),X.hasCause(e, TransactionRollbackException.class));
         }
 
         rollbackFut.get();
@@ -646,6 +654,9 @@ public class TxRollbackAsyncTest extends GridCommonAbstractTest {
      *
      */
     public void testMixedAsyncRollbackTypes() throws Exception {
+        if (MvccFeatureChecker.forcedMvcc())
+            fail("https://issues.apache.org/jira/browse/IGNITE-10434");
+
         final Ignite client = startClient();
 
         final AtomicBoolean stop = new AtomicBoolean();
@@ -676,6 +687,8 @@ public class TxRollbackAsyncTest extends GridCommonAbstractTest {
         for (Ignite ignite : G.allGrids())
             perNodeTxs.put(ignite, new ArrayBlockingQueue<>(1000));
 
+        boolean mvcc = MvccFeatureChecker.forcedMvcc();
+
         IgniteInternalFuture<?> txFut = multithreadedAsync(() -> {
             while (!stop.get()) {
                 int nodeId = r.nextInt(GRID_CNT + 1);
@@ -683,8 +696,8 @@ public class TxRollbackAsyncTest extends GridCommonAbstractTest {
                 // Choose random node to start tx on.
                 Ignite node = nodeId == GRID_CNT || nearCacheEnabled() ? client : grid(nodeId);
 
-                TransactionConcurrency conc = TC_VALS[r.nextInt(TC_VALS.length)];
-                TransactionIsolation isolation = TI_VALS[r.nextInt(TI_VALS.length)];
+                TransactionConcurrency conc = mvcc ? PESSIMISTIC : TC_VALS[r.nextInt(TC_VALS.length)];
+                TransactionIsolation isolation = mvcc ? REPEATABLE_READ :TI_VALS[r.nextInt(TI_VALS.length)];
 
                 // Timeout is necessary otherwise deadlock is possible due to randomness of lock acquisition.
                 long timeout = r.nextInt(50) + 50;

http://git-wip-us.apache.org/repos/asf/ignite/blob/9edd7861/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxWithSmallTimeoutAndContentionOneKeyTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxWithSmallTimeoutAndContentionOneKeyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxWithSmallTimeoutAndContentionOneKeyTest.java
index 62f4635..cac0427 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxWithSmallTimeoutAndContentionOneKeyTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxWithSmallTimeoutAndContentionOneKeyTest.java
@@ -40,6 +40,7 @@ import org.apache.ignite.internal.util.typedef.internal.SB;
 import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.apache.ignite.transactions.Transaction;
 import org.apache.ignite.transactions.TransactionConcurrency;
@@ -112,6 +113,9 @@ public class TxWithSmallTimeoutAndContentionOneKeyTest extends GridCommonAbstrac
      * @return Random transaction type.
      */
     protected TransactionConcurrency transactionConcurrency() {
+        if (MvccFeatureChecker.forcedMvcc())
+            return PESSIMISTIC;
+
         ThreadLocalRandom random = ThreadLocalRandom.current();
 
         return random.nextBoolean() ? OPTIMISTIC : PESSIMISTIC;
@@ -121,6 +125,9 @@ public class TxWithSmallTimeoutAndContentionOneKeyTest extends GridCommonAbstrac
      * @return Random transaction isolation level.
      */
     protected TransactionIsolation transactionIsolation(){
+        if (MvccFeatureChecker.forcedMvcc())
+            return REPEATABLE_READ;
+
         ThreadLocalRandom random = ThreadLocalRandom.current();
 
         switch (random.nextInt(3)) {
@@ -150,6 +157,9 @@ public class TxWithSmallTimeoutAndContentionOneKeyTest extends GridCommonAbstrac
      * @throws Exception If failed.
      */
     public void test() throws Exception {
+        if (MvccFeatureChecker.forcedMvcc())
+            fail("https://issues.apache.org/jira/browse/IGNITE-10455");
+
         startGrids(4);
 
         client = true;

http://git-wip-us.apache.org/repos/asf/ignite/blob/9edd7861/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite7.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite7.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite7.java
new file mode 100644
index 0000000..403b5a0
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite7.java
@@ -0,0 +1,76 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.ignite.testsuites;
+
+import java.util.HashSet;
+import junit.framework.TestSuite;
+import org.apache.ignite.IgniteSystemProperties;
+import org.apache.ignite.internal.processors.authentication.Authentication1kUsersNodeRestartTest;
+import org.apache.ignite.internal.processors.authentication.AuthenticationConfigurationClusterTest;
+import org.apache.ignite.internal.processors.authentication.AuthenticationOnNotActiveClusterTest;
+import org.apache.ignite.internal.processors.authentication.AuthenticationProcessorNPEOnStartTest;
+import org.apache.ignite.internal.processors.authentication.AuthenticationProcessorNodeRestartTest;
+import org.apache.ignite.internal.processors.authentication.AuthenticationProcessorSelfTest;
+import org.apache.ignite.internal.processors.cache.CacheDataRegionConfigurationTest;
+import org.apache.ignite.internal.processors.cache.CacheGroupMetricsMBeanTest;
+import org.apache.ignite.internal.processors.cache.MvccCacheGroupMetricsMBeanTest;
+import org.apache.ignite.internal.processors.cache.distributed.Cache64kPartitionsTest;
+import org.apache.ignite.internal.processors.cache.distributed.rebalancing.GridCacheRebalancingPartitionCountersMvccTest;
+import org.apache.ignite.internal.processors.cache.distributed.rebalancing.GridCacheRebalancingPartitionCountersTest;
+import org.apache.ignite.internal.processors.cache.persistence.db.CheckpointBufferDeadlockTest;
+
+/**
+ *
+ */
+public class IgniteCacheMvccTestSuite7  extends TestSuite {
+    /**
+     * @return IgniteCache test suite.
+     */
+    public static TestSuite suite() {
+        System.setProperty(IgniteSystemProperties.IGNITE_FORCE_MVCC_MODE_IN_TESTS, "true");
+
+        HashSet<Class> ignoredTests = new HashSet<>(128);
+
+        // Other non-tx tests.
+        ignoredTests.add(CheckpointBufferDeadlockTest.class);//
+        ignoredTests.add(AuthenticationConfigurationClusterTest.class);//
+        ignoredTests.add(AuthenticationProcessorSelfTest.class);
+        ignoredTests.add(AuthenticationOnNotActiveClusterTest.class);
+        ignoredTests.add(AuthenticationProcessorNodeRestartTest.class);
+        ignoredTests.add(AuthenticationProcessorNPEOnStartTest.class);
+        ignoredTests.add(Authentication1kUsersNodeRestartTest.class);
+        ignoredTests.add(CacheDataRegionConfigurationTest.class);
+        ignoredTests.add(Cache64kPartitionsTest.class);
+
+        // Skip classes which Mvcc implementations are added in this method below.
+        // TODO IGNITE-10175: refactor these tests (use assume) to support both mvcc and non-mvcc modes after moving to JUnit4/5.
+        ignoredTests.add(CacheGroupMetricsMBeanTest.class); // See MvccCacheGroupMetricsMBeanTest
+        ignoredTests.add(GridCacheRebalancingPartitionCountersTest.class); // See GridCacheRebalancingPartitionCountersMvccTest
+
+        TestSuite suite = new TestSuite("IgniteCache Mvcc Test Suite part 7");
+
+        suite.addTest(IgniteCacheTestSuite7.suite(ignoredTests));
+
+        // Add Mvcc clones.
+        suite.addTestSuite(MvccCacheGroupMetricsMBeanTest.class);
+        suite.addTestSuite(GridCacheRebalancingPartitionCountersMvccTest.class);
+
+
+        return suite;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/9edd7861/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java
index 378c9e9..05aa54c 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java
@@ -6,7 +6,7 @@
  * (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
+ *      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,

http://git-wip-us.apache.org/repos/asf/ignite/blob/9edd7861/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite7.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite7.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite7.java
index d0734a8..f7e1020 100755
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite7.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite7.java
@@ -34,7 +34,6 @@ import org.apache.ignite.internal.processors.cache.WalModeChangeCoordinatorNotAf
 import org.apache.ignite.internal.processors.cache.WalModeChangeSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.Cache64kPartitionsTest;
 import org.apache.ignite.internal.processors.cache.distributed.CacheDataLossOnPartitionMoveTest;
-import org.apache.ignite.internal.processors.cache.distributed.CachePageWriteLockUnlockTest;
 import org.apache.ignite.internal.processors.cache.distributed.CacheRentingStateRepairTest;
 import org.apache.ignite.internal.processors.cache.distributed.dht.IgniteCacheStartWithLoadTest;
 import org.apache.ignite.internal.processors.cache.distributed.rebalancing.GridCacheRebalancingPartitionCountersTest;
@@ -45,6 +44,7 @@ import org.apache.ignite.internal.processors.cache.persistence.db.CheckpointBuff
 import org.apache.ignite.internal.processors.cache.transactions.TransactionIntegrityWithPrimaryIndexCorruptionTest;
 import org.apache.ignite.internal.processors.cache.transactions.TxRollbackAsyncWithPersistenceTest;
 import org.apache.ignite.internal.processors.cache.transactions.TxWithSmallTimeoutAndContentionOneKeyTest;
+import org.apache.ignite.testframework.GridTestUtils;
 
 /**
  * Test suite.
@@ -63,46 +63,44 @@ public class IgniteCacheTestSuite7 extends TestSuite {
      * @return Test suite.
      * @throws Exception Thrown in case of the failure.
      */
-    public static TestSuite suite(Set<Class> ignoredTests) throws Exception {
+    public static TestSuite suite(Set<Class> ignoredTests) {
         TestSuite suite = new TestSuite("IgniteCache With Persistence Test Suite");
 
-        suite.addTestSuite(CheckpointBufferDeadlockTest.class);
-        suite.addTestSuite(IgniteCacheStartWithLoadTest.class);
+        GridTestUtils.addTestIfNeeded(suite, CheckpointBufferDeadlockTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheStartWithLoadTest.class, ignoredTests);
 
-        suite.addTestSuite(AuthenticationConfigurationClusterTest.class);
-        suite.addTestSuite(AuthenticationProcessorSelfTest.class);
-        suite.addTestSuite(AuthenticationOnNotActiveClusterTest.class);
-        suite.addTestSuite(AuthenticationProcessorNodeRestartTest.class);
-        suite.addTestSuite(AuthenticationProcessorNPEOnStartTest.class);
-        suite.addTestSuite(Authentication1kUsersNodeRestartTest.class);
+        GridTestUtils.addTestIfNeeded(suite, AuthenticationConfigurationClusterTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, AuthenticationProcessorSelfTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, AuthenticationOnNotActiveClusterTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, AuthenticationProcessorNodeRestartTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, AuthenticationProcessorNPEOnStartTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, Authentication1kUsersNodeRestartTest.class, ignoredTests);
 
-        suite.addTestSuite(CacheDataRegionConfigurationTest.class);
+        GridTestUtils.addTestIfNeeded(suite, CacheDataRegionConfigurationTest.class, ignoredTests);
 
-        suite.addTestSuite(WalModeChangeAdvancedSelfTest.class);
-        suite.addTestSuite(WalModeChangeSelfTest.class);
-        suite.addTestSuite(WalModeChangeCoordinatorNotAffinityNodeSelfTest.class);
+        GridTestUtils.addTestIfNeeded(suite, WalModeChangeAdvancedSelfTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, WalModeChangeSelfTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, WalModeChangeCoordinatorNotAffinityNodeSelfTest.class, ignoredTests);
 
-        suite.addTestSuite(Cache64kPartitionsTest.class);
-        suite.addTestSuite(GridCacheRebalancingPartitionCountersTest.class);
-        suite.addTestSuite(GridCacheRebalancingWithAsyncClearingTest.class);
+        GridTestUtils.addTestIfNeeded(suite, Cache64kPartitionsTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, GridCacheRebalancingPartitionCountersTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, GridCacheRebalancingWithAsyncClearingTest.class, ignoredTests);
 
-        suite.addTestSuite(IgnitePdsCacheAssignmentNodeRestartsTest.class);
-        suite.addTestSuite(TxRollbackAsyncWithPersistenceTest.class);
+        GridTestUtils.addTestIfNeeded(suite, IgnitePdsCacheAssignmentNodeRestartsTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, TxRollbackAsyncWithPersistenceTest.class, ignoredTests);
 
-        suite.addTestSuite(CacheGroupMetricsMBeanTest.class);
-        suite.addTestSuite(CacheMetricsManageTest.class);
-        suite.addTestSuite(PageEvictionMultinodeMixedRegionsTest.class);
+        GridTestUtils.addTestIfNeeded(suite, CacheGroupMetricsMBeanTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, CacheMetricsManageTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, PageEvictionMultinodeMixedRegionsTest.class, ignoredTests);
 
-        suite.addTestSuite(IgniteDynamicCacheStartFailWithPersistenceTest.class);
+        GridTestUtils.addTestIfNeeded(suite, IgniteDynamicCacheStartFailWithPersistenceTest.class, ignoredTests);
 
-        suite.addTestSuite(TxWithSmallTimeoutAndContentionOneKeyTest.class);
+        GridTestUtils.addTestIfNeeded(suite, TxWithSmallTimeoutAndContentionOneKeyTest.class, ignoredTests);
 
-        suite.addTestSuite(CacheRentingStateRepairTest.class);
+        GridTestUtils.addTestIfNeeded(suite, CacheRentingStateRepairTest.class, ignoredTests);
 
-        suite.addTestSuite(TransactionIntegrityWithPrimaryIndexCorruptionTest.class);
-        suite.addTestSuite(CacheDataLossOnPartitionMoveTest.class);
-
-        suite.addTestSuite(CachePageWriteLockUnlockTest.class);
+        GridTestUtils.addTestIfNeeded(suite, TransactionIntegrityWithPrimaryIndexCorruptionTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, CacheDataLossOnPartitionMoveTest.class, ignoredTests);
 
         return suite;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/9edd7861/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite4.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite4.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite4.java
index ad6bbbf..11f0219 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite4.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite4.java
@@ -20,6 +20,7 @@ package org.apache.ignite.testsuites;
 import junit.framework.TestSuite;
 import org.apache.ignite.cache.ResetLostPartitionTest;
 import org.apache.ignite.internal.processors.cache.IgniteClusterActivateDeactivateTestWithPersistenceAndMemoryReuse;
+import org.apache.ignite.internal.processors.cache.distributed.CachePageWriteLockUnlockTest;
 import org.apache.ignite.internal.processors.cache.persistence.IgnitePdsContinuousRestartTestWithSharedGroupAndIndexes;
 import org.apache.ignite.internal.processors.cache.persistence.IgnitePdsRecoveryAfterFileCorruptionTest;
 import org.apache.ignite.internal.processors.cache.persistence.IgnitePdsTaskCancelingTest;
@@ -51,6 +52,8 @@ public class IgnitePdsTestSuite4 extends TestSuite {
 
         suite.addTestSuite(ResetLostPartitionTest.class);
 
+        suite.addTestSuite(CachePageWriteLockUnlockTest.class);
+
         suite.addTestSuite(IgnitePdsCacheWalDisabledOnRebalancingTest.class);
 
         return suite;


[22/37] ignite git commit: IGNITE-10318 Web console: Update panels to use newer UI on "Query notebook" screen.

Posted by ak...@apache.org.
IGNITE-10318 Web console: Update panels to use newer UI on "Query notebook" screen.


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

Branch: refs/heads/ignite-10189
Commit: e1b8686aa9d7887d462e0f6b04f33501a9f31141
Parents: f965bf5
Author: Ilya Borisov <kl...@gmail.com>
Authored: Fri Dec 7 16:26:00 2018 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Fri Dec 7 16:26:00 2018 +0700

----------------------------------------------------------------------
 .../input-dialog/input-dialog.tpl.pug           |    1 -
 .../query-actions-button/component.ts           |   28 +
 .../query-actions-button/controller.ts          |   53 +
 .../query-actions-button/template.pug           |   28 +
 .../components/queries-notebook/controller.js   | 1952 -----------------
 .../components/queries-notebook/controller.ts   | 2007 ++++++++++++++++++
 .../components/queries-notebook/index.js        |    2 +
 .../queries-notebook/template.tpl.pug           |   50 +-
 8 files changed, 2139 insertions(+), 1982 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/e1b8686a/modules/web-console/frontend/app/components/input-dialog/input-dialog.tpl.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/input-dialog/input-dialog.tpl.pug b/modules/web-console/frontend/app/components/input-dialog/input-dialog.tpl.pug
index d79cb56..23896e7 100644
--- a/modules/web-console/frontend/app/components/input-dialog/input-dialog.tpl.pug
+++ b/modules/web-console/frontend/app/components/input-dialog/input-dialog.tpl.pug
@@ -21,7 +21,6 @@ include /app/helpers/jade/mixins
         form.modal-content(name='ctrl.form' novalidate)
             .modal-header
                 h4.modal-title
-                    i.fa.fa-clone
                     span {{ ctrl.options.title }}
                 button.close(type='button' aria-label='Close' ng-click='$hide()')
                      svg(ignite-icon="cross")

http://git-wip-us.apache.org/repos/asf/ignite/blob/e1b8686a/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/components/query-actions-button/component.ts
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/components/query-actions-button/component.ts b/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/components/query-actions-button/component.ts
new file mode 100644
index 0000000..099efc2
--- /dev/null
+++ b/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/components/query-actions-button/component.ts
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import template from './template.pug';
+import QueryActionsButton from './controller';
+
+export const component: ng.IComponentOptions = {
+    controller: QueryActionsButton,
+    template,
+    bindings: {
+        actions: '<',
+        item: '<'
+    }
+};

http://git-wip-us.apache.org/repos/asf/ignite/blob/e1b8686a/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/components/query-actions-button/controller.ts
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/components/query-actions-button/controller.ts b/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/components/query-actions-button/controller.ts
new file mode 100644
index 0000000..e71cf46
--- /dev/null
+++ b/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/components/query-actions-button/controller.ts
@@ -0,0 +1,53 @@
+/*
+ * 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.
+ */
+
+export type QueryActions < T > = Array<{text: string, click?(item: T): any, available?(item: T): boolean}>;
+
+export default class QueryActionButton<T> {
+    static $inject = ['$element'];
+
+    item: T;
+
+    actions: QueryActions<T>;
+
+    boundActions: QueryActions<undefined> = [];
+
+    constructor(private el: JQLite) {}
+
+    $postLink() {
+        this.el[0].classList.add('btn-ignite-group');
+    }
+
+    $onChanges(changes: {actions: ng.IChangesObject<QueryActionButton<T>['actions']>}) {
+        if ('actions' in changes) {
+            this.boundActions = changes.actions.currentValue.map((a) => {
+                const action = {...a};
+
+                const click = () => a.click(this.item);
+
+                Object.defineProperty(action, 'click', {
+                    get: () => {
+                        return typeof a.available === 'function'
+                            ? a.available(this.item) ? click : void 0
+                            : a.available ? click : void 0;
+                    }
+                });
+                return action;
+            });
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/e1b8686a/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/components/query-actions-button/template.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/components/query-actions-button/template.pug b/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/components/query-actions-button/template.pug
new file mode 100644
index 0000000..32359bf
--- /dev/null
+++ b/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/components/query-actions-button/template.pug
@@ -0,0 +1,28 @@
+//-
+    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.
+
+button.btn-ignite.btn-ignite--primary(
+    ng-click='$ctrl.boundActions[0].click()'
+    type='button'
+    ng-disabled='!$ctrl.boundActions[0].click'
+)
+    | {{ ::$ctrl.boundActions[0].text }}
+button.btn-ignite.btn-ignite--primary(
+    bs-dropdown='$ctrl.boundActions'
+    data-placement='bottom-right'
+    type='button'
+)
+    span.icon.fa.fa-caret-down

http://git-wip-us.apache.org/repos/asf/ignite/blob/e1b8686a/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/controller.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/controller.js b/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/controller.js
deleted file mode 100644
index 4b1b861..0000000
--- a/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/controller.js
+++ /dev/null
@@ -1,1952 +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.
- */
-
-import _ from 'lodash';
-import {nonEmpty, nonNil} from 'app/utils/lodashMixins';
-import id8 from 'app/utils/id8';
-import 'rxjs/add/operator/mergeMap';
-import 'rxjs/add/operator/merge';
-import 'rxjs/add/operator/switchMap';
-import 'rxjs/add/operator/exhaustMap';
-import 'rxjs/add/operator/distinctUntilChanged';
-
-import { fromPromise } from 'rxjs/observable/fromPromise';
-import { timer } from 'rxjs/observable/timer';
-import { defer } from 'rxjs/observable/defer';
-
-import {CSV} from 'app/services/CSV';
-
-import paragraphRateTemplateUrl from 'views/sql/paragraph-rate.tpl.pug';
-import cacheMetadataTemplateUrl from 'views/sql/cache-metadata.tpl.pug';
-import chartSettingsTemplateUrl from 'views/sql/chart-settings.tpl.pug';
-import messageTemplateUrl from 'views/templates/message.tpl.pug';
-
-// Time line X axis descriptor.
-const TIME_LINE = {value: -1, type: 'java.sql.Date', label: 'TIME_LINE'};
-
-// Row index X axis descriptor.
-const ROW_IDX = {value: -2, type: 'java.lang.Integer', label: 'ROW_IDX'};
-
-const NON_COLLOCATED_JOINS_SINCE = '1.7.0';
-
-const COLLOCATED_QUERY_SINCE = [['2.3.5', '2.4.0'], ['2.4.6', '2.5.0'], ['2.5.1-p13', '2.6.0'], '2.7.0'];
-
-const ENFORCE_JOIN_SINCE = [['1.7.9', '1.8.0'], ['1.8.4', '1.9.0'], '1.9.1'];
-
-const LAZY_QUERY_SINCE = [['2.1.4-p1', '2.2.0'], '2.2.1'];
-
-const DDL_SINCE = [['2.1.6', '2.2.0'], '2.3.0'];
-
-const _fullColName = (col) => {
-    const res = [];
-
-    if (col.schemaName)
-        res.push(col.schemaName);
-
-    if (col.typeName)
-        res.push(col.typeName);
-
-    res.push(col.fieldName);
-
-    return res.join('.');
-};
-
-let paragraphId = 0;
-
-class Paragraph {
-    constructor($animate, $timeout, JavaTypes, errorParser, paragraph) {
-        const self = this;
-
-        self.id = 'paragraph-' + paragraphId++;
-        self.qryType = paragraph.qryType || 'query';
-        self.maxPages = 0;
-        self.filter = '';
-        self.useAsDefaultSchema = false;
-        self.localQueryMode = false;
-        self.csvIsPreparing = false;
-        self.scanningInProgress = false;
-
-        _.assign(this, paragraph);
-
-        Object.defineProperty(this, 'gridOptions', {value: {
-            enableGridMenu: false,
-            enableColumnMenus: false,
-            flatEntityAccess: true,
-            fastWatch: true,
-            categories: [],
-            rebuildColumns() {
-                if (_.isNil(this.api))
-                    return;
-
-                this.categories.length = 0;
-
-                this.columnDefs = _.reduce(self.meta, (cols, col, idx) => {
-                    cols.push({
-                        displayName: col.fieldName,
-                        headerTooltip: _fullColName(col),
-                        field: idx.toString(),
-                        minWidth: 50,
-                        cellClass: 'cell-left',
-                        visible: self.columnFilter(col)
-                    });
-
-                    this.categories.push({
-                        name: col.fieldName,
-                        visible: self.columnFilter(col),
-                        enableHiding: true
-                    });
-
-                    return cols;
-                }, []);
-
-                $timeout(() => this.api.core.notifyDataChange('column'));
-            },
-            adjustHeight() {
-                if (_.isNil(this.api))
-                    return;
-
-                this.data = self.rows;
-
-                const height = Math.min(self.rows.length, 15) * 30 + 47;
-
-                // Remove header height.
-                this.api.grid.element.css('height', height + 'px');
-
-                $timeout(() => this.api.core.handleWindowResize());
-            },
-            onRegisterApi(api) {
-                $animate.enabled(api.grid.element, false);
-
-                this.api = api;
-
-                this.rebuildColumns();
-
-                this.adjustHeight();
-            }
-        }});
-
-        Object.defineProperty(this, 'chartHistory', {value: []});
-
-        Object.defineProperty(this, 'error', {value: {
-            root: {},
-            message: ''
-        }});
-
-        this.setError = (err) => {
-            this.error.root = err;
-            this.error.message = errorParser.extractMessage(err);
-
-            let cause = err;
-
-            while (nonNil(cause)) {
-                if (nonEmpty(cause.className) &&
-                    _.includes(['SQLException', 'JdbcSQLException', 'QueryCancelledException'], JavaTypes.shortClassName(cause.className))) {
-                    this.error.message = errorParser.extractMessage(cause.message || cause.className);
-
-                    break;
-                }
-
-                cause = cause.cause;
-            }
-
-            if (_.isEmpty(this.error.message) && nonEmpty(err.className)) {
-                this.error.message = 'Internal cluster error';
-
-                if (nonEmpty(err.className))
-                    this.error.message += ': ' + err.className;
-            }
-        };
-    }
-
-    resultType() {
-        if (_.isNil(this.queryArgs))
-            return null;
-
-        if (nonEmpty(this.error.message))
-            return 'error';
-
-        if (_.isEmpty(this.rows))
-            return 'empty';
-
-        return this.result === 'table' ? 'table' : 'chart';
-    }
-
-    nonRefresh() {
-        return _.isNil(this.rate) || _.isNil(this.rate.stopTime);
-    }
-
-    table() {
-        return this.result === 'table';
-    }
-
-    chart() {
-        return this.result !== 'table' && this.result !== 'none';
-    }
-
-    nonEmpty() {
-        return this.rows && this.rows.length > 0;
-    }
-
-    queryExecuted() {
-        return nonEmpty(this.meta) || nonEmpty(this.error.message);
-    }
-
-    scanExplain() {
-        return this.queryExecuted() && this.queryArgs.type !== 'QUERY';
-    }
-
-    timeLineSupported() {
-        return this.result !== 'pie';
-    }
-
-    chartColumnsConfigured() {
-        return nonEmpty(this.chartKeyCols) && nonEmpty(this.chartValCols);
-    }
-
-    chartTimeLineEnabled() {
-        return nonEmpty(this.chartKeyCols) && _.eq(this.chartKeyCols[0], TIME_LINE);
-    }
-
-    executionInProgress(showLocal = false) {
-        return this.loading && (this.localQueryMode === showLocal);
-    }
-
-    checkScanInProgress(showLocal = false) {
-        return this.scanningInProgress && (this.localQueryMode === showLocal);
-    }
-
-    cancelRefresh($interval) {
-        if (this.rate && this.rate.stopTime) {
-            $interval.cancel(this.rate.stopTime);
-
-            delete this.rate.stopTime;
-        }
-    }
-
-    reset($interval) {
-        this.meta = [];
-        this.chartColumns = [];
-        this.chartKeyCols = [];
-        this.chartValCols = [];
-        this.error.root = {};
-        this.error.message = '';
-        this.rows = [];
-        this.duration = 0;
-
-        this.cancelRefresh($interval);
-    }
-}
-
-// Controller for SQL notebook screen.
-export class NotebookCtrl {
-    static $inject = ['$rootScope', '$scope', '$http', '$q', '$timeout', '$interval', '$animate', '$location', '$anchorScroll', '$state', '$filter', '$modal', '$popover', 'IgniteLoading', 'IgniteLegacyUtils', 'IgniteMessages', 'IgniteConfirm', 'AgentManager', 'IgniteChartColors', 'IgniteNotebook', 'IgniteNodes', 'uiGridExporterConstants', 'IgniteVersion', 'IgniteActivitiesData', 'JavaTypes', 'IgniteCopyToClipboard', 'CSV', 'IgniteErrorParser', 'DemoInfo'];
-
-    /**
-     * @param {CSV} CSV
-     */
-    constructor($root, $scope, $http, $q, $timeout, $interval, $animate, $location, $anchorScroll, $state, $filter, $modal, $popover, Loading, LegacyUtils, Messages, Confirm, agentMgr, IgniteChartColors, Notebook, Nodes, uiGridExporterConstants, Version, ActivitiesData, JavaTypes, IgniteCopyToClipboard, CSV, errorParser, DemoInfo) {
-        const $ctrl = this;
-
-        this.CSV = CSV;
-        Object.assign(this, { $root, $scope, $http, $q, $timeout, $interval, $animate, $location, $anchorScroll, $state, $filter, $modal, $popover, Loading, LegacyUtils, Messages, Confirm, agentMgr, IgniteChartColors, Notebook, Nodes, uiGridExporterConstants, Version, ActivitiesData, JavaTypes, errorParser, DemoInfo });
-
-        // Define template urls.
-        $ctrl.paragraphRateTemplateUrl = paragraphRateTemplateUrl;
-        $ctrl.cacheMetadataTemplateUrl = cacheMetadataTemplateUrl;
-        $ctrl.chartSettingsTemplateUrl = chartSettingsTemplateUrl;
-        $ctrl.demoStarted = false;
-
-        this.isDemo = $root.IgniteDemoMode;
-
-        const _tryStopRefresh = function(paragraph) {
-            paragraph.cancelRefresh($interval);
-        };
-
-        const _stopTopologyRefresh = () => {
-            if ($scope.notebook && $scope.notebook.paragraphs)
-                $scope.notebook.paragraphs.forEach((paragraph) => _tryStopRefresh(paragraph));
-        };
-
-        $scope.$on('$stateChangeStart', _stopTopologyRefresh);
-
-        $scope.caches = [];
-
-        $scope.pageSizesOptions = [
-            {value: 50, label: '50'},
-            {value: 100, label: '100'},
-            {value: 200, label: '200'},
-            {value: 400, label: '400'},
-            {value: 800, label: '800'},
-            {value: 1000, label: '1000'}
-        ];
-
-        $scope.maxPages = [
-            {label: 'Unlimited', value: 0},
-            {label: '1', value: 1},
-            {label: '5', value: 5},
-            {label: '10', value: 10},
-            {label: '20', value: 20},
-            {label: '50', value: 50},
-            {label: '100', value: 100}
-        ];
-
-        $scope.timeLineSpans = ['1', '5', '10', '15', '30'];
-
-        $scope.aggregateFxs = ['FIRST', 'LAST', 'MIN', 'MAX', 'SUM', 'AVG', 'COUNT'];
-
-        $scope.modes = LegacyUtils.mkOptions(['PARTITIONED', 'REPLICATED', 'LOCAL']);
-
-        $scope.loadingText = $root.IgniteDemoMode ? 'Demo grid is starting. Please wait...' : 'Loading query notebook screen...';
-
-        $scope.timeUnit = [
-            {value: 1000, label: 'seconds', short: 's'},
-            {value: 60000, label: 'minutes', short: 'm'},
-            {value: 3600000, label: 'hours', short: 'h'}
-        ];
-
-        $scope.metadata = [];
-
-        $scope.metaFilter = '';
-
-        $scope.metaOptions = {
-            nodeChildren: 'children',
-            dirSelectable: true,
-            injectClasses: {
-                iExpanded: 'fa fa-minus-square-o',
-                iCollapsed: 'fa fa-plus-square-o'
-            }
-        };
-
-        const maskCacheName = $filter('defaultName');
-
-        // We need max 1800 items to hold history for 30 mins in case of refresh every second.
-        const HISTORY_LENGTH = 1800;
-
-        const MAX_VAL_COLS = IgniteChartColors.length;
-
-        $anchorScroll.yOffset = 55;
-
-        $scope.chartColor = function(index) {
-            return {color: 'white', 'background-color': IgniteChartColors[index]};
-        };
-
-        function _chartNumber(arr, idx, dflt) {
-            if (idx >= 0 && arr && arr.length > idx && _.isNumber(arr[idx]))
-                return arr[idx];
-
-            return dflt;
-        }
-
-        function _min(rows, idx, dflt) {
-            let min = _chartNumber(rows[0], idx, dflt);
-
-            _.forEach(rows, (row) => {
-                const v = _chartNumber(row, idx, dflt);
-
-                if (v < min)
-                    min = v;
-            });
-
-            return min;
-        }
-
-        function _max(rows, idx, dflt) {
-            let max = _chartNumber(rows[0], idx, dflt);
-
-            _.forEach(rows, (row) => {
-                const v = _chartNumber(row, idx, dflt);
-
-                if (v > max)
-                    max = v;
-            });
-
-            return max;
-        }
-
-        function _sum(rows, idx) {
-            let sum = 0;
-
-            _.forEach(rows, (row) => sum += _chartNumber(row, idx, 0));
-
-            return sum;
-        }
-
-        function _aggregate(rows, aggFx, idx, dflt) {
-            const len = rows.length;
-
-            switch (aggFx) {
-                case 'FIRST':
-                    return _chartNumber(rows[0], idx, dflt);
-
-                case 'LAST':
-                    return _chartNumber(rows[len - 1], idx, dflt);
-
-                case 'MIN':
-                    return _min(rows, idx, dflt);
-
-                case 'MAX':
-                    return _max(rows, idx, dflt);
-
-                case 'SUM':
-                    return _sum(rows, idx);
-
-                case 'AVG':
-                    return len > 0 ? _sum(rows, idx) / len : 0;
-
-                case 'COUNT':
-                    return len;
-
-                default:
-            }
-
-            return 0;
-        }
-
-        function _chartLabel(arr, idx, dflt) {
-            if (arr && arr.length > idx && _.isString(arr[idx]))
-                return arr[idx];
-
-            return dflt;
-        }
-
-        function _chartDatum(paragraph) {
-            let datum = [];
-
-            if (paragraph.chartColumnsConfigured()) {
-                paragraph.chartValCols.forEach(function(valCol) {
-                    let index = 0;
-                    let values = [];
-                    const colIdx = valCol.value;
-
-                    if (paragraph.chartTimeLineEnabled()) {
-                        const aggFx = valCol.aggFx;
-                        const colLbl = valCol.label + ' [' + aggFx + ']';
-
-                        if (paragraph.charts && paragraph.charts.length === 1)
-                            datum = paragraph.charts[0].data;
-
-                        const chartData = _.find(datum, {series: valCol.label});
-
-                        const leftBound = new Date();
-                        leftBound.setMinutes(leftBound.getMinutes() - parseInt(paragraph.timeLineSpan, 10));
-
-                        if (chartData) {
-                            const lastItem = _.last(paragraph.chartHistory);
-
-                            values = chartData.values;
-
-                            values.push({
-                                x: lastItem.tm,
-                                y: _aggregate(lastItem.rows, aggFx, colIdx, index++)
-                            });
-
-                            while (values.length > 0 && values[0].x < leftBound)
-                                values.shift();
-                        }
-                        else {
-                            _.forEach(paragraph.chartHistory, (history) => {
-                                if (history.tm >= leftBound) {
-                                    values.push({
-                                        x: history.tm,
-                                        y: _aggregate(history.rows, aggFx, colIdx, index++)
-                                    });
-                                }
-                            });
-
-                            datum.push({series: valCol.label, key: colLbl, values});
-                        }
-                    }
-                    else {
-                        index = paragraph.total;
-
-                        values = _.map(paragraph.rows, function(row) {
-                            const xCol = paragraph.chartKeyCols[0].value;
-
-                            const v = {
-                                x: _chartNumber(row, xCol, index),
-                                xLbl: _chartLabel(row, xCol, null),
-                                y: _chartNumber(row, colIdx, index)
-                            };
-
-                            index++;
-
-                            return v;
-                        });
-
-                        datum.push({series: valCol.label, key: valCol.label, values});
-                    }
-                });
-            }
-
-            return datum;
-        }
-
-        function _xX(d) {
-            return d.x;
-        }
-
-        function _yY(d) {
-            return d.y;
-        }
-
-        function _xAxisTimeFormat(d) {
-            return d3.time.format('%X')(new Date(d));
-        }
-
-        const _intClasses = ['java.lang.Byte', 'java.lang.Integer', 'java.lang.Long', 'java.lang.Short'];
-
-        function _intType(cls) {
-            return _.includes(_intClasses, cls);
-        }
-
-        const _xAxisWithLabelFormat = function(paragraph) {
-            return function(d) {
-                const values = paragraph.charts[0].data[0].values;
-
-                const fmt = _intType(paragraph.chartKeyCols[0].type) ? 'd' : ',.2f';
-
-                const dx = values[d];
-
-                if (!dx)
-                    return d3.format(fmt)(d);
-
-                const lbl = dx.xLbl;
-
-                return lbl ? lbl : d3.format(fmt)(d);
-            };
-        };
-
-        function _xAxisLabel(paragraph) {
-            return _.isEmpty(paragraph.chartKeyCols) ? 'X' : paragraph.chartKeyCols[0].label;
-        }
-
-        const _yAxisFormat = function(d) {
-            const fmt = d < 1000 ? ',.2f' : '.3s';
-
-            return d3.format(fmt)(d);
-        };
-
-        function _updateCharts(paragraph) {
-            $timeout(() => _.forEach(paragraph.charts, (chart) => chart.api.update()), 100);
-        }
-
-        function _updateChartsWithData(paragraph, newDatum) {
-            $timeout(() => {
-                if (!paragraph.chartTimeLineEnabled()) {
-                    const chartDatum = paragraph.charts[0].data;
-
-                    chartDatum.length = 0;
-
-                    _.forEach(newDatum, (series) => chartDatum.push(series));
-                }
-
-                paragraph.charts[0].api.update();
-            });
-        }
-
-        function _yAxisLabel(paragraph) {
-            const cols = paragraph.chartValCols;
-
-            const tml = paragraph.chartTimeLineEnabled();
-
-            return _.isEmpty(cols) ? 'Y' : _.map(cols, function(col) {
-                let lbl = col.label;
-
-                if (tml)
-                    lbl += ' [' + col.aggFx + ']';
-
-                return lbl;
-            }).join(', ');
-        }
-
-        function _barChart(paragraph) {
-            const datum = _chartDatum(paragraph);
-
-            if (_.isEmpty(paragraph.charts)) {
-                const stacked = paragraph.chartsOptions && paragraph.chartsOptions.barChart
-                    ? paragraph.chartsOptions.barChart.stacked
-                    : true;
-
-                const options = {
-                    chart: {
-                        type: 'multiBarChart',
-                        height: 400,
-                        margin: {left: 70},
-                        duration: 0,
-                        x: _xX,
-                        y: _yY,
-                        xAxis: {
-                            axisLabel: _xAxisLabel(paragraph),
-                            tickFormat: paragraph.chartTimeLineEnabled() ? _xAxisTimeFormat : _xAxisWithLabelFormat(paragraph),
-                            showMaxMin: false
-                        },
-                        yAxis: {
-                            axisLabel: _yAxisLabel(paragraph),
-                            tickFormat: _yAxisFormat
-                        },
-                        color: IgniteChartColors,
-                        stacked,
-                        showControls: true,
-                        legend: {
-                            vers: 'furious',
-                            margin: {right: -15}
-                        }
-                    }
-                };
-
-                paragraph.charts = [{options, data: datum}];
-
-                _updateCharts(paragraph);
-            }
-            else
-                _updateChartsWithData(paragraph, datum);
-        }
-
-        function _pieChartDatum(paragraph) {
-            const datum = [];
-
-            if (paragraph.chartColumnsConfigured() && !paragraph.chartTimeLineEnabled()) {
-                paragraph.chartValCols.forEach(function(valCol) {
-                    let index = paragraph.total;
-
-                    const values = _.map(paragraph.rows, (row) => {
-                        const xCol = paragraph.chartKeyCols[0].value;
-
-                        const v = {
-                            x: xCol < 0 ? index : row[xCol],
-                            y: _chartNumber(row, valCol.value, index)
-                        };
-
-                        // Workaround for known problem with zero values on Pie chart.
-                        if (v.y === 0)
-                            v.y = 0.0001;
-
-                        index++;
-
-                        return v;
-                    });
-
-                    datum.push({series: paragraph.chartKeyCols[0].label, key: valCol.label, values});
-                });
-            }
-
-            return datum;
-        }
-
-        function _pieChart(paragraph) {
-            let datum = _pieChartDatum(paragraph);
-
-            if (datum.length === 0)
-                datum = [{values: []}];
-
-            paragraph.charts = _.map(datum, function(data) {
-                return {
-                    options: {
-                        chart: {
-                            type: 'pieChart',
-                            height: 400,
-                            duration: 0,
-                            x: _xX,
-                            y: _yY,
-                            showLabels: true,
-                            labelThreshold: 0.05,
-                            labelType: 'percent',
-                            donut: true,
-                            donutRatio: 0.35,
-                            legend: {
-                                vers: 'furious',
-                                margin: {right: -15}
-                            }
-                        },
-                        title: {
-                            enable: true,
-                            text: data.key
-                        }
-                    },
-                    data: data.values
-                };
-            });
-
-            _updateCharts(paragraph);
-        }
-
-        function _lineChart(paragraph) {
-            const datum = _chartDatum(paragraph);
-
-            if (_.isEmpty(paragraph.charts)) {
-                const options = {
-                    chart: {
-                        type: 'lineChart',
-                        height: 400,
-                        margin: { left: 70 },
-                        duration: 0,
-                        x: _xX,
-                        y: _yY,
-                        xAxis: {
-                            axisLabel: _xAxisLabel(paragraph),
-                            tickFormat: paragraph.chartTimeLineEnabled() ? _xAxisTimeFormat : _xAxisWithLabelFormat(paragraph),
-                            showMaxMin: false
-                        },
-                        yAxis: {
-                            axisLabel: _yAxisLabel(paragraph),
-                            tickFormat: _yAxisFormat
-                        },
-                        color: IgniteChartColors,
-                        useInteractiveGuideline: true,
-                        legend: {
-                            vers: 'furious',
-                            margin: {right: -15}
-                        }
-                    }
-                };
-
-                paragraph.charts = [{options, data: datum}];
-
-                _updateCharts(paragraph);
-            }
-            else
-                _updateChartsWithData(paragraph, datum);
-        }
-
-        function _areaChart(paragraph) {
-            const datum = _chartDatum(paragraph);
-
-            if (_.isEmpty(paragraph.charts)) {
-                const style = paragraph.chartsOptions && paragraph.chartsOptions.areaChart
-                    ? paragraph.chartsOptions.areaChart.style
-                    : 'stack';
-
-                const options = {
-                    chart: {
-                        type: 'stackedAreaChart',
-                        height: 400,
-                        margin: {left: 70},
-                        duration: 0,
-                        x: _xX,
-                        y: _yY,
-                        xAxis: {
-                            axisLabel: _xAxisLabel(paragraph),
-                            tickFormat: paragraph.chartTimeLineEnabled() ? _xAxisTimeFormat : _xAxisWithLabelFormat(paragraph),
-                            showMaxMin: false
-                        },
-                        yAxis: {
-                            axisLabel: _yAxisLabel(paragraph),
-                            tickFormat: _yAxisFormat
-                        },
-                        color: IgniteChartColors,
-                        style,
-                        legend: {
-                            vers: 'furious',
-                            margin: {right: -15}
-                        }
-                    }
-                };
-
-                paragraph.charts = [{options, data: datum}];
-
-                _updateCharts(paragraph);
-            }
-            else
-                _updateChartsWithData(paragraph, datum);
-        }
-
-        function _chartApplySettings(paragraph, resetCharts) {
-            if (resetCharts)
-                paragraph.charts = [];
-
-            if (paragraph.chart() && paragraph.nonEmpty()) {
-                switch (paragraph.result) {
-                    case 'bar':
-                        _barChart(paragraph);
-                        break;
-
-                    case 'pie':
-                        _pieChart(paragraph);
-                        break;
-
-                    case 'line':
-                        _lineChart(paragraph);
-                        break;
-
-                    case 'area':
-                        _areaChart(paragraph);
-                        break;
-
-                    default:
-                }
-            }
-        }
-
-        $scope.chartRemoveKeyColumn = function(paragraph, index) {
-            paragraph.chartKeyCols.splice(index, 1);
-
-            _chartApplySettings(paragraph, true);
-        };
-
-        $scope.chartRemoveValColumn = function(paragraph, index) {
-            paragraph.chartValCols.splice(index, 1);
-
-            _chartApplySettings(paragraph, true);
-        };
-
-        $scope.chartAcceptKeyColumn = function(paragraph, item) {
-            const accepted = _.findIndex(paragraph.chartKeyCols, item) < 0;
-
-            if (accepted) {
-                paragraph.chartKeyCols = [item];
-
-                _chartApplySettings(paragraph, true);
-            }
-
-            return false;
-        };
-
-        const _numberClasses = ['java.math.BigDecimal', 'java.lang.Byte', 'java.lang.Double',
-            'java.lang.Float', 'java.lang.Integer', 'java.lang.Long', 'java.lang.Short'];
-
-        const _numberType = function(cls) {
-            return _.includes(_numberClasses, cls);
-        };
-
-        $scope.chartAcceptValColumn = function(paragraph, item) {
-            const valCols = paragraph.chartValCols;
-
-            const accepted = _.findIndex(valCols, item) < 0 && item.value >= 0 && _numberType(item.type);
-
-            if (accepted) {
-                if (valCols.length === MAX_VAL_COLS - 1)
-                    valCols.shift();
-
-                valCols.push(item);
-
-                _chartApplySettings(paragraph, true);
-            }
-
-            return false;
-        };
-
-        $scope.scrollParagraphs = [];
-
-        $scope.rebuildScrollParagraphs = function() {
-            $scope.scrollParagraphs = $scope.notebook.paragraphs.map(function(paragraph) {
-                return {
-                    text: paragraph.name,
-                    click: 'scrollToParagraph("' + paragraph.id + '")'
-                };
-            });
-        };
-
-        $scope.scrollToParagraph = (id) => {
-            const idx = _.findIndex($scope.notebook.paragraphs, {id});
-
-            if (idx >= 0) {
-                if (!_.includes($scope.notebook.expandedParagraphs, idx))
-                    $scope.notebook.expandedParagraphs = $scope.notebook.expandedParagraphs.concat([idx]);
-
-                if ($scope.notebook.paragraphs[idx].ace)
-                    setTimeout(() => $scope.notebook.paragraphs[idx].ace.focus());
-            }
-
-            $location.hash(id);
-
-            $anchorScroll();
-        };
-
-        const _hideColumn = (col) => col.fieldName !== '_KEY' && col.fieldName !== '_VAL';
-
-        const _allColumn = () => true;
-
-        $scope.aceInit = function(paragraph) {
-            return function(editor) {
-                editor.setAutoScrollEditorIntoView(true);
-                editor.$blockScrolling = Infinity;
-
-                const renderer = editor.renderer;
-
-                renderer.setHighlightGutterLine(false);
-                renderer.setShowPrintMargin(false);
-                renderer.setOption('fontFamily', 'monospace');
-                renderer.setOption('fontSize', '14px');
-                renderer.setOption('minLines', '5');
-                renderer.setOption('maxLines', '15');
-
-                editor.setTheme('ace/theme/chrome');
-
-                Object.defineProperty(paragraph, 'ace', { value: editor });
-            };
-        };
-
-        /**
-         * Update caches list.
-         */
-        const _refreshCaches = () => {
-            return agentMgr.publicCacheNames()
-                .then((cacheNames) => {
-                    $scope.caches = _.sortBy(_.map(cacheNames, (name) => ({
-                        label: maskCacheName(name, true),
-                        value: name
-                    })), (cache) => cache.label.toLowerCase());
-
-                    _.forEach($scope.notebook.paragraphs, (paragraph) => {
-                        if (!_.includes(cacheNames, paragraph.cacheName))
-                            paragraph.cacheName = _.head(cacheNames);
-                    });
-
-                    // Await for demo caches.
-                    if (!$ctrl.demoStarted && $root.IgniteDemoMode && nonEmpty(cacheNames)) {
-                        $ctrl.demoStarted = true;
-
-                        Loading.finish('sqlLoading');
-
-                        _.forEach($scope.notebook.paragraphs, (paragraph) => $scope.execute(paragraph));
-                    }
-
-                    $scope.$applyAsync();
-                })
-                .catch((err) => Messages.showError(err));
-        };
-
-        const _startWatch = () => {
-            const awaitClusters$ = fromPromise(
-                agentMgr.startClusterWatch('Leave Queries', 'default-state'));
-
-            const finishLoading$ = defer(() => {
-                if (!$root.IgniteDemoMode)
-                    Loading.finish('sqlLoading');
-            }).take(1);
-
-            const refreshCaches = (period) => {
-                return timer(0, period).exhaustMap(() => _refreshCaches()).merge(finishLoading$);
-            };
-
-            this.refresh$ = awaitClusters$
-                .mergeMap(() => agentMgr.currentCluster$)
-                .do(() => Loading.start('sqlLoading'))
-                .do(() => {
-                    _.forEach($scope.notebook.paragraphs, (paragraph) => {
-                        paragraph.reset($interval);
-                    });
-                })
-                .switchMap(() => refreshCaches(5000))
-                .subscribe();
-        };
-
-        const _newParagraph = (paragraph) => {
-            return new Paragraph($animate, $timeout, JavaTypes, errorParser, paragraph);
-        };
-
-        Notebook.find($state.params.noteId)
-            .then((notebook) => {
-                $scope.notebook = _.cloneDeep(notebook);
-
-                $scope.notebook_name = $scope.notebook.name;
-
-                if (!$scope.notebook.expandedParagraphs)
-                    $scope.notebook.expandedParagraphs = [];
-
-                if (!$scope.notebook.paragraphs)
-                    $scope.notebook.paragraphs = [];
-
-                $scope.notebook.paragraphs = _.map($scope.notebook.paragraphs, (p) => _newParagraph(p));
-
-                if (_.isEmpty($scope.notebook.paragraphs))
-                    $scope.addQuery();
-                else
-                    $scope.rebuildScrollParagraphs();
-            })
-            .then(() => {
-                if ($root.IgniteDemoMode && sessionStorage.showDemoInfo !== 'true') {
-                    sessionStorage.showDemoInfo = 'true';
-
-                    this.DemoInfo.show().then(_startWatch);
-                } else
-                    _startWatch();
-            })
-            .catch(() => {
-                $scope.notebookLoadFailed = true;
-
-                Loading.finish('sqlLoading');
-            });
-
-        $scope.renameNotebook = (name) => {
-            if (!name)
-                return;
-
-            if ($scope.notebook.name !== name) {
-                const prevName = $scope.notebook.name;
-
-                $scope.notebook.name = name;
-
-                Notebook.save($scope.notebook)
-                    .then(() => $scope.notebook.edit = false)
-                    .catch((err) => {
-                        $scope.notebook.name = prevName;
-
-                        Messages.showError(err);
-                    });
-            }
-            else
-                $scope.notebook.edit = false;
-        };
-
-        $scope.removeNotebook = (notebook) => Notebook.remove(notebook);
-
-        $scope.renameParagraph = function(paragraph, newName) {
-            if (!newName)
-                return;
-
-            if (paragraph.name !== newName) {
-                paragraph.name = newName;
-
-                $scope.rebuildScrollParagraphs();
-
-                Notebook.save($scope.notebook)
-                    .then(() => paragraph.edit = false)
-                    .catch(Messages.showError);
-            }
-            else
-                paragraph.edit = false;
-        };
-
-        $scope.addParagraph = (paragraph, sz) => {
-            if ($scope.caches && $scope.caches.length > 0)
-                paragraph.cacheName = _.head($scope.caches).value;
-
-            $scope.notebook.paragraphs.push(paragraph);
-
-            $scope.notebook.expandedParagraphs.push(sz);
-
-            $scope.rebuildScrollParagraphs();
-
-            $location.hash(paragraph.id);
-        };
-
-        $scope.addQuery = function() {
-            const sz = $scope.notebook.paragraphs.length;
-
-            ActivitiesData.post({ group: 'sql', action: '/queries/add/query' });
-
-            const paragraph = _newParagraph({
-                name: 'Query' + (sz === 0 ? '' : sz),
-                query: '',
-                pageSize: $scope.pageSizesOptions[1].value,
-                timeLineSpan: $scope.timeLineSpans[0],
-                result: 'none',
-                rate: {
-                    value: 1,
-                    unit: 60000,
-                    installed: false
-                },
-                qryType: 'query',
-                lazy: true
-            });
-
-            $scope.addParagraph(paragraph, sz);
-
-            $timeout(() => {
-                $anchorScroll();
-
-                paragraph.ace.focus();
-            });
-        };
-
-        $scope.addScan = function() {
-            const sz = $scope.notebook.paragraphs.length;
-
-            ActivitiesData.post({ group: 'sql', action: '/queries/add/scan' });
-
-            const paragraph = _newParagraph({
-                name: 'Scan' + (sz === 0 ? '' : sz),
-                query: '',
-                pageSize: $scope.pageSizesOptions[1].value,
-                timeLineSpan: $scope.timeLineSpans[0],
-                result: 'none',
-                rate: {
-                    value: 1,
-                    unit: 60000,
-                    installed: false
-                },
-                qryType: 'scan'
-            });
-
-            $scope.addParagraph(paragraph, sz);
-        };
-
-        function _saveChartSettings(paragraph) {
-            if (!_.isEmpty(paragraph.charts)) {
-                const chart = paragraph.charts[0].api.getScope().chart;
-
-                if (!LegacyUtils.isDefined(paragraph.chartsOptions))
-                    paragraph.chartsOptions = {barChart: {stacked: true}, areaChart: {style: 'stack'}};
-
-                switch (paragraph.result) {
-                    case 'bar':
-                        paragraph.chartsOptions.barChart.stacked = chart.stacked();
-
-                        break;
-
-                    case 'area':
-                        paragraph.chartsOptions.areaChart.style = chart.style();
-
-                        break;
-
-                    default:
-                }
-            }
-        }
-
-        $scope.setResult = function(paragraph, new_result) {
-            if (paragraph.result === new_result)
-                return;
-
-            _saveChartSettings(paragraph);
-
-            paragraph.result = new_result;
-
-            if (paragraph.chart())
-                _chartApplySettings(paragraph, true);
-        };
-
-        $scope.resultEq = function(paragraph, result) {
-            return (paragraph.result === result);
-        };
-
-        $scope.removeParagraph = function(paragraph) {
-            Confirm.confirm('Are you sure you want to remove query: "' + paragraph.name + '"?')
-                .then(function() {
-                    $scope.stopRefresh(paragraph);
-
-                    const paragraph_idx = _.findIndex($scope.notebook.paragraphs, function(item) {
-                        return paragraph === item;
-                    });
-
-                    const panel_idx = _.findIndex($scope.expandedParagraphs, function(item) {
-                        return paragraph_idx === item;
-                    });
-
-                    if (panel_idx >= 0)
-                        $scope.expandedParagraphs.splice(panel_idx, 1);
-
-                    $scope.notebook.paragraphs.splice(paragraph_idx, 1);
-
-                    $scope.rebuildScrollParagraphs();
-
-                    Notebook.save($scope.notebook)
-                        .catch(Messages.showError);
-                });
-        };
-
-        $scope.paragraphExpanded = function(paragraph) {
-            const paragraph_idx = _.findIndex($scope.notebook.paragraphs, function(item) {
-                return paragraph === item;
-            });
-
-            const panel_idx = _.findIndex($scope.notebook.expandedParagraphs, function(item) {
-                return paragraph_idx === item;
-            });
-
-            return panel_idx >= 0;
-        };
-
-        const _columnFilter = function(paragraph) {
-            return paragraph.disabledSystemColumns || paragraph.systemColumns ? _allColumn : _hideColumn;
-        };
-
-        const _notObjectType = function(cls) {
-            return LegacyUtils.isJavaBuiltInClass(cls);
-        };
-
-        function _retainColumns(allCols, curCols, acceptableType, xAxis, unwantedCols) {
-            const retainedCols = [];
-
-            const availableCols = xAxis ? allCols : _.filter(allCols, function(col) {
-                return col.value >= 0;
-            });
-
-            if (availableCols.length > 0) {
-                curCols.forEach(function(curCol) {
-                    const col = _.find(availableCols, {label: curCol.label});
-
-                    if (col && acceptableType(col.type)) {
-                        col.aggFx = curCol.aggFx;
-
-                        retainedCols.push(col);
-                    }
-                });
-
-                // If nothing was restored, add first acceptable column.
-                if (_.isEmpty(retainedCols)) {
-                    let col;
-
-                    if (unwantedCols)
-                        col = _.find(availableCols, (avCol) => !_.find(unwantedCols, {label: avCol.label}) && acceptableType(avCol.type));
-
-                    if (!col)
-                        col = _.find(availableCols, (avCol) => acceptableType(avCol.type));
-
-                    if (col)
-                        retainedCols.push(col);
-                }
-            }
-
-            return retainedCols;
-        }
-
-        const _rebuildColumns = function(paragraph) {
-            _.forEach(_.groupBy(paragraph.meta, 'fieldName'), function(colsByName, fieldName) {
-                const colsByTypes = _.groupBy(colsByName, 'typeName');
-
-                const needType = _.keys(colsByTypes).length > 1;
-
-                _.forEach(colsByTypes, function(colsByType, typeName) {
-                    _.forEach(colsByType, function(col, ix) {
-                        col.fieldName = (needType && !LegacyUtils.isEmptyString(typeName) ? typeName + '.' : '') + fieldName + (ix > 0 ? ix : '');
-                    });
-                });
-            });
-
-            paragraph.gridOptions.rebuildColumns();
-
-            paragraph.chartColumns = _.reduce(paragraph.meta, (acc, col, idx) => {
-                if (_notObjectType(col.fieldTypeName)) {
-                    acc.push({
-                        label: col.fieldName,
-                        type: col.fieldTypeName,
-                        aggFx: $scope.aggregateFxs[0],
-                        value: idx.toString()
-                    });
-                }
-
-                return acc;
-            }, []);
-
-            if (paragraph.chartColumns.length > 0) {
-                paragraph.chartColumns.push(TIME_LINE);
-                paragraph.chartColumns.push(ROW_IDX);
-            }
-
-            // We could accept onl not object columns for X axis.
-            paragraph.chartKeyCols = _retainColumns(paragraph.chartColumns, paragraph.chartKeyCols, _notObjectType, true);
-
-            // We could accept only numeric columns for Y axis.
-            paragraph.chartValCols = _retainColumns(paragraph.chartColumns, paragraph.chartValCols, _numberType, false, paragraph.chartKeyCols);
-        };
-
-        $scope.toggleSystemColumns = function(paragraph) {
-            if (paragraph.disabledSystemColumns)
-                return;
-
-            paragraph.columnFilter = _columnFilter(paragraph);
-
-            paragraph.chartColumns = [];
-
-            _rebuildColumns(paragraph);
-        };
-
-        const _showLoading = (paragraph, enable) => paragraph.loading = enable;
-
-        /**
-         * @param {Object} paragraph Query
-         * @param {Boolean} clearChart Flag is need clear chart model.
-         * @param {{columns: Array, rows: Array, responseNodeId: String, queryId: int, hasMore: Boolean}} res Query results.
-         * @private
-         */
-        const _processQueryResult = (paragraph, clearChart, res) => {
-            const prevKeyCols = paragraph.chartKeyCols;
-            const prevValCols = paragraph.chartValCols;
-
-            if (!_.eq(paragraph.meta, res.columns)) {
-                paragraph.meta = [];
-
-                paragraph.chartColumns = [];
-
-                if (!LegacyUtils.isDefined(paragraph.chartKeyCols))
-                    paragraph.chartKeyCols = [];
-
-                if (!LegacyUtils.isDefined(paragraph.chartValCols))
-                    paragraph.chartValCols = [];
-
-                if (res.columns.length) {
-                    const _key = _.find(res.columns, {fieldName: '_KEY'});
-                    const _val = _.find(res.columns, {fieldName: '_VAL'});
-
-                    paragraph.disabledSystemColumns = !(_key && _val) ||
-                        (res.columns.length === 2 && _key && _val) ||
-                        (res.columns.length === 1 && (_key || _val));
-                }
-
-                paragraph.columnFilter = _columnFilter(paragraph);
-
-                paragraph.meta = res.columns;
-
-                _rebuildColumns(paragraph);
-            }
-
-            paragraph.page = 1;
-
-            paragraph.total = 0;
-
-            paragraph.duration = res.duration;
-
-            paragraph.queryId = res.hasMore ? res.queryId : null;
-
-            paragraph.resNodeId = res.responseNodeId;
-
-            paragraph.setError({message: ''});
-
-            // Prepare explain results for display in table.
-            if (paragraph.queryArgs.query && paragraph.queryArgs.query.startsWith('EXPLAIN') && res.rows) {
-                paragraph.rows = [];
-
-                res.rows.forEach((row, i) => {
-                    const line = res.rows.length - 1 === i ? row[0] : row[0] + '\n';
-
-                    line.replace(/\"/g, '').split('\n').forEach((ln) => paragraph.rows.push([ln]));
-                });
-            }
-            else
-                paragraph.rows = res.rows;
-
-            paragraph.gridOptions.adjustHeight(paragraph.rows.length);
-
-            const chartHistory = paragraph.chartHistory;
-
-            // Clear history on query change.
-            if (clearChart) {
-                chartHistory.length = 0;
-
-                _.forEach(paragraph.charts, (chart) => chart.data.length = 0);
-            }
-
-            // Add results to history.
-            chartHistory.push({tm: new Date(), rows: paragraph.rows});
-
-            // Keep history size no more than max length.
-            while (chartHistory.length > HISTORY_LENGTH)
-                chartHistory.shift();
-
-            _showLoading(paragraph, false);
-
-            if (_.isNil(paragraph.result) || paragraph.result === 'none' || paragraph.scanExplain())
-                paragraph.result = 'table';
-            else if (paragraph.chart()) {
-                let resetCharts = clearChart;
-
-                if (!resetCharts) {
-                    const curKeyCols = paragraph.chartKeyCols;
-                    const curValCols = paragraph.chartValCols;
-
-                    resetCharts = !prevKeyCols || !prevValCols ||
-                        prevKeyCols.length !== curKeyCols.length ||
-                        prevValCols.length !== curValCols.length;
-                }
-
-                _chartApplySettings(paragraph, resetCharts);
-            }
-        };
-
-        const _closeOldQuery = (paragraph) => {
-            const nid = paragraph.resNodeId;
-
-            if (paragraph.queryId && _.find($scope.caches, ({nodes}) => _.find(nodes, {nid: nid.toUpperCase()})))
-                return agentMgr.queryClose(nid, paragraph.queryId);
-
-            return $q.when();
-        };
-
-        /**
-         * @param {String} name Cache name.
-         * @param {Array.<String>} nids Cache name.
-         * @return {Promise<Array.<{nid: string, ip: string, version:string, gridName: string, os: string, client: boolean}>>}
-         */
-        const cacheNodesModel = (name, nids) => {
-            return agentMgr.topology(true)
-                .then((nodes) =>
-                    _.reduce(nodes, (acc, node) => {
-                        if (_.includes(nids, node.nodeId)) {
-                            acc.push({
-                                nid: node.nodeId.toUpperCase(),
-                                ip: _.head(node.attributes['org.apache.ignite.ips'].split(', ')),
-                                version: node.attributes['org.apache.ignite.build.ver'],
-                                gridName: node.attributes['org.apache.ignite.ignite.name'],
-                                os: `${node.attributes['os.name']} ${node.attributes['os.arch']} ${node.attributes['os.version']}`,
-                                client: node.attributes['org.apache.ignite.cache.client']
-                            });
-                        }
-
-                        return acc;
-                    }, [])
-                );
-        };
-
-        /**
-         * @param {string} name Cache name.
-         * @param {boolean} local Local query.
-         * @return {Promise<string>} Nid
-         */
-        const _chooseNode = (name, local) => {
-            if (_.isEmpty(name))
-                return Promise.resolve(null);
-
-            return agentMgr.cacheNodes(name)
-                .then((nids) => {
-                    if (local) {
-                        return cacheNodesModel(name, nids)
-                            .then((nodes) => Nodes.selectNode(nodes, name).catch(() => {}))
-                            .then((selectedNids) => _.head(selectedNids));
-                    }
-
-                    return nids[_.random(0, nids.length - 1)];
-                });
-        };
-
-        const _executeRefresh = (paragraph) => {
-            const args = paragraph.queryArgs;
-
-            agentMgr.awaitCluster()
-                .then(() => _closeOldQuery(paragraph))
-                .then(() => args.localNid || _chooseNode(args.cacheName, false))
-                .then((nid) => agentMgr.querySql(nid, args.cacheName, args.query, args.nonCollocatedJoins,
-                    args.enforceJoinOrder, false, !!args.localNid, args.pageSize, args.lazy, args.collocated))
-                .then((res) => _processQueryResult(paragraph, false, res))
-                .catch((err) => paragraph.setError(err));
-        };
-
-        const _tryStartRefresh = function(paragraph) {
-            _tryStopRefresh(paragraph);
-
-            if (_.get(paragraph, 'rate.installed') && paragraph.queryExecuted()) {
-                $scope.chartAcceptKeyColumn(paragraph, TIME_LINE);
-
-                _executeRefresh(paragraph);
-
-                const delay = paragraph.rate.value * paragraph.rate.unit;
-
-                paragraph.rate.stopTime = $interval(_executeRefresh, delay, 0, false, paragraph);
-            }
-        };
-
-        const addLimit = (query, limitSize) =>
-            `SELECT * FROM (
-            ${query} 
-            ) LIMIT ${limitSize}`;
-
-        $scope.nonCollocatedJoinsAvailable = () => {
-            return Version.since(this.agentMgr.clusterVersion, NON_COLLOCATED_JOINS_SINCE);
-        };
-
-        $scope.collocatedJoinsAvailable = () => {
-            return Version.since(this.agentMgr.clusterVersion, ...COLLOCATED_QUERY_SINCE);
-        };
-
-        $scope.enforceJoinOrderAvailable = () => {
-            return Version.since(this.agentMgr.clusterVersion, ...ENFORCE_JOIN_SINCE);
-        };
-
-        $scope.lazyQueryAvailable = () => {
-            return Version.since(this.agentMgr.clusterVersion, ...LAZY_QUERY_SINCE);
-        };
-
-        $scope.ddlAvailable = () => {
-            return Version.since(this.agentMgr.clusterVersion, ...DDL_SINCE);
-        };
-
-        $scope.cacheNameForSql = (paragraph) => {
-            return $scope.ddlAvailable() && !paragraph.useAsDefaultSchema ? null : paragraph.cacheName;
-        };
-
-        $scope.execute = (paragraph, local = false) => {
-            const nonCollocatedJoins = !!paragraph.nonCollocatedJoins;
-            const enforceJoinOrder = !!paragraph.enforceJoinOrder;
-            const lazy = !!paragraph.lazy;
-            const collocated = !!paragraph.collocated;
-
-            $scope.queryAvailable(paragraph) && _chooseNode(paragraph.cacheName, local)
-                .then((nid) => {
-                    // If we are executing only selected part of query then Notebook shouldn't be saved.
-                    if (!paragraph.partialQuery)
-                        Notebook.save($scope.notebook).catch(Messages.showError);
-
-                    paragraph.localQueryMode = local;
-                    paragraph.prevQuery = paragraph.queryArgs ? paragraph.queryArgs.query : paragraph.query;
-
-                    _showLoading(paragraph, true);
-
-                    return _closeOldQuery(paragraph)
-                        .then(() => {
-                            const query = paragraph.partialQuery || paragraph.query;
-
-                            const args = paragraph.queryArgs = {
-                                type: 'QUERY',
-                                cacheName: $scope.cacheNameForSql(paragraph),
-                                query,
-                                pageSize: paragraph.pageSize,
-                                maxPages: paragraph.maxPages,
-                                nonCollocatedJoins,
-                                enforceJoinOrder,
-                                localNid: local ? nid : null,
-                                lazy,
-                                collocated
-                            };
-
-                            ActivitiesData.post({ group: 'sql', action: '/queries/execute' });
-
-                            const qry = args.maxPages ? addLimit(args.query, args.pageSize * args.maxPages) : query;
-
-                            return agentMgr.querySql(nid, args.cacheName, qry, nonCollocatedJoins, enforceJoinOrder, false, local, args.pageSize, lazy, collocated);
-                        })
-                        .then((res) => {
-                            _processQueryResult(paragraph, true, res);
-
-                            _tryStartRefresh(paragraph);
-                        })
-                        .catch((err) => {
-                            paragraph.setError(err);
-
-                            _showLoading(paragraph, false);
-
-                            $scope.stopRefresh(paragraph);
-                        })
-                        .then(() => paragraph.ace.focus());
-                });
-        };
-
-        const _cancelRefresh = (paragraph) => {
-            if (paragraph.rate && paragraph.rate.stopTime) {
-                delete paragraph.queryArgs;
-
-                paragraph.rate.installed = false;
-
-                $interval.cancel(paragraph.rate.stopTime);
-
-                delete paragraph.rate.stopTime;
-            }
-        };
-
-        $scope.explain = (paragraph) => {
-            const nonCollocatedJoins = !!paragraph.nonCollocatedJoins;
-            const enforceJoinOrder = !!paragraph.enforceJoinOrder;
-            const collocated = !!paragraph.collocated;
-
-            if (!$scope.queryAvailable(paragraph))
-                return;
-
-            if (!paragraph.partialQuery)
-                Notebook.save($scope.notebook).catch(Messages.showError);
-
-            _cancelRefresh(paragraph);
-
-            _showLoading(paragraph, true);
-
-            _closeOldQuery(paragraph)
-                .then(() => _chooseNode(paragraph.cacheName, false))
-                .then((nid) => {
-                    const args = paragraph.queryArgs = {
-                        type: 'EXPLAIN',
-                        cacheName: $scope.cacheNameForSql(paragraph),
-                        query: 'EXPLAIN ' + (paragraph.partialQuery || paragraph.query),
-                        pageSize: paragraph.pageSize
-                    };
-
-                    ActivitiesData.post({ group: 'sql', action: '/queries/explain' });
-
-                    return agentMgr.querySql(nid, args.cacheName, args.query, nonCollocatedJoins, enforceJoinOrder, false, false, args.pageSize, false, collocated);
-                })
-                .then((res) => _processQueryResult(paragraph, true, res))
-                .catch((err) => {
-                    paragraph.setError(err);
-
-                    _showLoading(paragraph, false);
-                })
-                .then(() => paragraph.ace.focus());
-        };
-
-        $scope.scan = (paragraph, local = false) => {
-            const cacheName = paragraph.cacheName;
-            const caseSensitive = !!paragraph.caseSensitive;
-            const filter = paragraph.filter;
-            const pageSize = paragraph.pageSize;
-
-            $scope.scanAvailable(paragraph) && _chooseNode(cacheName, local)
-                .then((nid) => {
-                    paragraph.localQueryMode = local;
-                    paragraph.scanningInProgress = true;
-
-                    Notebook.save($scope.notebook)
-                        .catch(Messages.showError);
-
-                    _cancelRefresh(paragraph);
-
-                    _showLoading(paragraph, true);
-
-                    _closeOldQuery(paragraph)
-                        .then(() => {
-                            paragraph.queryArgs = {
-                                type: 'SCAN',
-                                cacheName,
-                                filter,
-                                regEx: false,
-                                caseSensitive,
-                                near: false,
-                                pageSize,
-                                localNid: local ? nid : null
-                            };
-
-                            ActivitiesData.post({ group: 'sql', action: '/queries/scan' });
-
-                            return agentMgr.queryScan(nid, cacheName, filter, false, caseSensitive, false, local, pageSize);
-                        })
-                        .then((res) => _processQueryResult(paragraph, true, res))
-                        .catch((err) => {
-                            paragraph.setError(err);
-
-                            _showLoading(paragraph, false);
-                        })
-                        .then(() => paragraph.scanningInProgress = false);
-                });
-        };
-
-        function _updatePieChartsWithData(paragraph, newDatum) {
-            $timeout(() => {
-                _.forEach(paragraph.charts, function(chart) {
-                    const chartDatum = chart.data;
-
-                    chartDatum.length = 0;
-
-                    _.forEach(newDatum, function(series) {
-                        if (chart.options.title.text === series.key)
-                            _.forEach(series.values, (v) => chartDatum.push(v));
-                    });
-                });
-
-                _.forEach(paragraph.charts, (chart) => chart.api.update());
-            });
-        }
-
-        $scope.nextPage = (paragraph) => {
-            _showLoading(paragraph, true);
-
-            paragraph.queryArgs.pageSize = paragraph.pageSize;
-
-            agentMgr.queryNextPage(paragraph.resNodeId, paragraph.queryId, paragraph.pageSize)
-                .then((res) => {
-                    paragraph.page++;
-
-                    paragraph.total += paragraph.rows.length;
-
-                    paragraph.duration = res.duration;
-
-                    paragraph.rows = res.rows;
-
-                    if (paragraph.chart()) {
-                        if (paragraph.result === 'pie')
-                            _updatePieChartsWithData(paragraph, _pieChartDatum(paragraph));
-                        else
-                            _updateChartsWithData(paragraph, _chartDatum(paragraph));
-                    }
-
-                    paragraph.gridOptions.adjustHeight(paragraph.rows.length);
-
-                    _showLoading(paragraph, false);
-
-                    if (!res.hasMore)
-                        delete paragraph.queryId;
-                })
-                .catch((err) => {
-                    paragraph.setError(err);
-
-                    _showLoading(paragraph, false);
-                })
-                .then(() => paragraph.ace && paragraph.ace.focus());
-        };
-
-        const _export = (fileName, columnDefs, meta, rows, toClipBoard = false) => {
-            const csvSeparator = this.CSV.getSeparator();
-            let csvContent = '';
-
-            const cols = [];
-            const excludedCols = [];
-
-            _.forEach(meta, (col, idx) => {
-                if (columnDefs[idx].visible)
-                    cols.push(_fullColName(col));
-                else
-                    excludedCols.push(idx);
-            });
-
-            csvContent += cols.join(csvSeparator) + '\n';
-
-            _.forEach(rows, (row) => {
-                cols.length = 0;
-
-                if (Array.isArray(row)) {
-                    _.forEach(row, (elem, idx) => {
-                        if (_.includes(excludedCols, idx))
-                            return;
-
-                        cols.push(_.isUndefined(elem) ? '' : JSON.stringify(elem));
-                    });
-                }
-                else {
-                    _.forEach(columnDefs, (col) => {
-                        if (col.visible) {
-                            const elem = row[col.fieldName];
-
-                            cols.push(_.isUndefined(elem) ? '' : JSON.stringify(elem));
-                        }
-                    });
-                }
-
-                csvContent += cols.join(csvSeparator) + '\n';
-            });
-
-            if (toClipBoard)
-                IgniteCopyToClipboard.copy(csvContent);
-            else
-                LegacyUtils.download('text/csv', fileName, csvContent);
-        };
-
-        /**
-         * Generate file name with query results.
-         *
-         * @param paragraph {Object} Query paragraph .
-         * @param all {Boolean} All result export flag.
-         * @returns {string}
-         */
-        const exportFileName = (paragraph, all) => {
-            const args = paragraph.queryArgs;
-
-            if (args.type === 'SCAN')
-                return `export-scan-${args.cacheName}-${paragraph.name}${all ? '-all' : ''}.csv`;
-
-            return `export-query-${paragraph.name}${all ? '-all' : ''}.csv`;
-        };
-
-        $scope.exportCsvToClipBoard = (paragraph) => {
-            _export(exportFileName(paragraph, false), paragraph.gridOptions.columnDefs, paragraph.meta, paragraph.rows, true);
-        };
-
-        $scope.exportCsv = function(paragraph) {
-            _export(exportFileName(paragraph, false), paragraph.gridOptions.columnDefs, paragraph.meta, paragraph.rows);
-
-            // paragraph.gridOptions.api.exporter.csvExport(uiGridExporterConstants.ALL, uiGridExporterConstants.VISIBLE);
-        };
-
-        $scope.exportPdf = function(paragraph) {
-            paragraph.gridOptions.api.exporter.pdfExport(uiGridExporterConstants.ALL, uiGridExporterConstants.VISIBLE);
-        };
-
-        $scope.exportCsvAll = (paragraph) => {
-            paragraph.csvIsPreparing = true;
-
-            const args = paragraph.queryArgs;
-
-            return Promise.resolve(args.localNid || _chooseNode(args.cacheName, false))
-                .then((nid) => args.type === 'SCAN'
-                    ? agentMgr.queryScanGetAll(nid, args.cacheName, args.query, !!args.regEx, !!args.caseSensitive, !!args.near, !!args.localNid)
-                    : agentMgr.querySqlGetAll(nid, args.cacheName, args.query, !!args.nonCollocatedJoins, !!args.enforceJoinOrder, false, !!args.localNid, !!args.lazy, !!args.collocated))
-                .then((res) => _export(exportFileName(paragraph, true), paragraph.gridOptions.columnDefs, res.columns, res.rows))
-                .catch(Messages.showError)
-                .then(() => {
-                    paragraph.csvIsPreparing = false;
-
-                    return paragraph.ace && paragraph.ace.focus();
-                });
-        };
-
-        // $scope.exportPdfAll = function(paragraph) {
-        //    $http.post('/api/v1/agent/query/getAll', {query: paragraph.query, cacheName: paragraph.cacheName})
-        //    .then(({data}) {
-        //        _export(paragraph.name + '-all.csv', data.meta, data.rows);
-        //    })
-        //    .catch(Messages.showError);
-        // };
-
-        $scope.rateAsString = function(paragraph) {
-            if (paragraph.rate && paragraph.rate.installed) {
-                const idx = _.findIndex($scope.timeUnit, function(unit) {
-                    return unit.value === paragraph.rate.unit;
-                });
-
-                if (idx >= 0)
-                    return ' ' + paragraph.rate.value + $scope.timeUnit[idx].short;
-
-                paragraph.rate.installed = false;
-            }
-
-            return '';
-        };
-
-        $scope.startRefresh = function(paragraph, value, unit) {
-            paragraph.rate.value = value;
-            paragraph.rate.unit = unit;
-            paragraph.rate.installed = true;
-
-            if (paragraph.queryExecuted() && !paragraph.scanExplain())
-                _tryStartRefresh(paragraph);
-        };
-
-        $scope.stopRefresh = function(paragraph) {
-            paragraph.rate.installed = false;
-
-            _tryStopRefresh(paragraph);
-        };
-
-        $scope.paragraphTimeSpanVisible = function(paragraph) {
-            return paragraph.timeLineSupported() && paragraph.chartTimeLineEnabled();
-        };
-
-        $scope.paragraphTimeLineSpan = function(paragraph) {
-            if (paragraph && paragraph.timeLineSpan)
-                return paragraph.timeLineSpan.toString();
-
-            return '1';
-        };
-
-        $scope.applyChartSettings = function(paragraph) {
-            _chartApplySettings(paragraph, true);
-        };
-
-        $scope.queryAvailable = function(paragraph) {
-            return paragraph.query && !paragraph.loading;
-        };
-
-        $scope.queryTooltip = function(paragraph, action) {
-            if ($scope.queryAvailable(paragraph))
-                return;
-
-            if (paragraph.loading)
-                return 'Waiting for server response';
-
-            return 'Input text to ' + action;
-        };
-
-        $scope.scanAvailable = function(paragraph) {
-            return $scope.caches.length && !(paragraph.loading || paragraph.csvIsPreparing);
-        };
-
-        $scope.scanTooltip = function(paragraph) {
-            if ($scope.scanAvailable(paragraph))
-                return;
-
-            if (paragraph.loading)
-                return 'Waiting for server response';
-
-            return 'Select cache to export scan results';
-        };
-
-        $scope.clickableMetadata = function(node) {
-            return node.type.slice(0, 5) !== 'index';
-        };
-
-        $scope.dblclickMetadata = function(paragraph, node) {
-            paragraph.ace.insert(node.name);
-
-            setTimeout(() => paragraph.ace.focus(), 1);
-        };
-
-        $scope.importMetadata = function() {
-            Loading.start('loadingCacheMetadata');
-
-            $scope.metadata = [];
-
-            agentMgr.metadata()
-                .then((metadata) => {
-                    $scope.metadata = _.sortBy(_.filter(metadata, (meta) => {
-                        const cache = _.find($scope.caches, { value: meta.cacheName });
-
-                        if (cache) {
-                            meta.name = (cache.sqlSchema || '"' + meta.cacheName + '"') + '.' + meta.typeName;
-                            meta.displayName = (cache.sqlSchema || meta.maskedName) + '.' + meta.typeName;
-
-                            if (cache.sqlSchema)
-                                meta.children.unshift({type: 'plain', name: 'cacheName: ' + meta.maskedName, maskedName: meta.maskedName});
-
-                            meta.children.unshift({type: 'plain', name: 'mode: ' + cache.mode, maskedName: meta.maskedName});
-                        }
-
-                        return cache;
-                    }), 'name');
-                })
-                .catch(Messages.showError)
-                .then(() => Loading.finish('loadingCacheMetadata'));
-        };
-
-        $scope.showResultQuery = function(paragraph) {
-            if (!_.isNil(paragraph)) {
-                const scope = $scope.$new();
-
-                if (paragraph.queryArgs.type === 'SCAN') {
-                    scope.title = 'SCAN query';
-
-                    const filter = paragraph.queryArgs.filter;
-
-                    if (_.isEmpty(filter))
-                        scope.content = [`SCAN query for cache: <b>${maskCacheName(paragraph.queryArgs.cacheName, true)}</b>`];
-                    else
-                        scope.content = [`SCAN query for cache: <b>${maskCacheName(paragraph.queryArgs.cacheName, true)}</b> with filter: <b>${filter}</b>`];
-                }
-                else if (paragraph.queryArgs.query .startsWith('EXPLAIN ')) {
-                    scope.title = 'Explain query';
-                    scope.content = paragraph.queryArgs.query.split(/\r?\n/);
-                }
-                else {
-                    scope.title = 'SQL query';
-                    scope.content = paragraph.queryArgs.query.split(/\r?\n/);
-                }
-
-                // Attach duration and selected node info
-                scope.meta = `Duration: ${$filter('duration')(paragraph.duration)}.`;
-                scope.meta += paragraph.localQueryMode ? ` Node ID8: ${id8(paragraph.resNodeId)}` : '';
-
-                // Show a basic modal from a controller
-                $modal({scope, templateUrl: messageTemplateUrl, show: true});
-            }
-        };
-
-        $scope.showStackTrace = function(paragraph) {
-            if (!_.isNil(paragraph)) {
-                const scope = $scope.$new();
-
-                scope.title = 'Error details';
-                scope.content = [];
-
-                const tab = '&nbsp;&nbsp;&nbsp;&nbsp;';
-
-                const addToTrace = (item) => {
-                    if (nonNil(item)) {
-                        scope.content.push((scope.content.length > 0 ? tab : '') + errorParser.extractFullMessage(item));
-
-                        addToTrace(item.cause);
-
-                        _.forEach(item.suppressed, (sup) => addToTrace(sup));
-                    }
-                };
-
-                addToTrace(paragraph.error.root);
-
-                // Show a basic modal from a controller
-                $modal({scope, templateUrl: messageTemplateUrl, show: true});
-            }
-        };
-    }
-
-    $onDestroy() {
-        if (this.refresh$)
-            this.refresh$.unsubscribe();
-    }
-}


[25/37] ignite git commit: IGNITE-7993 Striped pool cannot be disabled (updated javadoc) - Fixes #5596.

Posted by ak...@apache.org.
IGNITE-7993 Striped pool cannot be disabled (updated javadoc) - Fixes #5596.

Signed-off-by: Ilya Kasnacheev <il...@gmail.com>


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

Branch: refs/heads/ignite-10189
Commit: 57ccf9b79e01404e18d25c202bfab4462b01cd9e
Parents: 3fb68f7
Author: Roman Guseinov <gr...@gmail.com>
Authored: Fri Dec 7 13:21:41 2018 +0300
Committer: Ilya Kasnacheev <il...@gmail.com>
Committed: Fri Dec 7 13:21:41 2018 +0300

----------------------------------------------------------------------
 .../ignite/configuration/IgniteConfiguration.java       | 12 ++----------
 .../visor/node/VisorExecutorServiceConfiguration.java   |  4 +---
 2 files changed, 3 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/57ccf9b7/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java b/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
index 6ece0e4..9498c5b 100644
--- a/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
@@ -839,13 +839,9 @@ public class IgniteConfiguration {
      * Returns striped pool size that should be used for cache requests
      * processing.
      * <p>
-     * If set to non-positive value then requests get processed in system pool.
-     * <p>
      * Striped pool is better for typical cache operations.
      *
-     * @return Positive value if striped pool should be initialized
-     *      with configured number of threads (stripes) and used for requests processing
-     *      or non-positive value to process requests in system pool.
+     * @return The number of threads (stripes) to be used for requests processing.
      *
      * @see #getPublicThreadPoolSize()
      * @see #getSystemThreadPoolSize()
@@ -858,13 +854,9 @@ public class IgniteConfiguration {
      * Sets striped pool size that should be used for cache requests
      * processing.
      * <p>
-     * If set to non-positive value then requests get processed in system pool.
-     * <p>
      * Striped pool is better for typical cache operations.
      *
-     * @param stripedPoolSize Positive value if striped pool should be initialized
-     *      with passed in number of threads (stripes) and used for requests processing
-     *      or non-positive value to process requests in system pool.
+     * @param stripedPoolSize The number of threads (stripes) to be used for requests processing.
      * @return {@code this} for chaining.
      *
      * @see #getPublicThreadPoolSize()

http://git-wip-us.apache.org/repos/asf/ignite/blob/57ccf9b7/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorExecutorServiceConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorExecutorServiceConfiguration.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorExecutorServiceConfiguration.java
index bf2572b..b77c979 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorExecutorServiceConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorExecutorServiceConfiguration.java
@@ -191,9 +191,7 @@ public class VisorExecutorServiceConfiguration extends VisorDataTransferObject {
     }
 
     /**
-     * @return Positive value if striped pool should be initialized
-     *      with configured number of threads (stripes) and used for requests processing
-     *      or non-positive value to process requests in system pool.
+     * @return The number of threads (stripes) to be used for requests processing.
      */
     public int getStripedPoolSize() {
         return stripedPoolSize;


[18/37] ignite git commit: IGNITE-10242 Pause ongoing rebalance on cache group stopping

Posted by ak...@apache.org.
IGNITE-10242 Pause ongoing rebalance on cache group stopping

Signed-off-by: Pavel Kovalenko <jo...@gmail.com>


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

Branch: refs/heads/ignite-10189
Commit: 025a0360c86a5ceb8c3eef2f514c29846081d4c2
Parents: 9199aac
Author: Ivan Daschinskiy <iv...@gmail.com>
Authored: Thu Dec 6 18:51:24 2018 +0300
Committer: Pavel Kovalenko <jo...@gmail.com>
Committed: Thu Dec 6 18:51:24 2018 +0300

----------------------------------------------------------------------
 .../GridCachePartitionExchangeManager.java      |   4 +-
 .../processors/cache/GridCachePreloader.java    |  10 +
 .../cache/GridCachePreloaderAdapter.java        |  10 +
 .../processors/cache/GridCacheProcessor.java    | 106 ++++---
 .../dht/preloader/GridDhtPartitionDemander.java |   3 +
 .../GridDhtPartitionSupplyMessage.java          |   3 +
 .../GridDhtPartitionsExchangeFuture.java        |   8 +-
 .../preloader/GridDhtPartitionsFullMessage.java |   5 +-
 .../dht/preloader/GridDhtPreloader.java         |  51 +++-
 .../ignite/internal/util/IgniteUtils.java       |  66 +++++
 ...balanceOnCachesStoppingOrDestroyingTest.java | 279 +++++++++++++++++++
 .../ignite/testsuites/IgnitePdsTestSuite4.java  |   3 +
 12 files changed, 498 insertions(+), 50 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/025a0360/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 6dad367..0a0e709 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
@@ -437,9 +437,11 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
 
                                     return;
                                 }
+                                else
+                                    U.error(log, "Unsupported message type: " + m.getClass().getName());
                             }
 
-                            U.error(log, "Unsupported message type: " + m.getClass().getName());
+                            U.warn(log, "Cache group with id=" + m.groupId() + " is stopped or absent");
                         }
                         finally {
                             leaveBusy();

http://git-wip-us.apache.org/repos/asf/ignite/blob/025a0360/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePreloader.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePreloader.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePreloader.java
index d629e94..6ac26c9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePreloader.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePreloader.java
@@ -192,4 +192,14 @@ public interface GridCachePreloader {
      * Dumps debug information.
      */
     public void dumpDebugInfo();
+
+    /**
+     *  Pause preloader.
+     */
+    public void pause();
+
+    /**
+     * Resume preloader.
+     */
+    public void resume();
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/025a0360/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePreloaderAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePreloaderAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePreloaderAdapter.java
index c5e4a81..f16305c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePreloaderAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePreloaderAdapter.java
@@ -181,4 +181,14 @@ public class GridCachePreloaderAdapter implements GridCachePreloader {
     @Override public void dumpDebugInfo() {
         // No-op.
     }
+
+    /** {@inheritDoc} */
+    @Override public void pause() {
+        // No-op
+    }
+
+    /** {@inheritDoc} */
+    @Override public void resume() {
+        // No-op
+    }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/025a0360/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 b49c697..375dd12 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
@@ -73,6 +73,7 @@ import org.apache.ignite.internal.IgniteTransactionsEx;
 import org.apache.ignite.internal.binary.BinaryContext;
 import org.apache.ignite.internal.binary.BinaryMarshaller;
 import org.apache.ignite.internal.binary.GridBinaryMarshaller;
+import org.apache.ignite.internal.managers.communication.GridIoPolicy;
 import org.apache.ignite.internal.managers.discovery.DiscoveryCustomMessage;
 import org.apache.ignite.internal.pagemem.store.IgnitePageStoreManager;
 import org.apache.ignite.internal.pagemem.wal.IgniteWriteAheadLogManager;
@@ -2113,10 +2114,8 @@ public class GridCacheProcessor extends GridProcessorAdapter {
         else {
             Map<StartCacheInfo, GridCacheContext> cacheContexts = new ConcurrentHashMap<>();
 
-            int parallelismLvl = sharedCtx.kernalContext().config().getSystemThreadPoolSize();
-
             // Reserve at least 2 threads for system operations.
-            parallelismLvl = Math.max(1, parallelismLvl - 2);
+            int parallelismLvl = U.availableThreadCount(ctx, GridIoPolicy.SYSTEM_POOL, 2);
 
             doInParallel(
                 parallelismLvl,
@@ -2908,7 +2907,9 @@ public class GridCacheProcessor extends GridProcessorAdapter {
      * @param exchActions Change requests.
      */
     private void processCacheStopRequestOnExchangeDone(ExchangeActions exchActions) {
-        // Force checkpoint if there is any cache stop request
+        // Reserve at least 2 threads for system operations.
+        int parallelismLvl = U.availableThreadCount(ctx, GridIoPolicy.SYSTEM_POOL, 2);
+
         if (!exchActions.cacheStopRequests().isEmpty()) {
             try {
                 sharedCtx.database().waitForCheckpoint("caches stop");
@@ -2918,63 +2919,88 @@ public class GridCacheProcessor extends GridProcessorAdapter {
             }
         }
 
-        for (ExchangeActions.CacheActionData action : exchActions.cacheStopRequests()) {
-            CacheGroupContext gctx = cacheGrps.get(action.descriptor().groupId());
+        List<IgniteBiTuple<CacheGroupContext, Boolean>> grpToStop = exchActions.cacheGroupsToStop().stream()
+                .filter(a -> cacheGrps.containsKey(a.descriptor().groupId()))
+                .map(a -> F.t(cacheGrps.get(a.descriptor().groupId()), a.destroy()))
+                .collect(Collectors.toList());
 
-            // Cancel all operations blocking gateway
-            if (gctx != null) {
-                final String msg = "Failed to wait for topology update, cache group is stopping.";
+        Map<Integer, List<ExchangeActions.CacheActionData>> cachesToStop = exchActions.cacheStopRequests().stream()
+                .collect(Collectors.groupingBy(action -> action.descriptor().groupId()));
 
-                // If snapshot operation in progress we must throw CacheStoppedException
-                // for correct cache proxy restart. For more details see
-                // IgniteCacheProxy.cacheException()
-                gctx.affinity().cancelFutures(new CacheStoppedException(msg));
-            }
+        try {
+            doInParallel(
+                    parallelismLvl,
+                    sharedCtx.kernalContext().getSystemExecutorService(),
+                    cachesToStop.entrySet(),
+                    cachesToStopByGrp -> {
+                        CacheGroupContext gctx = cacheGrps.get(cachesToStopByGrp.getKey());
 
-            stopGateway(action.request());
+                        if (gctx != null)
+                            gctx.preloader().pause();
 
-            sharedCtx.database().checkpointReadLock();
+                        try {
 
-            try {
-                prepareCacheStop(action.request().cacheName(), action.request().destroy());
-            }
-            finally {
-                sharedCtx.database().checkpointReadUnlock();
-            }
+                            if (gctx != null) {
+                                final String msg = "Failed to wait for topology update, cache group is stopping.";
+
+                                // If snapshot operation in progress we must throw CacheStoppedException
+                                // for correct cache proxy restart. For more details see
+                                // IgniteCacheProxy.cacheException()
+                                gctx.affinity().cancelFutures(new CacheStoppedException(msg));
+                            }
+
+                            for (ExchangeActions.CacheActionData action: cachesToStopByGrp.getValue()) {
+                                stopGateway(action.request());
+
+                                sharedCtx.database().checkpointReadLock();
+
+                                try {
+                                    prepareCacheStop(action.request().cacheName(), action.request().destroy());
+                                }
+                                finally {
+                                    sharedCtx.database().checkpointReadUnlock();
+                                }
+                            }
+                        }
+                        finally {
+                            if (gctx != null)
+                                gctx.preloader().resume();
+                        }
+
+                        return null;
+                    }
+            );
+        }
+        catch (IgniteCheckedException e) {
+            String msg = "Failed to stop caches";
+
+            log.error(msg, e);
+
+            throw new IgniteException(msg, e);
         }
 
         sharedCtx.database().checkpointReadLock();
 
         try {
             // Do not invoke checkpoint listeners for groups are going to be destroyed to prevent metadata corruption.
-            for (ExchangeActions.CacheGroupActionData action : exchActions.cacheGroupsToStop()) {
-                Integer groupId = action.descriptor().groupId();
-                CacheGroupContext grp = cacheGrps.get(groupId);
+            grpToStop.forEach(grp -> {
+                CacheGroupContext gctx = grp.getKey();
 
-                if (grp != null && grp.persistenceEnabled() && sharedCtx.database() instanceof GridCacheDatabaseSharedManager) {
+                if (gctx != null && gctx.persistenceEnabled() && sharedCtx.database() instanceof GridCacheDatabaseSharedManager) {
                     GridCacheDatabaseSharedManager mngr = (GridCacheDatabaseSharedManager)sharedCtx.database();
-                    mngr.removeCheckpointListener((DbCheckpointListener)grp.offheap());
+                    mngr.removeCheckpointListener((DbCheckpointListener)gctx.offheap());
                 }
-            }
+            });
         }
         finally {
             sharedCtx.database().checkpointReadUnlock();
         }
 
-        List<IgniteBiTuple<CacheGroupContext, Boolean>> stoppedGroups = new ArrayList<>();
-
-        for (ExchangeActions.CacheGroupActionData action : exchActions.cacheGroupsToStop()) {
-            Integer groupId = action.descriptor().groupId();
-
-            if (cacheGrps.containsKey(groupId)) {
-                stoppedGroups.add(F.t(cacheGrps.get(groupId), action.destroy()));
-
-                stopCacheGroup(groupId);
-            }
-        }
+        for (IgniteBiTuple<CacheGroupContext, Boolean> grp : grpToStop)
+            stopCacheGroup(grp.get1().groupId());
 
         if (!sharedCtx.kernalContext().clientNode())
-            sharedCtx.database().onCacheGroupsStopped(stoppedGroups);
+            sharedCtx.database().onCacheGroupsStopped(grpToStop);
 
         if (exchActions.deactivate())
             sharedCtx.deactivate();

http://git-wip-us.apache.org/repos/asf/ignite/blob/025a0360/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
index a75fae7..ddbb3b1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
@@ -906,6 +906,9 @@ public class GridDhtPartitionDemander {
             try {
                 GridCacheContext cctx = grp.sharedGroup() ? ctx.cacheContext(entry.cacheId()) : grp.singleCacheContext();
 
+                if (cctx == null)
+                    return true;
+
                 if (cctx.isNear())
                     cctx = cctx.dhtCache().context();
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/025a0360/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplyMessage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplyMessage.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplyMessage.java
index 3034fb9..7e281e5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplyMessage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplyMessage.java
@@ -249,6 +249,9 @@ public class GridDhtPartitionSupplyMessage extends GridCacheGroupIdMessage imple
 
         CacheGroupContext grp = ctx.cache().cacheGroup(grpId);
 
+        if (grp == null)
+            return;
+
         for (CacheEntryInfoCollection col : infos().values()) {
             List<GridCacheEntryInfo> entries = col.infos();
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/025a0360/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
index ffc55a9..89e03a2 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
@@ -3533,10 +3533,8 @@ public class GridDhtPartitionsExchangeFuture extends GridDhtTopologyFutureAdapte
      * failed to send update counter deltas to backup.
      */
     private void finalizePartitionCounters() {
-        int parallelismLvl = cctx.kernalContext().config().getSystemThreadPoolSize();
-
         // Reserve at least 2 threads for system operations.
-        parallelismLvl = Math.max(1, parallelismLvl - 2);
+        int parallelismLvl = U.availableThreadCount(cctx.kernalContext(), GridIoPolicy.SYSTEM_POOL, 2);
 
         long time = System.currentTimeMillis();
 
@@ -3965,10 +3963,8 @@ public class GridDhtPartitionsExchangeFuture extends GridDhtTopologyFutureAdapte
 
         long time = System.currentTimeMillis();
 
-        int parallelismLvl = cctx.kernalContext().config().getSystemThreadPoolSize();
-
         // Reserve at least 2 threads for system operations.
-        parallelismLvl = Math.max(1, parallelismLvl - 2);
+        int parallelismLvl = U.availableThreadCount(cctx.kernalContext(), GridIoPolicy.SYSTEM_POOL, 2);
 
         try {
             doInParallel(

http://git-wip-us.apache.org/repos/asf/ignite/blob/025a0360/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsFullMessage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsFullMessage.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsFullMessage.java
index fbaa241..a2cecb8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsFullMessage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsFullMessage.java
@@ -31,6 +31,7 @@ import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.internal.GridDirectMap;
 import org.apache.ignite.internal.GridDirectTransient;
+import org.apache.ignite.internal.managers.communication.GridIoPolicy;
 import org.apache.ignite.internal.managers.discovery.GridDiscoveryManager;
 import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
 import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
@@ -415,7 +416,7 @@ public class GridDhtPartitionsFullMessage extends GridDhtPartitionsAbstractMessa
 
         if (marshal) {
             // Reserve at least 2 threads for system operations.
-            int parallelismLvl = Math.max(1, ctx.kernalContext().config().getSystemThreadPoolSize() - 2);
+            int parallelismLvl = U.availableThreadCount(ctx.kernalContext(), GridIoPolicy.SYSTEM_POOL, 2);
 
             Collection<Object> objectsToMarshall = new ArrayList<>();
 
@@ -509,7 +510,7 @@ public class GridDhtPartitionsFullMessage extends GridDhtPartitionsAbstractMessa
         Collection<byte[]> objectsToUnmarshall = new ArrayList<>();
 
         // Reserve at least 2 threads for system operations.
-        int parallelismLvl = Math.max(1, ctx.kernalContext().config().getSystemThreadPoolSize() - 2);
+        int parallelismLvl = U.availableThreadCount(ctx.kernalContext(), GridIoPolicy.SYSTEM_POOL, 2);
 
         if (partsBytes != null && parts == null)
             objectsToUnmarshall.add(partsBytes);

http://git-wip-us.apache.org/repos/asf/ignite/blob/025a0360/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java
index c8705d0..e92a240 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java
@@ -20,13 +20,16 @@ package org.apache.ignite.internal.processors.cache.distributed.dht.preloader;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
+import java.util.Queue;
 import java.util.UUID;
+import java.util.concurrent.ConcurrentLinkedQueue;
 import java.util.concurrent.locks.ReadWriteLock;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.internal.IgniteInternalFuture;
 import org.apache.ignite.internal.NodeStoppingException;
+import org.apache.ignite.internal.managers.communication.GridIoPolicy;
 import org.apache.ignite.internal.processors.affinity.AffinityAssignment;
 import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
 import org.apache.ignite.internal.processors.cache.CacheGroupContext;
@@ -42,7 +45,9 @@ import org.apache.ignite.internal.util.future.GridCompoundFuture;
 import org.apache.ignite.internal.util.future.GridFinishedFuture;
 import org.apache.ignite.internal.util.future.GridFutureAdapter;
 import org.apache.ignite.internal.util.lang.GridPlainRunnable;
+import org.apache.ignite.internal.util.lang.GridTuple3;
 import org.apache.ignite.internal.util.typedef.CI1;
+import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.lang.IgnitePredicate;
 import org.jetbrains.annotations.Nullable;
 
@@ -80,6 +85,12 @@ public class GridDhtPreloader extends GridCachePreloaderAdapter {
     private final ReadWriteLock demandLock = new ReentrantReadWriteLock();
 
     /** */
+    private boolean paused;
+
+    /** */
+    private Queue<GridTuple3<Integer, UUID, GridDhtPartitionSupplyMessage>> pausedDemanderQueue = new ConcurrentLinkedQueue<>();
+
+    /** */
     private boolean stopped;
 
     /**
@@ -357,7 +368,10 @@ public class GridDhtPreloader extends GridCachePreloaderAdapter {
             demandLock.readLock().lock();
 
             try {
-                demander.handleSupplyMessage(idx, id, s);
+                if (paused)
+                    pausedDemanderQueue.add(F.t(idx, id, s));
+                else
+                    demander.handleSupplyMessage(idx, id, s);
             }
             finally {
                 demandLock.readLock().unlock();
@@ -562,6 +576,41 @@ public class GridDhtPreloader extends GridCachePreloaderAdapter {
     }
 
     /** {@inheritDoc} */
+    @Override public void pause() {
+        demandLock.writeLock().lock();
+
+        try {
+            paused = true;
+        }
+        finally {
+           demandLock.writeLock().unlock();
+        }
+    }
+
+    /** {@inheritDoc} */
+    @Override public void resume() {
+        demandLock.writeLock().lock();
+
+        try {
+            final List<GridTuple3<Integer, UUID, GridDhtPartitionSupplyMessage>> msgToProc =
+                    new ArrayList<>(pausedDemanderQueue);
+
+            pausedDemanderQueue.clear();
+
+            final GridDhtPreloader preloader = this;
+
+            ctx.kernalContext().closure().runLocalSafe(() -> msgToProc.forEach(
+                    m -> preloader.handleSupplyMessage(m.get1(), m.get2(), m.get3())
+            ), GridIoPolicy.SYSTEM_POOL);
+
+            paused = false;
+        }
+        finally {
+            demandLock.writeLock().unlock();
+        }
+    }
+
+    /** {@inheritDoc} */
     @Override public void dumpDebugInfo() {
         // No-op
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/025a0360/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
index 946378d..6da5c6e 100755
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
@@ -55,6 +55,7 @@ import org.apache.ignite.internal.compute.ComputeTaskCancelledCheckedException;
 import org.apache.ignite.internal.compute.ComputeTaskTimeoutCheckedException;
 import org.apache.ignite.internal.events.DiscoveryCustomEvent;
 import org.apache.ignite.internal.managers.communication.GridIoManager;
+import org.apache.ignite.internal.managers.communication.GridIoPolicy;
 import org.apache.ignite.internal.managers.deployment.GridDeploymentInfo;
 import org.apache.ignite.internal.mxbean.IgniteStandardMXBean;
 import org.apache.ignite.internal.processors.cache.CacheClassLoaderMarker;
@@ -10604,6 +10605,71 @@ public abstract class IgniteUtils {
     }
 
     /**
+     * @param ctx Kernal context.
+     * @param plc IO Policy.
+     * @param reserved Thread to reserve.
+     * @return Number of available threads in executor service for {@code plc}. If {@code plc}
+     *         is invalid, return {@code 1}.
+     */
+    public static int availableThreadCount(GridKernalContext ctx, byte plc, int reserved) {
+        IgniteConfiguration cfg = ctx.config();
+
+        int parallelismLvl;
+
+        switch (plc) {
+            case GridIoPolicy.P2P_POOL:
+                parallelismLvl = cfg.getPeerClassLoadingThreadPoolSize();
+
+                break;
+
+            case GridIoPolicy.SYSTEM_POOL:
+                parallelismLvl = cfg.getSystemThreadPoolSize();
+
+                break;
+
+            case GridIoPolicy.PUBLIC_POOL:
+                parallelismLvl = cfg.getPublicThreadPoolSize();
+
+                break;
+
+            case GridIoPolicy.MANAGEMENT_POOL:
+                parallelismLvl = cfg.getManagementThreadPoolSize();
+
+                break;
+
+            case GridIoPolicy.UTILITY_CACHE_POOL:
+                parallelismLvl = cfg.getUtilityCacheThreadPoolSize();
+
+                break;
+
+            case GridIoPolicy.IGFS_POOL:
+                parallelismLvl = cfg.getIgfsThreadPoolSize();
+
+                break;
+
+            case GridIoPolicy.SERVICE_POOL:
+                parallelismLvl = cfg.getServiceThreadPoolSize();
+
+                break;
+
+            case GridIoPolicy.DATA_STREAMER_POOL:
+                parallelismLvl = cfg.getDataStreamerThreadPoolSize();
+
+                break;
+
+            case GridIoPolicy.QUERY_POOL:
+                parallelismLvl = cfg.getQueryThreadPoolSize();
+
+                break;
+
+            default:
+                parallelismLvl = -1;
+        }
+
+        return Math.max(1, parallelismLvl - reserved);
+    }
+
+    /**
      * Execute operation on data in parallel.
      *
      * @param executorSvc Service for parallel execution.

http://git-wip-us.apache.org/repos/asf/ignite/blob/025a0360/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/IgniteRebalanceOnCachesStoppingOrDestroyingTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/IgniteRebalanceOnCachesStoppingOrDestroyingTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/IgniteRebalanceOnCachesStoppingOrDestroyingTest.java
new file mode 100644
index 0000000..97f8d45
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/IgniteRebalanceOnCachesStoppingOrDestroyingTest.java
@@ -0,0 +1,279 @@
+/*
+ * 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.rebalancing;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.concurrent.ThreadLocalRandom;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+import org.apache.ignite.Ignite;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.IgniteDataStreamer;
+import org.apache.ignite.IgniteException;
+import org.apache.ignite.cache.CacheMode;
+import org.apache.ignite.cluster.ClusterNode;
+import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.configuration.DataRegionConfiguration;
+import org.apache.ignite.configuration.DataStorageConfiguration;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.configuration.TransactionConfiguration;
+import org.apache.ignite.configuration.WALMode;
+import org.apache.ignite.failure.StopNodeFailureHandler;
+import org.apache.ignite.internal.IgniteEx;
+import org.apache.ignite.internal.IgniteInterruptedCheckedException;
+import org.apache.ignite.internal.managers.communication.GridIoMessage;
+import org.apache.ignite.internal.processors.cache.GridCacheGroupIdMessage;
+import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionSupplyMessage;
+import org.apache.ignite.internal.util.lang.IgniteThrowableConsumer;
+import org.apache.ignite.internal.util.typedef.F;
+import org.apache.ignite.internal.util.typedef.internal.CU;
+import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.lang.IgniteInClosure;
+import org.apache.ignite.plugin.extensions.communication.Message;
+import org.apache.ignite.spi.IgniteSpiException;
+import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi;
+import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
+import org.apache.ignite.testframework.GridTestUtils;
+import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+
+/**
+ *
+ */
+public class IgniteRebalanceOnCachesStoppingOrDestroyingTest extends GridCommonAbstractTest {
+    /** */
+    private static final String CACHE_1 = "cache_1";
+
+    /** */
+    private static final String CACHE_2 = "cache_2";
+
+    /** */
+    private static final String CACHE_3 = "cache_3";
+
+    /** */
+    private static final String CACHE_4 = "cache_4";
+
+    /** */
+    private static final String GROUP_1 = "group_1";
+
+    /** */
+    private static final String GROUP_2 = "group_2";
+
+    /** */
+    private static final int REBALANCE_BATCH_SIZE = 50 * 1024;
+
+    /** */
+    private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
+
+    /** {@inheritDoc} */
+    @Override protected void beforeTest() throws Exception {
+        super.beforeTest();
+
+        cleanPersistenceDir();
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void afterTest() throws Exception {
+        super.afterTest();
+
+        stopAllGrids();
+
+        cleanPersistenceDir();
+    }
+
+    /** {@inheritDoc} */
+    @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
+        IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
+
+        TcpDiscoverySpi spi = new TcpDiscoverySpi();
+
+        spi.setIpFinder(ipFinder);
+
+        cfg.setDiscoverySpi(spi);
+
+        cfg.setCommunicationSpi(new RebalanceBlockingSPI());
+
+        cfg.setFailureHandler(new StopNodeFailureHandler());
+
+        cfg.setRebalanceThreadPoolSize(4);
+
+        cfg.setTransactionConfiguration(new TransactionConfiguration()
+            .setDefaultTxTimeout(1000));
+
+        cfg.setDataStorageConfiguration(
+                new DataStorageConfiguration()
+                        .setWalMode(WALMode.LOG_ONLY)
+                        .setDefaultDataRegionConfiguration(
+                                new DataRegionConfiguration()
+                                        .setPersistenceEnabled(true)
+                                        .setMaxSize(100L * 1024 * 1024)));
+
+        return cfg;
+    }
+
+    /**
+     *
+     */
+    public void testStopCachesOnDeactivation() throws Exception {
+        performTest(ig -> {
+            ig.cluster().active(false);
+
+            // Add to escape possible long waiting in awaitPartitionMapExchange due to {@link CacheAffinityChangeMessage}.
+            ig.cluster().active(true);
+
+            return null;
+        });
+    }
+
+    /**
+     *
+     */
+    public void testDestroySpecificCachesInDifferentCacheGroups() throws Exception {
+        performTest(ig -> {
+            ig.destroyCaches(Arrays.asList(CACHE_1, CACHE_3));
+
+            return null;
+        });
+    }
+
+    /**
+     *
+     */
+    public void testDestroySpecificCacheAndCacheGroup() throws Exception {
+        performTest(ig -> {
+            ig.destroyCaches(Arrays.asList(CACHE_1, CACHE_3, CACHE_4));
+
+            return null;
+        });
+    }
+
+    /**
+     * @param testAction Action that trigger stop or destroy of caches.
+     */
+    private void performTest(IgniteThrowableConsumer<Ignite, Void> testAction) throws Exception {
+        IgniteEx ig0 = (IgniteEx)startGrids(2);
+
+        ig0.cluster().active(true);
+
+        stopGrid(1);
+
+        loadData(ig0);
+
+        startGrid(1);
+
+        runLoad(ig0);
+
+        testAction.accept(ig0);
+
+        U.sleep(1000);
+
+        awaitPartitionMapExchange(true, true, null, true);
+
+        assertNull(grid(1).context().failure().failureContext());
+    }
+
+    /**
+     * @param ig Ig.
+     */
+    private void loadData(Ignite ig) {
+        List<CacheConfiguration> configs = Stream.of(
+                F.t(CACHE_1, GROUP_1),
+                F.t(CACHE_2, GROUP_1),
+                F.t(CACHE_3, GROUP_2),
+                F.t(CACHE_4, GROUP_2)
+        ).map(names -> new CacheConfiguration<>(names.get1())
+                .setGroupName(names.get2())
+                .setRebalanceBatchSize(REBALANCE_BATCH_SIZE)
+                .setCacheMode(CacheMode.REPLICATED)
+        ).collect(Collectors.toList());
+
+        ig.getOrCreateCaches(configs);
+
+        configs.forEach(cfg -> {
+            try (IgniteDataStreamer<Object, Object> streamer = ig.dataStreamer(cfg.getName())) {
+                for (int i = 0; i < 3_000; i++)
+                    streamer.addData(i, new byte[1024]);
+
+                streamer.flush();
+            }
+        });
+    }
+
+    /**
+     * @param ig Ignite instance.
+     */
+    private void runLoad(Ignite ig) throws Exception{
+        GridTestUtils.runMultiThreaded(new Runnable() {
+            @Override public void run() {
+                String cacheName = F.rand(CACHE_1, CACHE_2, CACHE_3, CACHE_4);
+
+                IgniteCache cache = ig.cache(cacheName);
+
+                for (int i = 0; i < 3_000; i++) {
+                    int idx = ThreadLocalRandom.current().nextInt(3_000);
+
+                    cache.put(idx, new byte[1024]);
+                }
+            }
+        }, 4, "load-thread");
+    }
+
+    /**
+     *
+     */
+    private static class RebalanceBlockingSPI extends TcpCommunicationSpi {
+        /** */
+        public static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
+
+        /** {@inheritDoc} */
+        @Override public void sendMessage(ClusterNode node, Message msg) throws IgniteSpiException {
+            slowDownMessage(msg);
+
+            super.sendMessage(node, msg);
+
+        }
+
+        /** {@inheritDoc} */
+        @Override public void sendMessage(ClusterNode node, Message msg,
+                                          IgniteInClosure<IgniteException> ackC) throws IgniteSpiException {
+            slowDownMessage(msg);
+
+            super.sendMessage(node, msg, ackC);
+        }
+
+        /**
+         * @param msg Message.
+         */
+        private void slowDownMessage(Message msg) {
+            if (msg instanceof GridIoMessage && ((GridIoMessage)msg).message() instanceof GridDhtPartitionSupplyMessage) {
+                int grpId = ((GridCacheGroupIdMessage)((GridIoMessage)msg).message()).groupId();
+
+                if (grpId == CU.cacheId(GROUP_1) || grpId == CU.cacheId(GROUP_2)) {
+                    try {
+                        U.sleep(50);
+                    }
+                    catch (IgniteInterruptedCheckedException e) {
+                        e.printStackTrace();
+                    }
+                }
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/025a0360/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite4.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite4.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite4.java
index 11f0219..d01f1ed 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite4.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite4.java
@@ -21,6 +21,7 @@ import junit.framework.TestSuite;
 import org.apache.ignite.cache.ResetLostPartitionTest;
 import org.apache.ignite.internal.processors.cache.IgniteClusterActivateDeactivateTestWithPersistenceAndMemoryReuse;
 import org.apache.ignite.internal.processors.cache.distributed.CachePageWriteLockUnlockTest;
+import org.apache.ignite.internal.processors.cache.distributed.rebalancing.IgniteRebalanceOnCachesStoppingOrDestroyingTest;
 import org.apache.ignite.internal.processors.cache.persistence.IgnitePdsContinuousRestartTestWithSharedGroupAndIndexes;
 import org.apache.ignite.internal.processors.cache.persistence.IgnitePdsRecoveryAfterFileCorruptionTest;
 import org.apache.ignite.internal.processors.cache.persistence.IgnitePdsTaskCancelingTest;
@@ -52,6 +53,8 @@ public class IgnitePdsTestSuite4 extends TestSuite {
 
         suite.addTestSuite(ResetLostPartitionTest.class);
 
+        suite.addTestSuite(IgniteRebalanceOnCachesStoppingOrDestroyingTest.class);
+
         suite.addTestSuite(CachePageWriteLockUnlockTest.class);
 
         suite.addTestSuite(IgnitePdsCacheWalDisabledOnRebalancingTest.class);


[11/37] ignite git commit: IGNITE-10373 Web Console: Fixed docker-compose.yml.

Posted by ak...@apache.org.
IGNITE-10373 Web Console: Fixed docker-compose.yml.


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

Branch: refs/heads/ignite-10189
Commit: 63b1422e9095bb9c9afa7cfc27e7f24b30ce8f97
Parents: ececcbc
Author: Pavel Konstantinov <pk...@gridgain.com>
Authored: Thu Dec 6 11:34:53 2018 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Thu Dec 6 11:34:53 2018 +0700

----------------------------------------------------------------------
 modules/web-console/docker/compose/docker-compose.yml | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/63b1422e/modules/web-console/docker/compose/docker-compose.yml
----------------------------------------------------------------------
diff --git a/modules/web-console/docker/compose/docker-compose.yml b/modules/web-console/docker/compose/docker-compose.yml
index 109bfca..15f2ae4 100644
--- a/modules/web-console/docker/compose/docker-compose.yml
+++ b/modules/web-console/docker/compose/docker-compose.yml
@@ -15,7 +15,7 @@
 # limitations under the License.
 #
 
-version: 1
+version: '3'
 
 services:
   mongodb:
@@ -50,7 +50,6 @@ services:
     image: apacheignite/web-console-frontend
     depends_on:
       - mongodb
-      - testenv
     ports:
       # Proxy HTTP nginx port (HOST_PORT:DOCKER_PORT)
       - 80:80


[21/37] ignite git commit: IGNITE-10318 Web console: Update panels to use newer UI on "Query notebook" screen.

Posted by ak...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/e1b8686a/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/controller.ts
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/controller.ts b/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/controller.ts
new file mode 100644
index 0000000..3ac3177
--- /dev/null
+++ b/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/controller.ts
@@ -0,0 +1,2007 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import _ from 'lodash';
+import {nonEmpty, nonNil} from 'app/utils/lodashMixins';
+import id8 from 'app/utils/id8';
+import 'rxjs/add/operator/mergeMap';
+import 'rxjs/add/operator/merge';
+import 'rxjs/add/operator/switchMap';
+import 'rxjs/add/operator/exhaustMap';
+import 'rxjs/add/operator/distinctUntilChanged';
+
+import { fromPromise } from 'rxjs/observable/fromPromise';
+import { timer } from 'rxjs/observable/timer';
+import { defer } from 'rxjs/observable/defer';
+
+import {CSV} from 'app/services/CSV';
+
+import paragraphRateTemplateUrl from 'views/sql/paragraph-rate.tpl.pug';
+import cacheMetadataTemplateUrl from 'views/sql/cache-metadata.tpl.pug';
+import chartSettingsTemplateUrl from 'views/sql/chart-settings.tpl.pug';
+import messageTemplateUrl from 'views/templates/message.tpl.pug';
+
+import {default as Notebook} from '../../notebook.service';
+import {default as MessagesServiceFactory} from 'app/services/Messages.service';
+import {default as LegacyConfirmServiceFactory} from 'app/services/Confirm.service';
+import {default as InputDialog} from 'app/components/input-dialog/input-dialog.service';
+import {QueryActions} from './components/query-actions-button/controller';
+
+// Time line X axis descriptor.
+const TIME_LINE = {value: -1, type: 'java.sql.Date', label: 'TIME_LINE'};
+
+// Row index X axis descriptor.
+const ROW_IDX = {value: -2, type: 'java.lang.Integer', label: 'ROW_IDX'};
+
+const NON_COLLOCATED_JOINS_SINCE = '1.7.0';
+
+const COLLOCATED_QUERY_SINCE = [['2.3.5', '2.4.0'], ['2.4.6', '2.5.0'], ['2.5.1-p13', '2.6.0'], '2.7.0'];
+
+const ENFORCE_JOIN_SINCE = [['1.7.9', '1.8.0'], ['1.8.4', '1.9.0'], '1.9.1'];
+
+const LAZY_QUERY_SINCE = [['2.1.4-p1', '2.2.0'], '2.2.1'];
+
+const DDL_SINCE = [['2.1.6', '2.2.0'], '2.3.0'];
+
+const _fullColName = (col) => {
+    const res = [];
+
+    if (col.schemaName)
+        res.push(col.schemaName);
+
+    if (col.typeName)
+        res.push(col.typeName);
+
+    res.push(col.fieldName);
+
+    return res.join('.');
+};
+
+let paragraphId = 0;
+
+class Paragraph {
+    name: string;
+    qryType: 'scan' | 'query';
+
+    constructor($animate, $timeout, JavaTypes, errorParser, paragraph) {
+        const self = this;
+
+        self.id = 'paragraph-' + paragraphId++;
+        self.qryType = paragraph.qryType || 'query';
+        self.maxPages = 0;
+        self.filter = '';
+        self.useAsDefaultSchema = false;
+        self.localQueryMode = false;
+        self.csvIsPreparing = false;
+        self.scanningInProgress = false;
+
+        _.assign(this, paragraph);
+
+        Object.defineProperty(this, 'gridOptions', {value: {
+            enableGridMenu: false,
+            enableColumnMenus: false,
+            flatEntityAccess: true,
+            fastWatch: true,
+            categories: [],
+            rebuildColumns() {
+                if (_.isNil(this.api))
+                    return;
+
+                this.categories.length = 0;
+
+                this.columnDefs = _.reduce(self.meta, (cols, col, idx) => {
+                    cols.push({
+                        displayName: col.fieldName,
+                        headerTooltip: _fullColName(col),
+                        field: idx.toString(),
+                        minWidth: 50,
+                        cellClass: 'cell-left',
+                        visible: self.columnFilter(col)
+                    });
+
+                    this.categories.push({
+                        name: col.fieldName,
+                        visible: self.columnFilter(col),
+                        enableHiding: true
+                    });
+
+                    return cols;
+                }, []);
+
+                $timeout(() => this.api.core.notifyDataChange('column'));
+            },
+            adjustHeight() {
+                if (_.isNil(this.api))
+                    return;
+
+                this.data = self.rows;
+
+                const height = Math.min(self.rows.length, 15) * 30 + 47;
+
+                // Remove header height.
+                this.api.grid.element.css('height', height + 'px');
+
+                $timeout(() => this.api.core.handleWindowResize());
+            },
+            onRegisterApi(api) {
+                $animate.enabled(api.grid.element, false);
+
+                this.api = api;
+
+                this.rebuildColumns();
+
+                this.adjustHeight();
+            }
+        }});
+
+        Object.defineProperty(this, 'chartHistory', {value: []});
+
+        Object.defineProperty(this, 'error', {value: {
+            root: {},
+            message: ''
+        }});
+
+        this.setError = (err) => {
+            this.error.root = err;
+            this.error.message = errorParser.extractMessage(err);
+
+            let cause = err;
+
+            while (nonNil(cause)) {
+                if (nonEmpty(cause.className) &&
+                    _.includes(['SQLException', 'JdbcSQLException', 'QueryCancelledException'], JavaTypes.shortClassName(cause.className))) {
+                    this.error.message = errorParser.extractMessage(cause.message || cause.className);
+
+                    break;
+                }
+
+                cause = cause.cause;
+            }
+
+            if (_.isEmpty(this.error.message) && nonEmpty(err.className)) {
+                this.error.message = 'Internal cluster error';
+
+                if (nonEmpty(err.className))
+                    this.error.message += ': ' + err.className;
+            }
+        };
+    }
+
+    resultType() {
+        if (_.isNil(this.queryArgs))
+            return null;
+
+        if (nonEmpty(this.error.message))
+            return 'error';
+
+        if (_.isEmpty(this.rows))
+            return 'empty';
+
+        return this.result === 'table' ? 'table' : 'chart';
+    }
+
+    nonRefresh() {
+        return _.isNil(this.rate) || _.isNil(this.rate.stopTime);
+    }
+
+    table() {
+        return this.result === 'table';
+    }
+
+    chart() {
+        return this.result !== 'table' && this.result !== 'none';
+    }
+
+    nonEmpty() {
+        return this.rows && this.rows.length > 0;
+    }
+
+    queryExecuted() {
+        return nonEmpty(this.meta) || nonEmpty(this.error.message);
+    }
+
+    scanExplain() {
+        return this.queryExecuted() && this.queryArgs.type !== 'QUERY';
+    }
+
+    timeLineSupported() {
+        return this.result !== 'pie';
+    }
+
+    chartColumnsConfigured() {
+        return nonEmpty(this.chartKeyCols) && nonEmpty(this.chartValCols);
+    }
+
+    chartTimeLineEnabled() {
+        return nonEmpty(this.chartKeyCols) && _.eq(this.chartKeyCols[0], TIME_LINE);
+    }
+
+    executionInProgress(showLocal = false) {
+        return this.loading && (this.localQueryMode === showLocal);
+    }
+
+    checkScanInProgress(showLocal = false) {
+        return this.scanningInProgress && (this.localQueryMode === showLocal);
+    }
+
+    cancelRefresh($interval) {
+        if (this.rate && this.rate.stopTime) {
+            $interval.cancel(this.rate.stopTime);
+
+            delete this.rate.stopTime;
+        }
+    }
+
+    reset($interval) {
+        this.meta = [];
+        this.chartColumns = [];
+        this.chartKeyCols = [];
+        this.chartValCols = [];
+        this.error.root = {};
+        this.error.message = '';
+        this.rows = [];
+        this.duration = 0;
+
+        this.cancelRefresh($interval);
+    }
+}
+
+// Controller for SQL notebook screen.
+export class NotebookCtrl {
+    static $inject = ['IgniteInput', '$rootScope', '$scope', '$http', '$q', '$timeout', '$interval', '$animate', '$location', '$anchorScroll', '$state', '$filter', '$modal', '$popover', 'IgniteLoading', 'IgniteLegacyUtils', 'IgniteMessages', 'IgniteConfirm', 'AgentManager', 'IgniteChartColors', 'IgniteNotebook', 'IgniteNodes', 'uiGridExporterConstants', 'IgniteVersion', 'IgniteActivitiesData', 'JavaTypes', 'IgniteCopyToClipboard', 'CSV', 'IgniteErrorParser', 'DemoInfo'];
+
+    /**
+     * @param {CSV} CSV
+     */
+    constructor(private IgniteInput: InputDialog, $root, private $scope, $http, $q, $timeout, $interval, $animate, $location, $anchorScroll, $state, $filter, $modal, $popover, Loading, LegacyUtils, private Messages: ReturnType<typeof MessagesServiceFactory>, private Confirm: ReturnType<typeof LegacyConfirmServiceFactory>, agentMgr, IgniteChartColors, private Notebook: Notebook, Nodes, uiGridExporterConstants, Version, ActivitiesData, JavaTypes, IgniteCopyToClipboard, CSV, errorParser, DemoInfo) {
+        const $ctrl = this;
+
+        this.CSV = CSV;
+        Object.assign(this, { $root, $scope, $http, $q, $timeout, $interval, $animate, $location, $anchorScroll, $state, $filter, $modal, $popover, Loading, LegacyUtils, Messages, Confirm, agentMgr, IgniteChartColors, Notebook, Nodes, uiGridExporterConstants, Version, ActivitiesData, JavaTypes, errorParser, DemoInfo });
+
+        // Define template urls.
+        $ctrl.paragraphRateTemplateUrl = paragraphRateTemplateUrl;
+        $ctrl.cacheMetadataTemplateUrl = cacheMetadataTemplateUrl;
+        $ctrl.chartSettingsTemplateUrl = chartSettingsTemplateUrl;
+        $ctrl.demoStarted = false;
+
+        this.isDemo = $root.IgniteDemoMode;
+
+        const _tryStopRefresh = function(paragraph) {
+            paragraph.cancelRefresh($interval);
+        };
+
+        const _stopTopologyRefresh = () => {
+            if ($scope.notebook && $scope.notebook.paragraphs)
+                $scope.notebook.paragraphs.forEach((paragraph) => _tryStopRefresh(paragraph));
+        };
+
+        $scope.$on('$stateChangeStart', _stopTopologyRefresh);
+
+        $scope.caches = [];
+
+        $scope.pageSizesOptions = [
+            {value: 50, label: '50'},
+            {value: 100, label: '100'},
+            {value: 200, label: '200'},
+            {value: 400, label: '400'},
+            {value: 800, label: '800'},
+            {value: 1000, label: '1000'}
+        ];
+
+        $scope.maxPages = [
+            {label: 'Unlimited', value: 0},
+            {label: '1', value: 1},
+            {label: '5', value: 5},
+            {label: '10', value: 10},
+            {label: '20', value: 20},
+            {label: '50', value: 50},
+            {label: '100', value: 100}
+        ];
+
+        $scope.timeLineSpans = ['1', '5', '10', '15', '30'];
+
+        $scope.aggregateFxs = ['FIRST', 'LAST', 'MIN', 'MAX', 'SUM', 'AVG', 'COUNT'];
+
+        $scope.modes = LegacyUtils.mkOptions(['PARTITIONED', 'REPLICATED', 'LOCAL']);
+
+        $scope.loadingText = $root.IgniteDemoMode ? 'Demo grid is starting. Please wait...' : 'Loading query notebook screen...';
+
+        $scope.timeUnit = [
+            {value: 1000, label: 'seconds', short: 's'},
+            {value: 60000, label: 'minutes', short: 'm'},
+            {value: 3600000, label: 'hours', short: 'h'}
+        ];
+
+        $scope.metadata = [];
+
+        $scope.metaFilter = '';
+
+        $scope.metaOptions = {
+            nodeChildren: 'children',
+            dirSelectable: true,
+            injectClasses: {
+                iExpanded: 'fa fa-minus-square-o',
+                iCollapsed: 'fa fa-plus-square-o'
+            }
+        };
+
+        const maskCacheName = $filter('defaultName');
+
+        // We need max 1800 items to hold history for 30 mins in case of refresh every second.
+        const HISTORY_LENGTH = 1800;
+
+        const MAX_VAL_COLS = IgniteChartColors.length;
+
+        $anchorScroll.yOffset = 55;
+
+        $scope.chartColor = function(index) {
+            return {color: 'white', 'background-color': IgniteChartColors[index]};
+        };
+
+        function _chartNumber(arr, idx, dflt) {
+            if (idx >= 0 && arr && arr.length > idx && _.isNumber(arr[idx]))
+                return arr[idx];
+
+            return dflt;
+        }
+
+        function _min(rows, idx, dflt) {
+            let min = _chartNumber(rows[0], idx, dflt);
+
+            _.forEach(rows, (row) => {
+                const v = _chartNumber(row, idx, dflt);
+
+                if (v < min)
+                    min = v;
+            });
+
+            return min;
+        }
+
+        function _max(rows, idx, dflt) {
+            let max = _chartNumber(rows[0], idx, dflt);
+
+            _.forEach(rows, (row) => {
+                const v = _chartNumber(row, idx, dflt);
+
+                if (v > max)
+                    max = v;
+            });
+
+            return max;
+        }
+
+        function _sum(rows, idx) {
+            let sum = 0;
+
+            _.forEach(rows, (row) => sum += _chartNumber(row, idx, 0));
+
+            return sum;
+        }
+
+        function _aggregate(rows, aggFx, idx, dflt) {
+            const len = rows.length;
+
+            switch (aggFx) {
+                case 'FIRST':
+                    return _chartNumber(rows[0], idx, dflt);
+
+                case 'LAST':
+                    return _chartNumber(rows[len - 1], idx, dflt);
+
+                case 'MIN':
+                    return _min(rows, idx, dflt);
+
+                case 'MAX':
+                    return _max(rows, idx, dflt);
+
+                case 'SUM':
+                    return _sum(rows, idx);
+
+                case 'AVG':
+                    return len > 0 ? _sum(rows, idx) / len : 0;
+
+                case 'COUNT':
+                    return len;
+
+                default:
+            }
+
+            return 0;
+        }
+
+        function _chartLabel(arr, idx, dflt) {
+            if (arr && arr.length > idx && _.isString(arr[idx]))
+                return arr[idx];
+
+            return dflt;
+        }
+
+        function _chartDatum(paragraph) {
+            let datum = [];
+
+            if (paragraph.chartColumnsConfigured()) {
+                paragraph.chartValCols.forEach(function(valCol) {
+                    let index = 0;
+                    let values = [];
+                    const colIdx = valCol.value;
+
+                    if (paragraph.chartTimeLineEnabled()) {
+                        const aggFx = valCol.aggFx;
+                        const colLbl = valCol.label + ' [' + aggFx + ']';
+
+                        if (paragraph.charts && paragraph.charts.length === 1)
+                            datum = paragraph.charts[0].data;
+
+                        const chartData = _.find(datum, {series: valCol.label});
+
+                        const leftBound = new Date();
+                        leftBound.setMinutes(leftBound.getMinutes() - parseInt(paragraph.timeLineSpan, 10));
+
+                        if (chartData) {
+                            const lastItem = _.last(paragraph.chartHistory);
+
+                            values = chartData.values;
+
+                            values.push({
+                                x: lastItem.tm,
+                                y: _aggregate(lastItem.rows, aggFx, colIdx, index++)
+                            });
+
+                            while (values.length > 0 && values[0].x < leftBound)
+                                values.shift();
+                        }
+                        else {
+                            _.forEach(paragraph.chartHistory, (history) => {
+                                if (history.tm >= leftBound) {
+                                    values.push({
+                                        x: history.tm,
+                                        y: _aggregate(history.rows, aggFx, colIdx, index++)
+                                    });
+                                }
+                            });
+
+                            datum.push({series: valCol.label, key: colLbl, values});
+                        }
+                    }
+                    else {
+                        index = paragraph.total;
+
+                        values = _.map(paragraph.rows, function(row) {
+                            const xCol = paragraph.chartKeyCols[0].value;
+
+                            const v = {
+                                x: _chartNumber(row, xCol, index),
+                                xLbl: _chartLabel(row, xCol, null),
+                                y: _chartNumber(row, colIdx, index)
+                            };
+
+                            index++;
+
+                            return v;
+                        });
+
+                        datum.push({series: valCol.label, key: valCol.label, values});
+                    }
+                });
+            }
+
+            return datum;
+        }
+
+        function _xX(d) {
+            return d.x;
+        }
+
+        function _yY(d) {
+            return d.y;
+        }
+
+        function _xAxisTimeFormat(d) {
+            return d3.time.format('%X')(new Date(d));
+        }
+
+        const _intClasses = ['java.lang.Byte', 'java.lang.Integer', 'java.lang.Long', 'java.lang.Short'];
+
+        function _intType(cls) {
+            return _.includes(_intClasses, cls);
+        }
+
+        const _xAxisWithLabelFormat = function(paragraph) {
+            return function(d) {
+                const values = paragraph.charts[0].data[0].values;
+
+                const fmt = _intType(paragraph.chartKeyCols[0].type) ? 'd' : ',.2f';
+
+                const dx = values[d];
+
+                if (!dx)
+                    return d3.format(fmt)(d);
+
+                const lbl = dx.xLbl;
+
+                return lbl ? lbl : d3.format(fmt)(d);
+            };
+        };
+
+        function _xAxisLabel(paragraph) {
+            return _.isEmpty(paragraph.chartKeyCols) ? 'X' : paragraph.chartKeyCols[0].label;
+        }
+
+        const _yAxisFormat = function(d) {
+            const fmt = d < 1000 ? ',.2f' : '.3s';
+
+            return d3.format(fmt)(d);
+        };
+
+        function _updateCharts(paragraph) {
+            $timeout(() => _.forEach(paragraph.charts, (chart) => chart.api.update()), 100);
+        }
+
+        function _updateChartsWithData(paragraph, newDatum) {
+            $timeout(() => {
+                if (!paragraph.chartTimeLineEnabled()) {
+                    const chartDatum = paragraph.charts[0].data;
+
+                    chartDatum.length = 0;
+
+                    _.forEach(newDatum, (series) => chartDatum.push(series));
+                }
+
+                paragraph.charts[0].api.update();
+            });
+        }
+
+        function _yAxisLabel(paragraph) {
+            const cols = paragraph.chartValCols;
+
+            const tml = paragraph.chartTimeLineEnabled();
+
+            return _.isEmpty(cols) ? 'Y' : _.map(cols, function(col) {
+                let lbl = col.label;
+
+                if (tml)
+                    lbl += ' [' + col.aggFx + ']';
+
+                return lbl;
+            }).join(', ');
+        }
+
+        function _barChart(paragraph) {
+            const datum = _chartDatum(paragraph);
+
+            if (_.isEmpty(paragraph.charts)) {
+                const stacked = paragraph.chartsOptions && paragraph.chartsOptions.barChart
+                    ? paragraph.chartsOptions.barChart.stacked
+                    : true;
+
+                const options = {
+                    chart: {
+                        type: 'multiBarChart',
+                        height: 400,
+                        margin: {left: 70},
+                        duration: 0,
+                        x: _xX,
+                        y: _yY,
+                        xAxis: {
+                            axisLabel: _xAxisLabel(paragraph),
+                            tickFormat: paragraph.chartTimeLineEnabled() ? _xAxisTimeFormat : _xAxisWithLabelFormat(paragraph),
+                            showMaxMin: false
+                        },
+                        yAxis: {
+                            axisLabel: _yAxisLabel(paragraph),
+                            tickFormat: _yAxisFormat
+                        },
+                        color: IgniteChartColors,
+                        stacked,
+                        showControls: true,
+                        legend: {
+                            vers: 'furious',
+                            margin: {right: -15}
+                        }
+                    }
+                };
+
+                paragraph.charts = [{options, data: datum}];
+
+                _updateCharts(paragraph);
+            }
+            else
+                _updateChartsWithData(paragraph, datum);
+        }
+
+        function _pieChartDatum(paragraph) {
+            const datum = [];
+
+            if (paragraph.chartColumnsConfigured() && !paragraph.chartTimeLineEnabled()) {
+                paragraph.chartValCols.forEach(function(valCol) {
+                    let index = paragraph.total;
+
+                    const values = _.map(paragraph.rows, (row) => {
+                        const xCol = paragraph.chartKeyCols[0].value;
+
+                        const v = {
+                            x: xCol < 0 ? index : row[xCol],
+                            y: _chartNumber(row, valCol.value, index)
+                        };
+
+                        // Workaround for known problem with zero values on Pie chart.
+                        if (v.y === 0)
+                            v.y = 0.0001;
+
+                        index++;
+
+                        return v;
+                    });
+
+                    datum.push({series: paragraph.chartKeyCols[0].label, key: valCol.label, values});
+                });
+            }
+
+            return datum;
+        }
+
+        function _pieChart(paragraph) {
+            let datum = _pieChartDatum(paragraph);
+
+            if (datum.length === 0)
+                datum = [{values: []}];
+
+            paragraph.charts = _.map(datum, function(data) {
+                return {
+                    options: {
+                        chart: {
+                            type: 'pieChart',
+                            height: 400,
+                            duration: 0,
+                            x: _xX,
+                            y: _yY,
+                            showLabels: true,
+                            labelThreshold: 0.05,
+                            labelType: 'percent',
+                            donut: true,
+                            donutRatio: 0.35,
+                            legend: {
+                                vers: 'furious',
+                                margin: {right: -15}
+                            }
+                        },
+                        title: {
+                            enable: true,
+                            text: data.key
+                        }
+                    },
+                    data: data.values
+                };
+            });
+
+            _updateCharts(paragraph);
+        }
+
+        function _lineChart(paragraph) {
+            const datum = _chartDatum(paragraph);
+
+            if (_.isEmpty(paragraph.charts)) {
+                const options = {
+                    chart: {
+                        type: 'lineChart',
+                        height: 400,
+                        margin: { left: 70 },
+                        duration: 0,
+                        x: _xX,
+                        y: _yY,
+                        xAxis: {
+                            axisLabel: _xAxisLabel(paragraph),
+                            tickFormat: paragraph.chartTimeLineEnabled() ? _xAxisTimeFormat : _xAxisWithLabelFormat(paragraph),
+                            showMaxMin: false
+                        },
+                        yAxis: {
+                            axisLabel: _yAxisLabel(paragraph),
+                            tickFormat: _yAxisFormat
+                        },
+                        color: IgniteChartColors,
+                        useInteractiveGuideline: true,
+                        legend: {
+                            vers: 'furious',
+                            margin: {right: -15}
+                        }
+                    }
+                };
+
+                paragraph.charts = [{options, data: datum}];
+
+                _updateCharts(paragraph);
+            }
+            else
+                _updateChartsWithData(paragraph, datum);
+        }
+
+        function _areaChart(paragraph) {
+            const datum = _chartDatum(paragraph);
+
+            if (_.isEmpty(paragraph.charts)) {
+                const style = paragraph.chartsOptions && paragraph.chartsOptions.areaChart
+                    ? paragraph.chartsOptions.areaChart.style
+                    : 'stack';
+
+                const options = {
+                    chart: {
+                        type: 'stackedAreaChart',
+                        height: 400,
+                        margin: {left: 70},
+                        duration: 0,
+                        x: _xX,
+                        y: _yY,
+                        xAxis: {
+                            axisLabel: _xAxisLabel(paragraph),
+                            tickFormat: paragraph.chartTimeLineEnabled() ? _xAxisTimeFormat : _xAxisWithLabelFormat(paragraph),
+                            showMaxMin: false
+                        },
+                        yAxis: {
+                            axisLabel: _yAxisLabel(paragraph),
+                            tickFormat: _yAxisFormat
+                        },
+                        color: IgniteChartColors,
+                        style,
+                        legend: {
+                            vers: 'furious',
+                            margin: {right: -15}
+                        }
+                    }
+                };
+
+                paragraph.charts = [{options, data: datum}];
+
+                _updateCharts(paragraph);
+            }
+            else
+                _updateChartsWithData(paragraph, datum);
+        }
+
+        function _chartApplySettings(paragraph, resetCharts) {
+            if (resetCharts)
+                paragraph.charts = [];
+
+            if (paragraph.chart() && paragraph.nonEmpty()) {
+                switch (paragraph.result) {
+                    case 'bar':
+                        _barChart(paragraph);
+                        break;
+
+                    case 'pie':
+                        _pieChart(paragraph);
+                        break;
+
+                    case 'line':
+                        _lineChart(paragraph);
+                        break;
+
+                    case 'area':
+                        _areaChart(paragraph);
+                        break;
+
+                    default:
+                }
+            }
+        }
+
+        $scope.chartRemoveKeyColumn = function(paragraph, index) {
+            paragraph.chartKeyCols.splice(index, 1);
+
+            _chartApplySettings(paragraph, true);
+        };
+
+        $scope.chartRemoveValColumn = function(paragraph, index) {
+            paragraph.chartValCols.splice(index, 1);
+
+            _chartApplySettings(paragraph, true);
+        };
+
+        $scope.chartAcceptKeyColumn = function(paragraph, item) {
+            const accepted = _.findIndex(paragraph.chartKeyCols, item) < 0;
+
+            if (accepted) {
+                paragraph.chartKeyCols = [item];
+
+                _chartApplySettings(paragraph, true);
+            }
+
+            return false;
+        };
+
+        const _numberClasses = ['java.math.BigDecimal', 'java.lang.Byte', 'java.lang.Double',
+            'java.lang.Float', 'java.lang.Integer', 'java.lang.Long', 'java.lang.Short'];
+
+        const _numberType = function(cls) {
+            return _.includes(_numberClasses, cls);
+        };
+
+        $scope.chartAcceptValColumn = function(paragraph, item) {
+            const valCols = paragraph.chartValCols;
+
+            const accepted = _.findIndex(valCols, item) < 0 && item.value >= 0 && _numberType(item.type);
+
+            if (accepted) {
+                if (valCols.length === MAX_VAL_COLS - 1)
+                    valCols.shift();
+
+                valCols.push(item);
+
+                _chartApplySettings(paragraph, true);
+            }
+
+            return false;
+        };
+
+        $scope.scrollParagraphs = [];
+
+        $scope.rebuildScrollParagraphs = function() {
+            $scope.scrollParagraphs = $scope.notebook.paragraphs.map(function(paragraph) {
+                return {
+                    text: paragraph.name,
+                    click: 'scrollToParagraph("' + paragraph.id + '")'
+                };
+            });
+        };
+
+        $scope.scrollToParagraph = (id) => {
+            const idx = _.findIndex($scope.notebook.paragraphs, {id});
+
+            if (idx >= 0) {
+                if (!_.includes($scope.notebook.expandedParagraphs, idx))
+                    $scope.notebook.expandedParagraphs = $scope.notebook.expandedParagraphs.concat([idx]);
+
+                if ($scope.notebook.paragraphs[idx].ace)
+                    setTimeout(() => $scope.notebook.paragraphs[idx].ace.focus());
+            }
+
+            $location.hash(id);
+
+            $anchorScroll();
+        };
+
+        const _hideColumn = (col) => col.fieldName !== '_KEY' && col.fieldName !== '_VAL';
+
+        const _allColumn = () => true;
+
+        $scope.aceInit = function(paragraph) {
+            return function(editor) {
+                editor.setAutoScrollEditorIntoView(true);
+                editor.$blockScrolling = Infinity;
+
+                const renderer = editor.renderer;
+
+                renderer.setHighlightGutterLine(false);
+                renderer.setShowPrintMargin(false);
+                renderer.setOption('fontFamily', 'monospace');
+                renderer.setOption('fontSize', '14px');
+                renderer.setOption('minLines', '5');
+                renderer.setOption('maxLines', '15');
+
+                editor.setTheme('ace/theme/chrome');
+
+                Object.defineProperty(paragraph, 'ace', { value: editor });
+            };
+        };
+
+        /**
+         * Update caches list.
+         */
+        const _refreshCaches = () => {
+            return agentMgr.publicCacheNames()
+                .then((cacheNames) => {
+                    $scope.caches = _.sortBy(_.map(cacheNames, (name) => ({
+                        label: maskCacheName(name, true),
+                        value: name
+                    })), (cache) => cache.label.toLowerCase());
+
+                    _.forEach($scope.notebook.paragraphs, (paragraph) => {
+                        if (!_.includes(cacheNames, paragraph.cacheName))
+                            paragraph.cacheName = _.head(cacheNames);
+                    });
+
+                    // Await for demo caches.
+                    if (!$ctrl.demoStarted && $root.IgniteDemoMode && nonEmpty(cacheNames)) {
+                        $ctrl.demoStarted = true;
+
+                        Loading.finish('sqlLoading');
+
+                        _.forEach($scope.notebook.paragraphs, (paragraph) => $scope.execute(paragraph));
+                    }
+
+                    $scope.$applyAsync();
+                })
+                .catch((err) => Messages.showError(err));
+        };
+
+        const _startWatch = () => {
+            const awaitClusters$ = fromPromise(
+                agentMgr.startClusterWatch('Leave Queries', 'default-state'));
+
+            const finishLoading$ = defer(() => {
+                if (!$root.IgniteDemoMode)
+                    Loading.finish('sqlLoading');
+            }).take(1);
+
+            const refreshCaches = (period) => {
+                return timer(0, period).exhaustMap(() => _refreshCaches()).merge(finishLoading$);
+            };
+
+            this.refresh$ = awaitClusters$
+                .mergeMap(() => agentMgr.currentCluster$)
+                .do(() => Loading.start('sqlLoading'))
+                .do(() => {
+                    _.forEach($scope.notebook.paragraphs, (paragraph) => {
+                        paragraph.reset($interval);
+                    });
+                })
+                .switchMap(() => refreshCaches(5000))
+                .subscribe();
+        };
+
+        const _newParagraph = (paragraph) => {
+            return new Paragraph($animate, $timeout, JavaTypes, errorParser, paragraph);
+        };
+
+        Notebook.find($state.params.noteId)
+            .then((notebook) => {
+                $scope.notebook = _.cloneDeep(notebook);
+
+                $scope.notebook_name = $scope.notebook.name;
+
+                if (!$scope.notebook.expandedParagraphs)
+                    $scope.notebook.expandedParagraphs = [];
+
+                if (!$scope.notebook.paragraphs)
+                    $scope.notebook.paragraphs = [];
+
+                $scope.notebook.paragraphs = _.map($scope.notebook.paragraphs, (p) => _newParagraph(p));
+
+                if (_.isEmpty($scope.notebook.paragraphs))
+                    $scope.addQuery();
+                else
+                    $scope.rebuildScrollParagraphs();
+            })
+            .then(() => {
+                if ($root.IgniteDemoMode && sessionStorage.showDemoInfo !== 'true') {
+                    sessionStorage.showDemoInfo = 'true';
+
+                    this.DemoInfo.show().then(_startWatch);
+                } else
+                    _startWatch();
+            })
+            .catch(() => {
+                $scope.notebookLoadFailed = true;
+
+                Loading.finish('sqlLoading');
+            });
+
+        $scope.renameNotebook = (name) => {
+            if (!name)
+                return;
+
+            if ($scope.notebook.name !== name) {
+                const prevName = $scope.notebook.name;
+
+                $scope.notebook.name = name;
+
+                Notebook.save($scope.notebook)
+                    .then(() => $scope.notebook.edit = false)
+                    .catch((err) => {
+                        $scope.notebook.name = prevName;
+
+                        Messages.showError(err);
+                    });
+            }
+            else
+                $scope.notebook.edit = false;
+        };
+
+        $scope.removeNotebook = (notebook) => Notebook.remove(notebook);
+
+        $scope.addParagraph = (paragraph, sz) => {
+            if ($scope.caches && $scope.caches.length > 0)
+                paragraph.cacheName = _.head($scope.caches).value;
+
+            $scope.notebook.paragraphs.push(paragraph);
+
+            $scope.notebook.expandedParagraphs.push(sz);
+
+            $scope.rebuildScrollParagraphs();
+
+            $location.hash(paragraph.id);
+        };
+
+        $scope.addQuery = function() {
+            const sz = $scope.notebook.paragraphs.length;
+
+            ActivitiesData.post({ group: 'sql', action: '/queries/add/query' });
+
+            const paragraph = _newParagraph({
+                name: 'Query' + (sz === 0 ? '' : sz),
+                query: '',
+                pageSize: $scope.pageSizesOptions[1].value,
+                timeLineSpan: $scope.timeLineSpans[0],
+                result: 'none',
+                rate: {
+                    value: 1,
+                    unit: 60000,
+                    installed: false
+                },
+                qryType: 'query',
+                lazy: true
+            });
+
+            $scope.addParagraph(paragraph, sz);
+
+            $timeout(() => {
+                $anchorScroll();
+
+                paragraph.ace.focus();
+            });
+        };
+
+        $scope.addScan = function() {
+            const sz = $scope.notebook.paragraphs.length;
+
+            ActivitiesData.post({ group: 'sql', action: '/queries/add/scan' });
+
+            const paragraph = _newParagraph({
+                name: 'Scan' + (sz === 0 ? '' : sz),
+                query: '',
+                pageSize: $scope.pageSizesOptions[1].value,
+                timeLineSpan: $scope.timeLineSpans[0],
+                result: 'none',
+                rate: {
+                    value: 1,
+                    unit: 60000,
+                    installed: false
+                },
+                qryType: 'scan'
+            });
+
+            $scope.addParagraph(paragraph, sz);
+        };
+
+        function _saveChartSettings(paragraph) {
+            if (!_.isEmpty(paragraph.charts)) {
+                const chart = paragraph.charts[0].api.getScope().chart;
+
+                if (!LegacyUtils.isDefined(paragraph.chartsOptions))
+                    paragraph.chartsOptions = {barChart: {stacked: true}, areaChart: {style: 'stack'}};
+
+                switch (paragraph.result) {
+                    case 'bar':
+                        paragraph.chartsOptions.barChart.stacked = chart.stacked();
+
+                        break;
+
+                    case 'area':
+                        paragraph.chartsOptions.areaChart.style = chart.style();
+
+                        break;
+
+                    default:
+                }
+            }
+        }
+
+        $scope.setResult = function(paragraph, new_result) {
+            if (paragraph.result === new_result)
+                return;
+
+            _saveChartSettings(paragraph);
+
+            paragraph.result = new_result;
+
+            if (paragraph.chart())
+                _chartApplySettings(paragraph, true);
+        };
+
+        $scope.resultEq = function(paragraph, result) {
+            return (paragraph.result === result);
+        };
+
+        $scope.paragraphExpanded = function(paragraph) {
+            const paragraph_idx = _.findIndex($scope.notebook.paragraphs, function(item) {
+                return paragraph === item;
+            });
+
+            const panel_idx = _.findIndex($scope.notebook.expandedParagraphs, function(item) {
+                return paragraph_idx === item;
+            });
+
+            return panel_idx >= 0;
+        };
+
+        const _columnFilter = function(paragraph) {
+            return paragraph.disabledSystemColumns || paragraph.systemColumns ? _allColumn : _hideColumn;
+        };
+
+        const _notObjectType = function(cls) {
+            return LegacyUtils.isJavaBuiltInClass(cls);
+        };
+
+        function _retainColumns(allCols, curCols, acceptableType, xAxis, unwantedCols) {
+            const retainedCols = [];
+
+            const availableCols = xAxis ? allCols : _.filter(allCols, function(col) {
+                return col.value >= 0;
+            });
+
+            if (availableCols.length > 0) {
+                curCols.forEach(function(curCol) {
+                    const col = _.find(availableCols, {label: curCol.label});
+
+                    if (col && acceptableType(col.type)) {
+                        col.aggFx = curCol.aggFx;
+
+                        retainedCols.push(col);
+                    }
+                });
+
+                // If nothing was restored, add first acceptable column.
+                if (_.isEmpty(retainedCols)) {
+                    let col;
+
+                    if (unwantedCols)
+                        col = _.find(availableCols, (avCol) => !_.find(unwantedCols, {label: avCol.label}) && acceptableType(avCol.type));
+
+                    if (!col)
+                        col = _.find(availableCols, (avCol) => acceptableType(avCol.type));
+
+                    if (col)
+                        retainedCols.push(col);
+                }
+            }
+
+            return retainedCols;
+        }
+
+        const _rebuildColumns = function(paragraph) {
+            _.forEach(_.groupBy(paragraph.meta, 'fieldName'), function(colsByName, fieldName) {
+                const colsByTypes = _.groupBy(colsByName, 'typeName');
+
+                const needType = _.keys(colsByTypes).length > 1;
+
+                _.forEach(colsByTypes, function(colsByType, typeName) {
+                    _.forEach(colsByType, function(col, ix) {
+                        col.fieldName = (needType && !LegacyUtils.isEmptyString(typeName) ? typeName + '.' : '') + fieldName + (ix > 0 ? ix : '');
+                    });
+                });
+            });
+
+            paragraph.gridOptions.rebuildColumns();
+
+            paragraph.chartColumns = _.reduce(paragraph.meta, (acc, col, idx) => {
+                if (_notObjectType(col.fieldTypeName)) {
+                    acc.push({
+                        label: col.fieldName,
+                        type: col.fieldTypeName,
+                        aggFx: $scope.aggregateFxs[0],
+                        value: idx.toString()
+                    });
+                }
+
+                return acc;
+            }, []);
+
+            if (paragraph.chartColumns.length > 0) {
+                paragraph.chartColumns.push(TIME_LINE);
+                paragraph.chartColumns.push(ROW_IDX);
+            }
+
+            // We could accept onl not object columns for X axis.
+            paragraph.chartKeyCols = _retainColumns(paragraph.chartColumns, paragraph.chartKeyCols, _notObjectType, true);
+
+            // We could accept only numeric columns for Y axis.
+            paragraph.chartValCols = _retainColumns(paragraph.chartColumns, paragraph.chartValCols, _numberType, false, paragraph.chartKeyCols);
+        };
+
+        $scope.toggleSystemColumns = function(paragraph) {
+            if (paragraph.disabledSystemColumns)
+                return;
+
+            paragraph.columnFilter = _columnFilter(paragraph);
+
+            paragraph.chartColumns = [];
+
+            _rebuildColumns(paragraph);
+        };
+
+        const _showLoading = (paragraph, enable) => paragraph.loading = enable;
+
+        /**
+         * @param {Object} paragraph Query
+         * @param {Boolean} clearChart Flag is need clear chart model.
+         * @param {{columns: Array, rows: Array, responseNodeId: String, queryId: int, hasMore: Boolean}} res Query results.
+         * @private
+         */
+        const _processQueryResult = (paragraph, clearChart, res) => {
+            const prevKeyCols = paragraph.chartKeyCols;
+            const prevValCols = paragraph.chartValCols;
+
+            if (!_.eq(paragraph.meta, res.columns)) {
+                paragraph.meta = [];
+
+                paragraph.chartColumns = [];
+
+                if (!LegacyUtils.isDefined(paragraph.chartKeyCols))
+                    paragraph.chartKeyCols = [];
+
+                if (!LegacyUtils.isDefined(paragraph.chartValCols))
+                    paragraph.chartValCols = [];
+
+                if (res.columns.length) {
+                    const _key = _.find(res.columns, {fieldName: '_KEY'});
+                    const _val = _.find(res.columns, {fieldName: '_VAL'});
+
+                    paragraph.disabledSystemColumns = !(_key && _val) ||
+                        (res.columns.length === 2 && _key && _val) ||
+                        (res.columns.length === 1 && (_key || _val));
+                }
+
+                paragraph.columnFilter = _columnFilter(paragraph);
+
+                paragraph.meta = res.columns;
+
+                _rebuildColumns(paragraph);
+            }
+
+            paragraph.page = 1;
+
+            paragraph.total = 0;
+
+            paragraph.duration = res.duration;
+
+            paragraph.queryId = res.hasMore ? res.queryId : null;
+
+            paragraph.resNodeId = res.responseNodeId;
+
+            paragraph.setError({message: ''});
+
+            // Prepare explain results for display in table.
+            if (paragraph.queryArgs.query && paragraph.queryArgs.query.startsWith('EXPLAIN') && res.rows) {
+                paragraph.rows = [];
+
+                res.rows.forEach((row, i) => {
+                    const line = res.rows.length - 1 === i ? row[0] : row[0] + '\n';
+
+                    line.replace(/\"/g, '').split('\n').forEach((ln) => paragraph.rows.push([ln]));
+                });
+            }
+            else
+                paragraph.rows = res.rows;
+
+            paragraph.gridOptions.adjustHeight(paragraph.rows.length);
+
+            const chartHistory = paragraph.chartHistory;
+
+            // Clear history on query change.
+            if (clearChart) {
+                chartHistory.length = 0;
+
+                _.forEach(paragraph.charts, (chart) => chart.data.length = 0);
+            }
+
+            // Add results to history.
+            chartHistory.push({tm: new Date(), rows: paragraph.rows});
+
+            // Keep history size no more than max length.
+            while (chartHistory.length > HISTORY_LENGTH)
+                chartHistory.shift();
+
+            _showLoading(paragraph, false);
+
+            if (_.isNil(paragraph.result) || paragraph.result === 'none' || paragraph.scanExplain())
+                paragraph.result = 'table';
+            else if (paragraph.chart()) {
+                let resetCharts = clearChart;
+
+                if (!resetCharts) {
+                    const curKeyCols = paragraph.chartKeyCols;
+                    const curValCols = paragraph.chartValCols;
+
+                    resetCharts = !prevKeyCols || !prevValCols ||
+                        prevKeyCols.length !== curKeyCols.length ||
+                        prevValCols.length !== curValCols.length;
+                }
+
+                _chartApplySettings(paragraph, resetCharts);
+            }
+        };
+
+        const _closeOldQuery = (paragraph) => {
+            const nid = paragraph.resNodeId;
+
+            if (paragraph.queryId && _.find($scope.caches, ({nodes}) => _.find(nodes, {nid: nid.toUpperCase()})))
+                return agentMgr.queryClose(nid, paragraph.queryId);
+
+            return $q.when();
+        };
+
+        /**
+         * @param {String} name Cache name.
+         * @param {Array.<String>} nids Cache name.
+         * @return {Promise<Array.<{nid: string, ip: string, version:string, gridName: string, os: string, client: boolean}>>}
+         */
+        const cacheNodesModel = (name, nids) => {
+            return agentMgr.topology(true)
+                .then((nodes) =>
+                    _.reduce(nodes, (acc, node) => {
+                        if (_.includes(nids, node.nodeId)) {
+                            acc.push({
+                                nid: node.nodeId.toUpperCase(),
+                                ip: _.head(node.attributes['org.apache.ignite.ips'].split(', ')),
+                                version: node.attributes['org.apache.ignite.build.ver'],
+                                gridName: node.attributes['org.apache.ignite.ignite.name'],
+                                os: `${node.attributes['os.name']} ${node.attributes['os.arch']} ${node.attributes['os.version']}`,
+                                client: node.attributes['org.apache.ignite.cache.client']
+                            });
+                        }
+
+                        return acc;
+                    }, [])
+                );
+        };
+
+        /**
+         * @param {string} name Cache name.
+         * @param {boolean} local Local query.
+         * @return {Promise<string>} Nid
+         */
+        const _chooseNode = (name, local) => {
+            if (_.isEmpty(name))
+                return Promise.resolve(null);
+
+            return agentMgr.cacheNodes(name)
+                .then((nids) => {
+                    if (local) {
+                        return cacheNodesModel(name, nids)
+                            .then((nodes) => Nodes.selectNode(nodes, name).catch(() => {}))
+                            .then((selectedNids) => _.head(selectedNids));
+                    }
+
+                    return nids[_.random(0, nids.length - 1)];
+                });
+        };
+
+        const _executeRefresh = (paragraph) => {
+            const args = paragraph.queryArgs;
+
+            agentMgr.awaitCluster()
+                .then(() => _closeOldQuery(paragraph))
+                .then(() => args.localNid || _chooseNode(args.cacheName, false))
+                .then((nid) => agentMgr.querySql(nid, args.cacheName, args.query, args.nonCollocatedJoins,
+                    args.enforceJoinOrder, false, !!args.localNid, args.pageSize, args.lazy, args.collocated))
+                .then((res) => _processQueryResult(paragraph, false, res))
+                .catch((err) => paragraph.setError(err));
+        };
+
+        const _tryStartRefresh = function(paragraph) {
+            _tryStopRefresh(paragraph);
+
+            if (_.get(paragraph, 'rate.installed') && paragraph.queryExecuted()) {
+                $scope.chartAcceptKeyColumn(paragraph, TIME_LINE);
+
+                _executeRefresh(paragraph);
+
+                const delay = paragraph.rate.value * paragraph.rate.unit;
+
+                paragraph.rate.stopTime = $interval(_executeRefresh, delay, 0, false, paragraph);
+            }
+        };
+
+        const addLimit = (query, limitSize) =>
+            `SELECT * FROM (
+            ${query} 
+            ) LIMIT ${limitSize}`;
+
+        $scope.nonCollocatedJoinsAvailable = () => {
+            return Version.since(this.agentMgr.clusterVersion, NON_COLLOCATED_JOINS_SINCE);
+        };
+
+        $scope.collocatedJoinsAvailable = () => {
+            return Version.since(this.agentMgr.clusterVersion, ...COLLOCATED_QUERY_SINCE);
+        };
+
+        $scope.enforceJoinOrderAvailable = () => {
+            return Version.since(this.agentMgr.clusterVersion, ...ENFORCE_JOIN_SINCE);
+        };
+
+        $scope.lazyQueryAvailable = () => {
+            return Version.since(this.agentMgr.clusterVersion, ...LAZY_QUERY_SINCE);
+        };
+
+        $scope.ddlAvailable = () => {
+            return Version.since(this.agentMgr.clusterVersion, ...DDL_SINCE);
+        };
+
+        $scope.cacheNameForSql = (paragraph) => {
+            return $scope.ddlAvailable() && !paragraph.useAsDefaultSchema ? null : paragraph.cacheName;
+        };
+
+        $scope.execute = (paragraph, local = false) => {
+            const nonCollocatedJoins = !!paragraph.nonCollocatedJoins;
+            const enforceJoinOrder = !!paragraph.enforceJoinOrder;
+            const lazy = !!paragraph.lazy;
+            const collocated = !!paragraph.collocated;
+
+            $scope.queryAvailable(paragraph) && _chooseNode(paragraph.cacheName, local)
+                .then((nid) => {
+                    // If we are executing only selected part of query then Notebook shouldn't be saved.
+                    if (!paragraph.partialQuery)
+                        Notebook.save($scope.notebook).catch(Messages.showError);
+
+                    paragraph.localQueryMode = local;
+                    paragraph.prevQuery = paragraph.queryArgs ? paragraph.queryArgs.query : paragraph.query;
+
+                    _showLoading(paragraph, true);
+
+                    return _closeOldQuery(paragraph)
+                        .then(() => {
+                            const query = paragraph.partialQuery || paragraph.query;
+
+                            const args = paragraph.queryArgs = {
+                                type: 'QUERY',
+                                cacheName: $scope.cacheNameForSql(paragraph),
+                                query,
+                                pageSize: paragraph.pageSize,
+                                maxPages: paragraph.maxPages,
+                                nonCollocatedJoins,
+                                enforceJoinOrder,
+                                localNid: local ? nid : null,
+                                lazy,
+                                collocated
+                            };
+
+                            ActivitiesData.post({ group: 'sql', action: '/queries/execute' });
+
+                            const qry = args.maxPages ? addLimit(args.query, args.pageSize * args.maxPages) : query;
+
+                            return agentMgr.querySql(nid, args.cacheName, qry, nonCollocatedJoins, enforceJoinOrder, false, local, args.pageSize, lazy, collocated);
+                        })
+                        .then((res) => {
+                            _processQueryResult(paragraph, true, res);
+
+                            _tryStartRefresh(paragraph);
+                        })
+                        .catch((err) => {
+                            paragraph.setError(err);
+
+                            _showLoading(paragraph, false);
+
+                            $scope.stopRefresh(paragraph);
+                        })
+                        .then(() => paragraph.ace.focus());
+                });
+        };
+
+        const _cancelRefresh = (paragraph) => {
+            if (paragraph.rate && paragraph.rate.stopTime) {
+                delete paragraph.queryArgs;
+
+                paragraph.rate.installed = false;
+
+                $interval.cancel(paragraph.rate.stopTime);
+
+                delete paragraph.rate.stopTime;
+            }
+        };
+
+        $scope.explain = (paragraph) => {
+            const nonCollocatedJoins = !!paragraph.nonCollocatedJoins;
+            const enforceJoinOrder = !!paragraph.enforceJoinOrder;
+            const collocated = !!paragraph.collocated;
+
+            if (!$scope.queryAvailable(paragraph))
+                return;
+
+            if (!paragraph.partialQuery)
+                Notebook.save($scope.notebook).catch(Messages.showError);
+
+            _cancelRefresh(paragraph);
+
+            _showLoading(paragraph, true);
+
+            _closeOldQuery(paragraph)
+                .then(() => _chooseNode(paragraph.cacheName, false))
+                .then((nid) => {
+                    const args = paragraph.queryArgs = {
+                        type: 'EXPLAIN',
+                        cacheName: $scope.cacheNameForSql(paragraph),
+                        query: 'EXPLAIN ' + (paragraph.partialQuery || paragraph.query),
+                        pageSize: paragraph.pageSize
+                    };
+
+                    ActivitiesData.post({ group: 'sql', action: '/queries/explain' });
+
+                    return agentMgr.querySql(nid, args.cacheName, args.query, nonCollocatedJoins, enforceJoinOrder, false, false, args.pageSize, false, collocated);
+                })
+                .then((res) => _processQueryResult(paragraph, true, res))
+                .catch((err) => {
+                    paragraph.setError(err);
+
+                    _showLoading(paragraph, false);
+                })
+                .then(() => paragraph.ace.focus());
+        };
+
+        $scope.scan = (paragraph, local = false) => {
+            const cacheName = paragraph.cacheName;
+            const caseSensitive = !!paragraph.caseSensitive;
+            const filter = paragraph.filter;
+            const pageSize = paragraph.pageSize;
+
+            $scope.scanAvailable(paragraph) && _chooseNode(cacheName, local)
+                .then((nid) => {
+                    paragraph.localQueryMode = local;
+                    paragraph.scanningInProgress = true;
+
+                    Notebook.save($scope.notebook)
+                        .catch(Messages.showError);
+
+                    _cancelRefresh(paragraph);
+
+                    _showLoading(paragraph, true);
+
+                    _closeOldQuery(paragraph)
+                        .then(() => {
+                            paragraph.queryArgs = {
+                                type: 'SCAN',
+                                cacheName,
+                                filter,
+                                regEx: false,
+                                caseSensitive,
+                                near: false,
+                                pageSize,
+                                localNid: local ? nid : null
+                            };
+
+                            ActivitiesData.post({ group: 'sql', action: '/queries/scan' });
+
+                            return agentMgr.queryScan(nid, cacheName, filter, false, caseSensitive, false, local, pageSize);
+                        })
+                        .then((res) => _processQueryResult(paragraph, true, res))
+                        .catch((err) => {
+                            paragraph.setError(err);
+
+                            _showLoading(paragraph, false);
+                        })
+                        .then(() => paragraph.scanningInProgress = false);
+                });
+        };
+
+        function _updatePieChartsWithData(paragraph, newDatum) {
+            $timeout(() => {
+                _.forEach(paragraph.charts, function(chart) {
+                    const chartDatum = chart.data;
+
+                    chartDatum.length = 0;
+
+                    _.forEach(newDatum, function(series) {
+                        if (chart.options.title.text === series.key)
+                            _.forEach(series.values, (v) => chartDatum.push(v));
+                    });
+                });
+
+                _.forEach(paragraph.charts, (chart) => chart.api.update());
+            });
+        }
+
+        $scope.nextPage = (paragraph) => {
+            _showLoading(paragraph, true);
+
+            paragraph.queryArgs.pageSize = paragraph.pageSize;
+
+            agentMgr.queryNextPage(paragraph.resNodeId, paragraph.queryId, paragraph.pageSize)
+                .then((res) => {
+                    paragraph.page++;
+
+                    paragraph.total += paragraph.rows.length;
+
+                    paragraph.duration = res.duration;
+
+                    paragraph.rows = res.rows;
+
+                    if (paragraph.chart()) {
+                        if (paragraph.result === 'pie')
+                            _updatePieChartsWithData(paragraph, _pieChartDatum(paragraph));
+                        else
+                            _updateChartsWithData(paragraph, _chartDatum(paragraph));
+                    }
+
+                    paragraph.gridOptions.adjustHeight(paragraph.rows.length);
+
+                    _showLoading(paragraph, false);
+
+                    if (!res.hasMore)
+                        delete paragraph.queryId;
+                })
+                .catch((err) => {
+                    paragraph.setError(err);
+
+                    _showLoading(paragraph, false);
+                })
+                .then(() => paragraph.ace && paragraph.ace.focus());
+        };
+
+        const _export = (fileName, columnDefs, meta, rows, toClipBoard = false) => {
+            const csvSeparator = this.CSV.getSeparator();
+            let csvContent = '';
+
+            const cols = [];
+            const excludedCols = [];
+
+            _.forEach(meta, (col, idx) => {
+                if (columnDefs[idx].visible)
+                    cols.push(_fullColName(col));
+                else
+                    excludedCols.push(idx);
+            });
+
+            csvContent += cols.join(csvSeparator) + '\n';
+
+            _.forEach(rows, (row) => {
+                cols.length = 0;
+
+                if (Array.isArray(row)) {
+                    _.forEach(row, (elem, idx) => {
+                        if (_.includes(excludedCols, idx))
+                            return;
+
+                        cols.push(_.isUndefined(elem) ? '' : JSON.stringify(elem));
+                    });
+                }
+                else {
+                    _.forEach(columnDefs, (col) => {
+                        if (col.visible) {
+                            const elem = row[col.fieldName];
+
+                            cols.push(_.isUndefined(elem) ? '' : JSON.stringify(elem));
+                        }
+                    });
+                }
+
+                csvContent += cols.join(csvSeparator) + '\n';
+            });
+
+            if (toClipBoard)
+                IgniteCopyToClipboard.copy(csvContent);
+            else
+                LegacyUtils.download('text/csv', fileName, csvContent);
+        };
+
+        /**
+         * Generate file name with query results.
+         *
+         * @param paragraph {Object} Query paragraph .
+         * @param all {Boolean} All result export flag.
+         * @returns {string}
+         */
+        const exportFileName = (paragraph, all) => {
+            const args = paragraph.queryArgs;
+
+            if (args.type === 'SCAN')
+                return `export-scan-${args.cacheName}-${paragraph.name}${all ? '-all' : ''}.csv`;
+
+            return `export-query-${paragraph.name}${all ? '-all' : ''}.csv`;
+        };
+
+        $scope.exportCsvToClipBoard = (paragraph) => {
+            _export(exportFileName(paragraph, false), paragraph.gridOptions.columnDefs, paragraph.meta, paragraph.rows, true);
+        };
+
+        $scope.exportCsv = function(paragraph) {
+            _export(exportFileName(paragraph, false), paragraph.gridOptions.columnDefs, paragraph.meta, paragraph.rows);
+
+            // paragraph.gridOptions.api.exporter.csvExport(uiGridExporterConstants.ALL, uiGridExporterConstants.VISIBLE);
+        };
+
+        $scope.exportPdf = function(paragraph) {
+            paragraph.gridOptions.api.exporter.pdfExport(uiGridExporterConstants.ALL, uiGridExporterConstants.VISIBLE);
+        };
+
+        $scope.exportCsvAll = (paragraph) => {
+            paragraph.csvIsPreparing = true;
+
+            const args = paragraph.queryArgs;
+
+            return Promise.resolve(args.localNid || _chooseNode(args.cacheName, false))
+                .then((nid) => args.type === 'SCAN'
+                    ? agentMgr.queryScanGetAll(nid, args.cacheName, args.query, !!args.regEx, !!args.caseSensitive, !!args.near, !!args.localNid)
+                    : agentMgr.querySqlGetAll(nid, args.cacheName, args.query, !!args.nonCollocatedJoins, !!args.enforceJoinOrder, false, !!args.localNid, !!args.lazy, !!args.collocated))
+                .then((res) => _export(exportFileName(paragraph, true), paragraph.gridOptions.columnDefs, res.columns, res.rows))
+                .catch(Messages.showError)
+                .then(() => {
+                    paragraph.csvIsPreparing = false;
+
+                    return paragraph.ace && paragraph.ace.focus();
+                });
+        };
+
+        // $scope.exportPdfAll = function(paragraph) {
+        //    $http.post('/api/v1/agent/query/getAll', {query: paragraph.query, cacheName: paragraph.cacheName})
+        //    .then(({data}) {
+        //        _export(paragraph.name + '-all.csv', data.meta, data.rows);
+        //    })
+        //    .catch(Messages.showError);
+        // };
+
+        $scope.rateAsString = function(paragraph) {
+            if (paragraph.rate && paragraph.rate.installed) {
+                const idx = _.findIndex($scope.timeUnit, function(unit) {
+                    return unit.value === paragraph.rate.unit;
+                });
+
+                if (idx >= 0)
+                    return ' ' + paragraph.rate.value + $scope.timeUnit[idx].short;
+
+                paragraph.rate.installed = false;
+            }
+
+            return '';
+        };
+
+        $scope.startRefresh = function(paragraph, value, unit) {
+            paragraph.rate.value = value;
+            paragraph.rate.unit = unit;
+            paragraph.rate.installed = true;
+
+            if (paragraph.queryExecuted() && !paragraph.scanExplain())
+                _tryStartRefresh(paragraph);
+        };
+
+        $scope.stopRefresh = function(paragraph) {
+            paragraph.rate.installed = false;
+
+            _tryStopRefresh(paragraph);
+        };
+
+        $scope.paragraphTimeSpanVisible = function(paragraph) {
+            return paragraph.timeLineSupported() && paragraph.chartTimeLineEnabled();
+        };
+
+        $scope.paragraphTimeLineSpan = function(paragraph) {
+            if (paragraph && paragraph.timeLineSpan)
+                return paragraph.timeLineSpan.toString();
+
+            return '1';
+        };
+
+        $scope.applyChartSettings = function(paragraph) {
+            _chartApplySettings(paragraph, true);
+        };
+
+        $scope.queryAvailable = function(paragraph) {
+            return paragraph.query && !paragraph.loading;
+        };
+
+        $scope.queryTooltip = function(paragraph, action) {
+            if ($scope.queryAvailable(paragraph))
+                return;
+
+            if (paragraph.loading)
+                return 'Waiting for server response';
+
+            return 'Input text to ' + action;
+        };
+
+        $scope.scanAvailable = function(paragraph) {
+            return $scope.caches.length && !(paragraph.loading || paragraph.csvIsPreparing);
+        };
+
+        $scope.scanTooltip = function(paragraph) {
+            if ($scope.scanAvailable(paragraph))
+                return;
+
+            if (paragraph.loading)
+                return 'Waiting for server response';
+
+            return 'Select cache to export scan results';
+        };
+
+        $scope.clickableMetadata = function(node) {
+            return node.type.slice(0, 5) !== 'index';
+        };
+
+        $scope.dblclickMetadata = function(paragraph, node) {
+            paragraph.ace.insert(node.name);
+
+            setTimeout(() => paragraph.ace.focus(), 1);
+        };
+
+        $scope.importMetadata = function() {
+            Loading.start('loadingCacheMetadata');
+
+            $scope.metadata = [];
+
+            agentMgr.metadata()
+                .then((metadata) => {
+                    $scope.metadata = _.sortBy(_.filter(metadata, (meta) => {
+                        const cache = _.find($scope.caches, { value: meta.cacheName });
+
+                        if (cache) {
+                            meta.name = (cache.sqlSchema || '"' + meta.cacheName + '"') + '.' + meta.typeName;
+                            meta.displayName = (cache.sqlSchema || meta.maskedName) + '.' + meta.typeName;
+
+                            if (cache.sqlSchema)
+                                meta.children.unshift({type: 'plain', name: 'cacheName: ' + meta.maskedName, maskedName: meta.maskedName});
+
+                            meta.children.unshift({type: 'plain', name: 'mode: ' + cache.mode, maskedName: meta.maskedName});
+                        }
+
+                        return cache;
+                    }), 'name');
+                })
+                .catch(Messages.showError)
+                .then(() => Loading.finish('loadingCacheMetadata'));
+        };
+
+        $scope.showResultQuery = function(paragraph) {
+            if (!_.isNil(paragraph)) {
+                const scope = $scope.$new();
+
+                if (paragraph.queryArgs.type === 'SCAN') {
+                    scope.title = 'SCAN query';
+
+                    const filter = paragraph.queryArgs.filter;
+
+                    if (_.isEmpty(filter))
+                        scope.content = [`SCAN query for cache: <b>${maskCacheName(paragraph.queryArgs.cacheName, true)}</b>`];
+                    else
+                        scope.content = [`SCAN query for cache: <b>${maskCacheName(paragraph.queryArgs.cacheName, true)}</b> with filter: <b>${filter}</b>`];
+                }
+                else if (paragraph.queryArgs.query .startsWith('EXPLAIN ')) {
+                    scope.title = 'Explain query';
+                    scope.content = paragraph.queryArgs.query.split(/\r?\n/);
+                }
+                else {
+                    scope.title = 'SQL query';
+                    scope.content = paragraph.queryArgs.query.split(/\r?\n/);
+                }
+
+                // Attach duration and selected node info
+                scope.meta = `Duration: ${$filter('duration')(paragraph.duration)}.`;
+                scope.meta += paragraph.localQueryMode ? ` Node ID8: ${id8(paragraph.resNodeId)}` : '';
+
+                // Show a basic modal from a controller
+                $modal({scope, templateUrl: messageTemplateUrl, show: true});
+            }
+        };
+
+        $scope.showStackTrace = function(paragraph) {
+            if (!_.isNil(paragraph)) {
+                const scope = $scope.$new();
+
+                scope.title = 'Error details';
+                scope.content = [];
+
+                const tab = '&nbsp;&nbsp;&nbsp;&nbsp;';
+
+                const addToTrace = (item) => {
+                    if (nonNil(item)) {
+                        scope.content.push((scope.content.length > 0 ? tab : '') + errorParser.extractFullMessage(item));
+
+                        addToTrace(item.cause);
+
+                        _.forEach(item.suppressed, (sup) => addToTrace(sup));
+                    }
+                };
+
+                addToTrace(paragraph.error.root);
+
+                // Show a basic modal from a controller
+                $modal({scope, templateUrl: messageTemplateUrl, show: true});
+            }
+        };
+    }
+
+    scanActions: QueryActions<Paragraph & {type: 'scan'}> = [
+        {
+            text: 'Scan',
+            click: (p) => this.$scope.scan(p),
+            available: (p) => this.$scope.scanAvailable(p)
+        },
+        {
+            text: 'Scan on selected node',
+            click: (p) => this.$scope.scan(p, true),
+            available: (p) => this.$scope.scanAvailable(p)
+        },
+        {text: 'Rename', click: (p) => this.renameParagraph(p), available: () => true},
+        {text: 'Remove', click: (p) => this.removeParagraph(p), available: () => true}
+    ];
+
+    queryActions: QueryActions<Paragraph & {type: 'query'}> = [
+        {
+            text: 'Execute',
+            click: (p) => this.$scope.execute(p),
+            available: (p) => this.$scope.queryAvailable(p)
+        },
+        {
+            text: 'Execute on selected node',
+            click: (p) => this.$scope.execute(p, true),
+            available: (p) => this.$scope.queryAvailable(p)
+        },
+        {
+            text: 'Explain',
+            click: (p) => this.$scope.explain(p),
+            available: (p) => this.$scope.queryAvailable(p)
+        },
+        {text: 'Rename', click: (p) => this.renameParagraph(p), available: () => true},
+        {text: 'Remove', click: (p) => this.removeParagraph(p), available: () => true}
+    ];
+
+    async renameParagraph(paragraph: Paragraph) {
+        try {
+            const newName = await this.IgniteInput.input('Rename Query', 'New query name:', paragraph.name);
+
+            if (paragraph.name !== newName) {
+                paragraph.name = newName;
+
+                this.$scope.rebuildScrollParagraphs();
+
+                await this.Notebook.save(this.$scope.notebook)
+                    .catch(this.Messages.showError);
+            }
+        }
+        catch (ignored) {
+            // No-op.
+        }
+    }
+
+    async removeParagraph(paragraph: Paragraph) {
+        try {
+            await this.Confirm.confirm('Are you sure you want to remove query: "' + paragraph.name + '"?');
+            this.$scope.stopRefresh(paragraph);
+
+            const paragraph_idx = _.findIndex(this.$scope.notebook.paragraphs, (item) => paragraph === item);
+            const panel_idx = _.findIndex(this.$scope.expandedParagraphs, (item) => paragraph_idx === item);
+
+            if (panel_idx >= 0)
+                this.$scope.expandedParagraphs.splice(panel_idx, 1);
+
+            this.$scope.notebook.paragraphs.splice(paragraph_idx, 1);
+            this.$scope.rebuildScrollParagraphs();
+
+            await this.Notebook.save(this.$scope.notebook)
+                .catch(this.Messages.showError);
+        }
+        catch (ignored) {
+            // No-op.
+        }
+    }
+
+    isParagraphOpened(index: number) {
+        return this.$scope.notebook.expandedParagraphs.includes(index);
+    }
+
+    onParagraphClose(index: number) {
+        const expanded = this.$scope.notebook.expandedParagraphs;
+        expanded.splice(expanded.indexOf(index), 1);
+    }
+
+    onParagraphOpen(index: number) {
+        this.$scope.notebook.expandedParagraphs.push(index);
+    }
+
+    $onDestroy() {
+        if (this.refresh$)
+            this.refresh$.unsubscribe();
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/e1b8686a/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/index.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/index.js b/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/index.js
index bf93f42..57aa779 100644
--- a/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/index.js
+++ b/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/index.js
@@ -19,9 +19,11 @@ import angular from 'angular';
 import templateUrl from './template.tpl.pug';
 import { NotebookCtrl } from './controller';
 import NotebookData from '../../notebook.data';
+import {component as actions} from './components/query-actions-button/component';
 import './style.scss';
 
 export default angular.module('ignite-console.sql.notebook', [])
+    .component('queryActionsButton', actions)
     .component('queriesNotebook', {
         controller: NotebookCtrl,
         templateUrl

http://git-wip-us.apache.org/repos/asf/ignite/blob/e1b8686a/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/template.tpl.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/template.tpl.pug b/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/template.tpl.pug
index af673a8..e2c4408 100644
--- a/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/template.tpl.pug
+++ b/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/template.tpl.pug
@@ -71,24 +71,6 @@ mixin notebook-error
     label.col-sm-12 Notebook not accessible any more. Go back to notebooks list.
     button.h3.btn.btn-primary(ui-sref='default-state') Leave Notebook
 
-mixin paragraph-rename
-    .col-sm-6(ng-hide='paragraph.edit')
-        i.fa(ng-class='paragraphExpanded(paragraph) ? "fa-chevron-circle-down" : "fa-chevron-circle-right"')
-        label {{paragraph.name}}
-
-        .btn-group(ng-hide='notebook.paragraphs.length > 1')
-            +btn-toolbar('fa-pencil', 'paragraph.edit = true; paragraph.editName = paragraph.name; $event.stopPropagation();', 'Rename query', 'paragraph-name-{{paragraph.id}}')
-
-        .btn-group(ng-show='notebook.paragraphs.length > 1' ng-click='$event.stopPropagation();')
-            +btn-toolbar('fa-pencil', 'paragraph.edit = true; paragraph.editName = paragraph.name;', 'Rename query', 'paragraph-name-{{paragraph.id}}')
-            +btn-toolbar('fa-remove', 'removeParagraph(paragraph)', 'Remove query')
-
-    .col-sm-6(ng-show='paragraph.edit')
-        i.tipLabel.fa(style='float: left;' ng-class='paragraphExpanded(paragraph) ? "fa-chevron-circle-down" : "fa-chevron-circle-right"')
-        i.tipLabel.fa.fa-floppy-o(style='float: right;' ng-show='paragraph.editName' ng-click='renameParagraph(paragraph, paragraph.editName); $event.stopPropagation();' bs-tooltip data-title='Save query name' data-trigger='hover')
-        .input-tip
-            input.form-control(id='paragraph-name-{{paragraph.id}}' ng-model='paragraph.editName' required ng-click='$event.stopPropagation();' ignite-on-enter='renameParagraph(paragraph, paragraph.editName)' ignite-on-escape='paragraph.edit = false')
-
 mixin query-settings
     div
         .form-field--inline(
@@ -314,10 +296,10 @@ mixin chart-result
         label.margin-top-dflt Charts do not support #[b Explain] and #[b Scan] query
 
 mixin paragraph-scan
-    .panel-heading(bs-collapse-toggle)
-        .row
-            +paragraph-rename
-    .panel-collapse(role='tabpanel' bs-collapse-target)
+    panel-title {{ paragraph.name }}
+    panel-actions
+        query-actions-button(actions='$ctrl.scanActions' item='paragraph')
+    panel-content
         .col-sm-12.sql-controls
             .col-sm-3
                 +form-field__dropdown({
@@ -378,9 +360,10 @@ mixin paragraph-scan
                     a Next
 
 mixin paragraph-query
-    .row.panel-heading(bs-collapse-toggle)
-        +paragraph-rename
-    .panel-collapse.ng-animate-disabled(role='tabpanel' bs-collapse-target)
+    panel-title {{ paragraph.name }}
+    panel-actions
+        query-actions-button(actions='$ctrl.queryActions' item='paragraph')
+    panel-content
         .col-sm-12
             .col-xs-8.col-sm-9(style='border-right: 1px solid #eee')
                 .sql-editor(ignite-ace='{onLoad: aceInit(paragraph), theme: "chrome", mode: "sql", require: ["ace/ext/language_tools"],' +
@@ -510,10 +493,19 @@ div
 
     div(ng-if='notebook' ignite-loading='sqlLoading' ignite-loading-text='{{ loadingText }}' ignite-loading-position='top')
         .docs-body.paragraphs
-            .panel-group(bs-collapse ng-model='notebook.expandedParagraphs' data-allow-multiple='true' data-start-collapsed='false')
-
+            .panel-group
                 .panel-paragraph(ng-repeat='paragraph in notebook.paragraphs' id='{{paragraph.id}}' ng-form='form_{{paragraph.id}}')
-                    .panel.panel-default(ng-if='paragraph.qryType === "scan"')
+                    panel-collapsible(
+                        ng-if='paragraph.qryType === "scan"'
+                        opened='$ctrl.isParagraphOpened($index)'
+                        on-close='$ctrl.onParagraphClose($index)'
+                        on-open='$ctrl.onParagraphOpen($index)'
+                    )
                         +paragraph-scan
-                    .panel.panel-default(ng-if='paragraph.qryType === "query"')
+                    panel-collapsible(
+                        ng-if='paragraph.qryType === "query"'
+                        opened='$ctrl.isParagraphOpened($index)'
+                        on-close='$ctrl.onParagraphClose($index)'
+                        on-open='$ctrl.onParagraphOpen($index)'
+                    )
                         +paragraph-query


[19/37] ignite git commit: IGNITE-10552 Web Agent: Improve logging when cluster topology changed.

Posted by ak...@apache.org.
IGNITE-10552 Web Agent: Improve logging when cluster topology changed.


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

Branch: refs/heads/ignite-10189
Commit: 4884dec6c8c2e3698d289e4be6c177477d091adc
Parents: 025a036
Author: Alexey Kuznetsov <ak...@apache.org>
Authored: Fri Dec 7 14:07:28 2018 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Fri Dec 7 14:07:28 2018 +0700

----------------------------------------------------------------------
 .../console/agent/handlers/ClusterListener.java | 10 ++++++++
 .../ignite/console/agent/rest/RestExecutor.java | 24 ++++++++++++--------
 2 files changed, 25 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/4884dec6/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/handlers/ClusterListener.java
----------------------------------------------------------------------
diff --git a/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/handlers/ClusterListener.java b/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/handlers/ClusterListener.java
index 6985837..14d3d5d 100644
--- a/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/handlers/ClusterListener.java
+++ b/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/handlers/ClusterListener.java
@@ -368,6 +368,14 @@ public class ClusterListener implements AutoCloseable {
         boolean differentCluster(TopologySnapshot prev) {
             return prev == null || F.isEmpty(prev.nids) || Collections.disjoint(nids, prev.nids);
         }
+
+        /**
+         * @param prev Previous topology.
+         * @return {@code true} in case if current topology is the same cluster, but topology changed.
+         */
+        boolean topologyChanged(TopologySnapshot prev) {
+            return prev != null && !prev.nids.equals(nids);
+        }
     }
 
     /** */
@@ -495,6 +503,8 @@ public class ClusterListener implements AutoCloseable {
 
                         if (newTop.differentCluster(top))
                             log.info("Connection successfully established to cluster with nodes: " + newTop.nid8());
+                        else if (newTop.topologyChanged(top))
+                            log.info("Cluster topology changed, new topology: " + newTop.nid8());
 
                         boolean active = active(newTop.clusterVersion(), F.first(newTop.getNids()));
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/4884dec6/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/rest/RestExecutor.java
----------------------------------------------------------------------
diff --git a/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/rest/RestExecutor.java b/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/rest/RestExecutor.java
index 737b966..d3bdcdd 100644
--- a/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/rest/RestExecutor.java
+++ b/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/rest/RestExecutor.java
@@ -141,10 +141,11 @@ public class RestExecutor implements AutoCloseable {
 
     /** */
     private RestResult sendRequest(String url, Map<String, Object> params, Map<String, Object> headers) throws IOException {
-        HttpUrl httpUrl = HttpUrl.parse(url);
-
-        HttpUrl.Builder urlBuilder = httpUrl.newBuilder()
-            .addPathSegment("ignite");
+        HttpUrl httpUrl = HttpUrl
+            .parse(url)
+            .newBuilder()
+            .addPathSegment("ignite")
+            .build();
 
         final Request.Builder reqBuilder = new Request.Builder();
 
@@ -163,8 +164,7 @@ public class RestExecutor implements AutoCloseable {
             }
         }
 
-        reqBuilder.url(urlBuilder.build())
-            .post(bodyParams.build());
+        reqBuilder.url(httpUrl).post(bodyParams.build());
 
         try (Response resp = httpClient.newCall(reqBuilder.build()).execute()) {
             return parseResponse(resp);
@@ -175,14 +175,20 @@ public class RestExecutor implements AutoCloseable {
     public RestResult sendRequest(List<String> nodeURIs, Map<String, Object> params, Map<String, Object> headers) throws IOException {
         Integer startIdx = startIdxs.getOrDefault(nodeURIs, 0);
 
-        for (int i = 0;  i < nodeURIs.size(); i++) {
-            Integer currIdx = (startIdx + i) % nodeURIs.size();
+        int urlsCnt = nodeURIs.size();
+
+        for (int i = 0;  i < urlsCnt; i++) {
+            Integer currIdx = (startIdx + i) % urlsCnt;
 
             String nodeUrl = nodeURIs.get(currIdx);
 
             try {
                 RestResult res = sendRequest(nodeUrl, params, headers);
 
+                // If first attempt failed then throttling should be cleared.
+                if (i > 0)
+                    LT.clear();
+
                 LT.info(log, "Connected to cluster [url=" + nodeUrl + "]");
 
                 startIdxs.put(nodeURIs, currIdx);
@@ -190,7 +196,7 @@ public class RestExecutor implements AutoCloseable {
                 return res;
             }
             catch (ConnectException ignored) {
-                // No-op.
+                LT.warn(log, "Failed to connect to cluster [url=" + nodeUrl + "]");
             }
         }
 


[36/37] ignite git commit: IGNITE-10382: [ML] Move datasets from example to ml module

Posted by ak...@apache.org.
IGNITE-10382: [ML] Move datasets from example to ml module

This closes #5589


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

Branch: refs/heads/ignite-10189
Commit: 86a788f3197fc97d4702415f88afa5a5d7e66e9e
Parents: 7f3f6b5
Author: zaleslaw <za...@gmail.com>
Authored: Mon Dec 10 08:11:08 2018 +0300
Committer: Yury Babak <yb...@gridgain.com>
Committed: Mon Dec 10 08:11:08 2018 +0300

----------------------------------------------------------------------
 .../clustering/KMeansClusterizationExample.java |    4 +-
 ...niteFunctionDistributedInferenceExample.java |    4 +-
 .../ml/knn/KNNClassificationExample.java        |    4 +-
 .../examples/ml/knn/KNNRegressionExample.java   |    4 +-
 .../GaussianNaiveBayesTrainerExample.java       |    4 +-
 .../LinearRegressionLSQRTrainerExample.java     |    4 +-
 ...ssionLSQRTrainerWithMinMaxScalerExample.java |    4 +-
 .../LinearRegressionSGDTrainerExample.java      |    4 +-
 ...ggedLogisticRegressionSGDTrainerExample.java |    4 +-
 .../LogisticRegressionSGDTrainerExample.java    |    4 +-
 .../split/TrainTestDatasetSplitterExample.java  |    4 +-
 .../ml/svm/SVMBinaryClassificationExample.java  |    4 +-
 .../GDBOnTreesRegressionTrainerExample.java     |    2 +-
 .../RandomForestClassificationExample.java      |    4 +-
 .../RandomForestRegressionExample.java          |    4 +-
 .../examples/ml/util/MLSandboxDatasets.java     |   87 --
 .../ignite/examples/ml/util/SandboxMLCache.java |  133 --
 .../datasets/boston_housing_dataset.txt         |  505 -------
 .../resources/datasets/cleared_machines.csv     |  209 ---
 .../resources/datasets/glass_identification.csv |  116 --
 examples/src/main/resources/datasets/iris.txt   |  150 --
 .../main/resources/datasets/mortalitydata.csv   |   53 -
 .../resources/datasets/two_classed_iris.csv     |  100 --
 examples/src/main/resources/datasets/wine.txt   |  178 ---
 .../ignite/ml/util/MLSandboxDatasets.java       |   87 ++
 .../apache/ignite/ml/util/SandboxMLCache.java   |  133 ++
 .../datasets/boston_housing_dataset.txt         |  505 +++++++
 .../resources/datasets/cleared_machines.csv     |  209 +++
 .../resources/datasets/glass_identification.csv |  116 ++
 modules/ml/src/main/resources/datasets/iris.txt |  150 ++
 .../main/resources/datasets/mortalitydata.csv   |   53 +
 .../ml/src/main/resources/datasets/titanic.csv  | 1310 ++++++++++++++++++
 .../resources/datasets/two_classed_iris.csv     |  100 ++
 modules/ml/src/main/resources/datasets/wine.txt |  178 +++
 34 files changed, 2870 insertions(+), 1560 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/86a788f3/examples/src/main/java/org/apache/ignite/examples/ml/clustering/KMeansClusterizationExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/clustering/KMeansClusterizationExample.java b/examples/src/main/java/org/apache/ignite/examples/ml/clustering/KMeansClusterizationExample.java
index 3c8eeaa..44c4256 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ml/clustering/KMeansClusterizationExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ml/clustering/KMeansClusterizationExample.java
@@ -24,12 +24,12 @@ import org.apache.ignite.IgniteCache;
 import org.apache.ignite.Ignition;
 import org.apache.ignite.cache.query.QueryCursor;
 import org.apache.ignite.cache.query.ScanQuery;
-import org.apache.ignite.examples.ml.util.MLSandboxDatasets;
-import org.apache.ignite.examples.ml.util.SandboxMLCache;
 import org.apache.ignite.ml.clustering.kmeans.KMeansModel;
 import org.apache.ignite.ml.clustering.kmeans.KMeansTrainer;
 import org.apache.ignite.ml.math.Tracer;
 import org.apache.ignite.ml.math.primitives.vector.Vector;
+import org.apache.ignite.ml.util.MLSandboxDatasets;
+import org.apache.ignite.ml.util.SandboxMLCache;
 
 /**
  * Run KMeans clustering algorithm ({@link KMeansTrainer}) over distributed dataset.

http://git-wip-us.apache.org/repos/asf/ignite/blob/86a788f3/examples/src/main/java/org/apache/ignite/examples/ml/inference/IgniteFunctionDistributedInferenceExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/inference/IgniteFunctionDistributedInferenceExample.java b/examples/src/main/java/org/apache/ignite/examples/ml/inference/IgniteFunctionDistributedInferenceExample.java
index da9d543..380b8e6 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ml/inference/IgniteFunctionDistributedInferenceExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ml/inference/IgniteFunctionDistributedInferenceExample.java
@@ -27,8 +27,6 @@ import org.apache.ignite.Ignition;
 import org.apache.ignite.cache.query.QueryCursor;
 import org.apache.ignite.cache.query.ScanQuery;
 import org.apache.ignite.examples.ml.regression.linear.LinearRegressionLSQRTrainerExample;
-import org.apache.ignite.examples.ml.util.MLSandboxDatasets;
-import org.apache.ignite.examples.ml.util.SandboxMLCache;
 import org.apache.ignite.ml.inference.InfModel;
 import org.apache.ignite.ml.inference.builder.IgniteDistributedInfModelBuilder;
 import org.apache.ignite.ml.inference.parser.IgniteFunctionInfModelParser;
@@ -38,6 +36,8 @@ import org.apache.ignite.ml.inference.reader.InfModelReader;
 import org.apache.ignite.ml.math.primitives.vector.Vector;
 import org.apache.ignite.ml.regressions.linear.LinearRegressionLSQRTrainer;
 import org.apache.ignite.ml.regressions.linear.LinearRegressionModel;
+import org.apache.ignite.ml.util.MLSandboxDatasets;
+import org.apache.ignite.ml.util.SandboxMLCache;
 
 /**
  * This example is based on {@link LinearRegressionLSQRTrainerExample}, but to perform inference it uses an approach

http://git-wip-us.apache.org/repos/asf/ignite/blob/86a788f3/examples/src/main/java/org/apache/ignite/examples/ml/knn/KNNClassificationExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/knn/KNNClassificationExample.java b/examples/src/main/java/org/apache/ignite/examples/ml/knn/KNNClassificationExample.java
index 31ecdac..647f187 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ml/knn/KNNClassificationExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ml/knn/KNNClassificationExample.java
@@ -24,13 +24,13 @@ import org.apache.ignite.IgniteCache;
 import org.apache.ignite.Ignition;
 import org.apache.ignite.cache.query.QueryCursor;
 import org.apache.ignite.cache.query.ScanQuery;
-import org.apache.ignite.examples.ml.util.MLSandboxDatasets;
-import org.apache.ignite.examples.ml.util.SandboxMLCache;
 import org.apache.ignite.ml.knn.NNClassificationModel;
 import org.apache.ignite.ml.knn.classification.KNNClassificationTrainer;
 import org.apache.ignite.ml.knn.classification.NNStrategy;
 import org.apache.ignite.ml.math.distances.EuclideanDistance;
 import org.apache.ignite.ml.math.primitives.vector.Vector;
+import org.apache.ignite.ml.util.MLSandboxDatasets;
+import org.apache.ignite.ml.util.SandboxMLCache;
 
 /**
  * Run kNN multi-class classification trainer ({@link KNNClassificationTrainer}) over distributed dataset.

http://git-wip-us.apache.org/repos/asf/ignite/blob/86a788f3/examples/src/main/java/org/apache/ignite/examples/ml/knn/KNNRegressionExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/knn/KNNRegressionExample.java b/examples/src/main/java/org/apache/ignite/examples/ml/knn/KNNRegressionExample.java
index 9917e80..51cc4ed 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ml/knn/KNNRegressionExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ml/knn/KNNRegressionExample.java
@@ -24,13 +24,13 @@ import org.apache.ignite.IgniteCache;
 import org.apache.ignite.Ignition;
 import org.apache.ignite.cache.query.QueryCursor;
 import org.apache.ignite.cache.query.ScanQuery;
-import org.apache.ignite.examples.ml.util.MLSandboxDatasets;
-import org.apache.ignite.examples.ml.util.SandboxMLCache;
 import org.apache.ignite.ml.knn.classification.NNStrategy;
 import org.apache.ignite.ml.knn.regression.KNNRegressionModel;
 import org.apache.ignite.ml.knn.regression.KNNRegressionTrainer;
 import org.apache.ignite.ml.math.distances.ManhattanDistance;
 import org.apache.ignite.ml.math.primitives.vector.Vector;
+import org.apache.ignite.ml.util.MLSandboxDatasets;
+import org.apache.ignite.ml.util.SandboxMLCache;
 
 /**
  * Run kNN regression trainer ({@link KNNRegressionTrainer}) over distributed dataset.

http://git-wip-us.apache.org/repos/asf/ignite/blob/86a788f3/examples/src/main/java/org/apache/ignite/examples/ml/naivebayes/GaussianNaiveBayesTrainerExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/naivebayes/GaussianNaiveBayesTrainerExample.java b/examples/src/main/java/org/apache/ignite/examples/ml/naivebayes/GaussianNaiveBayesTrainerExample.java
index 7cbc6d1..93b08cb 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ml/naivebayes/GaussianNaiveBayesTrainerExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ml/naivebayes/GaussianNaiveBayesTrainerExample.java
@@ -25,11 +25,11 @@ import org.apache.ignite.IgniteCache;
 import org.apache.ignite.Ignition;
 import org.apache.ignite.cache.query.QueryCursor;
 import org.apache.ignite.cache.query.ScanQuery;
-import org.apache.ignite.examples.ml.util.MLSandboxDatasets;
-import org.apache.ignite.examples.ml.util.SandboxMLCache;
 import org.apache.ignite.ml.math.primitives.vector.Vector;
 import org.apache.ignite.ml.naivebayes.gaussian.GaussianNaiveBayesModel;
 import org.apache.ignite.ml.naivebayes.gaussian.GaussianNaiveBayesTrainer;
+import org.apache.ignite.ml.util.MLSandboxDatasets;
+import org.apache.ignite.ml.util.SandboxMLCache;
 
 /**
  * Run naive Bayes classification model based on <a href="https://en.wikipedia.org/wiki/Naive_Bayes_classifier"> naive

http://git-wip-us.apache.org/repos/asf/ignite/blob/86a788f3/examples/src/main/java/org/apache/ignite/examples/ml/regression/linear/LinearRegressionLSQRTrainerExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/regression/linear/LinearRegressionLSQRTrainerExample.java b/examples/src/main/java/org/apache/ignite/examples/ml/regression/linear/LinearRegressionLSQRTrainerExample.java
index aeb7a0d..e6e2632 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ml/regression/linear/LinearRegressionLSQRTrainerExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ml/regression/linear/LinearRegressionLSQRTrainerExample.java
@@ -24,11 +24,11 @@ import org.apache.ignite.IgniteCache;
 import org.apache.ignite.Ignition;
 import org.apache.ignite.cache.query.QueryCursor;
 import org.apache.ignite.cache.query.ScanQuery;
-import org.apache.ignite.examples.ml.util.MLSandboxDatasets;
-import org.apache.ignite.examples.ml.util.SandboxMLCache;
 import org.apache.ignite.ml.math.primitives.vector.Vector;
 import org.apache.ignite.ml.regressions.linear.LinearRegressionLSQRTrainer;
 import org.apache.ignite.ml.regressions.linear.LinearRegressionModel;
+import org.apache.ignite.ml.util.MLSandboxDatasets;
+import org.apache.ignite.ml.util.SandboxMLCache;
 
 /**
  * Run linear regression model based on <a href="http://web.stanford.edu/group/SOL/software/lsqr/">LSQR algorithm</a>

http://git-wip-us.apache.org/repos/asf/ignite/blob/86a788f3/examples/src/main/java/org/apache/ignite/examples/ml/regression/linear/LinearRegressionLSQRTrainerWithMinMaxScalerExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/regression/linear/LinearRegressionLSQRTrainerWithMinMaxScalerExample.java b/examples/src/main/java/org/apache/ignite/examples/ml/regression/linear/LinearRegressionLSQRTrainerWithMinMaxScalerExample.java
index 873cefb..c60f8fb 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ml/regression/linear/LinearRegressionLSQRTrainerWithMinMaxScalerExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ml/regression/linear/LinearRegressionLSQRTrainerWithMinMaxScalerExample.java
@@ -24,14 +24,14 @@ import org.apache.ignite.IgniteCache;
 import org.apache.ignite.Ignition;
 import org.apache.ignite.cache.query.QueryCursor;
 import org.apache.ignite.cache.query.ScanQuery;
-import org.apache.ignite.examples.ml.util.MLSandboxDatasets;
-import org.apache.ignite.examples.ml.util.SandboxMLCache;
 import org.apache.ignite.ml.math.functions.IgniteBiFunction;
 import org.apache.ignite.ml.math.primitives.vector.Vector;
 import org.apache.ignite.ml.preprocessing.minmaxscaling.MinMaxScalerPreprocessor;
 import org.apache.ignite.ml.preprocessing.minmaxscaling.MinMaxScalerTrainer;
 import org.apache.ignite.ml.regressions.linear.LinearRegressionLSQRTrainer;
 import org.apache.ignite.ml.regressions.linear.LinearRegressionModel;
+import org.apache.ignite.ml.util.MLSandboxDatasets;
+import org.apache.ignite.ml.util.SandboxMLCache;
 
 /**
  * Run linear regression model based on <a href="http://web.stanford.edu/group/SOL/software/lsqr/">LSQR algorithm</a>

http://git-wip-us.apache.org/repos/asf/ignite/blob/86a788f3/examples/src/main/java/org/apache/ignite/examples/ml/regression/linear/LinearRegressionSGDTrainerExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/regression/linear/LinearRegressionSGDTrainerExample.java b/examples/src/main/java/org/apache/ignite/examples/ml/regression/linear/LinearRegressionSGDTrainerExample.java
index 1dad08b..bf235e2 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ml/regression/linear/LinearRegressionSGDTrainerExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ml/regression/linear/LinearRegressionSGDTrainerExample.java
@@ -24,14 +24,14 @@ import org.apache.ignite.IgniteCache;
 import org.apache.ignite.Ignition;
 import org.apache.ignite.cache.query.QueryCursor;
 import org.apache.ignite.cache.query.ScanQuery;
-import org.apache.ignite.examples.ml.util.MLSandboxDatasets;
-import org.apache.ignite.examples.ml.util.SandboxMLCache;
 import org.apache.ignite.ml.math.primitives.vector.Vector;
 import org.apache.ignite.ml.nn.UpdatesStrategy;
 import org.apache.ignite.ml.optimization.updatecalculators.RPropParameterUpdate;
 import org.apache.ignite.ml.optimization.updatecalculators.RPropUpdateCalculator;
 import org.apache.ignite.ml.regressions.linear.LinearRegressionModel;
 import org.apache.ignite.ml.regressions.linear.LinearRegressionSGDTrainer;
+import org.apache.ignite.ml.util.MLSandboxDatasets;
+import org.apache.ignite.ml.util.SandboxMLCache;
 
 /**
  * Run linear regression model based on  based on

http://git-wip-us.apache.org/repos/asf/ignite/blob/86a788f3/examples/src/main/java/org/apache/ignite/examples/ml/regression/logistic/bagged/BaggedLogisticRegressionSGDTrainerExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/regression/logistic/bagged/BaggedLogisticRegressionSGDTrainerExample.java b/examples/src/main/java/org/apache/ignite/examples/ml/regression/logistic/bagged/BaggedLogisticRegressionSGDTrainerExample.java
index 98745a4..757efd2 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ml/regression/logistic/bagged/BaggedLogisticRegressionSGDTrainerExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ml/regression/logistic/bagged/BaggedLogisticRegressionSGDTrainerExample.java
@@ -22,8 +22,6 @@ import java.util.Arrays;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.Ignition;
-import org.apache.ignite.examples.ml.util.MLSandboxDatasets;
-import org.apache.ignite.examples.ml.util.SandboxMLCache;
 import org.apache.ignite.ml.composition.ModelsComposition;
 import org.apache.ignite.ml.composition.predictionsaggregator.OnMajorityPredictionsAggregator;
 import org.apache.ignite.ml.math.primitives.vector.Vector;
@@ -35,6 +33,8 @@ import org.apache.ignite.ml.selection.cv.CrossValidation;
 import org.apache.ignite.ml.selection.scoring.metric.Accuracy;
 import org.apache.ignite.ml.trainers.DatasetTrainer;
 import org.apache.ignite.ml.trainers.TrainerTransformers;
+import org.apache.ignite.ml.util.MLSandboxDatasets;
+import org.apache.ignite.ml.util.SandboxMLCache;
 
 /**
  * This example shows how bagging technique may be applied to arbitrary trainer.

http://git-wip-us.apache.org/repos/asf/ignite/blob/86a788f3/examples/src/main/java/org/apache/ignite/examples/ml/regression/logistic/binary/LogisticRegressionSGDTrainerExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/regression/logistic/binary/LogisticRegressionSGDTrainerExample.java b/examples/src/main/java/org/apache/ignite/examples/ml/regression/logistic/binary/LogisticRegressionSGDTrainerExample.java
index 8530045..aa62912 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ml/regression/logistic/binary/LogisticRegressionSGDTrainerExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ml/regression/logistic/binary/LogisticRegressionSGDTrainerExample.java
@@ -25,14 +25,14 @@ import org.apache.ignite.IgniteCache;
 import org.apache.ignite.Ignition;
 import org.apache.ignite.cache.query.QueryCursor;
 import org.apache.ignite.cache.query.ScanQuery;
-import org.apache.ignite.examples.ml.util.MLSandboxDatasets;
-import org.apache.ignite.examples.ml.util.SandboxMLCache;
 import org.apache.ignite.ml.math.primitives.vector.Vector;
 import org.apache.ignite.ml.nn.UpdatesStrategy;
 import org.apache.ignite.ml.optimization.updatecalculators.SimpleGDParameterUpdate;
 import org.apache.ignite.ml.optimization.updatecalculators.SimpleGDUpdateCalculator;
 import org.apache.ignite.ml.regressions.logistic.LogisticRegressionModel;
 import org.apache.ignite.ml.regressions.logistic.LogisticRegressionSGDTrainer;
+import org.apache.ignite.ml.util.MLSandboxDatasets;
+import org.apache.ignite.ml.util.SandboxMLCache;
 
 /**
  * Run logistic regression model based on <a href="https://en.wikipedia.org/wiki/Stochastic_gradient_descent">

http://git-wip-us.apache.org/repos/asf/ignite/blob/86a788f3/examples/src/main/java/org/apache/ignite/examples/ml/selection/split/TrainTestDatasetSplitterExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/selection/split/TrainTestDatasetSplitterExample.java b/examples/src/main/java/org/apache/ignite/examples/ml/selection/split/TrainTestDatasetSplitterExample.java
index 4bfd993..0a681ce 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ml/selection/split/TrainTestDatasetSplitterExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ml/selection/split/TrainTestDatasetSplitterExample.java
@@ -24,13 +24,13 @@ import org.apache.ignite.IgniteCache;
 import org.apache.ignite.Ignition;
 import org.apache.ignite.cache.query.QueryCursor;
 import org.apache.ignite.cache.query.ScanQuery;
-import org.apache.ignite.examples.ml.util.MLSandboxDatasets;
-import org.apache.ignite.examples.ml.util.SandboxMLCache;
 import org.apache.ignite.ml.math.primitives.vector.Vector;
 import org.apache.ignite.ml.regressions.linear.LinearRegressionLSQRTrainer;
 import org.apache.ignite.ml.regressions.linear.LinearRegressionModel;
 import org.apache.ignite.ml.selection.split.TrainTestDatasetSplitter;
 import org.apache.ignite.ml.selection.split.TrainTestSplit;
+import org.apache.ignite.ml.util.MLSandboxDatasets;
+import org.apache.ignite.ml.util.SandboxMLCache;
 
 /**
  * Run linear regression model over dataset split on train and test subsets ({@link TrainTestDatasetSplitter}).

http://git-wip-us.apache.org/repos/asf/ignite/blob/86a788f3/examples/src/main/java/org/apache/ignite/examples/ml/svm/SVMBinaryClassificationExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/svm/SVMBinaryClassificationExample.java b/examples/src/main/java/org/apache/ignite/examples/ml/svm/SVMBinaryClassificationExample.java
index d9d1805..48e7f9a 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ml/svm/SVMBinaryClassificationExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ml/svm/SVMBinaryClassificationExample.java
@@ -25,11 +25,11 @@ import org.apache.ignite.IgniteCache;
 import org.apache.ignite.Ignition;
 import org.apache.ignite.cache.query.QueryCursor;
 import org.apache.ignite.cache.query.ScanQuery;
-import org.apache.ignite.examples.ml.util.MLSandboxDatasets;
-import org.apache.ignite.examples.ml.util.SandboxMLCache;
 import org.apache.ignite.ml.math.primitives.vector.Vector;
 import org.apache.ignite.ml.svm.SVMLinearClassificationModel;
 import org.apache.ignite.ml.svm.SVMLinearClassificationTrainer;
+import org.apache.ignite.ml.util.MLSandboxDatasets;
+import org.apache.ignite.ml.util.SandboxMLCache;
 
 /**
  * Run SVM binary-class classification model ({@link SVMLinearClassificationModel}) over distributed dataset.

http://git-wip-us.apache.org/repos/asf/ignite/blob/86a788f3/examples/src/main/java/org/apache/ignite/examples/ml/tree/boosting/GDBOnTreesRegressionTrainerExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/tree/boosting/GDBOnTreesRegressionTrainerExample.java b/examples/src/main/java/org/apache/ignite/examples/ml/tree/boosting/GDBOnTreesRegressionTrainerExample.java
index 482a47c..c119c9a 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ml/tree/boosting/GDBOnTreesRegressionTrainerExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ml/tree/boosting/GDBOnTreesRegressionTrainerExample.java
@@ -44,7 +44,7 @@ public class GDBOnTreesRegressionTrainerExample {
      *
      * @param args Command line arguments, none required.
      */
-    public static void main(String... args) throws InterruptedException {
+    public static void main(String... args) {
         System.out.println();
         System.out.println(">>> GDB regression trainer example started.");
         // Start ignite grid.

http://git-wip-us.apache.org/repos/asf/ignite/blob/86a788f3/examples/src/main/java/org/apache/ignite/examples/ml/tree/randomforest/RandomForestClassificationExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/tree/randomforest/RandomForestClassificationExample.java b/examples/src/main/java/org/apache/ignite/examples/ml/tree/randomforest/RandomForestClassificationExample.java
index 83a78d3..ac578df 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ml/tree/randomforest/RandomForestClassificationExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ml/tree/randomforest/RandomForestClassificationExample.java
@@ -27,13 +27,13 @@ import org.apache.ignite.IgniteCache;
 import org.apache.ignite.Ignition;
 import org.apache.ignite.cache.query.QueryCursor;
 import org.apache.ignite.cache.query.ScanQuery;
-import org.apache.ignite.examples.ml.util.MLSandboxDatasets;
-import org.apache.ignite.examples.ml.util.SandboxMLCache;
 import org.apache.ignite.ml.composition.ModelsComposition;
 import org.apache.ignite.ml.dataset.feature.FeatureMeta;
 import org.apache.ignite.ml.math.primitives.vector.Vector;
 import org.apache.ignite.ml.tree.randomforest.RandomForestClassifierTrainer;
 import org.apache.ignite.ml.tree.randomforest.data.FeaturesCountSelectionStrategies;
+import org.apache.ignite.ml.util.MLSandboxDatasets;
+import org.apache.ignite.ml.util.SandboxMLCache;
 
 /**
  * Example represents a solution for the task of wine classification based on a

http://git-wip-us.apache.org/repos/asf/ignite/blob/86a788f3/examples/src/main/java/org/apache/ignite/examples/ml/tree/randomforest/RandomForestRegressionExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/tree/randomforest/RandomForestRegressionExample.java b/examples/src/main/java/org/apache/ignite/examples/ml/tree/randomforest/RandomForestRegressionExample.java
index a3c33cb..1754b7c 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ml/tree/randomforest/RandomForestRegressionExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ml/tree/randomforest/RandomForestRegressionExample.java
@@ -27,8 +27,6 @@ import org.apache.ignite.IgniteCache;
 import org.apache.ignite.Ignition;
 import org.apache.ignite.cache.query.QueryCursor;
 import org.apache.ignite.cache.query.ScanQuery;
-import org.apache.ignite.examples.ml.util.MLSandboxDatasets;
-import org.apache.ignite.examples.ml.util.SandboxMLCache;
 import org.apache.ignite.ml.composition.ModelsComposition;
 import org.apache.ignite.ml.dataset.feature.FeatureMeta;
 import org.apache.ignite.ml.environment.LearningEnvironmentBuilder;
@@ -38,6 +36,8 @@ import org.apache.ignite.ml.environment.parallelism.ParallelismStrategy;
 import org.apache.ignite.ml.math.primitives.vector.Vector;
 import org.apache.ignite.ml.tree.randomforest.RandomForestRegressionTrainer;
 import org.apache.ignite.ml.tree.randomforest.data.FeaturesCountSelectionStrategies;
+import org.apache.ignite.ml.util.MLSandboxDatasets;
+import org.apache.ignite.ml.util.SandboxMLCache;
 
 /**
  * Example represents a solution for the task of price predictions for houses in Boston based on a

http://git-wip-us.apache.org/repos/asf/ignite/blob/86a788f3/examples/src/main/java/org/apache/ignite/examples/ml/util/MLSandboxDatasets.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/util/MLSandboxDatasets.java b/examples/src/main/java/org/apache/ignite/examples/ml/util/MLSandboxDatasets.java
deleted file mode 100644
index b7380e0..0000000
--- a/examples/src/main/java/org/apache/ignite/examples/ml/util/MLSandboxDatasets.java
+++ /dev/null
@@ -1,87 +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.examples.ml.util;
-
-/**
- * The names of popular datasets used in examples.
- */
-public enum MLSandboxDatasets {
-    /** The full Iris dataset from Machine Learning Repository. */
-    IRIS("examples/src/main/resources/datasets/iris.txt", false, "\t"),
-
-    /** The Titanic dataset from Kaggle competition. */
-    TITANIC("examples/src/main/resources/datasets/titanic.csv", true, ";"),
-
-    /** The 1st and 2nd classes from the Iris dataset. */
-    TWO_CLASSED_IRIS("examples/src/main/resources/datasets/two_classed_iris.csv", false, "\t"),
-
-    /** The dataset is about different computers' properties based on https://archive.ics.uci.edu/ml/datasets/Computer+Hardware. */
-    CLEARED_MACHINES("examples/src/main/resources/datasets/cleared_machines.csv", false, ";"),
-
-    /**
-     * The health data is related to death rate based on; doctor availability, hospital availability,
-     * annual per capita income, and population density people per square mile.
-     */
-    MORTALITY_DATA("examples/src/main/resources/datasets/mortalitydata.csv", false, ";"),
-
-    /**
-     * The preprocessed Glass dataset from the Machine Learning Repository https://archive.ics.uci.edu/ml/datasets/Glass+Identification
-     * There are 3 classes with labels: 1 {building_windows_float_processed}, 3 {vehicle_windows_float_processed}, 7 {headlamps}.
-     * Feature names: 'Na-Sodium', 'Mg-Magnesium', 'Al-Aluminum', 'Ba-Barium', 'Fe-Iron'.
-     */
-    GLASS_IDENTIFICATION("examples/src/main/resources/datasets/glass_identification.csv", false, ";"),
-
-    /** The Wine recognition data. Could be found <a href="https://archive.ics.uci.edu/ml/machine-learning-databases/wine/">here</a>. */
-    WINE_RECOGNITION("examples/src/main/resources/datasets/wine.txt", false, ","),
-
-    /** The Boston house-prices dataset. Could be found <a href="https://archive.ics.uci.edu/ml/machine-learning-databases/housing/">here</a>. */
-    BOSTON_HOUSE_PRICES("examples/src/main/resources/datasets/boston_housing_dataset.txt", false, ",");
-
-    /** Filename. */
-    private final String filename;
-
-    /** The csv file has header. */
-    private final boolean hasHeader;
-
-    /** The separator between words. */
-    private final String separator;
-
-    /**
-     * @param filename Filename.
-     * @param hasHeader The csv file has header.
-     * @param separator The special sign to separate the line on words.
-     */
-    MLSandboxDatasets(final String filename, boolean hasHeader, String separator) {
-        this.filename = filename;
-        this.hasHeader = hasHeader;
-        this.separator = separator;
-    }
-
-    /** */
-    public String getFileName() { return filename; }
-
-    /** */
-    public boolean hasHeader() {
-        return hasHeader;
-    }
-
-    /** */
-    public String getSeparator() {
-        return separator;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/86a788f3/examples/src/main/java/org/apache/ignite/examples/ml/util/SandboxMLCache.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/util/SandboxMLCache.java b/examples/src/main/java/org/apache/ignite/examples/ml/util/SandboxMLCache.java
deleted file mode 100644
index 20b22ef..0000000
--- a/examples/src/main/java/org/apache/ignite/examples/ml/util/SandboxMLCache.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.examples.ml.util;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.nio.file.Paths;
-import java.text.NumberFormat;
-import java.text.ParseException;
-import java.util.Locale;
-import java.util.Scanner;
-import java.util.UUID;
-import org.apache.ignite.Ignite;
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.internal.util.IgniteUtils;
-import org.apache.ignite.ml.math.exceptions.knn.FileParsingException;
-import org.apache.ignite.ml.math.primitives.vector.Vector;
-import org.apache.ignite.ml.math.primitives.vector.VectorUtils;
-
-
-/**
- * Common utility code used in some ML examples to set up test cache.
- */
-public class SandboxMLCache {
-    /** */
-    private final Ignite ignite;
-
-    /** */
-    public SandboxMLCache(Ignite ignite) {
-        this.ignite = ignite;
-    }
-
-    /**
-     * Fills cache with data and returns it.
-     *
-     * @param data Data to fill the cache with.
-     * @return Filled Ignite Cache.
-     */
-    public IgniteCache<Integer, double[]> fillCacheWith(double[][] data) {
-        CacheConfiguration<Integer, double[]> cacheConfiguration = new CacheConfiguration<>();
-        cacheConfiguration.setName("TEST_" + UUID.randomUUID());
-        cacheConfiguration.setAffinity(new RendezvousAffinityFunction(false, 10));
-
-        IgniteCache<Integer, double[]> cache = ignite.createCache(cacheConfiguration);
-
-        for (int i = 0; i < data.length; i++)
-            cache.put(i, data[i]);
-
-        return cache;
-    }
-
-    /**
-     * Fills cache with data and returns it.
-     *
-     * @param dataset The chosen dataset.
-     * @return Filled Ignite Cache.
-     * @throws FileNotFoundException If file not found.
-     */
-    public IgniteCache<Integer, Vector> fillCacheWith(MLSandboxDatasets dataset) throws FileNotFoundException {
-
-        IgniteCache<Integer, Vector> cache = getCache();
-
-        String fileName = dataset.getFileName();
-
-        File file = IgniteUtils.resolveIgnitePath(fileName);
-
-        if (file == null)
-            throw new FileNotFoundException(fileName);
-
-        Scanner scanner = new Scanner(file);
-
-        int cnt = 0;
-        while (scanner.hasNextLine()) {
-            String row = scanner.nextLine();
-            if(dataset.hasHeader() && cnt == 0) {
-                cnt++;
-                continue;
-            }
-
-            String[] cells = row.split(dataset.getSeparator());
-
-            double[] data = new double[cells.length];
-            NumberFormat format = NumberFormat.getInstance(Locale.FRANCE);
-
-            for (int i = 0; i < cells.length; i++)
-                try{
-                    if(cells[i].equals("")) data[i] = Double.NaN;
-                    else data[i] = Double.valueOf(cells[i]);
-                } catch (java.lang.NumberFormatException e) {
-                    try {
-                        data[i] = format.parse(cells[i]).doubleValue();
-                    }
-                    catch (ParseException e1) {
-                        throw new FileParsingException(cells[i], i, Paths.get(dataset.getFileName()));
-                    }
-                }
-            cache.put(cnt++, VectorUtils.of(data));
-        }
-        return cache;
-
-    }
-
-    /**
-     * Fills cache with data and returns it.
-     *
-     * @return Filled Ignite Cache.
-     */
-    private IgniteCache<Integer, Vector> getCache() {
-
-        CacheConfiguration<Integer, Vector> cacheConfiguration = new CacheConfiguration<>();
-        cacheConfiguration.setName("TUTORIAL_" + UUID.randomUUID());
-        cacheConfiguration.setAffinity(new RendezvousAffinityFunction(false, 10));
-
-        return ignite.createCache(cacheConfiguration);
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/86a788f3/examples/src/main/resources/datasets/boston_housing_dataset.txt
----------------------------------------------------------------------
diff --git a/examples/src/main/resources/datasets/boston_housing_dataset.txt b/examples/src/main/resources/datasets/boston_housing_dataset.txt
deleted file mode 100644
index 654a340..0000000
--- a/examples/src/main/resources/datasets/boston_housing_dataset.txt
+++ /dev/null
@@ -1,505 +0,0 @@
-0.02731,0.00,7.070,0,0.4690,6.4210,78.90,4.9671,2,242.0,17.80,396.90,9.14,21.60
-0.02729,0.00,7.070,0,0.4690,7.1850,61.10,4.9671,2,242.0,17.80,392.83,4.03,34.70
-0.03237,0.00,2.180,0,0.4580,6.9980,45.80,6.0622,3,222.0,18.70,394.63,2.94,33.40
-0.06905,0.00,2.180,0,0.4580,7.1470,54.20,6.0622,3,222.0,18.70,396.90,5.33,36.20
-0.02985,0.00,2.180,0,0.4580,6.4300,58.70,6.0622,3,222.0,18.70,394.12,5.21,28.70
-0.08829,12.50,7.870,0,0.5240,6.0120,66.60,5.5605,5,311.0,15.20,395.60,12.43,22.90
-0.14455,12.50,7.870,0,0.5240,6.1720,96.10,5.9505,5,311.0,15.20,396.90,19.15,27.10
-0.21124,12.50,7.870,0,0.5240,5.6310,100.00,6.0821,5,311.0,15.20,386.63,29.93,16.50
-0.17004,12.50,7.870,0,0.5240,6.0040,85.90,6.5921,5,311.0,15.20,386.71,17.10,18.90
-0.22489,12.50,7.870,0,0.5240,6.3770,94.30,6.3467,5,311.0,15.20,392.52,20.45,15.00
-0.11747,12.50,7.870,0,0.5240,6.0090,82.90,6.2267,5,311.0,15.20,396.90,13.27,18.90
-0.09378,12.50,7.870,0,0.5240,5.8890,39.00,5.4509,5,311.0,15.20,390.50,15.71,21.70
-0.62976,0.00,8.140,0,0.5380,5.9490,61.80,4.7075,4,307.0,21.00,396.90,8.26,20.40
-0.63796,0.00,8.140,0,0.5380,6.0960,84.50,4.4619,4,307.0,21.00,380.02,10.26,18.20
-0.62739,0.00,8.140,0,0.5380,5.8340,56.50,4.4986,4,307.0,21.00,395.62,8.47,19.90
-1.05393,0.00,8.140,0,0.5380,5.9350,29.30,4.4986,4,307.0,21.00,386.85,6.58,23.10
-0.78420,0.00,8.140,0,0.5380,5.9900,81.70,4.2579,4,307.0,21.00,386.75,14.67,17.50
-0.80271,0.00,8.140,0,0.5380,5.4560,36.60,3.7965,4,307.0,21.00,288.99,11.69,20.20
-0.72580,0.00,8.140,0,0.5380,5.7270,69.50,3.7965,4,307.0,21.00,390.95,11.28,18.20
-1.25179,0.00,8.140,0,0.5380,5.5700,98.10,3.7979,4,307.0,21.00,376.57,21.02,13.60
-0.85204,0.00,8.140,0,0.5380,5.9650,89.20,4.0123,4,307.0,21.00,392.53,13.83,19.60
-1.23247,0.00,8.140,0,0.5380,6.1420,91.70,3.9769,4,307.0,21.00,396.90,18.72,15.20
-0.98843,0.00,8.140,0,0.5380,5.8130,100.00,4.0952,4,307.0,21.00,394.54,19.88,14.50
-0.75026,0.00,8.140,0,0.5380,5.9240,94.10,4.3996,4,307.0,21.00,394.33,16.30,15.60
-0.84054,0.00,8.140,0,0.5380,5.5990,85.70,4.4546,4,307.0,21.00,303.42,16.51,13.90
-0.67191,0.00,8.140,0,0.5380,5.8130,90.30,4.6820,4,307.0,21.00,376.88,14.81,16.60
-0.95577,0.00,8.140,0,0.5380,6.0470,88.80,4.4534,4,307.0,21.00,306.38,17.28,14.80
-0.77299,0.00,8.140,0,0.5380,6.4950,94.40,4.4547,4,307.0,21.00,387.94,12.80,18.40
-1.00245,0.00,8.140,0,0.5380,6.6740,87.30,4.2390,4,307.0,21.00,380.23,11.98,21.00
-1.13081,0.00,8.140,0,0.5380,5.7130,94.10,4.2330,4,307.0,21.00,360.17,22.60,12.70
-1.35472,0.00,8.140,0,0.5380,6.0720,100.00,4.1750,4,307.0,21.00,376.73,13.04,14.50
-1.38799,0.00,8.140,0,0.5380,5.9500,82.00,3.9900,4,307.0,21.00,232.60,27.71,13.20
-1.15172,0.00,8.140,0,0.5380,5.7010,95.00,3.7872,4,307.0,21.00,358.77,18.35,13.10
-1.61282,0.00,8.140,0,0.5380,6.0960,96.90,3.7598,4,307.0,21.00,248.31,20.34,13.50
-0.06417,0.00,5.960,0,0.4990,5.9330,68.20,3.3603,5,279.0,19.20,396.90,9.68,18.90
-0.09744,0.00,5.960,0,0.4990,5.8410,61.40,3.3779,5,279.0,19.20,377.56,11.41,20.00
-0.08014,0.00,5.960,0,0.4990,5.8500,41.50,3.9342,5,279.0,19.20,396.90,8.77,21.00
-0.17505,0.00,5.960,0,0.4990,5.9660,30.20,3.8473,5,279.0,19.20,393.43,10.13,24.70
-0.02763,75.00,2.950,0,0.4280,6.5950,21.80,5.4011,3,252.0,18.30,395.63,4.32,30.80
-0.03359,75.00,2.950,0,0.4280,7.0240,15.80,5.4011,3,252.0,18.30,395.62,1.98,34.90
-0.12744,0.00,6.910,0,0.4480,6.7700,2.90,5.7209,3,233.0,17.90,385.41,4.84,26.60
-0.14150,0.00,6.910,0,0.4480,6.1690,6.60,5.7209,3,233.0,17.90,383.37,5.81,25.30
-0.15936,0.00,6.910,0,0.4480,6.2110,6.50,5.7209,3,233.0,17.90,394.46,7.44,24.70
-0.12269,0.00,6.910,0,0.4480,6.0690,40.00,5.7209,3,233.0,17.90,389.39,9.55,21.20
-0.17142,0.00,6.910,0,0.4480,5.6820,33.80,5.1004,3,233.0,17.90,396.90,10.21,19.30
-0.18836,0.00,6.910,0,0.4480,5.7860,33.30,5.1004,3,233.0,17.90,396.90,14.15,20.00
-0.22927,0.00,6.910,0,0.4480,6.0300,85.50,5.6894,3,233.0,17.90,392.74,18.80,16.60
-0.25387,0.00,6.910,0,0.4480,5.3990,95.30,5.8700,3,233.0,17.90,396.90,30.81,14.40
-0.21977,0.00,6.910,0,0.4480,5.6020,62.00,6.0877,3,233.0,17.90,396.90,16.20,19.40
-0.08873,21.00,5.640,0,0.4390,5.9630,45.70,6.8147,4,243.0,16.80,395.56,13.45,19.70
-0.04337,21.00,5.640,0,0.4390,6.1150,63.00,6.8147,4,243.0,16.80,393.97,9.43,20.50
-0.05360,21.00,5.640,0,0.4390,6.5110,21.10,6.8147,4,243.0,16.80,396.90,5.28,25.00
-0.04981,21.00,5.640,0,0.4390,5.9980,21.40,6.8147,4,243.0,16.80,396.90,8.43,23.40
-0.01360,75.00,4.000,0,0.4100,5.8880,47.60,7.3197,3,469.0,21.10,396.90,14.80,18.90
-0.01311,90.00,1.220,0,0.4030,7.2490,21.90,8.6966,5,226.0,17.90,395.93,4.81,35.40
-0.02055,85.00,0.740,0,0.4100,6.3830,35.70,9.1876,2,313.0,17.30,396.90,5.77,24.70
-0.01432,100.00,1.320,0,0.4110,6.8160,40.50,8.3248,5,256.0,15.10,392.90,3.95,31.60
-0.15445,25.00,5.130,0,0.4530,6.1450,29.20,7.8148,8,284.0,19.70,390.68,6.86,23.30
-0.10328,25.00,5.130,0,0.4530,5.9270,47.20,6.9320,8,284.0,19.70,396.90,9.22,19.60
-0.14932,25.00,5.130,0,0.4530,5.7410,66.20,7.2254,8,284.0,19.70,395.11,13.15,18.70
-0.17171,25.00,5.130,0,0.4530,5.9660,93.40,6.8185,8,284.0,19.70,378.08,14.44,16.00
-0.11027,25.00,5.130,0,0.4530,6.4560,67.80,7.2255,8,284.0,19.70,396.90,6.73,22.20
-0.12650,25.00,5.130,0,0.4530,6.7620,43.40,7.9809,8,284.0,19.70,395.58,9.50,25.00
-0.01951,17.50,1.380,0,0.4161,7.1040,59.50,9.2229,3,216.0,18.60,393.24,8.05,33.00
-0.03584,80.00,3.370,0,0.3980,6.2900,17.80,6.6115,4,337.0,16.10,396.90,4.67,23.50
-0.04379,80.00,3.370,0,0.3980,5.7870,31.10,6.6115,4,337.0,16.10,396.90,10.24,19.40
-0.05789,12.50,6.070,0,0.4090,5.8780,21.40,6.4980,4,345.0,18.90,396.21,8.10,22.00
-0.13554,12.50,6.070,0,0.4090,5.5940,36.80,6.4980,4,345.0,18.90,396.90,13.09,17.40
-0.12816,12.50,6.070,0,0.4090,5.8850,33.00,6.4980,4,345.0,18.90,396.90,8.79,20.90
-0.08826,0.00,10.810,0,0.4130,6.4170,6.60,5.2873,4,305.0,19.20,383.73,6.72,24.20
-0.15876,0.00,10.810,0,0.4130,5.9610,17.50,5.2873,4,305.0,19.20,376.94,9.88,21.70
-0.09164,0.00,10.810,0,0.4130,6.0650,7.80,5.2873,4,305.0,19.20,390.91,5.52,22.80
-0.19539,0.00,10.810,0,0.4130,6.2450,6.20,5.2873,4,305.0,19.20,377.17,7.54,23.40
-0.07896,0.00,12.830,0,0.4370,6.2730,6.00,4.2515,5,398.0,18.70,394.92,6.78,24.10
-0.09512,0.00,12.830,0,0.4370,6.2860,45.00,4.5026,5,398.0,18.70,383.23,8.94,21.40
-0.10153,0.00,12.830,0,0.4370,6.2790,74.50,4.0522,5,398.0,18.70,373.66,11.97,20.00
-0.08707,0.00,12.830,0,0.4370,6.1400,45.80,4.0905,5,398.0,18.70,386.96,10.27,20.80
-0.05646,0.00,12.830,0,0.4370,6.2320,53.70,5.0141,5,398.0,18.70,386.40,12.34,21.20
-0.08387,0.00,12.830,0,0.4370,5.8740,36.60,4.5026,5,398.0,18.70,396.06,9.10,20.30
-0.04113,25.00,4.860,0,0.4260,6.7270,33.50,5.4007,4,281.0,19.00,396.90,5.29,28.00
-0.04462,25.00,4.860,0,0.4260,6.6190,70.40,5.4007,4,281.0,19.00,395.63,7.22,23.90
-0.03659,25.00,4.860,0,0.4260,6.3020,32.20,5.4007,4,281.0,19.00,396.90,6.72,24.80
-0.03551,25.00,4.860,0,0.4260,6.1670,46.70,5.4007,4,281.0,19.00,390.64,7.51,22.90
-0.05059,0.00,4.490,0,0.4490,6.3890,48.00,4.7794,3,247.0,18.50,396.90,9.62,23.90
-0.05735,0.00,4.490,0,0.4490,6.6300,56.10,4.4377,3,247.0,18.50,392.30,6.53,26.60
-0.05188,0.00,4.490,0,0.4490,6.0150,45.10,4.4272,3,247.0,18.50,395.99,12.86,22.50
-0.07151,0.00,4.490,0,0.4490,6.1210,56.80,3.7476,3,247.0,18.50,395.15,8.44,22.20
-0.05660,0.00,3.410,0,0.4890,7.0070,86.30,3.4217,2,270.0,17.80,396.90,5.50,23.60
-0.05302,0.00,3.410,0,0.4890,7.0790,63.10,3.4145,2,270.0,17.80,396.06,5.70,28.70
-0.04684,0.00,3.410,0,0.4890,6.4170,66.10,3.0923,2,270.0,17.80,392.18,8.81,22.60
-0.03932,0.00,3.410,0,0.4890,6.4050,73.90,3.0921,2,270.0,17.80,393.55,8.20,22.00
-0.04203,28.00,15.040,0,0.4640,6.4420,53.60,3.6659,4,270.0,18.20,395.01,8.16,22.90
-0.02875,28.00,15.040,0,0.4640,6.2110,28.90,3.6659,4,270.0,18.20,396.33,6.21,25.00
-0.04294,28.00,15.040,0,0.4640,6.2490,77.30,3.6150,4,270.0,18.20,396.90,10.59,20.60
-0.12204,0.00,2.890,0,0.4450,6.6250,57.80,3.4952,2,276.0,18.00,357.98,6.65,28.40
-0.11504,0.00,2.890,0,0.4450,6.1630,69.60,3.4952,2,276.0,18.00,391.83,11.34,21.40
-0.12083,0.00,2.890,0,0.4450,8.0690,76.00,3.4952,2,276.0,18.00,396.90,4.21,38.70
-0.08187,0.00,2.890,0,0.4450,7.8200,36.90,3.4952,2,276.0,18.00,393.53,3.57,43.80
-0.06860,0.00,2.890,0,0.4450,7.4160,62.50,3.4952,2,276.0,18.00,396.90,6.19,33.20
-0.14866,0.00,8.560,0,0.5200,6.7270,79.90,2.7778,5,384.0,20.90,394.76,9.42,27.50
-0.11432,0.00,8.560,0,0.5200,6.7810,71.30,2.8561,5,384.0,20.90,395.58,7.67,26.50
-0.22876,0.00,8.560,0,0.5200,6.4050,85.40,2.7147,5,384.0,20.90,70.80,10.63,18.60
-0.21161,0.00,8.560,0,0.5200,6.1370,87.40,2.7147,5,384.0,20.90,394.47,13.44,19.30
-0.13960,0.00,8.560,0,0.5200,6.1670,90.00,2.4210,5,384.0,20.90,392.69,12.33,20.10
-0.13262,0.00,8.560,0,0.5200,5.8510,96.70,2.1069,5,384.0,20.90,394.05,16.47,19.50
-0.17120,0.00,8.560,0,0.5200,5.8360,91.90,2.2110,5,384.0,20.90,395.67,18.66,19.50
-0.13117,0.00,8.560,0,0.5200,6.1270,85.20,2.1224,5,384.0,20.90,387.69,14.09,20.40
-0.12802,0.00,8.560,0,0.5200,6.4740,97.10,2.4329,5,384.0,20.90,395.24,12.27,19.80
-0.26363,0.00,8.560,0,0.5200,6.2290,91.20,2.5451,5,384.0,20.90,391.23,15.55,19.40
-0.10793,0.00,8.560,0,0.5200,6.1950,54.40,2.7778,5,384.0,20.90,393.49,13.00,21.70
-0.10084,0.00,10.010,0,0.5470,6.7150,81.60,2.6775,6,432.0,17.80,395.59,10.16,22.80
-0.12329,0.00,10.010,0,0.5470,5.9130,92.90,2.3534,6,432.0,17.80,394.95,16.21,18.80
-0.22212,0.00,10.010,0,0.5470,6.0920,95.40,2.5480,6,432.0,17.80,396.90,17.09,18.70
-0.14231,0.00,10.010,0,0.5470,6.2540,84.20,2.2565,6,432.0,17.80,388.74,10.45,18.50
-0.17134,0.00,10.010,0,0.5470,5.9280,88.20,2.4631,6,432.0,17.80,344.91,15.76,18.30
-0.13158,0.00,10.010,0,0.5470,6.1760,72.50,2.7301,6,432.0,17.80,393.30,12.04,21.20
-0.15098,0.00,10.010,0,0.5470,6.0210,82.60,2.7474,6,432.0,17.80,394.51,10.30,19.20
-0.13058,0.00,10.010,0,0.5470,5.8720,73.10,2.4775,6,432.0,17.80,338.63,15.37,20.40
-0.14476,0.00,10.010,0,0.5470,5.7310,65.20,2.7592,6,432.0,17.80,391.50,13.61,19.30
-0.06899,0.00,25.650,0,0.5810,5.8700,69.70,2.2577,2,188.0,19.10,389.15,14.37,22.00
-0.07165,0.00,25.650,0,0.5810,6.0040,84.10,2.1974,2,188.0,19.10,377.67,14.27,20.30
-0.09299,0.00,25.650,0,0.5810,5.9610,92.90,2.0869,2,188.0,19.10,378.09,17.93,20.50
-0.15038,0.00,25.650,0,0.5810,5.8560,97.00,1.9444,2,188.0,19.10,370.31,25.41,17.30
-0.09849,0.00,25.650,0,0.5810,5.8790,95.80,2.0063,2,188.0,19.10,379.38,17.58,18.80
-0.16902,0.00,25.650,0,0.5810,5.9860,88.40,1.9929,2,188.0,19.10,385.02,14.81,21.40
-0.38735,0.00,25.650,0,0.5810,5.6130,95.60,1.7572,2,188.0,19.10,359.29,27.26,15.70
-0.25915,0.00,21.890,0,0.6240,5.6930,96.00,1.7883,4,437.0,21.20,392.11,17.19,16.20
-0.32543,0.00,21.890,0,0.6240,6.4310,98.80,1.8125,4,437.0,21.20,396.90,15.39,18.00
-0.88125,0.00,21.890,0,0.6240,5.6370,94.70,1.9799,4,437.0,21.20,396.90,18.34,14.30
-0.34006,0.00,21.890,0,0.6240,6.4580,98.90,2.1185,4,437.0,21.20,395.04,12.60,19.20
-1.19294,0.00,21.890,0,0.6240,6.3260,97.70,2.2710,4,437.0,21.20,396.90,12.26,19.60
-0.59005,0.00,21.890,0,0.6240,6.3720,97.90,2.3274,4,437.0,21.20,385.76,11.12,23.00
-0.32982,0.00,21.890,0,0.6240,5.8220,95.40,2.4699,4,437.0,21.20,388.69,15.03,18.40
-0.97617,0.00,21.890,0,0.6240,5.7570,98.40,2.3460,4,437.0,21.20,262.76,17.31,15.60
-0.55778,0.00,21.890,0,0.6240,6.3350,98.20,2.1107,4,437.0,21.20,394.67,16.96,18.10
-0.32264,0.00,21.890,0,0.6240,5.9420,93.50,1.9669,4,437.0,21.20,378.25,16.90,17.40
-0.35233,0.00,21.890,0,0.6240,6.4540,98.40,1.8498,4,437.0,21.20,394.08,14.59,17.10
-0.24980,0.00,21.890,0,0.6240,5.8570,98.20,1.6686,4,437.0,21.20,392.04,21.32,13.30
-0.54452,0.00,21.890,0,0.6240,6.1510,97.90,1.6687,4,437.0,21.20,396.90,18.46,17.80
-0.29090,0.00,21.890,0,0.6240,6.1740,93.60,1.6119,4,437.0,21.20,388.08,24.16,14.00
-1.62864,0.00,21.890,0,0.6240,5.0190,100.00,1.4394,4,437.0,21.20,396.90,34.41,14.40
-3.32105,0.00,19.580,1,0.8710,5.4030,100.00,1.3216,5,403.0,14.70,396.90,26.82,13.40
-4.09740,0.00,19.580,0,0.8710,5.4680,100.00,1.4118,5,403.0,14.70,396.90,26.42,15.60
-2.77974,0.00,19.580,0,0.8710,4.9030,97.80,1.3459,5,403.0,14.70,396.90,29.29,11.80
-2.37934,0.00,19.580,0,0.8710,6.1300,100.00,1.4191,5,403.0,14.70,172.91,27.80,13.80
-2.15505,0.00,19.580,0,0.8710,5.6280,100.00,1.5166,5,403.0,14.70,169.27,16.65,15.60
-2.36862,0.00,19.580,0,0.8710,4.9260,95.70,1.4608,5,403.0,14.70,391.71,29.53,14.60
-2.33099,0.00,19.580,0,0.8710,5.1860,93.80,1.5296,5,403.0,14.70,356.99,28.32,17.80
-2.73397,0.00,19.580,0,0.8710,5.5970,94.90,1.5257,5,403.0,14.70,351.85,21.45,15.40
-1.65660,0.00,19.580,0,0.8710,6.1220,97.30,1.6180,5,403.0,14.70,372.80,14.10,21.50
-1.49632,0.00,19.580,0,0.8710,5.4040,100.00,1.5916,5,403.0,14.70,341.60,13.28,19.60
-1.12658,0.00,19.580,1,0.8710,5.0120,88.00,1.6102,5,403.0,14.70,343.28,12.12,15.30
-2.14918,0.00,19.580,0,0.8710,5.7090,98.50,1.6232,5,403.0,14.70,261.95,15.79,19.40
-1.41385,0.00,19.580,1,0.8710,6.1290,96.00,1.7494,5,403.0,14.70,321.02,15.12,17.00
-3.53501,0.00,19.580,1,0.8710,6.1520,82.60,1.7455,5,403.0,14.70,88.01,15.02,15.60
-2.44668,0.00,19.580,0,0.8710,5.2720,94.00,1.7364,5,403.0,14.70,88.63,16.14,13.10
-1.22358,0.00,19.580,0,0.6050,6.9430,97.40,1.8773,5,403.0,14.70,363.43,4.59,41.30
-1.34284,0.00,19.580,0,0.6050,6.0660,100.00,1.7573,5,403.0,14.70,353.89,6.43,24.30
-1.42502,0.00,19.580,0,0.8710,6.5100,100.00,1.7659,5,403.0,14.70,364.31,7.39,23.30
-1.27346,0.00,19.580,1,0.6050,6.2500,92.60,1.7984,5,403.0,14.70,338.92,5.50,27.00
-1.46336,0.00,19.580,0,0.6050,7.4890,90.80,1.9709,5,403.0,14.70,374.43,1.73,50.00
-1.83377,0.00,19.580,1,0.6050,7.8020,98.20,2.0407,5,403.0,14.70,389.61,1.92,50.00
-1.51902,0.00,19.580,1,0.6050,8.3750,93.90,2.1620,5,403.0,14.70,388.45,3.32,50.00
-2.24236,0.00,19.580,0,0.6050,5.8540,91.80,2.4220,5,403.0,14.70,395.11,11.64,22.70
-2.92400,0.00,19.580,0,0.6050,6.1010,93.00,2.2834,5,403.0,14.70,240.16,9.81,25.00
-2.01019,0.00,19.580,0,0.6050,7.9290,96.20,2.0459,5,403.0,14.70,369.30,3.70,50.00
-1.80028,0.00,19.580,0,0.6050,5.8770,79.20,2.4259,5,403.0,14.70,227.61,12.14,23.80
-2.30040,0.00,19.580,0,0.6050,6.3190,96.10,2.1000,5,403.0,14.70,297.09,11.10,23.80
-2.44953,0.00,19.580,0,0.6050,6.4020,95.20,2.2625,5,403.0,14.70,330.04,11.32,22.30
-1.20742,0.00,19.580,0,0.6050,5.8750,94.60,2.4259,5,403.0,14.70,292.29,14.43,17.40
-2.31390,0.00,19.580,0,0.6050,5.8800,97.30,2.3887,5,403.0,14.70,348.13,12.03,19.10
-0.13914,0.00,4.050,0,0.5100,5.5720,88.50,2.5961,5,296.0,16.60,396.90,14.69,23.10
-0.09178,0.00,4.050,0,0.5100,6.4160,84.10,2.6463,5,296.0,16.60,395.50,9.04,23.60
-0.08447,0.00,4.050,0,0.5100,5.8590,68.70,2.7019,5,296.0,16.60,393.23,9.64,22.60
-0.06664,0.00,4.050,0,0.5100,6.5460,33.10,3.1323,5,296.0,16.60,390.96,5.33,29.40
-0.07022,0.00,4.050,0,0.5100,6.0200,47.20,3.5549,5,296.0,16.60,393.23,10.11,23.20
-0.05425,0.00,4.050,0,0.5100,6.3150,73.40,3.3175,5,296.0,16.60,395.60,6.29,24.60
-0.06642,0.00,4.050,0,0.5100,6.8600,74.40,2.9153,5,296.0,16.60,391.27,6.92,29.90
-0.05780,0.00,2.460,0,0.4880,6.9800,58.40,2.8290,3,193.0,17.80,396.90,5.04,37.20
-0.06588,0.00,2.460,0,0.4880,7.7650,83.30,2.7410,3,193.0,17.80,395.56,7.56,39.80
-0.06888,0.00,2.460,0,0.4880,6.1440,62.20,2.5979,3,193.0,17.80,396.90,9.45,36.20
-0.09103,0.00,2.460,0,0.4880,7.1550,92.20,2.7006,3,193.0,17.80,394.12,4.82,37.90
-0.10008,0.00,2.460,0,0.4880,6.5630,95.60,2.8470,3,193.0,17.80,396.90,5.68,32.50
-0.08308,0.00,2.460,0,0.4880,5.6040,89.80,2.9879,3,193.0,17.80,391.00,13.98,26.40
-0.06047,0.00,2.460,0,0.4880,6.1530,68.80,3.2797,3,193.0,17.80,387.11,13.15,29.60
-0.05602,0.00,2.460,0,0.4880,7.8310,53.60,3.1992,3,193.0,17.80,392.63,4.45,50.00
-0.07875,45.00,3.440,0,0.4370,6.7820,41.10,3.7886,5,398.0,15.20,393.87,6.68,32.00
-0.12579,45.00,3.440,0,0.4370,6.5560,29.10,4.5667,5,398.0,15.20,382.84,4.56,29.80
-0.08370,45.00,3.440,0,0.4370,7.1850,38.90,4.5667,5,398.0,15.20,396.90,5.39,34.90
-0.09068,45.00,3.440,0,0.4370,6.9510,21.50,6.4798,5,398.0,15.20,377.68,5.10,37.00
-0.06911,45.00,3.440,0,0.4370,6.7390,30.80,6.4798,5,398.0,15.20,389.71,4.69,30.50
-0.08664,45.00,3.440,0,0.4370,7.1780,26.30,6.4798,5,398.0,15.20,390.49,2.87,36.40
-0.02187,60.00,2.930,0,0.4010,6.8000,9.90,6.2196,1,265.0,15.60,393.37,5.03,31.10
-0.01439,60.00,2.930,0,0.4010,6.6040,18.80,6.2196,1,265.0,15.60,376.70,4.38,29.10
-0.01381,80.00,0.460,0,0.4220,7.8750,32.00,5.6484,4,255.0,14.40,394.23,2.97,50.00
-0.04011,80.00,1.520,0,0.4040,7.2870,34.10,7.3090,2,329.0,12.60,396.90,4.08,33.30
-0.04666,80.00,1.520,0,0.4040,7.1070,36.60,7.3090,2,329.0,12.60,354.31,8.61,30.30
-0.03768,80.00,1.520,0,0.4040,7.2740,38.30,7.3090,2,329.0,12.60,392.20,6.62,34.60
-0.03150,95.00,1.470,0,0.4030,6.9750,15.30,7.6534,3,402.0,17.00,396.90,4.56,34.90
-0.01778,95.00,1.470,0,0.4030,7.1350,13.90,7.6534,3,402.0,17.00,384.30,4.45,32.90
-0.03445,82.50,2.030,0,0.4150,6.1620,38.40,6.2700,2,348.0,14.70,393.77,7.43,24.10
-0.02177,82.50,2.030,0,0.4150,7.6100,15.70,6.2700,2,348.0,14.70,395.38,3.11,42.30
-0.03510,95.00,2.680,0,0.4161,7.8530,33.20,5.1180,4,224.0,14.70,392.78,3.81,48.50
-0.02009,95.00,2.680,0,0.4161,8.0340,31.90,5.1180,4,224.0,14.70,390.55,2.88,50.00
-0.13642,0.00,10.590,0,0.4890,5.8910,22.30,3.9454,4,277.0,18.60,396.90,10.87,22.60
-0.22969,0.00,10.590,0,0.4890,6.3260,52.50,4.3549,4,277.0,18.60,394.87,10.97,24.40
-0.25199,0.00,10.590,0,0.4890,5.7830,72.70,4.3549,4,277.0,18.60,389.43,18.06,22.50
-0.13587,0.00,10.590,1,0.4890,6.0640,59.10,4.2392,4,277.0,18.60,381.32,14.66,24.40
-0.43571,0.00,10.590,1,0.4890,5.3440,100.00,3.8750,4,277.0,18.60,396.90,23.09,20.00
-0.17446,0.00,10.590,1,0.4890,5.9600,92.10,3.8771,4,277.0,18.60,393.25,17.27,21.70
-0.37578,0.00,10.590,1,0.4890,5.4040,88.60,3.6650,4,277.0,18.60,395.24,23.98,19.30
-0.21719,0.00,10.590,1,0.4890,5.8070,53.80,3.6526,4,277.0,18.60,390.94,16.03,22.40
-0.14052,0.00,10.590,0,0.4890,6.3750,32.30,3.9454,4,277.0,18.60,385.81,9.38,28.10
-0.28955,0.00,10.590,0,0.4890,5.4120,9.80,3.5875,4,277.0,18.60,348.93,29.55,23.70
-0.19802,0.00,10.590,0,0.4890,6.1820,42.40,3.9454,4,277.0,18.60,393.63,9.47,25.00
-0.04560,0.00,13.890,1,0.5500,5.8880,56.00,3.1121,5,276.0,16.40,392.80,13.51,23.30
-0.07013,0.00,13.890,0,0.5500,6.6420,85.10,3.4211,5,276.0,16.40,392.78,9.69,28.70
-0.11069,0.00,13.890,1,0.5500,5.9510,93.80,2.8893,5,276.0,16.40,396.90,17.92,21.50
-0.11425,0.00,13.890,1,0.5500,6.3730,92.40,3.3633,5,276.0,16.40,393.74,10.50,23.00
-0.35809,0.00,6.200,1,0.5070,6.9510,88.50,2.8617,8,307.0,17.40,391.70,9.71,26.70
-0.40771,0.00,6.200,1,0.5070,6.1640,91.30,3.0480,8,307.0,17.40,395.24,21.46,21.70
-0.62356,0.00,6.200,1,0.5070,6.8790,77.70,3.2721,8,307.0,17.40,390.39,9.93,27.50
-0.61470,0.00,6.200,0,0.5070,6.6180,80.80,3.2721,8,307.0,17.40,396.90,7.60,30.10
-0.31533,0.00,6.200,0,0.5040,8.2660,78.30,2.8944,8,307.0,17.40,385.05,4.14,44.80
-0.52693,0.00,6.200,0,0.5040,8.7250,83.00,2.8944,8,307.0,17.40,382.00,4.63,50.00
-0.38214,0.00,6.200,0,0.5040,8.0400,86.50,3.2157,8,307.0,17.40,387.38,3.13,37.60
-0.41238,0.00,6.200,0,0.5040,7.1630,79.90,3.2157,8,307.0,17.40,372.08,6.36,31.60
-0.29819,0.00,6.200,0,0.5040,7.6860,17.00,3.3751,8,307.0,17.40,377.51,3.92,46.70
-0.44178,0.00,6.200,0,0.5040,6.5520,21.40,3.3751,8,307.0,17.40,380.34,3.76,31.50
-0.53700,0.00,6.200,0,0.5040,5.9810,68.10,3.6715,8,307.0,17.40,378.35,11.65,24.30
-0.46296,0.00,6.200,0,0.5040,7.4120,76.90,3.6715,8,307.0,17.40,376.14,5.25,31.70
-0.57529,0.00,6.200,0,0.5070,8.3370,73.30,3.8384,8,307.0,17.40,385.91,2.47,41.70
-0.33147,0.00,6.200,0,0.5070,8.2470,70.40,3.6519,8,307.0,17.40,378.95,3.95,48.30
-0.44791,0.00,6.200,1,0.5070,6.7260,66.50,3.6519,8,307.0,17.40,360.20,8.05,29.00
-0.33045,0.00,6.200,0,0.5070,6.0860,61.50,3.6519,8,307.0,17.40,376.75,10.88,24.00
-0.52058,0.00,6.200,1,0.5070,6.6310,76.50,4.1480,8,307.0,17.40,388.45,9.54,25.10
-0.51183,0.00,6.200,0,0.5070,7.3580,71.60,4.1480,8,307.0,17.40,390.07,4.73,31.50
-0.08244,30.00,4.930,0,0.4280,6.4810,18.50,6.1899,6,300.0,16.60,379.41,6.36,23.70
-0.09252,30.00,4.930,0,0.4280,6.6060,42.20,6.1899,6,300.0,16.60,383.78,7.37,23.30
-0.11329,30.00,4.930,0,0.4280,6.8970,54.30,6.3361,6,300.0,16.60,391.25,11.38,22.00
-0.10612,30.00,4.930,0,0.4280,6.0950,65.10,6.3361,6,300.0,16.60,394.62,12.40,20.10
-0.10290,30.00,4.930,0,0.4280,6.3580,52.90,7.0355,6,300.0,16.60,372.75,11.22,22.20
-0.12757,30.00,4.930,0,0.4280,6.3930,7.80,7.0355,6,300.0,16.60,374.71,5.19,23.70
-0.20608,22.00,5.860,0,0.4310,5.5930,76.50,7.9549,7,330.0,19.10,372.49,12.50,17.60
-0.19133,22.00,5.860,0,0.4310,5.6050,70.20,7.9549,7,330.0,19.10,389.13,18.46,18.50
-0.33983,22.00,5.860,0,0.4310,6.1080,34.90,8.0555,7,330.0,19.10,390.18,9.16,24.30
-0.19657,22.00,5.860,0,0.4310,6.2260,79.20,8.0555,7,330.0,19.10,376.14,10.15,20.50
-0.16439,22.00,5.860,0,0.4310,6.4330,49.10,7.8265,7,330.0,19.10,374.71,9.52,24.50
-0.19073,22.00,5.860,0,0.4310,6.7180,17.50,7.8265,7,330.0,19.10,393.74,6.56,26.20
-0.14030,22.00,5.860,0,0.4310,6.4870,13.00,7.3967,7,330.0,19.10,396.28,5.90,24.40
-0.21409,22.00,5.860,0,0.4310,6.4380,8.90,7.3967,7,330.0,19.10,377.07,3.59,24.80
-0.08221,22.00,5.860,0,0.4310,6.9570,6.80,8.9067,7,330.0,19.10,386.09,3.53,29.60
-0.36894,22.00,5.860,0,0.4310,8.2590,8.40,8.9067,7,330.0,19.10,396.90,3.54,42.80
-0.04819,80.00,3.640,0,0.3920,6.1080,32.00,9.2203,1,315.0,16.40,392.89,6.57,21.90
-0.03548,80.00,3.640,0,0.3920,5.8760,19.10,9.2203,1,315.0,16.40,395.18,9.25,20.90
-0.01538,90.00,3.750,0,0.3940,7.4540,34.20,6.3361,3,244.0,15.90,386.34,3.11,44.00
-0.61154,20.00,3.970,0,0.6470,8.7040,86.90,1.8010,5,264.0,13.00,389.70,5.12,50.00
-0.66351,20.00,3.970,0,0.6470,7.3330,100.00,1.8946,5,264.0,13.00,383.29,7.79,36.00
-0.65665,20.00,3.970,0,0.6470,6.8420,100.00,2.0107,5,264.0,13.00,391.93,6.90,30.10
-0.54011,20.00,3.970,0,0.6470,7.2030,81.80,2.1121,5,264.0,13.00,392.80,9.59,33.80
-0.53412,20.00,3.970,0,0.6470,7.5200,89.40,2.1398,5,264.0,13.00,388.37,7.26,43.10
-0.52014,20.00,3.970,0,0.6470,8.3980,91.50,2.2885,5,264.0,13.00,386.86,5.91,48.80
-0.82526,20.00,3.970,0,0.6470,7.3270,94.50,2.0788,5,264.0,13.00,393.42,11.25,31.00
-0.55007,20.00,3.970,0,0.6470,7.2060,91.60,1.9301,5,264.0,13.00,387.89,8.10,36.50
-0.76162,20.00,3.970,0,0.6470,5.5600,62.80,1.9865,5,264.0,13.00,392.40,10.45,22.80
-0.78570,20.00,3.970,0,0.6470,7.0140,84.60,2.1329,5,264.0,13.00,384.07,14.79,30.70
-0.57834,20.00,3.970,0,0.5750,8.2970,67.00,2.4216,5,264.0,13.00,384.54,7.44,50.00
-0.54050,20.00,3.970,0,0.5750,7.4700,52.60,2.8720,5,264.0,13.00,390.30,3.16,43.50
-0.09065,20.00,6.960,1,0.4640,5.9200,61.50,3.9175,3,223.0,18.60,391.34,13.65,20.70
-0.29916,20.00,6.960,0,0.4640,5.8560,42.10,4.4290,3,223.0,18.60,388.65,13.00,21.10
-0.16211,20.00,6.960,0,0.4640,6.2400,16.30,4.4290,3,223.0,18.60,396.90,6.59,25.20
-0.11460,20.00,6.960,0,0.4640,6.5380,58.70,3.9175,3,223.0,18.60,394.96,7.73,24.40
-0.22188,20.00,6.960,1,0.4640,7.6910,51.80,4.3665,3,223.0,18.60,390.77,6.58,35.20
-0.05644,40.00,6.410,1,0.4470,6.7580,32.90,4.0776,4,254.0,17.60,396.90,3.53,32.40
-0.09604,40.00,6.410,0,0.4470,6.8540,42.80,4.2673,4,254.0,17.60,396.90,2.98,32.00
-0.10469,40.00,6.410,1,0.4470,7.2670,49.00,4.7872,4,254.0,17.60,389.25,6.05,33.20
-0.06127,40.00,6.410,1,0.4470,6.8260,27.60,4.8628,4,254.0,17.60,393.45,4.16,33.10
-0.07978,40.00,6.410,0,0.4470,6.4820,32.10,4.1403,4,254.0,17.60,396.90,7.19,29.10
-0.21038,20.00,3.330,0,0.4429,6.8120,32.20,4.1007,5,216.0,14.90,396.90,4.85,35.10
-0.03578,20.00,3.330,0,0.4429,7.8200,64.50,4.6947,5,216.0,14.90,387.31,3.76,45.40
-0.03705,20.00,3.330,0,0.4429,6.9680,37.20,5.2447,5,216.0,14.90,392.23,4.59,35.40
-0.06129,20.00,3.330,1,0.4429,7.6450,49.70,5.2119,5,216.0,14.90,377.07,3.01,46.00
-0.01501,90.00,1.210,1,0.4010,7.9230,24.80,5.8850,1,198.0,13.60,395.52,3.16,50.00
-0.00906,90.00,2.970,0,0.4000,7.0880,20.80,7.3073,1,285.0,15.30,394.72,7.85,32.20
-0.01096,55.00,2.250,0,0.3890,6.4530,31.90,7.3073,1,300.0,15.30,394.72,8.23,22.00
-0.01965,80.00,1.760,0,0.3850,6.2300,31.50,9.0892,1,241.0,18.20,341.60,12.93,20.10
-0.03871,52.50,5.320,0,0.4050,6.2090,31.30,7.3172,6,293.0,16.60,396.90,7.14,23.20
-0.04590,52.50,5.320,0,0.4050,6.3150,45.60,7.3172,6,293.0,16.60,396.90,7.60,22.30
-0.04297,52.50,5.320,0,0.4050,6.5650,22.90,7.3172,6,293.0,16.60,371.72,9.51,24.80
-0.03502,80.00,4.950,0,0.4110,6.8610,27.90,5.1167,4,245.0,19.20,396.90,3.33,28.50
-0.07886,80.00,4.950,0,0.4110,7.1480,27.70,5.1167,4,245.0,19.20,396.90,3.56,37.30
-0.03615,80.00,4.950,0,0.4110,6.6300,23.40,5.1167,4,245.0,19.20,396.90,4.70,27.90
-0.08265,0.00,13.920,0,0.4370,6.1270,18.40,5.5027,4,289.0,16.00,396.90,8.58,23.90
-0.08199,0.00,13.920,0,0.4370,6.0090,42.30,5.5027,4,289.0,16.00,396.90,10.40,21.70
-0.12932,0.00,13.920,0,0.4370,6.6780,31.10,5.9604,4,289.0,16.00,396.90,6.27,28.60
-0.05372,0.00,13.920,0,0.4370,6.5490,51.00,5.9604,4,289.0,16.00,392.85,7.39,27.10
-0.14103,0.00,13.920,0,0.4370,5.7900,58.00,6.3200,4,289.0,16.00,396.90,15.84,20.30
-0.06466,70.00,2.240,0,0.4000,6.3450,20.10,7.8278,5,358.0,14.80,368.24,4.97,22.50
-0.05561,70.00,2.240,0,0.4000,7.0410,10.00,7.8278,5,358.0,14.80,371.58,4.74,29.00
-0.04417,70.00,2.240,0,0.4000,6.8710,47.40,7.8278,5,358.0,14.80,390.86,6.07,24.80
-0.03537,34.00,6.090,0,0.4330,6.5900,40.40,5.4917,7,329.0,16.10,395.75,9.50,22.00
-0.09266,34.00,6.090,0,0.4330,6.4950,18.40,5.4917,7,329.0,16.10,383.61,8.67,26.40
-0.10000,34.00,6.090,0,0.4330,6.9820,17.70,5.4917,7,329.0,16.10,390.43,4.86,33.10
-0.05515,33.00,2.180,0,0.4720,7.2360,41.10,4.0220,7,222.0,18.40,393.68,6.93,36.10
-0.05479,33.00,2.180,0,0.4720,6.6160,58.10,3.3700,7,222.0,18.40,393.36,8.93,28.40
-0.07503,33.00,2.180,0,0.4720,7.4200,71.90,3.0992,7,222.0,18.40,396.90,6.47,33.40
-0.04932,33.00,2.180,0,0.4720,6.8490,70.30,3.1827,7,222.0,18.40,396.90,7.53,28.20
-0.49298,0.00,9.900,0,0.5440,6.6350,82.50,3.3175,4,304.0,18.40,396.90,4.54,22.80
-0.34940,0.00,9.900,0,0.5440,5.9720,76.70,3.1025,4,304.0,18.40,396.24,9.97,20.30
-2.63548,0.00,9.900,0,0.5440,4.9730,37.80,2.5194,4,304.0,18.40,350.45,12.64,16.10
-0.79041,0.00,9.900,0,0.5440,6.1220,52.80,2.6403,4,304.0,18.40,396.90,5.98,22.10
-0.26169,0.00,9.900,0,0.5440,6.0230,90.40,2.8340,4,304.0,18.40,396.30,11.72,19.40
-0.26938,0.00,9.900,0,0.5440,6.2660,82.80,3.2628,4,304.0,18.40,393.39,7.90,21.60
-0.36920,0.00,9.900,0,0.5440,6.5670,87.30,3.6023,4,304.0,18.40,395.69,9.28,23.80
-0.25356,0.00,9.900,0,0.5440,5.7050,77.70,3.9450,4,304.0,18.40,396.42,11.50,16.20
-0.31827,0.00,9.900,0,0.5440,5.9140,83.20,3.9986,4,304.0,18.40,390.70,18.33,17.80
-0.24522,0.00,9.900,0,0.5440,5.7820,71.70,4.0317,4,304.0,18.40,396.90,15.94,19.80
-0.40202,0.00,9.900,0,0.5440,6.3820,67.20,3.5325,4,304.0,18.40,395.21,10.36,23.10
-0.47547,0.00,9.900,0,0.5440,6.1130,58.80,4.0019,4,304.0,18.40,396.23,12.73,21.00
-0.16760,0.00,7.380,0,0.4930,6.4260,52.30,4.5404,5,287.0,19.60,396.90,7.20,23.80
-0.18159,0.00,7.380,0,0.4930,6.3760,54.30,4.5404,5,287.0,19.60,396.90,6.87,23.10
-0.35114,0.00,7.380,0,0.4930,6.0410,49.90,4.7211,5,287.0,19.60,396.90,7.70,20.40
-0.28392,0.00,7.380,0,0.4930,5.7080,74.30,4.7211,5,287.0,19.60,391.13,11.74,18.50
-0.34109,0.00,7.380,0,0.4930,6.4150,40.10,4.7211,5,287.0,19.60,396.90,6.12,25.00
-0.19186,0.00,7.380,0,0.4930,6.4310,14.70,5.4159,5,287.0,19.60,393.68,5.08,24.60
-0.30347,0.00,7.380,0,0.4930,6.3120,28.90,5.4159,5,287.0,19.60,396.90,6.15,23.00
-0.24103,0.00,7.380,0,0.4930,6.0830,43.70,5.4159,5,287.0,19.60,396.90,12.79,22.20
-0.06617,0.00,3.240,0,0.4600,5.8680,25.80,5.2146,4,430.0,16.90,382.44,9.97,19.30
-0.06724,0.00,3.240,0,0.4600,6.3330,17.20,5.2146,4,430.0,16.90,375.21,7.34,22.60
-0.04544,0.00,3.240,0,0.4600,6.1440,32.20,5.8736,4,430.0,16.90,368.57,9.09,19.80
-0.05023,35.00,6.060,0,0.4379,5.7060,28.40,6.6407,1,304.0,16.90,394.02,12.43,17.10
-0.03466,35.00,6.060,0,0.4379,6.0310,23.30,6.6407,1,304.0,16.90,362.25,7.83,19.40
-0.05083,0.00,5.190,0,0.5150,6.3160,38.10,6.4584,5,224.0,20.20,389.71,5.68,22.20
-0.03738,0.00,5.190,0,0.5150,6.3100,38.50,6.4584,5,224.0,20.20,389.40,6.75,20.70
-0.03961,0.00,5.190,0,0.5150,6.0370,34.50,5.9853,5,224.0,20.20,396.90,8.01,21.10
-0.03427,0.00,5.190,0,0.5150,5.8690,46.30,5.2311,5,224.0,20.20,396.90,9.80,19.50
-0.03041,0.00,5.190,0,0.5150,5.8950,59.60,5.6150,5,224.0,20.20,394.81,10.56,18.50
-0.03306,0.00,5.190,0,0.5150,6.0590,37.30,4.8122,5,224.0,20.20,396.14,8.51,20.60
-0.05497,0.00,5.190,0,0.5150,5.9850,45.40,4.8122,5,224.0,20.20,396.90,9.74,19.00
-0.06151,0.00,5.190,0,0.5150,5.9680,58.50,4.8122,5,224.0,20.20,396.90,9.29,18.70
-0.01301,35.00,1.520,0,0.4420,7.2410,49.30,7.0379,1,284.0,15.50,394.74,5.49,32.70
-0.02498,0.00,1.890,0,0.5180,6.5400,59.70,6.2669,1,422.0,15.90,389.96,8.65,16.50
-0.02543,55.00,3.780,0,0.4840,6.6960,56.40,5.7321,5,370.0,17.60,396.90,7.18,23.90
-0.03049,55.00,3.780,0,0.4840,6.8740,28.10,6.4654,5,370.0,17.60,387.97,4.61,31.20
-0.03113,0.00,4.390,0,0.4420,6.0140,48.50,8.0136,3,352.0,18.80,385.64,10.53,17.50
-0.06162,0.00,4.390,0,0.4420,5.8980,52.30,8.0136,3,352.0,18.80,364.61,12.67,17.20
-0.01870,85.00,4.150,0,0.4290,6.5160,27.70,8.5353,4,351.0,17.90,392.43,6.36,23.10
-0.01501,80.00,2.010,0,0.4350,6.6350,29.70,8.3440,4,280.0,17.00,390.94,5.99,24.50
-0.02899,40.00,1.250,0,0.4290,6.9390,34.50,8.7921,1,335.0,19.70,389.85,5.89,26.60
-0.06211,40.00,1.250,0,0.4290,6.4900,44.40,8.7921,1,335.0,19.70,396.90,5.98,22.90
-0.07950,60.00,1.690,0,0.4110,6.5790,35.90,10.7103,4,411.0,18.30,370.78,5.49,24.10
-0.07244,60.00,1.690,0,0.4110,5.8840,18.50,10.7103,4,411.0,18.30,392.33,7.79,18.60
-0.01709,90.00,2.020,0,0.4100,6.7280,36.10,12.1265,5,187.0,17.00,384.46,4.50,30.10
-0.04301,80.00,1.910,0,0.4130,5.6630,21.90,10.5857,4,334.0,22.00,382.80,8.05,18.20
-0.10659,80.00,1.910,0,0.4130,5.9360,19.50,10.5857,4,334.0,22.00,376.04,5.57,20.60
-8.98296,0.00,18.100,1,0.7700,6.2120,97.40,2.1222,24,666.0,20.20,377.73,17.60,17.80
-3.84970,0.00,18.100,1,0.7700,6.3950,91.00,2.5052,24,666.0,20.20,391.34,13.27,21.70
-5.20177,0.00,18.100,1,0.7700,6.1270,83.40,2.7227,24,666.0,20.20,395.43,11.48,22.70
-4.26131,0.00,18.100,0,0.7700,6.1120,81.30,2.5091,24,666.0,20.20,390.74,12.67,22.60
-4.54192,0.00,18.100,0,0.7700,6.3980,88.00,2.5182,24,666.0,20.20,374.56,7.79,25.00
-3.83684,0.00,18.100,0,0.7700,6.2510,91.10,2.2955,24,666.0,20.20,350.65,14.19,19.90
-3.67822,0.00,18.100,0,0.7700,5.3620,96.20,2.1036,24,666.0,20.20,380.79,10.19,20.80
-4.22239,0.00,18.100,1,0.7700,5.8030,89.00,1.9047,24,666.0,20.20,353.04,14.64,16.80
-3.47428,0.00,18.100,1,0.7180,8.7800,82.90,1.9047,24,666.0,20.20,354.55,5.29,21.90
-4.55587,0.00,18.100,0,0.7180,3.5610,87.90,1.6132,24,666.0,20.20,354.70,7.12,27.50
-3.69695,0.00,18.100,0,0.7180,4.9630,91.40,1.7523,24,666.0,20.20,316.03,14.00,21.90
-13.52220,0.00,18.100,0,0.6310,3.8630,100.00,1.5106,24,666.0,20.20,131.42,13.33,23.10
-4.89822,0.00,18.100,0,0.6310,4.9700,100.00,1.3325,24,666.0,20.20,375.52,3.26,50.00
-5.66998,0.00,18.100,1,0.6310,6.6830,96.80,1.3567,24,666.0,20.20,375.33,3.73,50.00
-6.53876,0.00,18.100,1,0.6310,7.0160,97.50,1.2024,24,666.0,20.20,392.05,2.96,50.00
-9.23230,0.00,18.100,0,0.6310,6.2160,100.00,1.1691,24,666.0,20.20,366.15,9.53,50.00
-8.26725,0.00,18.100,1,0.6680,5.8750,89.60,1.1296,24,666.0,20.20,347.88,8.88,50.00
-11.10810,0.00,18.100,0,0.6680,4.9060,100.00,1.1742,24,666.0,20.20,396.90,34.77,13.80
-18.49820,0.00,18.100,0,0.6680,4.1380,100.00,1.1370,24,666.0,20.20,396.90,37.97,13.80
-19.60910,0.00,18.100,0,0.6710,7.3130,97.90,1.3163,24,666.0,20.20,396.90,13.44,15.00
-15.28800,0.00,18.100,0,0.6710,6.6490,93.30,1.3449,24,666.0,20.20,363.02,23.24,13.90
-9.82349,0.00,18.100,0,0.6710,6.7940,98.80,1.3580,24,666.0,20.20,396.90,21.24,13.30
-23.64820,0.00,18.100,0,0.6710,6.3800,96.20,1.3861,24,666.0,20.20,396.90,23.69,13.10
-17.86670,0.00,18.100,0,0.6710,6.2230,100.00,1.3861,24,666.0,20.20,393.74,21.78,10.20
-88.97620,0.00,18.100,0,0.6710,6.9680,91.90,1.4165,24,666.0,20.20,396.90,17.21,10.40
-15.87440,0.00,18.100,0,0.6710,6.5450,99.10,1.5192,24,666.0,20.20,396.90,21.08,10.90
-9.18702,0.00,18.100,0,0.7000,5.5360,100.00,1.5804,24,666.0,20.20,396.90,23.60,11.30
-7.99248,0.00,18.100,0,0.7000,5.5200,100.00,1.5331,24,666.0,20.20,396.90,24.56,12.30
-20.08490,0.00,18.100,0,0.7000,4.3680,91.20,1.4395,24,666.0,20.20,285.83,30.63,8.80
-16.81180,0.00,18.100,0,0.7000,5.2770,98.10,1.4261,24,666.0,20.20,396.90,30.81,7.20
-24.39380,0.00,18.100,0,0.7000,4.6520,100.00,1.4672,24,666.0,20.20,396.90,28.28,10.50
-22.59710,0.00,18.100,0,0.7000,5.0000,89.50,1.5184,24,666.0,20.20,396.90,31.99,7.40
-14.33370,0.00,18.100,0,0.7000,4.8800,100.00,1.5895,24,666.0,20.20,372.92,30.62,10.20
-8.15174,0.00,18.100,0,0.7000,5.3900,98.90,1.7281,24,666.0,20.20,396.90,20.85,11.50
-6.96215,0.00,18.100,0,0.7000,5.7130,97.00,1.9265,24,666.0,20.20,394.43,17.11,15.10
-5.29305,0.00,18.100,0,0.7000,6.0510,82.50,2.1678,24,666.0,20.20,378.38,18.76,23.20
-11.57790,0.00,18.100,0,0.7000,5.0360,97.00,1.7700,24,666.0,20.20,396.90,25.68,9.70
-8.64476,0.00,18.100,0,0.6930,6.1930,92.60,1.7912,24,666.0,20.20,396.90,15.17,13.80
-13.35980,0.00,18.100,0,0.6930,5.8870,94.70,1.7821,24,666.0,20.20,396.90,16.35,12.70
-8.71675,0.00,18.100,0,0.6930,6.4710,98.80,1.7257,24,666.0,20.20,391.98,17.12,13.10
-5.87205,0.00,18.100,0,0.6930,6.4050,96.00,1.6768,24,666.0,20.20,396.90,19.37,12.50
-7.67202,0.00,18.100,0,0.6930,5.7470,98.90,1.6334,24,666.0,20.20,393.10,19.92,8.50
-38.35180,0.00,18.100,0,0.6930,5.4530,100.00,1.4896,24,666.0,20.20,396.90,30.59,5.00
-9.91655,0.00,18.100,0,0.6930,5.8520,77.80,1.5004,24,666.0,20.20,338.16,29.97,6.30
-25.04610,0.00,18.100,0,0.6930,5.9870,100.00,1.5888,24,666.0,20.20,396.90,26.77,5.60
-14.23620,0.00,18.100,0,0.6930,6.3430,100.00,1.5741,24,666.0,20.20,396.90,20.32,7.20
-9.59571,0.00,18.100,0,0.6930,6.4040,100.00,1.6390,24,666.0,20.20,376.11,20.31,12.10
-24.80170,0.00,18.100,0,0.6930,5.3490,96.00,1.7028,24,666.0,20.20,396.90,19.77,8.30
-41.52920,0.00,18.100,0,0.6930,5.5310,85.40,1.6074,24,666.0,20.20,329.46,27.38,8.50
-67.92080,0.00,18.100,0,0.6930,5.6830,100.00,1.4254,24,666.0,20.20,384.97,22.98,5.00
-20.71620,0.00,18.100,0,0.6590,4.1380,100.00,1.1781,24,666.0,20.20,370.22,23.34,11.90
-11.95110,0.00,18.100,0,0.6590,5.6080,100.00,1.2852,24,666.0,20.20,332.09,12.13,27.90
-7.40389,0.00,18.100,0,0.5970,5.6170,97.90,1.4547,24,666.0,20.20,314.64,26.40,17.20
-14.43830,0.00,18.100,0,0.5970,6.8520,100.00,1.4655,24,666.0,20.20,179.36,19.78,27.50
-51.13580,0.00,18.100,0,0.5970,5.7570,100.00,1.4130,24,666.0,20.20,2.60,10.11,15.00
-14.05070,0.00,18.100,0,0.5970,6.6570,100.00,1.5275,24,666.0,20.20,35.05,21.22,17.20
-18.81100,0.00,18.100,0,0.5970,4.6280,100.00,1.5539,24,666.0,20.20,28.79,34.37,17.90
-28.65580,0.00,18.100,0,0.5970,5.1550,100.00,1.5894,24,666.0,20.20,210.97,20.08,16.30
-45.74610,0.00,18.100,0,0.6930,4.5190,100.00,1.6582,24,666.0,20.20,88.27,36.98,7.00
-18.08460,0.00,18.100,0,0.6790,6.4340,100.00,1.8347,24,666.0,20.20,27.25,29.05,7.20
-10.83420,0.00,18.100,0,0.6790,6.7820,90.80,1.8195,24,666.0,20.20,21.57,25.79,7.50
-25.94060,0.00,18.100,0,0.6790,5.3040,89.10,1.6475,24,666.0,20.20,127.36,26.64,10.40
-73.53410,0.00,18.100,0,0.6790,5.9570,100.00,1.8026,24,666.0,20.20,16.45,20.62,8.80
-11.81230,0.00,18.100,0,0.7180,6.8240,76.50,1.7940,24,666.0,20.20,48.45,22.74,8.40
-11.08740,0.00,18.100,0,0.7180,6.4110,100.00,1.8589,24,666.0,20.20,318.75,15.02,16.70
-7.02259,0.00,18.100,0,0.7180,6.0060,95.30,1.8746,24,666.0,20.20,319.98,15.70,14.20
-12.04820,0.00,18.100,0,0.6140,5.6480,87.60,1.9512,24,666.0,20.20,291.55,14.10,20.80
-7.05042,0.00,18.100,0,0.6140,6.1030,85.10,2.0218,24,666.0,20.20,2.52,23.29,13.40
-8.79212,0.00,18.100,0,0.5840,5.5650,70.60,2.0635,24,666.0,20.20,3.65,17.16,11.70
-15.86030,0.00,18.100,0,0.6790,5.8960,95.40,1.9096,24,666.0,20.20,7.68,24.39,8.30
-12.24720,0.00,18.100,0,0.5840,5.8370,59.70,1.9976,24,666.0,20.20,24.65,15.69,10.20
-37.66190,0.00,18.100,0,0.6790,6.2020,78.70,1.8629,24,666.0,20.20,18.82,14.52,10.90
-7.36711,0.00,18.100,0,0.6790,6.1930,78.10,1.9356,24,666.0,20.20,96.73,21.52,11.00
-9.33889,0.00,18.100,0,0.6790,6.3800,95.60,1.9682,24,666.0,20.20,60.72,24.08,9.50
-8.49213,0.00,18.100,0,0.5840,6.3480,86.10,2.0527,24,666.0,20.20,83.45,17.64,14.50
-10.06230,0.00,18.100,0,0.5840,6.8330,94.30,2.0882,24,666.0,20.20,81.33,19.69,14.10
-6.44405,0.00,18.100,0,0.5840,6.4250,74.80,2.2004,24,666.0,20.20,97.95,12.03,16.10
-5.58107,0.00,18.100,0,0.7130,6.4360,87.90,2.3158,24,666.0,20.20,100.19,16.22,14.30
-13.91340,0.00,18.100,0,0.7130,6.2080,95.00,2.2222,24,666.0,20.20,100.63,15.17,11.70
-11.16040,0.00,18.100,0,0.7400,6.6290,94.60,2.1247,24,666.0,20.20,109.85,23.27,13.40
-14.42080,0.00,18.100,0,0.7400,6.4610,93.30,2.0026,24,666.0,20.20,27.49,18.05,9.60
-15.17720,0.00,18.100,0,0.7400,6.1520,100.00,1.9142,24,666.0,20.20,9.32,26.45,8.70
-13.67810,0.00,18.100,0,0.7400,5.9350,87.90,1.8206,24,666.0,20.20,68.95,34.02,8.40
-9.39063,0.00,18.100,0,0.7400,5.6270,93.90,1.8172,24,666.0,20.20,396.90,22.88,12.80
-22.05110,0.00,18.100,0,0.7400,5.8180,92.40,1.8662,24,666.0,20.20,391.45,22.11,10.50
-9.72418,0.00,18.100,0,0.7400,6.4060,97.20,2.0651,24,666.0,20.20,385.96,19.52,17.10
-5.66637,0.00,18.100,0,0.7400,6.2190,100.00,2.0048,24,666.0,20.20,395.69,16.59,18.40
-9.96654,0.00,18.100,0,0.7400,6.4850,100.00,1.9784,24,666.0,20.20,386.73,18.85,15.40
-12.80230,0.00,18.100,0,0.7400,5.8540,96.60,1.8956,24,666.0,20.20,240.52,23.79,10.80
-10.67180,0.00,18.100,0,0.7400,6.4590,94.80,1.9879,24,666.0,20.20,43.06,23.98,11.80
-6.28807,0.00,18.100,0,0.7400,6.3410,96.40,2.0720,24,666.0,20.20,318.01,17.79,14.90
-9.92485,0.00,18.100,0,0.7400,6.2510,96.60,2.1980,24,666.0,20.20,388.52,16.44,12.60
-9.32909,0.00,18.100,0,0.7130,6.1850,98.70,2.2616,24,666.0,20.20,396.90,18.13,14.10
-7.52601,0.00,18.100,0,0.7130,6.4170,98.30,2.1850,24,666.0,20.20,304.21,19.31,13.00
-6.71772,0.00,18.100,0,0.7130,6.7490,92.60,2.3236,24,666.0,20.20,0.32,17.44,13.40
-5.44114,0.00,18.100,0,0.7130,6.6550,98.20,2.3552,24,666.0,20.20,355.29,17.73,15.20
-5.09017,0.00,18.100,0,0.7130,6.2970,91.80,2.3682,24,666.0,20.20,385.09,17.27,16.10
-8.24809,0.00,18.100,0,0.7130,7.3930,99.30,2.4527,24,666.0,20.20,375.87,16.74,17.80
-9.51363,0.00,18.100,0,0.7130,6.7280,94.10,2.4961,24,666.0,20.20,6.68,18.71,14.90
-4.75237,0.00,18.100,0,0.7130,6.5250,86.50,2.4358,24,666.0,20.20,50.92,18.13,14.10
-4.66883,0.00,18.100,0,0.7130,5.9760,87.90,2.5806,24,666.0,20.20,10.48,19.01,12.70
-8.20058,0.00,18.100,0,0.7130,5.9360,80.30,2.7792,24,666.0,20.20,3.50,16.94,13.50
-7.75223,0.00,18.100,0,0.7130,6.3010,83.70,2.7831,24,666.0,20.20,272.21,16.23,14.90
-6.80117,0.00,18.100,0,0.7130,6.0810,84.40,2.7175,24,666.0,20.20,396.90,14.70,20.00
-4.81213,0.00,18.100,0,0.7130,6.7010,90.00,2.5975,24,666.0,20.20,255.23,16.42,16.40
-3.69311,0.00,18.100,0,0.7130,6.3760,88.40,2.5671,24,666.0,20.20,391.43,14.65,17.70
-6.65492,0.00,18.100,0,0.7130,6.3170,83.00,2.7344,24,666.0,20.20,396.90,13.99,19.50
-5.82115,0.00,18.100,0,0.7130,6.5130,89.90,2.8016,24,666.0,20.20,393.82,10.29,20.20
-7.83932,0.00,18.100,0,0.6550,6.2090,65.40,2.9634,24,666.0,20.20,396.90,13.22,21.40
-3.16360,0.00,18.100,0,0.6550,5.7590,48.20,3.0665,24,666.0,20.20,334.40,14.13,19.90
-3.77498,0.00,18.100,0,0.6550,5.9520,84.70,2.8715,24,666.0,20.20,22.01,17.15,19.00
-4.42228,0.00,18.100,0,0.5840,6.0030,94.50,2.5403,24,666.0,20.20,331.29,21.32,19.10
-15.57570,0.00,18.100,0,0.5800,5.9260,71.00,2.9084,24,666.0,20.20,368.74,18.13,19.10
-13.07510,0.00,18.100,0,0.5800,5.7130,56.70,2.8237,24,666.0,20.20,396.90,14.76,20.10
-4.34879,0.00,18.100,0,0.5800,6.1670,84.00,3.0334,24,666.0,20.20,396.90,16.29,19.90
-4.03841,0.00,18.100,0,0.5320,6.2290,90.70,3.0993,24,666.0,20.20,395.33,12.87,19.60
-3.56868,0.00,18.100,0,0.5800,6.4370,75.00,2.8965,24,666.0,20.20,393.37,14.36,23.20
-4.64689,0.00,18.100,0,0.6140,6.9800,67.60,2.5329,24,666.0,20.20,374.68,11.66,29.80
-8.05579,0.00,18.100,0,0.5840,5.4270,95.40,2.4298,24,666.0,20.20,352.58,18.14,13.80
-6.39312,0.00,18.100,0,0.5840,6.1620,97.40,2.2060,24,666.0,20.20,302.76,24.10,13.30
-4.87141,0.00,18.100,0,0.6140,6.4840,93.60,2.3053,24,666.0,20.20,396.21,18.68,16.70
-15.02340,0.00,18.100,0,0.6140,5.3040,97.30,2.1007,24,666.0,20.20,349.48,24.91,12.00
-10.23300,0.00,18.100,0,0.6140,6.1850,96.70,2.1705,24,666.0,20.20,379.70,18.03,14.60
-14.33370,0.00,18.100,0,0.6140,6.2290,88.00,1.9512,24,666.0,20.20,383.32,13.11,21.40
-5.82401,0.00,18.100,0,0.5320,6.2420,64.70,3.4242,24,666.0,20.20,396.90,10.74,23.00
-5.70818,0.00,18.100,0,0.5320,6.7500,74.90,3.3317,24,666.0,20.20,393.07,7.74,23.70
-5.73116,0.00,18.100,0,0.5320,7.0610,77.00,3.4106,24,666.0,20.20,395.28,7.01,25.00
-2.81838,0.00,18.100,0,0.5320,5.7620,40.30,4.0983,24,666.0,20.20,392.92,10.42,21.80
-2.37857,0.00,18.100,0,0.5830,5.8710,41.90,3.7240,24,666.0,20.20,370.73,13.34,20.60
-3.67367,0.00,18.100,0,0.5830,6.3120,51.90,3.9917,24,666.0,20.20,388.62,10.58,21.20
-5.69175,0.00,18.100,0,0.5830,6.1140,79.80,3.5459,24,666.0,20.20,392.68,14.98,19.10
-4.83567,0.00,18.100,0,0.5830,5.9050,53.20,3.1523,24,666.0,20.20,388.22,11.45,20.60
-0.15086,0.00,27.740,0,0.6090,5.4540,92.70,1.8209,4,711.0,20.10,395.09,18.06,15.20
-0.18337,0.00,27.740,0,0.6090,5.4140,98.30,1.7554,4,711.0,20.10,344.05,23.97,7.00
-0.20746,0.00,27.740,0,0.6090,5.0930,98.00,1.8226,4,711.0,20.10,318.43,29.68,8.10
-0.10574,0.00,27.740,0,0.6090,5.9830,98.80,1.8681,4,711.0,20.10,390.11,18.07,13.60
-0.11132,0.00,27.740,0,0.6090,5.9830,83.50,2.1099,4,711.0,20.10,396.90,13.35,20.10
-0.17331,0.00,9.690,0,0.5850,5.7070,54.00,2.3817,6,391.0,19.20,396.90,12.01,21.80
-0.27957,0.00,9.690,0,0.5850,5.9260,42.60,2.3817,6,391.0,19.20,396.90,13.59,24.50
-0.17899,0.00,9.690,0,0.5850,5.6700,28.80,2.7986,6,391.0,19.20,393.29,17.60,23.10
-0.28960,0.00,9.690,0,0.5850,5.3900,72.90,2.7986,6,391.0,19.20,396.90,21.14,19.70
-0.26838,0.00,9.690,0,0.5850,5.7940,70.60,2.8927,6,391.0,19.20,396.90,14.10,18.30
-0.23912,0.00,9.690,0,0.5850,6.0190,65.30,2.4091,6,391.0,19.20,396.90,12.92,21.20
-0.17783,0.00,9.690,0,0.5850,5.5690,73.50,2.3999,6,391.0,19.20,395.77,15.10,17.50
-0.22438,0.00,9.690,0,0.5850,6.0270,79.70,2.4982,6,391.0,19.20,396.90,14.33,16.80
-0.06263,0.00,11.930,0,0.5730,6.5930,69.10,2.4786,1,273.0,21.00,391.99,9.67,22.40
-0.04527,0.00,11.930,0,0.5730,6.1200,76.70,2.2875,1,273.0,21.00,396.90,9.08,20.60
-0.06076,0.00,11.930,0,0.5730,6.9760,91.00,2.1675,1,273.0,21.00,396.90,5.64,23.90
-0.10959,0.00,11.930,0,0.5730,6.7940,89.30,2.3889,1,273.0,21.00,393.45,6.48,22.00
-0.04741,0.00,11.930,0,0.5730,6.0300,80.80,2.5050,1,273.0,21.00,396.90,7.88,11.90

http://git-wip-us.apache.org/repos/asf/ignite/blob/86a788f3/examples/src/main/resources/datasets/cleared_machines.csv
----------------------------------------------------------------------
diff --git a/examples/src/main/resources/datasets/cleared_machines.csv b/examples/src/main/resources/datasets/cleared_machines.csv
deleted file mode 100644
index e22aac8..0000000
--- a/examples/src/main/resources/datasets/cleared_machines.csv
+++ /dev/null
@@ -1,209 +0,0 @@
-199;125;256;6000;256;16;128
-253;29;8000;32000;32;8;32
-253;29;8000;32000;32;8;32
-253;29;8000;32000;32;8;32
-132;29;8000;16000;32;8;16
-290;26;8000;32000;64;8;32
-381;23;16000;32000;64;16;32
-381;23;16000;32000;64;16;32
-749;23;16000;64000;64;16;32
-1238;23;32000;64000;128;32;64
-23;400;1000;3000;0;1;2
-24;400;512;3500;4;1;6
-70;60;2000;8000;65;1;8
-117;50;4000;16000;65;1;8
-15;350;64;64;0;1;4
-64;200;512;16000;0;4;32
-23;167;524;2000;8;4;15
-29;143;512;5000;0;7;32
-22;143;1000;2000;0;5;16
-124;110;5000;5000;142;8;64
-35;143;1500;6300;0;5;32
-39;143;3100;6200;0;5;20
-40;143;2300;6200;0;6;64
-45;110;3100;6200;0;6;64
-28;320;128;6000;0;1;12
-21;320;512;2000;4;1;3
-28;320;256;6000;0;1;6
-22;320;256;3000;4;1;3
-28;320;512;5000;4;1;5
-27;320;256;5000;4;1;6
-102;25;1310;2620;131;12;24
-102;25;1310;2620;131;12;24
-74;50;2620;10480;30;12;24
-74;50;2620;10480;30;12;24
-138;56;5240;20970;30;12;24
-136;64;5240;20970;30;12;24
-23;50;500;2000;8;1;4
-29;50;1000;4000;8;1;5
-44;50;2000;8000;8;1;5
-30;50;1000;4000;8;3;5
-41;50;1000;8000;8;3;5
-74;50;2000;16000;8;3;5
-74;50;2000;16000;8;3;6
-74;50;2000;16000;8;3;6
-54;133;1000;12000;9;3;12
-41;133;1000;8000;9;3;12
-18;810;512;512;8;1;1
-28;810;1000;5000;0;1;1
-36;320;512;8000;4;1;5
-38;200;512;8000;8;1;8
-34;700;384;8000;0;1;1
-19;700;256;2000;0;1;1
-72;140;1000;16000;16;1;3
-36;200;1000;8000;0;1;2
-30;110;1000;4000;16;1;2
-56;110;1000;12000;16;1;2
-42;220;1000;8000;16;1;2
-34;800;256;8000;0;1;4
-34;800;256;8000;0;1;4
-34;800;256;8000;0;1;4
-34;800;256;8000;0;1;4
-34;800;256;8000;0;1;4
-19;125;512;1000;0;8;20
-75;75;2000;8000;64;1;38
-113;75;2000;16000;64;1;38
-157;75;2000;16000;128;1;38
-18;90;256;1000;0;3;10
-20;105;256;2000;0;3;10
-28;105;1000;4000;0;3;24
-33;105;2000;4000;8;3;19
-47;75;2000;8000;8;3;24
-54;75;3000;8000;8;3;48
-20;175;256;2000;0;3;24
-23;300;768;3000;0;6;24
-25;300;768;3000;6;6;24
-52;300;768;12000;6;6;24
-27;300;768;4500;0;1;24
-50;300;384;12000;6;1;24
-18;300;192;768;6;6;24
-53;180;768;12000;6;1;31
-23;330;1000;3000;0;2;4
-30;300;1000;4000;8;3;64
-73;300;1000;16000;8;2;112
-20;330;1000;2000;0;1;2
-25;330;1000;4000;0;3;6
-28;140;2000;4000;0;3;6
-29;140;2000;4000;0;4;8
-32;140;2000;4000;8;1;20
-175;140;2000;32000;32;1;20
-57;140;2000;8000;32;1;54
-181;140;2000;32000;32;1;54
-181;140;2000;32000;32;1;54
-32;140;2000;4000;8;1;20
-82;57;4000;16000;1;6;12
-171;57;4000;24000;64;12;16
-361;26;16000;32000;64;16;24
-350;26;16000;32000;64;8;24
-220;26;8000;32000;0;8;24
-113;26;8000;16000;0;8;16
-15;480;96;512;0;1;1
-21;203;1000;2000;0;1;5
-35;115;512;6000;16;1;6
-18;1100;512;1500;0;1;1
-20;1100;768;2000;0;1;1
-20;600;768;2000;0;1;1
-28;400;2000;4000;0;1;1
-45;400;4000;8000;0;1;1
-18;900;1000;1000;0;1;2
-17;900;512;1000;0;1;2
-26;900;1000;4000;4;1;2
-28;900;1000;4000;8;1;2
-28;900;2000;4000;0;3;6
-31;225;2000;4000;8;3;6
-31;225;2000;4000;8;3;6
-42;180;2000;8000;8;1;6
-76;185;2000;16000;16;1;6
-76;180;2000;16000;16;1;6
-26;225;1000;4000;2;3;6
-59;25;2000;12000;8;1;4
-65;25;2000;12000;16;3;5
-101;17;4000;16000;8;6;12
-116;17;4000;16000;32;6;12
-18;1500;768;1000;0;0;0
-20;1500;768;2000;0;0;0
-20;800;768;2000;0;0;0
-30;50;2000;4000;0;3;6
-44;50;2000;8000;8;3;6
-44;50;2000;8000;8;1;6
-82;50;2000;16000;24;1;6
-82;50;2000;16000;24;1;6
-128;50;8000;16000;48;1;10
-37;100;1000;8000;0;2;6
-46;100;1000;8000;24;2;6
-46;100;1000;8000;24;3;6
-80;50;2000;16000;12;3;16
-88;50;2000;16000;24;6;16
-88;50;2000;16000;24;6;16
-33;150;512;4000;0;8;128
-46;115;2000;8000;16;1;3
-29;115;2000;4000;2;1;5
-53;92;2000;8000;32;1;6
-53;92;2000;8000;32;1;6
-41;92;2000;8000;4;1;6
-86;75;4000;16000;16;1;6
-95;60;4000;16000;32;1;6
-107;60;2000;16000;64;5;8
-117;60;4000;16000;64;5;8
-119;50;4000;16000;64;5;10
-120;72;4000;16000;64;8;16
-48;72;2000;8000;16;6;8
-126;40;8000;16000;32;8;16
-266;40;8000;32000;64;8;24
-270;35;8000;32000;64;8;24
-426;38;16000;32000;128;16;32
-151;48;4000;24000;32;8;24
-267;38;8000;32000;64;8;24
-603;30;16000;32000;256;16;24
-19;112;1000;1000;0;1;4
-21;84;1000;2000;0;1;6
-26;56;1000;4000;0;1;6
-35;56;2000;6000;0;1;8
-41;56;2000;8000;0;1;8
-47;56;4000;8000;0;1;8
-62;56;4000;12000;0;1;8
-78;56;4000;16000;0;1;8
-80;38;4000;8000;32;16;32
-80;38;4000;8000;32;16;32
-142;38;8000;16000;64;4;8
-281;38;8000;24000;160;4;8
-190;38;4000;16000;128;16;32
-21;200;1000;2000;0;1;2
-25;200;1000;4000;0;1;4
-67;200;2000;8000;64;1;5
-24;250;512;4000;0;1;7
-24;250;512;4000;0;4;7
-64;250;1000;16000;1;1;8
-25;160;512;4000;2;1;5
-20;160;512;2000;2;3;8
-29;160;1000;4000;8;1;14
-43;160;1000;8000;16;1;14
-53;160;2000;8000;32;1;13
-19;240;512;1000;8;1;3
-22;240;512;2000;8;1;5
-31;105;2000;4000;8;3;8
-41;105;2000;6000;16;6;16
-47;105;2000;8000;16;4;14
-99;52;4000;16000;32;4;12
-67;70;4000;12000;8;6;8
-81;59;4000;12000;32;6;12
-149;59;8000;16000;64;12;24
-183;26;8000;24000;32;8;16
-275;26;8000;32000;64;12;16
-382;26;8000;32000;128;24;32
-56;116;2000;8000;32;5;28
-182;50;2000;32000;24;6;26
-227;50;2000;32000;48;26;52
-341;50;2000;32000;112;52;104
-360;50;4000;32000;112;52;104
-919;30;8000;64000;96;12;176
-978;30;8000;64000;128;12;176
-24;180;262;4000;0;1;3
-24;180;512;4000;0;1;3
-24;180;262;4000;0;1;3
-24;180;512;4000;0;1;3
-37;124;1000;8000;0;1;8
-50;98;1000;8000;32;2;8
-41;125;2000;8000;0;2;14
-47;480;512;8000;32;0;0
-25;480;1000;4000;0;0;0

http://git-wip-us.apache.org/repos/asf/ignite/blob/86a788f3/examples/src/main/resources/datasets/glass_identification.csv
----------------------------------------------------------------------
diff --git a/examples/src/main/resources/datasets/glass_identification.csv b/examples/src/main/resources/datasets/glass_identification.csv
deleted file mode 100644
index ae1d6d1..0000000
--- a/examples/src/main/resources/datasets/glass_identification.csv
+++ /dev/null
@@ -1,116 +0,0 @@
-1; 1.52101; 4.49; 1.10; 0.00; 0.00
-1; 1.51761; 3.60; 1.36; 0.00; 0.00
-1; 1.51618; 3.55; 1.54; 0.00; 0.00
-1; 1.51766; 3.69; 1.29; 0.00; 0.00
-1; 1.51742; 3.62; 1.24; 0.00; 0.00
-1; 1.51596; 3.61; 1.62; 0.00; 0.26
-1; 1.51743; 3.60; 1.14; 0.00; 0.00
-1; 1.51756; 3.61; 1.05; 0.00; 0.00
-1; 1.51918; 3.58; 1.37; 0.00; 0.00
-1; 1.51755; 3.60; 1.36; 0.00; 0.11
-1; 1.51571; 3.46; 1.56; 0.00; 0.24
-1; 1.51763; 3.66; 1.27; 0.00; 0.00
-1; 1.51589; 3.43; 1.40; 0.00; 0.24
-1; 1.51748; 3.56; 1.27; 0.00; 0.17
-1; 1.51763; 3.59; 1.31; 0.00; 0.00
-1; 1.51761; 3.54; 1.23; 0.00; 0.00
-1; 1.51784; 3.67; 1.16; 0.00; 0.00
-1; 1.52196; 3.85; 0.89; 0.00; 0.00
-1; 1.51911; 3.73; 1.18; 0.00; 0.00
-1; 1.51735; 3.54; 1.69; 0.00; 0.07
-1; 1.51750; 3.55; 1.49; 0.00; 0.19
-1; 1.51966; 3.75; 0.29; 0.00; 0.00
-1; 1.51736; 3.62; 1.29; 0.00; 0.00
-1; 1.51751; 3.57; 1.35; 0.00; 0.00
-1; 1.51720; 3.50; 1.15; 0.00; 0.00
-1; 1.51764; 3.54; 1.21; 0.00; 0.00
-1; 1.51793; 3.48; 1.41; 0.00; 0.00
-1; 1.51721; 3.48; 1.33; 0.00; 0.00
-1; 1.51768; 3.52; 1.43; 0.00; 0.00
-1; 1.51784; 3.49; 1.28; 0.00; 0.00
-1; 1.51768; 3.56; 1.30; 0.00; 0.14
-1; 1.51747; 3.50; 1.14; 0.00; 0.00
-1; 1.51775; 3.48; 1.23; 0.09; 0.22
-1; 1.51753; 3.47; 1.38; 0.00; 0.06
-1; 1.51783; 3.54; 1.34; 0.00; 0.00
-1; 1.51567; 3.45; 1.21; 0.00; 0.00
-1; 1.51909; 3.53; 1.32; 0.11; 0.00
-1; 1.51797; 3.48; 1.35; 0.00; 0.00
-1; 1.52213; 3.82; 0.47; 0.00; 0.00
-1; 1.52213; 3.82; 0.47; 0.00; 0.00
-1; 1.51793; 3.50; 1.12; 0.00; 0.00
-1; 1.51755; 3.42; 1.20; 0.00; 0.00
-1; 1.51779; 3.39; 1.33; 0.00; 0.00
-1; 1.52210; 3.84; 0.72; 0.00; 0.00
-1; 1.51786; 3.43; 1.19; 0.00; 0.30
-1; 1.51900; 3.48; 1.35; 0.00; 0.00
-1; 1.51869; 3.37; 1.18; 0.00; 0.16
-1; 1.52667; 3.70; 0.71; 0.00; 0.10
-1; 1.52223; 3.77; 0.79; 0.00; 0.00
-1; 1.51898; 3.35; 1.23; 0.00; 0.00
-1; 1.52320; 3.72; 0.51; 0.00; 0.16
-1; 1.51926; 3.33; 1.28; 0.00; 0.11
-1; 1.51808; 2.87; 1.19; 0.00; 0.00
-1; 1.51837; 2.84; 1.28; 0.00; 0.00
-1; 1.51778; 2.81; 1.29; 0.00; 0.09
-1; 1.51769; 2.71; 1.29; 0.00; 0.24
-1; 1.51215; 3.47; 1.12; 0.00; 0.31
-1; 1.51824; 3.48; 1.29; 0.00; 0.00
-1; 1.51754; 3.74; 1.17; 0.00; 0.00
-1; 1.51754; 3.66; 1.19; 0.00; 0.11
-1; 1.51905; 3.62; 1.11; 0.00; 0.00
-1; 1.51977; 3.58; 1.32; 0.69; 0.00
-1; 1.52172; 3.86; 0.88; 0.00; 0.11
-1; 1.52227; 3.81; 0.78; 0.00; 0.00
-1; 1.52172; 3.74; 0.90; 0.00; 0.07
-1; 1.52099; 3.59; 1.12; 0.00; 0.00
-1; 1.52152; 3.65; 0.87; 0.00; 0.17
-1; 1.52152; 3.65; 0.87; 0.00; 0.17
-1; 1.52152; 3.58; 0.90; 0.00; 0.16
-1; 1.52300; 3.58; 0.82; 0.00; 0.03
-3; 1.51769; 3.66; 1.11; 0.00; 0.00
-3; 1.51610; 3.53; 1.34; 0.00; 0.00
-3; 1.51670; 3.57; 1.38; 0.00; 0.10
-3; 1.51643; 3.52; 1.35; 0.00; 0.00
-3; 1.51665; 3.45; 1.76; 0.00; 0.17
-3; 1.52127; 3.90; 0.83; 0.00; 0.00
-3; 1.51779; 3.65; 0.65; 0.00; 0.00
-3; 1.51610; 3.40; 1.22; 0.00; 0.00
-3; 1.51694; 3.58; 1.31; 0.00; 0.00
-3; 1.51646; 3.40; 1.26; 0.00; 0.00
-3; 1.51655; 3.39; 1.28; 0.00; 0.00
-3; 1.52121; 3.76; 0.58; 0.00; 0.00
-3; 1.51776; 3.41; 1.52; 0.00; 0.00
-3; 1.51796; 3.36; 1.63; 0.00; 0.09
-3; 1.51832; 3.34; 1.54; 0.00; 0.00
-3; 1.51934; 3.54; 0.75; 0.15; 0.24
-3; 1.52211; 3.78; 0.91; 0.00; 0.37
-7; 1.51131; 3.20; 1.81; 1.19; 0.00
-7; 1.51838; 3.26; 2.22; 1.63; 0.00
-7; 1.52315; 3.34; 1.23; 0.00; 0.00
-7; 1.52247; 2.20; 2.06; 0.00; 0.00
-7; 1.52365; 1.83; 1.31; 1.68; 0.00
-7; 1.51613; 1.78; 1.79; 0.76; 0.00
-7; 1.51602; 0.00; 2.38; 0.64; 0.09
-7; 1.51623; 0.00; 2.79; 0.40; 0.09
-7; 1.51719; 0.00; 2.00; 1.59; 0.08
-7; 1.51683; 0.00; 1.98; 1.57; 0.07
-7; 1.51545; 0.00; 2.68; 0.61; 0.05
-7; 1.51556; 0.00; 2.54; 0.81; 0.01
-7; 1.51727; 0.00; 2.34; 0.66; 0.00
-7; 1.51531; 0.00; 2.66; 0.64; 0.00
-7; 1.51609; 0.00; 2.51; 0.53; 0.00
-7; 1.51508; 0.00; 2.25; 0.63; 0.00
-7; 1.51653; 0.00; 1.19; 0.00; 0.00
-7; 1.51514; 0.00; 2.42; 0.56; 0.00
-7; 1.51658; 0.00; 1.99; 1.71; 0.00
-7; 1.51617; 0.00; 2.27; 0.67; 0.00
-7; 1.51732; 0.00; 1.80; 1.55; 0.00
-7; 1.51645; 0.00; 1.87; 1.38; 0.00
-7; 1.51831; 0.00; 1.82; 2.88; 0.00
-7; 1.51640; 0.00; 2.74; 0.54; 0.00
-7; 1.51623; 0.00; 2.88; 1.06; 0.00
-7; 1.51685; 0.00; 1.99; 1.59; 0.00
-7; 1.52065; 0.00; 2.02; 1.64; 0.00
-7; 1.51651; 0.00; 1.94; 1.57; 0.00
-7; 1.51711; 0.00; 2.08; 1.67; 0.00


[24/37] ignite git commit: IGNITE-10475 Introduce IDEA async debugger annotations - Fixes #5546.

Posted by ak...@apache.org.
IGNITE-10475 Introduce IDEA async debugger annotations - Fixes #5546.

Signed-off-by: Dmitriy Govorukhin <dm...@gmail.com>


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

Branch: refs/heads/ignite-10189
Commit: 3fb68f7254802e7f9bca78e42c20e59dd08c49c8
Parents: 26860c5
Author: ibessonov <be...@gmail.com>
Authored: Fri Dec 7 12:50:14 2018 +0300
Committer: Dmitriy Govorukhin <dm...@gmail.com>
Committed: Fri Dec 7 12:50:14 2018 +0300

----------------------------------------------------------------------
 .../ignite/internal/IgniteInternalFuture.java   |  4 ++++
 .../internal/util/future/GridFutureAdapter.java | 20 +++++++++++++-------
 2 files changed, 17 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/3fb68f72/modules/core/src/main/java/org/apache/ignite/internal/IgniteInternalFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgniteInternalFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/IgniteInternalFuture.java
index 76f8c71..b133ef0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgniteInternalFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgniteInternalFuture.java
@@ -23,6 +23,7 @@ import java.util.concurrent.TimeUnit;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.lang.IgniteClosure;
 import org.apache.ignite.lang.IgniteInClosure;
+import org.jetbrains.annotations.Async;
 
 /**
  * Extension for standard {@link Future} interface. It adds simplified exception handling,
@@ -107,6 +108,7 @@ public interface IgniteInternalFuture<R> {
      *
      * @param lsnr Listener closure to register. If not provided - this method is no-op.
      */
+    @Async.Schedule
     public void listen(IgniteInClosure<? super IgniteInternalFuture<R>> lsnr);
 
     /**
@@ -116,6 +118,7 @@ public interface IgniteInternalFuture<R> {
      * @param doneCb Done callback that is applied to this future when it finishes to produce chained future result.
      * @return Chained future that finishes after this future completes and done callback is called.
      */
+    @Async.Schedule
     public <T> IgniteInternalFuture<T> chain(IgniteClosure<? super IgniteInternalFuture<R>, T> doneCb);
 
     /**
@@ -126,6 +129,7 @@ public interface IgniteInternalFuture<R> {
      * @param exec Executor to run callback.
      * @return Chained future that finishes after this future completes and done callback is called.
      */
+    @Async.Schedule
     public <T> IgniteInternalFuture<T> chain(IgniteClosure<? super IgniteInternalFuture<R>, T> doneCb, Executor exec);
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/3fb68f72/modules/core/src/main/java/org/apache/ignite/internal/util/future/GridFutureAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/future/GridFutureAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/util/future/GridFutureAdapter.java
index a191f30..6eafe48 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/future/GridFutureAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/future/GridFutureAdapter.java
@@ -34,6 +34,7 @@ import org.apache.ignite.internal.util.typedef.internal.S;
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.lang.IgniteClosure;
 import org.apache.ignite.lang.IgniteInClosure;
+import org.jetbrains.annotations.Async;
 import org.jetbrains.annotations.Nullable;
 
 /**
@@ -331,7 +332,6 @@ public class GridFutureAdapter<R> implements IgniteInternalFuture<R> {
     /**
      * @param head Head of waiters stack.
      */
-    @SuppressWarnings("unchecked")
     private void unblockAll(Node head) {
         while (head != null) {
             unblock(head.val);
@@ -343,21 +343,24 @@ public class GridFutureAdapter<R> implements IgniteInternalFuture<R> {
      * @param waiter Waiter to unblock
      */
     private void unblock(Object waiter) {
-        if(waiter instanceof Thread)
+        if (waiter instanceof Thread)
             LockSupport.unpark((Thread)waiter);
         else
             notifyListener((IgniteInClosure<? super IgniteInternalFuture<R>>)waiter);
     }
 
     /** {@inheritDoc} */
+    @Async.Schedule
     @Override public void listen(IgniteInClosure<? super IgniteInternalFuture<R>> lsnr) {
         if (!registerWaiter(lsnr))
             notifyListener(lsnr);
     }
 
     /** {@inheritDoc} */
-    @Override public <T> IgniteInternalFuture<T> chain(final IgniteClosure<? super IgniteInternalFuture<R>, T> doneCb) {
-        ChainFuture fut = new ChainFuture<>(this, doneCb, null);
+    @Override public <T> IgniteInternalFuture<T> chain(
+        IgniteClosure<? super IgniteInternalFuture<R>, T> doneCb
+    ) {
+        ChainFuture<R, T> fut = new ChainFuture<>(this, doneCb, null);
 
         if (ignoreInterrupts)
             fut.ignoreInterrupts();
@@ -366,9 +369,11 @@ public class GridFutureAdapter<R> implements IgniteInternalFuture<R> {
     }
 
     /** {@inheritDoc} */
-    @Override public <T> IgniteInternalFuture<T> chain(final IgniteClosure<? super IgniteInternalFuture<R>, T> doneCb,
-        Executor exec) {
-        ChainFuture fut = new ChainFuture<>(this, doneCb, exec);
+    @Override public <T> IgniteInternalFuture<T> chain(
+        IgniteClosure<? super IgniteInternalFuture<R>, T> doneCb,
+        Executor exec
+    ) {
+        ChainFuture<R, T> fut = new ChainFuture<>(this, doneCb, exec);
 
         if (ignoreInterrupts)
             fut.ignoreInterrupts();
@@ -388,6 +393,7 @@ public class GridFutureAdapter<R> implements IgniteInternalFuture<R> {
      *
      * @param lsnr Listener.
      */
+    @Async.Execute
     private void notifyListener(IgniteInClosure<? super IgniteInternalFuture<R>> lsnr) {
         assert lsnr != null;
 


[09/37] ignite git commit: IGNITE-10442 Fixed flaky testFailNodesOnCanceledTask - Fixes #5547.

Posted by ak...@apache.org.
IGNITE-10442 Fixed flaky testFailNodesOnCanceledTask - Fixes #5547.

Signed-off-by: Alexey Goncharuk <al...@gmail.com>


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

Branch: refs/heads/ignite-10189
Commit: 4c56adcf0997f4a97542cbabd3e5185dc9ed9af1
Parents: 5990bcd
Author: Fedotov <va...@gmail.com>
Authored: Wed Dec 5 19:48:11 2018 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Wed Dec 5 19:48:11 2018 +0300

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


http://git-wip-us.apache.org/repos/asf/ignite/blob/4c56adcf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsTaskCancelingTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsTaskCancelingTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsTaskCancelingTest.java
index 6b53339..9409f9d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsTaskCancelingTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsTaskCancelingTest.java
@@ -87,6 +87,9 @@ public class IgnitePdsTaskCancelingTest extends GridCommonAbstractTest {
 
         cfg.setDataStorageConfiguration(getDataStorageConfiguration());
 
+        // Set the thread pool size according to the NUM_TASKS.
+        cfg.setPublicThreadPoolSize(16);
+
         return cfg;
     }
 


[27/37] ignite git commit: IGNITE-9455 Total allocated size memory metric is always zero for metastore data region - Fixes #5195.

Posted by ak...@apache.org.
IGNITE-9455 Total allocated size memory metric is always zero for metastore data region - Fixes #5195.

Signed-off-by: Aleksey Plekhanov <Pl...@gmail.com>


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

Branch: refs/heads/ignite-10189
Commit: 137a0e7b302a2fa6f4c8bb4d81916e45ffa7ff09
Parents: 472889d
Author: pereslegin-pa <xx...@gmail.com>
Authored: Fri Dec 7 14:32:44 2018 +0300
Committer: Aleksey Plekhanov <Pl...@gmail.com>
Committed: Fri Dec 7 14:32:44 2018 +0300

----------------------------------------------------------------------
 .../apache/ignite/internal/IgniteKernal.java    |  8 +---
 .../cache/CacheGroupMetricsMXBeanImpl.java      |  7 +++
 .../persistence/DataRegionMetricsImpl.java      | 19 ++++++++
 .../persistence/file/FilePageStoreManager.java  |  6 ++-
 .../persistence/metastorage/MetaStorage.java    |  2 +
 .../internal/GridNodeMetricsLogPdsSelfTest.java |  9 +---
 .../db/IgnitePdsDataRegionMetricsTest.java      | 50 +++++++++++++-------
 7 files changed, 68 insertions(+), 33 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/137a0e7b/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 f777980..15f3c6a 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
@@ -130,7 +130,6 @@ import org.apache.ignite.internal.processors.cache.binary.CacheObjectBinaryProce
 import org.apache.ignite.internal.processors.cache.mvcc.MvccProcessorImpl;
 import org.apache.ignite.internal.processors.cache.persistence.DataRegion;
 import org.apache.ignite.internal.processors.cache.persistence.DataStorageMXBeanImpl;
-import org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager;
 import org.apache.ignite.internal.processors.cache.persistence.filename.PdsConsistentIdProcessor;
 import org.apache.ignite.internal.processors.cacheobject.IgniteCacheObjectProcessor;
 import org.apache.ignite.internal.processors.closure.GridClosureProcessor;
@@ -2109,12 +2108,7 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable {
 
                         pdsUsedSummary += pdsUsed;
 
-                        // TODO https://issues.apache.org/jira/browse/IGNITE-9455
-                        // TODO Print actual value for meta store region when issue will be fixed.
-                        boolean metastore =
-                            GridCacheDatabaseSharedManager.METASTORE_DATA_REGION_NAME.equals(region.config().getName());
-
-                        String pdsUsedSize = metastore ? "unknown" : dblFmt.format(pdsUsedMBytes) + "MB";
+                        String pdsUsedSize = dblFmt.format(pdsUsedMBytes) + "MB";
 
                         pdsRegionsInfo.append("    ^--   ")
                             .append(region.config().getName()).append(" region")

http://git-wip-us.apache.org/repos/asf/ignite/blob/137a0e7b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheGroupMetricsMXBeanImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheGroupMetricsMXBeanImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheGroupMetricsMXBeanImpl.java
index 59894e3..85689f7 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheGroupMetricsMXBeanImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheGroupMetricsMXBeanImpl.java
@@ -85,6 +85,13 @@ public class CacheGroupMetricsMXBeanImpl implements CacheGroupMetricsMXBean {
 
             delegate.updateTotalAllocatedPages(delta);
         }
+
+        /**
+         * Resets count of allocated pages to zero.
+         */
+        public void reset() {
+            totalAllocatedPages.reset();
+        }
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/137a0e7b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/DataRegionMetricsImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/DataRegionMetricsImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/DataRegionMetricsImpl.java
index 0a83c36..29cfc71 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/DataRegionMetricsImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/DataRegionMetricsImpl.java
@@ -480,4 +480,23 @@ public class DataRegionMetricsImpl implements DataRegionMetrics, AllocatedPageTr
         pageReplaceRate = new HitRateMetrics((int)rateTimeInterval, subInts);
         pageReplaceAge = new HitRateMetrics((int)rateTimeInterval, subInts);
     }
+
+    /**
+     * Clear metrics.
+     */
+    public void clear() {
+        totalAllocatedPages.reset();
+        grpAllocationTrackers.values().forEach(GroupAllocationTracker::reset);
+        largeEntriesPages.reset();
+        dirtyPages.reset();
+        readPages.reset();
+        writtenPages.reset();
+        replacedPages.reset();
+        offHeapSize.set(0);
+        checkpointBufferSize.set(0);
+        allocRate.clear();
+        evictRate.clear();
+        pageReplaceRate.clear();
+        pageReplaceAge.clear();
+    }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/137a0e7b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/FilePageStoreManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/FilePageStoreManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/FilePageStoreManager.java
index 3544485..e80107f 100755
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/FilePageStoreManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/FilePageStoreManager.java
@@ -61,7 +61,9 @@ import org.apache.ignite.internal.processors.cache.GridCacheContext;
 import org.apache.ignite.internal.processors.cache.GridCacheSharedManagerAdapter;
 import org.apache.ignite.internal.processors.cache.StoredCacheData;
 import org.apache.ignite.internal.processors.cache.persistence.AllocatedPageTracker;
+import org.apache.ignite.internal.processors.cache.persistence.DataRegion;
 import org.apache.ignite.internal.processors.cache.persistence.DataRegionMetricsImpl;
+import org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager;
 import org.apache.ignite.internal.processors.cache.persistence.StorageException;
 import org.apache.ignite.internal.processors.cache.persistence.filename.PdsFolderSettings;
 import org.apache.ignite.internal.processors.cache.persistence.metastorage.MetaStorage;
@@ -368,11 +370,13 @@ public class FilePageStoreManager extends GridCacheSharedManagerAdapter implemen
         int grpId = MetaStorage.METASTORAGE_CACHE_ID;
 
         if (!idxCacheStores.containsKey(grpId)) {
+            DataRegion dataRegion = cctx.database().dataRegion(GridCacheDatabaseSharedManager.METASTORE_DATA_REGION_NAME);
+
             CacheStoreHolder holder = initDir(
                 new File(storeWorkDir, META_STORAGE_NAME),
                     grpId,
                     1,
-                    AllocatedPageTracker.NO_OP,
+                    dataRegion.memoryMetrics(),
                     false);
 
             CacheStoreHolder old = idxCacheStores.put(grpId, holder);

http://git-wip-us.apache.org/repos/asf/ignite/blob/137a0e7b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/metastorage/MetaStorage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/metastorage/MetaStorage.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/metastorage/MetaStorage.java
index 91fbec0..a61bf64 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/metastorage/MetaStorage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/metastorage/MetaStorage.java
@@ -139,6 +139,8 @@ public class MetaStorage implements DbCheckpointListener, ReadOnlyMetastorage, R
 
     /** */
     public void init(IgniteCacheDatabaseSharedManager db) throws IgniteCheckedException {
+        regionMetrics.clear();
+
         getOrAllocateMetas();
 
         if (!empty) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/137a0e7b/modules/core/src/test/java/org/apache/ignite/internal/GridNodeMetricsLogPdsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridNodeMetricsLogPdsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridNodeMetricsLogPdsSelfTest.java
index a768a11..41c3588 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/GridNodeMetricsLogPdsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/GridNodeMetricsLogPdsSelfTest.java
@@ -32,9 +32,6 @@ import org.apache.ignite.internal.util.typedef.F;
  * Check logging local node metrics with PDS enabled.
  */
 public class GridNodeMetricsLogPdsSelfTest extends GridNodeMetricsLogSelfTest {
-    /** */
-    private static final String UNKNOWN_SIZE = "unknown";
-
     /** {@inheritDoc} */
     @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
         IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
@@ -85,7 +82,7 @@ public class GridNodeMetricsLogPdsSelfTest extends GridNodeMetricsLogSelfTest {
         Set<String> regions = new HashSet<>();
 
         Pattern ptrn = Pattern.compile("(?m).{2,}( {3}(?<name>.+) region|Ignite persistence) " +
-            "\\[used=(?<used>[-.\\d]+|" + UNKNOWN_SIZE + ")?.*]");
+            "\\[used=(?<used>[-.\\d]+)?.*]");
 
         Matcher matcher = ptrn.matcher(logOutput);
 
@@ -96,9 +93,7 @@ public class GridNodeMetricsLogPdsSelfTest extends GridNodeMetricsLogSelfTest {
 
             String usedSize = matcher.group("used");
 
-            // TODO https://issues.apache.org/jira/browse/IGNITE-9455
-            // TODO The actual value of the metric should be printed when this issue is solved.
-            int used = UNKNOWN_SIZE.equals(usedSize) ? 0 : Integer.parseInt(usedSize);
+            int used = Integer.parseInt(usedSize);
 
             assertTrue(used + " should be non negative: " + subj, used >= 0);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/137a0e7b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsDataRegionMetricsTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsDataRegionMetricsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsDataRegionMetricsTest.java
index 0154c14..0326c84 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsDataRegionMetricsTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsDataRegionMetricsTest.java
@@ -36,6 +36,7 @@ import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.internal.IgniteEx;
 import org.apache.ignite.internal.IgniteInternalFuture;
 import org.apache.ignite.internal.pagemem.PageIdAllocator;
+import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
 import org.apache.ignite.internal.processors.cache.persistence.DataRegionMetricsImpl;
 import org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager;
 import org.apache.ignite.internal.processors.cache.persistence.file.FilePageStore;
@@ -51,6 +52,10 @@ import org.junit.Assert;
 
 import static java.nio.file.Files.newDirectoryStream;
 import static org.apache.ignite.configuration.DataStorageConfiguration.DFLT_DATA_REG_DEFAULT_NAME;
+import static org.apache.ignite.internal.processors.cache.GridCacheUtils.UTILITY_CACHE_NAME;
+import static org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager.META_STORAGE_NAME;
+import static org.apache.ignite.internal.processors.cache.persistence.metastorage.MetaStorage.METASTORAGE_CACHE_ID;
+import static org.apache.ignite.internal.processors.cache.persistence.metastorage.MetaStorage.METASTORAGE_CACHE_NAME;
 
 /**
  *
@@ -150,7 +155,7 @@ public class IgnitePdsDataRegionMetricsTest extends GridCommonAbstractTest {
 
                 forceCheckpoint();
 
-                checkMetricsConsistency(node, DEFAULT_CACHE_NAME);
+                checkMetricsConsistency(node);
             }
 
             currMetrics = getDfltRegionMetrics(node);
@@ -183,8 +188,8 @@ public class IgnitePdsDataRegionMetricsTest extends GridCommonAbstractTest {
 
         forceCheckpoint();
 
-        checkMetricsConsistency(node0, DEFAULT_CACHE_NAME);
-        checkMetricsConsistency(node1, DEFAULT_CACHE_NAME);
+        checkMetricsConsistency(node0);
+        checkMetricsConsistency(node1);
 
         IgniteEx node2 = startGrid(2);
 
@@ -194,9 +199,9 @@ public class IgnitePdsDataRegionMetricsTest extends GridCommonAbstractTest {
 
         forceCheckpoint();
 
-        checkMetricsConsistency(node0, DEFAULT_CACHE_NAME);
-        checkMetricsConsistency(node1, DEFAULT_CACHE_NAME);
-        checkMetricsConsistency(node2, DEFAULT_CACHE_NAME);
+        checkMetricsConsistency(node0);
+        checkMetricsConsistency(node1);
+        checkMetricsConsistency(node2);
 
         stopGrid(1, true);
 
@@ -206,8 +211,8 @@ public class IgnitePdsDataRegionMetricsTest extends GridCommonAbstractTest {
 
         forceCheckpoint();
 
-        checkMetricsConsistency(node0, DEFAULT_CACHE_NAME);
-        checkMetricsConsistency(node2, DEFAULT_CACHE_NAME);
+        checkMetricsConsistency(node0);
+        checkMetricsConsistency(node2);
     }
 
     /**
@@ -293,14 +298,22 @@ public class IgnitePdsDataRegionMetricsTest extends GridCommonAbstractTest {
     }
 
     /** */
+    private void checkMetricsConsistency(final IgniteEx node) throws Exception {
+        checkMetricsConsistency(node, DEFAULT_CACHE_NAME);
+        checkMetricsConsistency(node, UTILITY_CACHE_NAME);
+        checkMetricsConsistency(node, METASTORAGE_CACHE_NAME);
+    }
+
+    /** */
     private void checkMetricsConsistency(final IgniteEx node, String cacheName) throws Exception {
         FilePageStoreManager pageStoreMgr = (FilePageStoreManager)node.context().cache().context().pageStore();
 
         assert pageStoreMgr != null : "Persistence is not enabled";
 
-        File cacheWorkDir = pageStoreMgr.cacheWorkDir(
-            node.getOrCreateCache(cacheName).getConfiguration(CacheConfiguration.class)
-        );
+        boolean metaStore = METASTORAGE_CACHE_NAME.equals(cacheName);
+
+        File cacheWorkDir = metaStore ? new File(pageStoreMgr.workDir(), META_STORAGE_NAME) :
+            pageStoreMgr.cacheWorkDir(node.cachex(cacheName).configuration());
 
         long totalPersistenceSize = 0;
 
@@ -310,7 +323,8 @@ public class IgnitePdsDataRegionMetricsTest extends GridCommonAbstractTest {
             for (Path path : files) {
                 File file = path.toFile();
 
-                FilePageStore store = (FilePageStore)pageStoreMgr.getStore(CU.cacheId(cacheName), partId(file));
+                FilePageStore store = (FilePageStore)pageStoreMgr.getStore(metaStore ?
+                    METASTORAGE_CACHE_ID : CU.cacheId(cacheName), partId(file));
 
                 int pageSize = store.getPageSize();
                 long storeSize = path.toFile().length() - store.headerSize();
@@ -322,12 +336,12 @@ public class IgnitePdsDataRegionMetricsTest extends GridCommonAbstractTest {
             }
         }
 
-        long totalAllocatedPagesFromMetrics = node.context().cache().context()
-            .cacheContext(CU.cacheId(DEFAULT_CACHE_NAME))
-            .group()
-            .dataRegion()
-            .memoryMetrics()
-            .getTotalAllocatedPages();
+        GridCacheSharedContext cctx = node.context().cache().context();
+
+        String regionName = metaStore ? GridCacheDatabaseSharedManager.METASTORE_DATA_REGION_NAME :
+            cctx.cacheContext(CU.cacheId(cacheName)).group().dataRegion().config().getName();
+
+        long totalAllocatedPagesFromMetrics = cctx.database().memoryMetrics(regionName).getTotalAllocatedPages();
 
         assertEquals("Number of allocated pages is different than in metrics for [node=" + node.name() + ", cache=" + cacheName + "]",
             totalPersistenceSize / pageStoreMgr.pageSize(), totalAllocatedPagesFromMetrics);


[31/37] ignite git commit: IgniteIGNITE-10611 Web Console: Refactor "ActivitiesService" to use uer object instead of id.

Posted by ak...@apache.org.
IgniteIGNITE-10611 Web Console: Refactor "ActivitiesService" to use uer object instead of id.


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

Branch: refs/heads/ignite-10189
Commit: b131da0d60e9bf1e66269d0c8e38eecc47971559
Parents: ea63af0
Author: Vasiliy Sisko <vs...@gridgain.com>
Authored: Mon Dec 10 10:34:26 2018 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Mon Dec 10 10:34:26 2018 +0700

----------------------------------------------------------------------
 modules/web-console/backend/routes/activities.js   | 4 ++--
 modules/web-console/backend/services/activities.js | 8 +++++---
 modules/web-console/frontend/app/data/i18n.js      | 6 +++---
 3 files changed, 10 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/b131da0d/modules/web-console/backend/routes/activities.js
----------------------------------------------------------------------
diff --git a/modules/web-console/backend/routes/activities.js b/modules/web-console/backend/routes/activities.js
index 4db6ac2..11fd81b 100644
--- a/modules/web-console/backend/routes/activities.js
+++ b/modules/web-console/backend/routes/activities.js
@@ -24,8 +24,8 @@ const express = require('express');
 module.exports = {
     implements: 'routes/activities',
     inject: ['services/activities'],
+
     /**
-     * @param express
      * @param {ActivitiesService} activitiesService
      * @returns {Promise}
      */
@@ -35,7 +35,7 @@ module.exports = {
 
             // Post user activities to page.
             router.post('/page', (req, res) => {
-                activitiesService.merge(req.user._id, req.body)
+                activitiesService.merge(req.user, req.body)
                     .then(res.api.ok)
                     .catch(res.api.error);
             });

http://git-wip-us.apache.org/repos/asf/ignite/blob/b131da0d/modules/web-console/backend/services/activities.js
----------------------------------------------------------------------
diff --git a/modules/web-console/backend/services/activities.js b/modules/web-console/backend/services/activities.js
index 9399eb0..bc0245d 100644
--- a/modules/web-console/backend/services/activities.js
+++ b/modules/web-console/backend/services/activities.js
@@ -35,13 +35,15 @@ module.exports.factory = (mongo) => {
         /**
          * Update page activities.
          *
-         * @param {String} owner - User ID
+         * @param {Object} user - User.
          * @param {String} action - Action string presentation.
          * @param {String} group - Action group string presentation.
          * @param {Date} [now] - Optional date to save in activity.
-         * @returns {Promise.<mongo.ObjectId>} that resolve activity
+         * @returns {Promise.<mongo.ObjectId>} that resolve activity.
          */
-        static merge(owner, {action, group}, now = new Date()) {
+        static merge(user, {action, group}, now = new Date()) {
+            const owner = user._id;
+
             mongo.Account.findById(owner)
                 .then((user) => {
                     user.lastActivity = new Date();

http://git-wip-us.apache.org/repos/asf/ignite/blob/b131da0d/modules/web-console/frontend/app/data/i18n.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/data/i18n.js b/modules/web-console/frontend/app/data/i18n.js
index a3c2480..20f9d25 100644
--- a/modules/web-console/frontend/app/data/i18n.js
+++ b/modules/web-console/frontend/app/data/i18n.js
@@ -46,10 +46,10 @@ export default {
     'base.configuration.edit.advanced.models.model': 'Advanced cluster model edit',
     'base.configuration.edit.advanced.igfs': 'Advanced cluster IGFSs',
     'base.configuration.edit.advanced.igfs.igfs': 'Advanced cluster IGFS edit',
-    'base.sql.tabs.notebooks-list': 'Query notebooks',
-    'base.sql.notebook': 'Query notebook',
-    'base.settings.profile': 'User profile',
     'base.settings.admin': 'Admin panel',
+    'base.settings.profile': 'User profile',
+    'base.sql.notebook': 'Query notebook',
+    'base.sql.tabs.notebooks-list': 'Query notebooks',
 
     // app/components/page-signin/template.pug
     'app.components.page-signin.m1': 'Sign In',


[20/37] ignite git commit: IGNITE-10453 Web Console: Added new property "Disk compression" to "Configuration" screen.

Posted by ak...@apache.org.
IGNITE-10453 Web Console: Added new property "Disk compression" to "Configuration" screen.


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

Branch: refs/heads/ignite-10189
Commit: f965bf5c79e7b17d70962dba5908c31c0b610260
Parents: 4884dec
Author: Vasiliy Sisko <vs...@gridgain.com>
Authored: Fri Dec 7 14:44:41 2018 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Fri Dec 7 14:44:41 2018 +0700

----------------------------------------------------------------------
 .../configuration/DiskPageCompression.java      | 17 ++++++++-
 .../visor/cache/VisorCacheConfiguration.java    | 38 ++++++++++++++++++++
 .../visor/node/VisorPersistenceMetrics.java     | 34 +++++++++++++++++-
 modules/web-console/backend/app/schemas.js      |  4 ++-
 .../cache-edit-form/templates/memory.pug        | 37 +++++++++++++++++++
 .../generator/ConfigurationGenerator.js         |  9 +++++
 .../configuration/generator/Maven.service.js    |  3 ++
 .../generator/defaults/Cache.service.js         |  5 ++-
 .../web-console/frontend/app/services/Caches.js |  8 +++++
 .../frontend/app/services/Version.service.js    |  6 +++-
 10 files changed, 156 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/f965bf5c/modules/core/src/main/java/org/apache/ignite/configuration/DiskPageCompression.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/DiskPageCompression.java b/modules/core/src/main/java/org/apache/ignite/configuration/DiskPageCompression.java
index d628c6a..2aacbe9 100644
--- a/modules/core/src/main/java/org/apache/ignite/configuration/DiskPageCompression.java
+++ b/modules/core/src/main/java/org/apache/ignite/configuration/DiskPageCompression.java
@@ -17,6 +17,8 @@
 
 package org.apache.ignite.configuration;
 
+import org.jetbrains.annotations.Nullable;
+
 /**
  * Disk page compression options.
  *
@@ -34,5 +36,18 @@ public enum DiskPageCompression {
     LZ4,
 
     /** Snappy compression. */
-    SNAPPY
+    SNAPPY;
+
+    /** Enumerated values. */
+    private static final DiskPageCompression[] VALS = values();
+
+    /**
+     * Efficiently gets enumerated value from its ordinal.
+     *
+     * @param ord Ordinal value.
+     * @return Enumerated value or {@code null} if ordinal out of range.
+     */
+    @Nullable public static DiskPageCompression fromOrdinal(int ord) {
+        return ord >= 0 && ord < VALS.length ? VALS[ord] : null;
+    }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/f965bf5c/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java
----------------------------------------------------------------------
diff --git 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
index 1e9faaa..3f22065 100644
--- 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
@@ -27,6 +27,7 @@ import org.apache.ignite.cache.CacheWriteSynchronizationMode;
 import org.apache.ignite.cache.PartitionLossPolicy;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.DataRegionConfiguration;
+import org.apache.ignite.configuration.DiskPageCompression;
 import org.apache.ignite.internal.IgniteEx;
 import org.apache.ignite.internal.util.typedef.internal.S;
 import org.apache.ignite.internal.util.typedef.internal.U;
@@ -167,6 +168,12 @@ public class VisorCacheConfiguration extends VisorDataTransferObject {
     /** Dynamic deployment ID. */
     private IgniteUuid dynamicDeploymentId;
 
+    /** Disk page compression algorithm. */
+    private DiskPageCompression diskPageCompression;
+
+    /** Algorithm specific disk page compression level. */
+    private Integer diskPageCompressionLevel;
+
     /**
      * Default constructor.
      */
@@ -227,6 +234,9 @@ public class VisorCacheConfiguration extends VisorDataTransferObject {
         readFromBackup = ccfg.isReadFromBackup();
         tmLookupClsName = ccfg.getTransactionManagerLookupClassName();
         topValidator = compactClass(ccfg.getTopologyValidator());
+
+        diskPageCompression = ccfg.getDiskPageCompression();
+        diskPageCompressionLevel = ccfg.getDiskPageCompressionLevel();
     }
 
     /**
@@ -519,6 +529,25 @@ public class VisorCacheConfiguration extends VisorDataTransferObject {
         return dynamicDeploymentId;
     }
 
+    /**
+     * @return Disk page compression algorithm.
+     */
+    public DiskPageCompression getDiskPageCompression() {
+        return diskPageCompression;
+    }
+
+    /**
+     * @return Algorithm specific disk page compression level.
+     */
+    public Integer getDiskPageCompressionLevel() {
+        return diskPageCompressionLevel;
+    }
+
+    /** {@inheritDoc} */
+    @Override public byte getProtocolVersion() {
+        return V2;
+    }
+
     /** {@inheritDoc} */
     @Override protected void writeExternalData(ObjectOutput out) throws IOException {
         U.writeString(out, name);
@@ -561,6 +590,10 @@ public class VisorCacheConfiguration extends VisorDataTransferObject {
         U.writeString(out, tmLookupClsName);
         U.writeString(out, topValidator);
         U.writeGridUuid(out, dynamicDeploymentId);
+
+        // V2
+        U.writeEnum(out, diskPageCompression);
+        out.writeObject(diskPageCompressionLevel);
     }
 
     /** {@inheritDoc} */
@@ -605,6 +638,11 @@ public class VisorCacheConfiguration extends VisorDataTransferObject {
         tmLookupClsName = U.readString(in);
         topValidator = U.readString(in);
         dynamicDeploymentId = U.readGridUuid(in);
+
+        if (protoVer > V1) {
+            diskPageCompression = DiskPageCompression.fromOrdinal(in.readByte());
+            diskPageCompressionLevel = (Integer) in.readObject();
+        }
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/f965bf5c/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorPersistenceMetrics.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorPersistenceMetrics.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorPersistenceMetrics.java
index ebc1c02..bcab318 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorPersistenceMetrics.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorPersistenceMetrics.java
@@ -108,6 +108,12 @@ public class VisorPersistenceMetrics extends VisorDataTransferObject {
     /** */
     private long totalSz;
 
+    /** */
+    private long storageSize;
+
+    /** */
+    private long sparseStorageSize;
+
     /**
      * Default constructor.
      */
@@ -151,6 +157,9 @@ public class VisorPersistenceMetrics extends VisorDataTransferObject {
         cpBufSz = m.getCheckpointBufferSize();
 
         totalSz = m.getTotalAllocatedSize();
+
+        storageSize = m.getStorageSize();
+        sparseStorageSize = m.getSparseStorageSize();
     }
 
     /**
@@ -335,9 +344,23 @@ public class VisorPersistenceMetrics extends VisorDataTransferObject {
         return totalSz;
     }
 
+    /**
+     * @return Storage space allocated in bytes.
+     */
+    public long getStorageSize() {
+        return storageSize;
+    }
+
+    /**
+     * @return Storage space allocated adjusted for possible sparsity in bytes.
+     */
+    public long getSparseStorageSize() {
+        return sparseStorageSize;
+    }
+
     /** {@inheritDoc} */
     @Override public byte getProtocolVersion() {
-        return V2;
+        return V3;
     }
 
     /** {@inheritDoc} */
@@ -370,6 +393,10 @@ public class VisorPersistenceMetrics extends VisorDataTransferObject {
         out.writeLong(usedCpBufSz);
         out.writeLong(cpBufSz);
         out.writeLong(totalSz);
+
+        // V3
+        out.writeLong(storageSize);
+        out.writeLong(sparseStorageSize);
     }
 
     /** {@inheritDoc} */
@@ -403,6 +430,11 @@ public class VisorPersistenceMetrics extends VisorDataTransferObject {
             cpBufSz = in.readLong();
             totalSz = in.readLong();
         }
+
+        if (protoVer > V2) {
+            storageSize = in.readLong();
+            sparseStorageSize = in.readLong();
+        }
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/f965bf5c/modules/web-console/backend/app/schemas.js
----------------------------------------------------------------------
diff --git a/modules/web-console/backend/app/schemas.js b/modules/web-console/backend/app/schemas.js
index 69d4a4c..14ce111 100644
--- a/modules/web-console/backend/app/schemas.js
+++ b/modules/web-console/backend/app/schemas.js
@@ -326,7 +326,9 @@ module.exports.factory = function(mongoose) {
         memoryPolicyName: String,
         dataRegionName: String,
         sqlIndexMaxInlineSize: Number,
-        topologyValidator: String
+        topologyValidator: String,
+        diskPageCompression: {type: String, enum: ['SKIP_GARBAGE', 'ZSTD', 'LZ4', 'SNAPPY']},
+        diskPageCompressionLevel: Number
     });
 
     Cache.index({name: 1, space: 1, clusters: 1}, {unique: true});

http://git-wip-us.apache.org/repos/asf/ignite/blob/f965bf5c/modules/web-console/frontend/app/components/page-configure-advanced/components/cache-edit-form/templates/memory.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/page-configure-advanced/components/cache-edit-form/templates/memory.pug b/modules/web-console/frontend/app/components/page-configure-advanced/components/cache-edit-form/templates/memory.pug
index 571e8ec..64c008e 100644
--- a/modules/web-console/frontend/app/components/page-configure-advanced/components/cache-edit-form/templates/memory.pug
+++ b/modules/web-console/frontend/app/components/page-configure-advanced/components/cache-edit-form/templates/memory.pug
@@ -63,6 +63,43 @@ panel-collapsible(ng-form=form on-open=`ui.loadPanel('${form}')`)
                     tip: 'Name of data region configuration for this cache'
                 })
 
+            //- Since ignite 2.8
+            .pc-form-grid-col-60(ng-if='$ctrl.available("2.8.0")')
+                +form-field__dropdown({
+                    label: 'Disk page compression:',
+                    model: `${model}.diskPageCompression`,
+                    name: '"diskPageCompression"',
+                    placeholder: 'IGNITE_DEFAULT_DISK_PAGE_COMPRESSION',
+                    options: '::$ctrl.Caches.diskPageCompression',
+                    tip: `Memory modes control whether value is stored in on-heap memory, off-heap memory, or swap space
+                        <ul>
+                            <li>SKIP_GARBAGE - retain only useful data from half-filled pages, but do not apply any compression</li>
+                            <li>ZSTD - Zstd compression<br/></li>
+                            <li>LZ4 - LZ4 compression<br/></li>
+                            <li>SNAPPY - Snappy compression<br/></li>
+                        </ul>`
+                })
+            .pc-form-grid-col-60(ng-if=`$ctrl.available("2.8.0") && ${model}.diskPageCompression === "ZSTD"`)
+                +form-field__number({
+                    label: 'Disk page compression level:',
+                    model: `${model}.diskPageCompressionLevel`,
+                    name: '"diskPageCompressionLevel"',
+                    placeholder: '3',
+                    min: -131072,
+                    max: 22,
+                    tip: 'Disk page compression level from -131072 to 22 or empty to use default 3.<br/>'
+                })
+            .pc-form-grid-col-60(ng-if=`$ctrl.available("2.8.0") && ${model}.diskPageCompression === "LZ4"`)
+                +form-field__number({
+                    label: 'Disk page compression level:',
+                    model: `${model}.diskPageCompressionLevel`,
+                    name: '"diskPageCompressionLevel"',
+                    placeholder: '0',
+                    min: 0,
+                    max: 17,
+                    tip: 'Disk page compression level from 0 to 17 or empty to use default 0.<br/>'
+                })
+
             //- Removed in ignite 2.0
             .pc-form-grid-col-60(ng-if-start='$ctrl.available(["1.0.0", "2.0.0"])')
                 +form-field__dropdown({

http://git-wip-us.apache.org/repos/asf/ignite/blob/f965bf5c/modules/web-console/frontend/app/modules/configuration/generator/ConfigurationGenerator.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/configuration/generator/ConfigurationGenerator.js b/modules/web-console/frontend/app/modules/configuration/generator/ConfigurationGenerator.js
index 6fba32a..b330f6e 100644
--- a/modules/web-console/frontend/app/modules/configuration/generator/ConfigurationGenerator.js
+++ b/modules/web-console/frontend/app/modules/configuration/generator/ConfigurationGenerator.js
@@ -2087,6 +2087,15 @@ export default class IgniteConfigurationGenerator {
         if (available('2.3.0'))
             ccfg.stringProperty('dataRegionName');
 
+        if (available('2.8.0')) {
+            ccfg.enumProperty('diskPageCompression');
+
+            const compression = ccfg.valueOf('diskPageCompression');
+
+            if (compression === 'ZSTD' || compression === 'LZ4')
+                ccfg.intProperty('diskPageCompressionLevel');
+        }
+
         // Removed in ignite 2.0
         if (available(['1.0.0', '2.0.0'])) {
             ccfg.enumProperty('memoryMode');

http://git-wip-us.apache.org/repos/asf/ignite/blob/f965bf5c/modules/web-console/frontend/app/modules/configuration/generator/Maven.service.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/configuration/generator/Maven.service.js b/modules/web-console/frontend/app/modules/configuration/generator/Maven.service.js
index a145f2e..449bc34 100644
--- a/modules/web-console/frontend/app/modules/configuration/generator/Maven.service.js
+++ b/modules/web-console/frontend/app/modules/configuration/generator/Maven.service.js
@@ -182,6 +182,9 @@ export default class IgniteMavenGenerator {
 
             if (_.get(cache, 'nodeFilter.kind') === 'Exclude')
                 this.addDependency(deps, 'org.apache.ignite', 'ignite-extdata-p2p', igniteVer);
+
+            if (cache.diskPageCompression)
+                this.addDependency(deps, 'org.apache.ignite', 'ignite-compress', igniteVer);
         });
 
         if (cluster.discovery.kind === 'Jdbc') {

http://git-wip-us.apache.org/repos/asf/ignite/blob/f965bf5c/modules/web-console/frontend/app/modules/configuration/generator/defaults/Cache.service.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/configuration/generator/defaults/Cache.service.js b/modules/web-console/frontend/app/modules/configuration/generator/defaults/Cache.service.js
index 3f87b8a..e3c69b6 100644
--- a/modules/web-console/frontend/app/modules/configuration/generator/defaults/Cache.service.js
+++ b/modules/web-console/frontend/app/modules/configuration/generator/defaults/Cache.service.js
@@ -120,7 +120,10 @@ const DFLT_CACHE = {
             clsName: 'java.sql.Types'
         }
     },
-    memoryPolicyName: 'default'
+    memoryPolicyName: 'default',
+    diskPageCompression: {
+        clsName: 'org.apache.ignite.configuration.DiskPageCompression'
+    }
 };
 
 export default class IgniteCacheDefaults {

http://git-wip-us.apache.org/repos/asf/ignite/blob/f965bf5c/modules/web-console/frontend/app/services/Caches.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/services/Caches.js b/modules/web-console/frontend/app/services/Caches.js
index 626395d..db99a4b 100644
--- a/modules/web-console/frontend/app/services/Caches.js
+++ b/modules/web-console/frontend/app/services/Caches.js
@@ -111,6 +111,14 @@ export default class Caches {
         {value: 'OFFHEAP_VALUES', label: 'OFFHEAP_VALUES'}
     ];
 
+    diskPageCompression = [
+        {value: 'SKIP_GARBAGE', label: 'SKIP_GARBAGE'},
+        {value: 'ZSTD', label: 'ZSTD'},
+        {value: 'LZ4', label: 'LZ4'},
+        {value: 'SNAPPY', label: 'SNAPPY'},
+        {value: null, label: 'Disabled'}
+    ];
+
     offHeapMode = {
         _val(cache) {
             return (cache.offHeapMode === null || cache.offHeapMode === void 0) ? -1 : cache.offHeapMode;

http://git-wip-us.apache.org/repos/asf/ignite/blob/f965bf5c/modules/web-console/frontend/app/services/Version.service.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/services/Version.service.js b/modules/web-console/frontend/app/services/Version.service.js
index bbd03cb..8bbf6ef 100644
--- a/modules/web-console/frontend/app/services/Version.service.js
+++ b/modules/web-console/frontend/app/services/Version.service.js
@@ -74,10 +74,14 @@ const compare = (a, b) => {
 
 export default class IgniteVersion {
     constructor() {
-        this.webConsole = '2.7.0';
+        this.webConsole = '2.8.0';
 
         this.supportedVersions = [
             {
+                label: 'Ignite 2.8',
+                ignite: '2.8.0'
+            },
+            {
                 label: 'Ignite 2.7',
                 ignite: '2.7.0'
             },


[07/37] ignite git commit: IGNITE-10509 reordered setting of timeout flag and transaction state - Fixes #5555.

Posted by ak...@apache.org.
IGNITE-10509 reordered setting of timeout flag and transaction state - Fixes #5555.

Signed-off-by: Dmitriy Govorukhin <dm...@gmail.com>


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

Branch: refs/heads/ignite-10189
Commit: 5fa79c6a134b9530e0055eddcb90b53ce3d768bc
Parents: bc895ac
Author: Anton Kalashnikov <ka...@yandex.ru>
Authored: Wed Dec 5 16:30:16 2018 +0300
Committer: Dmitriy Govorukhin <dm...@gmail.com>
Committed: Wed Dec 5 16:30:16 2018 +0300

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


http://git-wip-us.apache.org/repos/asf/ignite/blob/5fa79c6a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxAdapter.java
index c8b0459..47a0276 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxAdapter.java
@@ -1185,11 +1185,11 @@ public abstract class IgniteTxAdapter extends GridMetadataAwareAdapter implement
             }
 
             if (valid) {
-                this.state = state;
-
                 if (timedOut)
                     this.timedOut = true;
 
+                this.state = state;
+
                 if (log.isDebugEnabled())
                     log.debug("Changed transaction state [prev=" + prev + ", new=" + this.state + ", tx=" + this + ']');
 


[06/37] ignite git commit: IGNITE-10368: MVCC: Create "Cache 9" test suite for MVCC mode. This closes #5556.

Posted by ak...@apache.org.
IGNITE-10368: MVCC: Create "Cache 9" test suite for MVCC mode. This closes #5556.


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

Branch: refs/heads/ignite-10189
Commit: bc895ac62f8049ac52f007cf80b23d1296198ad9
Parents: 9edd786
Author: Andrey V. Mashenkov <an...@gmail.com>
Authored: Wed Dec 5 16:26:35 2018 +0300
Committer: Igor Seliverstov <gv...@gmail.com>
Committed: Wed Dec 5 16:26:35 2018 +0300

----------------------------------------------------------------------
 .../processors/cache/CachePutIfAbsentTest.java  |  4 +
 .../distributed/IgniteCachePrimarySyncTest.java | 53 +++++++----
 .../IgniteTxCachePrimarySyncTest.java           | 96 +++++++++++++++++---
 ...teSynchronizationModesMultithreadedTest.java | 78 +++++++++-------
 .../IgniteTxConcurrentRemoveObjectsTest.java    | 52 ++++++++---
 .../testsuites/IgniteCacheMvccTestSuite9.java   | 57 ++++++++++++
 .../testsuites/IgniteCacheTestSuite9.java       | 33 ++++---
 7 files changed, 283 insertions(+), 90 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/bc895ac6/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CachePutIfAbsentTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CachePutIfAbsentTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CachePutIfAbsentTest.java
index 00ba25f..a70d3c3 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CachePutIfAbsentTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CachePutIfAbsentTest.java
@@ -30,6 +30,7 @@ import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.apache.ignite.transactions.Transaction;
 import org.apache.ignite.transactions.TransactionConcurrency;
@@ -129,6 +130,9 @@ public class CachePutIfAbsentTest extends GridCommonAbstractTest {
 
                     for (TransactionConcurrency concurrency : TransactionConcurrency.values()) {
                         for (TransactionIsolation isolation : TransactionIsolation.values()) {
+                            if (MvccFeatureChecker.forcedMvcc() && !MvccFeatureChecker.isSupported(concurrency, isolation))
+                                continue;
+
                             try (Transaction tx = txs.txStart(concurrency, isolation)) {
                                 Object old = cache.getAndPutIfAbsent(key, 3);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/bc895ac6/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCachePrimarySyncTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCachePrimarySyncTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCachePrimarySyncTest.java
index e9e22ee..2482a8e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCachePrimarySyncTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCachePrimarySyncTest.java
@@ -27,6 +27,7 @@ import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.apache.ignite.transactions.Transaction;
 import org.apache.ignite.transactions.TransactionConcurrency;
@@ -35,6 +36,7 @@ import org.jetbrains.annotations.Nullable;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
+import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.PRIMARY_SYNC;
 import static org.apache.ignite.transactions.TransactionConcurrency.OPTIMISTIC;
 import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC;
@@ -53,6 +55,15 @@ public class IgniteCachePrimarySyncTest extends GridCommonAbstractTest {
     private static final int SRVS = 4;
 
     /** */
+    private static final String ATOMIC_CACHE = "atomicCache";
+
+    /** */
+    private static final String TX_CACHE = "txCache";
+
+    /** */
+    private static final String MVCC_CACHE = "mvccCache";
+
+    /** */
     private boolean clientMode;
 
     /** {@inheritDoc} */
@@ -61,19 +72,22 @@ public class IgniteCachePrimarySyncTest extends GridCommonAbstractTest {
 
         ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setIpFinder(ipFinder);
 
-        CacheConfiguration<Object, Object> ccfg1 = new CacheConfiguration<>(DEFAULT_CACHE_NAME);
-        ccfg1.setName("cache1");
-        ccfg1.setAtomicityMode(ATOMIC);
-        ccfg1.setBackups(2);
-        ccfg1.setWriteSynchronizationMode(PRIMARY_SYNC);
+        CacheConfiguration<Object, Object> ccfg1 = new CacheConfiguration<>(ATOMIC_CACHE)
+            .setAtomicityMode(ATOMIC)
+            .setBackups(2)
+            .setWriteSynchronizationMode(PRIMARY_SYNC);
+
+        CacheConfiguration<Object, Object> ccfg2 = new CacheConfiguration<>(TX_CACHE)
+            .setAtomicityMode(TRANSACTIONAL)
+            .setBackups(2)
+            .setWriteSynchronizationMode(PRIMARY_SYNC);
 
-        CacheConfiguration<Object, Object> ccfg2 = new CacheConfiguration<>(DEFAULT_CACHE_NAME);
-        ccfg2.setName("cache2");
-        ccfg2.setAtomicityMode(TRANSACTIONAL);
-        ccfg2.setBackups(2);
-        ccfg2.setWriteSynchronizationMode(PRIMARY_SYNC);
+        CacheConfiguration<Object, Object> ccfg3 = new CacheConfiguration<>(MVCC_CACHE)
+            .setAtomicityMode(TRANSACTIONAL_SNAPSHOT)
+            .setBackups(2)
+            .setWriteSynchronizationMode(PRIMARY_SYNC);
 
-        cfg.setCacheConfiguration(ccfg1, ccfg2);
+        cfg.setCacheConfiguration(ccfg1, ccfg2, ccfg3);
 
         cfg.setClientMode(clientMode);
 
@@ -97,17 +111,24 @@ public class IgniteCachePrimarySyncTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testPutGet() throws Exception {
+        if (MvccFeatureChecker.forcedMvcc())
+            fail("https://issues.apache.org/jira/browse/IGNITE-10520");
+
         Ignite ignite = ignite(SRVS);
 
-        checkPutGet(ignite.cache("cache1"), null, null, null);
+        checkPutGet(ignite.cache(ATOMIC_CACHE), null, null, null);
+
+        checkPutGet(ignite.cache(TX_CACHE), null, null, null);
+
+        checkPutGet(ignite.cache(MVCC_CACHE), null, null, null);
 
-        checkPutGet(ignite.cache("cache2"), null, null, null);
+        checkPutGet(ignite.cache(TX_CACHE), ignite.transactions(), OPTIMISTIC, REPEATABLE_READ);
 
-        checkPutGet(ignite.cache("cache2"), ignite.transactions(), OPTIMISTIC, REPEATABLE_READ);
+        checkPutGet(ignite.cache(TX_CACHE), ignite.transactions(), OPTIMISTIC, SERIALIZABLE);
 
-        checkPutGet(ignite.cache("cache2"), ignite.transactions(), OPTIMISTIC, SERIALIZABLE);
+        checkPutGet(ignite.cache(TX_CACHE), ignite.transactions(), PESSIMISTIC, READ_COMMITTED);
 
-        checkPutGet(ignite.cache("cache2"), ignite.transactions(), PESSIMISTIC, READ_COMMITTED);
+        checkPutGet(ignite.cache(MVCC_CACHE), ignite.transactions(), PESSIMISTIC, REPEATABLE_READ);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/bc895ac6/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxCachePrimarySyncTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxCachePrimarySyncTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxCachePrimarySyncTest.java
index bdf0b12..ceed9b8 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxCachePrimarySyncTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxCachePrimarySyncTest.java
@@ -58,6 +58,8 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
 import org.apache.ignite.testframework.GridTestUtils;
+import org.apache.ignite.testframework.MvccFeatureChecker;
+import org.apache.ignite.testframework.MvccFeatureChecker.Feature;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.apache.ignite.transactions.Transaction;
 import org.apache.ignite.transactions.TransactionConcurrency;
@@ -134,6 +136,9 @@ public class IgniteTxCachePrimarySyncTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testSingleKeyCommitFromPrimary() throws Exception {
+        if (MvccFeatureChecker.forcedMvcc())
+            fail("https://issues.apache.org/jira/browse/IGNITE-10518");
+
         singleKeyCommitFromPrimary(cacheConfiguration(DEFAULT_CACHE_NAME, PRIMARY_SYNC, 1, true, false));
 
         singleKeyCommitFromPrimary(cacheConfiguration(DEFAULT_CACHE_NAME, PRIMARY_SYNC, 2, false, false));
@@ -148,6 +153,16 @@ public class IgniteTxCachePrimarySyncTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     private void singleKeyCommitFromPrimary(CacheConfiguration<Object, Object> ccfg) throws Exception {
+        if (MvccFeatureChecker.forcedMvcc()) {
+            if (ccfg.getCacheStoreFactory() != null &&
+                !MvccFeatureChecker.isSupported(Feature.CACHE_STORE))
+                return;
+
+            if (ccfg.getNearConfiguration() != null &&
+                !MvccFeatureChecker.isSupported(Feature.NEAR_CACHE))
+                return;
+        }
+
         Ignite ignite = ignite(0);
 
         IgniteCache<Object, Object> cache = ignite.createCache(ccfg);
@@ -164,6 +179,9 @@ public class IgniteTxCachePrimarySyncTest extends GridCommonAbstractTest {
 
                 for (final TransactionConcurrency concurrency : TransactionConcurrency.values()) {
                     for (final TransactionIsolation isolation : TransactionIsolation.values()) {
+                        if (MvccFeatureChecker.forcedMvcc() && !MvccFeatureChecker.isSupported(concurrency, isolation))
+                            continue;
+
                         singleKeyCommitFromPrimary(node, ccfg, new IgniteBiInClosure<Integer, IgniteCache<Object, Object>>() {
                             @Override public void apply(Integer key, IgniteCache<Object, Object> cache) {
                                 Ignite ignite = cache.unwrap(Ignite.class);
@@ -266,12 +284,19 @@ public class IgniteTxCachePrimarySyncTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     private void singleKeyPrimaryNodeLeft(CacheConfiguration<Object, Object> ccfg) throws Exception {
+        if (MvccFeatureChecker.forcedMvcc()) {
+            if (ccfg.getCacheStoreFactory() != null &&
+                !MvccFeatureChecker.isSupported(Feature.CACHE_STORE))
+                return;
+        }
+
         Ignite ignite = ignite(0);
 
         IgniteCache<Object, Object> cache = ignite.createCache(ccfg);
 
         try {
-            ignite(NODES - 1).createNearCache(ccfg.getName(), new NearCacheConfiguration<>());
+            if (!MvccFeatureChecker.forcedMvcc() || MvccFeatureChecker.isSupported(Feature.NEAR_CACHE))
+                ignite(NODES - 1).createNearCache(ccfg.getName(), new NearCacheConfiguration<>());
 
             for (int i = 0; i < NODES; i++) {
                 Ignite node = ignite(i);
@@ -284,6 +309,9 @@ public class IgniteTxCachePrimarySyncTest extends GridCommonAbstractTest {
 
                 for (final TransactionConcurrency concurrency : TransactionConcurrency.values()) {
                     for (final TransactionIsolation isolation : TransactionIsolation.values()) {
+                        if (MvccFeatureChecker.forcedMvcc() && !MvccFeatureChecker.isSupported(concurrency, isolation))
+                            continue;
+
                         singleKeyPrimaryNodeLeft(node, ccfg, new IgniteBiInClosure<Integer, IgniteCache<Object, Object>>() {
                             @Override public void apply(Integer key, IgniteCache<Object, Object> cache) {
                                 Ignite ignite = cache.unwrap(Ignite.class);
@@ -372,6 +400,9 @@ public class IgniteTxCachePrimarySyncTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testSingleKeyCommit() throws Exception {
+        if (MvccFeatureChecker.forcedMvcc())
+            fail("https://issues.apache.org/jira/browse/IGNITE-10518");
+
         singleKeyCommit(cacheConfiguration(DEFAULT_CACHE_NAME, PRIMARY_SYNC, 1, true, false));
 
         singleKeyCommit(cacheConfiguration(DEFAULT_CACHE_NAME, PRIMARY_SYNC, 2, false, false));
@@ -386,12 +417,23 @@ public class IgniteTxCachePrimarySyncTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     private void singleKeyCommit(CacheConfiguration<Object, Object> ccfg) throws Exception {
+        if (MvccFeatureChecker.forcedMvcc()) {
+            if (ccfg.getCacheStoreFactory() != null &&
+                !MvccFeatureChecker.isSupported(Feature.CACHE_STORE))
+                return;
+
+            if (ccfg.getNearConfiguration() != null &&
+                !MvccFeatureChecker.isSupported(Feature.NEAR_CACHE))
+                return;
+        }
+
         Ignite ignite = ignite(0);
 
         IgniteCache<Object, Object> cache = ignite.createCache(ccfg);
 
         try {
-            ignite(NODES - 1).createNearCache(ccfg.getName(), new NearCacheConfiguration<>());
+            if (!MvccFeatureChecker.forcedMvcc() || MvccFeatureChecker.isSupported(Feature.NEAR_CACHE))
+                ignite(NODES - 1).createNearCache(ccfg.getName(), new NearCacheConfiguration<>());
 
             for (int i = 1; i < NODES; i++) {
                 Ignite node = ignite(i);
@@ -406,6 +448,9 @@ public class IgniteTxCachePrimarySyncTest extends GridCommonAbstractTest {
 
                 for (final TransactionConcurrency concurrency : TransactionConcurrency.values()) {
                     for (final TransactionIsolation isolation : TransactionIsolation.values()) {
+                        if (MvccFeatureChecker.forcedMvcc() && !MvccFeatureChecker.isSupported(concurrency, isolation))
+                            continue;
+
                         singleKeyCommit(node, ccfg, new IgniteBiInClosure<Integer, IgniteCache<Object, Object>>() {
                             @Override public void apply(Integer key, IgniteCache<Object, Object> cache) {
                                 Ignite ignite = cache.unwrap(Ignite.class);
@@ -528,12 +573,23 @@ public class IgniteTxCachePrimarySyncTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     private void checkWaitPrimaryResponse(CacheConfiguration<Object, Object> ccfg) throws Exception {
+        if (MvccFeatureChecker.forcedMvcc()) {
+            if (ccfg.getCacheStoreFactory() != null &&
+                !MvccFeatureChecker.isSupported(Feature.CACHE_STORE))
+                return;
+
+            if (ccfg.getNearConfiguration() != null &&
+                !MvccFeatureChecker.isSupported(Feature.NEAR_CACHE))
+                return;
+        }
+
         Ignite ignite = ignite(0);
 
         IgniteCache<Object, Object> cache = ignite.createCache(ccfg);
 
         try {
-            ignite(NODES - 1).createNearCache(ccfg.getName(), new NearCacheConfiguration<>());
+            if (!MvccFeatureChecker.forcedMvcc() || MvccFeatureChecker.isSupported(Feature.NEAR_CACHE))
+                ignite(NODES - 1).createNearCache(ccfg.getName(), new NearCacheConfiguration<>());
 
             for (int i = 1; i < NODES; i++) {
                 Ignite node = ignite(i);
@@ -561,6 +617,9 @@ public class IgniteTxCachePrimarySyncTest extends GridCommonAbstractTest {
 
                 for (final TransactionConcurrency concurrency : TransactionConcurrency.values()) {
                     for (final TransactionIsolation isolation : TransactionIsolation.values()) {
+                        if (MvccFeatureChecker.forcedMvcc() && !MvccFeatureChecker.isSupported(concurrency, isolation))
+                            continue;
+
                         checkWaitPrimaryResponse(node, ccfg, new IgniteBiInClosure<Integer, IgniteCache<Object, Object>>() {
                             @Override public void apply(Integer key, IgniteCache<Object, Object> cache) {
                                 Ignite ignite = cache.unwrap(Ignite.class);
@@ -652,6 +711,9 @@ public class IgniteTxCachePrimarySyncTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testOnePhaseMessages() throws Exception {
+        if (MvccFeatureChecker.forcedMvcc())
+            return; // Not supported. Commit flow differs for Mvcc mode.
+
         checkOnePhaseMessages(cacheConfiguration(DEFAULT_CACHE_NAME, PRIMARY_SYNC, 1, false, false));
     }
 
@@ -678,6 +740,9 @@ public class IgniteTxCachePrimarySyncTest extends GridCommonAbstractTest {
 
                 for (final TransactionConcurrency concurrency : TransactionConcurrency.values()) {
                     for (final TransactionIsolation isolation : TransactionIsolation.values()) {
+                        if (MvccFeatureChecker.forcedMvcc() && !MvccFeatureChecker.isSupported(concurrency, isolation))
+                            continue;
+
                         checkOnePhaseMessages(node, ccfg, new IgniteBiInClosure<Integer, IgniteCache<Object, Object>>() {
                             @Override public void apply(Integer key, IgniteCache<Object, Object> cache) {
                                 Ignite ignite = cache.unwrap(Ignite.class);
@@ -760,12 +825,13 @@ public class IgniteTxCachePrimarySyncTest extends GridCommonAbstractTest {
         List<IgniteCache<Object, Object>> caches = new ArrayList<>();
 
         try {
-            caches.add(createCache(ignite, cacheConfiguration("fullSync1", FULL_SYNC, 1, false, false), true));
-            caches.add(createCache(ignite, cacheConfiguration("fullSync2", FULL_SYNC, 1, false, false), true));
-            caches.add(createCache(ignite, cacheConfiguration("fullAsync1", FULL_ASYNC, 1, false, false), true));
-            caches.add(createCache(ignite, cacheConfiguration("fullAsync2", FULL_ASYNC, 1, false, false), true));
-            caches.add(createCache(ignite, cacheConfiguration("primarySync1", PRIMARY_SYNC, 1, false, false), true));
-            caches.add(createCache(ignite, cacheConfiguration("primarySync2", PRIMARY_SYNC, 1, false, false), true));
+
+            caches.add(createCache(ignite, cacheConfiguration("fullSync1", FULL_SYNC, 1, false, false)));
+            caches.add(createCache(ignite, cacheConfiguration("fullSync2", FULL_SYNC, 1, false, false)));
+            caches.add(createCache(ignite, cacheConfiguration("fullAsync1", FULL_ASYNC, 1, false, false)));
+            caches.add(createCache(ignite, cacheConfiguration("fullAsync2", FULL_ASYNC, 1, false, false)));
+            caches.add(createCache(ignite, cacheConfiguration("primarySync1", PRIMARY_SYNC, 1, false, false)));
+            caches.add(createCache(ignite, cacheConfiguration("primarySync2", PRIMARY_SYNC, 1, false, false)));
 
             for (int i = 0; i < NODES; i++) {
                 checkTxSyncMode(ignite(i), true);
@@ -805,7 +871,8 @@ public class IgniteTxCachePrimarySyncTest extends GridCommonAbstractTest {
      * @param key Cache key.
      * @throws Exception If failed.
      */
-    private void waitKeyUpdated(Ignite ignite, int expNodes, final String cacheName, final Object key) throws Exception {
+    private void waitKeyUpdated(Ignite ignite, int expNodes, final String cacheName,
+        final Object key) throws Exception {
         Affinity<Object> aff = ignite.affinity(cacheName);
 
         final Collection<ClusterNode> nodes = aff.mapKeyToPrimaryAndBackups(key);
@@ -834,14 +901,12 @@ public class IgniteTxCachePrimarySyncTest extends GridCommonAbstractTest {
     /**
      * @param ignite Node.
      * @param ccfg Cache configuration.
-     * @param nearCache If {@code true} creates near cache on one of client nodes.
      * @return Created cache.
      */
-    private <K, V> IgniteCache<K, V> createCache(Ignite ignite, CacheConfiguration<K, V> ccfg,
-        boolean nearCache) {
+    private <K, V> IgniteCache<K, V> createCache(Ignite ignite, CacheConfiguration<K, V> ccfg) {
         IgniteCache<K, V> cache = ignite.createCache(ccfg);
 
-        if (nearCache)
+        if (!MvccFeatureChecker.forcedMvcc() || MvccFeatureChecker.isSupported(Feature.NEAR_CACHE))
             ignite(NODES - 1).createNearCache(ccfg.getName(), new NearCacheConfiguration<>());
 
         return cache;
@@ -866,6 +931,9 @@ public class IgniteTxCachePrimarySyncTest extends GridCommonAbstractTest {
 
             for (TransactionConcurrency concurrency : TransactionConcurrency.values()) {
                 for (TransactionIsolation isolation : TransactionIsolation.values()) {
+                    if (MvccFeatureChecker.forcedMvcc() && !MvccFeatureChecker.isSupported(concurrency, isolation))
+                        continue;
+
                     try (Transaction tx = txs.txStart(concurrency, isolation)) {
                         fullSync1.put(key++, 1);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/bc895ac6/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxCacheWriteSynchronizationModesMultithreadedTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxCacheWriteSynchronizationModesMultithreadedTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxCacheWriteSynchronizationModesMultithreadedTest.java
index bd552c2..86d20db 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxCacheWriteSynchronizationModesMultithreadedTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxCacheWriteSynchronizationModesMultithreadedTest.java
@@ -32,7 +32,6 @@ import javax.cache.integration.CacheWriterException;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.IgniteException;
-import org.apache.ignite.IgniteSystemProperties;
 import org.apache.ignite.cache.CacheWriteSynchronizationMode;
 import org.apache.ignite.cache.store.CacheStore;
 import org.apache.ignite.cache.store.CacheStoreAdapter;
@@ -51,6 +50,7 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
 import org.apache.ignite.testframework.GridTestUtils;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.apache.ignite.transactions.Transaction;
 import org.apache.ignite.transactions.TransactionOptimisticException;
@@ -107,24 +107,26 @@ public class IgniteTxCacheWriteSynchronizationModesMultithreadedTest extends Gri
 
     /** {@inheritDoc} */
     @Override protected void beforeTestsStarted() throws Exception {
-        super.beforeTestsStarted();
+        if (MvccFeatureChecker.forcedMvcc())
+            fail("https://issues.apache.org/jira/browse/IGNITE-9470");
 
-        System.setProperty(IgniteSystemProperties.IGNITE_ENABLE_FORCIBLE_NODE_KILL,"true");
+        super.beforeTestsStarted();
 
-        startGrids(SRVS);
+        startGridsMultiThreaded(SRVS);
 
         clientMode = true;
 
-        for (int i = 0; i < CLIENTS; i++) {
-            Ignite client = startGrid(SRVS + i);
+        startGridsMultiThreaded(SRVS, CLIENTS);
 
-            assertTrue(client.configuration().isClientMode());
-        }
+        for (int i = 0; i < CLIENTS; i++)
+            assertTrue(grid(SRVS + i).configuration().isClientMode());
     }
 
     /** {@inheritDoc} */
     @Override protected void afterTestsStopped() throws Exception {
-        System.clearProperty(IgniteSystemProperties.IGNITE_ENABLE_FORCIBLE_NODE_KILL);
+        stopAllGrids();
+
+        super.afterTestsStopped();
     }
 
     /** {@inheritDoc} */
@@ -202,6 +204,14 @@ public class IgniteTxCacheWriteSynchronizationModesMultithreadedTest extends Gri
         boolean store,
         boolean nearCache,
         boolean restart) throws Exception {
+        if (MvccFeatureChecker.forcedMvcc()) {
+            if (store && !MvccFeatureChecker.isSupported(MvccFeatureChecker.Feature.CACHE_STORE))
+                return;
+
+            if (nearCache && !MvccFeatureChecker.isSupported(MvccFeatureChecker.Feature.NEAR_CACHE))
+                return;
+        }
+
         final Ignite ignite = ignite(0);
 
         createCache(ignite, cacheConfiguration(DEFAULT_CACHE_NAME, syncMode, backups, store), nearCache);
@@ -278,36 +288,38 @@ public class IgniteTxCacheWriteSynchronizationModesMultithreadedTest extends Gri
                 }
             });
 
-            commitMultithreaded(new IgniteBiInClosure<Ignite, IgniteCache<Integer, Integer>>() {
-                @Override public void apply(Ignite ignite, IgniteCache<Integer, Integer> cache) {
-                    ThreadLocalRandom rnd = ThreadLocalRandom.current();
-
-                    Map<Integer, Integer> map = new LinkedHashMap<>();
-
-                    for (int i = 0; i < 10; i++) {
-                        Integer key = rnd.nextInt(MULTITHREADED_TEST_KEYS);
-
-                        map.put(key, rnd.nextInt());
-                    }
+            if (!MvccFeatureChecker.forcedMvcc()) {
+                commitMultithreaded(new IgniteBiInClosure<Ignite, IgniteCache<Integer, Integer>>() {
+                    @Override public void apply(Ignite ignite, IgniteCache<Integer, Integer> cache) {
+                        ThreadLocalRandom rnd = ThreadLocalRandom.current();
 
-                    while (true) {
-                        try (Transaction tx = ignite.transactions().txStart(OPTIMISTIC, SERIALIZABLE)) {
-                            for (Map.Entry<Integer, Integer> e : map.entrySet())
-                                cache.put(e.getKey(), e.getValue());
+                        Map<Integer, Integer> map = new LinkedHashMap<>();
 
-                            tx.commit();
+                        for (int i = 0; i < 10; i++) {
+                            Integer key = rnd.nextInt(MULTITHREADED_TEST_KEYS);
 
-                            break;
-                        }
-                        catch (TransactionOptimisticException ignored) {
-                           // Retry.
+                            map.put(key, rnd.nextInt());
                         }
-                        catch (CacheException | IgniteException ignored) {
-                            break;
+
+                        while (true) {
+                            try (Transaction tx = ignite.transactions().txStart(OPTIMISTIC, SERIALIZABLE)) {
+                                for (Map.Entry<Integer, Integer> e : map.entrySet())
+                                    cache.put(e.getKey(), e.getValue());
+
+                                tx.commit();
+
+                                break;
+                            }
+                            catch (TransactionOptimisticException ignored) {
+                                // Retry.
+                            }
+                            catch (CacheException | IgniteException ignored) {
+                                break;
+                            }
                         }
                     }
-                }
-            });
+                });
+            }
         }
         finally {
             stop.set(true);

http://git-wip-us.apache.org/repos/asf/ignite/blob/bc895ac6/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxConcurrentRemoveObjectsTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxConcurrentRemoveObjectsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxConcurrentRemoveObjectsTest.java
index a5b2cb7..cd5cbe6 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxConcurrentRemoveObjectsTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxConcurrentRemoveObjectsTest.java
@@ -36,9 +36,11 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
 import org.apache.ignite.testframework.GridTestUtils;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.apache.ignite.transactions.Transaction;
+import org.apache.ignite.transactions.TransactionConcurrency;
+import org.apache.ignite.transactions.TransactionIsolation;
 
 import static org.apache.ignite.IgniteSystemProperties.IGNITE_CACHE_REMOVED_ENTRIES_TTL;
-import static org.apache.ignite.transactions.TransactionConcurrency.OPTIMISTIC;
+import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_READ;
 import static org.apache.ignite.transactions.TransactionIsolation.SERIALIZABLE;
 
 /**
@@ -67,25 +69,22 @@ public class IgniteTxConcurrentRemoveObjectsTest extends GridCommonAbstractTest
         oldIgniteCacheRmvEntriesTtl = Long.getLong(IGNITE_CACHE_REMOVED_ENTRIES_TTL, 10_000);
 
         System.setProperty(IGNITE_CACHE_REMOVED_ENTRIES_TTL, Long.toString(newIgniteCacheRemovedEntriesTtl));
+
+        startGrid(0);
     }
 
     /** {@inheritDoc} */
     @Override protected void afterTestsStopped() throws Exception {
+        stopAllGrids();
+
         System.setProperty(IGNITE_CACHE_REMOVED_ENTRIES_TTL, Long.toString(oldIgniteCacheRmvEntriesTtl));
 
         super.afterTestsStopped();
     }
 
     /** {@inheritDoc} */
-    @Override protected void beforeTest() throws Exception {
-        super.beforeTest();
-
-        stopAllGrids();
-    }
-
-    /** {@inheritDoc} */
     @Override protected void afterTest() throws Exception {
-        stopAllGrids();
+        grid(0).destroyCache(DEFAULT_CACHE_NAME);
 
         super.afterTest();
     }
@@ -102,7 +101,7 @@ public class IgniteTxConcurrentRemoveObjectsTest extends GridCommonAbstractTest
     /**
      * @return Cache configuration.
      */
-    private CacheConfiguration<Integer, String> getCacheCfg() {
+    private CacheConfiguration<Integer, String> cacheConfiguration() {
         CacheConfiguration<Integer, String> ccfg = new CacheConfiguration<>();
 
         ccfg.setName(DEFAULT_CACHE_NAME);
@@ -115,16 +114,39 @@ public class IgniteTxConcurrentRemoveObjectsTest extends GridCommonAbstractTest
     }
 
     /**
+     * @throws Exception If failed.
+     */
+    public void testOptimisticTxLeavesObjectsInLocalPartition() throws Exception {
+        checkTxLeavesObjectsInLocalPartition(cacheConfiguration(), TransactionConcurrency.OPTIMISTIC, SERIALIZABLE);
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testPessimisticTxLeavesObjectsInLocalPartition() throws Exception {
+        checkTxLeavesObjectsInLocalPartition(cacheConfiguration(), TransactionConcurrency.PESSIMISTIC, SERIALIZABLE);
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testMvccTxLeavesObjectsInLocalPartition() throws Exception {
+        checkTxLeavesObjectsInLocalPartition(cacheConfiguration().setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT),
+            TransactionConcurrency.PESSIMISTIC, REPEATABLE_READ);
+    }
+
+    /**
      * Too many deletes in single transaction may overflow {@link GridDhtLocalPartition#rmvQueue} and entries will be
      * deleted synchronously in {@link GridDhtLocalPartition#onDeferredDelete(int, KeyCacheObject, GridCacheVersion)}.
      * This should not corrupt internal map state in {@link GridDhtLocalPartition}.
      *
      * @throws Exception If failed.
      */
-    public void testTxLeavesObjectsInLocalPartition() throws Exception {
-        IgniteEx igniteEx = startGrid(getConfiguration());
+    public void checkTxLeavesObjectsInLocalPartition(CacheConfiguration<Integer, String> ccfg,
+        TransactionConcurrency optimistic, TransactionIsolation isolation) throws Exception {
+        IgniteEx igniteEx = grid(0);
 
-        igniteEx.getOrCreateCache(getCacheCfg());
+        igniteEx.getOrCreateCache(ccfg);
 
         try (IgniteDataStreamer<Integer, String> dataStreamer = igniteEx.dataStreamer(DEFAULT_CACHE_NAME)) {
             for (int i = 0; i < CACHE_ENTRIES_COUNT; i++)
@@ -141,8 +163,8 @@ public class IgniteTxConcurrentRemoveObjectsTest extends GridCommonAbstractTest
 
         assertEquals(CACHE_ENTRIES_COUNT, client.getOrCreateCache(DEFAULT_CACHE_NAME).size());
 
-        try (Transaction tx = client.transactions().txStart(OPTIMISTIC, SERIALIZABLE)) {
-            IgniteCache<Integer, String> cache = client.getOrCreateCache(getCacheCfg());
+        try (Transaction tx = client.transactions().txStart(optimistic, isolation)) {
+            IgniteCache<Integer, String> cache = client.getOrCreateCache(cacheConfiguration());
 
             for (int v = 0; v < CACHE_ENTRIES_COUNT; v++) {
                 cache.get(v);

http://git-wip-us.apache.org/repos/asf/ignite/blob/bc895ac6/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite9.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite9.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite9.java
new file mode 100644
index 0000000..17a9421
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite9.java
@@ -0,0 +1,57 @@
+/*
+ * 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.testsuites;
+
+import java.util.Collection;
+import java.util.HashSet;
+import junit.framework.TestSuite;
+import org.apache.ignite.IgniteSystemProperties;
+import org.apache.ignite.internal.processors.cache.IgniteCacheGetCustomCollectionsSelfTest;
+import org.apache.ignite.internal.processors.cache.IgniteCacheLoadRebalanceEvictionSelfTest;
+import org.apache.ignite.internal.processors.cache.distributed.CacheAtomicPrimarySyncBackPressureTest;
+import org.apache.ignite.internal.processors.cache.distributed.IgniteTxConcurrentRemoveObjectsTest;
+
+/**
+ * Test suite.
+ */
+public class IgniteCacheMvccTestSuite9 extends TestSuite {
+    /**
+     * @return IgniteCache test suite.
+     */
+    public static TestSuite suite() {
+        System.setProperty(IgniteSystemProperties.IGNITE_FORCE_MVCC_MODE_IN_TESTS, "true");
+
+        Collection<Class> ignoredTests = new HashSet<>();
+
+        // Skip classes that already contains Mvcc tests
+        ignoredTests.add(IgniteTxConcurrentRemoveObjectsTest.class);
+
+        // Atomic caches.
+        ignoredTests.add(CacheAtomicPrimarySyncBackPressureTest.class);
+
+        // Other non-tx tests.
+        ignoredTests.add(IgniteCacheGetCustomCollectionsSelfTest.class);
+        ignoredTests.add(IgniteCacheLoadRebalanceEvictionSelfTest.class);
+
+        TestSuite suite = new TestSuite("IgniteCache Mvcc Test Suite part 9");
+
+        suite.addTest(IgniteCacheTestSuite9.suite(ignoredTests));
+
+        return suite;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/bc895ac6/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite9.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite9.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite9.java
index 157673e..23d71c1 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite9.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite9.java
@@ -17,6 +17,7 @@
 
 package org.apache.ignite.testsuites;
 
+import java.util.Collection;
 import junit.framework.TestSuite;
 import org.apache.ignite.internal.processors.cache.CachePutIfAbsentTest;
 import org.apache.ignite.internal.processors.cache.IgniteCacheGetCustomCollectionsSelfTest;
@@ -28,6 +29,7 @@ import org.apache.ignite.internal.processors.cache.distributed.IgniteTxCachePrim
 import org.apache.ignite.internal.processors.cache.distributed.IgniteTxCacheWriteSynchronizationModesMultithreadedTest;
 import org.apache.ignite.internal.processors.cache.distributed.IgniteTxConcurrentRemoveObjectsTest;
 import org.apache.ignite.internal.processors.cache.transactions.TxDataConsistencyOnCommitFailureTest;
+import org.apache.ignite.testframework.GridTestUtils;
 
 /**
  * Test suite.
@@ -35,25 +37,32 @@ import org.apache.ignite.internal.processors.cache.transactions.TxDataConsistenc
 public class IgniteCacheTestSuite9 extends TestSuite {
     /**
      * @return IgniteCache test suite.
-     * @throws Exception Thrown in case of the failure.
      */
-    public static TestSuite suite() throws Exception {
+    public static TestSuite suite() {
+        return suite(null);
+    }
+
+    /**
+     * @param ignoredTests Ignored tests.
+     * @return IgniteCache test suite.
+     */
+    public static TestSuite suite(Collection<Class> ignoredTests) {
         TestSuite suite = new TestSuite("IgniteCache Test Suite part 9");
 
-        suite.addTestSuite(IgniteCacheGetCustomCollectionsSelfTest.class);
-        suite.addTestSuite(IgniteCacheLoadRebalanceEvictionSelfTest.class);
-        suite.addTestSuite(IgniteCachePrimarySyncTest.class);
-        suite.addTestSuite(IgniteTxCachePrimarySyncTest.class);
-        suite.addTestSuite(IgniteTxCacheWriteSynchronizationModesMultithreadedTest.class);
-        suite.addTestSuite(CachePutIfAbsentTest.class);
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheGetCustomCollectionsSelfTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteCacheLoadRebalanceEvictionSelfTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteCachePrimarySyncTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteTxCachePrimarySyncTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, IgniteTxCacheWriteSynchronizationModesMultithreadedTest.class, ignoredTests);
+        GridTestUtils.addTestIfNeeded(suite, CachePutIfAbsentTest.class, ignoredTests);
 
-        suite.addTestSuite(CacheAtomicPrimarySyncBackPressureTest.class);
+        GridTestUtils.addTestIfNeeded(suite, CacheAtomicPrimarySyncBackPressureTest.class, ignoredTests);
 
-        suite.addTestSuite(IgniteTxConcurrentRemoveObjectsTest.class);
+        GridTestUtils.addTestIfNeeded(suite, IgniteTxConcurrentRemoveObjectsTest.class, ignoredTests);
 
-        suite.addTestSuite(TxDataConsistencyOnCommitFailureTest.class);
+        GridTestUtils.addTestIfNeeded(suite, TxDataConsistencyOnCommitFailureTest.class, ignoredTests);
 
-        suite.addTestSuite(CacheOperationsInterruptTest.class);
+        GridTestUtils.addTestIfNeeded(suite, CacheOperationsInterruptTest.class, ignoredTests);
 
         return suite;
     }


[13/37] ignite git commit: IGNITE-10356: JDBC: fixed metadata returned for Date and Decimal types. This closes #5454.

Posted by ak...@apache.org.
IGNITE-10356: JDBC: fixed metadata returned for Date and Decimal types. This closes #5454.


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

Branch: refs/heads/ignite-10189
Commit: d045b842931f0adc2bd409936c1ba0251bf1ea88
Parents: 24a50e1
Author: Ray <ra...@cisco.com>
Authored: Thu Dec 6 12:08:22 2018 +0300
Committer: devozerov <vo...@gridgain.com>
Committed: Thu Dec 6 12:08:22 2018 +0300

----------------------------------------------------------------------
 .../internal/jdbc2/JdbcMetadataSelfTest.java    | 72 +++++++++++++++++++-
 .../ignite/jdbc/JdbcMetadataSelfTest.java       | 69 ++++++++++++++++++-
 .../jdbc/thin/JdbcThinMetadataSelfTest.java     | 50 ++++++++++++--
 .../apache/ignite/internal/jdbc/JdbcUtils.java  | 11 ++-
 .../internal/jdbc/thin/JdbcThinUtils.java       | 11 ++-
 .../apache/ignite/internal/jdbc2/JdbcUtils.java |  7 +-
 6 files changed, 207 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/d045b842/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcMetadataSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcMetadataSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcMetadataSelfTest.java
index 4c127b6..b18e4d5 100755
--- a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcMetadataSelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcMetadataSelfTest.java
@@ -18,6 +18,7 @@
 package org.apache.ignite.internal.jdbc2;
 
 import java.io.Serializable;
+import java.math.BigDecimal;
 import java.sql.Connection;
 import java.sql.DatabaseMetaData;
 import java.sql.DriverManager;
@@ -28,6 +29,7 @@ import java.sql.ResultSetMetaData;
 import java.sql.SQLException;
 import java.sql.Statement;
 import java.sql.Types;
+import java.sql.Date;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
@@ -53,6 +55,8 @@ import org.jetbrains.annotations.NotNull;
 
 import static java.sql.Types.INTEGER;
 import static java.sql.Types.VARCHAR;
+import static java.sql.Types.DECIMAL;
+import static java.sql.Types.DATE;
 import static org.apache.ignite.IgniteJdbcDriver.CFG_URL_PREFIX;
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
@@ -90,7 +94,10 @@ public class JdbcMetadataSelfTest extends GridCommonAbstractTest {
                     .setNotNullFields(new HashSet<>(Arrays.asList("age", "name")))
             )),
             cacheConfiguration("org").setQueryEntities(Arrays.asList(
-                new QueryEntity(AffinityKey.class, Organization.class))));
+                new QueryEntity(AffinityKey.class, Organization.class))),
+
+            cacheConfiguration("metaTest").setQueryEntities(Arrays.asList(
+                new QueryEntity(AffinityKey.class, MetaTest.class))));
 
         TcpDiscoverySpi disco = new TcpDiscoverySpi();
 
@@ -172,6 +179,40 @@ public class JdbcMetadataSelfTest extends GridCommonAbstractTest {
     /**
      * @throws Exception If failed.
      */
+    public void testDecimalAndDateTypeMetaData() throws Exception {
+        try (Connection conn = DriverManager.getConnection(BASE_URL)) {
+            Statement stmt = conn.createStatement();
+
+            ResultSet rs = stmt.executeQuery(
+                    "select t.decimal, t.date from \"metaTest\".MetaTest as t");
+
+            assert rs != null;
+
+            ResultSetMetaData meta = rs.getMetaData();
+
+            assert meta != null;
+
+            assert meta.getColumnCount() == 2;
+
+            assert "METATEST".equalsIgnoreCase(meta.getTableName(1));
+            assert "DECIMAL".equalsIgnoreCase(meta.getColumnName(1));
+            assert "DECIMAL".equalsIgnoreCase(meta.getColumnLabel(1));
+            assert meta.getColumnType(1) == DECIMAL;
+            assert "DECIMAL".equals(meta.getColumnTypeName(1));
+            assert "java.math.BigDecimal".equals(meta.getColumnClassName(1));
+
+            assert "METATEST".equalsIgnoreCase(meta.getTableName(2));
+            assert "DATE".equalsIgnoreCase(meta.getColumnName(2));
+            assert "DATE".equalsIgnoreCase(meta.getColumnLabel(2));
+            assert meta.getColumnType(2) == DATE;
+            assert "DATE".equals(meta.getColumnTypeName(2));
+            assert "java.sql.Date".equals(meta.getColumnClassName(2));
+        }
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
     public void testGetTables() throws Exception {
         try (Connection conn = DriverManager.getConnection(BASE_URL)) {
             DatabaseMetaData meta = conn.getMetaData();
@@ -455,7 +496,7 @@ public class JdbcMetadataSelfTest extends GridCommonAbstractTest {
         try (Connection conn = DriverManager.getConnection(BASE_URL)) {
             ResultSet rs = conn.getMetaData().getSchemas();
 
-            Set<String> expectedSchemas = new HashSet<>(Arrays.asList("pers", "org"));
+            Set<String> expectedSchemas = new HashSet<>(Arrays.asList("pers", "org", "metaTest"));
 
             Set<String> schemas = new HashSet<>();
 
@@ -541,4 +582,31 @@ public class JdbcMetadataSelfTest extends GridCommonAbstractTest {
             this.name = name;
         }
     }
+
+    /**
+     * Meta Test.
+     */
+    private static class MetaTest implements Serializable {
+        /** ID. */
+        @QuerySqlField
+        private final int id;
+
+        /** Date. */
+        @QuerySqlField
+        private final Date date;
+
+        /** decimal. */
+        @QuerySqlField
+        private final BigDecimal decimal;
+
+        /**
+         * @param id ID.
+         * @param date Date.
+         */
+        private MetaTest(int id, Date date, BigDecimal decimal) {
+            this.id = id;
+            this.date = date;
+            this.decimal = decimal;
+        }
+    }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/d045b842/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcMetadataSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcMetadataSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcMetadataSelfTest.java
index 87c1202..0613de7 100644
--- a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcMetadataSelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcMetadataSelfTest.java
@@ -18,12 +18,14 @@
 package org.apache.ignite.jdbc;
 
 import java.io.Serializable;
+import java.math.BigDecimal;
 import java.sql.Connection;
 import java.sql.DatabaseMetaData;
 import java.sql.DriverManager;
 import java.sql.ResultSet;
 import java.sql.ResultSetMetaData;
 import java.sql.Statement;
+import java.sql.Date;
 import java.util.ArrayList;
 import java.util.Collection;
 import org.apache.ignite.IgniteCache;
@@ -40,8 +42,10 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 
 import static java.sql.Types.INTEGER;
-import static java.sql.Types.OTHER;
 import static java.sql.Types.VARCHAR;
+import static java.sql.Types.DECIMAL;
+import static java.sql.Types.OTHER;
+import static java.sql.Types.DATE;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
 
@@ -103,6 +107,8 @@ public class JdbcMetadataSelfTest extends GridCommonAbstractTest {
         personCache.put(new AffinityKey<>("p1", "o1"), new Person("John White", 25, 1));
         personCache.put(new AffinityKey<>("p2", "o1"), new Person("Joe Black", 35, 1));
         personCache.put(new AffinityKey<>("p3", "o2"), new Person("Mike Green", 40, 2));
+
+        jcache(grid(0), cacheConfiguration(), "metaTest", AffinityKey.class, MetaTest.class);
     }
 
     /**
@@ -140,6 +146,40 @@ public class JdbcMetadataSelfTest extends GridCommonAbstractTest {
     /**
      * @throws Exception If failed.
      */
+    public void testDecimalAndDateTypeMetaData() throws Exception {
+        try (Connection conn = DriverManager.getConnection(URL)) {
+            Statement stmt = conn.createStatement();
+
+            ResultSet rs = stmt.executeQuery(
+                    "select t.decimal, t.date from \"metaTest\".MetaTest as t");
+
+            assert rs != null;
+
+            ResultSetMetaData meta = rs.getMetaData();
+
+            assert meta != null;
+
+            assert meta.getColumnCount() == 2;
+
+            assert "METATEST".equalsIgnoreCase(meta.getTableName(1));
+            assert "DECIMAL".equalsIgnoreCase(meta.getColumnName(1));
+            assert "DECIMAL".equalsIgnoreCase(meta.getColumnLabel(1));
+            assert meta.getColumnType(1) == DECIMAL;
+            assert "DECIMAL".equals(meta.getColumnTypeName(1));
+            assert "java.math.BigDecimal".equals(meta.getColumnClassName(1));
+
+            assert "METATEST".equalsIgnoreCase(meta.getTableName(2));
+            assert "DATE".equalsIgnoreCase(meta.getColumnName(2));
+            assert "DATE".equalsIgnoreCase(meta.getColumnLabel(2));
+            assert meta.getColumnType(2) == DATE;
+            assert "DATE".equals(meta.getColumnTypeName(2));
+            assert "java.sql.Date".equals(meta.getColumnClassName(2));
+        }
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
     public void testGetTables() throws Exception {
         try (Connection conn = DriverManager.getConnection(URL)) {
             DatabaseMetaData meta = conn.getMetaData();
@@ -337,4 +377,31 @@ public class JdbcMetadataSelfTest extends GridCommonAbstractTest {
             this.name = name;
         }
     }
+
+    /**
+     * Meta Test.
+     */
+    private static class MetaTest implements Serializable {
+        /** ID. */
+        @QuerySqlField
+        private final int id;
+
+        /** Date. */
+        @QuerySqlField
+        private final Date date;
+
+        /** decimal. */
+        @QuerySqlField
+        private final BigDecimal decimal;
+
+        /**
+         * @param id ID.
+         * @param date Date.
+         */
+        private MetaTest(int id, Date date, BigDecimal decimal) {
+            this.id = id;
+            this.date = date;
+            this.decimal = decimal;
+        }
+    }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/d045b842/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinMetadataSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinMetadataSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinMetadataSelfTest.java
index 9759965..df67666 100644
--- a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinMetadataSelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinMetadataSelfTest.java
@@ -53,8 +53,10 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
 
 import static java.sql.Types.INTEGER;
-import static java.sql.Types.OTHER;
 import static java.sql.Types.VARCHAR;
+import static java.sql.Types.DECIMAL;
+import static java.sql.Types.DATE;
+import static java.sql.Types.OTHER;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
 
@@ -158,6 +160,7 @@ public class JdbcThinMetadataSelfTest extends JdbcThinAbstractSelfTest {
             stmt.execute("CREATE INDEX IDX ON TEST (ID ASC)");
             stmt.execute("CREATE TABLE TEST_DECIMAL_COLUMN (ID INT primary key, DEC_COL DECIMAL(8, 3))");
             stmt.execute("CREATE TABLE TEST_DECIMAL_COLUMN_PRECISION (ID INT primary key, DEC_COL DECIMAL(8))");
+            stmt.execute("CREATE TABLE TEST_DECIMAL_DATE_COLUMN_META (ID INT primary key, DEC_COL DECIMAL(8), DATE_COL DATE)");
         }
     }
 
@@ -200,6 +203,40 @@ public class JdbcThinMetadataSelfTest extends JdbcThinAbstractSelfTest {
     /**
      * @throws Exception If failed.
      */
+    public void testDecimalAndDateTypeMetaData() throws Exception {
+        try (Connection conn = DriverManager.getConnection(URL)) {
+            Statement stmt = conn.createStatement();
+
+            ResultSet rs = stmt.executeQuery(
+                    "select t.dec_col, t.date_col from TEST_DECIMAL_DATE_COLUMN_META as t");
+
+            assert rs != null;
+
+            ResultSetMetaData meta = rs.getMetaData();
+
+            assert meta != null;
+
+            assert meta.getColumnCount() == 2;
+
+            assert "TEST_DECIMAL_DATE_COLUMN_META".equalsIgnoreCase(meta.getTableName(1));
+            assert "DEC_COL".equalsIgnoreCase(meta.getColumnName(1));
+            assert "DEC_COL".equalsIgnoreCase(meta.getColumnLabel(1));
+            assert meta.getColumnType(1) == DECIMAL;
+            assert "DECIMAL".equals(meta.getColumnTypeName(1));
+            assert "java.math.BigDecimal".equals(meta.getColumnClassName(1));
+
+            assert "TEST_DECIMAL_DATE_COLUMN_META".equalsIgnoreCase(meta.getTableName(2));
+            assert "DATE_COL".equalsIgnoreCase(meta.getColumnName(2));
+            assert "DATE_COL".equalsIgnoreCase(meta.getColumnLabel(2));
+            assert meta.getColumnType(2) == DATE;
+            assert "DATE".equals(meta.getColumnTypeName(2));
+            assert "java.sql.Date".equals(meta.getColumnClassName(2));
+        }
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
     public void testGetTables() throws Exception {
         try (Connection conn = DriverManager.getConnection(URL)) {
             DatabaseMetaData meta = conn.getMetaData();
@@ -261,7 +298,8 @@ public class JdbcThinMetadataSelfTest extends JdbcThinAbstractSelfTest {
                 "PUBLIC.TEST",
                 "PUBLIC.Quoted",
                 "PUBLIC.TEST_DECIMAL_COLUMN",
-                "PUBLIC.TEST_DECIMAL_COLUMN_PRECISION"));
+                "PUBLIC.TEST_DECIMAL_COLUMN_PRECISION",
+                "PUBLIC.TEST_DECIMAL_DATE_COLUMN_META"));
 
             Set<String> actualTbls = new HashSet<>(expectedTbls.size());
 
@@ -413,7 +451,10 @@ public class JdbcThinMetadataSelfTest extends JdbcThinAbstractSelfTest {
                 "PUBLIC.TEST_DECIMAL_COLUMN.ID.null",
                 "PUBLIC.TEST_DECIMAL_COLUMN.DEC_COL.null.8.3",
                 "PUBLIC.TEST_DECIMAL_COLUMN_PRECISION.ID.null",
-                "PUBLIC.TEST_DECIMAL_COLUMN_PRECISION.DEC_COL.null.8"
+                "PUBLIC.TEST_DECIMAL_COLUMN_PRECISION.DEC_COL.null.8",
+                "PUBLIC.TEST_DECIMAL_DATE_COLUMN_META.ID.null",
+                "PUBLIC.TEST_DECIMAL_DATE_COLUMN_META.DEC_COL.null.8",
+                "PUBLIC.TEST_DECIMAL_DATE_COLUMN_META.DATE_COL.null"
             ));
 
             Set<String> actualCols = new HashSet<>(expectedCols.size());
@@ -566,7 +607,8 @@ public class JdbcThinMetadataSelfTest extends JdbcThinAbstractSelfTest {
                 "PUBLIC.TEST.PK_PUBLIC_TEST.NAME",
                 "PUBLIC.Quoted.PK_PUBLIC_Quoted.Id",
                 "PUBLIC.TEST_DECIMAL_COLUMN.ID.ID",
-                "PUBLIC.TEST_DECIMAL_COLUMN_PRECISION.ID.ID"));
+                "PUBLIC.TEST_DECIMAL_COLUMN_PRECISION.ID.ID",
+                "PUBLIC.TEST_DECIMAL_DATE_COLUMN_META.ID.ID"));
 
             Set<String> actualPks = new HashSet<>(expectedPks.size());
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/d045b842/modules/core/src/main/java/org/apache/ignite/internal/jdbc/JdbcUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/jdbc/JdbcUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/jdbc/JdbcUtils.java
index 77ef267..7bb1d8b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/jdbc/JdbcUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/jdbc/JdbcUtils.java
@@ -17,6 +17,7 @@
 
 package org.apache.ignite.internal.jdbc;
 
+import java.math.BigDecimal;
 import java.sql.SQLException;
 import java.sql.Time;
 import java.sql.Timestamp;
@@ -44,7 +45,7 @@ import static java.sql.Types.TIME;
 import static java.sql.Types.TIMESTAMP;
 import static java.sql.Types.TINYINT;
 import static java.sql.Types.VARCHAR;
-
+import static java.sql.Types.DECIMAL;
 /**
  * Utility methods for JDBC driver.
  *
@@ -189,8 +190,10 @@ class JdbcUtils {
             return TIME;
         else if (Timestamp.class.getName().equals(cls))
             return TIMESTAMP;
-        else if (Date.class.getName().equals(cls))
+        else if (Date.class.getName().equals(cls) || java.sql.Date.class.getName().equals(cls))
             return DATE;
+        else if (BigDecimal.class.getName().equals(cls))
+            return DECIMAL;
         else
             return OTHER;
     }
@@ -224,8 +227,10 @@ class JdbcUtils {
             return "TIME";
         else if (Timestamp.class.getName().equals(cls))
             return "TIMESTAMP";
-        else if (Date.class.getName().equals(cls))
+        else if (Date.class.getName().equals(cls) || java.sql.Date.class.getName().equals(cls))
             return "DATE";
+        else if (BigDecimal.class.getName().equals(cls))
+            return "DECIMAL";
         else
             return "OTHER";
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/d045b842/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinUtils.java
index f896e7f..c129370 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinUtils.java
@@ -17,6 +17,7 @@
 
 package org.apache.ignite.internal.jdbc.thin;
 
+import java.math.BigDecimal;
 import java.sql.Time;
 import java.sql.Timestamp;
 import java.sql.Types;
@@ -35,6 +36,8 @@ import static java.sql.Types.TIME;
 import static java.sql.Types.TIMESTAMP;
 import static java.sql.Types.TINYINT;
 import static java.sql.Types.VARCHAR;
+import static java.sql.Types.DECIMAL;
+
 import static org.apache.ignite.internal.jdbc.thin.ConnectionPropertiesImpl.PROP_PREFIX;
 
 /**
@@ -79,8 +82,10 @@ public class JdbcThinUtils {
             return TIME;
         else if (Timestamp.class.getName().equals(cls))
             return TIMESTAMP;
-        else if (Date.class.getName().equals(cls))
+        else if (Date.class.getName().equals(cls) || java.sql.Date.class.getName().equals(cls))
             return DATE;
+        else if (BigDecimal.class.getName().equals(cls))
+            return DECIMAL;
         else
             return OTHER;
     }
@@ -114,8 +119,10 @@ public class JdbcThinUtils {
             return "TIME";
         else if (Timestamp.class.getName().equals(cls))
             return "TIMESTAMP";
-        else if (Date.class.getName().equals(cls))
+        else if (Date.class.getName().equals(cls) || java.sql.Date.class.getName().equals(cls))
             return "DATE";
+        else if (BigDecimal.class.getName().equals(cls))
+            return "DECIMAL";
         else
             return "OTHER";
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/d045b842/modules/core/src/main/java/org/apache/ignite/internal/jdbc2/JdbcUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/jdbc2/JdbcUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/jdbc2/JdbcUtils.java
index cda6ba0..80881d7 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/jdbc2/JdbcUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/jdbc2/JdbcUtils.java
@@ -17,6 +17,7 @@
 
 package org.apache.ignite.internal.jdbc2;
 
+import java.math.BigDecimal;
 import java.net.URL;
 import java.sql.SQLException;
 import java.sql.Time;
@@ -41,7 +42,7 @@ import static java.sql.Types.TIME;
 import static java.sql.Types.TIMESTAMP;
 import static java.sql.Types.TINYINT;
 import static java.sql.Types.VARCHAR;
-
+import static java.sql.Types.DECIMAL;
 /**
  * Utility methods for JDBC driver.
  */
@@ -77,6 +78,8 @@ public class JdbcUtils {
             return TIMESTAMP;
         else if (Date.class.getName().equals(cls) || java.sql.Date.class.getName().equals(cls))
             return DATE;
+        else if (BigDecimal.class.getName().equals(cls))
+            return DECIMAL;
         else
             return OTHER;
     }
@@ -112,6 +115,8 @@ public class JdbcUtils {
             return "TIMESTAMP";
         else if (Date.class.getName().equals(cls) || java.sql.Date.class.getName().equals(cls))
             return "DATE";
+        else if (BigDecimal.class.getName().equals(cls))
+            return "DECIMAL";
         else
             return "OTHER";
     }


[29/37] ignite git commit: IGNITE-10609 Web Console: Fixed removing cache from service on "Configuration" screen.

Posted by ak...@apache.org.
IGNITE-10609 Web Console: Fixed removing cache from service on "Configuration" screen.


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

Branch: refs/heads/ignite-10189
Commit: c7fe467fb235e3669f3ba4fb3007abb98dbb1e47
Parents: 86f92d9
Author: Vasiliy Sisko <vs...@gridgain.com>
Authored: Mon Dec 10 09:17:48 2018 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Mon Dec 10 09:17:48 2018 +0700

----------------------------------------------------------------------
 .../components/cluster-edit-form/controller.js                | 7 ++++++-
 .../components/cluster-edit-form/templates/service.pug        | 4 ++--
 2 files changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/c7fe467f/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/controller.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/controller.js b/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/controller.js
index 881e543..5020d7b 100644
--- a/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/controller.js
+++ b/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/controller.js
@@ -25,6 +25,8 @@ export default class ClusterEditFormController {
     caches;
     /** @type {ig.menu<string>} */
     cachesMenu;
+    /** @type {ig.menu<string>} */
+    servicesCachesMenu;
     /** @type {ng.ICompiledExpression} */
     onSave;
 
@@ -108,8 +110,11 @@ export default class ClusterEditFormController {
                 this.$scope.ui.inputForm.$setUntouched();
             }
         }
-        if ('caches' in changes)
+
+        if ('caches' in changes) {
             this.cachesMenu = (changes.caches.currentValue || []).map((c) => ({label: c.name, value: c._id}));
+            this.servicesCachesMenu = [{label: 'Key-affinity not used', value: null}].concat(this.cachesMenu);
+        }
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/c7fe467f/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/service.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/service.pug b/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/service.pug
index 10b5dd8..6a2f8a6 100644
--- a/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/service.pug
+++ b/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/service.pug
@@ -83,9 +83,9 @@ panel-collapsible(ng-form=form on-open=`ui.loadPanel('${form}')`)
                                     label: 'Cache:',
                                     model: '$item.cache',
                                     name: '"serviceCache"',
-                                    placeholder: 'Choose cache',
+                                    placeholder: 'Key-affinity not used',
                                     placeholderEmpty: 'No caches configured for current cluster',
-                                    options: '$ctrl.cachesMenu',
+                                    options: '$ctrl.servicesCachesMenu',
                                     tip: 'Cache name used for key-to-node affinity calculation'
                                 })(
                                     pc-is-in-collection='$ctrl.clonedCluster.caches'


[17/37] ignite git commit: IGNITE-9980 Added additional flag to filter caches by types to control.sh - Fixes #5496.

Posted by ak...@apache.org.
IGNITE-9980 Added additional flag to filter caches by types to control.sh - Fixes #5496.

Signed-off-by: Alexey Goncharuk <al...@gmail.com>


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

Branch: refs/heads/ignite-10189
Commit: 9199aac144844aa8e4a44e36e366af25dd90eb18
Parents: 6613376
Author: vd-pyatkov <vp...@gridgain.com>
Authored: Thu Dec 6 18:39:07 2018 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Thu Dec 6 18:39:07 2018 +0300

----------------------------------------------------------------------
 .../internal/commandline/CommandHandler.java    |  24 ++-
 .../commandline/cache/CacheArguments.java       |  18 ++
 .../verify/VerifyBackupPartitionsTaskV2.java    |  97 ++++++++--
 .../internal/visor/verify/CacheFilterEnum.java  |  52 ++++++
 .../verify/VisorIdleVerifyDumpTaskArg.java      |  30 +++-
 .../ignite/util/GridCommandHandlerTest.java     | 177 ++++++++++++++++++-
 6 files changed, 376 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/9199aac1/modules/core/src/main/java/org/apache/ignite/internal/commandline/CommandHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/commandline/CommandHandler.java b/modules/core/src/main/java/org/apache/ignite/internal/commandline/CommandHandler.java
index 56f278b..da6495f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/commandline/CommandHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/commandline/CommandHandler.java
@@ -101,6 +101,7 @@ import org.apache.ignite.internal.visor.tx.VisorTxSortOrder;
 import org.apache.ignite.internal.visor.tx.VisorTxTask;
 import org.apache.ignite.internal.visor.tx.VisorTxTaskArg;
 import org.apache.ignite.internal.visor.tx.VisorTxTaskResult;
+import org.apache.ignite.internal.visor.verify.CacheFilterEnum;
 import org.apache.ignite.internal.visor.verify.IndexIntegrityCheckIssue;
 import org.apache.ignite.internal.visor.verify.IndexValidationIssue;
 import org.apache.ignite.internal.visor.verify.ValidateIndexesPartitionResult;
@@ -195,6 +196,9 @@ public class CommandHandler {
     /** */
     private static final String CMD_SKIP_ZEROS = "--skipZeros";
 
+    /** Cache filter. */
+    private static final String CACHE_FILTER = "--cacheFilter";
+
     /** */
     private static final String CMD_USER_ATTRIBUTES = "--user-attributes";
 
@@ -809,10 +813,14 @@ public class CommandHandler {
         nl();
         log(i("Subcommands:"));
 
-        usageCache(LIST, "regexPattern", "[groups|seq]", "[nodeId]", op(CONFIG), op(OUTPUT_FORMAT, MULTI_LINE.text()));
-        usageCache(CONTENTION, "minQueueSize", "[nodeId]", "[maxPrint]");
-        usageCache(IDLE_VERIFY, op(CMD_DUMP), op(CMD_SKIP_ZEROS), "[cache1,...,cacheN]");
-        usageCache(VALIDATE_INDEXES, "[cache1,...,cacheN]", "[nodeId]", op(or(VI_CHECK_FIRST + " N", VI_CHECK_THROUGH + " K")));
+        usageCache(LIST, "regexPattern", op(or("groups","seq")), op("nodeId"), op(CONFIG), op(OUTPUT_FORMAT, MULTI_LINE
+            .text()));
+        usageCache(CONTENTION, "minQueueSize", op("nodeId"), op("maxPrint"));
+        usageCache(IDLE_VERIFY, op(CMD_DUMP), op(CMD_SKIP_ZEROS), "[cache1,...,cacheN]",
+            op(CACHE_FILTER, or(CacheFilterEnum.ALL.toString(), CacheFilterEnum.SYSTEM.toString(), CacheFilterEnum.PERSISTENT.toString(),
+                CacheFilterEnum.NOT_PERSISTENT.toString())));
+        usageCache(VALIDATE_INDEXES, "[cache1,...,cacheN]", op("nodeId"), op(or(VI_CHECK_FIRST + " N",
+            VI_CHECK_THROUGH + " K")));
         usageCache(DISTRIBUTION, or("nodeId", NULL), "[cacheName1,...,cacheNameN]", op(CMD_USER_ATTRIBUTES, "attName1,...,attrNameN"));
         usageCache(RESET_LOST_PARTITIONS, "cacheName1,...,cacheNameN");
         nl();
@@ -1133,7 +1141,7 @@ public class CommandHandler {
         String path = executeTask(
             client,
             VisorIdleVerifyDumpTask.class,
-            new VisorIdleVerifyDumpTaskArg(cacheArgs.caches(), cacheArgs.isSkipZeros())
+            new VisorIdleVerifyDumpTaskArg(cacheArgs.caches(), cacheArgs.isSkipZeros(), cacheArgs.getCacheFilterEnum())
         );
 
         log("VisorIdleVerifyDumpTask successfully written output to '" + path + "'");
@@ -2049,6 +2057,12 @@ public class CommandHandler {
                         cacheArgs.dump(true);
                     else if (CMD_SKIP_ZEROS.equals(nextArg))
                         cacheArgs.skipZeros(true);
+                    else if (CACHE_FILTER.equals(nextArg)) {
+                        String filter = nextArg("The cache filter should be specified. The following values can be " +
+                            "used: " + Arrays.toString(CacheFilterEnum.values()) + '.').toUpperCase();
+
+                        cacheArgs.setCacheFilterEnum(CacheFilterEnum.valueOf(filter));
+                    }
                     else
                         parseCacheNames(nextArg, cacheArgs);
                 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/9199aac1/modules/core/src/main/java/org/apache/ignite/internal/commandline/cache/CacheArguments.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/commandline/cache/CacheArguments.java b/modules/core/src/main/java/org/apache/ignite/internal/commandline/cache/CacheArguments.java
index e92b627..9372391 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/commandline/cache/CacheArguments.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/commandline/cache/CacheArguments.java
@@ -19,6 +19,7 @@ package org.apache.ignite.internal.commandline.cache;
 import java.util.Set;
 import java.util.UUID;
 import org.apache.ignite.internal.commandline.OutputFormat;
+import org.apache.ignite.internal.visor.verify.CacheFilterEnum;
 import org.apache.ignite.internal.visor.verify.VisorViewCacheCmd;
 import org.jetbrains.annotations.Nullable;
 
@@ -71,6 +72,23 @@ public class CacheArguments {
     /** Full config flag. */
     private boolean fullConfig;
 
+    /** Cache filter. */
+    private CacheFilterEnum cacheFilterEnum = CacheFilterEnum.ALL;
+
+    /**
+     * @return Gets filter of caches, which will by checked.
+     */
+    public CacheFilterEnum getCacheFilterEnum() {
+        return cacheFilterEnum;
+    }
+
+    /**
+     * @param cacheFilterEnum Cache filter.
+     */
+    public void setCacheFilterEnum(CacheFilterEnum cacheFilterEnum) {
+        this.cacheFilterEnum = cacheFilterEnum;
+    }
+
     /**
      * @return Full config flag.
      */

http://git-wip-us.apache.org/repos/asf/ignite/blob/9199aac1/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/verify/VerifyBackupPartitionsTaskV2.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/verify/VerifyBackupPartitionsTaskV2.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/verify/VerifyBackupPartitionsTaskV2.java
index e698e3a..14995cb 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/verify/VerifyBackupPartitionsTaskV2.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/verify/VerifyBackupPartitionsTaskV2.java
@@ -36,20 +36,26 @@ import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteException;
 import org.apache.ignite.IgniteInterruptedException;
 import org.apache.ignite.IgniteLogger;
+import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.compute.ComputeJob;
 import org.apache.ignite.compute.ComputeJobAdapter;
 import org.apache.ignite.compute.ComputeJobResult;
 import org.apache.ignite.compute.ComputeTaskAdapter;
+import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.configuration.DataStorageConfiguration;
 import org.apache.ignite.internal.IgniteEx;
 import org.apache.ignite.internal.processors.cache.CacheGroupContext;
 import org.apache.ignite.internal.processors.cache.DynamicCacheDescriptor;
+import org.apache.ignite.internal.processors.cache.GridCacheUtils;
 import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtLocalPartition;
 import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionState;
 import org.apache.ignite.internal.processors.cache.persistence.CacheDataRow;
 import org.apache.ignite.internal.processors.task.GridInternal;
 import org.apache.ignite.internal.util.lang.GridIterator;
 import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.internal.visor.verify.CacheFilterEnum;
+import org.apache.ignite.internal.visor.verify.VisorIdleVerifyDumpTaskArg;
 import org.apache.ignite.internal.visor.verify.VisorIdleVerifyTaskArg;
 import org.apache.ignite.lang.IgniteProductVersion;
 import org.apache.ignite.resources.IgniteInstanceResource;
@@ -176,7 +182,7 @@ public class VerifyBackupPartitionsTaskV2 extends ComputeTaskAdapter<VisorIdleVe
                 for (String cacheName : arg.getCaches()) {
                     DynamicCacheDescriptor desc = ignite.context().cache().cacheDescriptor(cacheName);
 
-                    if (desc == null) {
+                    if (desc == null || !isCacheMatchFilter(cacheName)) {
                         missingCaches.add(cacheName);
 
                         continue;
@@ -185,15 +191,13 @@ public class VerifyBackupPartitionsTaskV2 extends ComputeTaskAdapter<VisorIdleVe
                     grpIds.add(desc.groupId());
                 }
 
-                if (!missingCaches.isEmpty()) {
-                    StringBuilder strBuilder = new StringBuilder("The following caches do not exist: ");
-
-                    for (String name : missingCaches)
-                        strBuilder.append(name).append(", ");
-
-                    strBuilder.delete(strBuilder.length() - 2, strBuilder.length());
-
-                    throw new IgniteException(strBuilder.toString());
+                handlingMissedCaches(missingCaches);
+            }
+            else if (onlySpecificCaches()) {
+                for (DynamicCacheDescriptor desc : ignite.context().cache().cacheDescriptors().values()) {
+                    if (desc.cacheConfiguration().getCacheMode() != CacheMode.LOCAL
+                        && isCacheMatchFilter(desc.cacheName()))
+                        grpIds.add(desc.groupId());
                 }
             }
             else {
@@ -260,6 +264,79 @@ public class VerifyBackupPartitionsTaskV2 extends ComputeTaskAdapter<VisorIdleVe
         }
 
         /**
+         *  Checks and throw exception if caches was missed.
+         *
+         * @param missingCaches Missing caches.
+         */
+        private void handlingMissedCaches(Set<String> missingCaches) {
+            if (missingCaches.isEmpty())
+                return;
+
+            StringBuilder strBuilder = new StringBuilder("The following caches do not exist");
+
+            if (onlySpecificCaches()) {
+                VisorIdleVerifyDumpTaskArg vdta = (VisorIdleVerifyDumpTaskArg)arg;
+
+                strBuilder.append(" or do not match to the given filter [")
+                    .append(vdta.getCacheFilterEnum())
+                    .append("]: ");
+            }
+            else
+                strBuilder.append(": ");
+
+            for (String name : missingCaches)
+                strBuilder.append(name).append(", ");
+
+            strBuilder.delete(strBuilder.length() - 2, strBuilder.length());
+
+            throw new IgniteException(strBuilder.toString());
+        }
+
+        /**
+         * @return True if validates only specific caches, else false.
+         */
+        private boolean onlySpecificCaches() {
+            if (arg instanceof VisorIdleVerifyDumpTaskArg) {
+                VisorIdleVerifyDumpTaskArg vdta = (VisorIdleVerifyDumpTaskArg)arg;
+
+                return vdta.getCacheFilterEnum() != CacheFilterEnum.ALL;
+            }
+
+            return false;
+        }
+
+        /**
+         * @param cacheName Cache name.
+         */
+        private boolean isCacheMatchFilter(String cacheName) {
+            if (arg instanceof VisorIdleVerifyDumpTaskArg) {
+                DataStorageConfiguration dsc = ignite.context().config().getDataStorageConfiguration();
+                DynamicCacheDescriptor desc = ignite.context().cache().cacheDescriptor(cacheName);
+                CacheConfiguration cc = desc.cacheConfiguration();
+                VisorIdleVerifyDumpTaskArg vdta = (VisorIdleVerifyDumpTaskArg)arg;
+
+                switch (vdta.getCacheFilterEnum()) {
+                    case SYSTEM:
+                        return !desc.cacheType().userCache();
+
+                    case NOT_PERSISTENT:
+                        return desc.cacheType().userCache() && !GridCacheUtils.isPersistentCache(cc, dsc);
+
+                    case PERSISTENT:
+                        return desc.cacheType().userCache() && GridCacheUtils.isPersistentCache(cc, dsc);
+
+                    case ALL:
+                        break;
+
+                    default:
+                        assert false: "Illegal cache filter: " + vdta.getCacheFilterEnum();
+                }
+            }
+
+            return true;
+        }
+
+        /**
          * @param grpCtx Group context.
          * @param part Local partition.
          */

http://git-wip-us.apache.org/repos/asf/ignite/blob/9199aac1/modules/core/src/main/java/org/apache/ignite/internal/visor/verify/CacheFilterEnum.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/verify/CacheFilterEnum.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/verify/CacheFilterEnum.java
new file mode 100644
index 0000000..4e87d50
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/verify/CacheFilterEnum.java
@@ -0,0 +1,52 @@
+/*
+ * 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.visor.verify;
+
+import org.jetbrains.annotations.Nullable;
+
+/**
+ * Represents a type of cache(s) that can be used for comparing update counters and checksums between primary and backup partitions.
+ * <br>
+ * @see org.apache.ignite.internal.processors.cache.verify.VerifyBackupPartitionsTaskV2
+ */
+public enum CacheFilterEnum {
+    /** All. */
+    ALL,
+
+    /** System. */
+    SYSTEM,
+
+    /** Persistent. */
+    PERSISTENT,
+
+    /** Not persistent. */
+    NOT_PERSISTENT;
+
+    /** Enumerated values. */
+    private static final CacheFilterEnum[] VALS = values();
+
+    /**
+     * Efficiently gets enumerated value from its ordinal.
+     *
+     * @param ord Ordinal value.
+     * @return Enumerated value or {@code null} if ordinal out of range.
+     */
+    public static @Nullable CacheFilterEnum fromOrdinal(int ord) {
+        return ord >= 0 && ord < VALS.length ? VALS[ord] : null;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/9199aac1/modules/core/src/main/java/org/apache/ignite/internal/visor/verify/VisorIdleVerifyDumpTaskArg.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/verify/VisorIdleVerifyDumpTaskArg.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/verify/VisorIdleVerifyDumpTaskArg.java
index 6316c24..29dfb5b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/verify/VisorIdleVerifyDumpTaskArg.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/verify/VisorIdleVerifyDumpTaskArg.java
@@ -22,6 +22,7 @@ import java.io.ObjectInput;
 import java.io.ObjectOutput;
 import java.util.Set;
 import org.apache.ignite.internal.util.typedef.internal.S;
+import org.apache.ignite.internal.util.typedef.internal.U;
 
 /**
  * Arguments for {@link VisorIdleVerifyDumpTask}.
@@ -29,9 +30,13 @@ import org.apache.ignite.internal.util.typedef.internal.S;
 public class VisorIdleVerifyDumpTaskArg extends VisorIdleVerifyTaskArg {
     /** */
     private static final long serialVersionUID = 0L;
+
     /** */
     private boolean skipZeros;
 
+    /** Cache kind. */
+    private CacheFilterEnum cacheFilterEnum;
+
     /**
      * Default constructor.
      */
@@ -41,10 +46,12 @@ public class VisorIdleVerifyDumpTaskArg extends VisorIdleVerifyTaskArg {
     /**
      * @param caches Caches.
      * @param skipZeros Skip zeros partitions.
+     * @param cacheFilterEnum Cache kind.
      */
-    public VisorIdleVerifyDumpTaskArg(Set<String> caches, boolean skipZeros) {
+    public VisorIdleVerifyDumpTaskArg(Set<String> caches, boolean skipZeros, CacheFilterEnum cacheFilterEnum) {
         super(caches);
         this.skipZeros = skipZeros;
+        this.cacheFilterEnum = cacheFilterEnum;
     }
 
     /**
@@ -54,16 +61,37 @@ public class VisorIdleVerifyDumpTaskArg extends VisorIdleVerifyTaskArg {
         return skipZeros;
     }
 
+    /**
+     * @return Kind fo cache.
+     */
+    public CacheFilterEnum getCacheFilterEnum() {
+        return cacheFilterEnum;
+    }
+
     /** {@inheritDoc} */
     @Override protected void writeExternalData(ObjectOutput out) throws IOException {
         super.writeExternalData(out);
+
         out.writeBoolean(skipZeros);
+
+        U.writeEnum(out, cacheFilterEnum);
     }
 
     /** {@inheritDoc} */
     @Override protected void readExternalData(byte protoVer, ObjectInput in) throws IOException, ClassNotFoundException {
         super.readExternalData(protoVer, in);
+
         skipZeros = in.readBoolean();
+
+        if (protoVer >= V2)
+            cacheFilterEnum = CacheFilterEnum.fromOrdinal(in.readByte());
+        else
+            cacheFilterEnum = CacheFilterEnum.ALL;
+    }
+
+    /** {@inheritDoc} */
+    @Override public byte getProtocolVersion() {
+        return V2;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/9199aac1/modules/core/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java b/modules/core/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java
index 67fee0a..f5fa887 100644
--- a/modules/core/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java
@@ -19,6 +19,7 @@ package org.apache.ignite.util;
 
 import java.io.ByteArrayOutputStream;
 import java.io.File;
+import java.io.IOException;
 import java.io.PrintStream;
 import java.nio.file.DirectoryStream;
 import java.nio.file.Files;
@@ -48,6 +49,7 @@ import org.apache.ignite.IgniteCache;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction;
 import org.apache.ignite.cluster.ClusterNode;
+import org.apache.ignite.configuration.AtomicConfiguration;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.ConnectorConfiguration;
 import org.apache.ignite.configuration.DataRegionConfiguration;
@@ -64,6 +66,7 @@ import org.apache.ignite.internal.commandline.OutputFormat;
 import org.apache.ignite.internal.commandline.cache.CacheCommand;
 import org.apache.ignite.internal.managers.communication.GridIoMessage;
 import org.apache.ignite.internal.pagemem.wal.record.DataEntry;
+import org.apache.ignite.internal.processors.cache.CacheGroupContext;
 import org.apache.ignite.internal.processors.cache.CacheObjectImpl;
 import org.apache.ignite.internal.processors.cache.GridCacheContext;
 import org.apache.ignite.internal.processors.cache.GridCacheEntryEx;
@@ -79,15 +82,18 @@ import org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx
 import org.apache.ignite.internal.processors.cache.transactions.IgniteTxEntry;
 import org.apache.ignite.internal.processors.cache.transactions.TransactionProxyImpl;
 import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
+import org.apache.ignite.internal.processors.datastructures.GridCacheInternalKeyImpl;
 import org.apache.ignite.internal.util.lang.GridAbsPredicate;
 import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.internal.util.typedef.G;
 import org.apache.ignite.internal.util.typedef.T2;
 import org.apache.ignite.internal.util.typedef.X;
+import org.apache.ignite.internal.util.typedef.internal.CU;
 import org.apache.ignite.internal.util.typedef.internal.SB;
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.internal.visor.tx.VisorTxInfo;
 import org.apache.ignite.internal.visor.tx.VisorTxTaskResult;
+import org.apache.ignite.internal.visor.verify.CacheFilterEnum;
 import org.apache.ignite.lang.IgniteBiPredicate;
 import org.apache.ignite.lang.IgniteInClosure;
 import org.apache.ignite.lang.IgnitePredicate;
@@ -126,6 +132,12 @@ public class GridCommandHandlerTest extends GridCommonAbstractTest {
     /** Option is used for auto confirmation. */
     private static final String CMD_AUTO_CONFIRMATION = "--yes";
 
+    /** Atomic configuration. */
+    private AtomicConfiguration atomicConfiguration;
+
+    /** Additional data region configuration. */
+    private DataRegionConfiguration dataRegionConfiguration;
+
     /**
      * @return Folder in work directory.
      * @throws IgniteCheckedException If failed to resolve folder name.
@@ -186,12 +198,19 @@ public class GridCommandHandlerTest extends GridCommonAbstractTest {
     @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
         IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
 
+        if (atomicConfiguration != null)
+            cfg.setAtomicConfiguration(atomicConfiguration);
+
         cfg.setCommunicationSpi(new TestRecordingCommunicationSpi());
 
         cfg.setConnectorConfiguration(new ConnectorConfiguration());
 
-        DataStorageConfiguration memCfg = new DataStorageConfiguration().setDefaultDataRegionConfiguration(
-            new DataRegionConfiguration().setMaxSize(50L * 1024 * 1024));
+        DataStorageConfiguration memCfg = new DataStorageConfiguration()
+            .setDefaultDataRegionConfiguration(new DataRegionConfiguration()
+                .setMaxSize(50L * 1024 * 1024));
+
+        if (dataRegionConfiguration != null)
+            memCfg.setDataRegionConfigurations(dataRegionConfiguration);
 
         cfg.setDataStorageConfiguration(memCfg);
 
@@ -1055,25 +1074,171 @@ public class GridCommandHandlerTest extends GridCommonAbstractTest {
             .setBackups(1)
             .setName(DEFAULT_CACHE_NAME));
 
+        for (int i = 0; i < 100; i++)
+            cache.put(i, i);
+
+        corruptingAndCheckDefaultCache(ignite, parts, CacheFilterEnum.ALL);
+    }
+
+    /**
+     * @param ignite Ignite.
+     * @param parts Parts.
+     */
+    private void corruptingAndCheckDefaultCache(IgniteEx ignite, int parts, CacheFilterEnum cacheFilterEnum) throws IOException {
         injectTestSystemOut();
 
+        GridCacheContext<Object, Object> cacheCtx = ignite.cachex(DEFAULT_CACHE_NAME).context();
+
+        corruptDataEntry(cacheCtx, 0, true, false);
+
+        corruptDataEntry(cacheCtx, parts / 2, false, true);
+
+        assertEquals(EXIT_CODE_OK, execute("--cache", "idle_verify", "--dump", "--cacheFilter", cacheFilterEnum.toString()));
+
+        Matcher fileNameMatcher = dumpFileNameMatcher();
+
+        if (fileNameMatcher.find()) {
+            String dumpWithConflicts = new String(Files.readAllBytes(Paths.get(fileNameMatcher.group(1))));
+
+            assertTrue(dumpWithConflicts.contains("found 2 conflict partitions: [counterConflicts=1, hashConflicts=1]"));
+        }
+        else
+            fail("Should be found dump with conflicts");
+    }
+
+    /**
+     * Tests that idle verify print partitions info over system caches.
+     *
+     * @throws Exception If failed.
+     */
+    public void testCacheIdleVerifyDumpForCorruptedDataOnSystemCache() throws Exception {
+        int parts = 32;
+
+        atomicConfiguration = new AtomicConfiguration()
+            .setAffinity(new RendezvousAffinityFunction(false, parts))
+            .setBackups(2);
+
+        IgniteEx ignite = (IgniteEx)startGrids(3);
+
+        ignite.cluster().active(true);
+
+        injectTestSystemOut();
+
+        // Adding some assignments without deployments.
+        for (int i = 0; i < 100; i++) {
+            ignite.semaphore("s" + i, i, false, true);
+
+            ignite.atomicSequence("sq" + i, 0, true)
+                .incrementAndGet();
+        }
+
+        CacheGroupContext storedSysCacheCtx = ignite.context().cache().cacheGroup(CU.cacheId("default-ds-group"));
+
+        assertNotNull(storedSysCacheCtx);
+
+        corruptDataEntry(storedSysCacheCtx.caches().get(0), new GridCacheInternalKeyImpl("sq0",
+            "default-ds-group"), true, false);
+
+        corruptDataEntry(storedSysCacheCtx.caches().get(0), new GridCacheInternalKeyImpl("sq" + parts / 2,
+            "default-ds-group"), false, true);
+
+        CacheGroupContext memorySysCacheCtx = ignite.context().cache().cacheGroup(CU.cacheId("default-volatile-ds-group"));
+
+        assertNotNull(memorySysCacheCtx);
+
+        corruptDataEntry(memorySysCacheCtx.caches().get(0), new GridCacheInternalKeyImpl("s0",
+                "default-volatile-ds-group"), true, false);
+
+        corruptDataEntry(memorySysCacheCtx.caches().get(0), new GridCacheInternalKeyImpl("s" + parts / 2,
+            "default-volatile-ds-group"), false, true);
+
+        assertEquals(EXIT_CODE_OK, execute("--cache", "idle_verify", "--dump", "--cacheFilter", CacheFilterEnum.SYSTEM.toString()));
+
+        Matcher fileNameMatcher = dumpFileNameMatcher();
+
+        if (fileNameMatcher.find()) {
+            String dumpWithConflicts = new String(Files.readAllBytes(Paths.get(fileNameMatcher.group(1))));
+
+            assertTrue(dumpWithConflicts.contains("found 4 conflict partitions: [counterConflicts=2, " +
+                "hashConflicts=2]"));
+        }
+        else
+            fail("Should be found dump with conflicts");
+    }
+
+    /**
+     * Tests that idle verify print partitions info over persistence client caches.
+     *
+     * @throws Exception If failed.
+     */
+    public void testCacheIdleVerifyDumpForCorruptedDataOnPersistenceClientCache() throws Exception {
+        int parts = 32;
+
+        dataRegionConfiguration = new DataRegionConfiguration()
+            .setName("persistence-region")
+            .setMaxSize(100L * 1024 * 1024)
+            .setPersistenceEnabled(true);
+
+        IgniteEx ignite = (IgniteEx)startGrids(3);
+
+        ignite.cluster().active(true);
+
+        IgniteCache<Object, Object> cache = ignite.createCache(new CacheConfiguration<>()
+            .setAffinity(new RendezvousAffinityFunction(false, parts))
+            .setBackups(2)
+            .setName(DEFAULT_CACHE_NAME)
+            .setDataRegionName("persistence-region"));
+
+        // Adding some assignments without deployments.
         for (int i = 0; i < 100; i++)
             cache.put(i, i);
 
+        corruptingAndCheckDefaultCache(ignite, parts, CacheFilterEnum.PERSISTENT);
+    }
+
+    /**
+     * Tests that idle verify print partitions info over none-persistence client caches.
+     *
+     * @throws Exception If failed.
+     */
+    public void testCacheIdleVerifyDumpForCorruptedDataOnNonePersistenceClientCache() throws Exception {
+        int parts = 32;
+
+        dataRegionConfiguration = new DataRegionConfiguration()
+            .setName("none-persistence-region");
+
+        IgniteEx ignite = (IgniteEx)startGrids(3);
+
+        ignite.cluster().active(true);
+
+        IgniteCache<Object, Object> cache = ignite.createCache(new CacheConfiguration<>()
+            .setAffinity(new RendezvousAffinityFunction(false, parts))
+            .setBackups(2)
+            .setName(DEFAULT_CACHE_NAME)
+            .setDataRegionName("none-persistence-region"));
+
+        // Adding some assignments without deployments.
+        for (int i = 0; i < 100; i++)
+            cache.put(i, i);
+
+        injectTestSystemOut();
+
         GridCacheContext<Object, Object> cacheCtx = ignite.cachex(DEFAULT_CACHE_NAME).context();
 
         corruptDataEntry(cacheCtx, 0, true, false);
 
-        corruptDataEntry(cacheCtx, 0 + parts / 2, false, true);
+        corruptDataEntry(cacheCtx, parts / 2, false, true);
 
-        assertEquals(EXIT_CODE_OK, execute("--cache", "idle_verify", "--dump"));
+        assertEquals(EXIT_CODE_OK, execute("--cache", "idle_verify", "--dump", "--cacheFilter", CacheFilterEnum
+            .NOT_PERSISTENT.toString()));
 
         Matcher fileNameMatcher = dumpFileNameMatcher();
 
         if (fileNameMatcher.find()) {
             String dumpWithConflicts = new String(Files.readAllBytes(Paths.get(fileNameMatcher.group(1))));
 
-            assertTrue(dumpWithConflicts.contains("found 2 conflict partitions: [counterConflicts=1, hashConflicts=1]"));
+            assertTrue(dumpWithConflicts.contains("found 1 conflict partitions: [counterConflicts=0, " +
+                "hashConflicts=1]"));
         }
         else
             fail("Should be found dump with conflicts");
@@ -1629,7 +1794,7 @@ public class GridCommandHandlerTest extends GridCommonAbstractTest {
      */
     private void corruptDataEntry(
         GridCacheContext<Object, Object> ctx,
-        int key,
+        Object key,
         boolean breakCntr,
         boolean breakData
     ) {


[34/37] ignite git commit: IGNITE-10382: [ML] Move datasets from example to ml module

Posted by ak...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/86a788f3/modules/ml/src/main/resources/datasets/titanic.csv
----------------------------------------------------------------------
diff --git a/modules/ml/src/main/resources/datasets/titanic.csv b/modules/ml/src/main/resources/datasets/titanic.csv
new file mode 100644
index 0000000..ed25e85
--- /dev/null
+++ b/modules/ml/src/main/resources/datasets/titanic.csv
@@ -0,0 +1,1310 @@
+pclass;survived;name;sex;age;sibsp;parch;ticket;fare;cabin;embarked;boat;body;homedest
+1;1;Allen                                                                             ,Miss. Elisabeth Walton;;29;;;24160;211                               ,3375;B5;;2;;St Louis       ,MO
+1;1;Allison                                                                           ,Master. Hudson Trevor;male;0                                         ,9167;1;2;113781;151        ,55;C22 C26;AA;11;;Montreal,PQ / Chesterville,ON
+1;0;Allison                                                                           ,Miss. Helen Loraine;female;2;1;2;113781;151                          ,55;C22 C26;S;;;Montreal    ,PQ / Chesterville         ,ON
+1;0;Allison                                                                           ,Mr. Hudson Joshua Creighton;male;30;1;2;113781;151                   ,55;C22 C26;S;;135;Montreal ,PQ / Chesterville         ,ON
+1;0;Allison                                                                           ,Mrs. Hudson J C (Bessie Waldo Daniels);female;25;1;2;113781;151      ,55;C22 C26;S;;;Montreal    ,PQ / Chesterville         ,ON
+1;1;Anderson                                                                          ,Mr. Harry;male;48;0;0;19952;26                                       ,55;E12;S;3;;New York       ,NY
+1;1;Andrews                                                                           ,Miss. Kornelia Theodosia;female;63;1;0;13502;77                      ,9583;D7;S;10;;Hudson       ,NY
+1;0;Andrews                                                                           ,Mr. Thomas Jr;male;39;0;0;112050;0;A36;S;;;Belfast                   ,NI
+1;1;Appleton                                                                          ,Mrs. Edward Dale (Charlotte Lamson);female;53;2;0;11769;51           ,4792;C101;S;D;;Bayside     ,Queens                    ,NY
+1;0;Artagaveytia                                                                      ,Mr. Ramon;male;71;0;0;PC 17609;49                                    ,5042;;C;;22;Montevideo     ,Uruguay
+1;0;Astor                                                                             ,Col. John Jacob;male;47;1;0;PC 17757;227                             ,525;C62 C64;C;;124;New York,NY
+1;1;Astor                                                                             ,Mrs. John Jacob (Madeleine Talmadge Force);female;18;1;0;PC 17757;227,525;C62 C64;C;4;;New York  ,NY
+1;1;Aubart                                                                            ,Mme. Leontine Pauline;female;24;0;0;PC 17477;69                      ,3;B35;C;9;;Paris           ,France
+1;1;"Barber, Miss. Ellen ""Nellie""";female;26;0;0;19877;78,85;;S;6;;
+1;1;Barkworth, Mr. Algernon Henry Wilson;male;80;0;0;27042;30;A23;S;B;;Hessle, Yorks
+1;0;Baumann, Mr. John D;male;;0;0;PC 17318;25,925;;S;;;New York, NY
+1;0;Baxter, Mr. Quigg Edmond;male;24;0;1;PC 17558;247,5208;B58 B60;C;;;Montreal, PQ
+1;1;Baxter, Mrs. James (Helene DeLaudeniere Chaput);female;50;0;1;PC 17558;247,5208;B58 B60;C;6;;Montreal, PQ
+1;1;Bazzani, Miss. Albina;female;32;0;0;11813;76,2917;D15;C;8;;
+1;0;Beattie, Mr. Thomson;male;36;0;0;13050;75,2417;C6;C;A;;Winnipeg, MN
+1;1;Beckwith, Mr. Richard Leonard;male;37;1;1;11751;52,5542;D35;S;5;;New York, NY
+1;1;Beckwith, Mrs. Richard Leonard (Sallie Monypeny);female;47;1;1;11751;52,5542;D35;S;5;;New York, NY
+1;1;Behr, Mr. Karl Howell;male;26;0;0;111369;30;C148;C;5;;New York, NY
+1;1;Bidois, Miss. Rosalie;female;42;0;0;PC 17757;227,525;;C;4;;
+1;1;Bird, Miss. Ellen;female;29;0;0;PC 17483;221,7792;C97;S;8;;
+1;0;Birnbaum, Mr. Jakob;male;25;0;0;13905;26;;C;;148;San Francisco, CA
+1;1;Bishop, Mr. Dickinson H;male;25;1;0;11967;91,0792;B49;C;7;;Dowagiac, MI
+1;1;Bishop, Mrs. Dickinson H (Helen Walton);female;19;1;0;11967;91,0792;B49;C;7;;Dowagiac, MI
+1;1;Bissette, Miss. Amelia;female;35;0;0;PC 17760;135,6333;C99;S;8;;
+1;1;Bjornstrom-Steffansson, Mr. Mauritz Hakan;male;28;0;0;110564;26,55;C52;S;D;;Stockholm, Sweden / Washington, DC
+1;0;Blackwell, Mr. Stephen Weart;male;45;0;0;113784;35,5;T;S;;;Trenton, NJ
+1;1;Blank, Mr. Henry;male;40;0;0;112277;31;A31;C;7;;Glen Ridge, NJ
+1;1;Bonnell, Miss. Caroline;female;30;0;0;36928;164,8667;C7;S;8;;Youngstown, OH
+1;1;Bonnell, Miss. Elizabeth;female;58;0;0;113783;26,55;C103;S;8;;Birkdale, England Cleveland, Ohio
+1;0;Borebank, Mr. John James;male;42;0;0;110489;26,55;D22;S;;;London / Winnipeg, MB
+1;1;Bowen, Miss. Grace Scott;female;45;0;0;PC 17608;262,375;;C;4;;Cooperstown, NY
+1;1;Bowerman, Miss. Elsie Edith;female;22;0;1;113505;55;E33;S;6;;St Leonards-on-Sea, England Ohio
+1;1;"Bradley, Mr. George (""George Arthur Brayton"")";male;;0;0;111427;26,55;;S;9;;Los Angeles, CA
+1;0;Brady, Mr. John Bertram;male;41;0;0;113054;30,5;A21;S;;;Pomeroy, WA
+1;0;Brandeis, Mr. Emil;male;48;0;0;PC 17591;50,4958;B10;C;;208;Omaha, NE
+1;0;Brewe, Dr. Arthur Jackson;male;;0;0;112379;39,6;;C;;;Philadelphia, PA
+1;1;Brown, Mrs. James Joseph (Margaret Tobin);female;44;0;0;PC 17610;27,7208;B4;C;6;;Denver, CO
+1;1;Brown, Mrs. John Murray (Caroline Lane Lamson);female;59;2;0;11769;51,4792;C101;S;D;;Belmont, MA
+1;1;Bucknell, Mrs. William Robert (Emma Eliza Ward);female;60;0;0;11813;76,2917;D15;C;8;;Philadelphia, PA
+1;1;Burns, Miss. Elizabeth Margaret;female;41;0;0;16966;134,5;E40;C;3;;
+1;0;Butt, Major. Archibald Willingham;male;45;0;0;113050;26,55;B38;S;;;Washington, DC
+1;0;Cairns, Mr. Alexander;male;;0;0;113798;31;;S;;;
+1;1;Calderhead, Mr. Edward Pennington;male;42;0;0;PC 17476;26,2875;E24;S;5;;New York, NY
+1;1;Candee, Mrs. Edward (Helen Churchill Hungerford);female;53;0;0;PC 17606;27,4458;;C;6;;Washington, DC
+1;1;Cardeza, Mr. Thomas Drake Martinez;male;36;0;1;PC 17755;512,3292;B51 B53 B55;C;3;;Austria-Hungary / Germantown, Philadelphia, PA
+1;1;Cardeza, Mrs. James Warburton Martinez (Charlotte Wardle Drake);female;58;0;1;PC 17755;512,3292;B51 B53 B55;C;3;;Germantown, Philadelphia, PA
+1;0;Carlsson, Mr. Frans Olof;male;33;0;0;695;5;B51 B53 B55;S;;;New York, NY
+1;0;Carrau, Mr. Francisco M;male;28;0;0;113059;47,1;;S;;;Montevideo, Uruguay
+1;0;Carrau, Mr. Jose Pedro;male;17;0;0;113059;47,1;;S;;;Montevideo, Uruguay
+1;1;Carter, Master. William Thornton II;male;11;1;2;113760;120;B96 B98;S;4;;Bryn Mawr, PA
+1;1;Carter, Miss. Lucile Polk;female;14;1;2;113760;120;B96 B98;S;4;;Bryn Mawr, PA
+1;1;Carter, Mr. William Ernest;male;36;1;2;113760;120;B96 B98;S;C;;Bryn Mawr, PA
+1;1;Carter, Mrs. William Ernest (Lucile Polk);female;36;1;2;113760;120;B96 B98;S;4;;Bryn Mawr, PA
+1;0;Case, Mr. Howard Brown;male;49;0;0;19924;26;;S;;;Ascot, Berkshire / Rochester, NY
+1;1;Cassebeer, Mrs. Henry Arthur Jr (Eleanor Genevieve Fosdick);female;;0;0;17770;27,7208;;C;5;;New York, NY
+1;0;Cavendish, Mr. Tyrell William;male;36;1;0;19877;78,85;C46;S;;172;Little Onn Hall, Staffs
+1;1;Cavendish, Mrs. Tyrell William (Julia Florence Siegel);female;76;1;0;19877;78,85;C46;S;6;;Little Onn Hall, Staffs
+1;0;Chaffee, Mr. Herbert Fuller;male;46;1;0;W.E.P. 5734;61,175;E31;S;;;Amenia, ND
+1;1;Chaffee, Mrs. Herbert Fuller (Carrie Constance Toogood);female;47;1;0;W.E.P. 5734;61,175;E31;S;4;;Amenia, ND
+1;1;Chambers, Mr. Norman Campbell;male;27;1;0;113806;53,1;E8;S;5;;New York, NY / Ithaca, NY
+1;1;Chambers, Mrs. Norman Campbell (Bertha Griggs);female;33;1;0;113806;53,1;E8;S;5;;New York, NY / Ithaca, NY
+1;1;Chaudanson, Miss. Victorine;female;36;0;0;PC 17608;262,375;B61;C;4;;
+1;1;Cherry, Miss. Gladys;female;30;0;0;110152;86,5;B77;S;8;;London, England
+1;1;Chevre, Mr. Paul Romaine;male;45;0;0;PC 17594;29,7;A9;C;7;;Paris, France
+1;1;Chibnall, Mrs. (Edith Martha Bowerman);female;;0;1;113505;55;E33;S;6;;St Leonards-on-Sea, England Ohio
+1;0;Chisholm, Mr. Roderick Robert Crispin;male;;0;0;112051;0;;S;;;Liverpool, England / Belfast
+1;0;Clark, Mr. Walter Miller;male;27;1;0;13508;136,7792;C89;C;;;Los Angeles, CA
+1;1;Clark, Mrs. Walter Miller (Virginia McDowell);female;26;1;0;13508;136,7792;C89;C;4;;Los Angeles, CA
+1;1;Cleaver, Miss. Alice;female;22;0;0;113781;151,55;;S;11;;
+1;0;Clifford, Mr. George Quincy;male;;0;0;110465;52;A14;S;;;Stoughton, MA
+1;0;Colley, Mr. Edward Pomeroy;male;47;0;0;5727;25,5875;E58;S;;;Victoria, BC
+1;1;Compton, Miss. Sara Rebecca;female;39;1;1;PC 17756;83,1583;E49;C;14;;Lakewood, NJ
+1;0;Compton, Mr. Alexander Taylor Jr;male;37;1;1;PC 17756;83,1583;E52;C;;;Lakewood, NJ
+1;1;Compton, Mrs. Alexander Taylor (Mary Eliza Ingersoll);female;64;0;2;PC 17756;83,1583;E45;C;14;;Lakewood, NJ
+1;1;Cornell, Mrs. Robert Clifford (Malvina Helen Lamson);female;55;2;0;11770;25,7;C101;S;2;;New York, NY
+1;0;Crafton, Mr. John Bertram;male;;0;0;113791;26,55;;S;;;Roachdale, IN
+1;0;Crosby, Capt. Edward Gifford;male;70;1;1;WE/P 5735;71;B22;S;;269;Milwaukee, WI
+1;1;Crosby, Miss. Harriet R;female;36;0;2;WE/P 5735;71;B22;S;7;;Milwaukee, WI
+1;1;Crosby, Mrs. Edward Gifford (Catherine Elizabeth Halstead);female;64;1;1;112901;26,55;B26;S;7;;Milwaukee, WI
+1;0;Cumings, Mr. John Bradley;male;39;1;0;PC 17599;71,2833;C85;C;;;New York, NY
+1;1;Cumings, Mrs. John Bradley (Florence Briggs Thayer);female;38;1;0;PC 17599;71,2833;C85;C;4;;New York, NY
+1;1;Daly, Mr. Peter Denis ;male;51;0;0;113055;26,55;E17;S;5 9;;Lima, Peru
+1;1;Daniel, Mr. Robert Williams;male;27;0;0;113804;30,5;;S;3;;Philadelphia, PA
+1;1;Daniels, Miss. Sarah;female;33;0;0;113781;151,55;;S;8;;
+1;0;Davidson, Mr. Thornton;male;31;1;0;F.C. 12750;52;B71;S;;;Montreal, PQ
+1;1;Davidson, Mrs. Thornton (Orian Hays);female;27;1;2;F.C. 12750;52;B71;S;3;;Montreal, PQ
+1;1;Dick, Mr. Albert Adrian;male;31;1;0;17474;57;B20;S;3;;Calgary, AB
+1;1;Dick, Mrs. Albert Adrian (Vera Gillespie);female;17;1;0;17474;57;B20;S;3;;Calgary, AB
+1;1;Dodge, Dr. Washington;male;53;1;1;33638;81,8583;A34;S;13;;San Francisco, CA
+1;1;Dodge, Master. Washington;male;4;0;2;33638;81,8583;A34;S;5;;San Francisco, CA
+1;1;Dodge, Mrs. Washington (Ruth Vidaver);female;54;1;1;33638;81,8583;A34;S;5;;San Francisco, CA
+1;0;Douglas, Mr. Walter Donald;male;50;1;0;PC 17761;106,425;C86;C;;62;Deephaven, MN / Cedar Rapids, IA
+1;1;Douglas, Mrs. Frederick Charles (Mary Helene Baxter);female;27;1;1;PC 17558;247,5208;B58 B60;C;6;;Montreal, PQ
+1;1;Douglas, Mrs. Walter Donald (Mahala Dutton);female;48;1;0;PC 17761;106,425;C86;C;2;;Deephaven, MN / Cedar Rapids, IA
+1;1;"Duff Gordon, Lady. (Lucille Christiana Sutherland) (""Mrs Morgan"")";female;48;1;0;11755;39,6;A16;C;1;;London / Paris
+1;1;"Duff Gordon, Sir. Cosmo Edmund (""Mr Morgan"")";male;49;1;0;PC 17485;56,9292;A20;C;1;;London / Paris
+1;0;Dulles, Mr. William Crothers;male;39;0;0;PC 17580;29,7;A18;C;;133;Philadelphia, PA
+1;1;Earnshaw, Mrs. Boulton (Olive Potter);female;23;0;1;11767;83,1583;C54;C;7;;Mt Airy, Philadelphia, PA
+1;1;Endres, Miss. Caroline Louise;female;38;0;0;PC 17757;227,525;C45;C;4;;New York, NY
+1;1;Eustis, Miss. Elizabeth Mussey;female;54;1;0;36947;78,2667;D20;C;4;;Brookline, MA
+1;0;Evans, Miss. Edith Corse;female;36;0;0;PC 17531;31,6792;A29;C;;;New York, NY
+1;0;Farthing, Mr. John;male;;0;0;PC 17483;221,7792;C95;S;;;
+1;1;Flegenheim, Mrs. Alfred (Antoinette);female;;0;0;PC 17598;31,6833;;S;7;;New York, NY
+1;1;Fleming, Miss. Margaret;female;;0;0;17421;110,8833;;C;4;;
+1;1;"Flynn, Mr. John Irwin (""Irving"")";male;36;0;0;PC 17474;26,3875;E25;S;5;;Brooklyn, NY
+1;0;Foreman, Mr. Benjamin Laventall;male;30;0;0;113051;27,75;C111;C;;;New York, NY
+1;1;Fortune, Miss. Alice Elizabeth;female;24;3;2;19950;263;C23 C25 C27;S;10;;Winnipeg, MB
+1;1;Fortune, Miss. Ethel Flora;female;28;3;2;19950;263;C23 C25 C27;S;10;;Winnipeg, MB
+1;1;Fortune, Miss. Mabel Helen;female;23;3;2;19950;263;C23 C25 C27;S;10;;Winnipeg, MB
+1;0;Fortune, Mr. Charles Alexander;male;19;3;2;19950;263;C23 C25 C27;S;;;Winnipeg, MB
+1;0;Fortune, Mr. Mark;male;64;1;4;19950;263;C23 C25 C27;S;;;Winnipeg, MB
+1;1;Fortune, Mrs. Mark (Mary McDougald);female;60;1;4;19950;263;C23 C25 C27;S;10;;Winnipeg, MB
+1;1;Francatelli, Miss. Laura Mabel;female;30;0;0;PC 17485;56,9292;E36;C;1;;
+1;0;Franklin, Mr. Thomas Parham;male;;0;0;113778;26,55;D34;S;;;Westcliff-on-Sea, Essex
+1;1;Frauenthal, Dr. Henry William;male;50;2;0;PC 17611;133,65;;S;5;;New York, NY
+1;1;Frauenthal, Mr. Isaac Gerald;male;43;1;0;17765;27,7208;D40;C;5;;New York, NY
+1;1;Frauenthal, Mrs. Henry William (Clara Heinsheimer);female;;1;0;PC 17611;133,65;;S;5;;New York, NY
+1;1;Frolicher, Miss. Hedwig Margaritha;female;22;0;2;13568;49,5;B39;C;5;;Zurich, Switzerland
+1;1;Frolicher-Stehli, Mr. Maxmillian;male;60;1;1;13567;79,2;B41;C;5;;Zurich, Switzerland
+1;1;Frolicher-Stehli, Mrs. Maxmillian (Margaretha Emerentia Stehli);female;48;1;1;13567;79,2;B41;C;5;;Zurich, Switzerland
+1;0;Fry, Mr. Richard;male;;0;0;112058;0;B102;S;;;
+1;0;Futrelle, Mr. Jacques Heath;male;37;1;0;113803;53,1;C123;S;;;Scituate, MA
+1;1;Futrelle, Mrs. Jacques Heath (Lily May Peel);female;35;1;0;113803;53,1;C123;S;D;;Scituate, MA
+1;0;Gee, Mr. Arthur H;male;47;0;0;111320;38,5;E63;S;;275;St Anne's-on-Sea, Lancashire
+1;1;Geiger, Miss. Amalie;female;35;0;0;113503;211,5;C130;C;4;;
+1;1;Gibson, Miss. Dorothy Winifred;female;22;0;1;112378;59,4;;C;7;;New York, NY
+1;1;Gibson, Mrs. Leonard (Pauline C Boeson);female;45;0;1;112378;59,4;;C;7;;New York, NY
+1;0;Giglio, Mr. Victor;male;24;0;0;PC 17593;79,2;B86;C;;;
+1;1;Goldenberg, Mr. Samuel L;male;49;1;0;17453;89,1042;C92;C;5;;Paris, France / New York, NY
+1;1;Goldenberg, Mrs. Samuel L (Edwiga Grabowska);female;;1;0;17453;89,1042;C92;C;5;;Paris, France / New York, NY
+1;0;Goldschmidt, Mr. George B;male;71;0;0;PC 17754;34,6542;A5;C;;;New York, NY
+1;1;Gracie, Col. Archibald IV;male;53;0;0;113780;28,5;C51;C;B;;Washington, DC
+1;1;Graham, Miss. Margaret Edith;female;19;0;0;112053;30;B42;S;3;;Greenwich, CT
+1;0;Graham, Mr. George Edward;male;38;0;1;PC 17582;153,4625;C91;S;;147;Winnipeg, MB
+1;1;Graham, Mrs. William Thompson (Edith Junkins);female;58;0;1;PC 17582;153,4625;C125;S;3;;Greenwich, CT
+1;1;Greenfield, Mr. William Bertram;male;23;0;1;PC 17759;63,3583;D10 D12;C;7;;New York, NY
+1;1;Greenfield, Mrs. Leo David (Blanche Strouse);female;45;0;1;PC 17759;63,3583;D10 D12;C;7;;New York, NY
+1;0;Guggenheim, Mr. Benjamin;male;46;0;0;PC 17593;79,2;B82 B84;C;;;New York, NY
+1;1;Harder, Mr. George Achilles;male;25;1;0;11765;55,4417;E50;C;5;;Brooklyn, NY
+1;1;Harder, Mrs. George Achilles (Dorothy Annan);female;25;1;0;11765;55,4417;E50;C;5;;Brooklyn, NY
+1;1;Harper, Mr. Henry Sleeper;male;48;1;0;PC 17572;76,7292;D33;C;3;;New York, NY
+1;1;Harper, Mrs. Henry Sleeper (Myna Haxtun);female;49;1;0;PC 17572;76,7292;D33;C;3;;New York, NY
+1;0;Harrington, Mr. Charles H;male;;0;0;113796;42,4;;S;;;
+1;0;Harris, Mr. Henry Birkhardt;male;45;1;0;36973;83,475;C83;S;;;New York, NY
+1;1;Harris, Mrs. Henry Birkhardt (Irene Wallach);female;35;1;0;36973;83,475;C83;S;D;;New York, NY
+1;0;Harrison, Mr. William;male;40;0;0;112059;0;B94;S;;110;
+1;1;Hassab, Mr. Hammad;male;27;0;0;PC 17572;76,7292;D49;C;3;;
+1;1;Hawksford, Mr. Walter James;male;;0;0;16988;30;D45;S;3;;Kingston, Surrey
+1;1;Hays, Miss. Margaret Bechstein;female;24;0;0;11767;83,1583;C54;C;7;;New York, NY
+1;0;Hays, Mr. Charles Melville;male;55;1;1;12749;93,5;B69;S;;307;Montreal, PQ
+1;1;Hays, Mrs. Charles Melville (Clara Jennings Gregg);female;52;1;1;12749;93,5;B69;S;3;;Montreal, PQ
+1;0;Head, Mr. Christopher;male;42;0;0;113038;42,5;B11;S;;;London / Middlesex
+1;0;Hilliard, Mr. Herbert Henry;male;;0;0;17463;51,8625;E46;S;;;Brighton, MA
+1;0;Hipkins, Mr. William Edward;male;55;0;0;680;50;C39;S;;;London / Birmingham
+1;1;Hippach, Miss. Jean Gertrude;female;16;0;1;111361;57,9792;B18;C;4;;Chicago, IL
+1;1;Hippach, Mrs. Louis Albert (Ida Sophia Fischer);female;44;0;1;111361;57,9792;B18;C;4;;Chicago, IL
+1;1;Hogeboom, Mrs. John C (Anna Andrews);female;51;1;0;13502;77,9583;D11;S;10;;Hudson, NY
+1;0;Holverson, Mr. Alexander Oskar;male;42;1;0;113789;52;;S;;38;New York, NY
+1;1;Holverson, Mrs. Alexander Oskar (Mary Aline Towner);female;35;1;0;113789;52;;S;8;;New York, NY
+1;1;"Homer, Mr. Harry (""Mr E Haven"")";male;35;0;0;111426;26,55;;C;15;;Indianapolis, IN
+1;1;Hoyt, Mr. Frederick Maxfield;male;38;1;0;19943;90;C93;S;D;;New York, NY /  Stamford CT
+1;0;Hoyt, Mr. William Fisher;male;;0;0;PC 17600;30,6958;;C;14;;New York, NY
+1;1;Hoyt, Mrs. Frederick Maxfield (Jane Anne Forby);female;35;1;0;19943;90;C93;S;D;;New York, NY /  Stamford CT
+1;1;Icard, Miss. Amelie;female;38;0;0;113572;80;B28;;6;;
+1;0;Isham, Miss. Ann Elizabeth;female;50;0;0;PC 17595;28,7125;C49;C;;;Paris, France New York, NY
+1;1;Ismay, Mr. Joseph Bruce;male;49;0;0;112058;0;B52 B54 B56;S;C;;Liverpool
+1;0;Jones, Mr. Charles Cresson;male;46;0;0;694;26;;S;;80;Bennington, VT
+1;0;Julian, Mr. Henry Forbes;male;50;0;0;113044;26;E60;S;;;London
+1;0;Keeping, Mr. Edwin;male;32,5;0;0;113503;211,5;C132;C;;45;
+1;0;Kent, Mr. Edward Austin;male;58;0;0;11771;29,7;B37;C;;258;Buffalo, NY
+1;0;Kenyon, Mr. Frederick R;male;41;1;0;17464;51,8625;D21;S;;;Southington / Noank, CT
+1;1;Kenyon, Mrs. Frederick R (Marion);female;;1;0;17464;51,8625;D21;S;8;;Southington / Noank, CT
+1;1;Kimball, Mr. Edwin Nelson Jr;male;42;1;0;11753;52,5542;D19;S;5;;Boston, MA
+1;1;Kimball, Mrs. Edwin Nelson Jr (Gertrude Parsons);female;45;1;0;11753;52,5542;D19;S;5;;Boston, MA
+1;0;Klaber, Mr. Herman;male;;0;0;113028;26,55;C124;S;;;Portland, OR
+1;1;Kreuchen, Miss. Emilie;female;39;0;0;24160;211,3375;;S;2;;
+1;1;Leader, Dr. Alice (Farnham);female;49;0;0;17465;25,9292;D17;S;8;;New York, NY
+1;1;LeRoy, Miss. Bertha;female;30;0;0;PC 17761;106,425;;C;2;;
+1;1;Lesurer, Mr. Gustave J;male;35;0;0;PC 17755;512,3292;B101;C;3;;
+1;0;Lewy, Mr. Ervin G;male;;0;0;PC 17612;27,7208;;C;;;Chicago, IL
+1;0;"Lindeberg-Lind, Mr. Erik Gustaf (""Mr Edward Lingrey"")";male;42;0;0;17475;26,55;;S;;;Stockholm, Sweden
+1;1;Lindstrom, Mrs. Carl Johan (Sigrid Posse);female;55;0;0;112377;27,7208;;C;6;;Stockholm, Sweden
+1;1;Lines, Miss. Mary Conover;female;16;0;1;PC 17592;39,4;D28;S;9;;Paris, France
+1;1;Lines, Mrs. Ernest H (Elizabeth Lindsey James);female;51;0;1;PC 17592;39,4;D28;S;9;;Paris, France
+1;0;Long, Mr. Milton Clyde;male;29;0;0;113501;30;D6;S;;126;Springfield, MA
+1;1;Longley, Miss. Gretchen Fiske;female;21;0;0;13502;77,9583;D9;S;10;;Hudson, NY
+1;0;Loring, Mr. Joseph Holland;male;30;0;0;113801;45,5;;S;;;London / New York, NY
+1;1;Lurette, Miss. Elise;female;58;0;0;PC 17569;146,5208;B80;C;;;
+1;1;Madill, Miss. Georgette Alexandra;female;15;0;1;24160;211,3375;B5;S;2;;St Louis, MO
+1;0;Maguire, Mr. John Edward;male;30;0;0;110469;26;C106;S;;;Brockton, MA
+1;1;Maioni, Miss. Roberta;female;16;0;0;110152;86,5;B79;S;8;;
+1;1;Marechal, Mr. Pierre;male;;0;0;11774;29,7;C47;C;7;;Paris, France
+1;0;Marvin, Mr. Daniel Warner;male;19;1;0;113773;53,1;D30;S;;;New York, NY
+1;1;Marvin, Mrs. Daniel Warner (Mary Graham Carmichael Farquarson);female;18;1;0;113773;53,1;D30;S;10;;New York, NY
+1;1;"Mayne, Mlle. Berthe Antonine (""Mrs de Villiers"")";female;24;0;0;PC 17482;49,5042;C90;C;6;;Belgium  Montreal, PQ
+1;0;McCaffry, Mr. Thomas Francis;male;46;0;0;13050;75,2417;C6;C;;292;Vancouver, BC
+1;0;McCarthy, Mr. Timothy J;male;54;0;0;17463;51,8625;E46;S;;175;Dorchester, MA
+1;1;McGough, Mr. James Robert;male;36;0;0;PC 17473;26,2875;E25;S;7;;Philadelphia, PA
+1;0;Meyer, Mr. Edgar Joseph;male;28;1;0;PC 17604;82,1708;;C;;;New York, NY
+1;1;Meyer, Mrs. Edgar Joseph (Leila Saks);female;;1;0;PC 17604;82,1708;;C;6;;New York, NY
+1;0;Millet, Mr. Francis Davis;male;65;0;0;13509;26,55;E38;S;;249;East Bridgewater, MA
+1;0;Minahan, Dr. William Edward;male;44;2;0;19928;90;C78;Q;;230;Fond du Lac, WI
+1;1;Minahan, Miss. Daisy E;female;33;1;0;19928;90;C78;Q;14;;Green Bay, WI
+1;1;Minahan, Mrs. William Edward (Lillian E Thorpe);female;37;1;0;19928;90;C78;Q;14;;Fond du Lac, WI
+1;1;Mock, Mr. Philipp Edmund;male;30;1;0;13236;57,75;C78;C;11;;New York, NY
+1;0;Molson, Mr. Harry Markland;male;55;0;0;113787;30,5;C30;S;;;Montreal, PQ
+1;0;Moore, Mr. Clarence Bloomfield;male;47;0;0;113796;42,4;;S;;;Washington, DC
+1;0;Natsch, Mr. Charles H;male;37;0;1;PC 17596;29,7;C118;C;;;Brooklyn, NY
+1;1;Newell, Miss. Madeleine;female;31;1;0;35273;113,275;D36;C;6;;Lexington, MA
+1;1;Newell, Miss. Marjorie;female;23;1;0;35273;113,275;D36;C;6;;Lexington, MA
+1;0;Newell, Mr. Arthur Webster;male;58;0;2;35273;113,275;D48;C;;122;Lexington, MA
+1;1;Newsom, Miss. Helen Monypeny;female;19;0;2;11752;26,2833;D47;S;5;;New York, NY
+1;0;Nicholson, Mr. Arthur Ernest;male;64;0;0;693;26;;S;;263;Isle of Wight, England
+1;1;Oliva y Ocana, Dona. Fermina;female;39;0;0;PC 17758;108,9;C105;C;8;;
+1;1;Omont, Mr. Alfred Fernand;male;;0;0;F.C. 12998;25,7417;;C;7;;Paris, France
+1;1;Ostby, Miss. Helene Ragnhild;female;22;0;1;113509;61,9792;B36;C;5;;Providence, RI
+1;0;Ostby, Mr. Engelhart Cornelius;male;65;0;1;113509;61,9792;B30;C;;234;Providence, RI
+1;0;Ovies y Rodriguez, Mr. Servando;male;28,5;0;0;PC 17562;27,7208;D43;C;;189;?Havana, Cuba
+1;0;Parr, Mr. William Henry Marsh;male;;0;0;112052;0;;S;;;Belfast
+1;0;Partner, Mr. Austen;male;45,5;0;0;113043;28,5;C124;S;;166;Surbiton Hill, Surrey
+1;0;Payne, Mr. Vivian Ponsonby;male;23;0;0;12749;93,5;B24;S;;;Montreal, PQ
+1;0;Pears, Mr. Thomas Clinton;male;29;1;0;113776;66,6;C2;S;;;Isleworth, England
+1;1;Pears, Mrs. Thomas (Edith Wearne);female;22;1;0;113776;66,6;C2;S;8;;Isleworth, England
+1;0;Penasco y Castellana, Mr. Victor de Satode;male;18;1;0;PC 17758;108,9;C65;C;;;Madrid, Spain
+1;1;Penasco y Castellana, Mrs. Victor de Satode (Maria Josefa Perez de Soto y Vallejo);female;17;1;0;PC 17758;108,9;C65;C;8;;Madrid, Spain
+1;1;Perreault, Miss. Anne;female;30;0;0;12749;93,5;B73;S;3;;
+1;1;Peuchen, Major. Arthur Godfrey;male;52;0;0;113786;30,5;C104;S;6;;Toronto, ON
+1;0;Porter, Mr. Walter Chamberlain;male;47;0;0;110465;52;C110;S;;207;Worcester, MA
+1;1;Potter, Mrs. Thomas Jr (Lily Alexenia Wilson);female;56;0;1;11767;83,1583;C50;C;7;;Mt Airy, Philadelphia, PA
+1;0;Reuchlin, Jonkheer. John George;male;38;0;0;19972;0;;S;;;Rotterdam, Netherlands
+1;1;Rheims, Mr. George Alexander Lucien;male;;0;0;PC 17607;39,6;;S;A;;Paris /  New York, NY
+1;0;Ringhini, Mr. Sante;male;22;0;0;PC 17760;135,6333;;C;;232;
+1;0;Robbins, Mr. Victor;male;;0;0;PC 17757;227,525;;C;;;
+1;1;Robert, Mrs. Edward Scott (Elisabeth Walton McMillan);female;43;0;1;24160;211,3375;B3;S;2;;St Louis, MO
+1;0;Roebling, Mr. Washington Augustus II;male;31;0;0;PC 17590;50,4958;A24;S;;;Trenton, NJ
+1;1;"Romaine, Mr. Charles Hallace (""Mr C Rolmane"")";male;45;0;0;111428;26,55;;S;9;;New York, NY
+1;0;Rood, Mr. Hugh Roscoe;male;;0;0;113767;50;A32;S;;;Seattle, WA
+1;1;Rosenbaum, Miss. Edith Louise;female;33;0;0;PC 17613;27,7208;A11;C;11;;Paris, France
+1;0;"Rosenshine, Mr. George (""Mr George Thorne"")";male;46;0;0;PC 17585;79,2;;C;;16;New York, NY
+1;0;Ross, Mr. John Hugo;male;36;0;0;13049;40,125;A10;C;;;Winnipeg, MB
+1;1;Rothes, the Countess. of (Lucy Noel Martha Dyer-Edwards);female;33;0;0;110152;86,5;B77;S;8;;London  Vancouver, BC
+1;0;Rothschild, Mr. Martin;male;55;1;0;PC 17603;59,4;;C;;;New York, NY
+1;1;Rothschild, Mrs. Martin (Elizabeth L. Barrett);female;54;1;0;PC 17603;59,4;;C;6;;New York, NY
+1;0;Rowe, Mr. Alfred G;male;33;0;0;113790;26,55;;S;;109;London
+1;1;Ryerson, Master. John Borie;male;13;2;2;PC 17608;262,375;B57 B59 B63 B66;C;4;;Haverford, PA / Cooperstown, NY
+1;1;Ryerson, Miss. Emily Borie;female;18;2;2;PC 17608;262,375;B57 B59 B63 B66;C;4;;Haverford, PA / Cooperstown, NY
+1;1;"Ryerson, Miss. Susan Parker ""Suzette""";female;21;2;2;PC 17608;262,375;B57 B59 B63 B66;C;4;;Haverford, PA / Cooperstown, NY
+1;0;Ryerson, Mr. Arthur Larned;male;61;1;3;PC 17608;262,375;B57 B59 B63 B66;C;;;Haverford, PA / Cooperstown, NY
+1;1;Ryerson, Mrs. Arthur Larned (Emily Maria Borie);female;48;1;3;PC 17608;262,375;B57 B59 B63 B66;C;4;;Haverford, PA / Cooperstown, NY
+1;1;Saalfeld, Mr. Adolphe;male;;0;0;19988;30,5;C106;S;3;;Manchester, England
+1;1;Sagesser, Mlle. Emma;female;24;0;0;PC 17477;69,3;B35;C;9;;
+1;1;Salomon, Mr. Abraham L;male;;0;0;111163;26;;S;1;;New York, NY
+1;1;Schabert, Mrs. Paul (Emma Mock);female;35;1;0;13236;57,75;C28;C;11;;New York, NY
+1;1;Serepeca, Miss. Augusta;female;30;0;0;113798;31;;C;4;;
+1;1;Seward, Mr. Frederic Kimber;male;34;0;0;113794;26,55;;S;7;;New York, NY
+1;1;Shutes, Miss. Elizabeth W;female;40;0;0;PC 17582;153,4625;C125;S;3;;New York, NY / Greenwich CT
+1;1;Silverthorne, Mr. Spencer Victor;male;35;0;0;PC 17475;26,2875;E24;S;5;;St Louis, MO
+1;0;Silvey, Mr. William Baird;male;50;1;0;13507;55,9;E44;S;;;Duluth, MN
+1;1;Silvey, Mrs. William Baird (Alice Munger);female;39;1;0;13507;55,9;E44;S;11;;Duluth, MN
+1;1;Simonius-Blumer, Col. Oberst Alfons;male;56;0;0;13213;35,5;A26;C;3;;Basel, Switzerland
+1;1;Sloper, Mr. William Thompson;male;28;0;0;113788;35,5;A6;S;7;;New Britain, CT
+1;0;Smart, Mr. John Montgomery;male;56;0;0;113792;26,55;;S;;;New York, NY
+1;0;Smith, Mr. James Clinch;male;56;0;0;17764;30,6958;A7;C;;;St James, Long Island, NY
+1;0;Smith, Mr. Lucien Philip;male;24;1;0;13695;60;C31;S;;;Huntington, WV
+1;0;Smith, Mr. Richard William;male;;0;0;113056;26;A19;S;;;Streatham, Surrey
+1;1;Smith, Mrs. Lucien Philip (Mary Eloise Hughes);female;18;1;0;13695;60;C31;S;6;;Huntington, WV
+1;1;Snyder, Mr. John Pillsbury;male;24;1;0;21228;82,2667;B45;S;7;;Minneapolis, MN
+1;1;Snyder, Mrs. John Pillsbury (Nelle Stevenson);female;23;1;0;21228;82,2667;B45;S;7;;Minneapolis, MN
+1;1;Spedden, Master. Robert Douglas;male;6;0;2;16966;134,5;E34;C;3;;Tuxedo Park, NY
+1;1;Spedden, Mr. Frederic Oakley;male;45;1;1;16966;134,5;E34;C;3;;Tuxedo Park, NY
+1;1;Spedden, Mrs. Frederic Oakley (Margaretta Corning Stone);female;40;1;1;16966;134,5;E34;C;3;;Tuxedo Park, NY
+1;0;Spencer, Mr. William Augustus;male;57;1;0;PC 17569;146,5208;B78;C;;;Paris, France
+1;1;Spencer, Mrs. William Augustus (Marie Eugenie);female;;1;0;PC 17569;146,5208;B78;C;6;;Paris, France
+1;1;Stahelin-Maeglin, Dr. Max;male;32;0;0;13214;30,5;B50;C;3;;Basel, Switzerland
+1;0;Stead, Mr. William Thomas;male;62;0;0;113514;26,55;C87;S;;;Wimbledon Park, London / Hayling Island, Hants
+1;1;Stengel, Mr. Charles Emil Henry;male;54;1;0;11778;55,4417;C116;C;1;;Newark, NJ
+1;1;Stengel, Mrs. Charles Emil Henry (Annie May Morris);female;43;1;0;11778;55,4417;C116;C;5;;Newark, NJ
+1;1;Stephenson, Mrs. Walter Bertram (Martha Eustis);female;52;1;0;36947;78,2667;D20;C;4;;Haverford, PA
+1;0;Stewart, Mr. Albert A;male;;0;0;PC 17605;27,7208;;C;;;Gallipolis, Ohio / ? Paris / New York
+1;1;Stone, Mrs. George Nelson (Martha Evelyn);female;62;0;0;113572;80;B28;;6;;Cincinatti, OH
+1;0;Straus, Mr. Isidor;male;67;1;0;PC 17483;221,7792;C55 C57;S;;96;New York, NY
+1;0;Straus, Mrs. Isidor (Rosalie Ida Blun);female;63;1;0;PC 17483;221,7792;C55 C57;S;;;New York, NY
+1;0;Sutton, Mr. Frederick;male;61;0;0;36963;32,3208;D50;S;;46;Haddenfield, NJ
+1;1;Swift, Mrs. Frederick Joel (Margaret Welles Barron);female;48;0;0;17466;25,9292;D17;S;8;;Brooklyn, NY
+1;1;Taussig, Miss. Ruth;female;18;0;2;110413;79,65;E68;S;8;;New York, NY
+1;0;Taussig, Mr. Emil;male;52;1;1;110413;79,65;E67;S;;;New York, NY
+1;1;Taussig, Mrs. Emil (Tillie Mandelbaum);female;39;1;1;110413;79,65;E67;S;8;;New York, NY
+1;1;Taylor, Mr. Elmer Zebley;male;48;1;0;19996;52;C126;S;5 7;;London /  East Orange, NJ
+1;1;Taylor, Mrs. Elmer Zebley (Juliet Cummins Wright);female;;1;0;19996;52;C126;S;5 7;;London /  East Orange, NJ
+1;0;Thayer, Mr. John Borland;male;49;1;1;17421;110,8833;C68;C;;;Haverford, PA
+1;1;Thayer, Mr. John Borland Jr;male;17;0;2;17421;110,8833;C70;C;B;;Haverford, PA
+1;1;Thayer, Mrs. John Borland (Marian Longstreth Morris);female;39;1;1;17421;110,8833;C68;C;4;;Haverford, PA
+1;1;Thorne, Mrs. Gertrude Maybelle;female;;0;0;PC 17585;79,2;;C;D;;New York, NY
+1;1;Tucker, Mr. Gilbert Milligan Jr;male;31;0;0;2543;28,5375;C53;C;7;;Albany, NY
+1;0;Uruchurtu, Don. Manuel E;male;40;0;0;PC 17601;27,7208;;C;;;Mexico City, Mexico
+1;0;Van der hoef, Mr. Wyckoff;male;61;0;0;111240;33,5;B19;S;;245;Brooklyn, NY
+1;0;Walker, Mr. William Anderson;male;47;0;0;36967;34,0208;D46;S;;;East Orange, NJ
+1;1;Ward, Miss. Anna;female;35;0;0;PC 17755;512,3292;;C;3;;
+1;0;Warren, Mr. Frank Manley;male;64;1;0;110813;75,25;D37;C;;;Portland, OR
+1;1;Warren, Mrs. Frank Manley (Anna Sophia Atkinson);female;60;1;0;110813;75,25;D37;C;5;;Portland, OR
+1;0;Weir, Col. John;male;60;0;0;113800;26,55;;S;;;England Salt Lake City, Utah
+1;0;White, Mr. Percival Wayland;male;54;0;1;35281;77,2875;D26;S;;;Brunswick, ME
+1;0;White, Mr. Richard Frasar;male;21;0;1;35281;77,2875;D26;S;;169;Brunswick, ME
+1;1;White, Mrs. John Stuart (Ella Holmes);female;55;0;0;PC 17760;135,6333;C32;C;8;;New York, NY / Briarcliff Manor NY
+1;1;Wick, Miss. Mary Natalie;female;31;0;2;36928;164,8667;C7;S;8;;Youngstown, OH
+1;0;Wick, Mr. George Dennick;male;57;1;1;36928;164,8667;;S;;;Youngstown, OH
+1;1;Wick, Mrs. George Dennick (Mary Hitchcock);female;45;1;1;36928;164,8667;;S;8;;Youngstown, OH
+1;0;Widener, Mr. George Dunton;male;50;1;1;113503;211,5;C80;C;;;Elkins Park, PA
+1;0;Widener, Mr. Harry Elkins;male;27;0;2;113503;211,5;C82;C;;;Elkins Park, PA
+1;1;Widener, Mrs. George Dunton (Eleanor Elkins);female;50;1;1;113503;211,5;C80;C;4;;Elkins Park, PA
+1;1;Willard, Miss. Constance;female;21;0;0;113795;26,55;;S;8 10;;Duluth, MN
+1;0;Williams, Mr. Charles Duane;male;51;0;1;PC 17597;61,3792;;C;;;Geneva, Switzerland / Radnor, PA
+1;1;Williams, Mr. Richard Norris II;male;21;0;1;PC 17597;61,3792;;C;A;;Geneva, Switzerland / Radnor, PA
+1;0;Williams-Lambert, Mr. Fletcher Fellows;male;;0;0;113510;35;C128;S;;;London, England
+1;1;Wilson, Miss. Helen Alice;female;31;0;0;16966;134,5;E39 E41;C;3;;
+1;1;Woolner, Mr. Hugh;male;;0;0;19947;35,5;C52;S;D;;London, England
+1;0;Wright, Mr. George;male;62;0;0;113807;26,55;;S;;;Halifax, NS
+1;1;Young, Miss. Marie Grice;female;36;0;0;PC 17760;135,6333;C32;C;8;;New York, NY / Washington, DC
+2;0;Abelson, Mr. Samuel;male;30;1;0;P/PP 3381;24;;C;;;Russia New York, NY
+2;1;Abelson, Mrs. Samuel (Hannah Wizosky);female;28;1;0;P/PP 3381;24;;C;10;;Russia New York, NY
+2;0;Aldworth, Mr. Charles Augustus;male;30;0;0;248744;13;;S;;;Bryn Mawr, PA, USA
+2;0;Andrew, Mr. Edgardo Samuel;male;18;0;0;231945;11,5;;S;;;Buenos Aires, Argentina / New Jersey, NJ
+2;0;Andrew, Mr. Frank Thomas;male;25;0;0;C.A. 34050;10,5;;S;;;Cornwall, England Houghton, MI
+2;0;Angle, Mr. William A;male;34;1;0;226875;26;;S;;;Warwick, England
+2;1;"Angle, Mrs. William A (Florence ""Mary"" Agnes Hughes)";female;36;1;0;226875;26;;S;11;;Warwick, England
+2;0;Ashby, Mr. John;male;57;0;0;244346;13;;S;;;West Hoboken, NJ
+2;0;Bailey, Mr. Percy Andrew;male;18;0;0;29108;11,5;;S;;;Penzance, Cornwall / Akron, OH
+2;0;Baimbrigge, Mr. Charles Robert;male;23;0;0;C.A. 31030;10,5;;S;;;Guernsey
+2;1;Ball, Mrs. (Ada E Hall);female;36;0;0;28551;13;D;S;10;;Bristol, Avon / Jacksonville, FL
+2;0;Banfield, Mr. Frederick James;male;28;0;0;C.A./SOTON 34068;10,5;;S;;;Plymouth, Dorset / Houghton, MI
+2;0;Bateman, Rev. Robert James;male;51;0;0;S.O.P. 1166;12,525;;S;;174;Jacksonville, FL
+2;1;Beane, Mr. Edward;male;32;1;0;2908;26;;S;13;;Norwich / New York, NY
+2;1;Beane, Mrs. Edward (Ethel Clarke);female;19;1;0;2908;26;;S;13;;Norwich / New York, NY
+2;0;Beauchamp, Mr. Henry James;male;28;0;0;244358;26;;S;;;England
+2;1;Becker, Master. Richard F;male;1;2;1;230136;39;F4;S;11;;Guntur, India / Benton Harbour, MI
+2;1;Becker, Miss. Marion Louise;female;4;2;1;230136;39;F4;S;11;;Guntur, India / Benton Harbour, MI
+2;1;Becker, Miss. Ruth Elizabeth;female;12;2;1;230136;39;F4;S;13;;Guntur, India / Benton Harbour, MI
+2;1;Becker, Mrs. Allen Oliver (Nellie E Baumgardner);female;36;0;3;230136;39;F4;S;11;;Guntur, India / Benton Harbour, MI
+2;1;Beesley, Mr. Lawrence;male;34;0;0;248698;13;D56;S;13;;London
+2;1;Bentham, Miss. Lilian W;female;19;0;0;28404;13;;S;12;;Rochester, NY
+2;0;Berriman, Mr. William John;male;23;0;0;28425;13;;S;;;St Ives, Cornwall / Calumet, MI
+2;0;Botsford, Mr. William Hull;male;26;0;0;237670;13;;S;;;Elmira, NY / Orange, NJ
+2;0;Bowenur, Mr. Solomon;male;42;0;0;211535;13;;S;;;London
+2;0;Bracken, Mr. James H;male;27;0;0;220367;13;;S;;;Lake Arthur, Chavez County, NM
+2;1;"Brown, Miss. Amelia ""Mildred""";female;24;0;0;248733;13;F33;S;11;;London / Montreal, PQ
+2;1;Brown, Miss. Edith Eileen;female;15;0;2;29750;39;;S;14;;Cape Town, South Africa / Seattle, WA
+2;0;Brown, Mr. Thomas William Solomon;male;60;1;1;29750;39;;S;;;Cape Town, South Africa / Seattle, WA
+2;1;Brown, Mrs. Thomas William Solomon (Elizabeth Catherine Ford);female;40;1;1;29750;39;;S;14;;Cape Town, South Africa / Seattle, WA
+2;1;Bryhl, Miss. Dagmar Jenny Ingeborg ;female;20;1;0;236853;26;;S;12;;Skara, Sweden / Rockford, IL
+2;0;Bryhl, Mr. Kurt Arnold Gottfrid;male;25;1;0;236853;26;;S;;;Skara, Sweden / Rockford, IL
+2;1;Buss, Miss. Kate;female;36;0;0;27849;13;;S;9;;Sittingbourne, England / San Diego, CA
+2;0;Butler, Mr. Reginald Fenton;male;25;0;0;234686;13;;S;;97;Southsea, Hants
+2;0;Byles, Rev. Thomas Roussel Davids;male;42;0;0;244310;13;;S;;;London
+2;1;Bystrom, Mrs. (Karolina);female;42;0;0;236852;13;;S;;;New York, NY
+2;1;Caldwell, Master. Alden Gates;male;0,8333;0;2;248738;29;;S;13;;Bangkok, Thailand / Roseville, IL
+2;1;Caldwell, Mr. Albert Francis;male;26;1;1;248738;29;;S;13;;Bangkok, Thailand / Roseville, IL
+2;1;Caldwell, Mrs. Albert Francis (Sylvia Mae Harbaugh);female;22;1;1;248738;29;;S;13;;Bangkok, Thailand / Roseville, IL
+2;1;Cameron, Miss. Clear Annie;female;35;0;0;F.C.C. 13528;21;;S;14;;Mamaroneck, NY
+2;0;Campbell, Mr. William;male;;0;0;239853;0;;S;;;Belfast
+2;0;Carbines, Mr. William;male;19;0;0;28424;13;;S;;18;St Ives, Cornwall / Calumet, MI
+2;0;Carter, Mrs. Ernest Courtenay (Lilian Hughes);female;44;1;0;244252;26;;S;;;London
+2;0;Carter, Rev. Ernest Courtenay;male;54;1;0;244252;26;;S;;;London
+2;0;Chapman, Mr. Charles Henry;male;52;0;0;248731;13,5;;S;;130;Bronx, NY
+2;0;Chapman, Mr. John Henry;male;37;1;0;SC/AH 29037;26;;S;;17;Cornwall / Spokane, WA
+2;0;Chapman, Mrs. John Henry (Sara Elizabeth Lawry);female;29;1;0;SC/AH 29037;26;;S;;;Cornwall / Spokane, WA
+2;1;Christy, Miss. Julie Rachel;female;25;1;1;237789;30;;S;12;;London
+2;1;Christy, Mrs. (Alice Frances);female;45;0;2;237789;30;;S;12;;London
+2;0;Clarke, Mr. Charles Valentine;male;29;1;0;2003;26;;S;;;England / San Francisco, CA
+2;1;Clarke, Mrs. Charles V (Ada Maria Winfield);female;28;1;0;2003;26;;S;14;;England / San Francisco, CA
+2;0;Coleridge, Mr. Reginald Charles;male;29;0;0;W./C. 14263;10,5;;S;;;Hartford, Huntingdonshire
+2;0;Collander, Mr. Erik Gustaf;male;28;0;0;248740;13;;S;;;Helsinki, Finland Ashtabula, Ohio
+2;1;Collett, Mr. Sidney C Stuart;male;24;0;0;28034;10,5;;S;9;;London / Fort Byron, NY
+2;1;"Collyer, Miss. Marjorie ""Lottie""";female;8;0;2;C.A. 31921;26,25;;S;14;;Bishopstoke, Hants / Fayette Valley, ID
+2;0;Collyer, Mr. Harvey;male;31;1;1;C.A. 31921;26,25;;S;;;Bishopstoke, Hants / Fayette Valley, ID
+2;1;Collyer, Mrs. Harvey (Charlotte Annie Tate);female;31;1;1;C.A. 31921;26,25;;S;14;;Bishopstoke, Hants / Fayette Valley, ID
+2;1;Cook, Mrs. (Selena Rogers);female;22;0;0;W./C. 14266;10,5;F33;S;14;;Pennsylvania
+2;0;Corbett, Mrs. Walter H (Irene Colvin);female;30;0;0;237249;13;;S;;;Provo, UT
+2;0;Corey, Mrs. Percy C (Mary Phyllis Elizabeth Miller);female;;0;0;F.C.C. 13534;21;;S;;;Upper Burma, India Pittsburgh, PA
+2;0;"Cotterill, Mr. Henry ""Harry""";male;21;0;0;29107;11,5;;S;;;Penzance, Cornwall / Akron, OH
+2;0;Cunningham, Mr. Alfred Fleming;male;;0;0;239853;0;;S;;;Belfast
+2;1;Davies, Master. John Morgan Jr;male;8;1;1;C.A. 33112;36,75;;S;14;;St Ives, Cornwall / Hancock, MI
+2;0;Davies, Mr. Charles Henry;male;18;0;0;S.O.C. 14879;73,5;;S;;;Lyndhurst, England
+2;1;Davies, Mrs. John Morgan (Elizabeth Agnes Mary White) ;female;48;0;2;C.A. 33112;36,75;;S;14;;St Ives, Cornwall / Hancock, MI
+2;1;Davis, Miss. Mary;female;28;0;0;237668;13;;S;13;;London / Staten Island, NY
+2;0;de Brito, Mr. Jose Joaquim;male;32;0;0;244360;13;;S;;;Portugal / Sau Paulo, Brazil
+2;0;Deacon, Mr. Percy William;male;17;0;0;S.O.C. 14879;73,5;;S;;;
+2;0;del Carlo, Mr. Sebastiano;male;29;1;0;SC/PARIS 2167;27,7208;;C;;295;Lucca, Italy / California
+2;1;del Carlo, Mrs. Sebastiano (Argenia Genovesi);female;24;1;0;SC/PARIS 2167;27,7208;;C;12;;Lucca, Italy / California
+2;0;Denbury, Mr. Herbert;male;25;0;0;C.A. 31029;31,5;;S;;;Guernsey / Elizabeth, NJ
+2;0;Dibden, Mr. William;male;18;0;0;S.O.C. 14879;73,5;;S;;;New Forest, England
+2;1;Doling, Miss. Elsie;female;18;0;1;231919;23;;S;;;Southampton
+2;1;Doling, Mrs. John T (Ada Julia Bone);female;34;0;1;231919;23;;S;;;Southampton
+2;0;Downton, Mr. William James;male;54;0;0;28403;26;;S;;;Holley, NY
+2;1;Drew, Master. Marshall Brines;male;8;0;2;28220;32,5;;S;10;;Greenport, NY
+2;0;Drew, Mr. James Vivian;male;42;1;1;28220;32,5;;S;;;Greenport, NY
+2;1;Drew, Mrs. James Vivian (Lulu Thorne Christian);female;34;1;1;28220;32,5;;S;10;;Greenport, NY
+2;1;Duran y More, Miss. Asuncion;female;27;1;0;SC/PARIS 2149;13,8583;;C;12;;Barcelona, Spain / Havana, Cuba
+2;1;Duran y More, Miss. Florentina;female;30;1;0;SC/PARIS 2148;13,8583;;C;12;;Barcelona, Spain / Havana, Cuba
+2;0;Eitemiller, Mr. George Floyd;male;23;0;0;29751;13;;S;;;England / Detroit, MI
+2;0;Enander, Mr. Ingvar;male;21;0;0;236854;13;;S;;;Goteborg, Sweden / Rockford, IL
+2;0;Fahlstrom, Mr. Arne Jonas;male;18;0;0;236171;13;;S;;;Oslo, Norway Bayonne, NJ
+2;0;Faunthorpe, Mr. Harry;male;40;1;0;2926;26;;S;;286;England / Philadelphia, PA
+2;1;Faunthorpe, Mrs. Lizzie (Elizabeth Anne Wilkinson);female;29;1;0;2926;26;;S;16;;
+2;0;Fillbrook, Mr. Joseph Charles;male;18;0;0;C.A. 15185;10,5;;S;;;Cornwall / Houghton, MI
+2;0;Fox, Mr. Stanley Hubert;male;36;0;0;229236;13;;S;;236;Rochester, NY
+2;0;"Frost, Mr. Anthony Wood ""Archie""";male;;0;0;239854;0;;S;;;Belfast
+2;0;Funk, Miss. Annie Clemmer;female;38;0;0;237671;13;;S;;;Janjgir, India / Pennsylvania
+2;0;Fynney, Mr. Joseph J;male;35;0;0;239865;26;;S;;322;Liverpool / Montreal, PQ
+2;0;Gale, Mr. Harry;male;38;1;0;28664;21;;S;;;Cornwall / Clear Creek, CO
+2;0;Gale, Mr. Shadrach;male;34;1;0;28664;21;;S;;;Cornwall / Clear Creek, CO
+2;1;Garside, Miss. Ethel;female;34;0;0;243880;13;;S;12;;Brooklyn, NY
+2;0;Gaskell, Mr. Alfred;male;16;0;0;239865;26;;S;;;Liverpool / Montreal, PQ
+2;0;Gavey, Mr. Lawrence;male;26;0;0;31028;10,5;;S;;;Guernsey / Elizabeth, NJ
+2;0;Gilbert, Mr. William;male;47;0;0;C.A. 30769;10,5;;S;;;Cornwall
+2;0;Giles, Mr. Edgar;male;21;1;0;28133;11,5;;S;;;Cornwall / Camden, NJ
+2;0;Giles, Mr. Frederick Edward;male;21;1;0;28134;11,5;;S;;;Cornwall / Camden, NJ
+2;0;Giles, Mr. Ralph;male;24;0;0;248726;13,5;;S;;297;West Kensington, London
+2;0;Gill, Mr. John William;male;24;0;0;233866;13;;S;;155;Clevedon, England
+2;0;Gillespie, Mr. William Henry;male;34;0;0;12233;13;;S;;;Vancouver, BC
+2;0;Givard, Mr. Hans Kristensen;male;30;0;0;250646;13;;S;;305;
+2;0;Greenberg, Mr. Samuel;male;52;0;0;250647;13;;S;;19;Bronx, NY
+2;0;Hale, Mr. Reginald;male;30;0;0;250653;13;;S;;75;Auburn, NY
+2;1;Hamalainen, Master. Viljo;male;0,6667;1;1;250649;14,5;;S;4;;Detroit, MI
+2;1;Hamalainen, Mrs. William (Anna);female;24;0;2;250649;14,5;;S;4;;Detroit, MI
+2;0;Harbeck, Mr. William H;male;44;0;0;248746;13;;S;;35;Seattle, WA / Toledo, OH
+2;1;"Harper, Miss. Annie Jessie ""Nina""";female;6;0;1;248727;33;;S;11;;Denmark Hill, Surrey / Chicago
+2;0;Harper, Rev. John;male;28;0;1;248727;33;;S;;;Denmark Hill, Surrey / Chicago
+2;1;Harris, Mr. George;male;62;0;0;S.W./PP 752;10,5;;S;15;;London
+2;0;Harris, Mr. Walter;male;30;0;0;W/C 14208;10,5;;S;;;Walthamstow, England
+2;1;Hart, Miss. Eva Miriam;female;7;0;2;F.C.C. 13529;26,25;;S;14;;Ilford, Essex / Winnipeg, MB
+2;0;Hart, Mr. Benjamin;male;43;1;1;F.C.C. 13529;26,25;;S;;;Ilford, Essex / Winnipeg, MB
+2;1;Hart, Mrs. Benjamin (Esther Ada Bloomfield);female;45;1;1;F.C.C. 13529;26,25;;S;14;;Ilford, Essex / Winnipeg, MB
+2;1;Herman, Miss. Alice;female;24;1;2;220845;65;;S;9;;Somerset / Bernardsville, NJ
+2;1;Herman, Miss. Kate;female;24;1;2;220845;65;;S;9;;Somerset / Bernardsville, NJ
+2;0;Herman, Mr. Samuel;male;49;1;2;220845;65;;S;;;Somerset / Bernardsville, NJ
+2;1;Herman, Mrs. Samuel (Jane Laver);female;48;1;2;220845;65;;S;9;;Somerset / Bernardsville, NJ
+2;1;Hewlett, Mrs. (Mary D Kingcome) ;female;55;0;0;248706;16;;S;13;;India / Rapid City, SD
+2;0;Hickman, Mr. Leonard Mark;male;24;2;0;S.O.C. 14879;73,5;;S;;;West Hampstead, London / Neepawa, MB
+2;0;Hickman, Mr. Lewis;male;32;2;0;S.O.C. 14879;73,5;;S;;256;West Hampstead, London / Neepawa, MB
+2;0;Hickman, Mr. Stanley George;male;21;2;0;S.O.C. 14879;73,5;;S;;;West Hampstead, London / Neepawa, MB
+2;0;Hiltunen, Miss. Marta;female;18;1;1;250650;13;;S;;;Kontiolahti, Finland / Detroit, MI
+2;1;"Hocking, Miss. Ellen ""Nellie""";female;20;2;1;29105;23;;S;4;;Cornwall / Akron, OH
+2;0;Hocking, Mr. Richard George;male;23;2;1;29104;11,5;;S;;;Cornwall / Akron, OH
+2;0;Hocking, Mr. Samuel James Metcalfe;male;36;0;0;242963;13;;S;;;Devonport, England
+2;1;Hocking, Mrs. Elizabeth (Eliza Needs);female;54;1;3;29105;23;;S;4;;Cornwall / Akron, OH
+2;0;Hodges, Mr. Henry Price;male;50;0;0;250643;13;;S;;149;Southampton
+2;0;Hold, Mr. Stephen;male;44;1;0;26707;26;;S;;;England / Sacramento, CA
+2;1;Hold, Mrs. Stephen (Annie Margaret Hill);female;29;1;0;26707;26;;S;10;;England / Sacramento, CA
+2;0;Hood, Mr. Ambrose Jr;male;21;0;0;S.O.C. 14879;73,5;;S;;;New Forest, England
+2;1;Hosono, Mr. Masabumi;male;42;0;0;237798;13;;S;10;;Tokyo, Japan
+2;0;Howard, Mr. Benjamin;male;63;1;0;24065;26;;S;;;Swindon, England
+2;0;Howard, Mrs. Benjamin (Ellen Truelove Arman);female;60;1;0;24065;26;;S;;;Swindon, England
+2;0;Hunt, Mr. George Henry;male;33;0;0;SCO/W 1585;12,275;;S;;;Philadelphia, PA
+2;1;Ilett, Miss. Bertha;female;17;0;0;SO/C 14885;10,5;;S;;;Guernsey
+2;0;Jacobsohn, Mr. Sidney Samuel;male;42;1;0;243847;27;;S;;;London
+2;1;Jacobsohn, Mrs. Sidney Samuel (Amy Frances Christy);female;24;2;1;243847;27;;S;12;;London
+2;0;Jarvis, Mr. John Denzil;male;47;0;0;237565;15;;S;;;North Evington, England
+2;0;Jefferys, Mr. Clifford Thomas;male;24;2;0;C.A. 31029;31,5;;S;;;Guernsey / Elizabeth, NJ
+2;0;Jefferys, Mr. Ernest Wilfred;male;22;2;0;C.A. 31029;31,5;;S;;;Guernsey / Elizabeth, NJ
+2;0;Jenkin, Mr. Stephen Curnow;male;32;0;0;C.A. 33111;10,5;;S;;;St Ives, Cornwall / Houghton, MI
+2;1;Jerwan, Mrs. Amin S (Marie Marthe Thuillard);female;23;0;0;SC/AH Basle 541;13,7917;D;C;11;;New York, NY
+2;0;Kantor, Mr. Sinai;male;34;1;0;244367;26;;S;;283;Moscow / Bronx, NY
+2;1;Kantor, Mrs. Sinai (Miriam Sternin);female;24;1;0;244367;26;;S;12;;Moscow / Bronx, NY
+2;0;Karnes, Mrs. J Frank (Claire Bennett);female;22;0;0;F.C.C. 13534;21;;S;;;India / Pittsburgh, PA
+2;1;Keane, Miss. Nora A;female;;0;0;226593;12,35;E101;Q;10;;Harrisburg, PA
+2;0;Keane, Mr. Daniel;male;35;0;0;233734;12,35;;Q;;;
+2;1;"Kelly, Mrs. Florence ""Fannie""";female;45;0;0;223596;13,5;;S;9;;London / New York, NY
+2;0;Kirkland, Rev. Charles Leonard;male;57;0;0;219533;12,35;;Q;;;Glasgow / Bangor, ME
+2;0;Knight, Mr. Robert J;male;;0;0;239855;0;;S;;;Belfast
+2;0;Kvillner, Mr. Johan Henrik Johannesson;male;31;0;0;C.A. 18723;10,5;;S;;165;Sweden / Arlington, NJ
+2;0;Lahtinen, Mrs. William (Anna Sylfven);female;26;1;1;250651;26;;S;;;Minneapolis, MN
+2;0;Lahtinen, Rev. William;male;30;1;1;250651;26;;S;;;Minneapolis, MN
+2;0;Lamb, Mr. John Joseph;male;;0;0;240261;10,7083;;Q;;;
+2;1;Laroche, Miss. Louise;female;1;1;2;SC/Paris 2123;41,5792;;C;14;;Paris / Haiti
+2;1;Laroche, Miss. Simonne Marie Anne Andree;female;3;1;2;SC/Paris 2123;41,5792;;C;14;;Paris / Haiti
+2;0;Laroche, Mr. Joseph Philippe Lemercier;male;25;1;2;SC/Paris 2123;41,5792;;C;;;Paris / Haiti
+2;1;Laroche, Mrs. Joseph (Juliette Marie Louise Lafargue);female;22;1;2;SC/Paris 2123;41,5792;;C;14;;Paris / Haiti
+2;1;Lehmann, Miss. Bertha;female;17;0;0;SC 1748;12;;C;12;;Berne, Switzerland / Central City, IA
+2;1;Leitch, Miss. Jessie Wills;female;;0;0;248727;33;;S;11;;London / Chicago, IL
+2;1;Lemore, Mrs. (Amelia Milley);female;34;0;0;C.A. 34260;10,5;F33;S;14;;Chicago, IL
+2;0;Levy, Mr. Rene Jacques;male;36;0;0;SC/Paris 2163;12,875;D;C;;;Montreal, PQ
+2;0;Leyson, Mr. Robert William Norman;male;24;0;0;C.A. 29566;10,5;;S;;108;
+2;0;Lingane, Mr. John;male;61;0;0;235509;12,35;;Q;;;
+2;0;Louch, Mr. Charles Alexander;male;50;1;0;SC/AH 3085;26;;S;;121;Weston-Super-Mare, Somerset
+2;1;Louch, Mrs. Charles Alexander (Alice Adelaide Slow);female;42;1;0;SC/AH 3085;26;;S;;;Weston-Super-Mare, Somerset
+2;0;Mack, Mrs. (Mary);female;57;0;0;S.O./P.P. 3;10,5;E77;S;;52;Southampton / New York, NY
+2;0;Malachard, Mr. Noel;male;;0;0;237735;15,0458;D;C;;;Paris
+2;1;Mallet, Master. Andre;male;1;0;2;S.C./PARIS 2079;37,0042;;C;10;;Paris / Montreal, PQ
+2;0;Mallet, Mr. Albert;male;31;1;1;S.C./PARIS 2079;37,0042;;C;;;Paris / Montreal, PQ
+2;1;Mallet, Mrs. Albert (Antoinette Magnin);female;24;1;1;S.C./PARIS 2079;37,0042;;C;10;;Paris / Montreal, PQ
+2;0;Mangiavacchi, Mr. Serafino Emilio;male;;0;0;SC/A.3 2861;15,5792;;C;;;New York, NY
+2;0;Matthews, Mr. William John;male;30;0;0;28228;13;;S;;;St Austall, Cornwall
+2;0;Maybery, Mr. Frank Hubert;male;40;0;0;239059;16;;S;;;Weston-Super-Mare / Moose Jaw, SK
+2;0;McCrae, Mr. Arthur Gordon;male;32;0;0;237216;13,5;;S;;209;Sydney, Australia
+2;0;McCrie, Mr. James Matthew;male;30;0;0;233478;13;;S;;;Sarnia, ON
+2;0;McKane, Mr. Peter David;male;46;0;0;28403;26;;S;;;Rochester, NY
+2;1;Mellinger, Miss. Madeleine Violet;female;13;0;1;250644;19,5;;S;14;;England / Bennington, VT
+2;1;Mellinger, Mrs. (Elizabeth Anne Maidment);female;41;0;1;250644;19,5;;S;14;;England / Bennington, VT
+2;1;Mellors, Mr. William John;male;19;0;0;SW/PP 751;10,5;;S;B;;Chelsea, London
+2;0;Meyer, Mr. August;male;39;0;0;248723;13;;S;;;Harrow-on-the-Hill, Middlesex
+2;0;Milling, Mr. Jacob Christian;male;48;0;0;234360;13;;S;;271;Copenhagen, Denmark
+2;0;Mitchell, Mr. Henry Michael;male;70;0;0;C.A. 24580;10,5;;S;;;Guernsey / Montclair, NJ and/or Toledo, Ohio
+2;0;Montvila, Rev. Juozas;male;27;0;0;211536;13;;S;;;Worcester, MA
+2;0;Moraweck, Dr. Ernest;male;54;0;0;29011;14;;S;;;Frankfort, KY
+2;0;"Morley, Mr. Henry Samuel (""Mr Henry Marshall"")";male;39;0;0;250655;26;;S;;;
+2;0;Mudd, Mr. Thomas Charles;male;16;0;0;S.O./P.P. 3;10,5;;S;;;Halesworth, England
+2;0;Myles, Mr. Thomas Francis;male;62;0;0;240276;9,6875;;Q;;;Cambridge, MA
+2;0;Nasser, Mr. Nicholas;male;32,5;1;0;237736;30,0708;;C;;43;New York, NY
+2;1;Nasser, Mrs. Nicholas (Adele Achem);female;14;1;0;237736;30,0708;;C;;;New York, NY
+2;1;Navratil, Master. Edmond Roger;male;2;1;1;230080;26;F2;S;D;;Nice, France
+2;1;Navratil, Master. Michel M;male;3;1;1;230080;26;F2;S;D;;Nice, France
+2;0;"Navratil, Mr. Michel (""Louis M Hoffman"")";male;36,5;0;2;230080;26;F2;S;;15;Nice, France
+2;0;Nesson, Mr. Israel;male;26;0;0;244368;13;F2;S;;;Boston, MA
+2;0;Nicholls, Mr. Joseph Charles;male;19;1;1;C.A. 33112;36,75;;S;;101;Cornwall / Hancock, MI
+2;0;Norman, Mr. Robert Douglas;male;28;0;0;218629;13,5;;S;;287;Glasgow
+2;1;"Nourney, Mr. Alfred (""Baron von Drachstedt"")";male;20;0;0;SC/PARIS 2166;13,8625;D38;C;7;;Cologne, Germany
+2;1;Nye, Mrs. (Elizabeth Ramell);female;29;0;0;C.A. 29395;10,5;F33;S;11;;Folkstone, Kent / New York, NY
+2;0;Otter, Mr. Richard;male;39;0;0;28213;13;;S;;;Middleburg Heights, OH
+2;1;Oxenham, Mr. Percy Thomas;male;22;0;0;W./C. 14260;10,5;;S;13;;Pondersend, England / New Durham, NJ
+2;1;Padro y Manent, Mr. Julian;male;;0;0;SC/PARIS 2146;13,8625;;C;9;;Spain / Havana, Cuba
+2;0;Pain, Dr. Alfred;male;23;0;0;244278;10,5;;S;;;Hamilton, ON
+2;1;Pallas y Castello, Mr. Emilio;male;29;0;0;SC/PARIS 2147;13,8583;;C;9;;Spain / Havana, Cuba
+2;0;Parker, Mr. Clifford Richard;male;28;0;0;SC 14888;10,5;;S;;;St Andrews, Guernsey
+2;0;"Parkes, Mr. Francis ""Frank""";male;;0;0;239853;0;;S;;;Belfast
+2;1;Parrish, Mrs. (Lutie Davis);female;50;0;1;230433;26;;S;12;;Woodford County, KY
+2;0;Pengelly, Mr. Frederick William;male;19;0;0;28665;10,5;;S;;;Gunnislake, England / Butte, MT
+2;0;Pernot, Mr. Rene;male;;0;0;SC/PARIS 2131;15,05;;C;;;
+2;0;Peruschitz, Rev. Joseph Maria;male;41;0;0;237393;13;;S;;;
+2;1;Phillips, Miss. Alice Frances Louisa;female;21;0;1;S.O./P.P. 2;21;;S;12;;Ilfracombe, Devon
+2;1;"Phillips, Miss. Kate Florence (""Mrs Kate Louise Phillips Marshall"")";female;19;0;0;250655;26;;S;11;;Worcester, England
+2;0;Phillips, Mr. Escott Robert;male;43;0;1;S.O./P.P. 2;21;;S;;;Ilfracombe, Devon
+2;1;Pinsky, Mrs. (Rosa);female;32;0;0;234604;13;;S;9;;Russia
+2;0;Ponesell, Mr. Martin;male;34;0;0;250647;13;;S;;;Denmark / New York, NY
+2;1;Portaluppi, Mr. Emilio Ilario Giuseppe;male;30;0;0;C.A. 34644;12,7375;;C;14;;Milford, NH
+2;0;Pulbaum, Mr. Franz;male;27;0;0;SC/PARIS 2168;15,0333;;C;;;Paris
+2;1;Quick, Miss. Phyllis May;female;2;1;1;26360;26;;S;11;;Plymouth, Devon / Detroit, MI
+2;1;Quick, Miss. Winifred Vera;female;8;1;1;26360;26;;S;11;;Plymouth, Devon / Detroit, MI
+2;1;Quick, Mrs. Frederick Charles (Jane Richards);female;33;0;2;26360;26;;S;11;;Plymouth, Devon / Detroit, MI
+2;0;Reeves, Mr. David;male;36;0;0;C.A. 17248;10,5;;S;;;Brighton, Sussex
+2;0;Renouf, Mr. Peter Henry;male;34;1;0;31027;21;;S;12;;Elizabeth, NJ
+2;1;Renouf, Mrs. Peter Henry (Lillian Jefferys);female;30;3;0;31027;21;;S;;;Elizabeth, NJ
+2;1;Reynaldo, Ms. Encarnacion;female;28;0;0;230434;13;;S;9;;Spain
+2;0;Richard, Mr. Emile;male;23;0;0;SC/PARIS 2133;15,0458;;C;;;Paris / Montreal, PQ
+2;1;Richards, Master. George Sibley;male;0,8333;1;1;29106;18,75;;S;4;;Cornwall / Akron, OH
+2;1;Richards, Master. William Rowe;male;3;1;1;29106;18,75;;S;4;;Cornwall / Akron, OH
+2;1;Richards, Mrs. Sidney (Emily Hocking);female;24;2;3;29106;18,75;;S;4;;Cornwall / Akron, OH
+2;1;Ridsdale, Miss. Lucy;female;50;0;0;W./C. 14258;10,5;;S;13;;London, England / Marietta, Ohio and Milwaukee, WI
+2;0;Rogers, Mr. Reginald Harry;male;19;0;0;28004;10,5;;S;;;
+2;1;Rugg, Miss. Emily;female;21;0;0;C.A. 31026;10,5;;S;12;;Guernsey / Wilmington, DE
+2;0;Schmidt, Mr. August;male;26;0;0;248659;13;;S;;;Newark, NJ
+2;0;Sedgwick, Mr. Charles Frederick Waddington;male;25;0;0;244361;13;;S;;;Liverpool
+2;0;Sharp, Mr. Percival James R;male;27;0;0;244358;26;;S;;;Hornsey, England
+2;1;Shelley, Mrs. William (Imanita Parrish Hall);female;25;0;1;230433;26;;S;12;;Deer Lodge, MT
+2;1;Silven, Miss. Lyyli Karoliina;female;18;0;2;250652;13;;S;16;;Finland / Minneapolis, MN
+2;1;Sincock, Miss. Maude;female;20;0;0;C.A. 33112;36,75;;S;11;;Cornwall / Hancock, MI
+2;1;Sinkkonen, Miss. Anna;female;30;0;0;250648;13;;S;10;;Finland / Washington, DC
+2;0;Sjostedt, Mr. Ernst Adolf;male;59;0;0;237442;13,5;;S;;;Sault St Marie, ON
+2;1;Slayter, Miss. Hilda Mary;female;30;0;0;234818;12,35;;Q;13;;Halifax, NS
+2;0;Slemen, Mr. Richard James;male;35;0;0;28206;10,5;;S;;;Cornwall
+2;1;Smith, Miss. Marion Elsie;female;40;0;0;31418;13;;S;9;;
+2;0;Sobey, Mr. Samuel James Hayden;male;25;0;0;C.A. 29178;13;;S;;;Cornwall / Houghton, MI
+2;0;Stanton, Mr. Samuel Ward;male;41;0;0;237734;15,0458;;C;;;New York, NY
+2;0;Stokes, Mr. Philip Joseph;male;25;0;0;F.C.C. 13540;10,5;;S;;81;Catford, Kent / Detroit, MI
+2;0;Swane, Mr. George;male;18,5;0;0;248734;13;F;S;;294;
+2;0;Sweet, Mr. George Frederick;male;14;0;0;220845;65;;S;;;Somerset / Bernardsville, NJ
+2;1;Toomey, Miss. Ellen;female;50;0;0;F.C.C. 13531;10,5;;S;9;;Indianapolis, IN
+2;0;Troupiansky, Mr. Moses Aaron;male;23;0;0;233639;13;;S;;;
+2;1;Trout, Mrs. William H (Jessie L);female;28;0;0;240929;12,65;;S;;;Columbus, OH
+2;1;"Troutt, Miss. Edwina Celia ""Winnie""";female;27;0;0;34218;10,5;E101;S;16;;Bath, England / Massachusetts
+2;0;Turpin, Mr. William John Robert;male;29;1;0;11668;21;;S;;;Plymouth, England
+2;0;Turpin, Mrs. William John Robert (Dorothy Ann Wonnacott);female;27;1;0;11668;21;;S;;;Plymouth, England
+2;0;Veal, Mr. James;male;40;0;0;28221;13;;S;;;Barre, Co Washington, VT
+2;1;Walcroft, Miss. Nellie;female;31;0;0;F.C.C. 13528;21;;S;14;;Mamaroneck, NY
+2;0;Ware, Mr. John James;male;30;1;0;CA 31352;21;;S;;;Bristol, England / New Britain, CT
+2;0;Ware, Mr. William Jeffery;male;23;1;0;28666;10,5;;S;;;
+2;1;Ware, Mrs. John James (Florence Louise Long);female;31;0;0;CA 31352;21;;S;10;;Bristol, England / New Britain, CT
+2;0;Watson, Mr. Ennis Hastings;male;;0;0;239856;0;;S;;;Belfast
+2;1;Watt, Miss. Bertha J;female;12;0;0;C.A. 33595;15,75;;S;9;;Aberdeen / Portland, OR
+2;1;"Watt, Mrs. James (Elizabeth ""Bessie"" Inglis Milne)";female;40;0;0;C.A. 33595;15,75;;S;9;;Aberdeen / Portland, OR
+2;1;Webber, Miss. Susan;female;32,5;0;0;27267;13;E101;S;12;;England / Hartford, CT
+2;0;Weisz, Mr. Leopold;male;27;1;0;228414;26;;S;;293;Bromsgrove, England / Montreal, PQ
+2;1;Weisz, Mrs. Leopold (Mathilde Francoise Pede);female;29;1;0;228414;26;;S;10;;Bromsgrove, England / Montreal, PQ
+2;1;Wells, Master. Ralph Lester;male;2;1;1;29103;23;;S;14;;Cornwall / Akron, OH
+2;1;Wells, Miss. Joan;female;4;1;1;29103;23;;S;14;;Cornwall / Akron, OH
+2;1;"Wells, Mrs. Arthur Henry (""Addie"" Dart Trevaskis)";female;29;0;2;29103;23;;S;14;;Cornwall / Akron, OH
+2;1;West, Miss. Barbara J;female;0,9167;1;2;C.A. 34651;27,75;;S;10;;Bournmouth, England
+2;1;West, Miss. Constance Mirium;female;5;1;2;C.A. 34651;27,75;;S;10;;Bournmouth, England
+2;0;West, Mr. Edwy Arthur;male;36;1;2;C.A. 34651;27,75;;S;;;Bournmouth, England
+2;1;West, Mrs. Edwy Arthur (Ada Mary Worth);female;33;1;2;C.A. 34651;27,75;;S;10;;Bournmouth, England
+2;0;Wheadon, Mr. Edward H;male;66;0;0;C.A. 24579;10,5;;S;;;Guernsey, England / Edgewood, RI
+2;0;"Wheeler, Mr. Edwin ""Frederick""";male;;0;0;SC/PARIS 2159;12,875;;S;;;
+2;1;Wilhelms, Mr. Charles;male;31;0;0;244270;13;;S;9;;London, England
+2;1;Williams, Mr. Charles Eugene;male;;0;0;244373;13;;S;14;;Harrow, England
+2;1;Wright, Miss. Marion;female;26;0;0;220844;13,5;;S;9;;Yoevil, England / Cottage Grove, OR
+2;0;"Yrois, Miss. Henriette (""Mrs Harbeck"")";female;24;0;0;248747;13;;S;;;Paris
+3;0;Abbing, Mr. Anthony;male;42;0;0;C.A. 5547;7,55;;S;;;
+3;0;Abbott, Master. Eugene Joseph;male;13;0;2;C.A. 2673;20,25;;S;;;East Providence, RI
+3;0;Abbott, Mr. Rossmore Edward;male;16;1;1;C.A. 2673;20,25;;S;;190;East Providence, RI
+3;1;Abbott, Mrs. Stanton (Rosa Hunt);female;35;1;1;C.A. 2673;20,25;;S;A;;East Providence, RI
+3;1;Abelseth, Miss. Karen Marie;female;16;0;0;348125;7,65;;S;16;;Norway Los Angeles, CA
+3;1;Abelseth, Mr. Olaus Jorgensen;male;25;0;0;348122;7,65;F G63;S;A;;Perkins County, SD
+3;1;Abrahamsson, Mr. Abraham August Johannes;male;20;0;0;SOTON/O2 3101284;7,925;;S;15;;Taalintehdas, Finland Hoboken, NJ
+3;1;Abrahim, Mrs. Joseph (Sophie Halaut Easu);female;18;0;0;2657;7,2292;;C;C;;Greensburg, PA
+3;0;Adahl, Mr. Mauritz Nils Martin;male;30;0;0;C 7076;7,25;;S;;72;Asarum, Sweden Brooklyn, NY
+3;0;Adams, Mr. John;male;26;0;0;341826;8,05;;S;;103;Bournemouth, England
+3;0;Ahlin, Mrs. Johan (Johanna Persdotter Larsson);female;40;1;0;7546;9,475;;S;;;Sweden Akeley, MN
+3;1;Aks, Master. Philip Frank;male;0,8333;0;1;392091;9,35;;S;11;;London, England Norfolk, VA
+3;1;Aks, Mrs. Sam (Leah Rosen);female;18;0;1;392091;9,35;;S;13;;London, England Norfolk, VA
+3;1;Albimona, Mr. Nassef Cassem;male;26;0;0;2699;18,7875;;C;15;;Syria Fredericksburg, VA
+3;0;Alexander, Mr. William;male;26;0;0;3474;7,8875;;S;;;England Albion, NY
+3;0;Alhomaki, Mr. Ilmari Rudolf;male;20;0;0;SOTON/O2 3101287;7,925;;S;;;Salo, Finland Astoria, OR
+3;0;Ali, Mr. Ahmed;male;24;0;0;SOTON/O.Q. 3101311;7,05;;S;;;
+3;0;Ali, Mr. William;male;25;0;0;SOTON/O.Q. 3101312;7,05;;S;;79;Argentina
+3;0;Allen, Mr. William Henry;male;35;0;0;373450;8,05;;S;;;Lower Clapton, Middlesex or Erdington, Birmingham
+3;0;Allum, Mr. Owen George;male;18;0;0;2223;8,3;;S;;259;Windsor, England New York, NY
+3;0;Andersen, Mr. Albert Karvin;male;32;0;0;C 4001;22,525;;S;;260;Bergen, Norway
+3;1;Andersen-Jensen, Miss. Carla Christine Nielsine;female;19;1;0;350046;7,8542;;S;16;;
+3;0;Andersson, Master. Sigvard Harald Elias;male;4;4;2;347082;31,275;;S;;;Sweden Winnipeg, MN
+3;0;Andersson, Miss. Ebba Iris Alfrida;female;6;4;2;347082;31,275;;S;;;Sweden Winnipeg, MN
+3;0;Andersson, Miss. Ellis Anna Maria;female;2;4;2;347082;31,275;;S;;;Sweden Winnipeg, MN
+3;1;Andersson, Miss. Erna Alexandra;female;17;4;2;3101281;7,925;;S;D;;Ruotsinphyhtaa, Finland New York, NY
+3;0;Andersson, Miss. Ida Augusta Margareta;female;38;4;2;347091;7,775;;S;;;Vadsbro, Sweden Ministee, MI
+3;0;Andersson, Miss. Ingeborg Constanzia;female;9;4;2;347082;31,275;;S;;;Sweden Winnipeg, MN
+3;0;Andersson, Miss. Sigrid Elisabeth;female;11;4;2;347082;31,275;;S;;;Sweden Winnipeg, MN
+3;0;Andersson, Mr. Anders Johan;male;39;1;5;347082;31,275;;S;;;Sweden Winnipeg, MN
+3;1;"Andersson, Mr. August Edvard (""Wennerstrom"")";male;27;0;0;350043;7,7958;;S;A;;
+3;0;Andersson, Mr. Johan Samuel;male;26;0;0;347075;7,775;;S;;;Hartford, CT
+3;0;Andersson, Mrs. Anders Johan (Alfrida Konstantia Brogren);female;39;1;5;347082;31,275;;S;;;Sweden Winnipeg, MN
+3;0;Andreasson, Mr. Paul Edvin;male;20;0;0;347466;7,8542;;S;;;Sweden Chicago, IL
+3;0;Angheloff, Mr. Minko;male;26;0;0;349202;7,8958;;S;;;Bulgaria Chicago, IL
+3;0;Arnold-Franchi, Mr. Josef;male;25;1;0;349237;17,8;;S;;;Altdorf, Switzerland
+3;0;Arnold-Franchi, Mrs. Josef (Josefine Franchi);female;18;1;0;349237;17,8;;S;;;Altdorf, Switzerland
+3;0;Aronsson, Mr. Ernst Axel Algot;male;24;0;0;349911;7,775;;S;;;Sweden Joliet, IL
+3;0;Asim, Mr. Adola;male;35;0;0;SOTON/O.Q. 3101310;7,05;;S;;;
+3;0;Asplund, Master. Carl Edgar;male;5;4;2;347077;31,3875;;S;;;Sweden  Worcester, MA
+3;0;Asplund, Master. Clarence Gustaf Hugo;male;9;4;2;347077;31,3875;;S;;;Sweden Worcester, MA
+3;1;Asplund, Master. Edvin Rojj Felix;male;3;4;2;347077;31,3875;;S;15;;Sweden Worcester, MA
+3;0;Asplund, Master. Filip Oscar;male;13;4;2;347077;31,3875;;S;;;Sweden Worcester, MA
+3;1;Asplund, Miss. Lillian Gertrud;female;5;4;2;347077;31,3875;;S;15;;Sweden Worcester, MA
+3;0;Asplund, Mr. Carl Oscar Vilhelm Gustafsson;male;40;1;5;347077;31,3875;;S;;142;Sweden  Worcester, MA
+3;1;Asplund, Mr. Johan Charles;male;23;0;0;350054;7,7958;;S;13;;Oskarshamn, Sweden Minneapolis, MN
+3;1;Asplund, Mrs. Carl Oscar (Selma Augusta Emilia Johansson);female;38;1;5;347077;31,3875;;S;15;;Sweden  Worcester, MA
+3;1;"Assaf Khalil, Mrs. Mariana (""Miriam"")";female;45;0;0;2696;7,225;;C;C;;Ottawa, ON
+3;0;Assaf, Mr. Gerios;male;21;0;0;2692;7,225;;C;;;Ottawa, ON
+3;0;Assam, Mr. Ali;male;23;0;0;SOTON/O.Q. 3101309;7,05;;S;;;
+3;0;Attalah, Miss. Malake;female;17;0;0;2627;14,4583;;C;;;
+3;0;Attalah, Mr. Sleiman;male;30;0;0;2694;7,225;;C;;;Ottawa, ON
+3;0;Augustsson, Mr. Albert;male;23;0;0;347468;7,8542;;S;;;Krakoryd, Sweden Bloomington, IL
+3;1;Ayoub, Miss. Banoura;female;13;0;0;2687;7,2292;;C;C;;Syria Youngstown, OH
+3;0;Baccos, Mr. Raffull;male;20;0;0;2679;7,225;;C;;;
+3;0;Backstrom, Mr. Karl Alfred;male;32;1;0;3101278;15,85;;S;D;;Ruotsinphytaa, Finland New York, NY
+3;1;Backstrom, Mrs. Karl Alfred (Maria Mathilda Gustafsson);female;33;3;0;3101278;15,85;;S;;;Ruotsinphytaa, Finland New York, NY
+3;1;Baclini, Miss. Eugenie;female;0,75;2;1;2666;19,2583;;C;C;;Syria New York, NY
+3;1;Baclini, Miss. Helene Barbara;female;0,75;2;1;2666;19,2583;;C;C;;Syria New York, NY
+3;1;Baclini, Miss. Marie Catherine;female;5;2;1;2666;19,2583;;C;C;;Syria New York, NY
+3;1;Baclini, Mrs. Solomon (Latifa Qurban);female;24;0;3;2666;19,2583;;C;C;;Syria New York, NY
+3;1;Badman, Miss. Emily Louisa;female;18;0;0;A/4 31416;8,05;;S;C;;London Skanteales, NY
+3;0;Badt, Mr. Mohamed;male;40;0;0;2623;7,225;;C;;;
+3;0;Balkic, Mr. Cerin;male;26;0;0;349248;7,8958;;S;;;
+3;1;Barah, Mr. Hanna Assi;male;20;0;0;2663;7,2292;;C;15;;
+3;0;Barbara, Miss. Saiide;female;18;0;1;2691;14,4542;;C;;;Syria Ottawa, ON
+3;0;Barbara, Mrs. (Catherine David);female;45;0;1;2691;14,4542;;C;;;Syria Ottawa, ON
+3;0;Barry, Miss. Julia;female;27;0;0;330844;7,8792;;Q;;;New York, NY
+3;0;Barton, Mr. David John;male;22;0;0;324669;8,05;;S;;;England New York, NY
+3;0;Beavan, Mr. William Thomas;male;19;0;0;323951;8,05;;S;;;England
+3;0;Bengtsson, Mr. John Viktor;male;26;0;0;347068;7,775;;S;;;Krakudden, Sweden Moune, IL
+3;0;Berglund, Mr. Karl Ivar Sven;male;22;0;0;PP 4348;9,35;;S;;;Tranvik, Finland New York
+3;0;Betros, Master. Seman;male;;0;0;2622;7,2292;;C;;;
+3;0;Betros, Mr. Tannous;male;20;0;0;2648;4,0125;;C;;;Syria
+3;1;Bing, Mr. Lee;male;32;0;0;1601;56,4958;;S;C;;Hong Kong New York, NY
+3;0;Birkeland, Mr. Hans Martin Monsen;male;21;0;0;312992;7,775;;S;;;Brennes, Norway New York
+3;0;Bjorklund, Mr. Ernst Herbert;male;18;0;0;347090;7,75;;S;;;Stockholm, Sweden New York
+3;0;Bostandyeff, Mr. Guentcho;male;26;0;0;349224;7,8958;;S;;;Bulgaria Chicago, IL
+3;0;Boulos, Master. Akar;male;6;1;1;2678;15,2458;;C;;;Syria Kent, ON
+3;0;Boulos, Miss. Nourelain;female;9;1;1;2678;15,2458;;C;;;Syria Kent, ON
+3;0;Boulos, Mr. Hanna;male;;0;0;2664;7,225;;C;;;Syria
+3;0;Boulos, Mrs. Joseph (Sultana);female;;0;2;2678;15,2458;;C;;;Syria Kent, ON
+3;0;Bourke, Miss. Mary;female;;0;2;364848;7,75;;Q;;;Ireland Chicago, IL
+3;0;Bourke, Mr. John;male;40;1;1;364849;15,5;;Q;;;Ireland Chicago, IL
+3;0;Bourke, Mrs. John (Catherine);female;32;1;1;364849;15,5;;Q;;;Ireland Chicago, IL
+3;0;"Bowen, Mr. David John ""Dai""";male;21;0;0;54636;16,1;;S;;;Treherbert, Cardiff, Wales
+3;1;Bradley, Miss. Bridget Delia;female;22;0;0;334914;7,725;;Q;13;;Kingwilliamstown, Co Cork, Ireland Glens Falls, NY
+3;0;Braf, Miss. Elin Ester Maria;female;20;0;0;347471;7,8542;;S;;;Medeltorp, Sweden Chicago, IL
+3;0;Braund, Mr. Lewis Richard;male;29;1;0;3460;7,0458;;S;;;Bridgerule, Devon
+3;0;Braund, Mr. Owen Harris;male;22;1;0;A/5 21171;7,25;;S;;;Bridgerule, Devon
+3;0;Brobeck, Mr. Karl Rudolf;male;22;0;0;350045;7,7958;;S;;;Sweden Worcester, MA
+3;0;Brocklebank, Mr. William Alfred;male;35;0;0;364512;8,05;;S;;;Broomfield, Chelmsford, England
+3;0;Buckley, Miss. Katherine;female;18,5;0;0;329944;7,2833;;Q;;299;Co Cork, Ireland Roxbury, MA
+3;1;Buckley, Mr. Daniel;male;21;0;0;330920;7,8208;;Q;13;;Kingwilliamstown, Co Cork, Ireland New York, NY
+3;0;Burke, Mr. Jeremiah;male;19;0;0;365222;6,75;;Q;;;Co Cork, Ireland Charlestown, MA
+3;0;Burns, Miss. Mary Delia;female;18;0;0;330963;7,8792;;Q;;;Co Sligo, Ireland New York, NY
+3;0;Cacic, Miss. Manda;female;21;0;0;315087;8,6625;;S;;;
+3;0;Cacic, Miss. Marija;female;30;0;0;315084;8,6625;;S;;;
+3;0;Cacic, Mr. Jego Grga;male;18;0;0;315091;8,6625;;S;;;
+3;0;Cacic, Mr. Luka;male;38;0;0;315089;8,6625;;S;;;Croatia
+3;0;Calic, Mr. Jovo;male;17;0;0;315093;8,6625;;S;;;
+3;0;Calic, Mr. Petar;male;17;0;0;315086;8,6625;;S;;;
+3;0;Canavan, Miss. Mary;female;21;0;0;364846;7,75;;Q;;;
+3;0;Canavan, Mr. Patrick;male;21;0;0;364858;7,75;;Q;;;Ireland Philadelphia, PA
+3;0;Cann, Mr. Ernest Charles;male;21;0;0;A./5. 2152;8,05;;S;;;
+3;0;Caram, Mr. Joseph;male;;1;0;2689;14,4583;;C;;;Ottawa, ON
+3;0;Caram, Mrs. Joseph (Maria Elias);female;;1;0;2689;14,4583;;C;;;Ottawa, ON
+3;0;Carlsson, Mr. August Sigfrid;male;28;0;0;350042;7,7958;;S;;;Dagsas, Sweden Fower, MN
+3;0;Carlsson, Mr. Carl Robert;male;24;0;0;350409;7,8542;;S;;;Goteborg, Sweden Huntley, IL
+3;1;"Carr, Miss. Helen ""Ellen""";female;16;0;0;367231;7,75;;Q;16;;Co Longford, Ireland New York, NY
+3;0;Carr, Miss. Jeannie;female;37;0;0;368364;7,75;;Q;;;Co Sligo, Ireland Hartford, CT
+3;0;Carver, Mr. Alfred John;male;28;0;0;392095;7,25;;S;;;St Denys, Southampton, Hants
+3;0;Celotti, Mr. Francesco;male;24;0;0;343275;8,05;;S;;;London
+3;0;Charters, Mr. David;male;21;0;0;A/5. 13032;7,7333;;Q;;;Ireland New York, NY
+3;1;Chip, Mr. Chang;male;32;0;0;1601;56,4958;;S;C;;Hong Kong New York, NY
+3;0;Christmann, Mr. Emil;male;29;0;0;343276;8,05;;S;;;
+3;0;Chronopoulos, Mr. Apostolos;male;26;1;0;2680;14,4542;;C;;;Greece
+3;0;Chronopoulos, Mr. Demetrios;male;18;1;0;2680;14,4542;;C;;;Greece
+3;0;Coelho, Mr. Domingos Fernandeo;male;20;0;0;SOTON/O.Q. 3101307;7,05;;S;;;Portugal
+3;1;"Cohen, Mr. Gurshon ""Gus""";male;18;0;0;A/5 3540;8,05;;S;12;;London Brooklyn, NY
+3;0;Colbert, Mr. Patrick;male;24;0;0;371109;7,25;;Q;;;Co Limerick, Ireland Sherbrooke, PQ
+3;0;Coleff, Mr. Peju;male;36;0;0;349210;7,4958;;S;;;Bulgaria Chicago, IL
+3;0;Coleff, Mr. Satio;male;24;0;0;349209;7,4958;;S;;;
+3;0;Conlon, Mr. Thomas Henry;male;31;0;0;21332;7,7333;;Q;;;Philadelphia, PA
+3;0;Connaghton, Mr. Michael;male;31;0;0;335097;7,75;;Q;;;Ireland Brooklyn, NY
+3;1;Connolly, Miss. Kate;female;22;0;0;370373;7,75;;Q;13;;Ireland
+3;0;Connolly, Miss. Kate;female;30;0;0;330972;7,6292;;Q;;;Ireland
+3;0;Connors, Mr. Patrick;male;70,5;0;0;370369;7,75;;Q;;171;
+3;0;Cook, Mr. Jacob;male;43;0;0;A/5 3536;8,05;;S;;;
+3;0;Cor, Mr. Bartol;male;35;0;0;349230;7,8958;;S;;;Austria
+3;0;Cor, Mr. Ivan;male;27;0;0;349229;7,8958;;S;;;Austria
+3;0;Cor, Mr. Liudevit;male;19;0;0;349231;7,8958;;S;;;Austria
+3;0;Corn, Mr. Harry;male;30;0;0;SOTON/OQ 392090;8,05;;S;;;London
+3;1;"Coutts, Master. Eden Leslie ""Neville""";male;9;1;1;C.A. 37671;15,9;;S;2;;England Brooklyn, NY
+3;1;"Coutts, Master. William Loch ""William""";male;3;1;1;C.A. 37671;15,9;;S;2;;England Brooklyn, NY
+3;1;"Coutts, Mrs. William (Winnie ""Minnie"" Treanor)";female;36;0;2;C.A. 37671;15,9;;S;2;;England Brooklyn, NY
+3;0;Coxon, Mr. Daniel;male;59;0;0;364500;7,25;;S;;;Merrill, WI
+3;0;Crease, Mr. Ernest James;male;19;0;0;S.P. 3464;8,1583;;S;;;Bristol, England Cleveland, OH
+3;1;Cribb, Miss. Laura Alice;female;17;0;1;371362;16,1;;S;12;;Bournemouth, England Newark, NJ
+3;0;Cribb, Mr. John Hatfield;male;44;0;1;371362;16,1;;S;;;Bournemouth, England Newark, NJ
+3;0;Culumovic, Mr. Jeso;male;17;0;0;315090;8,6625;;S;;;Austria-Hungary
+3;0;Daher, Mr. Shedid;male;22,5;0;0;2698;7,225;;C;;9;
+3;1;Dahl, Mr. Karl Edwart;male;45;0;0;7598;8,05;;S;15;;Australia Fingal, ND
+3;0;Dahlberg, Miss. Gerda Ulrika;female;22;0;0;7552;10,5167;;S;;;Norrlot, Sweden Chicago, IL
+3;0;Dakic, Mr. Branko;male;19;0;0;349228;10,1708;;S;;;Austria
+3;1;"Daly, Miss. Margaret Marcella ""Maggie""";female;30;0;0;382650;6,95;;Q;15;;Co Athlone, Ireland New York, NY
+3;1;Daly, Mr. Eugene Patrick;male;29;0;0;382651;7,75;;Q;13 15 B;;Co Athlone, Ireland New York, NY
+3;0;Danbom, Master. Gilbert Sigvard Emanuel;male;0,3333;0;2;347080;14,4;;S;;;Stanton, IA
+3;0;Danbom, Mr. Ernst Gilbert;male;34;1;1;347080;14,4;;S;;197;Stanton, IA
+3;0;Danbom, Mrs. Ernst Gilbert (Anna Sigrid Maria Brogren);female;28;1;1;347080;14,4;;S;;;Stanton, IA
+3;0;Danoff, Mr. Yoto;male;27;0;0;349219;7,8958;;S;;;Bulgaria Chicago, IL
+3;0;Dantcheff, Mr. Ristiu;male;25;0;0;349203;7,8958;;S;;;Bulgaria Chicago, IL
+3;0;Davies, Mr. Alfred J;male;24;2;0;A/4 48871;24,15;;S;;;West Bromwich, England Pontiac, MI
+3;0;Davies, Mr. Evan;male;22;0;0;SC/A4 23568;8,05;;S;;;
+3;0;Davies, Mr. John Samuel;male;21;2;0;A/4 48871;24,15;;S;;;West Bromwich, England Pontiac, MI
+3;0;Davies, Mr. Joseph;male;17;2;0;A/4 48873;8,05;;S;;;West Bromwich, England Pontiac, MI
+3;0;Davison, Mr. Thomas Henry;male;;1;0;386525;16,1;;S;;;Liverpool, England Bedford, OH
+3;1;Davison, Mrs. Thomas Henry (Mary E Finck);female;;1;0;386525;16,1;;S;16;;Liverpool, England Bedford, OH
+3;1;de Messemaeker, Mr. Guillaume Joseph;male;36,5;1;0;345572;17,4;;S;15;;Tampico, MT
+3;1;de Messemaeker, Mrs. Guillaume Joseph (Emma);female;36;1;0;345572;17,4;;S;13;;Tampico, MT
+3;1;de Mulder, Mr. Theodore;male;30;0;0;345774;9,5;;S;11;;Belgium Detroit, MI
+3;0;de Pelsmaeker, Mr. Alfons;male;16;0;0;345778;9,5;;S;;;
+3;1;Dean, Master. Bertram Vere;male;1;1;2;C.A. 2315;20,575;;S;10;;Devon, England Wichita, KS
+3;1;"Dean, Miss. Elizabeth Gladys ""Millvina""";female;0,1667;1;2;C.A. 2315;20,575;;S;10;;Devon, England Wichita, KS
+3;0;Dean, Mr. Bertram Frank;male;26;1;2;C.A. 2315;20,575;;S;;;Devon, England Wichita, KS
+3;1;Dean, Mrs. Bertram (Eva Georgetta Light);female;33;1;2;C.A. 2315;20,575;;S;10;;Devon, England Wichita, KS
+3;0;Delalic, Mr. Redjo;male;25;0;0;349250;7,8958;;S;;;
+3;0;Demetri, Mr. Marinko;male;;0;0;349238;7,8958;;S;;;
+3;0;Denkoff, Mr. Mitto;male;;0;0;349225;7,8958;;S;;;Bulgaria Coon Rapids, IA
+3;0;Dennis, Mr. Samuel;male;22;0;0;A/5 21172;7,25;;S;;;
+3;0;Dennis, Mr. William;male;36;0;0;A/5 21175;7,25;;S;;;
+3;1;Devaney, Miss. Margaret Delia;female;19;0;0;330958;7,8792;;Q;C;;Kilmacowen, Co Sligo, Ireland New York, NY
+3;0;Dika, Mr. Mirko;male;17;0;0;349232;7,8958;;S;;;
+3;0;Dimic, Mr. Jovan;male;42;0;0;315088;8,6625;;S;;;
+3;0;Dintcheff, Mr. Valtcho;male;43;0;0;349226;7,8958;;S;;;
+3;0;Doharr, Mr. Tannous;male;;0;0;2686;7,2292;;C;;;
+3;0;Dooley, Mr. Patrick;male;32;0;0;370376;7,75;;Q;;;Ireland New York, NY
+3;1;Dorking, Mr. Edward Arthur;male;19;0;0;A/5. 10482;8,05;;S;B;;England Oglesby, IL
+3;1;Dowdell, Miss. Elizabeth;female;30;0;0;364516;12,475;;S;13;;Union Hill, NJ
+3;0;Doyle, Miss. Elizabeth;female;24;0;0;368702;7,75;;Q;;;Ireland New York, NY
+3;1;Drapkin, Miss. Jennie;female;23;0;0;SOTON/OQ 392083;8,05;;S;;;London New York, NY
+3;0;Drazenoic, Mr. Jozef;male;33;0;0;349241;7,8958;;C;;51;Austria Niagara Falls, NY
+3;0;Duane, Mr. Frank;male;65;0;0;336439;7,75;;Q;;;
+3;1;Duquemin, Mr. Joseph;male;24;0;0;S.O./P.P. 752;7,55;;S;D;;England Albion, NY
+3;0;Dyker, Mr. Adolf Fredrik;male;23;1;0;347072;13,9;;S;;;West Haven, CT
+3;1;Dyker, Mrs. Adolf Fredrik (Anna Elisabeth Judith Andersson);female;22;1;0;347072;13,9;;S;16;;West Haven, CT
+3;0;Edvardsson, Mr. Gustaf Hjalmar;male;18;0;0;349912;7,775;;S;;;Tofta, Sweden Joliet, IL
+3;0;Eklund, Mr. Hans Linus;male;16;0;0;347074;7,775;;S;;;Karberg, Sweden Jerome Junction, AZ
+3;0;Ekstrom, Mr. Johan;male;45;0;0;347061;6,975;;S;;;Effington Rut, SD
+3;0;Elias, Mr. Dibo;male;;0;0;2674;7,225;;C;;;
+3;0;Elias, Mr. Joseph;male;39;0;2;2675;7,2292;;C;;;Syria Ottawa, ON
+3;0;Elias, Mr. Joseph Jr;male;17;1;1;2690;7,2292;;C;;;
+3;0;Elias, Mr. Tannous;male;15;1;1;2695;7,2292;;C;;;Syria
+3;0;Elsbury, Mr. William James;male;47;0;0;A/5 3902;7,25;;S;;;Illinois, USA
+3;1;Emanuel, Miss. Virginia Ethel;female;5;0;0;364516;12,475;;S;13;;New York, NY
+3;0;Emir, Mr. Farred Chehab;male;;0;0;2631;7,225;;C;;;
+3;0;Everett, Mr. Thomas James;male;40,5;0;0;C.A. 6212;15,1;;S;;187;
+3;0;Farrell, Mr. James;male;40,5;0;0;367232;7,75;;Q;;68;Aughnacliff, Co Longford, Ireland New York, NY
+3;1;Finoli, Mr. Luigi;male;;0;0;SOTON/O.Q. 3101308;7,05;;S;15;;Italy Philadelphia, PA
+3;0;Fischer, Mr. Eberhard Thelander;male;18;0;0;350036;7,7958;;S;;;
+3;0;Fleming, Miss. Honora;female;;0;0;364859;7,75;;Q;;;
+3;0;Flynn, Mr. James;male;;0;0;364851;7,75;;Q;;;
+3;0;Flynn, Mr. John;male;;0;0;368323;6,95;;Q;;;
+3;0;Foley, Mr. Joseph;male;26;0;0;330910;7,8792;;Q;;;Ireland Chicago, IL
+3;0;Foley, Mr. William;male;;0;0;365235;7,75;;Q;;;Ireland
+3;1;Foo, Mr. Choong;male;;0;0;1601;56,4958;;S;13;;Hong Kong New York, NY
+3;0;"Ford, Miss. Doolina Margaret ""Daisy""";female;21;2;2;W./C. 6608;34,375;;S;;;Rotherfield, Sussex, England Essex Co, MA
+3;0;"Ford, Miss. Robina Maggie ""Ruby""";female;9;2;2;W./C. 6608;34,375;;S;;;Rotherfield, Sussex, England Essex Co, MA
+3;0;Ford, Mr. Arthur;male;;0;0;A/5 1478;8,05;;S;;;Bridgwater, Somerset, England
+3;0;Ford, Mr. Edward Watson;male;18;2;2;W./C. 6608;34,375;;S;;;Rotherfield, Sussex, England Essex Co, MA
+3;0;Ford, Mr. William Neal;male;16;1;3;W./C. 6608;34,375;;S;;;Rotherfield, Sussex, England Essex Co, MA
+3;0;Ford, Mrs. Edward (Margaret Ann Watson);female;48;1;3;W./C. 6608;34,375;;S;;;Rotherfield, Sussex, England Essex Co, MA
+3;0;Fox, Mr. Patrick;male;;0;0;368573;7,75;;Q;;;Ireland New York, NY
+3;0;Franklin, Mr. Charles (Charles Fardon);male;;0;0;SOTON/O.Q. 3101314;7,25;;S;;;
+3;0;Gallagher, Mr. Martin;male;25;0;0;36864;7,7417;;Q;;;New York, NY
+3;0;Garfirth, Mr. John;male;;0;0;358585;14,5;;S;;;
+3;0;Gheorgheff, Mr. Stanio;male;;0;0;349254;7,8958;;C;;;
+3;0;Gilinski, Mr. Eliezer;male;22;0;0;14973;8,05;;S;;47;
+3;1;"Gilnagh, Miss. Katherine ""Katie""";female;16;0;0;35851;7,7333;;Q;16;;Co Longford, Ireland New York, NY
+3;1;Glynn, Miss. Mary Agatha;female;;0;0;335677;7,75;;Q;13;;Co Clare, Ireland Washington, DC
+3;1;"Goldsmith, Master. Frank John William ""Frankie""";male;9;0;2;363291;20,525;;S;C D;;Strood, Kent, England Detroit, MI
+3;0;Goldsmith, Mr. Frank John;male;33;1;1;363291;20,525;;S;;;Strood, Kent, England Detroit, MI
+3;0;Goldsmith, Mr. Nathan;male;41;0;0;SOTON/O.Q. 3101263;7,85;;S;;;Philadelphia, PA
+3;1;Goldsmith, Mrs. Frank John (Emily Alice Brown);female;31;1;1;363291;20,525;;S;C D;;Strood, Kent, England Detroit, MI
+3;0;Goncalves, Mr. Manuel Estanslas;male;38;0;0;SOTON/O.Q. 3101306;7,05;;S;;;Portugal
+3;0;Goodwin, Master. Harold Victor;male;9;5;2;CA 2144;46,9;;S;;;Wiltshire, England Niagara Falls, NY
+3;0;Goodwin, Master. Sidney Leonard;male;1;5;2;CA 2144;46,9;;S;;;Wiltshire, England Niagara Falls, NY
+3;0;Goodwin, Master. William Frederick;male;11;5;2;CA 2144;46,9;;S;;;Wiltshire, England Niagara Falls, NY
+3;0;Goodwin, Miss. Jessie Allis;female;10;5;2;CA 2144;46,9;;S;;;Wiltshire, England Niagara Falls, NY
+3;0;Goodwin, Miss. Lillian Amy;female;16;5;2;CA 2144;46,9;;S;;;Wiltshire, England Niagara Falls, NY
+3;0;Goodwin, Mr. Charles Edward;male;14;5;2;CA 2144;46,9;;S;;;Wiltshire, England Niagara Falls, NY
+3;0;Goodwin, Mr. Charles Frederick;male;40;1;6;CA 2144;46,9;;S;;;Wiltshire, England Niagara Falls, NY
+3;0;Goodwin, Mrs. Frederick (Augusta Tyler);female;43;1;6;CA 2144;46,9;;S;;;Wiltshire, England Niagara Falls, NY
+3;0;Green, Mr. George Henry;male;51;0;0;21440;8,05;;S;;;Dorking, Surrey, England
+3;0;Gronnestad, Mr. Daniel Danielsen;male;32;0;0;8471;8,3625;;S;;;Foresvik, Norway Portland, ND
+3;0;Guest, Mr. Robert;male;;0;0;376563;8,05;;S;;;
+3;0;Gustafsson, Mr. Alfred Ossian;male;20;0;0;7534;9,8458;;S;;;Waukegan, Chicago, IL
+3;0;Gustafsson, Mr. Anders Vilhelm;male;37;2;0;3101276;7,925;;S;;98;Ruotsinphytaa, Finland New York, NY
+3;0;Gustafsson, Mr. Johan Birger;male;28;2;0;3101277;7,925;;S;;;Ruotsinphytaa, Finland New York, NY
+3;0;Gustafsson, Mr. Karl Gideon;male;19;0;0;347069;7,775;;S;;;Myren, Sweden New York, NY
+3;0;Haas, Miss. Aloisia;female;24;0;0;349236;8,85;;S;;;
+3;0;Hagardon, Miss. Kate;female;17;0;0;AQ/3. 30631;7,7333;;Q;;;
+3;0;Hagland, Mr. Ingvald Olai Olsen;male;;1;0;65303;19,9667;;S;;;
+3;0;Hagland, Mr. Konrad Mathias Reiersen;male;;1;0;65304;19,9667;;S;;;
+3;0;Hakkarainen, Mr. Pekka Pietari;male;28;1;0;STON/O2. 3101279;15,85;;S;;;
+3;1;Hakkarainen, Mrs. Pekka Pietari (Elin Matilda Dolck);female;24;1;0;STON/O2. 3101279;15,85;;S;15;;
+3;0;Hampe, Mr. Leon;male;20;0;0;345769;9,5;;S;;;
+3;0;Hanna, Mr. Mansour;male;23,5;0;0;2693;7,2292;;C;;188;
+3;0;Hansen, Mr. Claus Peter;male;41;2;0;350026;14,1083;;S;;;
+3;0;Hansen, Mr. Henrik Juul;male;26;1;0;350025;7,8542;;S;;;
+3;0;Hansen, Mr. Henry Damsgaard;male;21;0;0;350029;7,8542;;S;;69;
+3;1;Hansen, Mrs. Claus Peter (Jennie L Howard);female;45;1;0;350026;14,1083;;S;11;;
+3;0;Harknett, Miss. Alice Phoebe;female;;0;0;W./C. 6609;7,55;;S;;;
+3;0;Harmer, Mr. Abraham (David Lishin);male;25;0;0;374887;7,25;;S;B;;
+3;0;Hart, Mr. Henry;male;;0;0;394140;6,8583;;Q;;;
+3;0;Hassan, Mr. Houssein G N;male;11;0;0;2699;18,7875;;C;;;
+3;1;"Healy, Miss. Hanora ""Nora""";female;;0;0;370375;7,75;;Q;16;;
+3;1;Hedman, Mr. Oskar Arvid;male;27;0;0;347089;6,975;;S;15;;
+3;1;Hee, Mr. Ling;male;;0;0;1601;56,4958;;S;C;;
+3;0;"Hegarty, Miss. Hanora ""Nora""";female;18;0;0;365226;6,75;;Q;;;
+3;1;Heikkinen, Miss. Laina;female;26;0;0;STON/O2. 3101282;7,925;;S;;;
+3;0;Heininen, Miss. Wendla Maria;female;23;0;0;STON/O2. 3101290;7,925;;S;;;
+3;1;Hellstrom, Miss. Hilda Maria;female;22;0;0;7548;8,9625;;S;C;;
+3;0;Hendekovic, Mr. Ignjac;male;28;0;0;349243;7,8958;;S;;306;
+3;0;Henriksson, Miss. Jenny Lovisa;female;28;0;0;347086;7,775;;S;;;
+3;0;Henry, Miss. Delia;female;;0;0;382649;7,75;;Q;;;
+3;1;Hirvonen, Miss. Hildur E;female;2;0;1;3101298;12,2875;;S;15;;
+3;1;Hirvonen, Mrs. Alexander (Helga E Lindqvist);female;22;1;1;3101298;12,2875;;S;15;;
+3;0;Holm, Mr. John Fredrik Alexander;male;43;0;0;C 7075;6,45;;S;;;
+3;0;Holthen, Mr. Johan Martin;male;28;0;0;C 4001;22,525;;S;;;
+3;1;Honkanen, Miss. Eliina;female;27;0;0;STON/O2. 3101283;7,925;;S;;;
+3;0;Horgan, Mr. John;male;;0;0;370377;7,75;;Q;;;
+3;1;Howard, Miss. May Elizabeth;female;;0;0;A. 2. 39186;8,05;;S;C;;
+3;0;Humblen, Mr. Adolf Mathias Nicolai Olsen;male;42;0;0;348121;7,65;F G63;S;;120;
+3;1;Hyman, Mr. Abraham;male;;0;0;3470;7,8875;;S;C;;
+3;0;Ibrahim Shawah, Mr. Yousseff;male;30;0;0;2685;7,2292;;C;;;
+3;0;Ilieff, Mr. Ylio;male;;0;0;349220;7,8958;;S;;;
+3;0;Ilmakangas, Miss. Ida Livija;female;27;1;0;STON/O2. 3101270;7,925;;S;;;
+3;0;Ilmakangas, Miss. Pieta Sofia;female;25;1;0;STON/O2. 3101271;7,925;;S;;;
+3;0;Ivanoff, Mr. Kanio;male;;0;0;349201;7,8958;;S;;;
+3;1;Jalsevac, Mr. Ivan;male;29;0;0;349240;7,8958;;C;15;;
+3;1;Jansson, Mr. Carl Olof;male;21;0;0;350034;7,7958;;S;A;;
+3;0;Jardin, Mr. Jose Neto;male;;0;0;SOTON/O.Q. 3101305;7,05;;S;;;
+3;0;Jensen, Mr. Hans Peder;male;20;0;0;350050;7,8542;;S;;;
+3;0;Jensen, Mr. Niels Peder;male;48;0;0;350047;7,8542;;S;;;
+3;0;Jensen, Mr. Svend Lauritz;male;17;1;0;350048;7,0542;;S;;;
+3;1;Jermyn, Miss. Annie;female;;0;0;14313;7,75;;Q;D;;
+3;1;Johannesen-Bratthammer, Mr. Bernt;male;;0;0;65306;8,1125;;S;13;;
+3;0;Johanson, Mr. Jakob Alfred;male;34;0;0;3101264;6,4958;;S;;143;
+3;1;Johansson Palmquist, Mr. Oskar Leander;male;26;0;0;347070;7,775;;S;15;;
+3;0;Johansson, Mr. Erik;male;22;0;0;350052;7,7958;;S;;156;
+3;0;Johansson, Mr. Gustaf Joel;male;33;0;0;7540;8,6542;;S;;285;
+3;0;Johansson, Mr. Karl Johan;male;31;0;0;347063;7,775;;S;;;
+3;0;Johansson, Mr. Nils;male;29;0;0;347467;7,8542;;S;;;
+3;1;Johnson, Master. Harold Theodor;male;4;1;1;347742;11,1333;;S;15;;
+3;1;Johnson, Miss. Eleanor Ileen;female;1;1;1;347742;11,1333;;S;15;;
+3;0;Johnson, Mr. Alfred;male;49;0;0;LINE;0;;S;;;
+3;0;Johnson, Mr. Malkolm Joackim;male;33;0;0;347062;7,775;;S;;37;
+3;0;Johnson, Mr. William Cahoone Jr;male;19;0;0;LINE;0;;S;;;
+3;1;Johnson, Mrs. Oscar W (Elisabeth Vilhelmina Berg);female;27;0;2;347742;11,1333;;S;15;;
+3;0;"Johnston, Master. William Arthur ""Willie""";male;;1;2;W./C. 6607;23,45;;S;;;
+3;0;"Johnston, Miss. Catherine Helen ""Carrie""";female;;1;2;W./C. 6607;23,45;;S;;;
+3;0;Johnston, Mr. Andrew G;male;;1;2;W./C. 6607;23,45;;S;;;
+3;0;"Johnston, Mrs. Andrew G (Elizabeth ""Lily"" Watson)";female;;1;2;W./C. 6607;23,45;;S;;;
+3;0;Jonkoff, Mr. Lalio;male;23;0;0;349204;7,8958;;S;;;
+3;1;Jonsson, Mr. Carl;male;32;0;0;350417;7,8542;;S;15;;
+3;0;Jonsson, Mr. Nils Hilding;male;27;0;0;350408;7,8542;;S;;;
+3;0;Jussila, Miss. Katriina;female;20;1;0;4136;9,825;;S;;;
+3;0;Jussila, Miss. Mari Aina;female;21;1;0;4137;9,825;;S;;;
+3;1;Jussila, Mr. Eiriik;male;32;0;0;STON/O 2. 3101286;7,925;;S;15;;
+3;0;Kallio, Mr. Nikolai Erland;male;17;0;0;STON/O 2. 3101274;7,125;;S;;;
+3;0;Kalvik, Mr. Johannes Halvorsen;male;21;0;0;8475;8,4333;;S;;;
+3;0;Karaic, Mr. Milan;male;30;0;0;349246;7,8958;;S;;;
+3;1;Karlsson, Mr. Einar Gervasius;male;21;0;0;350053;7,7958;;S;13;;
+3;0;Karlsson, Mr. Julius Konrad Eugen;male;33;0;0;347465;7,8542;;S;;;
+3;0;Karlsson, Mr. Nils August;male;22;0;0;350060;7,5208;;S;;;
+3;1;Karun, Miss. Manca;female;4;0;1;349256;13,4167;;C;15;;
+3;1;Karun, Mr. Franz;male;39;0;1;349256;13,4167;;C;15;;
+3;0;Kassem, Mr. Fared;male;;0;0;2700;7,2292;;C;;;
+3;0;"Katavelas, Mr. Vassilios (""Catavelas Vassilios"")";male;18,5;0;0;2682;7,2292;;C;;58;
+3;0;"Keane, Mr. Andrew ""Andy""";male;;0;0;12460;7,75;;Q;;;
+3;0;Keefe, Mr. Arthur;male;;0;0;323592;7,25;;S;A;;
+3;1;"Kelly, Miss. Anna Katherine ""Annie Kate""";female;;0;0;9234;7,75;;Q;16;;
+3;1;Kelly, Miss. Mary;female;;0;0;14312;7,75;;Q;D;;
+3;0;Kelly, Mr. James;male;34,5;0;0;330911;7,8292;;Q;;70;
+3;0;Kelly, Mr. James;male;44;0;0;363592;8,05;;S;;;
+3;1;Kennedy, Mr. John;male;;0;0;368783;7,75;;Q;;;
+3;0;Khalil, Mr. Betros;male;;1;0;2660;14,4542;;C;;;
+3;0;"Khalil, Mrs. Betros (Zahie ""Maria"" Elias)";female;;1;0;2660;14,4542;;C;;;
+3;0;Kiernan, Mr. John;male;;1;0;367227;7,75;;Q;;;
+3;0;Kiernan, Mr. Philip;male;;1;0;367229;7,75;;Q;;;
+3;0;Kilgannon, Mr. Thomas J;male;;0;0;36865;7,7375;;Q;;;
+3;0;Kink, Miss. Maria;female;22;2;0;315152;8,6625;;S;;;
+3;0;Kink, Mr. Vincenz;male;26;2;0;315151;8,6625;;S;;;
+3;1;Kink-Heilmann, Miss. Luise Gretchen;female;4;0;2;315153;22,025;;S;2;;
+3;1;Kink-Heilmann, Mr. Anton;male;29;3;1;315153;22,025;;S;2;;
+3;1;Kink-Heilmann, Mrs. Anton (Luise Heilmann);female;26;1;1;315153;22,025;;S;2;;
+3;0;Klasen, Miss. Gertrud Emilia;female;1;1;1;350405;12,1833;;S;;;
+3;0;Klasen, Mr. Klas Albin;male;18;1;1;350404;7,8542;;S;;;
+3;0;Klasen, Mrs. (Hulda Kristina Eugenia Lofqvist);female;36;0;2;350405;12,1833;;S;;;
+3;0;Kraeff, Mr. Theodor;male;;0;0;349253;7,8958;;C;;;
+3;1;Krekorian, Mr. Neshan;male;25;0;0;2654;7,2292;F E57;C;10;;
+3;0;Lahoud, Mr. Sarkis;male;;0;0;2624;7,225;;C;;;
+3;0;Laitinen, Miss. Kristina Sofia;female;37;0;0;4135;9,5875;;S;;;
+3;0;Laleff, Mr. Kristo;male;;0;0;349217;7,8958;;S;;;
+3;1;Lam, Mr. Ali;male;;0;0;1601;56,4958;;S;C;;
+3;0;Lam, Mr. Len;male;;0;0;1601;56,4958;;S;;;
+3;1;Landergren, Miss. Aurora Adelia;female;22;0;0;C 7077;7,25;;S;13;;
+3;0;Lane, Mr. Patrick;male;;0;0;7935;7,75;;Q;;;
+3;1;Lang, Mr. Fang;male;26;0;0;1601;56,4958;;S;14;;
+3;0;Larsson, Mr. August Viktor;male;29;0;0;7545;9,4833;;S;;;
+3;0;Larsson, Mr. Bengt Edvin;male;29;0;0;347067;7,775;;S;;;
+3;0;Larsson-Rondberg, Mr. Edvard A;male;22;0;0;347065;7,775;;S;;;
+3;1;"Leeni, Mr. Fahim (""Philip Zenni"")";male;22;0;0;2620;7,225;;C;6;;
+3;0;Lefebre, Master. Henry Forbes;male;;3;1;4133;25,4667;;S;;;
+3;0;Lefebre, Miss. Ida;female;;3;1;4133;25,4667;;S;;;
+3;0;Lefebre, Miss. Jeannie;female;;3;1;4133;25,4667;;S;;;
+3;0;Lefebre, Miss. Mathilde;female;;3;1;4133;25,4667;;S;;;
+3;0;Lefebre, Mrs. Frank (Frances);female;;0;4;4133;25,4667;;S;;;
+3;0;Leinonen, Mr. Antti Gustaf;male;32;0;0;STON/O 2. 3101292;7,925;;S;;;
+3;0;Lemberopolous, Mr. Peter L;male;34,5;0;0;2683;6,4375;;C;;196;
+3;0;Lennon, Miss. Mary;female;;1;0;370371;15,5;;Q;;;
+3;0;Lennon, Mr. Denis;male;;1;0;370371;15,5;;Q;;;
+3;0;Leonard, Mr. Lionel;male;36;0;0;LINE;0;;S;;;
+3;0;Lester, Mr. James;male;39;0;0;A/4 48871;24,15;;S;;;
+3;0;Lievens, Mr. Rene Aime;male;24;0;0;345781;9,5;;S;;;
+3;0;Lindahl, Miss. Agda Thorilda Viktoria;female;25;0;0;347071;7,775;;S;;;
+3;0;Lindblom, Miss. Augusta Charlotta;female;45;0;0;347073;7,75;;S;;;
+3;0;Lindell, Mr. Edvard Bengtsson;male;36;1;0;349910;15,55;;S;A;;
+3;0;Lindell, Mrs. Edvard Bengtsson (Elin Gerda Persson);female;30;1;0;349910;15,55;;S;A;;
+3;1;Lindqvist, Mr. Eino William;male;20;1;0;STON/O 2. 3101285;7,925;;S;15;;
+3;0;Linehan, Mr. Michael;male;;0;0;330971;7,8792;;Q;;;
+3;0;Ling, Mr. Lee;male;28;0;0;1601;56,4958;;S;;;
+3;0;Lithman, Mr. Simon;male;;0;0;S.O./P.P. 251;7,55;;S;;;
+3;0;Lobb, Mr. William Arthur;male;30;1;0;A/5. 3336;16,1;;S;;;
+3;0;Lobb, Mrs. William Arthur (Cordelia K Stanlick);female;26;1;0;A/5. 3336;16,1;;S;;;
+3;0;Lockyer, Mr. Edward;male;;0;0;1222;7,8792;;S;;153;
+3;0;"Lovell, Mr. John Hall (""Henry"")";male;20,5;0;0;A/5 21173;7,25;;S;;;
+3;1;Lulic, Mr. Nikola;male;27;0;0;315098;8,6625;;S;15;;
+3;0;Lundahl, Mr. Johan Svensson;male;51;0;0;347743;7,0542;;S;;;
+3;1;Lundin, Miss. Olga Elida;female;23;0;0;347469;7,8542;;S;10;;
+3;1;Lundstrom, Mr. Thure Edvin;male;32;0;0;350403;7,5792;;S;15;;
+3;0;Lyntakoff, Mr. Stanko;male;;0;0;349235;7,8958;;S;;;
+3;0;MacKay, Mr. George William;male;;0;0;C.A. 42795;7,55;;S;;;
+3;1;"Madigan, Miss. Margaret ""Maggie""";female;;0;0;370370;7,75;;Q;15;;
+3;1;Madsen, Mr. Fridtjof Arne;male;24;0;0;C 17369;7,1417;;S;13;;
+3;0;Maenpaa, Mr. Matti Alexanteri;male;22;0;0;STON/O 2. 3101275;7,125;;S;;;
+3;0;Mahon, Miss. Bridget Delia;female;;0;0;330924;7,8792;;Q;;;
+3;0;Mahon, Mr. John;male;;0;0;AQ/4 3130;7,75;;Q;;;
+3;0;Maisner, Mr. Simon;male;;0;0;A/S 2816;8,05;;S;;;
+3;0;Makinen, Mr. Kalle Edvard;male;29;0;0;STON/O 2. 3101268;7,925;;S;;;
+3;1;Mamee, Mr. Hanna;male;;0;0;2677;7,2292;;C;15;;
+3;0;Mangan, Miss. Mary;female;30,5;0;0;364850;7,75;;Q;;61;
+3;1;Mannion, Miss. Margareth;female;;0;0;36866;7,7375;;Q;16;;
+3;0;Mardirosian, Mr. Sarkis;male;;0;0;2655;7,2292;F E46;C;;;
+3;0;Markoff, Mr. Marin;male;35;0;0;349213;7,8958;;C;;;
+3;0;Markun, Mr. Johann;male;33;0;0;349257;7,8958;;S;;;
+3;1;Masselmani, Mrs. Fatima;female;;0;0;2649;7,225;;C;C;;
+3;0;Matinoff, Mr. Nicola;male;;0;0;349255;7,8958;;C;;;
+3;1;"McCarthy, Miss. Catherine ""Katie""";female;;0;0;383123;7,75;;Q;15 16;;
+3;1;McCormack, Mr. Thomas Joseph;male;;0;0;367228;7,75;;Q;;;
+3;1;McCoy, Miss. Agnes;female;;2;0;367226;23,25;;Q;16;;
+3;1;McCoy, Miss. Alicia;female;;2;0;367226;23,25;;Q;16;;
+3;1;McCoy, Mr. Bernard;male;;2;0;367226;23,25;;Q;16;;
+3;1;McDermott, Miss. Brigdet Delia;female;;0;0;330932;7,7875;;Q;13;;
+3;0;McEvoy, Mr. Michael;male;;0;0;36568;15,5;;Q;;;
+3;1;McGovern, Miss. Mary;female;;0;0;330931;7,8792;;Q;13;;
+3;1;"McGowan, Miss. Anna ""Annie""";female;15;0;0;330923;8,0292;;Q;;;
+3;0;McGowan, Miss. Katherine;female;35;0;0;9232;7,75;;Q;;;
+3;0;McMahon, Mr. Martin;male;;0;0;370372;7,75;;Q;;;
+3;0;McNamee, Mr. Neal;male;24;1;0;376566;16,1;;S;;;
+3;0;McNamee, Mrs. Neal (Eileen O'Leary);female;19;1;0;376566;16,1;;S;;53;
+3;0;McNeill, Miss. Bridget;female;;0;0;370368;7,75;;Q;;;
+3;0;Meanwell, Miss. (Marion Ogden);female;;0;0;SOTON/O.Q. 392087;8,05;;S;;;
+3;0;Meek, Mrs. Thomas (Annie Louise Rowley);female;;0;0;343095;8,05;;S;;;
+3;0;Meo, Mr. Alfonzo;male;55,5;0;0;A.5. 11206;8,05;;S;;201;
+3;0;Mernagh, Mr. Robert;male;;0;0;368703;7,75;;Q;;;
+3;1;Midtsjo, Mr. Karl Albert;male;21;0;0;345501;7,775;;S;15;;
+3;0;Miles, Mr. Frank;male;;0;0;359306;8,05;;S;;;
+3;0;Mineff, Mr. Ivan;male;24;0;0;349233;7,8958;;S;;;
+3;0;Minkoff, Mr. Lazar;male;21;0;0;349211;7,8958;;S;;;
+3;0;Mionoff, Mr. Stoytcho;male;28;0;0;349207;7,8958;;S;;;
+3;0;Mitkoff, Mr. Mito;male;;0;0;349221;7,8958;;S;;;
+3;1;"Mockler, Miss. Helen Mary ""Ellie""";female;;0;0;330980;7,8792;;Q;16;;
+3;0;Moen, Mr. Sigurd Hansen;male;25;0;0;348123;7,65;F G73;S;;309;
+3;1;Moor, Master. Meier;male;6;0;1;392096;12,475;E121;S;14;;
+3;1;Moor, Mrs. (Beila);female;27;0;1;392096;12,475;E121;S;14;;
+3;0;Moore, Mr. Leonard Charles;male;;0;0;A4. 54510;8,05;;S;;;
+3;1;Moran, Miss. Bertha;female;;1;0;371110;24,15;;Q;16;;
+3;0;Moran, Mr. Daniel J;male;;1;0;371110;24,15;;Q;;;
+3;0;Moran, Mr. James;male;;0;0;330877;8,4583;;Q;;;
+3;0;Morley, Mr. William;male;34;0;0;364506;8,05;;S;;;
+3;0;Morrow, Mr. Thomas Rowan;male;;0;0;372622;7,75;;Q;;;
+3;1;Moss, Mr. Albert Johan;male;;0;0;312991;7,775;;S;B;;
+3;1;Moubarek, Master. Gerios;male;;1;1;2661;15,2458;;C;C;;
+3;1;"Moubarek, Master. Halim Gonios (""William George"")";male;;1;1;2661;15,2458;;C;C;;
+3;1;"Moubarek, Mrs. George (Omine ""Amenia"" Alexander)";female;;0;2;2661;15,2458;;C;C;;
+3;1;Moussa, Mrs. (Mantoura Boulos);female;;0;0;2626;7,2292;;C;;;
+3;0;Moutal, Mr. Rahamin Haim;male;;0;0;374746;8,05;;S;;;
+3;1;"Mullens, Miss. Katherine ""Katie""";female;;0;0;35852;7,7333;;Q;16;;
+3;1;Mulvihill, Miss. Bertha E;female;24;0;0;382653;7,75;;Q;15;;
+3;0;Murdlin, Mr. Joseph;male;;0;0;A./5. 3235;8,05;;S;;;
+3;1;"Murphy, Miss. Katherine ""Kate""";female;;1;0;367230;15,5;;Q;16;;
+3;1;Murphy, Miss. Margaret Jane;female;;1;0;367230;15,5;;Q;16;;
+3;1;Murphy, Miss. Nora;female;;0;0;36568;15,5;;Q;16;;
+3;0;Myhrman, Mr. Pehr Fabian Oliver Malkolm;male;18;0;0;347078;7,75;;S;;;
+3;0;Naidenoff, Mr. Penko;male;22;0;0;349206;7,8958;;S;;;
+3;1;"Najib, Miss. Adele Kiamie ""Jane""";female;15;0;0;2667;7,225;;C;C;;
+3;1;"Nakid, Miss. Maria (""Mary"")";female;1;0;2;2653;15,7417;;C;C;;
+3;1;Nakid, Mr. Sahid;male;20;1;1;2653;15,7417;;C;C;;
+3;1;"Nakid, Mrs. Said (Waika ""Mary"" Mowad)";female;19;1;1;2653;15,7417;;C;C;;
+3;0;Nancarrow, Mr. William Henry;male;33;0;0;A./5. 3338;8,05;;S;;;
+3;0;Nankoff, Mr. Minko;male;;0;0;349218;7,8958;;S;;;
+3;0;Nasr, Mr. Mustafa;male;;0;0;2652;7,2292;;C;;;
+3;0;Naughton, Miss. Hannah;female;;0;0;365237;7,75;;Q;;;
+3;0;Nenkoff, Mr. Christo;male;;0;0;349234;7,8958;;S;;;
+3;1;Nicola-Yarred, Master. Elias;male;12;1;0;2651;11,2417;;C;C;;
+3;1;Nicola-Yarred, Miss. Jamila;female;14;1;0;2651;11,2417;;C;C;;
+3;0;Nieminen, Miss. Manta Josefina;female;29;0;0;3101297;7,925;;S;;;
+3;0;Niklasson, Mr. Samuel;male;28;0;0;363611;8,05;;S;;;
+3;1;Nilsson, Miss. Berta Olivia;female;18;0;0;347066;7,775;;S;D;;
+3;1;Nilsson, Miss. Helmina Josefina;female;26;0;0;347470;7,8542;;S;13;;
+3;0;Nilsson, Mr. August Ferdinand;male;21;0;0;350410;7,8542;;S;;;
+3;0;Nirva, Mr. Iisakki Antino Aijo;male;41;0;0;SOTON/O2 3101272;7,125;;S;;;Finland Sudbury, ON
+3;1;Niskanen, Mr. Juha;male;39;0;0;STON/O 2. 3101289;7,925;;S;9;;
+3;0;Nosworthy, Mr. Richard Cater;male;21;0;0;A/4. 39886;7,8;;S;;;
+3;0;Novel, Mr. Mansouer;male;28,5;0;0;2697;7,2292;;C;;181;
+3;1;Nysten, Miss. Anna Sofia;female;22;0;0;347081;7,75;;S;13;;
+3;0;Nysveen, Mr. Johan Hansen;male;61;0;0;345364;6,2375;;S;;;
+3;0;O'Brien, Mr. Thomas;male;;1;0;370365;15,5;;Q;;;
+3;0;O'Brien, Mr. Timothy;male;;0;0;330979;7,8292;;Q;;;
+3;1;"O'Brien, Mrs. Thomas (Johanna ""Hannah"" Godfrey)";female;;1;0;370365;15,5;;Q;;;
+3;0;O'Connell, Mr. Patrick D;male;;0;0;334912;7,7333;;Q;;;
+3;0;O'Connor, Mr. Maurice;male;;0;0;371060;7,75;;Q;;;
+3;0;O'Connor, Mr. Patrick;male;;0;0;366713;7,75;;Q;;;
+3;0;Odahl, Mr. Nils Martin;male;23;0;0;7267;9,225;;S;;;
+3;0;O'Donoghue, Ms. Bridget;female;;0;0;364856;7,75;;Q;;;
+3;1;O'Driscoll, Miss. Bridget;female;;0;0;14311;7,75;;Q;D;;
+3;1;"O'Dwyer, Miss. Ellen ""Nellie""";female;;0;0;330959;7,8792;;Q;;;
+3;1;Ohman, Miss. Velin;female;22;0;0;347085;7,775;;S;C;;
+3;1;O'Keefe, Mr. Patrick;male;;0;0;368402;7,75;;Q;B;;
+3;1;"O'Leary, Miss. Hanora ""Norah""";female;;0;0;330919;7,8292;;Q;13;;
+3;1;Olsen, Master. Artur Karl;male;9;0;1;C 17368;3,1708;;S;13;;
+3;0;Olsen, Mr. Henry Margido;male;28;0;0;C 4001;22,525;;S;;173;
+3;0;Olsen, Mr. Karl Siegwart Andreas;male;42;0;1;4579;8,4042;;S;;;
+3;0;Olsen, Mr. Ole Martin;male;;0;0;Fa 265302;7,3125;;S;;;
+3;0;Olsson, Mis

<TRUNCATED>

[16/37] ignite git commit: IGNITE-10535: SQL: moved reducer partition resolution logic to separate classes. This closes #5575.

Posted by ak...@apache.org.
IGNITE-10535: SQL: moved reducer partition resolution logic to separate classes. This closes #5575.


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

Branch: refs/heads/ignite-10189
Commit: 6613376d2cdd9bbe68dd7b3167cfd5c16a39f67e
Parents: bf75ef2
Author: devozerov <vo...@gridgain.com>
Authored: Thu Dec 6 17:47:50 2018 +0300
Committer: devozerov <vo...@gridgain.com>
Committed: Thu Dec 6 17:47:50 2018 +0300

----------------------------------------------------------------------
 .../h2/twostep/GridReduceQueryExecutor.java     | 648 +------------------
 .../h2/twostep/ReducePartitionMapResult.java    |  73 +++
 .../query/h2/twostep/ReducePartitionMapper.java | 638 ++++++++++++++++++
 .../h2/twostep/ReducePartitionsSpecializer.java |  61 ++
 4 files changed, 787 insertions(+), 633 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/6613376d/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
index 36287b3..905a4a3 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
@@ -22,16 +22,12 @@ import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.sql.Statement;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
 import java.util.Iterator;
 import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
-import java.util.Set;
 import java.util.UUID;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
@@ -47,7 +43,6 @@ import org.apache.ignite.IgniteClientDisconnectedException;
 import org.apache.ignite.IgniteException;
 import org.apache.ignite.IgniteLogger;
 import org.apache.ignite.IgniteSystemProperties;
-import org.apache.ignite.cache.PartitionLossPolicy;
 import org.apache.ignite.cache.query.QueryCancelledException;
 import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.events.DiscoveryEvent;
@@ -61,7 +56,6 @@ import org.apache.ignite.internal.managers.communication.GridMessageListener;
 import org.apache.ignite.internal.managers.eventstorage.GridLocalEventListener;
 import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
 import org.apache.ignite.internal.processors.cache.GridCacheContext;
-import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionState;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxSelectForUpdateFuture;
 import org.apache.ignite.internal.processors.cache.distributed.near.TxTopologyVersionFuture;
@@ -89,8 +83,6 @@ import org.apache.ignite.internal.processors.query.h2.twostep.msg.GridH2DmlReque
 import org.apache.ignite.internal.processors.query.h2.twostep.msg.GridH2DmlResponse;
 import org.apache.ignite.internal.processors.query.h2.twostep.msg.GridH2QueryRequest;
 import org.apache.ignite.internal.processors.query.h2.twostep.msg.GridH2SelectForUpdateTxDetails;
-import org.apache.ignite.internal.util.GridIntIterator;
-import org.apache.ignite.internal.util.GridIntList;
 import org.apache.ignite.internal.util.GridSpinBusyLock;
 import org.apache.ignite.internal.util.typedef.C2;
 import org.apache.ignite.internal.util.typedef.CIX2;
@@ -113,9 +105,6 @@ import org.jetbrains.annotations.Nullable;
 
 import static java.util.Collections.singletonList;
 import static org.apache.ignite.IgniteSystemProperties.IGNITE_SQL_RETRY_TIMEOUT;
-import static org.apache.ignite.cache.PartitionLossPolicy.READ_ONLY_SAFE;
-import static org.apache.ignite.cache.PartitionLossPolicy.READ_WRITE_SAFE;
-import static org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion.NONE;
 import static org.apache.ignite.internal.processors.cache.mvcc.MvccUtils.checkActive;
 import static org.apache.ignite.internal.processors.cache.mvcc.MvccUtils.mvccEnabled;
 import static org.apache.ignite.internal.processors.cache.mvcc.MvccUtils.tx;
@@ -138,9 +127,6 @@ public class GridReduceQueryExecutor {
     private static final String MERGE_INDEX_SORTED = "merge_sorted";
 
     /** */
-    private static final Set<ClusterNode> UNMAPPED_PARTS = Collections.emptySet();
-
-    /** */
     private GridKernalContext ctx;
 
     /** */
@@ -174,7 +160,12 @@ public class GridReduceQueryExecutor {
         }
     };
 
+    /** Partition mapper. */
+    private ReducePartitionMapper mapper;
+
     /**
+     * Constructor.
+     *
      * @param qryIdGen Query ID generator.
      * @param busyLock Busy lock.
      */
@@ -194,6 +185,8 @@ public class GridReduceQueryExecutor {
 
         log = ctx.log(GridReduceQueryExecutor.class);
 
+        mapper = new ReducePartitionMapper(ctx, log);
+
         ctx.io().addMessageListener(GridTopic.TOPIC_QUERY, new GridMessageListener() {
             @SuppressWarnings("deprecation")
             @Override public void onMessage(UUID nodeId, Object msg, byte plc) {
@@ -370,32 +363,6 @@ public class GridReduceQueryExecutor {
     }
 
     /**
-     * @param cacheIds Cache IDs.
-     * @return {@code true} If preloading is active.
-     */
-    private boolean isPreloadingActive(List<Integer> cacheIds) {
-        for (Integer cacheId : cacheIds) {
-            if (null == cacheContext(cacheId))
-                throw new CacheException(String.format("Cache not found on local node [cacheId=%d]", cacheId));
-
-            if (hasMovingPartitions(cacheContext(cacheId)))
-                return true;
-        }
-
-        return false;
-    }
-
-    /**
-     * @param cctx Cache context.
-     * @return {@code True} If cache has partitions in {@link GridDhtPartitionState#MOVING} state.
-     */
-    private boolean hasMovingPartitions(GridCacheContext<?, ?> cctx) {
-        assert cctx != null;
-
-        return !cctx.isLocal() && cctx.topology().hasMovingPartitions();
-    }
-
-    /**
      * @param cacheId Cache ID.
      * @return Cache context.
      */
@@ -404,154 +371,6 @@ public class GridReduceQueryExecutor {
     }
 
     /**
-     * @param topVer Topology version.
-     * @param cctx Cache context.
-     * @param parts Partitions.
-     */
-    private Map<ClusterNode, IntArray> stableDataNodesMap(AffinityTopologyVersion topVer,
-        final GridCacheContext<?, ?> cctx, @Nullable final int[] parts) {
-
-        Map<ClusterNode, IntArray> mapping = new HashMap<>();
-
-        // Explicit partitions mapping is not applicable to replicated cache.
-        if (cctx.isReplicated()) {
-            for (ClusterNode clusterNode : cctx.affinity().assignment(topVer).nodes())
-                mapping.put(clusterNode, null);
-
-            return mapping;
-        }
-
-        List<List<ClusterNode>> assignment = cctx.affinity().assignment(topVer).assignment();
-
-        boolean needPartsFilter = parts != null;
-
-        GridIntIterator iter = needPartsFilter ? new GridIntList(parts).iterator() :
-            U.forRange(0, cctx.affinity().partitions());
-
-        while(iter.hasNext()) {
-            int partId = iter.next();
-
-            List<ClusterNode> partNodes = assignment.get(partId);
-
-            if (!partNodes.isEmpty()) {
-                ClusterNode prim = partNodes.get(0);
-
-                if (!needPartsFilter) {
-                    mapping.put(prim, null);
-
-                    continue;
-                }
-
-                IntArray partIds = mapping.get(prim);
-
-                if (partIds == null) {
-                    partIds = new IntArray();
-
-                    mapping.put(prim, partIds);
-                }
-
-                partIds.add(partId);
-            }
-        }
-
-        return mapping;
-    }
-
-    /**
-     * Load failed partition reservation.
-     *
-     * @param msg Message.
-     */
-    private void logRetry(String msg) {
-        log.info(msg);
-    }
-
-    /**
-     * @param isReplicatedOnly If we must only have replicated caches.
-     * @param topVer Topology version.
-     * @param cacheIds Participating cache IDs.
-     * @param parts Partitions.
-     * @param qryId Query ID.
-     * @return Data nodes or {@code null} if repartitioning started and we need to retry.
-     */
-    private Map<ClusterNode, IntArray> stableDataNodes(boolean isReplicatedOnly, AffinityTopologyVersion topVer,
-        List<Integer> cacheIds, int[] parts, long qryId) {
-        GridCacheContext<?, ?> cctx = cacheContext(cacheIds.get(0));
-
-        // If the first cache is not partitioned, find it (if it's present) and move it to index 0.
-        if (!cctx.isPartitioned()) {
-            for (int cacheId = 1; cacheId < cacheIds.size(); cacheId++) {
-                GridCacheContext<?, ?> currCctx = cacheContext(cacheIds.get(cacheId));
-
-                if (currCctx.isPartitioned()) {
-                    Collections.swap(cacheIds, 0, cacheId);
-
-                    cctx = currCctx;
-
-                    break;
-                }
-            }
-        }
-
-        Map<ClusterNode, IntArray> map = stableDataNodesMap(topVer, cctx, parts);
-
-        Set<ClusterNode> nodes = map.keySet();
-
-        if (F.isEmpty(map))
-            throw new CacheException("Failed to find data nodes for cache: " + cctx.name());
-
-        for (int i = 1; i < cacheIds.size(); i++) {
-            GridCacheContext<?,?> extraCctx = cacheContext(cacheIds.get(i));
-
-            String extraCacheName = extraCctx.name();
-
-            if (extraCctx.isLocal())
-                continue; // No consistency guaranties for local caches.
-
-            if (isReplicatedOnly && !extraCctx.isReplicated())
-                throw new CacheException("Queries running on replicated cache should not contain JOINs " +
-                    "with partitioned tables [replicatedCache=" + cctx.name() +
-                    ", partitionedCache=" + extraCacheName + "]");
-
-            Set<ClusterNode> extraNodes = stableDataNodesMap(topVer, extraCctx, parts).keySet();
-
-            if (F.isEmpty(extraNodes))
-                throw new CacheException("Failed to find data nodes for cache: " + extraCacheName);
-
-            boolean disjoint;
-
-            if (extraCctx.isReplicated()) {
-                if (isReplicatedOnly) {
-                    nodes.retainAll(extraNodes);
-
-                    disjoint = map.isEmpty();
-                }
-                else
-                    disjoint = !extraNodes.containsAll(nodes);
-            }
-            else
-                disjoint = !extraNodes.equals(nodes);
-
-            if (disjoint) {
-                if (isPreloadingActive(cacheIds)) {
-                    logRetry("Failed to calculate nodes for SQL query (got disjoint node map during rebalance) " +
-                        "[qryId=" + qryId + ", affTopVer=" + topVer + ", cacheIds=" + cacheIds +
-                        ", parts=" + (parts == null ? "[]" : Arrays.toString(parts)) +
-                        ", replicatedOnly=" + isReplicatedOnly + ", lastCache=" + extraCctx.name() +
-                        ", lastCacheId=" + extraCctx.cacheId() + ']');
-
-                    return null; // Retry.
-                }
-                else
-                    throw new CacheException("Caches have distinct sets of data nodes [cache1=" + cctx.name() +
-                        ", cache2=" + extraCacheName + "]");
-            }
-        }
-
-        return map;
-    }
-
-    /**
      * @param schemaName Schema name.
      * @param qry Query.
      * @param keepBinary Keep binary.
@@ -686,8 +505,8 @@ public class GridReduceQueryExecutor {
             if (qry.isLocal())
                 nodes = singletonList(ctx.discovery().localNode());
             else {
-                NodesForPartitionsResult nodesParts =
-                    nodesForPartitions(cacheIds, topVer, parts, isReplicatedOnly, qryReqId);
+                ReducePartitionMapResult nodesParts =
+                    mapper.nodesForPartitions(cacheIds, topVer, parts, isReplicatedOnly, qryReqId);
 
                 nodes = nodesParts.nodes();
                 partsMap = nodesParts.partitionsMap();
@@ -843,7 +662,7 @@ public class GridReduceQueryExecutor {
                     req.mvccSnapshot(mvccTracker.snapshot());
 
                 final C2<ClusterNode, Message, Message> pspec =
-                    (parts == null ? null : new ExplicitPartitionsSpecializer(qryMap));
+                    (parts == null ? null : new ReducePartitionsSpecializer(qryMap));
 
                 final C2<ClusterNode, Message, Message> spec;
 
@@ -905,7 +724,7 @@ public class GridReduceQueryExecutor {
                 else // Send failed.
                     retry = true;
 
-                Iterator<List<?>> resIter = null;
+                Iterator<List<?>> resIter;
 
                 if (!retry) {
                     if (skipMergeTbl) {
@@ -1050,7 +869,8 @@ public class GridReduceQueryExecutor {
 
         final long reqId = qryIdGen.incrementAndGet();
 
-        NodesForPartitionsResult nodesParts = nodesForPartitions(cacheIds, topVer, parts, isReplicatedOnly, reqId);
+        ReducePartitionMapResult nodesParts =
+            mapper.nodesForPartitions(cacheIds, topVer, parts, isReplicatedOnly, reqId);
 
         final GridRunningQueryInfo qryInfo = new GridRunningQueryInfo(reqId, selectQry, GridCacheQueryType.SQL_FIELDS,
             schemaName, U.currentTimeMillis(), cancel, false);
@@ -1105,8 +925,8 @@ public class GridReduceQueryExecutor {
             Map<ClusterNode, IntArray> partsMap = (nodesParts.queryPartitionsMap() != null) ?
                 nodesParts.queryPartitionsMap() : nodesParts.partitionsMap();
 
-            ExplicitPartitionsSpecializer partsSpec = (parts == null) ? null :
-                new ExplicitPartitionsSpecializer(partsMap);
+            ReducePartitionsSpecializer partsSpec = (parts == null) ? null :
+                new ReducePartitionsSpecializer(partsMap);
 
             final Collection<ClusterNode> finalNodes = nodes;
 
@@ -1290,286 +1110,6 @@ public class GridReduceQueryExecutor {
     }
 
     /**
-     * Calculates data nodes for replicated caches on unstable topology.
-     *
-     * @param cacheIds Cache IDs.
-     * @param qryId Query ID.
-     * @return Collection of all data nodes owning all the caches or {@code null} for retry.
-     */
-    private Collection<ClusterNode> replicatedUnstableDataNodes(List<Integer> cacheIds, long qryId) {
-        int i = 0;
-
-        GridCacheContext<?, ?> cctx = cacheContext(cacheIds.get(i++));
-
-        // The main cache is allowed to be partitioned.
-        if (!cctx.isReplicated()) {
-            assert cacheIds.size() > 1: "no extra replicated caches with partitioned main cache";
-
-            // Just replace the main cache with the first one extra.
-            cctx = cacheContext(cacheIds.get(i++));
-
-            assert cctx.isReplicated(): "all the extra caches must be replicated here";
-        }
-
-        Set<ClusterNode> nodes = replicatedUnstableDataNodes(cctx, qryId);
-
-        if (F.isEmpty(nodes))
-            return null; // Retry.
-
-        for (;i < cacheIds.size(); i++) {
-            GridCacheContext<?, ?> extraCctx = cacheContext(cacheIds.get(i));
-
-            if (extraCctx.isLocal())
-                continue;
-
-            if (!extraCctx.isReplicated())
-                throw new CacheException("Queries running on replicated cache should not contain JOINs " +
-                    "with tables in partitioned caches [replicatedCache=" + cctx.name() + ", " +
-                    "partitionedCache=" + extraCctx.name() + "]");
-
-            Set<ClusterNode> extraOwners = replicatedUnstableDataNodes(extraCctx, qryId);
-
-            if (F.isEmpty(extraOwners))
-                return null; // Retry.
-
-            nodes.retainAll(extraOwners);
-
-            if (nodes.isEmpty()) {
-                logRetry("Failed to calculate nodes for SQL query (got disjoint node map for REPLICATED caches " +
-                    "during rebalance) [qryId=" + qryId + ", cacheIds=" + cacheIds +
-                    ", lastCache=" + extraCctx.name() + ", lastCacheId=" + extraCctx.cacheId() + ']');
-
-                return null; // Retry.
-            }
-        }
-
-        return nodes;
-    }
-
-    /**
-     * @param grpId Cache group ID.
-     * @param topVer Topology version.
-     * @return Collection of data nodes.
-     */
-    private Collection<ClusterNode> dataNodes(int grpId, AffinityTopologyVersion topVer) {
-        Collection<ClusterNode> res = ctx.discovery().cacheGroupAffinityNodes(grpId, topVer);
-
-        return res != null ? res : Collections.<ClusterNode>emptySet();
-    }
-
-    /**
-     * Collects all the nodes owning all the partitions for the given replicated cache.
-     *
-     * @param cctx Cache context.
-     * @param qryId Query ID.
-     * @return Owning nodes or {@code null} if we can't find owners for some partitions.
-     */
-    private Set<ClusterNode> replicatedUnstableDataNodes(GridCacheContext<?,?> cctx, long qryId) {
-        assert cctx.isReplicated() : cctx.name() + " must be replicated";
-
-        String cacheName = cctx.name();
-
-        Set<ClusterNode> dataNodes = new HashSet<>(dataNodes(cctx.groupId(), NONE));
-
-        if (dataNodes.isEmpty())
-            throw new CacheException("Failed to find data nodes for cache: " + cacheName);
-
-        // Find all the nodes owning all the partitions for replicated cache.
-        for (int p = 0, parts = cctx.affinity().partitions(); p < parts; p++) {
-            List<ClusterNode> owners = cctx.topology().owners(p);
-
-            if (F.isEmpty(owners)) {
-                logRetry("Failed to calculate nodes for SQL query (partition of a REPLICATED cache has no owners) [" +
-                    "qryId=" + qryId + ", cacheName=" + cctx.name() + ", cacheId=" + cctx.cacheId() +
-                    ", part=" + p + ']');
-
-                return null; // Retry.
-            }
-
-            dataNodes.retainAll(owners);
-
-            if (dataNodes.isEmpty()) {
-                logRetry("Failed to calculate nodes for SQL query (partitions of a REPLICATED has no common owners) [" +
-                    "qryId=" + qryId + ", cacheName=" + cctx.name() + ", cacheId=" + cctx.cacheId() +
-                    ", lastPart=" + p + ']');
-
-                return null; // Retry.
-            }
-        }
-
-        return dataNodes;
-    }
-
-    /**
-     * Calculates partition mapping for partitioned cache on unstable topology.
-     *
-     * @param cacheIds Cache IDs.
-     * @param qryId Query ID.
-     * @return Partition mapping or {@code null} if we can't calculate it due to repartitioning and we need to retry.
-     */
-    @SuppressWarnings("unchecked")
-    private Map<ClusterNode, IntArray> partitionedUnstableDataNodes(List<Integer> cacheIds, long qryId) {
-        // If the main cache is replicated, just replace it with the first partitioned.
-        GridCacheContext<?,?> cctx = findFirstPartitioned(cacheIds);
-
-        final int partsCnt = cctx.affinity().partitions();
-
-        if (cacheIds.size() > 1) { // Check correct number of partitions for partitioned caches.
-            for (Integer cacheId : cacheIds) {
-                GridCacheContext<?, ?> extraCctx = cacheContext(cacheId);
-
-                if (extraCctx.isReplicated() || extraCctx.isLocal())
-                    continue;
-
-                int parts = extraCctx.affinity().partitions();
-
-                if (parts != partsCnt)
-                    throw new CacheException("Number of partitions must be the same for correct collocation [cache1=" +
-                        cctx.name() + ", parts1=" + partsCnt + ", cache2=" + extraCctx.name() +
-                        ", parts2=" + parts + "]");
-            }
-        }
-
-        Set<ClusterNode>[] partLocs = new Set[partsCnt];
-
-        // Fill partition locations for main cache.
-        for (int p = 0; p < partsCnt; p++) {
-            List<ClusterNode> owners = cctx.topology().owners(p);
-
-            if (F.isEmpty(owners)) {
-                // Handle special case: no mapping is configured for a partition.
-                if (F.isEmpty(cctx.affinity().assignment(NONE).get(p))) {
-                    partLocs[p] = UNMAPPED_PARTS; // Mark unmapped partition.
-
-                    continue;
-                }
-                else if (!F.isEmpty(dataNodes(cctx.groupId(), NONE))) {
-                    logRetry("Failed to calculate nodes for SQL query (partition has no owners, but corresponding " +
-                        "cache group has data nodes) [qryId=" + qryId + ", cacheIds=" + cacheIds +
-                        ", cacheName=" + cctx.name() + ", cacheId=" + cctx.cacheId() + ", part=" + p +
-                        ", cacheGroupId=" + cctx.groupId() + ']');
-
-                    return null; // Retry.
-                }
-
-                throw new CacheException("Failed to find data nodes [cache=" + cctx.name() + ", part=" + p + "]");
-            }
-
-            partLocs[p] = new HashSet<>(owners);
-        }
-
-        if (cacheIds.size() > 1) {
-            // Find owner intersections for each participating partitioned cache partition.
-            // We need this for logical collocation between different partitioned caches with the same affinity.
-            for (Integer cacheId : cacheIds) {
-                GridCacheContext<?, ?> extraCctx = cacheContext(cacheId);
-
-                // This is possible if we have replaced a replicated cache with a partitioned one earlier.
-                if (cctx == extraCctx)
-                    continue;
-
-                if (extraCctx.isReplicated() || extraCctx.isLocal())
-                    continue;
-
-                for (int p = 0, parts = extraCctx.affinity().partitions(); p < parts; p++) {
-                    List<ClusterNode> owners = extraCctx.topology().owners(p);
-
-                    if (partLocs[p] == UNMAPPED_PARTS)
-                        continue; // Skip unmapped partitions.
-
-                    if (F.isEmpty(owners)) {
-                        if (!F.isEmpty(dataNodes(extraCctx.groupId(), NONE))) {
-                            logRetry("Failed to calculate nodes for SQL query (partition has no owners, but " +
-                                "corresponding cache group has data nodes) [qryId=" + qryId +
-                                ", cacheIds=" + cacheIds + ", cacheName=" + extraCctx.name() +
-                                ", cacheId=" + extraCctx.cacheId() + ", part=" + p +
-                                ", cacheGroupId=" + extraCctx.groupId() + ']');
-
-                            return null; // Retry.
-                        }
-
-                        throw new CacheException("Failed to find data nodes [cache=" + extraCctx.name() +
-                            ", part=" + p + "]");
-                    }
-
-                    if (partLocs[p] == null)
-                        partLocs[p] = new HashSet<>(owners);
-                    else {
-                        partLocs[p].retainAll(owners); // Intersection of owners.
-
-                        if (partLocs[p].isEmpty()) {
-                            logRetry("Failed to calculate nodes for SQL query (caches have no common data nodes for " +
-                                "partition) [qryId=" + qryId + ", cacheIds=" + cacheIds +
-                                ", lastCacheName=" + extraCctx.name() + ", lastCacheId=" + extraCctx.cacheId() +
-                                ", part=" + p + ']');
-
-                            return null; // Intersection is empty -> retry.
-                        }
-                    }
-                }
-            }
-
-            // Filter nodes where not all the replicated caches loaded.
-            for (Integer cacheId : cacheIds) {
-                GridCacheContext<?, ?> extraCctx = cacheContext(cacheId);
-
-                if (!extraCctx.isReplicated())
-                    continue;
-
-                Set<ClusterNode> dataNodes = replicatedUnstableDataNodes(extraCctx, qryId);
-
-                if (F.isEmpty(dataNodes))
-                    return null; // Retry.
-
-                int part = 0;
-
-                for (Set<ClusterNode> partLoc : partLocs) {
-                    if (partLoc == UNMAPPED_PARTS)
-                        continue; // Skip unmapped partition.
-
-                    partLoc.retainAll(dataNodes);
-
-                    if (partLoc.isEmpty()) {
-                        logRetry("Failed to calculate nodes for SQL query (caches have no common data nodes for " +
-                            "partition) [qryId=" + qryId + ", cacheIds=" + cacheIds +
-                            ", lastReplicatedCacheName=" + extraCctx.name() +
-                            ", lastReplicatedCacheId=" + extraCctx.cacheId() + ", part=" + part + ']');
-
-                        return null; // Retry.
-                    }
-
-                    part++;
-                }
-            }
-        }
-
-        // Collect the final partitions mapping.
-        Map<ClusterNode, IntArray> res = new HashMap<>();
-
-        // Here partitions in all IntArray's will be sorted in ascending order, this is important.
-        for (int p = 0; p < partLocs.length; p++) {
-            Set<ClusterNode> pl = partLocs[p];
-
-            // Skip unmapped partitions.
-            if (pl == UNMAPPED_PARTS)
-                continue;
-
-            assert !F.isEmpty(pl) : pl;
-
-            ClusterNode n = pl.size() == 1 ? F.first(pl) : F.rand(pl);
-
-            IntArray parts = res.get(n);
-
-            if (parts == null)
-                res.put(n, parts = new IntArray());
-
-            parts.add(p);
-        }
-
-        return res;
-    }
-
-    /**
      * @param c Connection.
      * @param qry Query.
      * @param params Query parameters.
@@ -1681,63 +1221,6 @@ public class GridReduceQueryExecutor {
     }
 
     /**
-     * Evaluates nodes and nodes to partitions map given a list of cache ids, topology version and partitions.
-     *
-     * @param cacheIds Cache ids.
-     * @param topVer Topology version.
-     * @param parts Partitions array.
-     * @param isReplicatedOnly Allow only replicated caches.
-     * @param qryId Query ID.
-     * @return Result.
-     */
-    private NodesForPartitionsResult nodesForPartitions(List<Integer> cacheIds, AffinityTopologyVersion topVer,
-        int[] parts, boolean isReplicatedOnly, long qryId) {
-        Collection<ClusterNode> nodes = null;
-        Map<ClusterNode, IntArray> partsMap = null;
-        Map<ClusterNode, IntArray> qryMap = null;
-
-        for (int cacheId : cacheIds) {
-            GridCacheContext<?, ?> cctx = cacheContext(cacheId);
-
-            PartitionLossPolicy plc = cctx.config().getPartitionLossPolicy();
-
-            if (plc != READ_ONLY_SAFE && plc != READ_WRITE_SAFE)
-                continue;
-
-            Collection<Integer> lostParts = cctx.topology().lostPartitions();
-
-            for (int part : lostParts) {
-                if (parts == null || Arrays.binarySearch(parts, part) >= 0) {
-                    throw new CacheException("Failed to execute query because cache partition has been " +
-                        "lost [cacheName=" + cctx.name() + ", part=" + part + ']');
-                }
-            }
-        }
-
-        if (isPreloadingActive(cacheIds)) {
-            if (isReplicatedOnly)
-                nodes = replicatedUnstableDataNodes(cacheIds, qryId);
-            else {
-                partsMap = partitionedUnstableDataNodes(cacheIds, qryId);
-
-                if (partsMap != null) {
-                    qryMap = narrowForQuery(partsMap, parts);
-
-                    nodes = qryMap == null ? null : qryMap.keySet();
-                }
-            }
-        }
-        else {
-            qryMap = stableDataNodes(isReplicatedOnly, topVer, cacheIds, parts, qryId);
-
-            if (qryMap != null)
-                nodes = qryMap.keySet();
-        }
-
-        return new NodesForPartitionsResult(nodes, partsMap, qryMap);
-    }
-
-    /**
      * @param conn Connection.
      * @param qry Query.
      * @param explain Explain.
@@ -1881,32 +1364,6 @@ public class GridReduceQueryExecutor {
         }
     }
 
-    /** */
-    private Map<ClusterNode, IntArray> narrowForQuery(Map<ClusterNode, IntArray> partsMap, int[] parts) {
-        if (parts == null)
-            return partsMap;
-
-        Map<ClusterNode, IntArray> cp = U.newHashMap(partsMap.size());
-
-        for (Map.Entry<ClusterNode, IntArray> entry : partsMap.entrySet()) {
-            IntArray filtered = new IntArray(parts.length);
-
-            IntArray orig = entry.getValue();
-
-            for (int i = 0; i < orig.size(); i++) {
-                int p = orig.get(i);
-
-                if (Arrays.binarySearch(parts, p) >= 0)
-                    filtered.add(p);
-            }
-
-            if (filtered.size() > 0)
-                cp.put(entry.getKey(), filtered);
-        }
-
-        return cp.isEmpty() ? null : cp;
-    }
-
     /**
      * @param qryTimeout Query timeout.
      * @return Query retry timeout.
@@ -1917,79 +1374,4 @@ public class GridReduceQueryExecutor {
 
         return IgniteSystemProperties.getLong(IGNITE_SQL_RETRY_TIMEOUT, DFLT_RETRY_TIMEOUT);
     }
-
-    /** */
-    private static class ExplicitPartitionsSpecializer implements C2<ClusterNode, Message, Message> {
-        /** Partitions map. */
-        private final Map<ClusterNode, IntArray> partsMap;
-
-        /**
-         * @param partsMap Partitions map.
-         */
-        public ExplicitPartitionsSpecializer(Map<ClusterNode, IntArray> partsMap) {
-            this.partsMap = partsMap;
-        }
-
-        /** {@inheritDoc} */
-        @Override public Message apply(ClusterNode node, Message msg) {
-            if (msg instanceof GridH2QueryRequest) {
-                GridH2QueryRequest rq = new GridH2QueryRequest((GridH2QueryRequest)msg);
-
-                rq.queryPartitions(toArray(partsMap.get(node)));
-
-                return rq;
-            } else if (msg instanceof GridH2DmlRequest) {
-                GridH2DmlRequest rq = new GridH2DmlRequest((GridH2DmlRequest)msg);
-
-                rq.queryPartitions(toArray(partsMap.get(node)));
-
-                return rq;
-            }
-
-            return msg;
-        }
-    }
-
-    /**
-     * Result of nodes to partitions mapping for a query or update.
-     */
-    static class NodesForPartitionsResult {
-        /** */
-        final Collection<ClusterNode> nodes;
-
-        /** */
-        final Map<ClusterNode, IntArray> partsMap;
-
-        /** */
-        final Map<ClusterNode, IntArray> qryMap;
-
-        /** */
-        NodesForPartitionsResult(Collection<ClusterNode> nodes, Map<ClusterNode, IntArray> partsMap,
-            Map<ClusterNode, IntArray> qryMap) {
-            this.nodes = nodes;
-            this.partsMap = partsMap;
-            this.qryMap = qryMap;
-        }
-
-        /**
-         * @return Collection of nodes a message shall be sent to.
-         */
-        Collection<ClusterNode> nodes() {
-            return nodes;
-        }
-
-        /**
-         * @return Maps a node to partition array.
-         */
-        Map<ClusterNode, IntArray> partitionsMap() {
-            return partsMap;
-        }
-
-        /**
-         * @return Maps a node to partition array.
-         */
-        Map<ClusterNode, IntArray> queryPartitionsMap() {
-            return qryMap;
-        }
-    }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/6613376d/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/ReducePartitionMapResult.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/ReducePartitionMapResult.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/ReducePartitionMapResult.java
new file mode 100644
index 0000000..83bbf8e
--- /dev/null
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/ReducePartitionMapResult.java
@@ -0,0 +1,73 @@
+/*
+ * 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.twostep;
+
+import org.apache.ignite.cluster.ClusterNode;
+import org.h2.util.IntArray;
+
+import java.util.Collection;
+import java.util.Map;
+
+/**
+ * Result of nodes to partitions mapping for a query or update.
+ */
+public class ReducePartitionMapResult {
+    /** */
+    private final Collection<ClusterNode> nodes;
+
+    /** */
+    private final Map<ClusterNode, IntArray> partsMap;
+
+    /** */
+    private final Map<ClusterNode, IntArray> qryMap;
+
+    /**
+     * Constructor.
+     *
+     * @param nodes Nodes.
+     * @param partsMap Partitions map.
+     * @param qryMap Nodes map.
+     */
+    public ReducePartitionMapResult(Collection<ClusterNode> nodes, Map<ClusterNode, IntArray> partsMap,
+        Map<ClusterNode, IntArray> qryMap) {
+        this.nodes = nodes;
+        this.partsMap = partsMap;
+        this.qryMap = qryMap;
+    }
+
+    /**
+     * @return Collection of nodes a message shall be sent to.
+     */
+    public Collection<ClusterNode> nodes() {
+        return nodes;
+    }
+
+    /**
+     * @return Maps a node to partition array.
+     */
+    public Map<ClusterNode, IntArray> partitionsMap() {
+        return partsMap;
+    }
+
+    /**
+     * @return Maps a node to partition array.
+     */
+    public Map<ClusterNode, IntArray> queryPartitionsMap() {
+        return qryMap;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/6613376d/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/ReducePartitionMapper.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/ReducePartitionMapper.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/ReducePartitionMapper.java
new file mode 100644
index 0000000..1112d19
--- /dev/null
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/ReducePartitionMapper.java
@@ -0,0 +1,638 @@
+/*
+ * 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.twostep;
+
+import org.apache.ignite.IgniteLogger;
+import org.apache.ignite.cache.PartitionLossPolicy;
+import org.apache.ignite.cluster.ClusterNode;
+import org.apache.ignite.internal.GridKernalContext;
+import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
+import org.apache.ignite.internal.processors.cache.GridCacheContext;
+import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionState;
+import org.apache.ignite.internal.util.GridIntIterator;
+import org.apache.ignite.internal.util.GridIntList;
+import org.apache.ignite.internal.util.typedef.F;
+import org.apache.ignite.internal.util.typedef.internal.U;
+import org.h2.util.IntArray;
+import org.jetbrains.annotations.Nullable;
+
+import javax.cache.CacheException;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import static org.apache.ignite.cache.PartitionLossPolicy.READ_ONLY_SAFE;
+import static org.apache.ignite.cache.PartitionLossPolicy.READ_WRITE_SAFE;
+import static org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion.NONE;
+
+/**
+ * Reduce partition mapper.
+ */
+public class ReducePartitionMapper {
+    /** */
+    private static final Set<ClusterNode> UNMAPPED_PARTS = Collections.emptySet();
+
+    /** Kernal context. */
+    private final GridKernalContext ctx;
+
+    /** */
+    private final IgniteLogger log;
+
+    /**
+     * Constructor.
+     *
+     * @param ctx Kernal context.
+     */
+    public ReducePartitionMapper(GridKernalContext ctx, IgniteLogger log) {
+        this.ctx = ctx;
+        this.log = log;
+    }
+
+    /**
+     * Evaluates nodes and nodes to partitions map given a list of cache ids, topology version and partitions.
+     *
+     * @param cacheIds Cache ids.
+     * @param topVer Topology version.
+     * @param parts Partitions array.
+     * @param isReplicatedOnly Allow only replicated caches.
+     * @param qryId Query ID.
+     * @return Result.
+     */
+    public ReducePartitionMapResult nodesForPartitions(List<Integer> cacheIds, AffinityTopologyVersion topVer,
+        int[] parts, boolean isReplicatedOnly, long qryId) {
+        Collection<ClusterNode> nodes = null;
+        Map<ClusterNode, IntArray> partsMap = null;
+        Map<ClusterNode, IntArray> qryMap = null;
+
+        for (int cacheId : cacheIds) {
+            GridCacheContext<?, ?> cctx = cacheContext(cacheId);
+
+            PartitionLossPolicy plc = cctx.config().getPartitionLossPolicy();
+
+            if (plc != READ_ONLY_SAFE && plc != READ_WRITE_SAFE)
+                continue;
+
+            Collection<Integer> lostParts = cctx.topology().lostPartitions();
+
+            for (int part : lostParts) {
+                if (parts == null || Arrays.binarySearch(parts, part) >= 0) {
+                    throw new CacheException("Failed to execute query because cache partition has been " +
+                        "lost [cacheName=" + cctx.name() + ", part=" + part + ']');
+                }
+            }
+        }
+
+        if (isPreloadingActive(cacheIds)) {
+            if (isReplicatedOnly)
+                nodes = replicatedUnstableDataNodes(cacheIds, qryId);
+            else {
+                partsMap = partitionedUnstableDataNodes(cacheIds, qryId);
+
+                if (partsMap != null) {
+                    qryMap = narrowForQuery(partsMap, parts);
+
+                    nodes = qryMap == null ? null : qryMap.keySet();
+                }
+            }
+        }
+        else {
+            qryMap = stableDataNodes(isReplicatedOnly, topVer, cacheIds, parts, qryId);
+
+            if (qryMap != null)
+                nodes = qryMap.keySet();
+        }
+
+        return new ReducePartitionMapResult(nodes, partsMap, qryMap);
+    }
+
+    /**
+     * @param cacheId Cache ID.
+     * @return Cache context.
+     */
+    private GridCacheContext<?,?> cacheContext(Integer cacheId) {
+        return ctx.cache().context().cacheContext(cacheId);
+    }
+
+    /**
+     * @param cacheIds Cache IDs.
+     * @return {@code true} If preloading is active.
+     */
+    private boolean isPreloadingActive(List<Integer> cacheIds) {
+        for (Integer cacheId : cacheIds) {
+            if (null == cacheContext(cacheId))
+                throw new CacheException(String.format("Cache not found on local node [cacheId=%d]", cacheId));
+
+            if (hasMovingPartitions(cacheContext(cacheId)))
+                return true;
+        }
+
+        return false;
+    }
+
+    /**
+     * @param cctx Cache context.
+     * @return {@code True} If cache has partitions in {@link GridDhtPartitionState#MOVING} state.
+     */
+    private static boolean hasMovingPartitions(GridCacheContext<?, ?> cctx) {
+        assert cctx != null;
+
+        return !cctx.isLocal() && cctx.topology().hasMovingPartitions();
+    }
+
+    /**
+     * @param isReplicatedOnly If we must only have replicated caches.
+     * @param topVer Topology version.
+     * @param cacheIds Participating cache IDs.
+     * @param parts Partitions.
+     * @param qryId Query ID.
+     * @return Data nodes or {@code null} if repartitioning started and we need to retry.
+     */
+    private Map<ClusterNode, IntArray> stableDataNodes(boolean isReplicatedOnly, AffinityTopologyVersion topVer,
+        List<Integer> cacheIds, int[] parts, long qryId) {
+        GridCacheContext<?, ?> cctx = cacheContext(cacheIds.get(0));
+
+        // If the first cache is not partitioned, find it (if it's present) and move it to index 0.
+        if (!cctx.isPartitioned()) {
+            for (int cacheId = 1; cacheId < cacheIds.size(); cacheId++) {
+                GridCacheContext<?, ?> currCctx = cacheContext(cacheIds.get(cacheId));
+
+                if (currCctx.isPartitioned()) {
+                    Collections.swap(cacheIds, 0, cacheId);
+
+                    cctx = currCctx;
+
+                    break;
+                }
+            }
+        }
+
+        Map<ClusterNode, IntArray> map = stableDataNodesMap(topVer, cctx, parts);
+
+        Set<ClusterNode> nodes = map.keySet();
+
+        if (F.isEmpty(map))
+            throw new CacheException("Failed to find data nodes for cache: " + cctx.name());
+
+        for (int i = 1; i < cacheIds.size(); i++) {
+            GridCacheContext<?,?> extraCctx = cacheContext(cacheIds.get(i));
+
+            String extraCacheName = extraCctx.name();
+
+            if (extraCctx.isLocal())
+                continue; // No consistency guaranties for local caches.
+
+            if (isReplicatedOnly && !extraCctx.isReplicated())
+                throw new CacheException("Queries running on replicated cache should not contain JOINs " +
+                    "with partitioned tables [replicatedCache=" + cctx.name() +
+                    ", partitionedCache=" + extraCacheName + "]");
+
+            Set<ClusterNode> extraNodes = stableDataNodesMap(topVer, extraCctx, parts).keySet();
+
+            if (F.isEmpty(extraNodes))
+                throw new CacheException("Failed to find data nodes for cache: " + extraCacheName);
+
+            boolean disjoint;
+
+            if (extraCctx.isReplicated()) {
+                if (isReplicatedOnly) {
+                    nodes.retainAll(extraNodes);
+
+                    disjoint = map.isEmpty();
+                }
+                else
+                    disjoint = !extraNodes.containsAll(nodes);
+            }
+            else
+                disjoint = !extraNodes.equals(nodes);
+
+            if (disjoint) {
+                if (isPreloadingActive(cacheIds)) {
+                    logRetry("Failed to calculate nodes for SQL query (got disjoint node map during rebalance) " +
+                        "[qryId=" + qryId + ", affTopVer=" + topVer + ", cacheIds=" + cacheIds +
+                        ", parts=" + (parts == null ? "[]" : Arrays.toString(parts)) +
+                        ", replicatedOnly=" + isReplicatedOnly + ", lastCache=" + extraCctx.name() +
+                        ", lastCacheId=" + extraCctx.cacheId() + ']');
+
+                    return null; // Retry.
+                }
+                else
+                    throw new CacheException("Caches have distinct sets of data nodes [cache1=" + cctx.name() +
+                        ", cache2=" + extraCacheName + "]");
+            }
+        }
+
+        return map;
+    }
+
+    /**
+     * @param topVer Topology version.
+     * @param cctx Cache context.
+     * @param parts Partitions.
+     */
+    private Map<ClusterNode, IntArray> stableDataNodesMap(AffinityTopologyVersion topVer,
+        final GridCacheContext<?, ?> cctx, @Nullable final int[] parts) {
+
+        Map<ClusterNode, IntArray> mapping = new HashMap<>();
+
+        // Explicit partitions mapping is not applicable to replicated cache.
+        if (cctx.isReplicated()) {
+            for (ClusterNode clusterNode : cctx.affinity().assignment(topVer).nodes())
+                mapping.put(clusterNode, null);
+
+            return mapping;
+        }
+
+        List<List<ClusterNode>> assignment = cctx.affinity().assignment(topVer).assignment();
+
+        boolean needPartsFilter = parts != null;
+
+        GridIntIterator iter = needPartsFilter ? new GridIntList(parts).iterator() :
+            U.forRange(0, cctx.affinity().partitions());
+
+        while(iter.hasNext()) {
+            int partId = iter.next();
+
+            List<ClusterNode> partNodes = assignment.get(partId);
+
+            if (!partNodes.isEmpty()) {
+                ClusterNode prim = partNodes.get(0);
+
+                if (!needPartsFilter) {
+                    mapping.put(prim, null);
+
+                    continue;
+                }
+
+                IntArray partIds = mapping.get(prim);
+
+                if (partIds == null) {
+                    partIds = new IntArray();
+
+                    mapping.put(prim, partIds);
+                }
+
+                partIds.add(partId);
+            }
+        }
+
+        return mapping;
+    }
+
+    /**
+     * Calculates partition mapping for partitioned cache on unstable topology.
+     *
+     * @param cacheIds Cache IDs.
+     * @param qryId Query ID.
+     * @return Partition mapping or {@code null} if we can't calculate it due to repartitioning and we need to retry.
+     */
+    @SuppressWarnings("unchecked")
+    private Map<ClusterNode, IntArray> partitionedUnstableDataNodes(List<Integer> cacheIds, long qryId) {
+        // If the main cache is replicated, just replace it with the first partitioned.
+        GridCacheContext<?,?> cctx = findFirstPartitioned(cacheIds);
+
+        final int partsCnt = cctx.affinity().partitions();
+
+        if (cacheIds.size() > 1) { // Check correct number of partitions for partitioned caches.
+            for (Integer cacheId : cacheIds) {
+                GridCacheContext<?, ?> extraCctx = cacheContext(cacheId);
+
+                if (extraCctx.isReplicated() || extraCctx.isLocal())
+                    continue;
+
+                int parts = extraCctx.affinity().partitions();
+
+                if (parts != partsCnt)
+                    throw new CacheException("Number of partitions must be the same for correct collocation [cache1=" +
+                        cctx.name() + ", parts1=" + partsCnt + ", cache2=" + extraCctx.name() +
+                        ", parts2=" + parts + "]");
+            }
+        }
+
+        Set<ClusterNode>[] partLocs = new Set[partsCnt];
+
+        // Fill partition locations for main cache.
+        for (int p = 0; p < partsCnt; p++) {
+            List<ClusterNode> owners = cctx.topology().owners(p);
+
+            if (F.isEmpty(owners)) {
+                // Handle special case: no mapping is configured for a partition.
+                if (F.isEmpty(cctx.affinity().assignment(NONE).get(p))) {
+                    partLocs[p] = UNMAPPED_PARTS; // Mark unmapped partition.
+
+                    continue;
+                }
+                else if (!F.isEmpty(dataNodes(cctx.groupId(), NONE))) {
+                    logRetry("Failed to calculate nodes for SQL query (partition has no owners, but corresponding " +
+                        "cache group has data nodes) [qryId=" + qryId + ", cacheIds=" + cacheIds +
+                        ", cacheName=" + cctx.name() + ", cacheId=" + cctx.cacheId() + ", part=" + p +
+                        ", cacheGroupId=" + cctx.groupId() + ']');
+
+                    return null; // Retry.
+                }
+
+                throw new CacheException("Failed to find data nodes [cache=" + cctx.name() + ", part=" + p + "]");
+            }
+
+            partLocs[p] = new HashSet<>(owners);
+        }
+
+        if (cacheIds.size() > 1) {
+            // Find owner intersections for each participating partitioned cache partition.
+            // We need this for logical collocation between different partitioned caches with the same affinity.
+            for (Integer cacheId : cacheIds) {
+                GridCacheContext<?, ?> extraCctx = cacheContext(cacheId);
+
+                // This is possible if we have replaced a replicated cache with a partitioned one earlier.
+                if (cctx == extraCctx)
+                    continue;
+
+                if (extraCctx.isReplicated() || extraCctx.isLocal())
+                    continue;
+
+                for (int p = 0, parts = extraCctx.affinity().partitions(); p < parts; p++) {
+                    List<ClusterNode> owners = extraCctx.topology().owners(p);
+
+                    if (partLocs[p] == UNMAPPED_PARTS)
+                        continue; // Skip unmapped partitions.
+
+                    if (F.isEmpty(owners)) {
+                        if (!F.isEmpty(dataNodes(extraCctx.groupId(), NONE))) {
+                            logRetry("Failed to calculate nodes for SQL query (partition has no owners, but " +
+                                "corresponding cache group has data nodes) [qryId=" + qryId +
+                                ", cacheIds=" + cacheIds + ", cacheName=" + extraCctx.name() +
+                                ", cacheId=" + extraCctx.cacheId() + ", part=" + p +
+                                ", cacheGroupId=" + extraCctx.groupId() + ']');
+
+                            return null; // Retry.
+                        }
+
+                        throw new CacheException("Failed to find data nodes [cache=" + extraCctx.name() +
+                            ", part=" + p + "]");
+                    }
+
+                    if (partLocs[p] == null)
+                        partLocs[p] = new HashSet<>(owners);
+                    else {
+                        partLocs[p].retainAll(owners); // Intersection of owners.
+
+                        if (partLocs[p].isEmpty()) {
+                            logRetry("Failed to calculate nodes for SQL query (caches have no common data nodes for " +
+                                "partition) [qryId=" + qryId + ", cacheIds=" + cacheIds +
+                                ", lastCacheName=" + extraCctx.name() + ", lastCacheId=" + extraCctx.cacheId() +
+                                ", part=" + p + ']');
+
+                            return null; // Intersection is empty -> retry.
+                        }
+                    }
+                }
+            }
+
+            // Filter nodes where not all the replicated caches loaded.
+            for (Integer cacheId : cacheIds) {
+                GridCacheContext<?, ?> extraCctx = cacheContext(cacheId);
+
+                if (!extraCctx.isReplicated())
+                    continue;
+
+                Set<ClusterNode> dataNodes = replicatedUnstableDataNodes(extraCctx, qryId);
+
+                if (F.isEmpty(dataNodes))
+                    return null; // Retry.
+
+                int part = 0;
+
+                for (Set<ClusterNode> partLoc : partLocs) {
+                    if (partLoc == UNMAPPED_PARTS)
+                        continue; // Skip unmapped partition.
+
+                    partLoc.retainAll(dataNodes);
+
+                    if (partLoc.isEmpty()) {
+                        logRetry("Failed to calculate nodes for SQL query (caches have no common data nodes for " +
+                            "partition) [qryId=" + qryId + ", cacheIds=" + cacheIds +
+                            ", lastReplicatedCacheName=" + extraCctx.name() +
+                            ", lastReplicatedCacheId=" + extraCctx.cacheId() + ", part=" + part + ']');
+
+                        return null; // Retry.
+                    }
+
+                    part++;
+                }
+            }
+        }
+
+        // Collect the final partitions mapping.
+        Map<ClusterNode, IntArray> res = new HashMap<>();
+
+        // Here partitions in all IntArray's will be sorted in ascending order, this is important.
+        for (int p = 0; p < partLocs.length; p++) {
+            Set<ClusterNode> pl = partLocs[p];
+
+            // Skip unmapped partitions.
+            if (pl == UNMAPPED_PARTS)
+                continue;
+
+            assert !F.isEmpty(pl) : pl;
+
+            ClusterNode n = pl.size() == 1 ? F.first(pl) : F.rand(pl);
+
+            IntArray parts = res.get(n);
+
+            if (parts == null)
+                res.put(n, parts = new IntArray());
+
+            parts.add(p);
+        }
+
+        return res;
+    }
+
+    /**
+     * Calculates data nodes for replicated caches on unstable topology.
+     *
+     * @param cacheIds Cache IDs.
+     * @param qryId Query ID.
+     * @return Collection of all data nodes owning all the caches or {@code null} for retry.
+     */
+    private Collection<ClusterNode> replicatedUnstableDataNodes(List<Integer> cacheIds, long qryId) {
+        int i = 0;
+
+        GridCacheContext<?, ?> cctx = cacheContext(cacheIds.get(i++));
+
+        // The main cache is allowed to be partitioned.
+        if (!cctx.isReplicated()) {
+            assert cacheIds.size() > 1: "no extra replicated caches with partitioned main cache";
+
+            // Just replace the main cache with the first one extra.
+            cctx = cacheContext(cacheIds.get(i++));
+
+            assert cctx.isReplicated(): "all the extra caches must be replicated here";
+        }
+
+        Set<ClusterNode> nodes = replicatedUnstableDataNodes(cctx, qryId);
+
+        if (F.isEmpty(nodes))
+            return null; // Retry.
+
+        for (;i < cacheIds.size(); i++) {
+            GridCacheContext<?, ?> extraCctx = cacheContext(cacheIds.get(i));
+
+            if (extraCctx.isLocal())
+                continue;
+
+            if (!extraCctx.isReplicated())
+                throw new CacheException("Queries running on replicated cache should not contain JOINs " +
+                    "with tables in partitioned caches [replicatedCache=" + cctx.name() + ", " +
+                    "partitionedCache=" + extraCctx.name() + "]");
+
+            Set<ClusterNode> extraOwners = replicatedUnstableDataNodes(extraCctx, qryId);
+
+            if (F.isEmpty(extraOwners))
+                return null; // Retry.
+
+            nodes.retainAll(extraOwners);
+
+            if (nodes.isEmpty()) {
+                logRetry("Failed to calculate nodes for SQL query (got disjoint node map for REPLICATED caches " +
+                    "during rebalance) [qryId=" + qryId + ", cacheIds=" + cacheIds +
+                    ", lastCache=" + extraCctx.name() + ", lastCacheId=" + extraCctx.cacheId() + ']');
+
+                return null; // Retry.
+            }
+        }
+
+        return nodes;
+    }
+
+    /**
+     * Collects all the nodes owning all the partitions for the given replicated cache.
+     *
+     * @param cctx Cache context.
+     * @param qryId Query ID.
+     * @return Owning nodes or {@code null} if we can't find owners for some partitions.
+     */
+    private Set<ClusterNode> replicatedUnstableDataNodes(GridCacheContext<?,?> cctx, long qryId) {
+        assert cctx.isReplicated() : cctx.name() + " must be replicated";
+
+        String cacheName = cctx.name();
+
+        Set<ClusterNode> dataNodes = new HashSet<>(dataNodes(cctx.groupId(), NONE));
+
+        if (dataNodes.isEmpty())
+            throw new CacheException("Failed to find data nodes for cache: " + cacheName);
+
+        // Find all the nodes owning all the partitions for replicated cache.
+        for (int p = 0, parts = cctx.affinity().partitions(); p < parts; p++) {
+            List<ClusterNode> owners = cctx.topology().owners(p);
+
+            if (F.isEmpty(owners)) {
+                logRetry("Failed to calculate nodes for SQL query (partition of a REPLICATED cache has no owners) [" +
+                    "qryId=" + qryId + ", cacheName=" + cctx.name() + ", cacheId=" + cctx.cacheId() +
+                    ", part=" + p + ']');
+
+                return null; // Retry.
+            }
+
+            dataNodes.retainAll(owners);
+
+            if (dataNodes.isEmpty()) {
+                logRetry("Failed to calculate nodes for SQL query (partitions of a REPLICATED has no common owners) [" +
+                    "qryId=" + qryId + ", cacheName=" + cctx.name() + ", cacheId=" + cctx.cacheId() +
+                    ", lastPart=" + p + ']');
+
+                return null; // Retry.
+            }
+        }
+
+        return dataNodes;
+    }
+
+    /**
+     * @param grpId Cache group ID.
+     * @param topVer Topology version.
+     * @return Collection of data nodes.
+     */
+    private Collection<ClusterNode> dataNodes(int grpId, AffinityTopologyVersion topVer) {
+        Collection<ClusterNode> res = ctx.discovery().cacheGroupAffinityNodes(grpId, topVer);
+
+        return res != null ? res : Collections.<ClusterNode>emptySet();
+    }
+
+    /**
+     *
+     * @param partsMap Partitions map.
+     * @param parts Partitions.
+     * @return Result.
+     */
+    private static Map<ClusterNode, IntArray> narrowForQuery(Map<ClusterNode, IntArray> partsMap, int[] parts) {
+        if (parts == null)
+            return partsMap;
+
+        Map<ClusterNode, IntArray> cp = U.newHashMap(partsMap.size());
+
+        for (Map.Entry<ClusterNode, IntArray> entry : partsMap.entrySet()) {
+            IntArray filtered = new IntArray(parts.length);
+
+            IntArray orig = entry.getValue();
+
+            for (int i = 0; i < orig.size(); i++) {
+                int p = orig.get(i);
+
+                if (Arrays.binarySearch(parts, p) >= 0)
+                    filtered.add(p);
+            }
+
+            if (filtered.size() > 0)
+                cp.put(entry.getKey(), filtered);
+        }
+
+        return cp.isEmpty() ? null : cp;
+    }
+
+    /**
+     * @param cacheIds Cache IDs.
+     * @return The first partitioned cache context.
+     */
+    private GridCacheContext<?,?> findFirstPartitioned(List<Integer> cacheIds) {
+        for (int i = 0; i < cacheIds.size(); i++) {
+            GridCacheContext<?, ?> cctx = cacheContext(cacheIds.get(i));
+
+            if (i == 0 && cctx.isLocal())
+                throw new CacheException("Cache is LOCAL: " + cctx.name());
+
+            if (!cctx.isReplicated() && !cctx.isLocal())
+                return cctx;
+        }
+
+        throw new IllegalStateException("Failed to find partitioned cache.");
+    }
+
+    /**
+     * Load failed partition reservation.
+     *
+     * @param msg Message.
+     */
+    private void logRetry(String msg) {
+        log.info(msg);
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/6613376d/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/ReducePartitionsSpecializer.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/ReducePartitionsSpecializer.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/ReducePartitionsSpecializer.java
new file mode 100644
index 0000000..592efee
--- /dev/null
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/ReducePartitionsSpecializer.java
@@ -0,0 +1,61 @@
+/*
+ * 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.twostep;
+
+import org.apache.ignite.cluster.ClusterNode;
+import org.apache.ignite.internal.processors.query.h2.twostep.msg.GridH2DmlRequest;
+import org.apache.ignite.internal.processors.query.h2.twostep.msg.GridH2QueryRequest;
+import org.apache.ignite.internal.util.typedef.C2;
+import org.apache.ignite.plugin.extensions.communication.Message;
+import org.h2.util.IntArray;
+
+import java.util.Map;
+
+/**
+ * Reducer partitions specializer.
+ */
+public class ReducePartitionsSpecializer implements C2<ClusterNode, Message, Message> {
+    /** Partitions map. */
+    private final Map<ClusterNode, IntArray> partsMap;
+
+    /**
+     * @param partsMap Partitions map.
+     */
+    public ReducePartitionsSpecializer(Map<ClusterNode, IntArray> partsMap) {
+        this.partsMap = partsMap;
+    }
+
+    /** {@inheritDoc} */
+    @Override public Message apply(ClusterNode node, Message msg) {
+        if (msg instanceof GridH2QueryRequest) {
+            GridH2QueryRequest rq = new GridH2QueryRequest((GridH2QueryRequest)msg);
+
+            rq.queryPartitions(GridReduceQueryExecutor.toArray(partsMap.get(node)));
+
+            return rq;
+        } else if (msg instanceof GridH2DmlRequest) {
+            GridH2DmlRequest rq = new GridH2DmlRequest((GridH2DmlRequest)msg);
+
+            rq.queryPartitions(GridReduceQueryExecutor.toArray(partsMap.get(node)));
+
+            return rq;
+        }
+
+        return msg;
+    }
+}