use of org.apache.ignite.configuration.DataStorageConfiguration in project ignite by apache.
the class SwapPathConstructionSelfTest method createMemoryConfiguration.
/**
* @param isRelativePath flag is set to {@code true} if relative path should be used for data region configuration.
*/
private DataStorageConfiguration createMemoryConfiguration(boolean isRelativePath) {
DataStorageConfiguration memCfg = new DataStorageConfiguration();
DataRegionConfiguration memPlcCfg = new DataRegionConfiguration();
memPlcCfg.setName("default");
memPlcCfg.setMaxSize(20 * 1024 * 1024);
if (isRelativePath)
memPlcCfg.setSwapPath(RELATIVE_SWAP_PATH);
else
memPlcCfg.setSwapPath(Paths.get(getTmpDir(), ABSOLUTE_SWAP_PATH).toString());
memCfg.setDefaultDataRegionConfiguration(memPlcCfg);
return memCfg;
}
use of org.apache.ignite.configuration.DataStorageConfiguration in project ignite by apache.
the class TxPessimisticDeadlockDetectionTest method getConfiguration.
/**
* {@inheritDoc}
*/
@SuppressWarnings("unchecked")
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
if (isDebug()) {
TcpDiscoverySpi discoSpi = new TcpDiscoverySpi();
discoSpi.failureDetectionTimeoutEnabled(false);
cfg.setDiscoverySpi(discoSpi);
}
DataStorageConfiguration memCfg = new DataStorageConfiguration().setDefaultDataRegionConfiguration(new DataRegionConfiguration().setMaxSize(DataStorageConfiguration.DFLT_DATA_REGION_MAX_SIZE * 10).setName("dfltPlc"));
cfg.setDataStorageConfiguration(memCfg);
cfg.setClientMode(client);
return cfg;
}
use of org.apache.ignite.configuration.DataStorageConfiguration in project ignite by apache.
the class JdbcThinAuthenticateConnectionSelfTest method getConfiguration.
/**
* {@inheritDoc}
*/
@SuppressWarnings("deprecation")
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
TcpDiscoverySpi disco = new TcpDiscoverySpi();
disco.setIpFinder(IP_FINDER);
cfg.setDiscoverySpi(disco);
cfg.setMarshaller(new BinaryMarshaller());
cfg.setAuthenticationEnabled(true);
cfg.setDataStorageConfiguration(new DataStorageConfiguration().setDefaultDataRegionConfiguration(new DataRegionConfiguration().setPersistenceEnabled(true)));
return cfg;
}
use of org.apache.ignite.configuration.DataStorageConfiguration in project ignite by apache.
the class StandaloneGridKernalContext method prepareIgniteConfiguration.
/**
* @return Ignite configuration which allows to start requied processors for WAL reader
*/
private IgniteConfiguration prepareIgniteConfiguration() {
IgniteConfiguration cfg = new IgniteConfiguration();
cfg.setDiscoverySpi(new StandaloneNoopDiscoverySpi());
cfg.setCommunicationSpi(new StandaloneNoopCommunicationSpi());
final Marshaller marshaller = new BinaryMarshaller();
cfg.setMarshaller(marshaller);
final DataStorageConfiguration pstCfg = new DataStorageConfiguration();
final DataRegionConfiguration regCfg = new DataRegionConfiguration();
regCfg.setPersistenceEnabled(true);
pstCfg.setDefaultDataRegionConfiguration(regCfg);
cfg.setDataStorageConfiguration(pstCfg);
marshaller.setContext(marshallerCtx);
return cfg;
}
use of org.apache.ignite.configuration.DataStorageConfiguration in project ignite by apache.
the class IgniteCacheDatabaseSharedManager method start0.
/**
* {@inheritDoc}
*/
@Override
protected void start0() throws IgniteCheckedException {
if (cctx.kernalContext().clientNode() && cctx.kernalContext().config().getDataStorageConfiguration() == null)
return;
DataStorageConfiguration memCfg = cctx.kernalContext().config().getDataStorageConfiguration();
assert memCfg != null;
validateConfiguration(memCfg);
pageSize = memCfg.getPageSize();
initDataRegions(memCfg);
}
Aggregations