Search in sources :

Example 86 with TcpDiscoverySpi

use of org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi in project ignite by apache.

the class CacheInterceptorPartitionCounterLocalSanityTest method getConfiguration.

/**
 * {@inheritDoc}
 */
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
    ((TcpDiscoverySpi) cfg.getDiscoverySpi()).setIpFinder(new TcpDiscoveryVmIpFinder(true));
    return cfg;
}
Also used : IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) TcpDiscoveryVmIpFinder(org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder) TcpDiscoverySpi(org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi)

Example 87 with TcpDiscoverySpi

use of org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi in project ignite by apache.

the class CacheStopAndDestroySelfTest method getConfiguration.

/**
 * {@inheritDoc}
 */
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration iCfg = super.getConfiguration(igniteInstanceName);
    if (getTestIgniteInstanceName(2).equals(igniteInstanceName)) {
        iCfg.setClientMode(true);
        iCfg.setDataStorageConfiguration(memCfg);
    }
    ((TcpDiscoverySpi) iCfg.getDiscoverySpi()).setIpFinder(ipFinder);
    ((TcpDiscoverySpi) iCfg.getDiscoverySpi()).setForceServerMode(true);
    iCfg.setCacheConfiguration();
    TcpCommunicationSpi commSpi = new CountingTxRequestsToClientNodeTcpCommunicationSpi();
    commSpi.setLocalPort(GridTestUtils.getNextCommPort(getClass()));
    commSpi.setTcpNoDelay(true);
    iCfg.setCommunicationSpi(commSpi);
    return iCfg;
}
Also used : IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) TcpCommunicationSpi(org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi) TcpDiscoverySpi(org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi)

Example 88 with TcpDiscoverySpi

use of org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi in project ignite by apache.

the class CacheTxFastFinishTest method getConfiguration.

/**
 * {@inheritDoc}
 */
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
    ((TcpDiscoverySpi) cfg.getDiscoverySpi()).setIpFinder(IP_FINDER);
    CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
    ccfg.setCacheMode(PARTITIONED);
    ccfg.setAtomicityMode(TRANSACTIONAL);
    ccfg.setBackups(1);
    ccfg.setWriteSynchronizationMode(FULL_SYNC);
    if (nearCache)
        ccfg.setNearConfiguration(new NearCacheConfiguration());
    cfg.setCacheConfiguration(ccfg);
    cfg.setClientMode(client);
    return cfg;
}
Also used : IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) NearCacheConfiguration(org.apache.ignite.configuration.NearCacheConfiguration) CacheConfiguration(org.apache.ignite.configuration.CacheConfiguration) TcpDiscoverySpi(org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi) NearCacheConfiguration(org.apache.ignite.configuration.NearCacheConfiguration)

Example 89 with TcpDiscoverySpi

use of org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi in project ignite by apache.

the class GridAbstractCacheInterceptorRebalanceTest method getConfiguration.

/**
 * {@inheritDoc}
 */
@Override
protected IgniteConfiguration getConfiguration(final String igniteInstanceName) throws Exception {
    final IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
    final CacheConfiguration<Integer, Integer> ccfg = new CacheConfiguration<>(CACHE_NAME);
    assertNotNull(interceptor);
    ccfg.setInterceptor(interceptor);
    ccfg.setAtomicityMode(atomicityMode());
    ccfg.setWriteSynchronizationMode(FULL_SYNC);
    ccfg.setRebalanceMode(SYNC);
    ccfg.setBackups(2);
    cfg.setCacheConfiguration(ccfg);
    ((TcpDiscoverySpi) cfg.getDiscoverySpi()).setIpFinder(ipFinder);
    return cfg;
}
Also used : IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) CacheConfiguration(org.apache.ignite.configuration.CacheConfiguration) TcpDiscoverySpi(org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi)

Example 90 with TcpDiscoverySpi

use of org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi in project ignite by apache.

the class GridCacheClearLocallySelfTest method getConfiguration.

