Hi,

I am using Kafka file source connector to fetch the data from csv file and
sinking the data into Ignite's cache, The data has been saved in cache
sucessfully, but when i tried to query the cache I got an error

[SEVERE][odbc-#103%null%][OdbcRequestHandler] Failed to execute SQL query
[reqId=11, req=OdbcQueryExecuteRequest [cacheName=confluentCache,
sqlQry=select * from confluentCache, args=[]]]
javax.cache.CacheException: Indexing is disabled for cache: confluentCache.
Use setIndexedTypes or setTypeMetadata methods on CacheConfiguration to
enable.


My xml configuration is like this 


        <property name="cacheConfiguration">
            <list>
                
                <bean
class="org.apache.ignite.configuration.CacheConfiguration">
                    <property name="cacheMode" value="PARTITIONED"/>
                    <property name="atomicityMode" value="ATOMIC"/>
                    <property name="name" value="confluentCache"/>
                </bean>
            </list>
        </property>

        
        <property name="odbcConfiguration">
            <bean
class="org.apache.ignite.configuration.OdbcConfiguration"></bean>
        </property>

I tried to set the values programatically like this in IgniteSinkTask.java
file :

                cacheName = props.get(IgniteSinkConstants.CACHE_NAME);
                igniteConfigFile = 
props.get(IgniteSinkConstants.CACHE_CFG_PATH);

                CacheConfiguration<Object, Object> cfg = new
CacheConfiguration<>(cacheName);
                cfg.setIndexedTypes(String.class, String.class);

 But no luck, can any one tell me how to setIndexedTypes when data is being
sink to cache.

Thanks,
Austin




--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Failed-to-execute-SQL-from-ODBC-Indexing-is-disabled-for-cache-tp8924.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Reply via email to