Search in sources :

Example 71 with TcpDiscoverySpi

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

the class IgniteServiceDynamicCachesSelfTest 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);
    return cfg;
}
Also used : IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) TcpDiscoverySpi(org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi)

Example 72 with TcpDiscoverySpi

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

the class GridCacheDhtLockBackupSelfTest method getConfiguration.

/** {@inheritDoc} */
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
    TcpDiscoverySpi disco = new TcpDiscoverySpi();
    disco.setIpFinder(ipFinder);
    cfg.setDiscoverySpi(disco);
    cfg.setCacheConfiguration(cacheConfiguration());
    cfg.setMarshaller(marsh);
    assert commSpi != null;
    cfg.setCommunicationSpi(commSpi);
    return cfg;
}
Also used : IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) TcpDiscoverySpi(org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi)

Example 73 with TcpDiscoverySpi

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

the class IgniteHadoopFileSystemIpcCacheSelfTest 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);
    FileSystemConfiguration igfsCfg = new FileSystemConfiguration();
    igfsCfg.setName("igfs");
    igfsCfg.setManagementPort(FileSystemConfiguration.DFLT_MGMT_PORT + cnt);
    igfsCfg.setDataCacheConfiguration(dataCacheConfiguration());
    igfsCfg.setMetaCacheConfiguration(metaCacheConfiguration());
    IgfsIpcEndpointConfiguration endpointCfg = new IgfsIpcEndpointConfiguration();
    endpointCfg.setType(IgfsIpcEndpointType.SHMEM);
    endpointCfg.setPort(IpcSharedMemoryServerEndpoint.DFLT_IPC_PORT + cnt);
    igfsCfg.setIpcEndpointConfiguration(endpointCfg);
    // Together with group blocks mapper will yield 64M per node groups.
    igfsCfg.setBlockSize(512 * 1024);
    cfg.setFileSystemConfiguration(igfsCfg);
    cfg.setCacheConfiguration(dataCacheConfiguration());
    cfg.setIncludeEventTypes(EVT_TASK_FAILED, EVT_TASK_FINISHED, EVT_JOB_MAPPED);
    TcpCommunicationSpi commSpi = new TcpCommunicationSpi();
    commSpi.setSharedMemoryPort(-1);
    cfg.setCommunicationSpi(commSpi);
    cnt++;
    return cfg;
}
Also used : IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) IgfsIpcEndpointConfiguration(org.apache.ignite.igfs.IgfsIpcEndpointConfiguration) FileSystemConfiguration(org.apache.ignite.configuration.FileSystemConfiguration) TcpCommunicationSpi(org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi) TcpDiscoverySpi(org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi)

Example 74 with TcpDiscoverySpi

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

the class IgniteCacheJoinPartitionedAndReplicatedCollocationTest method getConfiguration.

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

Example 75 with TcpDiscoverySpi

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

the class IgniteCacheJoinQueryWithAffinityKeyTest method getConfiguration.

/** {@inheritDoc} */
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
    ((TcpDiscoverySpi) cfg.getDiscoverySpi()).setIpFinder(IP_FINDER);
    CacheKeyConfiguration keyCfg = new CacheKeyConfiguration();
    keyCfg.setTypeName(TestKeyWithAffinity.class.getName());
    keyCfg.setAffinityKeyFieldName("affKey");
    cfg.setCacheKeyConfiguration(keyCfg);
    cfg.setClientMode(client);
    return cfg;
}
Also used : CacheKeyConfiguration(org.apache.ignite.cache.CacheKeyConfiguration) IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) TcpDiscoverySpi(org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi)

Aggregations

TcpDiscoverySpi (org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi)650 IgniteConfiguration (org.apache.ignite.configuration.IgniteConfiguration)633 CacheConfiguration (org.apache.ignite.configuration.CacheConfiguration)287 TcpCommunicationSpi (org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi)73 TcpDiscoveryVmIpFinder (org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder)69 NearCacheConfiguration (org.apache.ignite.configuration.NearCacheConfiguration)55 ConnectorConfiguration (org.apache.ignite.configuration.ConnectorConfiguration)36 RendezvousAffinityFunction (org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction)34 FileSystemConfiguration (org.apache.ignite.configuration.FileSystemConfiguration)31 BinaryMarshaller (org.apache.ignite.internal.binary.BinaryMarshaller)31 IgfsGroupDataBlocksKeyMapper (org.apache.ignite.igfs.IgfsGroupDataBlocksKeyMapper)21 ArrayList (java.util.ArrayList)15 Ignite (org.apache.ignite.Ignite)13 BinaryConfiguration (org.apache.ignite.configuration.BinaryConfiguration)11 MemoryConfiguration (org.apache.ignite.configuration.MemoryConfiguration)11 QueryEntity (org.apache.ignite.cache.QueryEntity)10 TestRecordingCommunicationSpi (org.apache.ignite.internal.TestRecordingCommunicationSpi)10 DiscoverySpi (org.apache.ignite.spi.discovery.DiscoverySpi)10 MemoryEventStorageSpi (org.apache.ignite.spi.eventstorage.memory.MemoryEventStorageSpi)10 LruEvictionPolicy (org.apache.ignite.cache.eviction.lru.LruEvictionPolicy)9