Search in sources :

Example 6 with SystemView

use of org.apache.ignite.spi.systemview.view.SystemView in project ignite by apache.

the class FunctionalTest method testTransactionsWithLabel.

/**
 * Test transactions with label.
 */
@Test
public void testTransactionsWithLabel() throws Exception {
    try (IgniteEx ignite = (IgniteEx) Ignition.start(Config.getServerConfiguration());
        IgniteClient client = Ignition.startClient(getClientConfiguration())) {
        ClientCache<Integer, String> cache = client.createCache(new ClientCacheConfiguration().setName("cache").setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL));
        SystemView<TransactionView> txsView = ignite.context().systemView().view(TXS_MON_LIST);
        cache.put(0, "value1");
        try (ClientTransaction tx = client.transactions().withLabel("label").txStart()) {
            cache.put(0, "value2");
            assertEquals(1, F.size(txsView.iterator()));
            TransactionView txv = txsView.iterator().next();
            assertEquals("label", txv.label());
            assertEquals("value2", cache.get(0));
        }
        assertEquals("value1", cache.get(0));
        try (ClientTransaction tx = client.transactions().withLabel("label1").withLabel("label2").txStart()) {
            cache.put(0, "value2");
            assertEquals(1, F.size(txsView.iterator()));
            TransactionView txv = txsView.iterator().next();
            assertEquals("label2", txv.label());
            tx.commit();
        }
        assertEquals("value2", cache.get(0));
        // Test concurrent with label and without label transactions.
        try (ClientTransaction tx = client.transactions().withLabel("label").txStart(PESSIMISTIC, READ_COMMITTED)) {
            CyclicBarrier barrier = new CyclicBarrier(2);
            cache.put(0, "value3");
            IgniteInternalFuture<?> fut = GridTestUtils.runAsync(() -> {
                try (ClientTransaction tx1 = client.transactions().txStart(PESSIMISTIC, READ_COMMITTED)) {
                    cache.put(1, "value3");
                    barrier.await();
                    assertEquals("value2", cache.get(0));
                    barrier.await();
                } catch (InterruptedException | BrokenBarrierException ignore) {
                // No-op.
                }
            });
            barrier.await();
            assertNull(cache.get(1));
            assertEquals(1, F.size(txsView.iterator(), txv -> txv.label() == null));
            assertEquals(1, F.size(txsView.iterator(), txv -> "label".equals(txv.label())));
            barrier.await();
            fut.get();
        }
        // Test nested transactions is not possible.
        try (ClientTransaction tx = client.transactions().withLabel("label1").txStart()) {
            try (ClientTransaction tx1 = client.transactions().txStart()) {
                fail();
            } catch (ClientException expected) {
            // No-op.
            }
            try (ClientTransaction tx1 = client.transactions().withLabel("label2").txStart()) {
                fail();
            } catch (ClientException expected) {
            // No-op.
            }
        }
    }
}
Also used : CacheAtomicityMode(org.apache.ignite.cache.CacheAtomicityMode) IgniteInternalFuture(org.apache.ignite.internal.IgniteInternalFuture) ModifiedExpiryPolicy(javax.cache.expiry.ModifiedExpiryPolicy) BinaryObject(org.apache.ignite.binary.BinaryObject) Arrays(java.util.Arrays) AbstractBinaryArraysTest(org.apache.ignite.internal.binary.AbstractBinaryArraysTest) SERIALIZABLE(org.apache.ignite.transactions.TransactionIsolation.SERIALIZABLE) CacheKeyConfiguration(org.apache.ignite.cache.CacheKeyConfiguration) Date(java.util.Date) Transaction(org.apache.ignite.transactions.Transaction) IgniteEx(org.apache.ignite.internal.IgniteEx) TestEnum(org.apache.ignite.internal.processors.cache.CacheEnumOperationsAbstractTest.TestEnum) REPEATABLE_READ(org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_READ) AccessedExpiryPolicy(javax.cache.expiry.AccessedExpiryPolicy) CacheRebalanceMode(org.apache.ignite.cache.CacheRebalanceMode) GridTestUtils.runAsync(org.apache.ignite.testframework.GridTestUtils.runAsync) VAL3(org.apache.ignite.internal.processors.cache.CacheEnumOperationsAbstractTest.TestEnum.VAL3) VAL1(org.apache.ignite.internal.processors.cache.CacheEnumOperationsAbstractTest.TestEnum.VAL1) VAL2(org.apache.ignite.internal.processors.cache.CacheEnumOperationsAbstractTest.TestEnum.VAL2) Map(java.util.Map) QueryEntity(org.apache.ignite.cache.QueryEntity) ClientStatus(org.apache.ignite.internal.processors.platform.client.ClientStatus) GridTestUtils.assertThrowsAnyCause(org.apache.ignite.testframework.GridTestUtils.assertThrowsAnyCause) CyclicBarrier(java.util.concurrent.CyclicBarrier) ImmutableSet(com.google.common.collect.ImmutableSet) CachePeekMode(org.apache.ignite.cache.CachePeekMode) SystemView(org.apache.ignite.spi.systemview.view.SystemView) TransactionView(org.apache.ignite.spi.systemview.view.TransactionView) Set(java.util.Set) OPTIMISTIC(org.apache.ignite.transactions.TransactionConcurrency.OPTIMISTIC) READ_COMMITTED(org.apache.ignite.transactions.TransactionIsolation.READ_COMMITTED) ClientListenerProcessor(org.apache.ignite.internal.processors.odbc.ClientListenerProcessor) UUID(java.util.UUID) Collectors(java.util.stream.Collectors) IgniteCache(org.apache.ignite.IgniteCache) GridTestUtils(org.apache.ignite.testframework.GridTestUtils) CountDownLatch(java.util.concurrent.CountDownLatch) List(java.util.List) IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) Stream(java.util.stream.Stream) ClientConfiguration(org.apache.ignite.configuration.ClientConfiguration) PESSIMISTIC(org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC) IntStream(java.util.stream.IntStream) TransactionIsolation(org.apache.ignite.transactions.TransactionIsolation) U(org.apache.ignite.internal.util.typedef.internal.U) HashMap(java.util.HashMap) ClientServerError(org.apache.ignite.internal.client.thin.ClientServerError) TreeSet(java.util.TreeSet) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) LinkedHashMap(java.util.LinkedHashMap) PartitionLossPolicy(org.apache.ignite.cache.PartitionLossPolicy) PlatformExpiryPolicy(org.apache.ignite.internal.processors.platform.cache.expiry.PlatformExpiryPolicy) ClientProcessorMXBean(org.apache.ignite.mxbean.ClientProcessorMXBean) CacheWriteSynchronizationMode(org.apache.ignite.cache.CacheWriteSynchronizationMode) Assert.assertArrayEquals(org.junit.Assert.assertArrayEquals) Timeout(org.junit.rules.Timeout) DataStorageConfiguration(org.apache.ignite.configuration.DataStorageConfiguration) LinkedList(java.util.LinkedList) SimpleEntry(java.util.AbstractMap.SimpleEntry) Duration(javax.cache.expiry.Duration) F(org.apache.ignite.internal.util.typedef.F) CreatedExpiryPolicy(javax.cache.expiry.CreatedExpiryPolicy) Iterator(java.util.Iterator) TXS_MON_LIST(org.apache.ignite.internal.processors.cache.transactions.IgniteTxManager.TXS_MON_LIST) BrokenBarrierException(java.util.concurrent.BrokenBarrierException) Test(org.junit.Test) Ignite(org.apache.ignite.Ignite) T2(org.apache.ignite.internal.util.typedef.T2) TimeUnit(java.util.concurrent.TimeUnit) Ignition(org.apache.ignite.Ignition) Rule(org.junit.Rule) CacheConfiguration(org.apache.ignite.configuration.CacheConfiguration) Collections(java.util.Collections) QueryIndex(org.apache.ignite.cache.QueryIndex) DataRegionConfiguration(org.apache.ignite.configuration.DataRegionConfiguration) CacheMode(org.apache.ignite.cache.CacheMode) ClientConnectorConfiguration(org.apache.ignite.configuration.ClientConnectorConfiguration) BrokenBarrierException(java.util.concurrent.BrokenBarrierException) CyclicBarrier(java.util.concurrent.CyclicBarrier) IgniteEx(org.apache.ignite.internal.IgniteEx) TransactionView(org.apache.ignite.spi.systemview.view.TransactionView) AbstractBinaryArraysTest(org.apache.ignite.internal.binary.AbstractBinaryArraysTest) Test(org.junit.Test)

Example 7 with SystemView

use of org.apache.ignite.spi.systemview.view.SystemView in project ignite by apache.

the class SystemViewSelfTest method testDistributedMetastorage.

/**
 */
