You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2018/07/28 07:27:50 UTC

[1/4] ignite git commit: IGNITE-8778 Cache tests fail due short timeout - Fixes #4180.

Repository: ignite
Updated Branches:
  refs/heads/ignite-6467 ff084537a -> 7f635688f


IGNITE-8778 Cache tests fail due short timeout - Fixes #4180.

Signed-off-by: Dmitriy Pavlov <dp...@apache.org>


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

Branch: refs/heads/ignite-6467
Commit: 2f1770941b3ab3ed1b6185fb4404452756e31742
Parents: bf5287b
Author: mcherkasov <mc...@gridgain.com>
Authored: Fri Jul 27 19:20:53 2018 +0300
Committer: Dmitriy Pavlov <dp...@apache.org>
Committed: Fri Jul 27 19:20:53 2018 +0300

----------------------------------------------------------------------
 .../internal/processors/cache/CacheGetEntryAbstractTest.java       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/2f177094/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 dd9ed3c..6a7cfc6 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
@@ -83,7 +83,7 @@ public abstract class CacheGetEntryAbstractTest extends GridCacheAbstractSelfTes
 
     /** {@inheritDoc} */
     @Override protected long getTestTimeout() {
-        return 60_000;
+        return 90_000;
     }
 
     /** {@inheritDoc} */


[3/4] ignite git commit: Merge remote-tracking branch 'remotes/origin/master' into ignite-6467

Posted by sb...@apache.org.
Merge remote-tracking branch 'remotes/origin/master' into ignite-6467

# Conflicts:
#	modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheExchangeMergeTest.java


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

Branch: refs/heads/ignite-6467
Commit: 30bac7fc18ba09cd092192bcc4e79377b655c1ae
Parents: a867641
Author: sboikov <sb...@apache.org>
Authored: Sat Jul 28 10:26:03 2018 +0300
Committer: sboikov <sb...@apache.org>
Committed: Sat Jul 28 10:26:03 2018 +0300

----------------------------------------------------------------------
 .../distributed/CacheExchangeMergeTest.java     | 951 ++++++++++++++++++-
 1 file changed, 950 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/30bac7fc/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheExchangeMergeTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheExchangeMergeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheExchangeMergeTest.java
