Search in sources :

Example 1 with REPLICATED

use of org.apache.ignite.cache.CacheMode.REPLICATED in project ignite by apache.

the class ServicePredicateAccessCacheTest method testPredicateAccessCache.

/**
 * @throws Exception If failed.
 */
@Test
public void testPredicateAccessCache() throws Exception {
    final IgniteEx ignite0 = startGrid(0);
    CacheConfiguration<String, String> cacheCfg = new CacheConfiguration<>();
    cacheCfg.setName("testCache");
    cacheCfg.setAtomicityMode(ATOMIC);
    cacheCfg.setCacheMode(REPLICATED);
    cacheCfg.setWriteSynchronizationMode(FULL_SYNC);
    IgniteCache<String, String> cache = ignite0.getOrCreateCache(cacheCfg);
    if (ignite0.context().service() instanceof IgniteServiceProcessor)
        cache.put(ignite0.cluster().localNode().id().toString(), "val");
    latch = new CountDownLatch(1);
    final ClusterGroup grp = ignite0.cluster().forPredicate((IgnitePredicate<ClusterNode>) node -> {
        System.out.println("Predicated started [thread=" + Thread.currentThread().getName() + ']');
        latch.countDown();
        try {
            Thread.sleep(3000);
        } catch (InterruptedException ignore) {
        }
        System.out.println("Call contains key [thread=" + Thread.currentThread().getName() + ']');
        boolean ret = Ignition.localIgnite().cache("testCache").containsKey(node.id().toString());
        System.out.println("After contains key [ret=" + ret + ", thread=" + Thread.currentThread().getName() + ']');
        return ret;
    });
    IgniteInternalFuture<?> fut = GridTestUtils.runAsync(new Callable<Void>() {

        @Override
        public Void call() throws Exception {
            info("Start deploy service.");
            ignite0.services(grp).deployNodeSingleton("testService", new TestService());
            info("Service deployed.");
            return null;
        }
    }, "deploy-thread");
    latch.await();
    startGrid(1);
    fut.get();
}
Also used : ClusterNode(org.apache.ignite.cluster.ClusterNode) ClusterGroup(org.apache.ignite.cluster.ClusterGroup) IgniteInternalFuture(org.apache.ignite.internal.IgniteInternalFuture) BinaryMarshaller(org.apache.ignite.internal.binary.BinaryMarshaller) GridCommonAbstractTest(org.apache.ignite.testframework.junits.common.GridCommonAbstractTest) Callable(java.util.concurrent.Callable) IgniteEx(org.apache.ignite.internal.IgniteEx) Test(org.junit.Test) FULL_SYNC(org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC) IgniteCache(org.apache.ignite.IgniteCache) GridTestUtils(org.apache.ignite.testframework.GridTestUtils) REPLICATED(org.apache.ignite.cache.CacheMode.REPLICATED) CountDownLatch(java.util.concurrent.CountDownLatch) IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) Ignition(org.apache.ignite.Ignition) ClusterNode(org.apache.ignite.cluster.ClusterNode) ServiceContext(org.apache.ignite.services.ServiceContext) CacheConfiguration(org.apache.ignite.configuration.CacheConfiguration) IgnitePredicate(org.apache.ignite.lang.IgnitePredicate) Service(org.apache.ignite.services.Service) ATOMIC(org.apache.ignite.cache.CacheAtomicityMode.ATOMIC) ClusterGroup(org.apache.ignite.cluster.ClusterGroup) CountDownLatch(java.util.concurrent.CountDownLatch) IgniteEx(org.apache.ignite.internal.IgniteEx) CacheConfiguration(org.apache.ignite.configuration.CacheConfiguration) GridCommonAbstractTest(org.apache.ignite.testframework.junits.common.GridCommonAbstractTest) Test(org.junit.Test)

Example 2 with REPLICATED

use of org.apache.ignite.cache.CacheMode.REPLICATED in project ignite by apache.

the class EventsRemoteSecurityContextCheckTest method checkRemoteListenWithNullFilter.

/**
 */
