ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zhaogxd <zhao...@gmail.com>
Subject Re: Cannot query on a cache using Cassandra as a persistent store
Date Fri, 23 Sep 2016 20:10:08 GMT
Hi Val,

You are right! There is no @QuerySqlField on any of the fields in Person
class.

After adding this annotation to the getter of Age field, I was able to query
on the Age field. 

    /** */
    @SuppressWarnings("UnusedDeclaration")
    *@QuerySqlField (name = "age", index = true)*
    public int getAge() {
        return age;
    }

Now I come to another question, hope you can help.

Since I got some data populated into the Cassandra table from Ignite
already, I want to get the data loaded into the cache next time when I start
the ignite node without repopulating it. I tried following codes for this
purpose, then ran a query against cache3, but it always returned empty.  

	    IgniteCache<Long, Person> cache3 = ignite.cache("cache3");			
            cache3.loadCache(null); 

What is the right way to do so?

Thanks!

Guang



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Cannot-query-on-a-cache-using-Cassandra-as-a-persistent-store-tp7870p7915.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Mime
View raw message