use of org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi in project ignite by apache.
the class CacheContinuousQueryOrderingEventTest method getConfiguration.
/** {@inheritDoc} */
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
((TcpDiscoverySpi) cfg.getDiscoverySpi()).setIpFinder(ipFinder);
((TcpCommunicationSpi) cfg.getCommunicationSpi()).setSharedMemoryPort(-1);
cfg.setClientMode(client);
MemoryEventStorageSpi storeSpi = new MemoryEventStorageSpi();
storeSpi.setExpireCount(100);
cfg.setEventStorageSpi(storeSpi);
return cfg;
}
use of org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi in project ignite by apache.
the class IgniteHadoopFileSystemIpcCacheSelfTest method getConfiguration.
/** {@inheritDoc} */
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
TcpDiscoverySpi discoSpi = new TcpDiscoverySpi();
discoSpi.setIpFinder(IP_FINDER);
cfg.setDiscoverySpi(discoSpi);
FileSystemConfiguration igfsCfg = new FileSystemConfiguration();
igfsCfg.setName("igfs");
igfsCfg.setManagementPort(FileSystemConfiguration.DFLT_MGMT_PORT + cnt);
igfsCfg.setDataCacheConfiguration(dataCacheConfiguration());
igfsCfg.setMetaCacheConfiguration(metaCacheConfiguration());
IgfsIpcEndpointConfiguration endpointCfg = new IgfsIpcEndpointConfiguration();
endpointCfg.setType(IgfsIpcEndpointType.SHMEM);
endpointCfg.setPort(IpcSharedMemoryServerEndpoint.DFLT_IPC_PORT + cnt);
igfsCfg.setIpcEndpointConfiguration(endpointCfg);
// Together with group blocks mapper will yield 64M per node groups.
igfsCfg.setBlockSize(512 * 1024);
cfg.setFileSystemConfiguration(igfsCfg);
cfg.setCacheConfiguration(dataCacheConfiguration());
cfg.setIncludeEventTypes(EVT_TASK_FAILED, EVT_TASK_FINISHED, EVT_JOB_MAPPED);
TcpCommunicationSpi commSpi = new TcpCommunicationSpi();
commSpi.setSharedMemoryPort(-1);
cfg.setCommunicationSpi(commSpi);
cnt++;
return cfg;
}
use of org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi in project ignite by apache.
the class IgniteCacheFullTextQueryNodeJoiningSelfTest method getConfiguration.
/** {@inheritDoc} */
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
CacheConfiguration cache = new CacheConfiguration(DEFAULT_CACHE_NAME);
cache.setCacheMode(PARTITIONED);
cache.setAtomicityMode(atomicityMode());
cache.setWriteSynchronizationMode(FULL_SYNC);
cache.setBackups(1);
QueryEntity qryEntity = new QueryEntity();
qryEntity.setKeyType(AffinityKey.class.getName());
qryEntity.setValueType(IndexedEntity.class.getName());
LinkedHashMap<String, String> fields = new LinkedHashMap<>();
fields.put("val", String.class.getName());
qryEntity.setFields(fields);
qryEntity.setIndexes(Arrays.asList(new QueryIndex("val", QueryIndexType.FULLTEXT)));
cache.setQueryEntities(Arrays.asList(qryEntity));
cfg.setCacheConfiguration(cache);
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 GridCacheAbstractRemoveFailureTest method getConfiguration.
/** {@inheritDoc} */
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
((TcpDiscoverySpi) cfg.getDiscoverySpi()).setIpFinder(IP_FINDER).setForceServerMode(true);
if (testClientNode() && getTestIgniteInstanceName(0).equals(igniteInstanceName))
cfg.setClientMode(true);
((TcpCommunicationSpi) cfg.getCommunicationSpi()).setSharedMemoryPort(-1);
return cfg;
}
use of org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi in project ignite by apache.
the class IgniteCacheAtomicMessageRecoveryPairedConnectionsTest method getConfiguration.
/** {@inheritDoc} */
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
TcpCommunicationSpi commSpi = (TcpCommunicationSpi) cfg.getCommunicationSpi();
assertFalse(commSpi.isUsePairedConnections());
commSpi.setUsePairedConnections(true);
return cfg;
}
Aggregations