use of org.apache.ignite.failure.StopNodeFailureHandler in project ignite by apache.
the class IgniteWalFlushMultiNodeFailoverAbstractSelfTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(gridName);
cfg.setConsistentId(gridName);
cfg.setCacheConfiguration(new CacheConfiguration(DEFAULT_CACHE_NAME).setAtomicityMode(TRANSACTIONAL).setBackups(1).setRebalanceMode(SYNC).setAffinity(new RendezvousAffinityFunction(false, 32)));
cfg.setDataStorageConfiguration(new DataStorageConfiguration().setDefaultDataRegionConfiguration(new DataRegionConfiguration().setMaxSize(2048L * 1024 * 1024).setPersistenceEnabled(true)).setWalMode(walMode()).setWalSegmentSize(512 * 1024).setWalBufferSize(512 * 1024));
cfg.setFailureHandler(new StopNodeFailureHandler());
return cfg;
}
use of org.apache.ignite.failure.StopNodeFailureHandler in project ignite by apache.
the class IgniteWalHistoryReservationsTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(gridName);
cfg.setCommunicationSpi(new TestRecordingCommunicationSpi());
cfg.setClientMode(client);
cfg.setConsistentId("NODE$" + gridName.charAt(gridName.length() - 1));
cfg.setFailureHandler(new StopNodeFailureHandler());
DataStorageConfiguration memCfg = new DataStorageConfiguration().setDefaultDataRegionConfiguration(new DataRegionConfiguration().setMaxSize(200L * 1024 * 1024).setPersistenceEnabled(true)).setWalMode(walMode).setWalSegmentSize(512 * 1024);
cfg.setDataStorageConfiguration(memCfg);
CacheConfiguration ccfg1 = new CacheConfiguration();
ccfg1.setName("cache1");
ccfg1.setBackups(1);
ccfg1.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
ccfg1.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
ccfg1.setAffinity(new RendezvousAffinityFunction(false, 32));
cfg.setCacheConfiguration(ccfg1);
cfg.setFailureDetectionTimeout(20_000);
return cfg;
}
use of org.apache.ignite.failure.StopNodeFailureHandler in project ignite by apache.
the class TxPartitionCounterStateAbstractTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
cfg.setActiveOnStart(false);
cfg.setAutoActivationEnabled(false);
cfg.setConsistentId("node" + igniteInstanceName);
cfg.setFailureHandler(new StopNodeFailureHandler());
// Necessary to reproduce some issues.
cfg.setRebalanceThreadPoolSize(4);
((TcpDiscoverySpi) cfg.getDiscoverySpi()).setIpFinder(IP_FINDER);
// TODO set this only for historical rebalance tests.
cfg.setCommunicationSpi(new IgniteWalRebalanceTest.WalRebalanceCheckingCommunicationSpi());
cfg.setDataStorageConfiguration(new DataStorageConfiguration().setWalHistorySize(1000).setWalSegmentSize(8 * MB).setWalMode(LOG_ONLY).setPageSize(1024).setCheckpointFrequency(MILLISECONDS.convert(365, DAYS)).setDefaultDataRegionConfiguration(new DataRegionConfiguration().setPersistenceEnabled(persistenceEnabled()).setInitialSize(100 * MB).setMaxSize(100 * MB)));
if (!igniteInstanceName.startsWith(CLIENT_GRID_NAME))
cfg.setCacheConfiguration(cacheConfiguration(DEFAULT_CACHE_NAME));
return cfg;
}
use of org.apache.ignite.failure.StopNodeFailureHandler in project ignite by apache.
the class WalRolloverRecordLoggingTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String name) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(name);
cfg.setDataStorageConfiguration(new DataStorageConfiguration().setDefaultDataRegionConfiguration(new DataRegionConfiguration().setPersistenceEnabled(true).setMaxSize(128 * 1024 * 1024)).setWalMode(walMode()).setWalSegmentSize(4 * 1024 * 1024));
cfg.setFailureHandler(new StopNodeFailureHandler());
return cfg;
}
use of org.apache.ignite.failure.StopNodeFailureHandler in project ignite by apache.
the class StopNodeOnRebuildIndexFailureTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
cfg.setDataStorageConfiguration(new DataStorageConfiguration().setDefaultDataRegionConfiguration(new DataRegionConfiguration().setPersistenceEnabled(true)));
cfg.setCacheConfiguration(new CacheConfiguration<>().setName(CACHE_NAME).setIndexedTypes(Integer.class, Person.class));
cfg.setFailureHandler(new StopNodeFailureHandler());
return cfg;
}
Aggregations