use of org.apache.ignite.configuration.DataRegionConfiguration 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.DataRegionConfiguration 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.DataRegionConfiguration 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.DataRegionConfiguration in project ignite by apache.
the class PageEvictionMultinodeMixedRegionsTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(gridName);
setEvictionMode(DataPageEvictionMode.RANDOM_2_LRU, cfg);
DataRegionConfiguration persReg = new DataRegionConfiguration().setName("persisted").setPersistenceEnabled(true).setMaxSize(// limit memory to save space on agents
128 * 1024 * 1024);
cfg.getDataStorageConfiguration().setDataRegionConfigurations(persReg);
return cfg;
}
use of org.apache.ignite.configuration.DataRegionConfiguration 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;
}
Aggregations