use of org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi in project ignite by apache.
the class IgniteCacheLockFailoverSelfTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
((TcpCommunicationSpi) cfg.getCommunicationSpi()).setSharedMemoryPort(-1);
return cfg;
}
use of org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi in project ignite by apache.
the class IgniteCacheEntryProcessorNodeJoinTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
cfg.setCacheConfiguration(cacheConfiguration());
TcpDiscoverySpi disco = new TcpDiscoverySpi();
disco.setIpFinder(IP_FINDER);
TcpCommunicationSpi commSpi = new TcpCommunicationSpi();
commSpi.setSharedMemoryPort(-1);
cfg.setCommunicationSpi(commSpi);
cfg.setDiscoverySpi(disco);
return cfg;
}
use of org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi in project ignite by apache.
the class GridCacheDhtPreloadPerformanceTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration c = super.getConfiguration(igniteInstanceName);
CacheConfiguration cc = defaultCacheConfiguration();
cc.setCacheMode(CacheMode.PARTITIONED);
cc.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
cc.setRebalanceMode(CacheRebalanceMode.SYNC);
cc.setAffinity(new RendezvousAffinityFunction(false, 1300));
cc.setBackups(2);
CacheConfiguration cc1 = defaultCacheConfiguration();
cc1.setName("cc1");
cc1.setCacheMode(CacheMode.PARTITIONED);
cc1.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
cc1.setRebalanceMode(CacheRebalanceMode.SYNC);
cc1.setAffinity(new RendezvousAffinityFunction(false, 1300));
cc1.setBackups(2);
TcpDiscoverySpi disco = new TcpDiscoverySpi();
disco.setIpFinder(ipFinder);
c.setDiscoverySpi(disco);
c.setIgfsThreadPoolSize(1);
c.setSystemThreadPoolSize(2);
c.setPublicThreadPoolSize(2);
c.setManagementThreadPoolSize(1);
c.setUtilityCachePoolSize(2);
c.setPeerClassLoadingThreadPoolSize(1);
c.setCacheConfiguration(cc, cc1);
TcpCommunicationSpi comm = new TcpCommunicationSpi();
comm.setSharedMemoryPort(-1);
c.setCommunicationSpi(comm);
return c;
}
use of org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi in project ignite by apache.
the class IgnitePdsTransactionsHangTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(gridName);
TcpDiscoverySpi discoSpi = new TcpDiscoverySpi();
discoSpi.setIpFinder(IP_FINDER);
cfg.setDiscoverySpi(discoSpi);
BinaryConfiguration binaryCfg = new BinaryConfiguration();
binaryCfg.setCompactFooter(false);
cfg.setBinaryConfiguration(binaryCfg);
cfg.setPeerClassLoadingEnabled(true);
TcpCommunicationSpi tcpCommSpi = new TcpCommunicationSpi();
tcpCommSpi.setSharedMemoryPort(-1);
cfg.setCommunicationSpi(tcpCommSpi);
TransactionConfiguration txCfg = new TransactionConfiguration();
txCfg.setDefaultTxIsolation(TransactionIsolation.READ_COMMITTED);
cfg.setTransactionConfiguration(txCfg);
DataRegionConfiguration memPlcCfg = new DataRegionConfiguration();
memPlcCfg.setName("dfltDataRegion");
memPlcCfg.setInitialSize(PAGE_CACHE_SIZE * 1024 * 1024);
memPlcCfg.setMaxSize(PAGE_CACHE_SIZE * 1024 * 1024);
memPlcCfg.setPersistenceEnabled(true);
DataStorageConfiguration memCfg = new DataStorageConfiguration();
memCfg.setDefaultDataRegionConfiguration(memPlcCfg);
memCfg.setWalHistorySize(1);
memCfg.setCheckpointFrequency(CHECKPOINT_FREQUENCY);
memCfg.setPageSize(PAGE_SIZE * 1024);
cfg.setDataStorageConfiguration(memCfg);
return cfg;
}
use of org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi in project ignite by apache.
the class GridCacheRebalancingSyncSelfTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration iCfg = super.getConfiguration(igniteInstanceName);
((TcpDiscoverySpi) iCfg.getDiscoverySpi()).setIpFinder(ipFinder);
((TcpDiscoverySpi) iCfg.getDiscoverySpi()).setForceServerMode(true);
TcpCommunicationSpi commSpi = new CountingCommunicationSpi();
commSpi.setLocalPort(GridTestUtils.getNextCommPort(getClass()));
commSpi.setTcpNoDelay(true);
iCfg.setCommunicationSpi(commSpi);
if (getTestIgniteInstanceName(10).equals(igniteInstanceName))
iCfg.setClientMode(true);
CacheConfiguration<Integer, Integer> cachePCfg = new CacheConfiguration<>(DEFAULT_CACHE_NAME);
cachePCfg.setName(CACHE_NAME_DHT_PARTITIONED);
cachePCfg.setCacheMode(CacheMode.PARTITIONED);
cachePCfg.setRebalanceMode(CacheRebalanceMode.SYNC);
cachePCfg.setBackups(1);
cachePCfg.setRebalanceBatchSize(1);
cachePCfg.setRebalanceBatchesPrefetchCount(1);
cachePCfg.setRebalanceOrder(2);
CacheConfiguration<Integer, Integer> cachePCfg2 = new CacheConfiguration<>(DEFAULT_CACHE_NAME);
cachePCfg2.setName(CACHE_NAME_DHT_PARTITIONED_2);
cachePCfg2.setCacheMode(CacheMode.PARTITIONED);
cachePCfg2.setRebalanceMode(CacheRebalanceMode.SYNC);
cachePCfg2.setBackups(1);
cachePCfg2.setRebalanceOrder(2);
// cachePCfg2.setRebalanceDelay(5000);//Known issue, possible deadlock in case of low priority cache rebalancing delayed.
CacheConfiguration<Integer, Integer> cacheRCfg = new CacheConfiguration<>(DEFAULT_CACHE_NAME);
cacheRCfg.setName(CACHE_NAME_DHT_REPLICATED);
cacheRCfg.setCacheMode(CacheMode.REPLICATED);
cacheRCfg.setRebalanceMode(CacheRebalanceMode.SYNC);
cacheRCfg.setRebalanceBatchSize(1);
cacheRCfg.setRebalanceBatchesPrefetchCount(Integer.MAX_VALUE);
// Shmem fail fix for Integer.MAX_VALUE.
((TcpCommunicationSpi) iCfg.getCommunicationSpi()).setSharedMemoryPort(-1);
CacheConfiguration<Integer, Integer> cacheRCfg2 = new CacheConfiguration<>(DEFAULT_CACHE_NAME);
cacheRCfg2.setName(CACHE_NAME_DHT_REPLICATED_2);
cacheRCfg2.setCacheMode(CacheMode.REPLICATED);
cacheRCfg2.setRebalanceMode(CacheRebalanceMode.SYNC);
cacheRCfg2.setRebalanceOrder(4);
iCfg.setCacheConfiguration(cachePCfg, cachePCfg2, cacheRCfg, cacheRCfg2);
iCfg.setRebalanceThreadPoolSize(3);
return iCfg;
}
Aggregations