use of org.apache.ignite.configuration.DataStorageConfiguration in project ignite by apache.
the class IgniteWalRecoveryTest 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.ATOMIC);
ccfg.setRebalanceMode(CacheRebalanceMode.SYNC);
ccfg.setAffinity(new RendezvousAffinityFunction(false, 32));
ccfg.setNodeFilter(new RemoteNodeFilter());
ccfg.setIndexedTypes(Integer.class, IndexedObject.class);
cfg.setCacheConfiguration(ccfg);
DataStorageConfiguration dbCfg = new DataStorageConfiguration();
dbCfg.setPageSize(4 * 1024);
DataRegionConfiguration memPlcCfg = new DataRegionConfiguration();
memPlcCfg.setName("dfltDataRegion");
memPlcCfg.setInitialSize(1024 * 1024 * 1024);
memPlcCfg.setMaxSize(1024 * 1024 * 1024);
memPlcCfg.setPersistenceEnabled(true);
dbCfg.setDefaultDataRegionConfiguration(memPlcCfg);
dbCfg.setWalRecordIteratorBufferSize(1024 * 1024);
dbCfg.setWalHistorySize(2);
if (logOnly)
dbCfg.setWalMode(WALMode.LOG_ONLY);
if (walSegmentSize != 0)
dbCfg.setWalSegmentSize(walSegmentSize);
cfg.setDataStorageConfiguration(dbCfg);
cfg.setMarshaller(null);
BinaryConfiguration binCfg = new BinaryConfiguration();
binCfg.setCompactFooter(false);
cfg.setBinaryConfiguration(binCfg);
if (!getTestIgniteInstanceName(0).equals(gridName))
cfg.setUserAttributes(F.asMap(HAS_CACHE, true));
return cfg;
}
use of org.apache.ignite.configuration.DataStorageConfiguration in project ignite by apache.
the class IgniteWalSerializerVersionTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String name) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(name);
cfg.setDiscoverySpi(new TcpDiscoverySpi().setIpFinder(IP_FINDER));
cfg.setDataStorageConfiguration(new DataStorageConfiguration().setDefaultDataRegionConfiguration(new DataRegionConfiguration().setPersistenceEnabled(true).setMaxSize(100 * 1024 * 1024)));
return cfg;
}
use of org.apache.ignite.configuration.DataStorageConfiguration in project ignite by apache.
the class WalCompactionTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String name) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(name);
cfg.setDiscoverySpi(new TcpDiscoverySpi().setIpFinder(IP_FINDER));
cfg.setDataStorageConfiguration(new DataStorageConfiguration().setDefaultDataRegionConfiguration(new DataRegionConfiguration().setPersistenceEnabled(true).setMaxSize(200 * 1024 * 1024)).setWalMode(WALMode.LOG_ONLY).setWalSegmentSize(WAL_SEGMENT_SIZE).setWalHistorySize(500).setWalCompactionEnabled(true));
CacheConfiguration ccfg = new CacheConfiguration();
ccfg.setName("cache");
ccfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
ccfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
ccfg.setAffinity(new RendezvousAffinityFunction(false, 16));
ccfg.setBackups(0);
cfg.setCacheConfiguration(ccfg);
cfg.setConsistentId(name);
return cfg;
}
use of org.apache.ignite.configuration.DataStorageConfiguration in project ignite by apache.
the class IgniteBaselineAffinityTopologyActivationTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
if (consId != null)
cfg.setConsistentId(consId);
cfg.setDataStorageConfiguration(new DataStorageConfiguration().setDefaultDataRegionConfiguration(new DataRegionConfiguration().setPersistenceEnabled(true).setMaxSize(10 * 1024 * 1024)).setWalMode(WALMode.LOG_ONLY));
return cfg;
}
use of org.apache.ignite.configuration.DataStorageConfiguration in project ignite by apache.
the class PagesWriteThrottleSmokeTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(gridName);
TcpDiscoverySpi discoverySpi = (TcpDiscoverySpi) cfg.getDiscoverySpi();
discoverySpi.setIpFinder(ipFinder);
DataStorageConfiguration dbCfg = new DataStorageConfiguration().setDefaultDataRegionConfiguration(new DataRegionConfiguration().setMaxSize(400 * 1024 * 1024).setCheckpointPageBufferSize(200 * 1000 * 1000).setName("dfltDataRegion").setMetricsEnabled(true).setPersistenceEnabled(true)).setWalMode(WALMode.BACKGROUND).setCheckpointFrequency(20_000).setWriteThrottlingEnabled(true).setCheckpointThreads(1).setFileIOFactory(new SlowCheckpointFileIOFactory());
cfg.setDataStorageConfiguration(dbCfg);
CacheConfiguration ccfg1 = new CacheConfiguration();
ccfg1.setName(CACHE_NAME);
ccfg1.setAtomicityMode(CacheAtomicityMode.ATOMIC);
ccfg1.setWriteSynchronizationMode(CacheWriteSynchronizationMode.PRIMARY_SYNC);
ccfg1.setAffinity(new RendezvousAffinityFunction(false, 64));
cfg.setCacheConfiguration(ccfg1);
cfg.setConsistentId(gridName);
return cfg;
}
Aggregations