Search in sources :

Example 41 with ConnectorConfiguration

use of org.apache.ignite.configuration.ConnectorConfiguration in project ignite by apache.

the class JdbcPreparedStatementSelfTest method getConfiguration.

/**
 * {@inheritDoc}
 */
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
    CacheConfiguration<?, ?> cache = defaultCacheConfiguration();
    cache.setCacheMode(PARTITIONED);
    cache.setBackups(1);
    cache.setWriteSynchronizationMode(FULL_SYNC);
    cache.setIndexedTypes(Integer.class, TestObject.class);
    cfg.setCacheConfiguration(cache);
    TcpDiscoverySpi disco = new TcpDiscoverySpi();
    disco.setIpFinder(IP_FINDER);
    cfg.setDiscoverySpi(disco);
    cfg.setConnectorConfiguration(new ConnectorConfiguration());
    return cfg;
}
Also used : IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) ConnectorConfiguration(org.apache.ignite.configuration.ConnectorConfiguration) TcpDiscoverySpi(org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi)

Example 42 with ConnectorConfiguration

use of org.apache.ignite.configuration.ConnectorConfiguration in project ignite by apache.

the class JdbcStatementSelfTest method getConfiguration.

/**
 * {@inheritDoc}
 */
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
    CacheConfiguration<?, ?> cache = defaultCacheConfiguration();
    cache.setCacheMode(PARTITIONED);
    cache.setBackups(1);
    cache.setWriteSynchronizationMode(FULL_SYNC);
    cache.setIndexedTypes(String.class, Person.class);
    cfg.setCacheConfiguration(cache);
    TcpDiscoverySpi disco = new TcpDiscoverySpi();
    disco.setIpFinder(IP_FINDER);
    cfg.setDiscoverySpi(disco);
    cfg.setConnectorConfiguration(new ConnectorConfiguration());
    return cfg;
}
Also used : IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) ConnectorConfiguration(org.apache.ignite.configuration.ConnectorConfiguration) TcpDiscoverySpi(org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi)

Example 43 with ConnectorConfiguration

use of org.apache.ignite.configuration.ConnectorConfiguration in project ignite by apache.

the class AbstractRestProcessorSelfTest method getConfiguration.

/**
 * {@inheritDoc}
 */
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
    cfg.setLocalHost(LOC_HOST);
    assert cfg.getConnectorConfiguration() == null;
    ConnectorConfiguration clientCfg = new ConnectorConfiguration();
    clientCfg.setJettyPath("modules/clients/src/test/resources/jetty/rest-jetty.xml");
    clientCfg.setIdleQueryCursorTimeout(5000);
    clientCfg.setIdleQueryCursorCheckFrequency(5000);
    cfg.setConnectorConfiguration(clientCfg);
    TcpDiscoverySpi disco = new TcpDiscoverySpi();
    disco.setIpFinder(IP_FINDER);
    cfg.setDiscoverySpi(disco);
    CacheConfiguration ccfg = defaultCacheConfiguration();
    ccfg.setStatisticsEnabled(true);
    ccfg.setIndexedTypes(String.class, String.class);
    cfg.setCacheConfiguration(ccfg);
    return cfg;
}
Also used : IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) ConnectorConfiguration(org.apache.ignite.configuration.ConnectorConfiguration) CacheConfiguration(org.apache.ignite.configuration.CacheConfiguration) TcpDiscoverySpi(org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi)

Example 44 with ConnectorConfiguration

use of org.apache.ignite.configuration.ConnectorConfiguration in project ignite by apache.

the class ChangeStateCommandHandlerTest method getConfiguration.

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

Example 45 with ConnectorConfiguration

use of org.apache.ignite.configuration.ConnectorConfiguration in project ignite by apache.

the class IgnitePdsCorruptedStoreTest method getConfiguration.

/**
 * {@inheritDoc}
 */
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
    cfg.setConnectorConfiguration(new ConnectorConfiguration());
    cfg.setConsistentId(igniteInstanceName);
    DataStorageConfiguration memCfg = new DataStorageConfiguration().setDefaultDataRegionConfiguration(new DataRegionConfiguration().setMaxSize(100 * 1024 * 1024).setPersistenceEnabled(true));
    cfg.setDataStorageConfiguration(memCfg);
    cfg.setCacheConfiguration(cacheConfiguration(CACHE_NAME1), cacheConfiguration(CACHE_NAME2));
    return cfg;
}
Also used : DataStorageConfiguration(org.apache.ignite.configuration.DataStorageConfiguration) DataRegionConfiguration(org.apache.ignite.configuration.DataRegionConfiguration) IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) ConnectorConfiguration(org.apache.ignite.configuration.ConnectorConfiguration)

Aggregations

ConnectorConfiguration (org.apache.ignite.configuration.ConnectorConfiguration)55 IgniteConfiguration (org.apache.ignite.configuration.IgniteConfiguration)50 TcpDiscoverySpi (org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi)41 CacheConfiguration (org.apache.ignite.configuration.CacheConfiguration)12 TcpDiscoveryVmIpFinder (org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder)8 DataStorageConfiguration (org.apache.ignite.configuration.DataStorageConfiguration)3 QueryEntity (org.apache.ignite.cache.QueryEntity)2 QueryIndex (org.apache.ignite.cache.QueryIndex)2 AffinityKey (org.apache.ignite.cache.affinity.AffinityKey)2 BinaryConfiguration (org.apache.ignite.configuration.BinaryConfiguration)2 DataRegionConfiguration (org.apache.ignite.configuration.DataRegionConfiguration)2 GridSslContextFactory (org.apache.ignite.internal.client.ssl.GridSslContextFactory)2 TcpCommunicationSpi (org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi)2 IOException (java.io.IOException)1 HashSet (java.util.HashSet)1 LinkedHashMap (java.util.LinkedHashMap)1 SSLContext (javax.net.ssl.SSLContext)1 SSLException (javax.net.ssl.SSLException)1 BinaryTypeConfiguration (org.apache.ignite.binary.BinaryTypeConfiguration)1 LruEvictionPolicy (org.apache.ignite.cache.eviction.lru.LruEvictionPolicy)1