use of org.apache.ignite.configuration.DataStorageConfiguration in project ignite by apache.
the class IgniteDbSingleNodeWithIndexingWalRestoreTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(gridName);
BinaryConfiguration binCfg = new BinaryConfiguration();
binCfg.setCompactFooter(true);
cfg.setBinaryConfiguration(binCfg);
CacheConfiguration indexedCacheCfg = new CacheConfiguration();
indexedCacheCfg.setName("indexedCache");
List<QueryEntity> qryEntities = new ArrayList<>();
{
QueryEntity qryEntity = new QueryEntity();
qryEntity.setKeyType(Integer.class.getName());
qryEntity.setValueType(BINARY_TYPE_NAME);
LinkedHashMap<String, String> fields = new LinkedHashMap<>();
fields.put(BINARY_TYPE_FIELD_NAME, String.class.getName());
qryEntity.setFields(fields);
qryEntity.setIndexes(F.asList(new QueryIndex(BINARY_TYPE_FIELD_NAME)));
qryEntities.add(qryEntity);
}
{
QueryEntity qryEntity = new QueryEntity();
qryEntity.setKeyType(Integer.class.getName());
qryEntity.setValueType(RegularPerson.class.getName());
LinkedHashMap<String, String> fields = new LinkedHashMap<>();
fields.put("regName", String.class.getName());
qryEntity.setFields(fields);
qryEntity.setIndexes(F.asList(new QueryIndex("regName")));
qryEntities.add(qryEntity);
}
indexedCacheCfg.setQueryEntities(qryEntities);
cfg.setCacheConfiguration(indexedCacheCfg);
DataStorageConfiguration memCfg = new DataStorageConfiguration().setDefaultDataRegionConfiguration(new DataRegionConfiguration().setMaxSize(100 * 1024 * 1024).setPersistenceEnabled(true)).setWalMode(WALMode.LOG_ONLY);
cfg.setDataStorageConfiguration(memCfg);
cfg.setConsistentId(gridName);
return cfg;
}
use of org.apache.ignite.configuration.DataStorageConfiguration in project ignite by apache.
the class IgnitePersistentStoreQueryWithMultipleClassesPerCacheTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(gridName);
((TcpDiscoverySpi) cfg.getDiscoverySpi()).setIpFinder(ipFinder);
cfg.setCacheConfiguration(cacheCfg(CACHE_NAME));
DataStorageConfiguration pCfg = new DataStorageConfiguration();
pCfg.setCheckpointFrequency(1000);
cfg.setDataStorageConfiguration(pCfg);
return cfg;
}
use of org.apache.ignite.configuration.DataStorageConfiguration in project ignite by apache.
the class IgniteBaselineLockPartitionOnAffinityRunAtomicCacheTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
cfg.setDataStorageConfiguration(new DataStorageConfiguration().setDefaultDataRegionConfiguration(new DataRegionConfiguration().setInitialSize(200 * 1024 * 1024).setMaxSize(200 * 1024 * 1024).setPersistenceEnabled(true)));
return cfg;
}
use of org.apache.ignite.configuration.DataStorageConfiguration in project ignite by apache.
the class IgniteBaselineLockPartitionOnAffinityRunTxCacheTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
cfg.setDataStorageConfiguration(new DataStorageConfiguration().setDefaultDataRegionConfiguration(new DataRegionConfiguration().setInitialSize(200 * 1024 * 1024).setMaxSize(200 * 1024 * 1024).setPersistenceEnabled(true)));
return cfg;
}
use of org.apache.ignite.configuration.DataStorageConfiguration in project ignite by apache.
the class IgniteChangingBaselineCacheQueryNodeRestartSelfTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
cfg.setDataStorageConfiguration(new DataStorageConfiguration().setDefaultDataRegionConfiguration(new DataRegionConfiguration().setMaxSize(200 * 1024 * 1024).setPersistenceEnabled(true)));
return cfg;
}
Aggregations