use of org.apache.ignite.spi.metric.noop.NoopMetricExporterSpi in project ignite by apache.
the class CacheFreeListSelfTest method createFreeList.
/**
* @param pageSize Page size.
* @return Free list.
* @throws Exception If failed.
*/
private FreeList<CacheDataRow> createFreeList(int pageSize) throws Exception {
DataRegionConfiguration plcCfg = new DataRegionConfiguration().setInitialSize(1024 * MB).setMaxSize(1024 * MB);
pageMem = createPageMemory(pageSize, plcCfg);
long metaPageId = pageMem.allocatePage(1, 1, PageIdAllocator.FLAG_DATA);
IgniteConfiguration cfg = new IgniteConfiguration().setMetricExporterSpi(new NoopMetricExporterSpi());
GridTestKernalContext ctx = new GridTestKernalContext(new GridTestLog4jLogger(), cfg);
ctx.add(new GridMetricManager(ctx));
ctx.add(new PerformanceStatisticsProcessor(ctx));
DataRegionMetricsImpl regionMetrics = new DataRegionMetricsImpl(plcCfg, ctx);
DataRegion dataRegion = new DataRegion(pageMem, plcCfg, regionMetrics, new NoOpPageEvictionTracker());
PageLockTrackerManager pageLockTrackerManager = mock(PageLockTrackerManager.class);
when(pageLockTrackerManager.createPageLockTracker(anyString())).thenReturn(PageLockTrackerManager.NOOP_LSNR);
return new CacheFreeList(1, "freelist", dataRegion, null, metaPageId, true, pageLockTrackerManager, new GridTestKernalContext(log), null, PageIdAllocator.FLAG_IDX);
}
use of org.apache.ignite.spi.metric.noop.NoopMetricExporterSpi in project ignite by apache.
the class GridManagerStopSelfTest method testStopCommunicationManager.
/**
* @throws Exception If failed.
*/
@Test
public void testStopCommunicationManager() throws Exception {
CommunicationSpi spi = new TcpCommunicationSpi();
injectLogger(spi);
ctx.config().setCommunicationSpi(spi);
ctx.config().setMarshaller(new BinaryMarshaller());
ctx.config().setMetricExporterSpi(new NoopMetricExporterSpi());
ctx.add(new GridMetricManager(ctx));
GridIoManager mgr = new GridIoManager(ctx);
mgr.onKernalStop(true);
mgr.stop(false);
}
Aggregations