@Test
public void testDistributedMetastorage() throws Exception {
    cleanPersistenceDir();
    try (IgniteEx ignite = startGrid(getConfiguration().setDataStorageConfiguration(new DataStorageConfiguration().setDefaultDataRegionConfiguration(new DataRegionConfiguration().setPersistenceEnabled(true))))) {
        ignite.cluster().state(ClusterState.ACTIVE);
        DistributedMetaStorage dms = ignite.context().distributedMetastorage();
        SystemView<MetastorageView> metaStoreView = ignite.context().systemView().view(DISTRIBUTED_METASTORE_VIEW);
        assertNotNull(metaStoreView);
        String name = "test-distributed-key";
        String val = "test-distributed-value";
        dms.write(name, val);
        MetastorageView testKey = F.find(metaStoreView, null, (IgnitePredicate<? super MetastorageView>) view -> name.equals(view.name()) && val.equals(view.value()));
        assertNotNull(testKey);
    }
}
Also used : DataStorageConfiguration(org.apache.ignite.configuration.DataStorageConfiguration) MetastorageView(org.apache.ignite.spi.systemview.view.MetastorageView) Arrays(java.util.Arrays) GridCacheUtils.cacheId(org.apache.ignite.internal.processors.cache.GridCacheUtils.cacheId) StripedExecutorTaskView(org.apache.ignite.spi.systemview.view.StripedExecutorTaskView) CountDownLatchView(org.apache.ignite.spi.systemview.view.datastructures.CountDownLatchView) QueueView(org.apache.ignite.spi.systemview.view.datastructures.QueueView) GridTestUtils.runAsync(org.apache.ignite.testframework.GridTestUtils.runAsync) TestObjectEnum(org.apache.ignite.internal.binary.mutabletest.GridBinaryTestClasses.TestObjectEnum) ComputeTaskView(org.apache.ignite.spi.systemview.view.ComputeTaskView) Map(java.util.Map) CachePagesListView(org.apache.ignite.spi.systemview.view.CachePagesListView) Cache(javax.cache.Cache) ComputeTask(org.apache.ignite.compute.ComputeTask) SEQUENCES_VIEW(org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.SEQUENCES_VIEW) NodeAttributeView(org.apache.ignite.spi.systemview.view.NodeAttributeView) IgniteUtils.toStringSafe(org.apache.ignite.internal.util.IgniteUtils.toStringSafe) BaselineNodeView(org.apache.ignite.spi.systemview.view.BaselineNodeView) DEFAULT_DS_GROUP_NAME(org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.DEFAULT_DS_GROUP_NAME) BaselineNodeAttributeViewWalker(org.apache.ignite.internal.managers.systemview.walker.BaselineNodeAttributeViewWalker) SystemView(org.apache.ignite.spi.systemview.view.SystemView) TransactionView(org.apache.ignite.spi.systemview.view.TransactionView) AtomicStampedView(org.apache.ignite.spi.systemview.view.datastructures.AtomicStampedView) IgniteSet(org.apache.ignite.IgniteSet) Set(java.util.Set) IgniteRunnable(org.apache.ignite.lang.IgniteRunnable) BASELINE_NODES_SYS_VIEW(org.apache.ignite.internal.processors.cluster.GridClusterStateProcessor.BASELINE_NODES_SYS_VIEW) IgniteCache(org.apache.ignite.IgniteCache) CountDownLatch(java.util.concurrent.CountDownLatch) BaselineNodeAttributeView(org.apache.ignite.spi.systemview.view.BaselineNodeAttributeView) LONGS_VIEW(org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.LONGS_VIEW) QueryCursor(org.apache.ignite.cache.query.QueryCursor) PagesListView(org.apache.ignite.spi.systemview.view.PagesListView) PESSIMISTIC(org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC) ClientConnectionView(org.apache.ignite.spi.systemview.view.ClientConnectionView) DFLT_ATOMIC_SEQUENCE_RESERVE_SIZE(org.apache.ignite.configuration.AtomicConfiguration.DFLT_ATOMIC_SEQUENCE_RESERVE_SIZE) ScanQuery(org.apache.ignite.cache.query.ScanQuery) IgniteCompute(org.apache.ignite.IgniteCompute) SETS_VIEW(org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.SETS_VIEW) GridFunc.alwaysTrue(org.apache.ignite.internal.util.lang.GridFunc.alwaysTrue) IgniteBiPredicate(org.apache.ignite.lang.IgniteBiPredicate) ComputeJob(org.apache.ignite.compute.ComputeJob) DEFAULT_VOLATILE_DS_GROUP_NAME(org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.DEFAULT_VOLATILE_DS_GROUP_NAME) ClusterState(org.apache.ignite.cluster.ClusterState) REFERENCES_VIEW(org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.REFERENCES_VIEW) U(org.apache.ignite.internal.util.typedef.internal.U) NODE_METRICS_SYS_VIEW(org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.NODE_METRICS_SYS_VIEW) BINARY_METADATA_VIEW(org.apache.ignite.internal.processors.cache.binary.CacheObjectBinaryProcessorImpl.BINARY_METADATA_VIEW) CACHE_GRP_IO_VIEW(org.apache.ignite.internal.processors.cache.GridCacheProcessor.CACHE_GRP_IO_VIEW) DISTRIBUTED_METASTORE_VIEW(org.apache.ignite.internal.processors.metastorage.persistence.DistributedMetaStorageImpl.DISTRIBUTED_METASTORE_VIEW) GridCacheDatabaseSharedManager(org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager) Lists(com.google.common.collect.Lists) ClusterNode(org.apache.ignite.cluster.ClusterNode) ComputeJobResult(org.apache.ignite.compute.ComputeJobResult) IgniteClient(org.apache.ignite.client.IgniteClient) IgniteAtomicReference(org.apache.ignite.IgniteAtomicReference) METASTORAGE_CACHE_NAME(org.apache.ignite.internal.processors.cache.persistence.metastorage.MetaStorage.METASTORAGE_CACHE_NAME) IgniteAtomicStamped(org.apache.ignite.IgniteAtomicStamped) STREAM_POOL_QUEUE_VIEW(org.apache.ignite.internal.processors.pool.PoolProcessor.STREAM_POOL_QUEUE_VIEW) TASKS_VIEW(org.apache.ignite.internal.processors.task.GridTaskProcessor.TASKS_VIEW) Properties(java.util.Properties) QUEUES_VIEW(org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.QUEUES_VIEW) BrokenBarrierException(java.util.concurrent.BrokenBarrierException) CacheGroupIoView(org.apache.ignite.spi.systemview.view.CacheGroupIoView) Test(org.junit.Test) IgniteQueue(org.apache.ignite.IgniteQueue) AtomicSequenceView(org.apache.ignite.spi.systemview.view.datastructures.AtomicSequenceView) Field(java.lang.reflect.Field) ContinuousQuery(org.apache.ignite.cache.query.ContinuousQuery) SCAN_QRY_SYS_VIEW(org.apache.ignite.internal.managers.systemview.ScanQuerySystemView.SCAN_QRY_SYS_VIEW) NodeMetricsView(org.apache.ignite.spi.systemview.view.NodeMetricsView) CacheConfiguration(org.apache.ignite.configuration.CacheConfiguration) SNAPSHOT_SYS_VIEW(org.apache.ignite.spi.systemview.view.SnapshotView.SNAPSHOT_SYS_VIEW) CachePagesListViewWalker(org.apache.ignite.internal.managers.systemview.walker.CachePagesListViewWalker) CQ_SYS_VIEW(org.apache.ignite.internal.processors.continuous.GridContinuousProcessor.CQ_SYS_VIEW) NODE_ATTRIBUTES_SYS_VIEW(org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.NODE_ATTRIBUTES_SYS_VIEW) CacheAtomicityMode(org.apache.ignite.cache.CacheAtomicityMode) IgniteInternalFuture(org.apache.ignite.internal.IgniteInternalFuture) IgniteJdbcThinDriver(org.apache.ignite.IgniteJdbcThinDriver) StripedExecutor(org.apache.ignite.internal.util.StripedExecutor) DATA_REGION_PAGE_LIST_VIEW(org.apache.ignite.internal.processors.cache.persistence.IgniteCacheDatabaseSharedManager.DATA_REGION_PAGE_LIST_VIEW) Connection(java.sql.Connection) ProtocolVersion(org.apache.ignite.internal.client.thin.ProtocolVersion) SERIALIZABLE(org.apache.ignite.transactions.TransactionIsolation.SERIALIZABLE) IgniteAtomicSequence(org.apache.ignite.IgniteAtomicSequence) DistributedMetaStorage(org.apache.ignite.internal.processors.metastorage.DistributedMetaStorage) Transaction(org.apache.ignite.transactions.Transaction) FiltrableSystemView(org.apache.ignite.spi.systemview.view.FiltrableSystemView) CACHE_GRP_PAGE_LIST_VIEW(org.apache.ignite.internal.processors.cache.GridCacheProcessor.CACHE_GRP_PAGE_LIST_VIEW) IgniteEx(org.apache.ignite.internal.IgniteEx) METASTORE_VIEW(org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager.METASTORE_VIEW) REPEATABLE_READ(org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_READ) RendezvousAffinityFunction(org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction) IgniteSystemProperties(org.apache.ignite.IgniteSystemProperties) BinaryMetadataView(org.apache.ignite.spi.systemview.view.BinaryMetadataView) IgniteSemaphore(org.apache.ignite.IgniteSemaphore) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) ComputeJobResultPolicy(org.apache.ignite.compute.ComputeJobResultPolicy) ClusterNodeView(org.apache.ignite.spi.systemview.view.ClusterNodeView) LOCKS_VIEW(org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.LOCKS_VIEW) NODES_SYS_VIEW(org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.NODES_SYS_VIEW) AtomicReferenceView(org.apache.ignite.spi.systemview.view.datastructures.AtomicReferenceView) IgniteLock(org.apache.ignite.IgniteLock) CyclicBarrier(java.util.concurrent.CyclicBarrier) SVCS_VIEW(org.apache.ignite.internal.processors.service.IgniteServiceProcessor.SVCS_VIEW) IgniteCountDownLatch(org.apache.ignite.IgniteCountDownLatch) ServiceView(org.apache.ignite.spi.systemview.view.ServiceView) GridCommonAbstractTest(org.apache.ignite.testframework.junits.common.GridCommonAbstractTest) CLI_CONN_VIEW(org.apache.ignite.internal.processors.odbc.ClientListenerProcessor.CLI_CONN_VIEW) Collection(java.util.Collection) IgniteException(org.apache.ignite.IgniteException) OPTIMISTIC(org.apache.ignite.transactions.TransactionConcurrency.OPTIMISTIC) LATCHES_VIEW(org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.LATCHES_VIEW) VOLATILE_DATA_REGION_NAME(org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.VOLATILE_DATA_REGION_NAME) GridTestUtils(org.apache.ignite.testframework.GridTestUtils) Objects(java.util.Objects) Nullable(org.jetbrains.annotations.Nullable) List(java.util.List) ClientConfiguration(org.apache.ignite.configuration.ClientConfiguration) CU(org.apache.ignite.internal.util.typedef.internal.CU) ACTIVE(org.apache.ignite.transactions.TransactionState.ACTIVE) NodeAttributeViewWalker(org.apache.ignite.internal.managers.systemview.walker.NodeAttributeViewWalker) NotNull(org.jetbrains.annotations.NotNull) DummyService(org.apache.ignite.internal.processors.service.DummyService) ContinuousQueryView(org.apache.ignite.spi.systemview.view.ContinuousQueryView) GridCacheUtils.cacheGroupId(org.apache.ignite.internal.processors.cache.GridCacheUtils.cacheGroupId) CacheView(org.apache.ignite.spi.systemview.view.CacheView) GridTestUtils.waitForCondition(org.apache.ignite.testframework.GridTestUtils.waitForCondition) SetView(org.apache.ignite.spi.systemview.view.datastructures.SetView) CACHES_VIEW(org.apache.ignite.internal.processors.cache.ClusterCachesInfo.CACHES_VIEW) AtomicLongView(org.apache.ignite.spi.systemview.view.datastructures.AtomicLongView) IgniteCallable(org.apache.ignite.lang.IgniteCallable) HashSet(java.util.HashSet) SEMAPHORES_VIEW(org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.SEMAPHORES_VIEW) SYS_POOL_QUEUE_VIEW(org.apache.ignite.internal.processors.pool.PoolProcessor.SYS_POOL_QUEUE_VIEW) SnapshotView(org.apache.ignite.spi.systemview.view.SnapshotView) ReentrantLockView(org.apache.ignite.spi.systemview.view.datastructures.ReentrantLockView) GridFunc.identity(org.apache.ignite.internal.util.lang.GridFunc.identity) IgniteClosure(org.apache.ignite.lang.IgniteClosure) IgnitePredicate(org.apache.ignite.lang.IgnitePredicate) AtomicConfiguration(org.apache.ignite.configuration.AtomicConfiguration) DataStorageConfiguration(org.apache.ignite.configuration.DataStorageConfiguration) ScanQueryView(org.apache.ignite.spi.systemview.view.ScanQueryView) ServiceConfiguration(org.apache.ignite.services.ServiceConfiguration) MetastorageView(org.apache.ignite.spi.systemview.view.MetastorageView) STAMPED_VIEW(org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.STAMPED_VIEW) F(org.apache.ignite.internal.util.typedef.F) Iterator(java.util.Iterator) TXS_MON_LIST(org.apache.ignite.internal.processors.cache.transactions.IgniteTxManager.TXS_MON_LIST) JdbcConnectionContext(org.apache.ignite.internal.processors.odbc.jdbc.JdbcConnectionContext) CollectionConfiguration(org.apache.ignite.configuration.CollectionConfiguration) CACHE_GRPS_VIEW(org.apache.ignite.internal.processors.cache.ClusterCachesInfo.CACHE_GRPS_VIEW) CacheGroupView(org.apache.ignite.spi.systemview.view.CacheGroupView) TestObjectAllTypes(org.apache.ignite.internal.binary.mutabletest.GridBinaryTestClasses.TestObjectAllTypes) TimeUnit(java.util.concurrent.TimeUnit) Consumer(java.util.function.Consumer) IgniteCacheDatabaseSharedManager(org.apache.ignite.internal.processors.cache.persistence.IgniteCacheDatabaseSharedManager) Ignition(org.apache.ignite.Ignition) IgniteAtomicLong(org.apache.ignite.IgniteAtomicLong) BASELINE_NODE_ATTRIBUTES_SYS_VIEW(org.apache.ignite.internal.processors.cluster.GridClusterStateProcessor.BASELINE_NODE_ATTRIBUTES_SYS_VIEW) Collections(java.util.Collections) DataRegionConfiguration(org.apache.ignite.configuration.DataRegionConfiguration) SemaphoreView(org.apache.ignite.spi.systemview.view.datastructures.SemaphoreView) DataRegionConfiguration(org.apache.ignite.configuration.DataRegionConfiguration) DistributedMetaStorage(org.apache.ignite.internal.processors.metastorage.DistributedMetaStorage) IgniteEx(org.apache.ignite.internal.IgniteEx) Test(org.junit.Test) GridCommonAbstractTest(org.apache.ignite.testframework.junits.common.GridCommonAbstractTest)