index a2259ff..6502d3d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheExchangeMergeTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheExchangeMergeTest.java
@@ -206,6 +206,213 @@ public class CacheExchangeMergeTest extends GridCommonAbstractTest {
     /**
      * @throws Exception If failed.
      */
+    public void testDelayExchangeMessages() throws Exception {
+        testDelaySpi = true;
+
+        System.setProperty(IgniteSystemProperties.IGNITE_EXCHANGE_MERGE_DELAY, "2000");
+
+        try {
+            final int srvs = 6;
+            final int clients = 3;
+
+            startGridsMultiThreaded(srvs);
+
+            for (int i = 0; i < clients; i++) {
+                client.set(true);
+
+                startGrid(srvs + i);
+            }
+
+            final int initNodes = srvs + clients;
+
+            final AtomicInteger stopIdx = new AtomicInteger();
+
+            IgniteInternalFuture stopFut = GridTestUtils.runMultiThreadedAsync(new Callable<Void>() {
+                @Override public Void call() throws Exception {
+                    Thread.sleep(ThreadLocalRandom.current().nextLong(500) + 1);
+
+                    stopGrid(stopIdx.incrementAndGet());
+
+                    return null;
+                }
+            }, 3, "stop-srv");
+
+            final AtomicInteger startIdx = new AtomicInteger(initNodes);
+
+            IgniteInternalFuture startFut = GridTestUtils.runMultiThreadedAsync(new Callable<Void>() {
+                @Override public Void call() throws Exception {
+                    ThreadLocalRandom rnd = ThreadLocalRandom.current();
+
+                    int nodeIdx = startIdx.incrementAndGet();
+
+                    if (rnd.nextInt(3) == 0) {
+                        log.info("Start client: " + nodeIdx);
+
+                        client.set(true);
+                    }
+                    else
+                        log.info("Start server: " + nodeIdx);
+
+                    startGrid(nodeIdx);
+
+                    if (rnd.nextBoolean()) {
+                        log.info("Stop started node: " + nodeIdx);
+
+                        stopGrid(nodeIdx);
+                    }
+
+                    return null;
+                }
+            }, 5, "start-node");
+
+            stopFut.get();
+            startFut.get();
+
+            checkCaches();
+        }
+        finally {
+            System.clearProperty(IgniteSystemProperties.IGNITE_EXCHANGE_MERGE_DELAY);
+        }
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testMergeStartRandomClientsServers() throws Exception {
+        for (int iter = 0; iter < 3; iter++) {
+            ThreadLocalRandom rnd = ThreadLocalRandom.current();
+
+            final int srvs = rnd.nextInt(3) + 1;
+            final int clients = rnd.nextInt(3);
+
+            log.info("Iteration [iter=" + iter + ", srvs=" + srvs + ", clients=" + clients + ']');
+
+            Ignite srv0 = startGrids(srvs);
+
+            for (int i = 0; i < clients; i++) {
+                client.set(true);
+
+                startGrid(srvs + i);
+            }
+
+            final int threads = 8;
+
+            final int initNodes = srvs + clients;
+
+            mergeExchangeWaitVersion(srv0, initNodes + threads);
+
+            final AtomicInteger idx = new AtomicInteger(initNodes);
+
+            IgniteInternalFuture fut = GridTestUtils.runMultiThreadedAsync(new Callable<Void>() {
+                @Override public Void call() throws Exception {
+                    ThreadLocalRandom rnd = ThreadLocalRandom.current();
+
+                    int nodeIdx = idx.incrementAndGet();
+
+                    if (rnd.nextInt(3) == 0) {
+                        log.info("Start client: " + nodeIdx);
+
+                        client.set(true);
+                    }
+                    else
+                        log.info("Start server: " + nodeIdx);
+
+                    startGrid(nodeIdx);
+
+                    return null;
+                }
+            }, threads, "test-thread");
+
+            fut.get();
+
+            checkCaches();
+
+            stopAllGrids();
+        }
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testMergeStartStopRandomClientsServers() throws Exception {
+        for (int iter = 0; iter < 3; iter++) {
+            log.info("Iteration: " + iter);
+
+            final int srvs = 5;
+            final int clients = 5;
+
+            Ignite srv0 = startGrids(srvs);
+
+            for (int i = 0; i < clients; i++) {
+                client.set(true);
+
+                startGrid(srvs + i);
+            }
+
+            final int threads = 8;
+
+            final int initNodes = srvs + clients;
+
+            mergeExchangeWaitVersion(srv0, initNodes + threads);
+
+            final AtomicInteger idx = new AtomicInteger(initNodes);
+
+            final ConcurrentHashSet<Integer> stopNodes = new ConcurrentHashSet<>();
+
+            IgniteInternalFuture fut = GridTestUtils.runMultiThreadedAsync(new Callable<Void>() {
+                @Override public Void call() throws Exception {
+                    ThreadLocalRandom rnd = ThreadLocalRandom.current();
+
+                    if (rnd.nextBoolean()) {
+                        Integer stopIdx;
+
+                        for (;;) {
+                            stopIdx = rnd.nextInt(initNodes - 1) + 1;
+
+                            if (stopNodes.add(stopIdx))
+                                break;
+                        }
+
+                        log.info("Stop node: " + stopIdx);
+
+                        stopGrid(getTestIgniteInstanceName(stopIdx), true, false);
+                    }
+                    else {
+                        int nodeIdx = idx.incrementAndGet();
+
+                        if (rnd.nextInt(5) == 0) {
+                            log.info("Start client: " + nodeIdx);
+
+                            client.set(true);
+                        }
+                        else
+                            log.info("Start server: " + nodeIdx);
+
+                        startGrid(nodeIdx);
+                    }
+
+                    return null;
+                }
+            }, threads, "test-thread");
+
+            fut.get();
+
+            checkCaches();
+
+            stopAllGrids();
+        }
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testConcurrentStartServers() throws Exception {
+        concurrentStart(false);
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
     public void testConcurrentStartServersAndClients() throws Exception {
         concurrentStart(true);
     }
@@ -246,9 +453,751 @@ public class CacheExchangeMergeTest extends GridCommonAbstractTest {
             checkCaches();
 
             stopAllGrids();
+        }
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testMergeServerAndClientJoin1() throws Exception {
+        final IgniteEx srv0 = startGrid(0);
+
+        mergeExchangeWaitVersion(srv0, 3);
+
+        IgniteInternalFuture<?> fut1 = GridTestUtils.runMultiThreadedAsync(new Callable<Void>() {
+            @Override public Void call() throws Exception {
+                startGrid(1);
+
+                return null;
+            }
+        }, 1, "start-srv");
+
+        waitForExchangeStart(srv0, 2);
+
+        IgniteInternalFuture<?> fut2 = GridTestUtils.runMultiThreadedAsync(new Callable<Void>() {
+            @Override public Void call() throws Exception {
+                client.set(true);
+
+                startGrid(2);
+
+                return null;
+            }
+        }, 1, "start-client");
+
+        fut1.get();
+        fut2.get();
+
+        checkCaches();
+
+        checkExchanges(srv0, 1, 3);
+        checkExchanges(ignite(1), 3);
+        checkExchanges(ignite(2), 3);
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testStartCacheOnJoinAndJoinMerge_2_nodes() throws Exception {
+        startCacheOnJoinAndJoinMerge1(2, false);
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testStartCacheOnJoinAndJoinMerge_4_nodes() throws Exception {
+        startCacheOnJoinAndJoinMerge1(4, false);
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testStartCacheOnJoinAndJoinMerge_WithClients() throws Exception {
+        startCacheOnJoinAndJoinMerge1(5, true);
+    }
+
+    /**
+     * @param nodes Number of nodes to start.
+     * @param withClients If {@code true} starts both servers and clients.
+     * @throws Exception If failed.
+     */
+    private void startCacheOnJoinAndJoinMerge1(int nodes, boolean withClients) throws Exception {
+        cfgCache = false;
+
+        final IgniteEx srv0 = startGrid(0);
+
+        mergeExchangeWaitVersion(srv0, nodes + 1);
+
+        if (withClients) {
+            clientC = new IgniteClosure<String, Boolean>() {
+                @Override public Boolean apply(String nodeName) {
+                    return getTestIgniteInstanceIndex(nodeName) % 2 == 0;
+                }
+            };
+        }
+
+        cfgCache = true;
+
+        IgniteInternalFuture fut = startGridsAsync(srv0, 1, nodes);
+
+        fut.get();
+
+        checkCaches();
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testMergeAndHistoryCleanup() throws Exception {
+        final int histSize = 5;
+
+        String oldHistVal = System.getProperty(IGNITE_EXCHANGE_HISTORY_SIZE);
+
+        System.setProperty(IGNITE_EXCHANGE_HISTORY_SIZE, String.valueOf(histSize));
+
+        try {
+            final Ignite srv0 = startGrid(0);
+
+            int topVer = 1;
+
+            for (int i = 0; i < 3; i++) {
+                mergeExchangeWaitVersion(srv0, topVer + 3);
+
+                startGridsAsync(srv0, topVer, 3).get();
+
+                topVer += 3;
+            }
+
+            checkHistorySize(histSize);
+
+            awaitPartitionMapExchange();
+
+            checkHistorySize(histSize);
+
+            mergeExchangeWaitVersion(srv0, topVer + 2);
+
+            stopGrid(1);
+            stopGrid(2);
+
+            checkHistorySize(histSize);
+
+            awaitPartitionMapExchange();
+
+            checkHistorySize(histSize);
+        }
+        finally {
+            if (oldHistVal != null)
+                System.setProperty(IGNITE_EXCHANGE_HISTORY_SIZE, oldHistVal);
+            else
+                System.clearProperty(IGNITE_EXCHANGE_HISTORY_SIZE);
+        }
+    }
+
+    /**
+     * @param histSize History size.
+     */
+    private void checkHistorySize(int histSize) {
+        List<Ignite> nodes = G.allGrids();
+
+        assertTrue(nodes.size() > 0);
+
+        for (Ignite node : nodes) {
+            List<GridDhtPartitionsExchangeFuture> exchFuts =
+                    ((IgniteEx)node).context().cache().context().exchange().exchangeFutures();
+
+            assertTrue("Unexpected size: " + exchFuts.size(), exchFuts.size() > 0 && exchFuts.size() <= histSize);
+        }
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testStartCacheOnJoinAndMergeWithFail() throws Exception {
+        cfgCache = false;
+
+        final Ignite srv0 = startGrids(2);
+
+        mergeExchangeWaitVersion(srv0, 5);
+
+        cfgCache = true;
+
+        IgniteInternalFuture fut = startGridsAsync(srv0, 2, 2);
+
+        stopGrid(1);
+
+        fut.get();
+
+        checkCaches();
+
+        checkExchanges(srv0, 1, 2, 3, 5);
+        checkExchanges(ignite(2), 3, 5);
+        checkExchanges(ignite(3), 5);
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testStartCacheOnJoinAndCoordinatorFailed1() throws Exception {
+        cfgCache = false;
+
+        final Ignite srv0 = startGrids(2);
+
+        mergeExchangeWaitVersion(srv0, 5);
+
+        cfgCache = true;
+
+        IgniteInternalFuture fut = startGridsAsync(srv0, 2, 2);
+
+        stopGrid(0);
+
+        fut.get();
+
+        checkCaches();
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testStartCacheOnJoinAndCoordinatorFailed2() throws Exception {
+        cfgCache = false;
+
+        final Ignite srv0 = startGrid(0);
+
+        mergeExchangeWaitVersion(srv0, 3);
+
+        cfgCache = true;
+
+        IgniteInternalFuture fut = startGridsAsync(srv0, 1, 2);
+
+        stopGrid(0);
+
+        fut.get();
+
+        checkCaches();
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testMergeServersJoin1() throws Exception {
+        IgniteEx srv0 = startGrid(0);
+
+        mergeExchangeWaitVersion(srv0, 3);
+
+        final AtomicInteger idx = new AtomicInteger(1);
+
+        IgniteInternalFuture<?> fut = GridTestUtils.runMultiThreadedAsync(new Callable<Void>() {
+            @Override public Void call() throws Exception {
+                startGrid(idx.getAndIncrement());
+
+                return null;
+            }
+        }, 2, "start-node");
+
+        fut.get();
+
+        checkCaches();
+
+        checkExchanges(srv0, 1, 3);
+        checkExchanges(ignite(1), 3);
+        checkExchanges(ignite(2), 3);
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testMergeServerJoin1ClientsInTopology() throws Exception {
+        IgniteEx srv0 = startGrid(0);
+
+        client.set(true);
+
+        startGrid(1);
+
+        client.set(true);
+
+        startGrid(2);
+
+        mergeExchangeWaitVersion(srv0, 5);
+
+        final AtomicInteger idx = new AtomicInteger(3);
+
+        IgniteInternalFuture<?> fut = GridTestUtils.runMultiThreadedAsync(new Callable<Void>() {
+            @Override public Void call() throws Exception {
+                startGrid(idx.getAndIncrement());
+
+                return null;
+            }
+        }, 2, "start-node");
+
+        fut.get();
+
+        checkCaches();
+
+        checkExchanges(srv0, 1, 2, 3, 5);
+        checkExchanges(ignite(1), 2, 3, 5);
+        checkExchanges(ignite(2), 3, 5);
+        checkExchanges(ignite(3), 5);
+        checkExchanges(ignite(4), 5);
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testMergeAndNewCoordinator() throws Exception {
+        final Ignite srv0 = startGrids(3);
+
+        mergeExchangeWaitVersion(srv0, 6);
+
+        IgniteInternalFuture fut = startGridsAsync(srv0, 3, 3);
+
+        fut.get();
+
+        checkCaches();
+
+        stopGrid(0);
+
+        checkCaches();
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testMergeServersFail1_1() throws Exception {
+        mergeServersFail1(false);
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testMergeServersFail1_2() throws Exception {
+        mergeServersFail1(true);
+    }
+
+    /**
+     * @param waitRebalance Wait for rebalance end before start tested topology change.
+     * @throws Exception If failed.
+     */
+    private void mergeServersFail1(boolean waitRebalance) throws Exception {
+        final Ignite srv0 = startGrids(5);
+
+        if (waitRebalance)
+            awaitPartitionMapExchange();
+
+        final List<DiscoveryEvent> mergedEvts = new ArrayList<>();
+
+        mergeExchangeWaitVersion(srv0, 8, mergedEvts);
+
+        UUID grid3Id = grid(3).localNode().id();
+        UUID grid2Id = grid(2).localNode().id();
+
+        stopGrid(getTestIgniteInstanceName(4), true, false);
+        stopGrid(getTestIgniteInstanceName(3), true, false);
+        stopGrid(getTestIgniteInstanceName(2), true, false);
+
+        checkCaches();
+
+        awaitPartitionMapExchange();
+
+        assertTrue("Unexpected number of merged disco events: " + mergedEvts.size(), mergedEvts.size() == 2);
+
+        for (DiscoveryEvent discoEvt : mergedEvts) {
+            ClusterNode evtNode = discoEvt.eventNode();
+
+            assertTrue("eventNode is null for DiscoEvent " + discoEvt, evtNode != null);
+
+            assertTrue("Unexpected eventNode ID: "
+                    + evtNode.id() + " while expecting " + grid2Id + " or " + grid3Id,
+                evtNode.id().equals(grid2Id) || evtNode.id().equals(grid3Id));
+        }
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testMergeServersAndClientsFail1() throws Exception {
+        mergeServersAndClientsFail(false);
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testMergeServersAndClientsFail2() throws Exception {
+        mergeServersAndClientsFail(true);
+    }
+
+
+    /**
+     * @param waitRebalance Wait for rebalance end before start tested topology change.
+     * @throws Exception If failed.
+     */
+    private void mergeServersAndClientsFail(boolean waitRebalance) throws Exception {
+        clientC = new IgniteClosure<String, Boolean>() {
+            @Override public Boolean apply(String nodeName) {
+                return nodeName.equals(getTestIgniteInstanceName(2)) || nodeName.equals(getTestIgniteInstanceName(3));
+            }
+        };
+
+        final Ignite srv0 = startGrids(6);
+
+        if (waitRebalance)
+            awaitPartitionMapExchange();
+
+        mergeExchangeWaitVersion(srv0, 10);
+
+        stopGrid(getTestIgniteInstanceName(1), true, false);
+        stopGrid(getTestIgniteInstanceName(2), true, false);
+        stopGrid(getTestIgniteInstanceName(3), true, false);
+        stopGrid(getTestIgniteInstanceName(4), true, false);
+
+        checkAffinity();
+
+        mergeExchangeWaitVersion(srv0, 12);
+
+        IgniteInternalFuture fut = startGridsAsync(srv0, 6, 2);
+
+        fut.get();
+
+        checkCaches();
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testJoinExchangeCoordinatorChange_NoMerge_1() throws Exception {
+        for (CoordinatorChangeMode mode : CoordinatorChangeMode.values()) {
+            exchangeCoordinatorChangeNoMerge(4, true, mode);
+
+            stopAllGrids();
+        }
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testJoinExchangeCoordinatorChange_NoMerge_2() throws Exception {
+        for (CoordinatorChangeMode mode : CoordinatorChangeMode.values()) {
+            exchangeCoordinatorChangeNoMerge(8, true, mode);
+
+            stopAllGrids();
+        }
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testFailExchangeCoordinatorChange_NoMerge_1() throws Exception {
+        for (CoordinatorChangeMode mode : CoordinatorChangeMode.values()) {
+            exchangeCoordinatorChangeNoMerge(5, false, mode);
+
+            stopAllGrids();
+        }
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testFailExchangeCoordinatorChange_NoMerge_2() throws Exception {
+        for (CoordinatorChangeMode mode : CoordinatorChangeMode.values()) {
+            exchangeCoordinatorChangeNoMerge(8, false, mode);
+
+            stopAllGrids();
+        }
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testMergeJoinExchangesCoordinatorChange1_4_servers() throws Exception {
+        for (CoordinatorChangeMode mode : CoordinatorChangeMode.values()) {
+            mergeJoinExchangesCoordinatorChange1(4, mode);
+
+            stopAllGrids();
+        }
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testMergeJoinExchangesCoordinatorChange1_8_servers() throws Exception {
+        for (CoordinatorChangeMode mode : CoordinatorChangeMode.values()) {
+            mergeJoinExchangesCoordinatorChange1(8, mode);
+
+            stopAllGrids();
+        }
+    }
+
+    /**
+     * @param srvs Number of server nodes.
+     * @param mode Test mode.
+     * @throws Exception If failed.
+     */
+    private void mergeJoinExchangesCoordinatorChange1(final int srvs, CoordinatorChangeMode mode)
+        throws Exception
+    {
+        log.info("Test mergeJoinExchangesCoordinatorChange1 [srvs=" + srvs + ", mode=" + mode + ']');
+
+        testSpi = true;
+
+        Ignite srv0 = startGrids(srvs);
+
+        mergeExchangeWaitVersion(srv0, 6);
+
+        CountDownLatch latch = blockExchangeFinish(srvs, mode);
+
+        IgniteInternalFuture<?> fut = startGridsAsync(srv0, srvs, 2);
+
+        if (latch != null && !latch.await(WAIT_SECONDS, TimeUnit.SECONDS))
+            fail("Failed to wait for expected messages.");
+
+        stopGrid(getTestIgniteInstanceName(0), true, false);
+
+        fut.get();
+
+        checkCaches();
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testMergeJoinExchangesCoordinatorChange2_4_servers() throws Exception {
+        mergeJoinExchangeCoordinatorChange2(4, 2, F.asList(1, 2, 3, 4), F.asList(5));
+
+        stopAllGrids();
+
+        mergeJoinExchangeCoordinatorChange2(4, 2, F.asList(1, 2, 3, 5), F.asList(4));
+    }
+
+    /**
+     * @param srvs Number of server nodes.
+     * @param startNodes Number of nodes to start.
+     * @param blockNodes Nodes which do not receive messages.
+     * @param waitMsgNodes Nodes which should receive messages.
+     * @throws Exception If failed.
+     */
+    private void mergeJoinExchangeCoordinatorChange2(final int srvs,
+        final int startNodes,
+        List<Integer> blockNodes,
+        List<Integer> waitMsgNodes) throws Exception
+    {
+        testSpi = true;
+
+        Ignite srv0 = startGrids(srvs);
+
+        mergeExchangeWaitVersion(srv0, srvs + startNodes);
+
+        CountDownLatch latch = blockExchangeFinish(srv0, srvs + 1, blockNodes, waitMsgNodes);
+
+        IgniteInternalFuture<?> fut = startGridsAsync(srv0, srvs, startNodes);
+
+        if (latch != null && !latch.await(WAIT_SECONDS, TimeUnit.SECONDS))
+            fail("Failed to wait for expected messages.");
+
+        stopGrid(getTestIgniteInstanceName(0), true, false);
+
+        fut.get();
+
+        checkCaches();
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testMergeExchangeCoordinatorChange4() throws Exception {
+        testSpi = true;
+
+        final int srvs = 4;
+
+        Ignite srv0 = startGrids(srvs);
+
+        mergeExchangeWaitVersion(srv0, 6);
+
+        final AtomicInteger idx = new AtomicInteger(srvs);
+
+        CountDownLatch latch = blockExchangeFinish(srv0, 5, F.asList(1, 2, 3, 4), F.asList(5));
+
+        IgniteInternalFuture<?> fut = GridTestUtils.runMultiThreadedAsync(new Callable<Void>() {
+            @Override public Void call() throws Exception {
+                startGrid(idx.getAndIncrement());
+
+                return null;
+            }
+        }, 2, "start-node");
+
+        if (latch != null && !latch.await(WAIT_SECONDS, TimeUnit.SECONDS))
+            fail("Failed to wait for expected messages.");
+
+        stopGrid(getTestIgniteInstanceName(0), true, false);
+
+        fut.get();
+
+        checkCaches();
+    }
+
+    /**
+     * @param srvs Number of servers.
+     * @param join If {@code true} starts new node, otherwise stops node.
+     * @param mode Tested scenario.
+     * @throws Exception If failed.
+     */
+    private void exchangeCoordinatorChangeNoMerge(int srvs, final boolean join, CoordinatorChangeMode mode) throws Exception {
+        log.info("Test mergeJoinExchangeCoordinatorChange [nodes=" + srvs + ", mode=" + mode + ']');
+
+        testSpi = true;
+
+        final int nodes = srvs;
+
+        startGrids(nodes);
+
+        CountDownLatch latch = blockExchangeFinish(srvs, mode);
 
-            TestDebugLog1.clear();
+        IgniteInternalFuture fut = GridTestUtils.runAsync(new Callable() {
+            @Override public Object call() throws Exception {
+                if (join)
+                    startGrid(nodes);
+                else
+                    stopGrid(nodes - 1);
+
+                return null;
+            }
+        });
+
+        waitForExchangeStart(ignite(0), nodes + 1);
+
+        if (latch != null && !latch.await(WAIT_SECONDS, TimeUnit.SECONDS))
+            fail("Failed to wait for expected messages.");
+
+        stopGrid(0);
+
+        fut.get();
+
+        checkCaches();
+    }
+
+    /**
+     * @param srvs Number of server nodes.
+     * @param mode Test scenario.
+     * @return Awaited state latch.
+     * @throws Exception If failed.
+     */
+    private CountDownLatch blockExchangeFinish(int srvs, CoordinatorChangeMode mode) throws Exception {
+        Ignite crd = ignite(0);
+
+        long topVer = srvs + 1;
+
+        switch (mode) {
+            case NOBODY_RCVD: {
+                blockExchangeFinish(crd, topVer);
+
+                break;
+            }
+
+            case NEW_CRD_RCDV: {
+                List<Integer> finishNodes = F.asList(1);
+
+                return blockExchangeFinish(crd, topVer, blockNodes(srvs, finishNodes), finishNodes);
+            }
+
+            case NON_CRD_RCVD: {
+                assert srvs > 2 : srvs;
+
+                List<Integer> finishNodes = F.asList(2);
+
+                return blockExchangeFinish(crd, topVer, blockNodes(srvs, finishNodes), finishNodes);
+            }
+
+            default:
+                fail();
+        }
+
+        return null;
+    }
+
+    /**
+     * @param srvs Number of servers.
+     * @param waitNodes Nodes which should receive message.
+     * @return Blocked nodes indexes.
+     */
+    private List<Integer> blockNodes(int srvs, List<Integer> waitNodes) {
+        List<Integer> block = new ArrayList<>();
+
+        for (int i = 0; i < srvs + 1; i++) {
+            if (!waitNodes.contains(i))
+                block.add(i);
         }
+
+        return block;
+    }
+
+    /**
+     * @param crd Exchange coordinator.
+     * @param topVer Exchange topology version.
+     */
+    private void blockExchangeFinish(Ignite crd, long topVer) {
+        final AffinityTopologyVersion topVer0 = new AffinityTopologyVersion(topVer);
+
+        TestRecordingCommunicationSpi.spi(crd).blockMessages(new IgniteBiPredicate<ClusterNode, Message>() {
+            @Override public boolean apply(ClusterNode node, Message msg) {
+                if (msg instanceof GridDhtPartitionsFullMessage) {
+                    GridDhtPartitionsFullMessage msg0 = (GridDhtPartitionsFullMessage)msg;
+
+                    return msg0.exchangeId() != null && msg0.exchangeId().topologyVersion().equals(topVer0);
+                }
+
+                return false;
+            }
+        });
+    }
+
+    /**
+     * @param crd Exchange coordinator.
+     * @param topVer Exchange topology version.
+     * @param blockNodes Nodes which do not receive messages.
+     * @param waitMsgNodes Nodes which should receive messages.
+     * @return Awaited state latch.
+     */
+    private CountDownLatch blockExchangeFinish(Ignite crd,
+        long topVer,
+        final List<Integer> blockNodes,
+        final List<Integer> waitMsgNodes)
+    {
+        log.info("blockExchangeFinish [crd=" + crd.cluster().localNode().id() +
+            ", block=" + blockNodes +
+            ", wait=" + waitMsgNodes + ']');
+
+        final AffinityTopologyVersion topVer0 = new AffinityTopologyVersion(topVer);
+
+        final CountDownLatch latch = new CountDownLatch(waitMsgNodes.size());
+
+        TestRecordingCommunicationSpi.spi(crd).blockMessages(new IgniteBiPredicate<ClusterNode, Message>() {
+            @Override public boolean apply(ClusterNode node, Message msg) {
+                if (msg instanceof GridDhtPartitionsFullMessage) {
+                    GridDhtPartitionsFullMessage msg0 = (GridDhtPartitionsFullMessage)msg;
+
+                    if (msg0.exchangeId() == null || msg0.exchangeId().topologyVersion().compareTo(topVer0) < 0)
+                        return false;
+
+                    String name = node.attribute(IgniteNodeAttributes.ATTR_IGNITE_INSTANCE_NAME);
+
+                    assert name != null : node;
+
+                    for (Integer idx : blockNodes) {
+                        if (name.equals(getTestIgniteInstanceName(idx)))
+                            return true;
+                    }
+
+                    for (Integer idx : waitMsgNodes) {
+                        if (name.equals(getTestIgniteInstanceName(idx))) {
+                            log.info("Coordinators sends awaited message [node=" + node.id() + ']');
+
+                            latch.countDown();
+                        }
+                    }
+                }
+
+                return false;
+            }
+        });
+
+        return latch;
     }
 
     /**


[4/4] ignite git commit: Merge remote-tracking branch 'origin/ignite-6467' into ignite-6467

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


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

Branch: refs/heads/ignite-6467
Commit: 7f635688f8464a5929850cfbf64d3b66567c063e
Parents: 30bac7f ff08453
Author: sboikov <sb...@apache.org>
Authored: Sat Jul 28 10:26:46 2018 +0300
Committer: sboikov <sb...@apache.org>
Committed: Sat Jul 28 10:26:46 2018 +0300

----------------------------------------------------------------------
 modules/core/src/main/java/org/apache/ignite/TestDebugLog1.java    | 2 ++
 .../cache/distributed/dht/GridDhtPartitionTopologyImpl.java        | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------



[2/4] ignite git commit: Merge remote-tracking branch 'remotes/origin/master' into ignite-6467

Posted by sb...@apache.org.
Merge remote-tracking branch 'remotes/origin/master' into ignite-6467

# Conflicts:
#	modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheExchangeMergeTest.java


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

Branch: refs/heads/ignite-6467
Commit: a867641de74c8981a3616a2198255ddad06210ef
Parents: 1775991 2f17709
Author: sboikov <sb...@gridgain.com>
Authored: Sat Jul 28 10:09:14 2018 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Sat Jul 28 10:09:14 2018 +0300

----------------------------------------------------------------------
 assembly/LICENSE_FABRIC                         |    2 +-
 docker/apache-ignite/Dockerfile                 |    9 +
 docker/apache-ignite/run.sh                     |    2 +-
 docker/web-agent/Dockerfile                     |    3 +-
 .../OptimizeMakeChangeFitnessFunction.java      |    1 -
 .../change/OptimizeMakeChangeGAExample.java     |    2 -
 .../OptimizeMakeChangeTerminateCriteria.java    |    2 -
 .../genetic/helloworld/HelloWorldGAExample.java |    2 -
 .../helloworld/HelloWorldTerminateCriteria.java |    2 -
 .../ml/genetic/knapsack/KnapsackGAExample.java  |    2 -
 .../knapsack/KnapsackTerminateCriteria.java     |    1 -
 .../ml/genetic/movie/MovieFitnessFunction.java  |    1 -
 .../ml/genetic/movie/MovieGAExample.java        |    2 -
 .../genetic/movie/MovieTerminateCriteria.java   |    2 -
 .../ml/knn/KNNClassificationExample.java        |    2 +-
 .../examples/ml/knn/KNNRegressionExample.java   |    2 +-
 .../examples/ml/nn/MLPTrainerExample.java       |    2 +-
 .../ml/preprocessing/BinarizationExample.java   |    2 +-
 .../ml/preprocessing/ImputingExample.java       |    2 +-
 .../ImputingExampleWithMostFrequentValues.java  |    2 +-
 .../ml/preprocessing/MinMaxScalerExample.java   |    2 +-
 .../ml/preprocessing/NormalizationExample.java  |    2 +-
 ...ssionLSQRTrainerWithMinMaxScalerExample.java |    2 +-
 ...gressionMultiClassClassificationExample.java |    2 +-
 .../SVMMultiClassClassificationExample.java     |    2 +-
 .../RandomForestRegressionExample.java          |   18 +-
 .../ml/tutorial/Step_1_Read_and_Learn.java      |    2 +-
 .../examples/ml/tutorial/Step_2_Imputing.java   |    2 +-
 .../examples/ml/tutorial/Step_3_Categorial.java |    2 +-
 .../ml/tutorial/Step_4_Add_age_fare.java        |    2 +-
 .../examples/ml/tutorial/Step_5_Scaling.java    |    2 +-
 .../ignite/examples/ml/tutorial/Step_6_KNN.java |    2 +-
 .../ml/tutorial/Step_7_Split_train_test.java    |    2 +-
 .../ignite/examples/ml/tutorial/Step_8_CV.java  |    2 +-
 .../ml/tutorial/Step_8_CV_with_Param_Grid.java  |  173 ++
 .../ml/tutorial/Step_9_Go_to_LogReg.java        |    2 +-
 modules/cassandra/store/pom.xml                 |    2 +-
 .../java/org/apache/ignite/IgniteCache.java     |    5 +
 .../java/org/apache/ignite/IgniteCluster.java   |    7 +
 .../apache/ignite/IgniteSystemProperties.java   |    3 +
 .../rendezvous/RendezvousAffinityFunction.java  |    6 +
 .../configuration/BasicAddressResolver.java     |    9 +
 .../configuration/ConnectorConfiguration.java   |    8 +
 .../configuration/DataStorageConfiguration.java |    2 +
 .../configuration/HadoopConfiguration.java      |    4 +-
 .../configuration/MemoryConfiguration.java      |    6 +
 .../MemoryPolicyConfiguration.java              |    6 +
 .../configuration/TransactionConfiguration.java |    6 +
 .../ignite/internal/GridKernalContext.java      |    7 +
 .../ignite/internal/GridKernalContextImpl.java  |   14 +-
 .../apache/ignite/internal/IgniteKernal.java    |    4 +
 .../org/apache/ignite/internal/IgnitionEx.java  |   13 +-
 .../ignite/internal/LongJVMPauseDetector.java   |    9 +
 .../internal/binary/BinaryMarshaller.java       |    8 +
 .../cluster/IgniteClusterAsyncImpl.java         |    5 +
 .../internal/cluster/IgniteClusterImpl.java     |   15 +
 .../optimized/OptimizedMarshaller.java          |    8 +-
 .../internal/pagemem/wal/record/DataEntry.java  |   12 +
 .../pagemem/wal/record/LazyDataEntry.java       |    3 +
 .../cache/CacheClusterMetricsMXBeanImpl.java    |    7 +-
 .../cache/CacheJoinNodeDiscoveryData.java       |   26 +-
 .../cache/CacheStatisticsClearMessage.java      |  125 ++
 .../cache/GatewayProtectedCacheProxy.java       |   12 +
 .../processors/cache/GridCacheProcessor.java    |  128 +-
 .../processors/cache/IgniteCacheProxyImpl.java  |   10 +
 .../CacheDataStructuresManager.java             |   27 +-
 .../GridDistributedTxRemoteAdapter.java         |   44 +-
 .../dht/GridDhtTransactionalCacheAdapter.java   |  176 +-
 ...arOptimisticSerializableTxPrepareFuture.java |    4 -
 .../near/GridNearOptimisticTxPrepareFuture.java |   12 +-
 ...ridNearOptimisticTxPrepareFutureAdapter.java |   39 +
 .../GridNearPessimisticTxPrepareFuture.java     |    5 +
 .../cache/distributed/near/GridNearTxLocal.java |   25 +-
 .../near/GridNearTxPrepareFutureAdapter.java    |    5 +
 .../wal/reader/StandaloneGridKernalContext.java |    5 +
 .../wal/serializer/RecordDataV1Serializer.java  |    4 +
 .../cache/transactions/IgniteTxManager.java     |   11 +-
 .../datastructures/DataStructuresProcessor.java |   55 +-
 .../datastructures/GridCacheSetHeader.java      |   31 +-
 .../datastructures/GridCacheSetImpl.java        |  134 +-
 .../datastructures/GridCacheSetItemKey.java     |    5 +-
 .../datastructures/GridCacheSetProxy.java       |   18 +
 .../internal/processors/query/QueryUtils.java   |    3 +
 .../ignite/internal/util/IgniteUtils.java       |   16 +
 .../util/nio/GridNioMetricsListener.java        |    6 +-
 .../util/nio/GridNioServerListener.java         |    5 +-
 .../communication/CommunicationListener.java    |    5 +-
 .../communication/tcp/TcpCommunicationSpi.java  |   38 +-
 .../spi/deployment/DeploymentListener.java      |    6 +-
 .../ignite/spi/discovery/tcp/ServerImpl.java    |   31 +-
 .../spi/discovery/tcp/TcpDiscoverySpiMBean.java |    2 +-
 .../ignite/startup/BasicWarmupClosure.java      |   10 +-
 .../resources/META-INF/classnames.properties    |    1 +
 .../cache/CacheGetEntryAbstractTest.java        |    2 +-
 .../cache/CacheMetricsEnableRuntimeTest.java    |  403 ----
 .../cache/CacheMetricsManageTest.java           |  542 +++++
 ...CacheFullTextQueryMultithreadedSelfTest.java |   11 +-
 .../GridCacheSetAbstractSelfTest.java           |   50 +-
 .../IgniteCollectionAbstractTest.java           |   11 +
 .../IgniteDataStructureWithJobTest.java         |   10 +-
 .../distributed/CacheExchangeMergeTest.java     |    5 +-
 .../CacheLateAffinityAssignmentTest.java        |    2 -
 ...niteCacheClientNodeChangingTopologyTest.java |   95 +
 ...gniteAtomicLongChangingTopologySelfTest.java |   18 +
 ...ReplicatedFullApiMultithreadedSelfTest1.java | 1980 ------------------
 ...PdsAtomicCacheHistoricalRebalancingTest.java |    5 +
 .../IgnitePdsCacheRebalancingAbstractTest.java  |  179 +-
 .../IgnitePdsTxCacheRebalancingTest.java        |    1 -
 .../IgnitePdsTxHistoricalRebalancingTest.java   |   64 +
 .../AbstractNodeJoinTemplate.java               |    8 +-
 ...ollbackOnTimeoutNoDeadlockDetectionTest.java |    4 -
 .../transactions/TxRollbackOnTimeoutTest.java   |   19 +-
 .../internal/util/IgniteUtilsSelfTest.java      |   29 +
 .../TcpDiscoverySpiFailureTimeoutSelfTest.java  |    4 +-
 .../testframework/junits/GridAbstractTest.java  |    2 +-
 .../multijvm/IgniteCacheProcessProxy.java       |    5 +
 .../multijvm/IgniteClusterProcessProxy.java     |    5 +
 .../IgniteCacheMetricsSelfTestSuite.java        |    4 +-
 .../IgniteHadoopFileSystemAbstractSelfTest.java |    2 +
 modules/indexing/pom.xml                        |    7 +
 .../processors/query/h2/IgniteH2Indexing.java   |   85 +-
 .../query/h2/ddl/DdlStatementsProcessor.java    |   28 +-
 .../query/h2/dml/UpdatePlanBuilder.java         |   15 +-
 .../query/h2/sql/GridSqlQuerySplitter.java      |   12 +-
 .../processors/query/h2/sys/SqlSystemIndex.java |  143 ++
 .../processors/query/h2/sys/SqlSystemTable.java |  208 ++
 .../query/h2/sys/SqlSystemTableEngine.java      |   60 +
 .../h2/sys/view/SqlAbstractLocalSystemView.java |  104 +
 .../h2/sys/view/SqlAbstractSystemView.java      |  134 ++
 .../query/h2/sys/view/SqlSystemView.java        |   79 +
 .../sys/view/SqlSystemViewColumnCondition.java  |  102 +
 .../query/h2/sys/view/SqlSystemViewNodes.java   |  116 +
 .../query/SqlSystemViewsSelfTest.java           |  247 +++
 .../IgniteCacheQuerySelfTestSuite.java          |    2 +
 .../IgnitePdsWithIndexingCoreTestSuite.java     |    9 +-
 .../main/java/org/apache/ignite/ml/Model.java   |    7 +
 .../ml/clustering/kmeans/KMeansModel.java       |   22 +-
 .../ml/clustering/kmeans/KMeansModelFormat.java |    2 +-
 .../ml/clustering/kmeans/KMeansTrainer.java     |    6 +-
 .../ml/composition/BaggingModelTrainer.java     |   38 +-
 .../ml/composition/ModelOnFeaturesSubspace.java |   19 +
 .../ml/composition/ModelsComposition.java       |   14 +
 .../boosting/GDBBinaryClassifierTrainer.java    |    2 +-
 .../boosting/GDBRegressionTrainer.java          |    2 +-
 .../ml/composition/boosting/GDBTrainer.java     |   40 +-
 .../PredictionsAggregator.java                  |    8 +
 .../WeightedPredictionsAggregator.java          |   24 +
 .../ignite/ml/dataset/DatasetFactory.java       |    2 +-
 .../dataset/impl/cache/CacheBasedDataset.java   |    3 +-
 .../builder/data/SimpleDatasetDataBuilder.java  |    2 +-
 .../data/SimpleLabeledDatasetDataBuilder.java   |    2 +-
 .../ml/environment/LearningEnvironment.java     |   54 +
 .../environment/LearningEnvironmentBuilder.java |  123 ++
 .../ml/environment/logging/ConsoleLogger.java   |  102 +
 .../ml/environment/logging/CustomMLLogger.java  |  105 +
 .../ignite/ml/environment/logging/MLLogger.java |   69 +
 .../ml/environment/logging/NoOpLogger.java      |   64 +
 .../ml/environment/logging/package-info.java    |   21 +
 .../ignite/ml/environment/package-info.java     |   21 +
 .../parallelism/DefaultParallelismStrategy.java |   85 +
 .../parallelism/NoParallelismStrategy.java      |   87 +
 .../parallelism/ParallelismStrategy.java        |   47 +
 .../ml/environment/parallelism/Promise.java     |   53 +
 .../environment/parallelism/package-info.java   |   21 +
 .../apache/ignite/ml/genetic/CrossOverJob.java  |    4 +-
 .../apache/ignite/ml/genetic/CrossOverTask.java |    4 +-
 .../apache/ignite/ml/genetic/FitnessJob.java    |    4 +-
 .../apache/ignite/ml/genetic/FitnessTask.java   |    4 +-
 .../org/apache/ignite/ml/genetic/GAGrid.java    |    3 -
 .../java/org/apache/ignite/ml/genetic/Gene.java |    1 -
 .../apache/ignite/ml/genetic/MutateTask.java    |    5 +-
 .../ignite/ml/genetic/TruncateSelectionJob.java |    3 +-
 .../ml/genetic/TruncateSelectionTask.java       |    4 +-
 .../ml/genetic/functions/GAGridFunction.java    |    4 +-
 .../ml/genetic/parameter/GAConfiguration.java   |    1 -
 .../ignite/ml/genetic/utils/GAGridUtils.java    |    3 -
 .../java/org/apache/ignite/ml/knn/KNNUtils.java |    2 +-
 .../classification/KNNClassificationModel.java  |   17 +-
 .../KNNClassificationTrainer.java               |    4 +-
 .../ml/knn/regression/KNNRegressionModel.java   |   17 +-
 .../ml/knn/regression/KNNRegressionTrainer.java |    4 +-
 .../java/org/apache/ignite/ml/math/Blas.java    |    2 +-
 .../java/org/apache/ignite/ml/math/Tracer.java  |   32 +-
 .../ml/math/distances/DistanceMeasure.java      |    2 +-
 .../ml/math/distances/EuclideanDistance.java    |    2 +-
 .../ml/math/distances/HammingDistance.java      |    2 +-
 .../ml/math/distances/ManhattanDistance.java    |    2 +-
 .../math/primitives/matrix/AbstractMatrix.java  |    2 +-
 .../primitives/matrix/impl/DenseMatrix.java     |    6 +-
 .../primitives/matrix/impl/SparseMatrix.java    |    6 +-
 .../math/primitives/matrix/impl/ViewMatrix.java |    6 +-
 .../matrix/storage/DenseMatrixStorage.java      |    2 +-
 .../matrix/storage/SparseMatrixStorage.java     |    2 +-
 .../math/primitives/vector/AbstractVector.java  |    2 +-
 .../ml/math/primitives/vector/Vector.java       |    3 +-
 .../vector/impl/DelegatingVector.java           |    6 +-
 .../primitives/vector/impl/DenseVector.java     |    6 +-
 .../primitives/vector/impl/SparseVector.java    |    4 +-
 .../math/primitives/vector/impl/VectorView.java |    4 +-
 .../vector/impl/VectorizedViewMatrix.java       |    4 +-
 .../storage/VectorizedViewMatrixStorage.java    |    2 +-
 .../apache/ignite/ml/math/util/MatrixUtil.java  |    6 +-
 .../org/apache/ignite/ml/nn/MLPTrainer.java     |    6 +-
 .../ignite/ml/nn/MultilayerPerceptron.java      |   29 +-
 .../ignite/ml/nn/ReplicatedVectorMatrix.java    |    6 +-
 .../ignite/ml/optimization/LossFunctions.java   |    2 +-
 .../ml/optimization/SmoothParametrized.java     |    4 +-
 .../NesterovUpdateCalculator.java               |    4 +-
 .../ParameterUpdateCalculator.java              |    4 +-
 .../RPropUpdateCalculator.java                  |    4 +-
 .../SimpleGDUpdateCalculator.java               |    4 +-
 .../binarization/BinarizationPreprocessor.java  |    2 +-
 .../binarization/BinarizationTrainer.java       |    2 +-
 .../StringEncoderPreprocessor.java              |    4 +-
 .../stringencoder/StringEncoderTrainer.java     |    2 +-
 .../imputing/ImputerPreprocessor.java           |    2 +-
 .../preprocessing/imputing/ImputerTrainer.java  |    2 +-
 .../minmaxscaling/MinMaxScalerPreprocessor.java |    2 +-
 .../minmaxscaling/MinMaxScalerTrainer.java      |    2 +-
 .../NormalizationPreprocessor.java              |    2 +-
 .../normalization/NormalizationTrainer.java     |    2 +-
 .../linear/FeatureExtractorWrapper.java         |    2 +-
 .../linear/LinearRegressionLSQRTrainer.java     |    6 +-
 .../linear/LinearRegressionModel.java           |    9 +-
 .../linear/LinearRegressionSGDTrainer.java      |    4 +-
 .../binomial/LogisticRegressionModel.java       |    9 +-
 .../binomial/LogisticRegressionSGDTrainer.java  |    4 +-
 .../LogRegressionMultiClassModel.java           |    5 +
 .../LogRegressionMultiClassTrainer.java         |    4 +-
 .../ignite/ml/selection/cv/CrossValidation.java |  214 +-
 .../ml/selection/cv/CrossValidationResult.java  |  134 ++
 .../ml/selection/paramgrid/ParamGrid.java       |   58 +
 .../paramgrid/ParameterSetGenerator.java        |   91 +
 .../ml/selection/paramgrid/package-info.java    |   22 +
 .../cursor/CacheBasedLabelPairCursor.java       |    2 +-
 .../scoring/cursor/LocalLabelPairCursor.java    |    2 +-
 .../selection/scoring/evaluator/Evaluator.java  |    2 +-
 .../ignite/ml/structures/LabeledDataset.java    |    2 +-
 ...abeledDatasetPartitionDataBuilderOnHeap.java |    2 +-
 .../preprocessing/LabeledDatasetLoader.java     |    2 +-
 .../svm/SVMLinearBinaryClassificationModel.java |    9 +-
 .../SVMLinearBinaryClassificationTrainer.java   |    4 +-
 .../SVMLinearMultiClassClassificationModel.java |    5 +
 ...VMLinearMultiClassClassificationTrainer.java |    4 +-
 .../ignite/ml/trainers/DatasetTrainer.java      |   26 +-
 .../ml/trainers/MultiLabelDatasetTrainer.java   |    2 +-
 .../ml/trainers/SingleLabelDatasetTrainer.java  |    2 +-
 .../org/apache/ignite/ml/tree/DecisionTree.java |   62 +-
 .../tree/DecisionTreeClassificationTrainer.java |   38 +
 .../ml/tree/DecisionTreeConditionalNode.java    |   10 +
 .../ignite/ml/tree/DecisionTreeLeafNode.java    |   10 +
 .../ml/tree/data/DecisionTreeDataBuilder.java   |    2 +-
 .../org/apache/ignite/ml/util/ModelTrace.java   |  130 ++
 .../org/apache/ignite/ml/LocalModelsTest.java   |    2 +-
 .../java/org/apache/ignite/ml/TestUtils.java    |    2 +-
 .../ignite/ml/clustering/KMeansModelTest.java   |    2 +-
 .../ignite/ml/clustering/KMeansTrainerTest.java |    2 +-
 .../ml/genetic/GAGridCalculateFitnessTest.java  |    5 +-
 .../genetic/GAGridInitializePopulationTest.java |    5 +-
 .../ignite/ml/knn/KNNClassificationTest.java    |    2 +-
 .../apache/ignite/ml/knn/KNNRegressionTest.java |    2 +-
 .../ignite/ml/knn/LabeledDatasetTest.java       |    2 +-
 .../org/apache/ignite/ml/math/BlasTest.java     |    2 +-
 .../ignite/ml/math/MathImplLocalTestSuite.java  |    8 +-
 .../org/apache/ignite/ml/math/TracerTest.java   |    2 +-
 .../matrix/MatrixBaseStorageTest.java           |    1 -
 .../matrix/MatrixStorageFixtures.java           |    1 -
 .../primitives/vector/AbstractVectorTest.java   |    2 +-
 .../vector/DelegatingVectorConstructorTest.java |    2 +-
 .../primitives/vector/MatrixVectorViewTest.java |    2 +-
 .../primitives/vector/VectorAttributesTest.java |    2 +-
 .../vector/VectorBaseStorageTest.java           |    1 -
 .../vector/VectorImplementationsFixtures.java   |    4 +-
 .../vector/VectorImplementationsTest.java       |    2 +-
 .../primitives/vector/VectorToMatrixTest.java   |    4 +-
 .../java/org/apache/ignite/ml/nn/MLPTest.java   |    4 +-
 .../ignite/ml/nn/MLPTrainerIntegrationTest.java |    4 +-
 .../org/apache/ignite/ml/nn/MLPTrainerTest.java |    2 +-
 .../MLPTrainerMnistIntegrationTest.java         |    2 +-
 .../ml/nn/performance/MLPTrainerMnistTest.java  |    2 +-
 .../linear/LinearRegressionModelTest.java       |    2 +-
 .../logistic/LogisticRegressionModelTest.java   |    2 +-
 .../ignite/ml/selection/SelectionTestSuite.java |    2 +
 .../paramgrid/ParameterSetGeneratorTest.java    |   56 +
 .../ml/svm/SVMBinaryTrainerIntegrationTest.java |  102 +
 .../org/apache/ignite/ml/svm/SVMModelTest.java  |    2 +-
 .../org/apache/ignite/ml/svm/SVMTestSuite.java  |    3 +-
 .../ApiParity/CacheParityTest.cs                |    3 +-
 .../ApiParity/ClusterParityTest.cs              |    3 +-
 .../org/apache/ignite/spark/impl/package.scala  |    2 +-
 .../ignite/spark/AbstractDataFrameSpec.scala    |    6 +-
 .../spi/deployment/uri/UriDeploymentSpi.java    |    4 +
 modules/web-console/backend/middlewares/api.js  |    5 +
 .../migrations/1516948939797-migrate-configs.js |  121 +-
 .../backend/migrations/migration-utils.js       |   38 +-
 modules/web-console/backend/package.json        |    2 +-
 modules/web-console/backend/routes/admin.js     |    4 +-
 .../backend/services/notifications.js           |    4 +-
 .../testcafe/fixtures/configuration/basic.js    |    3 +-
 .../configuration/clusterFormChangeDetection.js |   56 +
 modules/web-console/e2e/testcafe/helpers.js     |    4 +-
 modules/web-console/e2e/testcafe/package.json   |    4 +-
 .../PageConfigurationAdvancedCluster.js         |    8 +-
 .../page-models/PageConfigurationBasic.js       |    2 +-
 .../page-models/PageConfigurationOverview.js    |   10 +-
 .../pageConfigurationAdvancedIGFS.js            |    4 +-
 .../pageConfigurationAdvancedModels.js          |    6 +-
 modules/web-console/frontend/app/app.js         |    7 +-
 .../components/cluster-selector/controller.js   |    1 +
 .../connected-clusters-badge/style.scss         |    2 +-
 .../components/cluster-edit-form/controller.js  |    6 +-
 .../cluster-edit-form/templates/binary.pug      |    4 +-
 .../page-configure-overview/controller.js       |    5 +
 .../page-configure-overview/style.scss          |    2 +-
 .../page-configure-overview/template.pug        |   14 +-
 .../page-configure/components/fakeUICanExit.js  |   27 +-
 .../components/fakeUICanExit.spec.js            |   32 +
 .../app/components/page-configure/states.js     |    6 -
 .../app/components/page-configure/template.pug  |   10 +-
 .../page-forgot-password/template.pug           |    2 +-
 .../app/components/page-profile/index.js        |   12 +-
 .../app/components/page-profile/style.scss      |    3 +
 .../app/components/page-profile/template.pug    |   16 +-
 .../components/queries-notebook/style.scss      |   47 +-
 .../queries-notebook/template.tpl.pug           |  163 +-
 .../queries-notebooks-list/controller.js        |    6 +-
 .../app/components/page-queries/index.js        |   33 +-
 .../app/components/page-signin/template.pug     |    2 +-
 .../app/components/page-signup/template.pug     |    2 +-
 .../app/components/ui-grid-hovering/style.scss  |    6 +
 .../components/user-notifications/service.js    |    2 +-
 .../components/web-console-footer/template.pug  |    2 +-
 .../components/web-console-header/style.scss    |    7 +-
 .../components/web-console-header/template.pug  |    4 +-
 .../frontend/app/data/getting-started.json      |   30 +-
 modules/web-console/frontend/app/data/i18n.js   |    2 +-
 .../app/modules/agent/AgentManager.service.js   |    4 +-
 .../agent/components/cluster-login/template.pug |    7 +-
 .../app/modules/nodes/nodes-dialog.tpl.pug      |    2 +-
 .../frontend/app/modules/states/admin.state.js  |   12 +-
 .../app/modules/states/settings.state.js        |   33 +
 .../frontend/app/primitives/badge/index.scss    |    2 +-
 .../frontend/app/primitives/btn/index.scss      |    5 +
 .../frontend/app/services/Version.service.js    |    6 +-
 modules/web-console/frontend/package.json       |   10 +-
 .../frontend/public/images/cache.png            |  Bin 24791 -> 15087 bytes
 .../frontend/public/images/cluster-quick.png    |  Bin 0 -> 16407 bytes
 .../frontend/public/images/cluster.png          |  Bin 29376 -> 24083 bytes
 .../frontend/public/images/domains.png          |  Bin 22131 -> 17899 bytes
 .../web-console/frontend/public/images/igfs.png |  Bin 14139 -> 14683 bytes
 .../frontend/public/images/main-screenshot.png  |  Bin 86830 -> 0 bytes
 .../frontend/public/images/multicluster.png     |  Bin 21921 -> 31178 bytes
 .../frontend/public/images/preview.png          |  Bin 0 -> 29829 bytes
 .../frontend/public/images/query-chart.png      |  Bin 17142 -> 0 bytes
 .../frontend/public/images/query-metadata.png   |  Bin 39361 -> 0 bytes
 .../frontend/public/images/query-table.png      |  Bin 28065 -> 19943 bytes
 .../frontend/public/images/summary.png          |  Bin 33650 -> 0 bytes
 .../frontend/public/stylesheets/style.scss      |   73 +-
 modules/web-console/frontend/views/403.tpl.pug  |    2 +-
 modules/web-console/frontend/views/404.tpl.pug  |    2 +-
 modules/web-console/frontend/views/base.pug     |    4 +-
 modules/web-console/frontend/views/base2.pug    |   26 -
 .../frontend/views/includes/header-left.pug     |    2 +-
 .../frontend/views/includes/header-right.pug    |    2 +-
 .../frontend/views/templates/dropdown.tpl.pug   |    2 +-
 .../frontend/webpack/webpack.common.js          |    2 +-
 .../discovery/zk/internal/ZookeeperClient.java  |  126 +-
 .../zk/internal/ZookeeperDiscoveryImpl.java     |   13 +-
 .../internal/ZookeeperDiscoveryStatistics.java  |    7 +
 .../zk/internal/ZookeeperClientTest.java        |   93 +
 .../zk/internal/ZookeeperDiscoverySpiTest.java  |  139 +-
 parent/pom.xml                                  |   10 +-
 372 files changed, 6443 insertions(+), 3588 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/a867641d/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheExchangeMergeTest.java
----------------------------------------------------------------------