Re: ContinuousQuery - SqlFieldsQuery as InitialQuery

2018-03-27 Thread vkulichenko
I actually don't think it relates to initial query, although it definitely guarantees exactly-once for listener updates. Andrew, am I wrong? -Val -- Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: ContinuousQuery - SqlFieldsQuery as InitialQuery

2018-03-27 Thread Andrey Mashenkov
Hi, Continuous query guarantees exactly once delivery [1]. Duplicate events are rejected by cont.query internals. [1] https://apacheignite.readme.io/docs/continuous-queries#section-events-delivery-guarantees On Mon, Mar 26, 2018 at 8:02 PM, au.fp2018 wrote: > Cool thanks for the confirmation >

Re: ContinuousQuery - SqlFieldsQuery as InitialQuery

2018-03-26 Thread au.fp2018
Cool thanks for the confirmation Just curious does the continuous query implementation handle the duplicates? i.e. is the client code shielded from having to deal with duplicates? vkulichenko wrote > This makes sense, and actually that's exactly how initialQuery works. It's > executed after conti

Re: ContinuousQuery - SqlFieldsQuery as InitialQuery

2018-03-25 Thread vkulichenko
This makes sense, and actually that's exactly how initialQuery works. It's executed after continuous query listener is deployed, so nothing is missed, but duplicates are possible. -Val -- Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: ContinuousQuery - SqlFieldsQuery as InitialQuery

2018-03-23 Thread au.fp2018
The way I plan on working around it is by first running the ContinuousQuery and then the SqlFieldsQuery, wait for the results from the SqlFieldsQuery (while caching any updates from the ContinuousQuery). When the SqlFieldsQuery results arrive deal with any duplicates and them proceed with streami

Re: ContinuousQuery - SqlFieldsQuery as InitialQuery

2018-03-23 Thread Pavel Vinokurov
This approach makes sense. I don't see any downside except a case when you put some data in a cache after execution of the SqlFieldsQuery and before ContinuousQuery. 2018-03-22 18:40 GMT+03:00 au.fp2018 : > Thanks Pavel > > I was able to get a Java version of the query client implemented using yo

Re: ContinuousQuery - SqlFieldsQuery as InitialQuery

2018-03-22 Thread au.fp2018
Thanks Pavel I was able to get a Java version of the query client implemented using your suggestions. But I am having a hard time convincing the scala compiler to type check. Even if I get it to work the amount of type coercing I would need to get it to work is extremely hairy. Before your reply

Re: ContinuousQuery - SqlFieldsQuery as InitialQuery

2018-03-22 Thread Pavel Vinokurov
Hi, Yes, continuous queries are only predicate based and could named as "continuous listener", but for an initial query that run once we could use SQLFieldsQuery. Let try with following code: ContinuousQuery q= new ContinuousQuery(); ((ContinuousQuery)q).setInitialQuery(new SqlFieldsQuery("select

Re: ContinuousQuery - SqlFieldsQuery as InitialQuery

2018-03-21 Thread au.fp2018
Thanks for your answer Pavel. But that does not help. 'q' is already a ContinuousQuery am I not sure what good the additional cast does. Anyway I tried that and also explicitly casting the initialQuery, didn't work. As I was suggesting in my first post the types don't line-up. In my search I came

Re: ContinuousQuery - SqlFieldsQuery as InitialQuery

2018-03-20 Thread Vinokurov Pavel
Hello! At the compilation time it is impossible to know result type of the SqlFieldsQuery. So you can try following: ((ContinuousQuery)q).setInitialQuery(new SqlFieldsQuery("select _val from table")); Thanks, Pavel 2018-03-20 20:43 GMT+03:00 au.fp2018 : > Hello All, > > I'm trying to setup a Co

ContinuousQuery - SqlFieldsQuery as InitialQuery

2018-03-20 Thread au.fp2018
Hello All, I'm trying to setup a ContinuousQuery to retrieve _VAL objects from the cache. So I tried using the SqlQuery but unfortunately I get the following error: Only queries starting with 'SELECT *' and 'SELECT alias.*' are supported (rewrite your query or use SqlFieldsQuery instead)