use of org.apache.ignite.configuration.DataRegionConfiguration in project ignite by apache.
the class IgnitePdsNoActualWalHistoryTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(gridName);
CacheConfiguration<Integer, IndexedObject> ccfg = new CacheConfiguration<>(CACHE_NAME);
ccfg.setAtomicityMode(CacheAtomicityMode.ATOMIC);
ccfg.setRebalanceMode(CacheRebalanceMode.SYNC);
ccfg.setAffinity(new RendezvousAffinityFunction(false, 32));
cfg.setCacheConfiguration(ccfg);
DataStorageConfiguration dbCfg = new DataStorageConfiguration();
dbCfg.setPageSize(4 * 1024);
cfg.setDataStorageConfiguration(dbCfg);
dbCfg.setWalSegmentSize(4 * 1024 * 1024).setWalHistorySize(2).setWalSegments(10).setWalMode(WALMode.LOG_ONLY).setDefaultDataRegionConfiguration(new DataRegionConfiguration().setMaxSize(100 * 1024 * 1024).setPersistenceEnabled(true));
cfg.setMarshaller(null);
BinaryConfiguration binCfg = new BinaryConfiguration();
binCfg.setCompactFooter(false);
cfg.setBinaryConfiguration(binCfg);
return cfg;
}
use of org.apache.ignite.configuration.DataRegionConfiguration in project ignite by apache.
the class IgniteWalFlushFailoverTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(gridName);
CacheConfiguration cacheCfg = new CacheConfiguration(TEST_CACHE).setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
cfg.setCacheConfiguration(cacheCfg);
DataStorageConfiguration memCfg = new DataStorageConfiguration().setDefaultDataRegionConfiguration(new DataRegionConfiguration().setMaxSize(2048L * 1024 * 1024).setPersistenceEnabled(true)).setWalMode(WALMode.BACKGROUND).setWalBufferSize(// Setting WAL Segment size to high values forces flushing by timeout.
128 * 1024).setWalSegmentSize(flushByTimeout ? 500_000 : 50_000);
cfg.setDataStorageConfiguration(memCfg);
return cfg;
}
use of org.apache.ignite.configuration.DataRegionConfiguration in project ignite by apache.
the class IgniteWalFlushMultiNodeFailoverAbstractSelfTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(gridName);
CacheConfiguration cacheCfg = new CacheConfiguration(TEST_CACHE).setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL).setBackups(1);
cfg.setCacheConfiguration(cacheCfg);
DataStorageConfiguration memCfg = new DataStorageConfiguration().setDefaultDataRegionConfiguration(new DataRegionConfiguration().setMaxSize(2048L * 1024 * 1024).setPersistenceEnabled(true)).setWalMode(this.walMode()).setWalSegmentSize(50_000).setWalBufferSize(50_000);
cfg.setDataStorageConfiguration(memCfg);
return cfg;
}
use of org.apache.ignite.configuration.DataRegionConfiguration in project ignite by apache.
the class IgniteWalHistoryReservationsTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(gridName);
cfg.setClientMode(client);
cfg.setConsistentId("NODE$" + gridName.charAt(gridName.length() - 1));
DataStorageConfiguration memCfg = new DataStorageConfiguration().setDefaultDataRegionConfiguration(new DataRegionConfiguration().setMaxSize(200 * 1024 * 1024).setPersistenceEnabled(true)).setWalMode(WALMode.LOG_ONLY);
cfg.setDataStorageConfiguration(memCfg);
CacheConfiguration ccfg1 = new CacheConfiguration();
ccfg1.setName("cache1");
ccfg1.setBackups(1);
ccfg1.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
ccfg1.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
ccfg1.setAffinity(new RendezvousAffinityFunction(false, 32));
cfg.setCacheConfiguration(ccfg1);
return cfg;
}
use of org.apache.ignite.configuration.DataRegionConfiguration in project ignite by apache.
the class IgniteWalRecoverySeveralRestartsTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(gridName);
CacheConfiguration<Integer, IndexedObject> ccfg = new CacheConfiguration<>(cacheName);
ccfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
ccfg.setRebalanceMode(CacheRebalanceMode.NONE);
ccfg.setIndexedTypes(Integer.class, IndexedObject.class);
ccfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
// 64 per node
ccfg.setAffinity(new RendezvousAffinityFunction(false, 64 * 4));
ccfg.setReadFromBackup(true);
cfg.setCacheConfiguration(ccfg);
DataStorageConfiguration memCfg = new DataStorageConfiguration().setDefaultDataRegionConfiguration(new DataRegionConfiguration().setMaxSize(500 * 1024 * 1024).setPersistenceEnabled(true)).setWalMode(WALMode.LOG_ONLY).setPageSize(PAGE_SIZE);
cfg.setDataStorageConfiguration(memCfg);
cfg.setMarshaller(null);
BinaryConfiguration binCfg = new BinaryConfiguration();
binCfg.setCompactFooter(false);
cfg.setBinaryConfiguration(binCfg);
return cfg;
}
Aggregations