当前位置: 首页>>代码示例>>Java>>正文


Java IgniteConfiguration.setOdbcConfiguration方法代码示例

本文整理汇总了Java中org.apache.ignite.configuration.IgniteConfiguration.setOdbcConfiguration方法的典型用法代码示例。如果您正苦于以下问题:Java IgniteConfiguration.setOdbcConfiguration方法的具体用法?Java IgniteConfiguration.setOdbcConfiguration怎么用?Java IgniteConfiguration.setOdbcConfiguration使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.ignite.configuration.IgniteConfiguration的用法示例。


在下文中一共展示了IgniteConfiguration.setOdbcConfiguration方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testIgnoreOdbcAndSqlWhenClientSet

import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/**
 * Test SQL connector conversion.
 *
 * @throws Exception If failed.
 */
public void testIgnoreOdbcAndSqlWhenClientSet() throws Exception {
    int cliPort = ClientConnectorConfiguration.DFLT_PORT - 1;
    int sqlPort = ClientConnectorConfiguration.DFLT_PORT - 2;
    int odbcPort = ClientConnectorConfiguration.DFLT_PORT - 3;

    IgniteConfiguration cfg = baseConfiguration();

    cfg.setClientConnectorConfiguration(new ClientConnectorConfiguration().setPort(cliPort));
    cfg.setSqlConnectorConfiguration(new SqlConnectorConfiguration().setPort(sqlPort));
    cfg.setOdbcConfiguration(new OdbcConfiguration().setEndpointAddress("127.0.0.1:" + odbcPort));

    Ignition.start(cfg);

    checkJdbc(null, cliPort);
}
 
开发者ID:apache,项目名称:ignite,代码行数:21,代码来源:ClientConnectorConfigurationValidationSelfTest.java

示例2: testIgnoreOdbcWhenClientSet

import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/**
 * Test SQL connector conversion.
 *
 * @throws Exception If failed.
 */
public void testIgnoreOdbcWhenClientSet() throws Exception {
    int cliPort = ClientConnectorConfiguration.DFLT_PORT - 1;
    int odbcPort = ClientConnectorConfiguration.DFLT_PORT - 2;

    IgniteConfiguration cfg = baseConfiguration();

    cfg.setClientConnectorConfiguration(new ClientConnectorConfiguration().setPort(cliPort));
    cfg.setOdbcConfiguration(new OdbcConfiguration().setEndpointAddress("127.0.0.1:" + odbcPort));

    Ignition.start(cfg);

    checkJdbc(null, cliPort);
}
 
开发者ID:apache,项目名称:ignite,代码行数:19,代码来源:ClientConnectorConfigurationValidationSelfTest.java

示例3: check

import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/**
 * Perform check.
 *
 * @param odbcCfg ODBC configuration.
 * @param success Success flag. * @throws Exception If failed.
 */
@SuppressWarnings("ThrowableResultOfMethodCallIgnored")
private void check(OdbcConfiguration odbcCfg, boolean success) throws Exception {
    final IgniteConfiguration cfg = super.getConfiguration();

    cfg.setIgniteInstanceName(OdbcConfigurationValidationSelfTest.class.getName() + "-" +
        NODE_IDX_GEN.incrementAndGet());

    cfg.setLocalHost("127.0.0.1");
    cfg.setOdbcConfiguration(odbcCfg);
    cfg.setMarshaller(new BinaryMarshaller());

    TcpDiscoverySpi spi = new TcpDiscoverySpi();
    spi.setIpFinder(new TcpDiscoveryVmIpFinder(true));

    cfg.setDiscoverySpi(spi);

    if (success)
        startGrid(cfg.getIgniteInstanceName(), cfg);
    else {
        GridTestUtils.assertThrows(log, new Callable<Void>() {
            @Override public Void call() throws Exception {
                startGrid(cfg.getIgniteInstanceName(), cfg);

                return null;
            }
        }, IgniteException.class, null);
    }
}
 
开发者ID:apache,项目名称:ignite,代码行数:35,代码来源:OdbcConfigurationValidationSelfTest.java

示例4: testOdbcConnectorConversion

import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/**
 * Test ODBC connector conversion.
 *
 * @throws Exception If failed.
 */
public void testOdbcConnectorConversion() throws Exception {
    int port = ClientConnectorConfiguration.DFLT_PORT - 1;

    IgniteConfiguration cfg = baseConfiguration();

    cfg.setOdbcConfiguration(new OdbcConfiguration().setEndpointAddress("127.0.0.1:" + port));

    Ignition.start(cfg);

    checkJdbc(null, port);
}
 
开发者ID:apache,项目名称:ignite,代码行数:17,代码来源:ClientConnectorConfigurationValidationSelfTest.java

示例5: testIgnoreOdbcWhenSqlSet

import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/**
 * Test SQL connector conversion.
 *
 * @throws Exception If failed.
 */
public void testIgnoreOdbcWhenSqlSet() throws Exception {
    int port = ClientConnectorConfiguration.DFLT_PORT - 1;

    IgniteConfiguration cfg = baseConfiguration();

    cfg.setSqlConnectorConfiguration(new SqlConnectorConfiguration().setPort(port));
    cfg.setOdbcConfiguration(new OdbcConfiguration().setEndpointAddress("127.0.0.1:" + (port - 1)));

    Ignition.start(cfg);

    checkJdbc(null, port);
}
 
开发者ID:apache,项目名称:ignite,代码行数:18,代码来源:ClientConnectorConfigurationValidationSelfTest.java


注:本文中的org.apache.ignite.configuration.IgniteConfiguration.setOdbcConfiguration方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。