Search in sources :

Example 11 with ClientConnectorConfiguration

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

the class ClientConnectorConfigurationValidationSelfTest method testIgnoreSqlWhenClientSet.

/**
 * Test SQL connector conversion.
 *
 * @throws Exception If failed.
 */
public void testIgnoreSqlWhenClientSet() throws Exception {
    int cliPort = ClientConnectorConfiguration.DFLT_PORT - 1;
    int sqlPort = ClientConnectorConfiguration.DFLT_PORT - 2;
    IgniteConfiguration cfg = baseConfiguration();
    cfg.setClientConnectorConfiguration(new ClientConnectorConfiguration().setPort(cliPort));
    cfg.setSqlConnectorConfiguration(new SqlConnectorConfiguration().setPort(sqlPort));
    Ignition.start(cfg);
    checkJdbc(null, cliPort);
}
Also used : IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) ClientConnectorConfiguration(org.apache.ignite.configuration.ClientConnectorConfiguration) SqlConnectorConfiguration(org.apache.ignite.configuration.SqlConnectorConfiguration)

Example 12 with ClientConnectorConfiguration

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

the class ClientConnectorConfigurationValidationSelfTest method testDefault.

/**
 * Test host.
 *
 * @throws Exception If failed.
 */
public void testDefault() throws Exception {
    check(new ClientConnectorConfiguration(), true);
    checkJdbc(null, ClientConnectorConfiguration.DFLT_PORT);
}
Also used : ClientConnectorConfiguration(org.apache.ignite.configuration.ClientConnectorConfiguration)

Example 13 with ClientConnectorConfiguration

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

the class JdbcThinSelectAfterAlterTable method getConfiguration.

/**
 * {@inheritDoc}
 */
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
    cfg.setCacheConfiguration(cacheConfiguration(DEFAULT_CACHE_NAME));
    TcpDiscoverySpi disco = new TcpDiscoverySpi();
    disco.setIpFinder(IP_FINDER);
    cfg.setDiscoverySpi(disco);
    cfg.setClientConnectorConfiguration(new ClientConnectorConfiguration().setPort(cliPort++));
    return cfg;
}
Also used : IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) ClientConnectorConfiguration(org.apache.ignite.configuration.ClientConnectorConfiguration) TcpDiscoverySpi(org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi)

Aggregations

ClientConnectorConfiguration (org.apache.ignite.configuration.ClientConnectorConfiguration)13 IgniteConfiguration (org.apache.ignite.configuration.IgniteConfiguration)11 TcpDiscoverySpi (org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi)4 OdbcConfiguration (org.apache.ignite.configuration.OdbcConfiguration)3 SqlConnectorConfiguration (org.apache.ignite.configuration.SqlConnectorConfiguration)3 SQLException (java.sql.SQLException)2 IgniteException (org.apache.ignite.IgniteException)2 BinaryMarshaller (org.apache.ignite.internal.binary.BinaryMarshaller)2 InetAddress (java.net.InetAddress)1 LinkedBlockingQueue (java.util.concurrent.LinkedBlockingQueue)1 IgniteCheckedException (org.apache.ignite.IgniteCheckedException)1 CacheConfiguration (org.apache.ignite.configuration.CacheConfiguration)1 HostAndPortRange (org.apache.ignite.internal.util.HostAndPortRange)1 GridNioFilter (org.apache.ignite.internal.util.nio.GridNioFilter)1 TcpCommunicationSpi (org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi)1 IgniteThreadPoolExecutor (org.apache.ignite.thread.IgniteThreadPoolExecutor)1 Nullable (org.jetbrains.annotations.Nullable)1