use of org.apache.ignite.failure.StopNodeFailureHandler in project ignite by apache.
the class IgnitePdsBinaryMetadataAsyncWritingTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
if (igniteInstanceName.contains("client")) {
cfg.setClientMode(true);
return cfg;
}
cfg.setDataStorageConfiguration(new DataStorageConfiguration().setDefaultDataRegionConfiguration(new DataRegionConfiguration().setMaxSize(50 * 1024 * 1024).setPersistenceEnabled(true)).setFileIOFactory(specialFileIOFactory != null ? specialFileIOFactory : new RandomAccessFileIOFactory()));
cfg.setCacheConfiguration(new CacheConfiguration(DEFAULT_CACHE_NAME).setBackups(1).setAffinity(new RendezvousAffinityFunction(false, 16)));
cfg.setFailureHandler(new StopNodeFailureHandler());
return cfg;
}
use of org.apache.ignite.failure.StopNodeFailureHandler in project ignite by apache.
the class IgnitePdsNoSpaceLeftOnDeviceTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(gridName);
final DataStorageConfiguration dataStorageConfiguration = new DataStorageConfiguration();
dataStorageConfiguration.getDefaultDataRegionConfiguration().setPersistenceEnabled(true).setMaxSize(1 << 24);
dataStorageConfiguration.setFileIOFactory(new FailingFileIOFactory());
cfg.setDataStorageConfiguration(dataStorageConfiguration);
CacheConfiguration ccfg = new CacheConfiguration();
ccfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
ccfg.setName(DEFAULT_CACHE_NAME);
ccfg.setBackups(1);
cfg.setCacheConfiguration(ccfg);
cfg.setFailureHandler(new StopNodeFailureHandler());
return cfg;
}
use of org.apache.ignite.failure.StopNodeFailureHandler in project ignite by apache.
the class TcpCommunicationHandshakeTimeoutTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(gridName);
cfg.setFailureDetectionTimeout(1000);
cfg.setSystemWorkerBlockedTimeout(3000);
TcpCommunicationSpi spi = new TcpCommunicationSpi();
spi.setIdleConnectionTimeout(100);
cfg.setCommunicationSpi(spi);
StopNodeFailureHandler hnd = new StopNodeFailureHandler();
hnd.setIgnoredFailureTypes(new HashSet<>());
cfg.setFailureHandler(hnd);
return cfg;
}
use of org.apache.ignite.failure.StopNodeFailureHandler in project ignite by apache.
the class FailureHandler method configure.
void configure() {
// tag::configure-handler[]
IgniteConfiguration cfg = new IgniteConfiguration();
cfg.setFailureHandler(new StopNodeFailureHandler());
Ignite ignite = Ignition.start(cfg);
// end::configure-handler[]
ignite.close();
}
use of org.apache.ignite.failure.StopNodeFailureHandler in project ignite by apache.
the class PageMemoryLazyAllocationWithPDSTest method testCreateCacheFailsInHugeMemoryRegion.
/**
*/
@Test
public void testCreateCacheFailsInHugeMemoryRegion() throws Exception {
lazyAllocation = true;
IgniteEx srv = startGrid(cfgWithHugeRegion("test-server").setFailureHandler(new StopNodeFailureHandler()));
srv.cluster().active(true);
awaitPartitionMapExchange();
}
Aggregations