Example 8 with SystemView

use of org.apache.ignite.spi.systemview.view.SystemView in project ignite by apache.

the class SystemViewSelfTest method testCacheGroupIo.

/**
 */
@Test
public void testCacheGroupIo() throws Exception {
    cleanPersistenceDir();
    try (IgniteEx ignite = startGrid(getConfiguration().setDataStorageConfiguration(new DataStorageConfiguration().setDefaultDataRegionConfiguration(new DataRegionConfiguration().setPersistenceEnabled(true))))) {
        ignite.cluster().state(ClusterState.ACTIVE);
        IgniteCache<Object, Object> cache = ignite.createCache("cache");
        cache.put(0, 0);
        cache.get(0);
        SystemView<CacheGroupIoView> view = ignite.context().systemView().view(CACHE_GRP_IO_VIEW);
        CacheGroupIoView row = F.find(view, null, (IgnitePredicate<CacheGroupIoView>) r -> "cache".equals(r.cacheGroupName()));
        assertNotNull(row);
        assertTrue(row.logicalReads() > 0);
    }
}
Also used : DataStorageConfiguration(org.apache.ignite.configuration.DataStorageConfiguration) Arrays(java.util.Arrays) GridCacheUtils.cacheId(org.apache.ignite.internal.processors.cache.GridCacheUtils.cacheId) StripedExecutorTaskView(org.apache.ignite.spi.systemview.view.StripedExecutorTaskView) CountDownLatchView(org.apache.ignite.spi.systemview.view.datastructures.CountDownLatchView) QueueView(org.apache.ignite.spi.systemview.view.datastructures.QueueView) GridTestUtils.runAsync(org.apache.ignite.testframework.GridTestUtils.runAsync) TestObjectEnum(org.apache.ignite.internal.binary.mutabletest.GridBinaryTestClasses.TestObjectEnum) ComputeTaskView(org.apache.ignite.spi.systemview.view.ComputeTaskView) Map(java.util.Map) CachePagesListView(org.apache.ignite.spi.systemview.view.CachePagesListView) Cache(javax.cache.Cache) ComputeTask(org.apache.ignite.compute.ComputeTask) SEQUENCES_VIEW(org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.SEQUENCES_VIEW) NodeAttributeView(org.apache.ignite.spi.systemview.view.NodeAttributeView) IgniteUtils.toStringSafe(org.apache.ignite.internal.util.IgniteUtils.toStringSafe) BaselineNodeView(org.apache.ignite.spi.systemview.view.BaselineNodeView) DEFAULT_DS_GROUP_NAME(org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.DEFAULT_DS_GROUP_NAME) BaselineNodeAttributeViewWalker(org.apache.ignite.internal.managers.systemview.walker.BaselineNodeAttributeViewWalker) SystemView(org.apache.ignite.spi.systemview.view.SystemView) TransactionView(org.apache.ignite.spi.systemview.view.TransactionView) AtomicStampedView(org.apache.ignite.spi.systemview.view.datastructures.AtomicStampedView) IgniteSet(org.apache.ignite.IgniteSet) Set(java.util.Set) IgniteRunnable(org.apache.ignite.lang.IgniteRunnable) BASELINE_NODES_SYS_VIEW(org.apache.ignite.internal.processors.cluster.GridClusterStateProcessor.BASELINE_NODES_SYS_VIEW) IgniteCache(org.apache.ignite.IgniteCache) CountDownLatch(java.util.concurrent.CountDownLatch) BaselineNodeAttributeView(org.apache.ignite.spi.systemview.view.BaselineNodeAttributeView) LONGS_VIEW(org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.LONGS_VIEW) QueryCursor(org.apache.ignite.cache.query.QueryCursor) PagesListView(org.apache.ignite.spi.systemview.view.PagesListView) PESSIMISTIC(org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC) ClientConnectionView(org.apache.ignite.spi.systemview.view.ClientConnectionView) DFLT_ATOMIC_SEQUENCE_RESERVE_SIZE(org.apache.ignite.configuration.AtomicConfiguration.DFLT_ATOMIC_SEQUENCE_RESERVE_SIZE) ScanQuery(org.apache.ignite.cache.query.ScanQuery) IgniteCompute(org.apache.ignite.IgniteCompute) SETS_VIEW(org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.SETS_VIEW) GridFunc.alwaysTrue(org.apache.ignite.internal.util.lang.GridFunc.alwaysTrue) IgniteBiPredicate(org.apache.ignite.lang.IgniteBiPredicate) ComputeJob(org.apache.ignite.compute.ComputeJob) DEFAULT_VOLATILE_DS_GROUP_NAME(org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.DEFAULT_VOLATILE_DS_GROUP_NAME) ClusterState(org.apache.ignite.cluster.ClusterState) REFERENCES_VIEW(org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.REFERENCES_VIEW) U(org.apache.ignite.internal.util.typedef.internal.U) NODE_METRICS_SYS_VIEW(org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.NODE_METRICS_SYS_VIEW) BINARY_METADATA_VIEW(org.apache.ignite.internal.processors.cache.binary.CacheObjectBinaryProcessorImpl.BINARY_METADATA_VIEW) CACHE_GRP_IO_VIEW(org.apache.ignite.internal.processors.cache.GridCacheProcessor.CACHE_GRP_IO_VIEW) DISTRIBUTED_METASTORE_VIEW(org.apache.ignite.internal.processors.metastorage.persistence.DistributedMetaStorageImpl.DISTRIBUTED_METASTORE_VIEW) GridCacheDatabaseSharedManager(org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager) Lists(com.google.common.collect.Lists) ClusterNode(org.apache.ignite.cluster.ClusterNode) ComputeJobResult(org.apache.ignite.compute.ComputeJobResult) IgniteClient(org.apache.ignite.client.IgniteClient) IgniteAtomicReference(org.apache.ignite.IgniteAtomicReference) METASTORAGE_CACHE_NAME(org.apache.ignite.internal.processors.cache.persistence.metastorage.MetaStorage.METASTORAGE_CACHE_NAME) IgniteAtomicStamped(org.apache.ignite.IgniteAtomicStamped) STREAM_POOL_QUEUE_VIEW(org.apache.ignite.internal.processors.pool.PoolProcessor.STREAM_POOL_QUEUE_VIEW) TASKS_VIEW(org.apache.ignite.internal.processors.task.GridTaskProcessor.TASKS_VIEW) Properties(java.util.Properties) QUEUES_VIEW(org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.QUEUES_VIEW) BrokenBarrierException(java.util.concurrent.BrokenBarrierException) CacheGroupIoView(org.apache.ignite.spi.systemview.view.CacheGroupIoView) Test(org.junit.Test) IgniteQueue(org.apache.ignite.IgniteQueue) AtomicSequenceView(org.apache.ignite.spi.systemview.view.datastructures.AtomicSequenceView) Field(java.lang.reflect.Field) ContinuousQuery(org.apache.ignite.cache.query.ContinuousQuery) SCAN_QRY_SYS_VIEW(org.apache.ignite.internal.managers.systemview.ScanQuerySystemView.SCAN_QRY_SYS_VIEW) NodeMetricsView(org.apache.ignite.spi.systemview.view.NodeMetricsView) CacheConfiguration(org.apache.ignite.configuration.CacheConfiguration) SNAPSHOT_SYS_VIEW(org.apache.ignite.spi.systemview.view.SnapshotView.SNAPSHOT_SYS_VIEW) CachePagesListViewWalker(org.apache.ignite.internal.managers.systemview.walker.CachePagesListViewWalker) CQ_SYS_VIEW(org.apache.ignite.internal.processors.continuous.GridContinuousProcessor.CQ_SYS_VIEW) NODE_ATTRIBUTES_SYS_VIEW(org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.NODE_ATTRIBUTES_SYS_VIEW) CacheAtomicityMode(org.apache.ignite.cache.CacheAtomicityMode) IgniteInternalFuture(org.apache.ignite.internal.IgniteInternalFuture) IgniteJdbcThinDriver(org.apache.ignite.IgniteJdbcThinDriver) StripedExecutor(org.apache.ignite.internal.util.StripedExecutor) DATA_REGION_PAGE_LIST_VIEW(org.apache.ignite.internal.processors.cache.persistence.IgniteCacheDatabaseSharedManager.DATA_REGION_PAGE_LIST_VIEW) Connection(java.sql.Connection) ProtocolVersion(org.apache.ignite.internal.client.thin.ProtocolVersion) SERIALIZABLE(org.apache.ignite.transactions.TransactionIsolation.SERIALIZABLE) IgniteAtomicSequence(org.apache.ignite.IgniteAtomicSequence) DistributedMetaStorage(org.apache.ignite.internal.processors.metastorage.DistributedMetaStorage) Transaction(org.apache.ignite.transactions.Transaction) FiltrableSystemView(org.apache.ignite.spi.systemview.view.FiltrableSystemView) CACHE_GRP_PAGE_LIST_VIEW(org.apache.ignite.internal.processors.cache.GridCacheProcessor.CACHE_GRP_PAGE_LIST_VIEW) IgniteEx(org.apache.ignite.internal.IgniteEx) METASTORE_VIEW(org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager.METASTORE_VIEW) REPEATABLE_READ(org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_READ) RendezvousAffinityFunction(org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction) IgniteSystemProperties(org.apache.ignite.IgniteSystemProperties) BinaryMetadataView(org.apache.ignite.spi.systemview.view.BinaryMetadataView) IgniteSemaphore(org.apache.ignite.IgniteSemaphore) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) ComputeJobResultPolicy(org.apache.ignite.compute.ComputeJobResultPolicy) ClusterNodeView(org.apache.ignite.spi.systemview.view.ClusterNodeView) LOCKS_VIEW(org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.LOCKS_VIEW) NODES_SYS_VIEW(org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.NODES_SYS_VIEW) AtomicReferenceView(org.apache.ignite.spi.systemview.view.datastructures.AtomicReferenceView) IgniteLock(org.apache.ignite.IgniteLock) CyclicBarrier(java.util.concurrent.CyclicBarrier) SVCS_VIEW(org.apache.ignite.internal.processors.service.IgniteServiceProcessor.SVCS_VIEW) IgniteCountDownLatch(org.apache.ignite.IgniteCountDownLatch) ServiceView(org.apache.ignite.spi.systemview.view.ServiceView) GridCommonAbstractTest(org.apache.ignite.testframework.junits.common.GridCommonAbstractTest) CLI_CONN_VIEW(org.apache.ignite.internal.processors.odbc.ClientListenerProcessor.CLI_CONN_VIEW) Collection(java.util.Collection) IgniteException(org.apache.ignite.IgniteException) OPTIMISTIC(org.apache.ignite.transactions.TransactionConcurrency.OPTIMISTIC) LATCHES_VIEW(org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.LATCHES_VIEW) VOLATILE_DATA_REGION_NAME(org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.VOLATILE_DATA_REGION_NAME) GridTestUtils(org.apache.ignite.testframework.GridTestUtils) Objects(java.util.Objects) Nullable(org.jetbrains.annotations.Nullable) List(java.util.List) ClientConfiguration(org.apache.ignite.configuration.ClientConfiguration) CU(org.apache.ignite.internal.util.typedef.internal.CU) ACTIVE(org.apache.ignite.transactions.TransactionState.ACTIVE) NodeAttributeViewWalker(org.apache.ignite.internal.managers.systemview.walker.NodeAttributeViewWalker) NotNull(org.jetbrains.annotations.NotNull) DummyService(org.apache.ignite.internal.processors.service.DummyService) ContinuousQueryView(org.apache.ignite.spi.systemview.view.ContinuousQueryView) GridCacheUtils.cacheGroupId(org.apache.ignite.internal.processors.cache.GridCacheUtils.cacheGroupId) CacheView(org.apache.ignite.spi.systemview.view.CacheView) GridTestUtils.waitForCondition(org.apache.ignite.testframework.GridTestUtils.waitForCondition) SetView(org.apache.ignite.spi.systemview.view.datastructures.SetView) CACHES_VIEW(org.apache.ignite.internal.processors.cache.ClusterCachesInfo.CACHES_VIEW) AtomicLongView(org.apache.ignite.spi.systemview.view.datastructures.AtomicLongView) IgniteCallable(org.apache.ignite.lang.IgniteCallable) HashSet(java.util.HashSet) SEMAPHORES_VIEW(org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.SEMAPHORES_VIEW) SYS_POOL_QUEUE_VIEW(org.apache.ignite.internal.processors.pool.PoolProcessor.SYS_POOL_QUEUE_VIEW) SnapshotView(org.apache.ignite.spi.systemview.view.SnapshotView) ReentrantLockView(org.apache.ignite.spi.systemview.view.datastructures.ReentrantLockView) GridFunc.identity(org.apache.ignite.internal.util.lang.GridFunc.identity) IgniteClosure(org.apache.ignite.lang.IgniteClosure) IgnitePredicate(org.apache.ignite.lang.IgnitePredicate) AtomicConfiguration(org.apache.ignite.configuration.AtomicConfiguration) DataStorageConfiguration(org.apache.ignite.configuration.DataStorageConfiguration) ScanQueryView(org.apache.ignite.spi.systemview.view.ScanQueryView) ServiceConfiguration(org.apache.ignite.services.ServiceConfiguration) MetastorageView(org.apache.ignite.spi.systemview.view.MetastorageView) STAMPED_VIEW(org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.STAMPED_VIEW) F(org.apache.ignite.internal.util.typedef.F) Iterator(java.util.Iterator) TXS_MON_LIST(org.apache.ignite.internal.processors.cache.transactions.IgniteTxManager.TXS_MON_LIST) JdbcConnectionContext(org.apache.ignite.internal.processors.odbc.jdbc.JdbcConnectionContext) CollectionConfiguration(org.apache.ignite.configuration.CollectionConfiguration) CACHE_GRPS_VIEW(org.apache.ignite.internal.processors.cache.ClusterCachesInfo.CACHE_GRPS_VIEW) CacheGroupView(org.apache.ignite.spi.systemview.view.CacheGroupView) TestObjectAllTypes(org.apache.ignite.internal.binary.mutabletest.GridBinaryTestClasses.TestObjectAllTypes) TimeUnit(java.util.concurrent.TimeUnit) Consumer(java.util.function.Consumer) IgniteCacheDatabaseSharedManager(org.apache.ignite.internal.processors.cache.persistence.IgniteCacheDatabaseSharedManager) Ignition(org.apache.ignite.Ignition) IgniteAtomicLong(org.apache.ignite.IgniteAtomicLong) BASELINE_NODE_ATTRIBUTES_SYS_VIEW(org.apache.ignite.internal.processors.cluster.GridClusterStateProcessor.BASELINE_NODE_ATTRIBUTES_SYS_VIEW) Collections(java.util.Collections) DataRegionConfiguration(org.apache.ignite.configuration.DataRegionConfiguration) SemaphoreView(org.apache.ignite.spi.systemview.view.datastructures.SemaphoreView) DataRegionConfiguration(org.apache.ignite.configuration.DataRegionConfiguration) CacheGroupIoView(org.apache.ignite.spi.systemview.view.CacheGroupIoView) IgniteEx(org.apache.ignite.internal.IgniteEx) Test(org.junit.Test) GridCommonAbstractTest(org.apache.ignite.testframework.junits.common.GridCommonAbstractTest)

