Search in sources :

Example 56 with TcpDiscoverySpi

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

the class IgniteQueryDedicatedPoolTest method getConfiguration.

/**
 * {@inheritDoc}
 */
@Override
protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(gridName);
    TcpDiscoverySpi spi = (TcpDiscoverySpi) cfg.getDiscoverySpi();
    spi.setIpFinder(IP_FINDER);
    CacheConfiguration<Integer, Integer> ccfg = new CacheConfiguration<>(DEFAULT_CACHE_NAME);
    ccfg.setIndexedTypes(Integer.class, Integer.class);
    ccfg.setIndexedTypes(Byte.class, Byte.class);
    ccfg.setSqlFunctionClasses(IgniteQueryDedicatedPoolTest.class);
    ccfg.setName(CACHE_NAME);
    cfg.setCacheConfiguration(ccfg);
    if ("client".equals(gridName))
        cfg.setClientMode(true);
    cfg.setIndexingSpi(new TestIndexingSpi());
    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 57 with TcpDiscoverySpi

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

the class IgniteSqlDistributedJoinSelfTest method getConfiguration.

/**
 * {@inheritDoc}
 */
@Override
protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(gridName);
    cfg.setPeerClassLoadingEnabled(false);
    TcpDiscoverySpi disco = new TcpDiscoverySpi();
    disco.setIpFinder(IP_FINDER);
    cfg.setDiscoverySpi(disco);
    return cfg;
}
Also used : IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) TcpDiscoverySpi(org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi)

Example 58 with TcpDiscoverySpi

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

the class IgniteSqlSkipReducerOnUpdateDmlFlagSelfTest method getConfiguration.

/**
 * {@inheritDoc}
 */
@Override
protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
    IgniteConfiguration c = super.getConfiguration(gridName);
    TcpDiscoverySpi disco = new TcpDiscoverySpi();
    disco.setIpFinder(IP_FINDER);
    c.setDiscoverySpi(disco);
    List<CacheConfiguration> ccfgs = new ArrayList<>();
    ccfgs.add(buildCacheConfiguration(CACHE_ACCOUNT));
    ccfgs.add(buildCacheConfiguration(CACHE_STOCK));
    ccfgs.add(buildCacheConfiguration(CACHE_TRADE));
    ccfgs.add(buildCacheConfiguration(CACHE_REPORT));
    ccfgs.add(buildCacheConfiguration(CACHE_LIST));
    c.setCacheConfiguration(ccfgs.toArray(new CacheConfiguration[ccfgs.size()]));
    if (gridName.equals(NODE_CLIENT))
        c.setClientMode(true);
    return c;
}
Also used : IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) ArrayList(java.util.ArrayList) CacheConfiguration(org.apache.ignite.configuration.CacheConfiguration) TcpDiscoverySpi(org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi)

Example 59 with TcpDiscoverySpi

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

the class GridOrderedMessageCancelSelfTest method getConfiguration.

/**
 * {@inheritDoc}
 */
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
    CacheConfiguration cache = defaultCacheConfiguration();
    cache.setCacheMode(PARTITIONED);
    cache.setRebalanceMode(NONE);
    cfg.setCacheConfiguration(cache);
    cfg.setCommunicationSpi(new CommunicationSpi());
    TcpDiscoverySpi disco = new TcpDiscoverySpi();
    disco.setIpFinder(IP_FINDER);
    cfg.setDiscoverySpi(disco);
    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 60 with TcpDiscoverySpi

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

the class GridFactorySelfTest method getConfiguration.

/**
 * {@inheritDoc}
 */
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
    ((TcpDiscoverySpi) cfg.getDiscoverySpi()).setIpFinder(IP_FINDER);
    return cfg;
}
Also used : IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) 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