private void checkRemoteListenWithNullFilter(boolean async) throws Exception {
    for (IgniteEx initiator : initiators()) {
        IgniteCache<Object, Object> cache = initiator.createCache(new CacheConfiguration<>("test_cache_" + INDEX.incrementAndGet()).setCacheMode(REPLICATED));
        CountDownLatch srvNodesListenedLatch = new CountDownLatch(initiator.cluster().forServers().nodes().size());
        IgniteBiPredicate<UUID, ? extends Event> locLsnr = (uuid, e) -> {
            srvNodesListenedLatch.countDown();
            return true;
        };
        UUID lsnrId = async ? initiator.events().remoteListenAsync(locLsnr, null, EVT_CACHE_OBJECT_PUT).get() : initiator.events().remoteListen(locLsnr, null, EVT_CACHE_OBJECT_PUT);
        try {
            cache.put("key", "val");
            assertTrue(srvNodesListenedLatch.await(getTestTimeout(), MILLISECONDS));
        } finally {
            initiator.events().stopRemoteListen(lsnrId);
        }
    }
}
Also used : Arrays(java.util.Arrays) IgniteBiPredicate(org.apache.ignite.lang.IgniteBiPredicate) BiFunction(java.util.function.BiFunction) IgniteEx(org.apache.ignite.internal.IgniteEx) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) IgnitePredicate(org.apache.ignite.lang.IgnitePredicate) Map(java.util.Map) AbstractRemoteSecurityContextCheckTest(org.apache.ignite.internal.processors.security.AbstractRemoteSecurityContextCheckTest) IgniteEvents(org.apache.ignite.IgniteEvents) CacheEvent(org.apache.ignite.events.CacheEvent) EVT_CACHE_OBJECT_PUT(org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_PUT) EventType(org.apache.ignite.events.EventType) Collection(java.util.Collection) Event(org.apache.ignite.events.Event) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) Test(org.junit.Test) UUID(java.util.UUID) Ignite(org.apache.ignite.Ignite) MILLISECONDS(java.util.concurrent.TimeUnit.MILLISECONDS) IgniteCache(org.apache.ignite.IgniteCache) REPLICATED(org.apache.ignite.cache.CacheMode.REPLICATED) TimeUnit(java.util.concurrent.TimeUnit) CountDownLatch(java.util.concurrent.CountDownLatch) IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) Ignition(org.apache.ignite.Ignition) CacheConfiguration(org.apache.ignite.configuration.CacheConfiguration) Collections(java.util.Collections) IgniteEx(org.apache.ignite.internal.IgniteEx) CountDownLatch(java.util.concurrent.CountDownLatch) UUID(java.util.UUID) CacheConfiguration(org.apache.ignite.configuration.CacheConfiguration)

Example 3 with REPLICATED

use of org.apache.ignite.cache.CacheMode.REPLICATED in project ignite by apache.

the class OpenCensusSqlJdbcTracingTest method testSelectLocal.

/**
 * Tests tracing of local SQL SELECT query.
 *
 * @throws Exception If failed.
 */
