Search in sources :

Example 36 with TcpCommunicationSpi

use of org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi in project ignite by apache.

the class GridJobServicesAddNodeTest method getConfiguration.

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

use of org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi in project ignite by apache.

the class IgniteAtomicLongChangingTopologySelfTest 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).setNetworkTimeout(30_000);
    AtomicConfiguration atomicCfg = new AtomicConfiguration();
    atomicCfg.setCacheMode(PARTITIONED);
    atomicCfg.setBackups(1);
    cfg.setAtomicConfiguration(atomicCfg);
    ((TcpCommunicationSpi) cfg.getCommunicationSpi()).setSharedMemoryPort(-1);
    cfg.setClientMode(client);
    cfg.setPeerClassLoadingEnabled(false);
    return cfg;
}
Also used : IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) AtomicConfiguration(org.apache.ignite.configuration.AtomicConfiguration) TcpCommunicationSpi(org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi) TcpDiscoverySpi(org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi)

Example 38 with TcpCommunicationSpi

use of org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi in project ignite by apache.

the class IgniteCacheCrossCacheTxFailoverTest method getConfiguration.

/**
 * {@inheritDoc}
 */
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
    ((TcpDiscoverySpi) cfg.getDiscoverySpi()).setIpFinder(IP_FINDER);
    if (igniteInstanceName.equals(getTestIgniteInstanceName(GRID_CNT - 1)))
        cfg.setClientMode(true);
    ((TcpCommunicationSpi) cfg.getCommunicationSpi()).setSharedMemoryPort(-1);
    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 39 with TcpCommunicationSpi

use of org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi in project ignite by apache.

the class IgniteCachePutRetryAbstractSelfTest method getConfiguration.

/**
 * {@inheritDoc}
 */
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
    cfg.setIncludeEventTypes();
    ((TcpDiscoverySpi) cfg.getDiscoverySpi()).setIpFinder(IP_FINDER);
    ((TcpCommunicationSpi) cfg.getCommunicationSpi()).setSharedMemoryPort(-1);
    AtomicConfiguration acfg = new AtomicConfiguration();
    acfg.setBackups(1);
    cfg.setAtomicConfiguration(acfg);
    cfg.setIncludeEventTypes(new int[0]);
    return cfg;
}
Also used : IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) AtomicConfiguration(org.apache.ignite.configuration.AtomicConfiguration) TcpCommunicationSpi(org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi) TcpDiscoverySpi(org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi)

Example 40 with TcpCommunicationSpi

use of org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi in project ignite by apache.

the class HadoopAbstractSelfTest method getConfiguration.

/**
 * {@inheritDoc}
 */
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
    cfg.setHadoopConfiguration(hadoopConfiguration(igniteInstanceName));
    TcpCommunicationSpi commSpi = new TcpCommunicationSpi();
    commSpi.setSharedMemoryPort(-1);
    cfg.setCommunicationSpi(commSpi);
    TcpDiscoverySpi discoSpi = (TcpDiscoverySpi) cfg.getDiscoverySpi();
    discoSpi.setIpFinder(singleTestIpFinder);
    if (igfsEnabled())
        cfg.setFileSystemConfiguration(igfsConfiguration());
    if (restEnabled()) {
        ConnectorConfiguration clnCfg = new ConnectorConfiguration();
        clnCfg.setPort(restPort++);
        cfg.setConnectorConfiguration(clnCfg);
    }
    cfg.setLocalHost("127.0.0.1");
    cfg.setPeerClassLoadingEnabled(false);
    return cfg;
}
Also used : IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) ConnectorConfiguration(org.apache.ignite.configuration.ConnectorConfiguration) TcpCommunicationSpi(org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi) TcpDiscoverySpi(org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi)

Aggregations

TcpCommunicationSpi (org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi)113 IgniteConfiguration (org.apache.ignite.configuration.IgniteConfiguration)98 TcpDiscoverySpi (org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi)75 CacheConfiguration (org.apache.ignite.configuration.CacheConfiguration)30 MemoryEventStorageSpi (org.apache.ignite.spi.eventstorage.memory.MemoryEventStorageSpi)8 TransactionConfiguration (org.apache.ignite.configuration.TransactionConfiguration)6 CommunicationSpi (org.apache.ignite.spi.communication.CommunicationSpi)6 AtomicConfiguration (org.apache.ignite.configuration.AtomicConfiguration)5 BinaryMarshaller (org.apache.ignite.internal.binary.BinaryMarshaller)5 HashMap (java.util.HashMap)4 IgniteException (org.apache.ignite.IgniteException)4 ClusterNode (org.apache.ignite.cluster.ClusterNode)4 BinaryConfiguration (org.apache.ignite.configuration.BinaryConfiguration)4 DataStorageConfiguration (org.apache.ignite.configuration.DataStorageConfiguration)4 NearCacheConfiguration (org.apache.ignite.configuration.NearCacheConfiguration)4 IgniteSpiException (org.apache.ignite.spi.IgniteSpiException)4 LinkedHashMap (java.util.LinkedHashMap)3 UUID (java.util.UUID)3 DiscoverySpi (org.apache.ignite.spi.discovery.DiscoverySpi)3 ArrayList (java.util.ArrayList)2