/**
 * {@inheritDoc}
 */
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
    CacheConfiguration ccfgLoc = new CacheConfiguration(DEFAULT_CACHE_NAME);
    ccfgLoc.setName(CACHE_LOCAL);
    ccfgLoc.setCacheMode(LOCAL);
    ccfgLoc.setWriteSynchronizationMode(FULL_SYNC);
    ccfgLoc.setAtomicityMode(TRANSACTIONAL);
    CacheConfiguration ccfgPartitioned = new CacheConfiguration(DEFAULT_CACHE_NAME);
    ccfgPartitioned.setName(CACHE_PARTITIONED);
    ccfgPartitioned.setCacheMode(PARTITIONED);
    ccfgPartitioned.setBackups(1);
    ccfgPartitioned.setWriteSynchronizationMode(FULL_SYNC);
    NearCacheConfiguration nearCfg = new NearCacheConfiguration();
    ccfgPartitioned.setNearConfiguration(nearCfg);
    ccfgPartitioned.setNodeFilter(new AttributeFilter(getTestIgniteInstanceName(0)));
    ccfgPartitioned.setAtomicityMode(TRANSACTIONAL);
    CacheConfiguration ccfgColocated = new CacheConfiguration(DEFAULT_CACHE_NAME);
    ccfgColocated.setName(CACHE_COLOCATED);
    ccfgColocated.setCacheMode(PARTITIONED);
    ccfgColocated.setBackups(1);
    ccfgColocated.setWriteSynchronizationMode(FULL_SYNC);
    ccfgColocated.setAtomicityMode(TRANSACTIONAL);
    CacheConfiguration ccfgReplicated = new CacheConfiguration(DEFAULT_CACHE_NAME);
    ccfgReplicated.setName(CACHE_REPLICATED);
    ccfgReplicated.setCacheMode(REPLICATED);
    ccfgReplicated.setWriteSynchronizationMode(FULL_SYNC);
    ccfgReplicated.setAtomicityMode(TRANSACTIONAL);
    cfg.setCacheConfiguration(ccfgLoc, ccfgPartitioned, ccfgColocated, ccfgReplicated);
    TcpDiscoverySpi discoSpi = new TcpDiscoverySpi();
    discoSpi.setIpFinder(IP_FINDER);
    cfg.setDiscoverySpi(discoSpi);
    return cfg;
}
Also used : IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) NearCacheConfiguration(org.apache.ignite.configuration.NearCacheConfiguration) CacheConfiguration(org.apache.ignite.configuration.CacheConfiguration) NearCacheConfiguration(org.apache.ignite.configuration.NearCacheConfiguration) TcpDiscoverySpi(org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi)

Aggregations

TcpDiscoverySpi (org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi)764 IgniteConfiguration (org.apache.ignite.configuration.IgniteConfiguration)745 CacheConfiguration (org.apache.ignite.configuration.CacheConfiguration)330 TcpDiscoveryVmIpFinder (org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder)80 TcpCommunicationSpi (org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi)76 NearCacheConfiguration (org.apache.ignite.configuration.NearCacheConfiguration)58 DataStorageConfiguration (org.apache.ignite.configuration.DataStorageConfiguration)55 RendezvousAffinityFunction (org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction)48 DataRegionConfiguration (org.apache.ignite.configuration.DataRegionConfiguration)48 ConnectorConfiguration (org.apache.ignite.configuration.ConnectorConfiguration)41 BinaryMarshaller (org.apache.ignite.internal.binary.BinaryMarshaller)35 FileSystemConfiguration (org.apache.ignite.configuration.FileSystemConfiguration)31 IgfsGroupDataBlocksKeyMapper (org.apache.ignite.igfs.IgfsGroupDataBlocksKeyMapper)21 BinaryConfiguration (org.apache.ignite.configuration.BinaryConfiguration)19 ArrayList (java.util.ArrayList)18 Ignite (org.apache.ignite.Ignite)18 TestRecordingCommunicationSpi (org.apache.ignite.internal.TestRecordingCommunicationSpi)18 QueryEntity (org.apache.ignite.cache.QueryEntity)12 DiscoverySpi (org.apache.ignite.spi.discovery.DiscoverySpi)10 MemoryEventStorageSpi (org.apache.ignite.spi.eventstorage.memory.MemoryEventStorageSpi)10