Search in sources :

Example 51 with TcpDiscoverySpi

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

the class GridServiceClientNodeTest method getConfiguration.

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

Example 52 with TcpDiscoverySpi

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

the class GridServiceProcessorAbstractSelfTest 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);
    ServiceConfiguration[] svcs = services();
    if (svcs != null)
        c.setServiceConfiguration(svcs);
    CacheConfiguration cc = new CacheConfiguration(DEFAULT_CACHE_NAME);
    cc.setName(CACHE_NAME);
    cc.setCacheMode(CacheMode.PARTITIONED);
    cc.setBackups(nodeCount());
    c.setCacheConfiguration(cc);
    return c;
}
Also used : IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) ServiceConfiguration(org.apache.ignite.services.ServiceConfiguration) CacheConfiguration(org.apache.ignite.configuration.CacheConfiguration) TcpDiscoverySpi(org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi)

Example 53 with TcpDiscoverySpi

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

the class ClientConnectorConfigurationValidationSelfTest method baseConfiguration.

/**
 * Get base node configuration.
 *
 * @return Configuration.
 * @throws Exception If failed.
 */
@SuppressWarnings("unchecked")
private IgniteConfiguration baseConfiguration() throws Exception {
    final IgniteConfiguration cfg = super.getConfiguration();
    cfg.setIgniteInstanceName(ClientConnectorConfigurationValidationSelfTest.class.getName() + "-" + NODE_IDX_GEN.incrementAndGet());
    cfg.setLocalHost("127.0.0.1");
    cfg.setMarshaller(new BinaryMarshaller());
    TcpDiscoverySpi spi = new TcpDiscoverySpi();
    spi.setIpFinder(new TcpDiscoveryVmIpFinder(true));
    cfg.setDiscoverySpi(spi);
    CacheConfiguration ccfg = new CacheConfiguration(CACHE_NAME).setIndexedTypes(ClientConnectorKey.class, ClientConnectorValue.class);
    cfg.setCacheConfiguration(ccfg);
    return cfg;
}
Also used : IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) BinaryMarshaller(org.apache.ignite.internal.binary.BinaryMarshaller) TcpDiscoveryVmIpFinder(org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder) CacheConfiguration(org.apache.ignite.configuration.CacheConfiguration) TcpDiscoverySpi(org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi)

Example 54 with TcpDiscoverySpi

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

the class IgnitePersistentStoreQueryWithMultipleClassesPerCacheTest method getConfiguration.

/**
 * {@inheritDoc}
 */
@Override
protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(gridName);
    ((TcpDiscoverySpi) cfg.getDiscoverySpi()).setIpFinder(ipFinder);
    cfg.setCacheConfiguration(cacheCfg(CACHE_NAME));
    DataStorageConfiguration pCfg = new DataStorageConfiguration();
    pCfg.setCheckpointFrequency(1000);
    cfg.setDataStorageConfiguration(pCfg);
    return cfg;
}
Also used : DataStorageConfiguration(org.apache.ignite.configuration.DataStorageConfiguration) IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) TcpDiscoverySpi(org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi)

Example 55 with TcpDiscoverySpi

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

the class GridSpringTransactionManagerSelfTest method getConfiguration.

/**
 * {@inheritDoc}
 */
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
    CacheConfiguration cache = new CacheConfiguration(DEFAULT_CACHE_NAME);
    cache.setName(CACHE_NAME);
    cache.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
    cfg.setCacheConfiguration(cache);
    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)

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