Example 9 with SystemView

use of org.apache.ignite.spi.systemview.view.SystemView in project ignite by apache.

the class SystemViewSelfTest method testBaselineNodeAttributes.

/**
 */
@Test
public void testBaselineNodeAttributes() throws Exception {
    cleanPersistenceDir();
    try (IgniteEx ignite = startGrid(getConfiguration().setDataStorageConfiguration(new DataStorageConfiguration().setDefaultDataRegionConfiguration(new DataRegionConfiguration().setName("pds").setPersistenceEnabled(true))).setUserAttributes(F.asMap("name", "val")).setConsistentId("consId"))) {
        ignite.cluster().state(ClusterState.ACTIVE);
        SystemView<BaselineNodeAttributeView> view = ignite.context().systemView().view(BASELINE_NODE_ATTRIBUTES_SYS_VIEW);
        assertEquals(ignite.cluster().localNode().attributes().size(), view.size());
        assertEquals(1, F.size(view.iterator(), row -> "consId".equals(row.nodeConsistentId()) && "name".equals(row.name()) && "val".equals(row.value())));
        // Test filtering.
        assertTrue(view instanceof FiltrableSystemView);
        Iterator<BaselineNodeAttributeView> iter = ((FiltrableSystemView<BaselineNodeAttributeView>) view).iterator(F.asMap(BaselineNodeAttributeViewWalker.NODE_CONSISTENT_ID_FILTER, "consId", BaselineNodeAttributeViewWalker.NAME_FILTER, "name"));
        assertEquals(1, F.size(iter));
        iter = ((FiltrableSystemView<BaselineNodeAttributeView>) view).iterator(F.asMap(BaselineNodeAttributeViewWalker.NODE_CONSISTENT_ID_FILTER, "consId"));
        assertEquals(1, F.size(iter, row -> "name".equals(row.name())));
        iter = ((FiltrableSystemView<BaselineNodeAttributeView>) view).iterator(F.asMap(BaselineNodeAttributeViewWalker.NAME_FILTER, "name"));
        assertEquals(1, F.size(iter));
    }
}
Also used : DataStorageConfiguration(org.apache.ignite.configuration.DataStorageConfiguration) Arrays(java.util.Arrays) GridCacheUtils.cacheId(org.apache.ignite.internal.processors.cache.GridCacheUtils.cacheId) StripedExecutorTaskView(org.apache.ignite.spi.systemview.view.StripedExecutorTaskView) CountDownLatchView(org.apache.ignite.spi.systemview.view.datastructures.CountDownLatchView) QueueView(org.apache.ignite.spi.systemview.view.datastructures.QueueView) GridTestUtils.runAsync(org.apache.ignite.testframework.GridTestUtils.runAsync) TestObjectEnum(org.apache.ignite.internal.binary.mutabletest.GridBinaryTestClasses.TestObjectEnum) ComputeTaskView(org.apache.ignite.spi.systemview.view.ComputeTaskView) Map(java.util.Map) CachePagesListView(org.apache.ignite.spi.systemview.view.CachePagesListView) Cache(javax.cache.Cache) ComputeTask(org.apache.ignite.compute.ComputeTask) SEQUENCES_VIEW(org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.SEQUENCES_VIEW) NodeAttributeView(org.apache.ignite.spi.systemview.view.NodeAttributeView) IgniteUtils.toStringSafe(org.apache.ignite.internal.util.IgniteUtils.toStringSafe) BaselineNodeView(org.apache.ignite.spi.systemview.view.BaselineNodeView) DEFAULT_DS_GROUP_NAME(org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.DEFAULT_DS_GROUP_NAME) BaselineNodeAttributeViewWalker(org.apache.ignite.internal.managers.systemview.walker.BaselineNodeAttributeViewWalker) SystemView(org.apache.ignite.spi.systemview.view.SystemView) TransactionView(org.apache.ignite.spi.systemview.view.TransactionView) AtomicStampedView(org.apache.ignite.spi.systemview.view.datastructures.AtomicStampedView) IgniteSet(org.apache.ignite.IgniteSet) Set(java.util.Set) IgniteRunnable(org.apache.ignite.lang.IgniteRunnable) BASELINE_NODES_SYS_VIEW(org.apache.ignite.internal.processors.cluster.GridClusterStateProcessor.BASELINE_NODES_SYS_VIEW) IgniteCache(org.apache.ignite.IgniteCache) CountDownLatch(java.util.concurrent.CountDownLatch) BaselineNodeAttributeView(org.apache.ignite.spi.systemview.view.BaselineNodeAttributeView) LONGS_VIEW(org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.LONGS_VIEW) QueryCursor(org.apache.ignite.cache.query.QueryCursor) PagesListView(org.apache.ignite.spi.systemview.view.PagesListView) PESSIMISTIC(org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC) ClientConnectionView(org.apache.ignite.spi.systemview.view.ClientConnectionView) DFLT_ATOMIC_SEQUENCE_RESERVE_SIZE(org.apache.ignite.configuration.AtomicConfiguration.DFLT_ATOMIC_SEQUENCE_RESERVE_SIZE) ScanQuery(org.apache.ignite.cache.query.ScanQuery) IgniteCompute(org.apache.ignite.IgniteCompute) SETS_VIEW(org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.SETS_VIEW) GridFunc.alwaysTrue(org.apache.ignite.internal.util.lang.GridFunc.alwaysTrue) IgniteBiPredicate(org.apache.ignite.lang.IgniteBiPredicate) ComputeJob(org.apache.ignite.compute.ComputeJob) DEFAULT_VOLATILE_DS_GROUP_NAME(org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.DEFAULT_VOLATILE_DS_GROUP_NAME) ClusterState(org.apache.ignite.cluster.ClusterState) REFERENCES_VIEW(org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.REFERENCES_VIEW) U(org.apache.ignite.internal.util.typedef.internal.U) NODE_METRICS_SYS_VIEW(org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.NODE_METRICS_SYS_VIEW) BINARY_METADATA_VIEW(org.apache.ignite.internal.processors.cache.binary.CacheObjectBinaryProcessorImpl.BINARY_METADATA_VIEW) CACHE_GRP_IO_VIEW(org.apache.ignite.internal.processors.cache.GridCacheProcessor.CACHE_GRP_IO_VIEW) DISTRIBUTED_METASTORE_VIEW(org.apache.ignite.internal.processors.metastorage.persistence.DistributedMetaStorageImpl.DISTRIBUTED_METASTORE_VIEW) GridCacheDatabaseSharedManager(org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager) Lists(com.google.common.collect.Lists) ClusterNode(org.apache.ignite.cluster.ClusterNode) ComputeJobResult(org.apache.ignite.compute.ComputeJobResult) IgniteClient(org.apache.ignite.client.IgniteClient) IgniteAtomicReference(org.apache.ignite.IgniteAtomicReference) METASTORAGE_CACHE_NAME(org.apache.ignite.internal.processors.cache.persistence.metastorage.MetaStorage.METASTORAGE_CACHE_NAME) IgniteAtomicStamped(org.apache.ignite.IgniteAtomicStamped) STREAM_POOL_QUEUE_VIEW(org.apache.ignite.internal.processors.pool.PoolProcessor.STREAM_POOL_QUEUE_VIEW) TASKS_VIEW(org.apache.ignite.internal.processors.task.GridTaskProcessor.TASKS_VIEW) Properties(java.util.Properties) QUEUES_VIEW(org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.QUEUES_VIEW) BrokenBarrierException(java.util.concurrent.BrokenBarrierException) CacheGroupIoView(org.apache.ignite.spi.systemview.view.CacheGroupIoView) Test(org.junit.Test) IgniteQueue(org.apache.ignite.IgniteQueue) AtomicSequenceView(org.apache.ignite.spi.systemview.view.datastructures.AtomicSequenceView) Field(java.lang.reflect.Field) ContinuousQuery(org.apache.ignite.cache.query.ContinuousQuery) SCAN_QRY_SYS_VIEW(org.apache.ignite.internal.managers.systemview.ScanQuerySystemView.SCAN_QRY_SYS_VIEW) NodeMetricsView(org.apache.ignite.spi.systemview.view.NodeMetricsView) CacheConfiguration(org.apache.ignite.configuration.CacheConfiguration) SNAPSHOT_SYS_VIEW(org.apache.ignite.spi.systemview.view.SnapshotView.SNAPSHOT_SYS_VIEW) CachePagesListViewWalker(org.apache.ignite.internal.managers.systemview.walker.CachePagesListViewWalker) CQ_SYS_VIEW(org.apache.ignite.internal.processors.continuous.GridContinuousProcessor.CQ_SYS_VIEW) NODE_ATTRIBUTES_SYS_VIEW(org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.NODE_ATTRIBUTES_SYS_VIEW) CacheAtomicityMode(org.apache.ignite.cache.CacheAtomicityMode) IgniteInternalFuture(org.apache.ignite.internal.IgniteInternalFuture) IgniteJdbcThinDriver(org.apache.ignite.IgniteJdbcThinDriver) StripedExecutor(org.apache.ignite.internal.util.StripedExecutor) DATA_REGION_PAGE_LIST_VIEW(org.apache.ignite.internal.processors.cache.persistence.IgniteCacheDatabaseSharedManager.DATA_REGION_PAGE_LIST_VIEW) Connection(java.sql.Connection) ProtocolVersion(org.apache.ignite.internal.client.thin.ProtocolVersion) SERIALIZABLE(org.apache.ignite.transactions.TransactionIsolation.SERIALIZABLE) IgniteAtomicSequence(org.apache.ignite.IgniteAtomicSequence) DistributedMetaStorage(org.apache.ignite.internal.processors.metastorage.DistributedMetaStorage) Transaction(org.apache.ignite.transactions.Transaction) FiltrableSystemView(org.apache.ignite.spi.systemview.view.FiltrableSystemView) CACHE_GRP_PAGE_LIST_VIEW(org.apache.ignite.internal.processors.cache.GridCacheProcessor.CACHE_GRP_PAGE_LIST_VIEW) IgniteEx(org.apache.ignite.internal.IgniteEx) METASTORE_VIEW(org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager.METASTORE_VIEW) REPEATABLE_READ(org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_READ) RendezvousAffinityFunction(org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction) IgniteSystemProperties(org.apache.ignite.IgniteSystemProperties) BinaryMetadataView(org.apache.ignite.spi.systemview.view.BinaryMetadataView) IgniteSemaphore(org.apache.ignite.IgniteSemaphore) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) ComputeJobResultPolicy(org.apache.ignite.compute.ComputeJobResultPolicy) ClusterNodeView(org.apache.ignite.spi.systemview.view.ClusterNodeView) LOCKS_VIEW(org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.LOCKS_VIEW) NODES_SYS_VIEW(org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.NODES_SYS_VIEW) AtomicReferenceView(org.apache.ignite.spi.systemview.view.datastructures.AtomicReferenceView) IgniteLock(org.apache.ignite.IgniteLock) CyclicBarrier(java.util.concurrent.CyclicBarrier) SVCS_VIEW(org.apache.ignite.internal.processors.service.IgniteServiceProcessor.SVCS_VIEW) IgniteCountDownLatch(org.apache.ignite.IgniteCountDownLatch) ServiceView(org.apache.ignite.spi.systemview.view.ServiceView) GridCommonAbstractTest(org.apache.ignite.testframework.junits.common.GridCommonAbstractTest) CLI_CONN_VIEW(org.apache.ignite.internal.processors.odbc.ClientListenerProcessor.CLI_CONN_VIEW) Collection(java.util.Collection) IgniteException(org.apache.ignite.IgniteException) OPTIMISTIC(org.apache.ignite.transactions.TransactionConcurrency.OPTIMISTIC) LATCHES_VIEW(org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.LATCHES_VIEW) VOLATILE_DATA_REGION_NAME(org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.VOLATILE_DATA_REGION_NAME) GridTestUtils(org.apache.ignite.testframework.GridTestUtils) Objects(java.util.Objects) Nullable(org.jetbrains.annotations.Nullable) List(java.util.List) ClientConfiguration(org.apache.ignite.configuration.ClientConfiguration) CU(org.apache.ignite.internal.util.typedef.internal.CU) ACTIVE(org.apache.ignite.transactions.TransactionState.ACTIVE) NodeAttributeViewWalker(org.apache.ignite.internal.managers.systemview.walker.NodeAttributeViewWalker) NotNull(org.jetbrains.annotations.NotNull) DummyService(org.apache.ignite.internal.processors.service.DummyService) ContinuousQueryView(org.apache.ignite.spi.systemview.view.ContinuousQueryView) GridCacheUtils.cacheGroupId(org.apache.ignite.internal.processors.cache.GridCacheUtils.cacheGroupId) CacheView(org.apache.ignite.spi.systemview.view.CacheView) GridTestUtils.waitForCondition(org.apache.ignite.testframework.GridTestUtils.waitForCondition) SetView(org.apache.ignite.spi.systemview.view.datastructures.SetView) CACHES_VIEW(org.apache.ignite.internal.processors.cache.ClusterCachesInfo.CACHES_VIEW) AtomicLongView(org.apache.ignite.spi.systemview.view.datastructures.AtomicLongView) IgniteCallable(org.apache.ignite.lang.IgniteCallable) HashSet(java.util.HashSet) SEMAPHORES_VIEW(org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.SEMAPHORES_VIEW) SYS_POOL_QUEUE_VIEW(org.apache.ignite.internal.processors.pool.PoolProcessor.SYS_POOL_QUEUE_VIEW) SnapshotView(org.apache.ignite.spi.systemview.view.SnapshotView) ReentrantLockView(org.apache.ignite.spi.systemview.view.datastructures.ReentrantLockView) GridFunc.identity(org.apache.ignite.internal.util.lang.GridFunc.identity) IgniteClosure(org.apache.ignite.lang.IgniteClosure) IgnitePredicate(org.apache.ignite.lang.IgnitePredicate) AtomicConfiguration(org.apache.ignite.configuration.AtomicConfiguration) DataStorageConfiguration(org.apache.ignite.configuration.DataStorageConfiguration) ScanQueryView(org.apache.ignite.spi.systemview.view.ScanQueryView) ServiceConfiguration(org.apache.ignite.services.ServiceConfiguration) MetastorageView(org.apache.ignite.spi.systemview.view.MetastorageView) STAMPED_VIEW(org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.STAMPED_VIEW) F(org.apache.ignite.internal.util.typedef.F) Iterator(java.util.Iterator) TXS_MON_LIST(org.apache.ignite.internal.processors.cache.transactions.IgniteTxManager.TXS_MON_LIST) JdbcConnectionContext(org.apache.ignite.internal.processors.odbc.jdbc.JdbcConnectionContext) CollectionConfiguration(org.apache.ignite.configuration.CollectionConfiguration) CACHE_GRPS_VIEW(org.apache.ignite.internal.processors.cache.ClusterCachesInfo.CACHE_GRPS_VIEW) CacheGroupView(org.apache.ignite.spi.systemview.view.CacheGroupView) TestObjectAllTypes(org.apache.ignite.internal.binary.mutabletest.GridBinaryTestClasses.TestObjectAllTypes) TimeUnit(java.util.concurrent.TimeUnit) Consumer(java.util.function.Consumer) IgniteCacheDatabaseSharedManager(org.apache.ignite.internal.processors.cache.persistence.IgniteCacheDatabaseSharedManager) Ignition(org.apache.ignite.Ignition) IgniteAtomicLong(org.apache.ignite.IgniteAtomicLong) BASELINE_NODE_ATTRIBUTES_SYS_VIEW(org.apache.ignite.internal.processors.cluster.GridClusterStateProcessor.BASELINE_NODE_ATTRIBUTES_SYS_VIEW) Collections(java.util.Collections) DataRegionConfiguration(org.apache.ignite.configuration.DataRegionConfiguration) SemaphoreView(org.apache.ignite.spi.systemview.view.datastructures.SemaphoreView) DataRegionConfiguration(org.apache.ignite.configuration.DataRegionConfiguration) BaselineNodeAttributeView(org.apache.ignite.spi.systemview.view.BaselineNodeAttributeView) FiltrableSystemView(org.apache.ignite.spi.systemview.view.FiltrableSystemView) IgniteEx(org.apache.ignite.internal.IgniteEx) Test(org.junit.Test) GridCommonAbstractTest(org.apache.ignite.testframework.junits.common.GridCommonAbstractTest)

