use of org.apache.ignite.configuration.schemas.store.PageMemoryDataRegionConfiguration in project ignite-3 by apache.
the class ItBplusTreeReuseListPageMemoryImplTest method createPageMemory.
/**
* {@inheritDoc}
*/
@Override
protected PageMemory createPageMemory() throws Exception {
dataRegionCfg.change(c -> c.convert(PageMemoryDataRegionChange.class).changePageSize(PAGE_SIZE).changeInitSize(MAX_MEMORY_SIZE).changeMaxSize(MAX_MEMORY_SIZE)).get(1, TimeUnit.SECONDS);
long[] sizes = LongStream.range(0, CPUS + 1).map(i -> MAX_MEMORY_SIZE / CPUS).toArray();
sizes[CPUS] = 10 * MiB;
TestPageIoRegistry ioRegistry = new TestPageIoRegistry();
ioRegistry.loadFromServiceLoader();
return new PageMemoryImpl(new UnsafeMemoryProvider(null), (PageMemoryDataRegionConfiguration) fixConfiguration(dataRegionCfg), ioRegistry, sizes, new TestPageReadWriteManager(), (page, fullPageId, pageMemoryEx) -> {
});
}
use of org.apache.ignite.configuration.schemas.store.PageMemoryDataRegionConfiguration in project ignite-3 by apache.
the class ItBplusTreeReplaceRemoveRaceTest method createPageMemory.
protected PageMemory createPageMemory() throws Exception {
dataRegionCfg.change(c -> c.convert(PageMemoryDataRegionChange.class).changePageSize(512).changeInitSize(1024 * MiB).changeMaxSize(1024 * MiB)).get(1, TimeUnit.SECONDS);
TestPageIoRegistry ioRegistry = new TestPageIoRegistry();
ioRegistry.loadFromServiceLoader();
return new PageMemoryNoStoreImpl(new UnsafeMemoryProvider(null), (PageMemoryDataRegionConfiguration) fixConfiguration(dataRegionCfg), ioRegistry);
}
Aggregations