use of org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi in project ignite by apache.
the class IgniteCacheDistributedJoinPartitionedAndReplicatedTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
TcpDiscoverySpi spi = ((TcpDiscoverySpi) cfg.getDiscoverySpi());
spi.setIpFinder(IP_FINDER);
cfg.setClientMode(client);
return cfg;
}
use of org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi in project ignite by apache.
the class IgniteCacheDistributedJoinQueryConditionsTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
TcpDiscoverySpi spi = ((TcpDiscoverySpi) cfg.getDiscoverySpi());
spi.setIpFinder(IP_FINDER);
cfg.setClientMode(client);
return cfg;
}
use of org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi 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);
cache.setRebalanceMode(CacheRebalanceMode.SYNC);
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.discovery.tcp.TcpDiscoverySpi in project ignite by apache.
the class IgfsServerManagerIpcEndpointRegistrationAbstractSelfTest method gridConfiguration.
/**
* Creates base grid configuration.
*
* @return Base grid configuration.
* @throws Exception In case of any error.
*/
protected IgniteConfiguration gridConfiguration() throws Exception {
IgniteConfiguration cfg = getConfiguration(getTestIgniteInstanceName());
TcpDiscoverySpi discoSpi = new TcpDiscoverySpi();
discoSpi.setIpFinder(IP_FINDER);
cfg.setDiscoverySpi(discoSpi);
CacheConfiguration cc = defaultCacheConfiguration();
cc.setName("partitioned");
cc.setCacheMode(CacheMode.PARTITIONED);
cc.setAffinityMapper(new IgfsGroupDataBlocksKeyMapper(128));
cc.setBackups(0);
cc.setAtomicityMode(TRANSACTIONAL);
CacheConfiguration metaCfg = defaultCacheConfiguration();
metaCfg.setName("replicated");
metaCfg.setCacheMode(CacheMode.REPLICATED);
metaCfg.setAtomicityMode(TRANSACTIONAL);
cfg.setCacheConfiguration(metaCfg, cc);
return cfg;
}
use of org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi in project ignite by apache.
the class IgniteCacheJoinPartitionedAndReplicatedCollocationTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
TcpDiscoverySpi spi = ((TcpDiscoverySpi) cfg.getDiscoverySpi());
spi.setIpFinder(IP_FINDER);
cfg.setClientMode(client);
return cfg;
}
Aggregations