use of org.apache.ignite.internal.processors.cache.GridCacheProcessor.CACHE_GRP_IO_VIEW 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);
}
}
Aggregations