use of org.apache.ignite.configuration.ConnectorConfiguration in project ignite by apache.
the class ClientTcpConnectivitySelfTest method startRestNode.
/** {@inheritDoc} */
@Override
protected Ignite startRestNode(String name, @Nullable String addr, @Nullable Integer port) throws Exception {
IgniteConfiguration cfg = getConfiguration(name);
assert cfg.getConnectorConfiguration() == null;
ConnectorConfiguration clientCfg = new ConnectorConfiguration();
if (addr != null)
clientCfg.setHost(addr);
if (port != null)
clientCfg.setPort(port);
cfg.setConnectorConfiguration(clientCfg);
return G.start(cfg);
}
use of org.apache.ignite.configuration.ConnectorConfiguration in project ignite by apache.
the class JdbcComplexQuerySelfTest method getConfiguration.
/** {@inheritDoc} */
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
cfg.setCacheConfiguration(cacheConfiguration("pers", AffinityKey.class, Person.class), cacheConfiguration("org", String.class, Organization.class));
TcpDiscoverySpi disco = new TcpDiscoverySpi();
disco.setIpFinder(IP_FINDER);
cfg.setDiscoverySpi(disco);
cfg.setConnectorConfiguration(new ConnectorConfiguration());
return cfg;
}
use of org.apache.ignite.configuration.ConnectorConfiguration in project ignite by apache.
the class JdbcStreamingSelfTest method getConfiguration0.
/**
* @param gridName Grid name.
* @return Grid configuration used for starting the grid.
* @throws Exception If failed.
*/
private IgniteConfiguration getConfiguration0(String gridName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(gridName);
CacheConfiguration<?, ?> cache = defaultCacheConfiguration();
cache.setCacheMode(PARTITIONED);
cache.setBackups(1);
cache.setWriteSynchronizationMode(FULL_SYNC);
cache.setIndexedTypes(Integer.class, Integer.class);
cfg.setCacheConfiguration(cache);
cfg.setLocalHost("127.0.0.1");
TcpDiscoverySpi disco = new TcpDiscoverySpi();
TcpDiscoveryVmIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
ipFinder.setAddresses(Collections.singleton("127.0.0.1:47500..47501"));
disco.setIpFinder(ipFinder);
cfg.setDiscoverySpi(disco);
cfg.setConnectorConfiguration(new ConnectorConfiguration());
return cfg;
}
use of org.apache.ignite.configuration.ConnectorConfiguration in project ignite by apache.
the class RedisProtocolSelfTest method getConfiguration.
/** {@inheritDoc} */
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
cfg.setLocalHost(HOST);
assert cfg.getConnectorConfiguration() == null;
ConnectorConfiguration redisCfg = new ConnectorConfiguration();
redisCfg.setHost(HOST);
redisCfg.setPort(PORT);
cfg.setConnectorConfiguration(redisCfg);
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;
}
use of org.apache.ignite.configuration.ConnectorConfiguration in project ignite by apache.
the class AbstractJdbcPojoQuerySelfTest method getConfiguration.
/** {@inheritDoc} */
@Override
protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
GridTestProperties.setProperty(GridTestProperties.MARSH_CLASS_NAME, BinaryMarshaller.class.getName());
IgniteConfiguration cfg = super.getConfiguration(gridName);
CacheConfiguration<?, ?> cache = defaultCacheConfiguration();
cache.setWriteSynchronizationMode(FULL_SYNC);
cache.setAtomicityMode(TRANSACTIONAL);
TcpDiscoverySpi disco = new TcpDiscoverySpi();
disco.setIpFinder(IP_FINDER);
cfg.setDiscoverySpi(disco);
cfg.setConnectorConfiguration(new ConnectorConfiguration());
QueryEntity queryEntity = new QueryEntity();
queryEntity.setKeyType("java.lang.String");
queryEntity.setValueType("org.apache.ignite.internal.JdbcTestObject");
queryEntity.addQueryField("id", "java.lang.Integer", null);
queryEntity.addQueryField("testObject", "org.apache.ignite.internal.JdbcTestObject2", null);
queryEntity.setIndexes(Collections.singletonList(new QueryIndex("id")));
cache.setQueryEntities(Collections.singletonList(queryEntity));
cfg.setCacheConfiguration(cache);
return cfg;
}
Aggregations