Example 10 with SystemView

use of org.apache.ignite.spi.systemview.view.SystemView in project ignite by apache.

the class SystemViewSelfTest method testNodeMetrics.

/**
 */
@Test
public void testNodeMetrics() throws Exception {
    long ts = U.currentTimeMillis();
    try (IgniteEx ignite0 = startGrid(0);
        IgniteEx ignite1 = startGrid(1)) {
        awaitPartitionMapExchange();
        SystemView<NodeMetricsView> view = ignite0.context().systemView().view(NODE_METRICS_SYS_VIEW);
        assertEquals(2, view.size());
        assertEquals(1, F.size(view.iterator(), row -> row.nodeId().equals(ignite0.cluster().localNode().id())));
        assertEquals(1, F.size(view.iterator(), row -> row.nodeId().equals(ignite1.cluster().localNode().id())));
        assertEquals(2, F.size(view.iterator(), row -> row.lastUpdateTime().getTime() >= ts));
    }
}
Also used : Arrays(java.util.Arrays) GridCacheUtils.cacheId(org.apache.ignite.internal.processors.cache.GridCacheUtils.cacheId) StripedExecutorTaskView(org.apache.ignite.spi.systemview.view.StripedExecutorTaskView) CountDownLatchView(org.apache.ignite.spi.systemview.view.datastructures.CountDownLatchView) QueueView(org.apache.ignite.spi.systemview.view.datastructures.QueueView) GridTestUtils.runAsync(org.apache.ignite.testframework.GridTestUtils.runAsync) TestObjectEnum(org.apache.ignite.internal.binary.mutabletest.GridBinaryTestClasses.TestObjectEnum) ComputeTaskView(org.apache.ignite.spi.systemview.view.ComputeTaskView) Map(java.util.Map) CachePagesListView(org.apache.ignite.spi.systemview.view.CachePagesListView) Cache(javax.cache.Cache) ComputeTask(org.apache.ignite.compute.ComputeTask) SEQUENCES_VIEW(org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.SEQUENCES_VIEW) NodeAttributeView(org.apache.ignite.spi.systemview.view.NodeAttributeView) IgniteUtils.toStringSafe(org.apache.ignite.internal.util.IgniteUtils.toStringSafe) BaselineNodeView(org.apache.ignite.spi.systemview.view.BaselineNodeView) DEFAULT_DS_GROUP_NAME(org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.DEFAULT_DS_GROUP_NAME) BaselineNodeAttributeViewWalker(org.apache.ignite.internal.managers.systemview.walker.BaselineNodeAttributeViewWalker) SystemView(org.apache.ignite.spi.systemview.view.SystemView) TransactionView(org.apache.ignite.spi.systemview.view.TransactionView) AtomicStampedView(org.apache.ignite.spi.systemview.view.datastructures.AtomicStampedView) IgniteSet(org.apache.ignite.IgniteSet) Set(java.util.Set) IgniteRunnable(org.apache.ignite.lang.IgniteRunnable) BASELINE_NODES_SYS_VIEW(org.apache.ignite.internal.processors.cluster.GridClusterStateProcessor.BASELINE_NODES_SYS_VIEW) IgniteCache(org.apache.ignite.IgniteCache) CountDownLatch(java.util.concurrent.CountDownLatch) BaselineNodeAttributeView(org.apache.ignite.spi.systemview.view.BaselineNodeAttributeView) LONGS_VIEW(org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.LONGS_VIEW) QueryCursor(org.apache.ignite.cache.query.QueryCursor) PagesListView(org.apache.ignite.spi.systemview.view.PagesListView) PESSIMISTIC(org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC) ClientConnectionView(org.apache.ignite.spi.systemview.view.ClientConnectionView) DFLT_ATOMIC_SEQUENCE_RESERVE_SIZE(org.apache.ignite.configuration.AtomicConfiguration.DFLT_ATOMIC_SEQUENCE_RESERVE_SIZE) ScanQuery(org.apache.ignite.cache.query.ScanQuery) IgniteCompute(org.apache.ignite.IgniteCompute) SETS_VIEW(org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.SETS_VIEW) GridFunc.alwaysTrue(org.apache.ignite.internal.util.lang.GridFunc.alwaysTrue) IgniteBiPredicate(org.apache.ignite.lang.IgniteBiPredicate) ComputeJob(org.apache.ignite.compute.ComputeJob) DEFAULT_VOLATILE_DS_GROUP_NAME(org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.DEFAULT_VOLATILE_DS_GROUP_NAME) ClusterState(org.apache.ignite.cluster.ClusterState) REFERENCES_VIEW(org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.REFERENCES_VIEW) U(org.apache.ignite.internal.util.typedef.internal.U) NODE_METRICS_SYS_VIEW(org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.NODE_METRICS_SYS_VIEW) BINARY_METADATA_VIEW(org.apache.ignite.internal.processors.cache.binary.CacheObjectBinaryProcessorImpl.BINARY_METADATA_VIEW) CACHE_GRP_IO_VIEW(org.apache.ignite.internal.processors.cache.GridCacheProcessor.CACHE_GRP_IO_VIEW) DISTRIBUTED_METASTORE_VIEW(org.apache.ignite.internal.processors.metastorage.persistence.DistributedMetaStorageImpl.DISTRIBUTED_METASTORE_VIEW) GridCacheDatabaseSharedManager(org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager) Lists(com.google.common.collect.Lists) ClusterNode(org.apache.ignite.cluster.ClusterNode) ComputeJobResult(org.apache.ignite.compute.ComputeJobResult) IgniteClient(org.apache.ignite.client.IgniteClient) IgniteAtomicReference(org.apache.ignite.IgniteAtomicReference) METASTORAGE_CACHE_NAME(org.apache.ignite.internal.processors.cache.persistence.metastorage.MetaStorage.METASTORAGE_CACHE_NAME) IgniteAtomicStamped(org.apache.ignite.IgniteAtomicStamped) STREAM_POOL_QUEUE_VIEW(org.apache.ignite.internal.processors.pool.PoolProcessor.STREAM_POOL_QUEUE_VIEW) TASKS_VIEW(org.apache.ignite.internal.processors.task.GridTaskProcessor.TASKS_VIEW) Properties(java.util.Properties) QUEUES_VIEW(org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.QUEUES_VIEW) BrokenBarrierException(java.util.concurrent.BrokenBarrierException) CacheGroupIoView(org.apache.ignite.spi.systemview.view.CacheGroupIoView) Test(org.junit.Test) IgniteQueue(org.apache.ignite.IgniteQueue) AtomicSequenceView(org.apache.ignite.spi.systemview.view.datastructures.AtomicSequenceView) Field(java.lang.reflect.Field) ContinuousQuery(org.apache.ignite.cache.query.ContinuousQuery) SCAN_QRY_SYS_VIEW(org.apache.ignite.internal.managers.systemview.ScanQuerySystemView.SCAN_QRY_SYS_VIEW) NodeMetricsView(org.apache.ignite.spi.systemview.view.NodeMetricsView) CacheConfiguration(org.apache.ignite.configuration.CacheConfiguration) SNAPSHOT_SYS_VIEW(org.apache.ignite.spi.systemview.view.SnapshotView.SNAPSHOT_SYS_VIEW) CachePagesListViewWalker(org.apache.ignite.internal.managers.systemview.walker.CachePagesListViewWalker) CQ_SYS_VIEW(org.apache.ignite.internal.processors.continuous.GridContinuousProcessor.CQ_SYS_VIEW) NODE_ATTRIBUTES_SYS_VIEW(org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.NODE_ATTRIBUTES_SYS_VIEW) CacheAtomicityMode(org.apache.ignite.cache.CacheAtomicityMode) IgniteInternalFuture(org.apache.ignite.internal.IgniteInternalFuture) IgniteJdbcThinDriver(org.apache.ignite.IgniteJdbcThinDriver) StripedExecutor(org.apache.ignite.internal.util.StripedExecutor) DATA_REGION_PAGE_LIST_VIEW(org.apache.ignite.internal.processors.cache.persistence.IgniteCacheDatabaseSharedManager.DATA_REGION_PAGE_LIST_VIEW) Connection(java.sql.Connection) ProtocolVersion(org.apache.ignite.internal.client.thin.ProtocolVersion) SERIALIZABLE(org.apache.ignite.transactions.TransactionIsolation.SERIALIZABLE) IgniteAtomicSequence(org.apache.ignite.IgniteAtomicSequence) DistributedMetaStorage(org.apache.ignite.internal.processors.metastorage.DistributedMetaStorage) Transaction(org.apache.ignite.transactions.Transaction) FiltrableSystemView(org.apache.ignite.spi.systemview.view.FiltrableSystemView) CACHE_GRP_PAGE_LIST_VIEW(org.apache.ignite.internal.processors.cache.GridCacheProcessor.CACHE_GRP_PAGE_LIST_VIEW) IgniteEx(org.apache.ignite.internal.IgniteEx) METASTORE_VIEW(org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager.METASTORE_VIEW) REPEATABLE_READ(org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_READ) RendezvousAffinityFunction(org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction) IgniteSystemProperties(org.apache.ignite.IgniteSystemProperties) BinaryMetadataView(org.apache.ignite.spi.systemview.view.BinaryMetadataView) IgniteSemaphore(org.apache.ignite.IgniteSemaphore) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) ComputeJobResultPolicy(org.apache.ignite.compute.ComputeJobResultPolicy) ClusterNodeView(org.apache.ignite.spi.systemview.view.ClusterNodeView) LOCKS_VIEW(org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.LOCKS_VIEW) NODES_SYS_VIEW(org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.NODES_SYS_VIEW) AtomicReferenceView(org.apache.ignite.spi.systemview.view.datastructures.AtomicReferenceView) IgniteLock(org.apache.ignite.IgniteLock) CyclicBarrier(java.util.concurrent.CyclicBarrier) SVCS_VIEW(org.apache.ignite.internal.processors.service.IgniteServiceProcessor.SVCS_VIEW) IgniteCountDownLatch(org.apache.ignite.IgniteCountDownLatch) ServiceView(org.apache.ignite.spi.systemview.view.ServiceView) GridCommonAbstractTest(org.apache.ignite.testframework.junits.common.GridCommonAbstractTest) CLI_CONN_VIEW(org.apache.ignite.internal.processors.odbc.ClientListenerProcessor.CLI_CONN_VIEW) Collection(java.util.Collection) IgniteException(org.apache.ignite.IgniteException) OPTIMISTIC(org.apache.ignite.transactions.TransactionConcurrency.OPTIMISTIC) LATCHES_VIEW(org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.LATCHES_VIEW) VOLATILE_DATA_REGION_NAME(org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.VOLATILE_DATA_REGION_NAME) GridTestUtils(org.apache.ignite.testframework.GridTestUtils) Objects(java.util.Objects) Nullable(org.jetbrains.annotations.Nullable) List(java.util.List) ClientConfiguration(org.apache.ignite.configuration.ClientConfiguration) CU(org.apache.ignite.internal.util.typedef.internal.CU) ACTIVE(org.apache.ignite.transactions.TransactionState.ACTIVE) NodeAttributeViewWalker(org.apache.ignite.internal.managers.systemview.walker.NodeAttributeViewWalker) NotNull(org.jetbrains.annotations.NotNull) DummyService(org.apache.ignite.internal.processors.service.DummyService) ContinuousQueryView(org.apache.ignite.spi.systemview.view.ContinuousQueryView) GridCacheUtils.cacheGroupId(org.apache.ignite.internal.processors.cache.GridCacheUtils.cacheGroupId) CacheView(org.apache.ignite.spi.systemview.view.CacheView) GridTestUtils.waitForCondition(org.apache.ignite.testframework.GridTestUtils.waitForCondition) SetView(org.apache.ignite.spi.systemview.view.datastructures.SetView) CACHES_VIEW(org.apache.ignite.internal.processors.cache.ClusterCachesInfo.CACHES_VIEW) AtomicLongView(org.apache.ignite.spi.systemview.view.datastructures.AtomicLongView) IgniteCallable(org.apache.ignite.lang.IgniteCallable) HashSet(java.util.HashSet) SEMAPHORES_VIEW(org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.SEMAPHORES_VIEW) SYS_POOL_QUEUE_VIEW(org.apache.ignite.internal.processors.pool.PoolProcessor.SYS_POOL_QUEUE_VIEW) SnapshotView(org.apache.ignite.spi.systemview.view.SnapshotView) ReentrantLockView(org.apache.ignite.spi.systemview.view.datastructures.ReentrantLockView) GridFunc.identity(org.apache.ignite.internal.util.lang.GridFunc.identity) IgniteClosure(org.apache.ignite.lang.IgniteClosure) IgnitePredicate(org.apache.ignite.lang.IgnitePredicate) AtomicConfiguration(org.apache.ignite.configuration.AtomicConfiguration) DataStorageConfiguration(org.apache.ignite.configuration.DataStorageConfiguration) ScanQueryView(org.apache.ignite.spi.systemview.view.ScanQueryView) ServiceConfiguration(org.apache.ignite.services.ServiceConfiguration) MetastorageView(org.apache.ignite.spi.systemview.view.MetastorageView) STAMPED_VIEW(org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.STAMPED_VIEW) F(org.apache.ignite.internal.util.typedef.F) Iterator(java.util.Iterator) TXS_MON_LIST(org.apache.ignite.internal.processors.cache.transactions.IgniteTxManager.TXS_MON_LIST) JdbcConnectionContext(org.apache.ignite.internal.processors.odbc.jdbc.JdbcConnectionContext) CollectionConfiguration(org.apache.ignite.configuration.CollectionConfiguration) CACHE_GRPS_VIEW(org.apache.ignite.internal.processors.cache.ClusterCachesInfo.CACHE_GRPS_VIEW) CacheGroupView(org.apache.ignite.spi.systemview.view.CacheGroupView) TestObjectAllTypes(org.apache.ignite.internal.binary.mutabletest.GridBinaryTestClasses.TestObjectAllTypes) TimeUnit(java.util.concurrent.TimeUnit) Consumer(java.util.function.Consumer) IgniteCacheDatabaseSharedManager(org.apache.ignite.internal.processors.cache.persistence.IgniteCacheDatabaseSharedManager) Ignition(org.apache.ignite.Ignition) IgniteAtomicLong(org.apache.ignite.IgniteAtomicLong) BASELINE_NODE_ATTRIBUTES_SYS_VIEW(org.apache.ignite.internal.processors.cluster.GridClusterStateProcessor.BASELINE_NODE_ATTRIBUTES_SYS_VIEW) Collections(java.util.Collections) DataRegionConfiguration(org.apache.ignite.configuration.DataRegionConfiguration) SemaphoreView(org.apache.ignite.spi.systemview.view.datastructures.SemaphoreView) NodeMetricsView(org.apache.ignite.spi.systemview.view.NodeMetricsView) IgniteEx(org.apache.ignite.internal.IgniteEx) Test(org.junit.Test) GridCommonAbstractTest(org.apache.ignite.testframework.junits.common.GridCommonAbstractTest)

Aggregations

List (java.util.List)12 CountDownLatch (java.util.concurrent.CountDownLatch)12 IgniteCache (org.apache.ignite.IgniteCache)12 Arrays (java.util.Arrays)11 HashSet (java.util.HashSet)11 Set (java.util.Set)11 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)11 Ignition (org.apache.ignite.Ignition)11 RendezvousAffinityFunction (org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction)11 Field (java.lang.reflect.Field)10 Connection (java.sql.Connection)10 Objects (java.util.Objects)10 Properties (java.util.Properties)10 Consumer (java.util.function.Consumer)10 IgniteJdbcThinDriver (org.apache.ignite.IgniteJdbcThinDriver)10 CacheAtomicityMode (org.apache.ignite.cache.CacheAtomicityMode)10 ContinuousQuery (org.apache.ignite.cache.query.ContinuousQuery)10 QueryCursor (org.apache.ignite.cache.query.QueryCursor)10 ScanQuery (org.apache.ignite.cache.query.ScanQuery)10 CacheConfiguration (org.apache.ignite.configuration.CacheConfiguration)8