use of org.apache.ignite.configuration.BinaryConfiguration 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;
}
use of org.apache.ignite.configuration.BinaryConfiguration 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.BinaryConfiguration in project ignite by apache.
the class GridCacheBinaryStoreBinariesSimpleNameMappersSelfTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
BinaryConfiguration bCfg = cfg.getBinaryConfiguration();
bCfg.setNameMapper(new BinaryBasicNameMapper());
bCfg.setIdMapper(new BinaryBasicIdMapper(true));
return cfg;
}
use of org.apache.ignite.configuration.BinaryConfiguration in project ignite by apache.
the class IgnitePersistentStoreCacheGroupsTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(gridName);
cfg.setConsistentId(gridName);
DataStorageConfiguration memCfg = new DataStorageConfiguration().setDefaultDataRegionConfiguration(new DataRegionConfiguration().setMaxSize(100 * 1024 * 1024).setPersistenceEnabled(true)).setPageSize(1024).setWalMode(WALMode.LOG_ONLY);
cfg.setDataStorageConfiguration(memCfg);
cfg.setBinaryConfiguration(new BinaryConfiguration().setCompactFooter(false));
((TcpDiscoverySpi) cfg.getDiscoverySpi()).setIpFinder(IP_FINDER);
if (ccfgs != null) {
cfg.setCacheConfiguration(ccfgs);
ccfgs = null;
}
return cfg;
}
use of org.apache.ignite.configuration.BinaryConfiguration in project ignite by apache.
the class IgnitePdsMultiNodePutGetRestartTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(gridName);
DataStorageConfiguration memCfg = new DataStorageConfiguration().setDefaultDataRegionConfiguration(new DataRegionConfiguration().setMaxSize(100 * 1024 * 1024).setPersistenceEnabled(true)).setWalMode(WALMode.LOG_ONLY);
cfg.setDataStorageConfiguration(memCfg);
CacheConfiguration ccfg = new CacheConfiguration(CACHE_NAME);
ccfg.setIndexedTypes(Integer.class, DbValue.class);
ccfg.setRebalanceMode(CacheRebalanceMode.NONE);
ccfg.setAffinity(new RendezvousAffinityFunction(false, 32));
ccfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
cfg.setCacheConfiguration(ccfg);
cfg.setDiscoverySpi(new TcpDiscoverySpi().setIpFinder(IP_FINDER));
cfg.setMarshaller(null);
BinaryConfiguration bCfg = new BinaryConfiguration();
bCfg.setCompactFooter(false);
cfg.setBinaryConfiguration(bCfg);
return cfg;
}
Aggregations