@Test
public void testSelectLocal() throws Exception {
    String orgTable = createTableAndPopulate(Organization.class, REPLICATED, 1);
    SpanId rootSpan = executeAndCheckRootSpan("SELECT orgVal FROM " + orgTable, TEST_SCHEMA, false, false, true);
    String qryId = getAttribute(rootSpan, SQL_QRY_ID);
    assertTrue(Long.parseLong(qryId.substring(qryId.indexOf('_') + 1)) > 0);
    UUID.fromString(qryId.substring(0, qryId.indexOf('_')));
    checkChildSpan(SQL_QRY_PARSE, rootSpan);
    checkChildSpan(SQL_CURSOR_OPEN, rootSpan);
    checkChildSpan(SQL_ITER_OPEN, rootSpan);
    SpanId iterSpan = checkChildSpan(SQL_ITER_OPEN, rootSpan);
    checkChildSpan(SQL_QRY_EXECUTE, iterSpan);
    int fetchedRows = findChildSpans(SQL_PAGE_FETCH, rootSpan).stream().mapToInt(span -> Integer.parseInt(getAttribute(span, SQL_PAGE_ROWS))).sum();
    assertEquals(TEST_TABLE_POPULATION, fetchedRows);
    checkChildSpan(SQL_ITER_CLOSE, rootSpan);
    assertFalse(findChildSpans(SQL_CURSOR_CLOSE, rootSpan).isEmpty());
}
Also used : Connection(java.sql.Connection) SQL_PAGE_ROWS(org.apache.ignite.internal.processors.tracing.SpanTags.SQL_PAGE_ROWS) SQL_QRY_ID(org.apache.ignite.internal.processors.tracing.SpanTags.SQL_QRY_ID) SQL_CMD_QRY_EXECUTE(org.apache.ignite.internal.processors.tracing.SpanType.SQL_CMD_QRY_EXECUTE) IgniteEx(org.apache.ignite.internal.IgniteEx) SQLException(java.sql.SQLException) Config(org.apache.ignite.client.Config) ResultSet(java.sql.ResultSet) DriverManager.getConnection(java.sql.DriverManager.getConnection) SpanId(io.opencensus.trace.SpanId) SAMPLING_RATE_NEVER(org.apache.ignite.spi.tracing.TracingConfigurationParameters.SAMPLING_RATE_NEVER) PARTITIONED(org.apache.ignite.cache.CacheMode.PARTITIONED) TracingConfigurationCoordinates(org.apache.ignite.spi.tracing.TracingConfigurationCoordinates) SQL_ITER_OPEN(org.apache.ignite.internal.processors.tracing.SpanType.SQL_ITER_OPEN) SQL_BATCH_PROCESS(org.apache.ignite.internal.processors.tracing.SpanType.SQL_BATCH_PROCESS) SQL_CURSOR_CLOSE(org.apache.ignite.internal.processors.tracing.SpanType.SQL_CURSOR_CLOSE) SQL_ITER_CLOSE(org.apache.ignite.internal.processors.tracing.SpanType.SQL_ITER_CLOSE) Test(org.junit.Test) SQL_PAGE_FETCH(org.apache.ignite.internal.processors.tracing.SpanType.SQL_PAGE_FETCH) UUID(java.util.UUID) PreparedStatement(java.sql.PreparedStatement) SQL_QRY(org.apache.ignite.internal.processors.tracing.SpanType.SQL_QRY) REPLICATED(org.apache.ignite.cache.CacheMode.REPLICATED) Objects(java.util.Objects) List(java.util.List) DFLT_SCHEMA(org.apache.ignite.internal.processors.query.QueryUtils.DFLT_SCHEMA) SAMPLING_RATE_ALWAYS(org.apache.ignite.spi.tracing.TracingConfigurationParameters.SAMPLING_RATE_ALWAYS) TracingConfigurationParameters(org.apache.ignite.spi.tracing.TracingConfigurationParameters) SQL_CURSOR_OPEN(org.apache.ignite.internal.processors.tracing.SpanType.SQL_CURSOR_OPEN) SQL_QRY_PARSE(org.apache.ignite.internal.processors.tracing.SpanType.SQL_QRY_PARSE) SQL(org.apache.ignite.spi.tracing.Scope.SQL) SQL_QRY_EXECUTE(org.apache.ignite.internal.processors.tracing.SpanType.SQL_QRY_EXECUTE) IgniteUtils.resolveIgnitePath(org.apache.ignite.internal.util.IgniteUtils.resolveIgnitePath) SpanId(io.opencensus.trace.SpanId) Test(org.junit.Test)

Example 4 with REPLICATED

use of org.apache.ignite.cache.CacheMode.REPLICATED in project ignite by apache.

the class CacheBlockOnReadAbstractTest method testStopBaselineTransactionalReplicated.

/**
 * @throws Exception If failed.
 */
