Search in sources :

Example 66 with TcpDiscoverySpi

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

the class GridCheckpointTaskSelfTest method discoverySpi.

/**
 * @return Discovery SPI.
 */
private DiscoverySpi discoverySpi() {
    TcpDiscoverySpi spi = new TcpDiscoverySpi();
    spi.setIpFinder(IP_FINDER);
    return spi;
}
Also used : TcpDiscoverySpi(org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi)

Example 67 with TcpDiscoverySpi

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

the class GridCommunicationSendMessageSelfTest method getConfiguration.

/**
 * {@inheritDoc}
 */
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration c = super.getConfiguration(igniteInstanceName);
    TcpDiscoverySpi discoSpi = new TcpDiscoverySpi();
    discoSpi.setIpFinder(ipFinder);
    c.setDiscoverySpi(discoSpi);
    TcpCommunicationSpi commSpi = new TcpCommunicationSpi();
    c.setCommunicationSpi(commSpi);
    return c;
}
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 68 with TcpDiscoverySpi

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

the class IgniteCommunicationBalanceTest method getConfiguration.

/**
 * {@inheritDoc}
 */
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
    TcpCommunicationSpi commSpi = ((TcpCommunicationSpi) cfg.getCommunicationSpi());
    commSpi.setSharedMemoryPort(-1);
    commSpi.setConnectionsPerNode(connectionsPerNode());
    commSpi.setUsePairedConnections(usePairedConnections());
    if (selectors > 0)
        commSpi.setSelectorsCount(selectors);
    ((TcpDiscoverySpi) cfg.getDiscoverySpi()).setIpFinder(IP_FINDER);
    cfg.setClientMode(client);
    if (sslEnabled())
        cfg.setSslContextFactory(GridTestUtils.sslFactory());
    return cfg;
}
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 69 with TcpDiscoverySpi

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

the class IgniteIoTestMessagesTest method getConfiguration.

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

Example 70 with TcpDiscoverySpi

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

the class GridDiscoveryManagerAliveCacheSelfTest method getConfiguration.

/**
 * {@inheritDoc}
 */
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
    CacheConfiguration cCfg = defaultCacheConfiguration();
    cCfg.setCacheMode(PARTITIONED);
    cCfg.setBackups(1);
    cCfg.setNearConfiguration(new NearCacheConfiguration());
    cCfg.setRebalanceMode(SYNC);
    cCfg.setWriteSynchronizationMode(FULL_SYNC);
    TcpDiscoverySpi disc = new TcpDiscoverySpi();
    if (clientMode && ((igniteInstanceName.charAt(igniteInstanceName.length() - 1) - '0') & 1) != 0)
        cfg.setClientMode(true);
    else
        cfg.setClientFailureDetectionTimeout(50000);
    disc.setIpFinder(IP_FINDER);
    disc.setAckTimeout(1000);
    disc.setSocketTimeout(1000);
    cfg.setCacheConfiguration(cCfg);
    cfg.setDiscoverySpi(disc);
    cfg.setMetricsUpdateFrequency(500);
    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