Hi,
Your XML configuration doesn't contain indexing configuration so you can't
query data from cache. Just add indexing configuration to your cache
configuration 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"/>
<property name="indexedTypes">
<list>
<value>java.lang.Stringvalue>
<value>java.lang.String</value>
</list>
</property>
</bean>
</list>
</property>
It should work.
About configuration programmatically. I need all code in order to detect
problem.
On Sat, Nov 12, 2016 at 4:16 PM, austin solomon <[email protected]
> wrote:
> 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.
>