@Params(baseline = 9, atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED)
@Test
public void testStopBaselineTransactionalReplicated() throws Exception {
    AtomicInteger cntDownCntr = new AtomicInteger(0);
    doTest(asMessagePredicate(discoEvt -> discoEvt.type() == EventType.EVT_NODE_LEFT), () -> {
        IgniteEx node = baseline.get(baseline.size() - cntDownCntr.get() - 1);
        TestRecordingCommunicationSpi.spi(node).stopBlock();
        cntDownCntr.incrementAndGet();
        for (int i = 0; i < cntDownCntr.get(); i++) // This node and previously stopped nodes as well.
        cntFinishedReadOperations.countDown();
        stopGrid(node.name());
    });
}
Also used : CacheAtomicityMode(org.apache.ignite.cache.CacheAtomicityMode) IgniteInternalFuture(org.apache.ignite.internal.IgniteInternalFuture) DiscoveryCustomEvent(org.apache.ignite.internal.events.DiscoveryCustomEvent) Arrays(java.util.Arrays) TcpDiscoveryNodeAddFinishedMessage(org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryNodeAddFinishedMessage) IgniteEx(org.apache.ignite.internal.IgniteEx) RendezvousAffinityFunction(org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) X(org.apache.ignite.internal.util.typedef.X) PARTITIONED(org.apache.ignite.cache.CacheMode.PARTITIONED) TcpDiscoveryNodeLeftMessage(org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryNodeLeftMessage) GridCommonAbstractTest(org.apache.ignite.testframework.junits.common.GridCommonAbstractTest) EventType(org.apache.ignite.events.EventType) Predicate(java.util.function.Predicate) TestTcpDiscoverySpi(org.apache.ignite.spi.discovery.tcp.TestTcpDiscoverySpi) Collection(java.util.Collection) IgniteCheckedException(org.apache.ignite.IgniteCheckedException) IgniteException(org.apache.ignite.IgniteException) Set(java.util.Set) UUID(java.util.UUID) TcpDiscoveryAbstractMessage(org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryAbstractMessage) IgniteCache(org.apache.ignite.IgniteCache) GridTestUtils(org.apache.ignite.testframework.GridTestUtils) Objects(java.util.Objects) CountDownLatch(java.util.concurrent.CountDownLatch) ExchangeActions(org.apache.ignite.internal.processors.cache.ExchangeActions) List(java.util.List) IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) IgniteFutureTimeoutCheckedException(org.apache.ignite.internal.IgniteFutureTimeoutCheckedException) Message(org.apache.ignite.plugin.extensions.communication.Message) RunnableX(org.apache.ignite.testframework.GridTestUtils.RunnableX) TestRecordingCommunicationSpi(org.apache.ignite.internal.TestRecordingCommunicationSpi) NotNull(org.jetbrains.annotations.NotNull) CopyOnWriteArrayList(java.util.concurrent.CopyOnWriteArrayList) TcpDiscoveryIpFinder(org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder) DiscoveryEvent(org.apache.ignite.events.DiscoveryEvent) IgniteBiPredicate(org.apache.ignite.lang.IgniteBiPredicate) U(org.apache.ignite.internal.util.typedef.internal.U) Retention(java.lang.annotation.Retention) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) ClusterNode(org.apache.ignite.cluster.ClusterNode) DiscoveryCustomMessage(org.apache.ignite.internal.managers.discovery.DiscoveryCustomMessage) BiConsumer(java.util.function.BiConsumer) IgniteInterruptedException(org.apache.ignite.IgniteInterruptedException) DataStorageConfiguration(org.apache.ignite.configuration.DataStorageConfiguration) IgniteInterruptedCheckedException(org.apache.ignite.internal.IgniteInterruptedCheckedException) CacheActionData(org.apache.ignite.internal.processors.cache.ExchangeActions.CacheActionData) TcpDiscoveryVmIpFinder(org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder) ClusterTopologyCheckedException(org.apache.ignite.internal.cluster.ClusterTopologyCheckedException) Target(java.lang.annotation.Target) Test(org.junit.Test) ElementType(java.lang.annotation.ElementType) TRANSACTIONAL(org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL) REPLICATED(org.apache.ignite.cache.CacheMode.REPLICATED) TimeUnit(java.util.concurrent.TimeUnit) AtomicLong(java.util.concurrent.atomic.AtomicLong) ChangeGlobalStateMessage(org.apache.ignite.internal.processors.cluster.ChangeGlobalStateMessage) CacheConfiguration(org.apache.ignite.configuration.CacheConfiguration) GridDhtPartitionsFullMessage(org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsFullMessage) IgniteDataStreamer(org.apache.ignite.IgniteDataStreamer) ATOMIC(org.apache.ignite.cache.CacheAtomicityMode.ATOMIC) GridDhtPartitionExchangeId(org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionExchangeId) Collections(java.util.Collections) DataRegionConfiguration(org.apache.ignite.configuration.DataRegionConfiguration) RetentionPolicy(java.lang.annotation.RetentionPolicy) CacheMode(org.apache.ignite.cache.CacheMode) DynamicCacheChangeBatch(org.apache.ignite.internal.processors.cache.DynamicCacheChangeBatch) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) IgniteEx(org.apache.ignite.internal.IgniteEx) GridCommonAbstractTest(org.apache.ignite.testframework.junits.common.GridCommonAbstractTest) Test(org.junit.Test)

