use of org.apache.ignite.internal.pagememory.TestPageIoRegistry in project ignite-3 by apache.
the class AbstractFreeListTest method createPageMemory.
private PageMemory createPageMemory(int pageSize) throws Exception {
dataRegionCfg.change(c -> c.convert(PageMemoryDataRegionChange.class).changePageSize(pageSize).changeInitSize(MAX_SIZE).changeMaxSize(MAX_SIZE)).get(1, TimeUnit.SECONDS);
TestPageIoRegistry ioRegistry = new TestPageIoRegistry();
ioRegistry.loadFromServiceLoader();
ioRegistry.load(TestDataPageIo.VERSIONS);
return new PageMemoryNoStoreImpl(new UnsafeMemoryProvider(null), (PageMemoryDataRegionConfiguration) fixConfiguration(dataRegionCfg), ioRegistry);
}
use of org.apache.ignite.internal.pagememory.TestPageIoRegistry in project ignite-3 by apache.
the class ItBplusTreeSelfTest method createPageMemory.
/**
* Returns page memory.
*
* @throws Exception If failed.
*/
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);
TestPageIoRegistry ioRegistry = new TestPageIoRegistry();
ioRegistry.loadFromServiceLoader();
return new PageMemoryNoStoreImpl(new UnsafeMemoryProvider(null), (PageMemoryDataRegionConfiguration) fixConfiguration(dataRegionCfg), ioRegistry);
}
use of org.apache.ignite.internal.pagememory.TestPageIoRegistry in project ignite-3 by apache.
the class ItBplusTreePageMemoryImplTest 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.internal.pagememory.TestPageIoRegistry 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.internal.pagememory.TestPageIoRegistry 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