use of org.apache.ignite.failure.StopNodeFailureHandler in project ignite by apache.
the class TxRecoveryStoreEnabledTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(gridName);
cfg.setCommunicationSpi(new TestCommunicationSpi());
CacheConfiguration ccfg = defaultCacheConfiguration();
ccfg.setName(CACHE_NAME);
ccfg.setNearConfiguration(null);
ccfg.setCacheMode(CacheMode.PARTITIONED);
ccfg.setBackups(1);
ccfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
ccfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
ccfg.setCacheStoreFactory(new TestCacheStoreFactory());
ccfg.setReadThrough(true);
ccfg.setWriteThrough(true);
ccfg.setWriteBehindEnabled(false);
cfg.setCacheConfiguration(ccfg);
cfg.setFailureHandler(new StopNodeFailureHandler());
return cfg;
}
use of org.apache.ignite.failure.StopNodeFailureHandler in project ignite by apache.
the class CheckpointBufferDeadlockTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
cfg.setDataStorageConfiguration(new DataStorageConfiguration().setFileIOFactory(new SlowCheckpointFileIOFactory(slowCheckpointEnabled, CHECKPOINT_PARK_NANOS)).setCheckpointThreads(checkpointThreads).setDefaultDataRegionConfiguration(new DataRegionConfiguration().setPersistenceEnabled(true).setMaxSize(MAX_SIZE).setCheckpointPageBufferSize(CP_BUF_SIZE)));
cfg.setFailureHandler(new StopNodeFailureHandler());
cfg.setGridLogger(log);
return cfg;
}
use of org.apache.ignite.failure.StopNodeFailureHandler in project ignite by apache.
the class IgniteLogicalRecoveryWithParamsTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
cfg.setConsistentId(igniteInstanceName);
cfg.setFailureHandler(new StopNodeFailureHandler());
DataStorageConfiguration dsCfg = new DataStorageConfiguration().setWalMode(WALMode.LOG_ONLY).setCheckpointFrequency(// Disable automatic checkpoints.
1024 * 1024 * 1024).setDefaultDataRegionConfiguration(new DataRegionConfiguration().setName("dflt").setInitialSize(256 * 1024 * 1024).setMaxSize(256 * 1024 * 1024).setPersistenceEnabled(true));
cfg.setDataStorageConfiguration(dsCfg);
TestRecordingCommunicationSpi spi = new TestRecordingCommunicationSpi();
cfg.setCommunicationSpi(spi);
return cfg;
}
use of org.apache.ignite.failure.StopNodeFailureHandler in project ignite by apache.
the class SlowHistoricalRebalanceSmallHistoryTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String name) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(name);
cfg.setConsistentId(name);
cfg.setDataStorageConfiguration(new DataStorageConfiguration().setWalHistorySize(WAL_HISTORY_SIZE).setDefaultDataRegionConfiguration(new DataRegionConfiguration().setMaxSize(DataStorageConfiguration.DFLT_DATA_REGION_INITIAL_SIZE).setPersistenceEnabled(true)).setWalSegmentSize(512 * 1024));
cfg.setFailureHandler(new StopNodeFailureHandler());
cfg.setCommunicationSpi(new RebalanceBlockingSPI());
return cfg;
}
use of org.apache.ignite.failure.StopNodeFailureHandler in project ignite by apache.
the class IgniteWalRebalanceTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
// to make all rebalance wal-based
System.setProperty(IGNITE_PDS_WAL_REBALANCE_THRESHOLD, "0");
IgniteConfiguration cfg = super.getConfiguration(gridName);
cfg.setConsistentId(gridName);
CacheConfiguration<Object, Object> ccfg = new CacheConfiguration<>(CACHE_NAME).setAtomicityMode(CacheAtomicityMode.ATOMIC).setRebalanceMode(CacheRebalanceMode.ASYNC).setCacheMode(CacheMode.PARTITIONED).setBackups(backups).setAffinity(new RendezvousAffinityFunction(false, PARTS_CNT));
cfg.setCacheConfiguration(ccfg);
DataStorageConfiguration dbCfg = new DataStorageConfiguration().setWalSegmentSize(4 * 1024 * 1024).setWalHistorySize(Integer.MAX_VALUE).setWalMode(WALMode.LOG_ONLY).setCheckpointFrequency(15 * 60 * 1000).setDefaultDataRegionConfiguration(new DataRegionConfiguration().setPersistenceEnabled(true).setMaxSize(DataStorageConfiguration.DFLT_DATA_REGION_INITIAL_SIZE));
cfg.setDataStorageConfiguration(dbCfg);
cfg.setCommunicationSpi(new WalRebalanceCheckingCommunicationSpi());
if (blockMsgPred != null)
((TestRecordingCommunicationSpi) cfg.getCommunicationSpi()).blockMessages(blockMsgPred);
if (recordMsgPred != null)
((TestRecordingCommunicationSpi) cfg.getCommunicationSpi()).record(recordMsgPred);
cfg.setFailureHandler(new StopNodeFailureHandler());
cfg.setConsistentId(gridName);
cfg.setUserAttributes(userAttrs);
return cfg;
}
Aggregations