Ignite 1.0.0 Cache , SQL Query and TypeMetadata

classic Classic list List threaded Threaded
7 messages Options
pgarg pgarg
Reply | Threaded
Open this post in threaded view
|

Ignite 1.0.0 Cache , SQL Query and TypeMetadata

asked by mshah

Noticed that cache configuration has changed between RC3 and 1.0. Specifically, the removal of indexing=true and replaced with TypeMetaData. Questions are as follows:

1) Looking for an example that shows how I can use a Custom Key class with the metadata object. A concrete example would be helpful. Including the SQL Query Example.

2) Why is the configuration split between xml and annotations for SQL indexing in the class. Preference is to do both, all in annotations and all in xml. The split you have is confusing.

3) Can H2 be replaced with a different database, such as Cassendra, and do you see the value in doing that?

-----
This post is migrated from now discontinued Apache Ignite forum at
http://apacheignite.readme.io/v1.0/discuss

pgarg pgarg
Reply | Threaded
Open this post in threaded view
|

Re: Ignite 1.0.0 Cache , SQL Query and TypeMetadata

commented by dmitriy setrakyan

1. Somebody from the community will provide the example.
2. The configuration is not split between the two. It's either or. You should pick the one that is most convenient to you.
2. H2 is used internally for SQL parsing and creating execution plans and should not be replaced. I think you are looking for writing-through to a persistent store. This is done through the CacheStore API. You can definitely plugin Cassandra implementation for it. More information on CacheStore is available in Persistent Store section of the documentation.

-----
This post is migrated from now discontinued Apache Ignite forum at
http://apacheignite.readme.io/v1.0/discuss

pgarg pgarg
Reply | Threaded
Open this post in threaded view
|

Re: Ignite 1.0.0 Cache , SQL Query and TypeMetadata

commented by dmitriy setrakyan

Also, I recommend downloading GridGain Community Edition based on Ignite. It includes all the LGPL dependencies and also some fixes to the type-metadata configuration and query parsing (these fixes will be released in the Apache Ignite 1.1 release).

-----
This post is migrated from now discontinued Apache Ignite forum at
http://apacheignite.readme.io/v1.0/discuss

pgarg pgarg
Reply | Threaded
Open this post in threaded view
|

Re: Ignite 1.0.0 Cache , SQL Query and TypeMetadata

commented by mshah

Dmitriy:
1) Can you point me to an example that uses annotations for the typemetadata? I looked at all the examples, and they all have type metadata as either xml or specified as Java but none with pure annotations.
2) I've updated my application, which was working in RC3 to 1.0 release and specified the typemetadata in XML but keep getting the following: javax.cache.CacheException: Failed to find SQL table for type: UUID

-----
This post is migrated from now discontinued Apache Ignite forum at
http://apacheignite.readme.io/v1.0/discuss

pgarg pgarg
Reply | Threaded
Open this post in threaded view
|

Re: Ignite 1.0.0 Cache , SQL Query and TypeMetadata

commented by mshah

I should also add, that I'v taken my app and modified it to use Java API to specify the type annotations and I still get: javax.cache.CacheException: Failed to find SQL table for type: UUID

-----
This post is migrated from now discontinued Apache Ignite forum at
http://apacheignite.readme.io/v1.0/discuss

pgarg pgarg
Reply | Threaded
Open this post in threaded view
|

Re: Ignite 1.0.0 Cache , SQL Query and TypeMetadata

commented by dmitriy setrakyan

Can you please post a code snippet of how you configure and use queries?

-----
This post is migrated from now discontinued Apache Ignite forum at
http://apacheignite.readme.io/v1.0/discuss

pgarg pgarg
Reply | Threaded
Open this post in threaded view
|

Re: Ignite 1.0.0 Cache , SQL Query and TypeMetadata

commented by alexey kuznetsov

Hi! I've updated online documentation. Check http://apacheignite.readme.io/v1.0/docs/cache-queries#query-configuration-by-cachetypemetadata

And also I created example: http://pastebin.com/MjE3n23h

This example will be available in next upcoming release.

-----
This post is migrated from now discontinued Apache Ignite forum at
http://apacheignite.readme.io/v1.0/discuss