Search in sources :

Example 11 with SqlConfiguration

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

the class IgniteCacheDistributedQueryDefaultTimeoutSelfTest method getConfiguration.

/**
 * {@inheritDoc}
 */
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
    CacheConfiguration<Integer, String> ccfg = new CacheConfiguration<>(DEFAULT_CACHE_NAME);
    ccfg.setIndexedTypes(Integer.class, String.class);
    ccfg.setSqlFunctionClasses(GridTestUtils.SqlTestFunctions.class);
    cfg.setCacheConfiguration(ccfg);
    if ("client".equals(igniteInstanceName))
        cfg.setClientMode(true);
    cfg.setSqlConfiguration(new SqlConfiguration().setDefaultQueryTimeout(DEFAULT_QUERY_TIMEOUT));
    return cfg;
}
Also used : SqlConfiguration(org.apache.ignite.configuration.SqlConfiguration) IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) GridTestUtils(org.apache.ignite.testframework.GridTestUtils) CacheConfiguration(org.apache.ignite.configuration.CacheConfiguration)

Aggregations

SqlConfiguration (org.apache.ignite.configuration.SqlConfiguration)11 IgniteConfiguration (org.apache.ignite.configuration.IgniteConfiguration)8 List (java.util.List)4 Test (org.junit.Test)4 ArrayList (java.util.ArrayList)3 Arrays.asList (java.util.Arrays.asList)3 HashSet (java.util.HashSet)3 IgniteEx (org.apache.ignite.internal.IgniteEx)3 CacheConfiguration (org.apache.ignite.configuration.CacheConfiguration)2 AbstractIndexingCommonTest (org.apache.ignite.internal.processors.cache.index.AbstractIndexingCommonTest)2 LinkedHashMap (java.util.LinkedHashMap)1 Set (java.util.Set)1 Collectors.toSet (java.util.stream.Collectors.toSet)1 QueryEntity (org.apache.ignite.cache.QueryEntity)1 QueryIndex (org.apache.ignite.cache.QueryIndex)1 AffinityKey (org.apache.ignite.cache.affinity.AffinityKey)1 ConnectorConfiguration (org.apache.ignite.configuration.ConnectorConfiguration)1 CommandList (org.apache.ignite.internal.commandline.CommandList)1 AbstractExporterSpiTest (org.apache.ignite.internal.metric.AbstractExporterSpiTest)1 AbstractSchemaSelfTest (org.apache.ignite.internal.processors.cache.index.AbstractSchemaSelfTest)1