Example 5 with REPLICATED

use of org.apache.ignite.cache.CacheMode.REPLICATED in project ignite by apache.

the class AbstractReadRepairTest method setDifferentValuesForSameKey.

/**
 */
private InconsistentMapping setDifferentValuesForSameKey(int key, boolean misses, boolean nulls, ReadRepairStrategy strategy) throws Exception {
    List<Ignite> nodes = new ArrayList<>();
    Map<Ignite, T2<Integer, GridCacheVersion>> mapping = new HashMap<>();
    Ignite primary = primaryNode(key, DEFAULT_CACHE_NAME);
    ThreadLocalRandom rnd = ThreadLocalRandom.current();
    if (rnd.nextBoolean()) {
        // Reversed order.
        nodes.addAll(backupNodes(key, DEFAULT_CACHE_NAME));
        nodes.add(primary);
    } else {
        nodes.add(primary);
        nodes.addAll(backupNodes(key, DEFAULT_CACHE_NAME));
    }
    if (// Random order.
    rnd.nextBoolean())
        Collections.shuffle(nodes);
    IgniteInternalCache<Integer, Integer> internalCache = (grid(1)).cachex(DEFAULT_CACHE_NAME);
    GridCacheVersionManager mgr = ((GridCacheAdapter) internalCache.cache()).context().shared().versions();
    int incVal = 0;
    Integer primVal = null;
    Collection<T2<Integer, GridCacheVersion>> vals = new ArrayList<>();
    if (misses) {
        List<Ignite> keeped = nodes.subList(0, rnd.nextInt(1, nodes.size()));
        nodes.stream().filter(node -> !keeped.contains(node)).forEach(node -> {
            T2<Integer, GridCacheVersion> nullT2 = new T2<>(null, null);
            vals.add(nullT2);
            mapping.put(node, nullT2);
        });
        // Recording nulls (missed values).
        nodes = keeped;
    }
    boolean rmvd = false;
    boolean incVer = rnd.nextBoolean();
    GridCacheVersion ver = null;
    for (Ignite node : nodes) {
        IgniteInternalCache<Integer, Integer> cache = ((IgniteEx) node).cachex(DEFAULT_CACHE_NAME);
        GridCacheAdapter<Integer, Integer> adapter = (GridCacheAdapter) cache.cache();
        GridCacheEntryEx entry = adapter.entryEx(key);
        if (ver == null || incVer)
            // Incremental version.
            ver = mgr.next(entry.context().kernalContext().discovery().topologyVersion());
        boolean rmv = nulls && (!rmvd || rnd.nextBoolean());
        Integer val = rmv ? null : rnd.nextBoolean() ? /*increment or same as previously*/
        ++incVal : incVal;
        T2<Integer, GridCacheVersion> valVer = new T2<>(val, val != null ? ver : null);
        vals.add(valVer);
        mapping.put(node, valVer);
        GridKernalContext kctx = ((IgniteEx) node).context();
        // Incremental value.
        byte[] bytes = kctx.cacheObjects().marshal(entry.context().cacheObjectContext(), rmv ? -1 : val);
        try {
            kctx.cache().context().database().checkpointReadLock();
            boolean init = entry.initialValue(new CacheObjectImpl(null, bytes), ver, 0, 0, false, AffinityTopologyVersion.NONE, GridDrType.DR_NONE, false, false);
            if (rmv) {
                if (cache.configuration().getAtomicityMode() == ATOMIC)
                    entry.innerUpdate(ver, ((IgniteEx) node).localNode().id(), ((IgniteEx) node).localNode().id(), GridCacheOperation.DELETE, null, null, false, false, false, false, null, false, false, false, false, AffinityTopologyVersion.NONE, null, GridDrType.DR_NONE, 0, 0, null, false, false, null, null, null, null, false);
                else
                    entry.innerRemove(null, ((IgniteEx) node).localNode().id(), ((IgniteEx) node).localNode().id(), false, false, false, false, false, null, AffinityTopologyVersion.NONE, CU.empty0(), GridDrType.DR_NONE, null, null, null, 1L);
                rmvd = true;
                assertFalse(entry.hasValue());
            } else
                assertTrue(entry.hasValue());
            assertTrue("iterableKey " + key + " already inited", init);
            if (node.equals(primary))
                primVal = val;
        } finally {
            ((IgniteEx) node).context().cache().context().database().checkpointReadUnlock();
        }
    }
    assertEquals(vals.size(), mapping.size());
    assertEquals(vals.size(), internalCache.configuration().getCacheMode() == REPLICATED ? serverNodesCount() : backupsCount() + 1);
    if (!misses && !nulls)
        // Primary value set.
        assertTrue(primVal != null);
    Integer fixed;
    boolean consistent;
    boolean repairable;
    if (vals.stream().distinct().count() == 1) {
        // Consistent value.
        consistent = true;
        repairable = true;
        fixed = vals.iterator().next().getKey();
    } else {
        consistent = false;
        // Currently, Atomic caches can not be repaired.
        repairable = atomicityMode() != ATOMIC;
        switch(strategy) {
            case LWW:
                if (misses || rmvd || !incVer) {
                    repairable = false;
                    // Should never be returned.
                    fixed = Integer.MIN_VALUE;
                } else
                    fixed = incVal;
                break;
            case PRIMARY:
                fixed = primVal;
                break;
            case RELATIVE_MAJORITY:
                // Should never be returned.
                fixed = Integer.MIN_VALUE;
                Map<T2<Integer, GridCacheVersion>, Integer> counts = new HashMap<>();
                for (T2<Integer, GridCacheVersion> val : vals) {
                    counts.putIfAbsent(val, 0);
                    counts.compute(val, (k, v) -> v + 1);
                }
                int[] sorted = counts.values().stream().sorted(Comparator.reverseOrder()).mapToInt(v -> v).toArray();
                int max = sorted[0];
                if (sorted.length > 1 && sorted[1] == max)
                    repairable = false;
                if (repairable)
                    for (Map.Entry<T2<Integer, GridCacheVersion>, Integer> count : counts.entrySet()) if (count.getValue().equals(max)) {
                        fixed = count.getKey().getKey();
                        break;
                    }
                break;
            case REMOVE:
                fixed = null;
                break;
            case CHECK_ONLY:
                repairable = false;
                // Should never be returned.
                fixed = Integer.MIN_VALUE;
                break;
            default:
                throw new UnsupportedOperationException(strategy.toString());
        }
    }
    return new InconsistentMapping(mapping, primVal, fixed, repairable, consistent);
}
Also used : CacheAtomicityMode(org.apache.ignite.cache.CacheAtomicityMode) IgniteEx(org.apache.ignite.internal.IgniteEx) RendezvousAffinityFunction(org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction) Map(java.util.Map) PARTITIONED(org.apache.ignite.cache.CacheMode.PARTITIONED) IgniteInternalCache(org.apache.ignite.internal.processors.cache.IgniteInternalCache) GridCommonAbstractTest(org.apache.ignite.testframework.junits.common.GridCommonAbstractTest) EventType(org.apache.ignite.events.EventType) Collection(java.util.Collection) Event(org.apache.ignite.events.Event) ReadRepairStrategy(org.apache.ignite.cache.ReadRepairStrategy) Collectors(java.util.stream.Collectors) IgniteCache(org.apache.ignite.IgniteCache) GridCacheOperation(org.apache.ignite.internal.processors.cache.GridCacheOperation) List(java.util.List) IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) CU(org.apache.ignite.internal.util.typedef.internal.CU) GridCacheEntryEx(org.apache.ignite.internal.processors.cache.GridCacheEntryEx) GridCacheAdapter(org.apache.ignite.internal.processors.cache.GridCacheAdapter) ClusterState(org.apache.ignite.cluster.ClusterState) GridCacheVersion(org.apache.ignite.internal.processors.cache.version.GridCacheVersion) HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) GridKernalContext(org.apache.ignite.internal.GridKernalContext) ClusterNode(org.apache.ignite.cluster.ClusterNode) IgnitePredicate(org.apache.ignite.lang.IgnitePredicate) ThreadLocalRandom(java.util.concurrent.ThreadLocalRandom) IgniteIrreparableConsistencyViolationException(org.apache.ignite.internal.processors.cache.distributed.near.consistency.IgniteIrreparableConsistencyViolationException) GridDrType(org.apache.ignite.internal.processors.dr.GridDrType) DataStorageConfiguration(org.apache.ignite.configuration.DataStorageConfiguration) IgniteEvents(org.apache.ignite.IgniteEvents) G(org.apache.ignite.internal.util.typedef.G) AffinityTopologyVersion(org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion) Ignite(org.apache.ignite.Ignite) CacheConsistencyViolationEvent(org.apache.ignite.events.CacheConsistencyViolationEvent) CacheObjectImpl(org.apache.ignite.internal.processors.cache.CacheObjectImpl) FULL_SYNC(org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC) ConcurrentLinkedDeque(java.util.concurrent.ConcurrentLinkedDeque) TRANSACTIONAL(org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL) T2(org.apache.ignite.internal.util.typedef.T2) REPLICATED(org.apache.ignite.cache.CacheMode.REPLICATED) Consumer(java.util.function.Consumer) GridCacheVersionManager(org.apache.ignite.internal.processors.cache.version.GridCacheVersionManager) TreeMap(java.util.TreeMap) CacheConfiguration(org.apache.ignite.configuration.CacheConfiguration) ATOMIC(org.apache.ignite.cache.CacheAtomicityMode.ATOMIC) EVT_CONSISTENCY_VIOLATION(org.apache.ignite.events.EventType.EVT_CONSISTENCY_VIOLATION) Comparator(java.util.Comparator) Collections(java.util.Collections) CacheMode(org.apache.ignite.cache.CacheMode) HashMap(java.util.HashMap) GridKernalContext(org.apache.ignite.internal.GridKernalContext) ArrayList(java.util.ArrayList) GridCacheVersion(org.apache.ignite.internal.processors.cache.version.GridCacheVersion) GridCacheAdapter(org.apache.ignite.internal.processors.cache.GridCacheAdapter) ThreadLocalRandom(java.util.concurrent.ThreadLocalRandom) Ignite(org.apache.ignite.Ignite) T2(org.apache.ignite.internal.util.typedef.T2) CacheObjectImpl(org.apache.ignite.internal.processors.cache.CacheObjectImpl) GridCacheVersionManager(org.apache.ignite.internal.processors.cache.version.GridCacheVersionManager) GridCacheEntryEx(org.apache.ignite.internal.processors.cache.GridCacheEntryEx) IgniteEx(org.apache.ignite.internal.IgniteEx)

Aggregations

REPLICATED (org.apache.ignite.cache.CacheMode.REPLICATED)7 IgniteEx (org.apache.ignite.internal.IgniteEx)7 IgniteCache (org.apache.ignite.IgniteCache)6 CacheConfiguration (org.apache.ignite.configuration.CacheConfiguration)6 IgniteConfiguration (org.apache.ignite.configuration.IgniteConfiguration)6 Collection (java.util.Collection)5 Collections (java.util.Collections)5 List (java.util.List)5 UUID (java.util.UUID)5 CountDownLatch (java.util.concurrent.CountDownLatch)5 ATOMIC (org.apache.ignite.cache.CacheAtomicityMode.ATOMIC)5 PARTITIONED (org.apache.ignite.cache.CacheMode.PARTITIONED)5 ClusterNode (org.apache.ignite.cluster.ClusterNode)5 EventType (org.apache.ignite.events.EventType)5 GridCommonAbstractTest (org.apache.ignite.testframework.junits.common.GridCommonAbstractTest)5 ArrayList (java.util.ArrayList)4 Arrays (java.util.Arrays)4 Objects (java.util.Objects)4 TimeUnit (java.util.concurrent.TimeUnit)4 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)4