Search in sources :

Example 21 with IdleVerifyResultV2

use of org.apache.ignite.internal.processors.cache.verify.IdleVerifyResultV2 in project ignite by apache.

the class IgniteClusterSnapshotCheckWithIndexesTest method testClusterSnapshotCheckWithNodeFilter.

/**
 * @throws Exception If failed.
 */
@Test
public void testClusterSnapshotCheckWithNodeFilter() throws Exception {
    startGridsWithoutCache(2);
    IgniteCache<Integer, Account> cache1 = grid(0).createCache(txFilteredCache("cache0").setNodeFilter(new SelfNodeFilter(grid(0).localNode().id())));
    IgniteCache<Integer, Account> cache2 = grid(1).createCache(txFilteredCache("cache1").setNodeFilter(new SelfNodeFilter(grid(1).localNode().id())));
    for (int i = 0; i < CACHE_KEYS_RANGE; i++) {
        cache1.put(i, new Account(i, i));
        cache2.put(i, new Account(i, i));
    }
    grid(0).snapshot().createSnapshot(SNAPSHOT_NAME).get(TIMEOUT);
    IdleVerifyResultV2 res = grid(0).context().cache().context().snapshotMgr().checkSnapshot(SNAPSHOT_NAME).get();
    StringBuilder b = new StringBuilder();
    res.print(b::append, true);
    assertTrue("Exceptions: " + b, F.isEmpty(res.exceptions()));
    assertContains(log, b.toString(), "The check procedure has finished, no conflicts have been found.");
}
Also used : IdleVerifyResultV2(org.apache.ignite.internal.processors.cache.verify.IdleVerifyResultV2) Test(org.junit.Test)

Aggregations

IdleVerifyResultV2 (org.apache.ignite.internal.processors.cache.verify.IdleVerifyResultV2)21 IgniteEx (org.apache.ignite.internal.IgniteEx)17 Test (org.junit.Test)16 IgniteCheckedException (org.apache.ignite.IgniteCheckedException)7 IOException (java.io.IOException)5 Path (java.nio.file.Path)5 ArrayList (java.util.ArrayList)5 List (java.util.List)5 IgniteException (org.apache.ignite.IgniteException)5 IgniteSnapshotManager.databaseRelativePath (org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteSnapshotManager.databaseRelativePath)5 File (java.io.File)4 Random (java.util.Random)4 AtomicBoolean (java.util.concurrent.atomic.AtomicBoolean)4 RendezvousAffinityFunction (org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction)4 CacheConfiguration (org.apache.ignite.configuration.CacheConfiguration)4 IgniteDataIntegrityViolationException (org.apache.ignite.internal.processors.cache.persistence.wal.crc.IgniteDataIntegrityViolationException)4 PartitionKeyV2 (org.apache.ignite.internal.processors.cache.verify.PartitionKeyV2)4 VisorIdleVerifyTaskArg (org.apache.ignite.internal.visor.verify.VisorIdleVerifyTaskArg)4 Collections.singletonList (java.util.Collections.singletonList)3 HashSet (java.util.HashSet)3