Issue with CacheQueryReadEvent's queryType

classic Classic list List threaded Threaded
4 messages Options
Benjamin Benjamin
Reply | Threaded
Open this post in threaded view
|

Issue with CacheQueryReadEvent's queryType

Hello,

 

I'm trying to listen locally events of type EventType.EVT_CACHE_QUERY_OBJECT_READ

 

I enable the events with:

ignite.events().enableLocal(EventType.EVT_CACHE_QUERY_OBJECT_READ);

 

An I then register a local listener with:

ignite.events().localListen(myListenerInstance, EventType.EVT_CACHE_QUERY_OBJECT_READ);

 

It works fine except that when I execute a SqlFieldsQuery on a cache, the event I receive has the property queryType set to SQL and not SQL_FIELDS.

 

I've created a test case reproducing this issue:

https://github.com/bgaraude/IgniteTest/tree/master/ignite-query-event

 

Am I missing something?

 

Benjamin

ilya.kasnacheev ilya.kasnacheev
Reply | Threaded
Open this post in threaded view
|

Re: Issue with CacheQueryReadEvent's queryType

Hello!

It seems that we always report SQL for two-step queries (i.e. ones which are not simply look up by key).

I think you need to live with that, however you can try and file an issue against JIRA. I doubt it will get much traction since everyone seems to be using JDBC anyway.

Regards,
--
Ilya Kasnacheev


вт, 21 мая 2019 г. в 11:17, Garaude, Benjamin <[hidden email]>:

Hello,

 

I'm trying to listen locally events of type EventType.EVT_CACHE_QUERY_OBJECT_READ

 

I enable the events with:

ignite.events().enableLocal(EventType.EVT_CACHE_QUERY_OBJECT_READ);

 

An I then register a local listener with:

ignite.events().localListen(myListenerInstance, EventType.EVT_CACHE_QUERY_OBJECT_READ);

 

It works fine except that when I execute a SqlFieldsQuery on a cache, the event I receive has the property queryType set to SQL and not SQL_FIELDS.

 

I've created a test case reproducing this issue:

https://github.com/bgaraude/IgniteTest/tree/master/ignite-query-event

 

Am I missing something?

 

Benjamin

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

RE: Issue with CacheQueryReadEvent's queryType

Hi,

 

Thanks for your answer, I’ll file an issue and we’ll see.

 

Just one question: when you say “everyone seems to be using JDBC”, you mean they are not using SQLFieldQuery, but plain JDBC queries using the ignite JDBC driver?

Is that approach recommended over SQLFieldQueries?

 

Regards,

 

 

Benjamin GARAUDE

 

 

 

From: Ilya Kasnacheev <[hidden email]>
Sent: Wednesday, 22 May 2019 18:24
To: [hidden email]
Subject: Re: Issue with CacheQueryReadEvent's queryType

 

Hello!

 

It seems that we always report SQL for two-step queries (i.e. ones which are not simply look up by key).

 

I think you need to live with that, however you can try and file an issue against JIRA. I doubt it will get much traction since everyone seems to be using JDBC anyway.

 

Regards,

--

Ilya Kasnacheev

 

 

вт, 21 мая 2019 г. в 11:17, Garaude, Benjamin <[hidden email]>:

Hello,

 

I'm trying to listen locally events of type EventType.EVT_CACHE_QUERY_OBJECT_READ

 

I enable the events with:

ignite.events().enableLocal(EventType.EVT_CACHE_QUERY_OBJECT_READ);

 

An I then register a local listener with:

ignite.events().localListen(myListenerInstance, EventType.EVT_CACHE_QUERY_OBJECT_READ);

 

It works fine except that when I execute a SqlFieldsQuery on a cache, the event I receive has the property queryType set to SQL and not SQL_FIELDS.

 

I've created a test case reproducing this issue:

https://github.com/bgaraude/IgniteTest/tree/master/ignite-query-event

 

Am I missing something?

 

Benjamin

ilya.kasnacheev ilya.kasnacheev
Reply | Threaded
Open this post in threaded view
|

Re: Issue with CacheQueryReadEvent's queryType

Hello!

Yes, using JDBC Thin driver is preferred because a lot of work is happening around it.

Regards,
--
Ilya Kasnacheev


чт, 23 мая 2019 г. в 10:30, Garaude, Benjamin <[hidden email]>:

Hi,

 

Thanks for your answer, I’ll file an issue and we’ll see.

 

Just one question: when you say “everyone seems to be using JDBC”, you mean they are not using SQLFieldQuery, but plain JDBC queries using the ignite JDBC driver?

Is that approach recommended over SQLFieldQueries?

 

Regards,

 

 

Benjamin GARAUDE

 

 

 

From: Ilya Kasnacheev <[hidden email]>
Sent: Wednesday, 22 May 2019 18:24
To: [hidden email]
Subject: Re: Issue with CacheQueryReadEvent's queryType

 

Hello!

 

It seems that we always report SQL for two-step queries (i.e. ones which are not simply look up by key).

 

I think you need to live with that, however you can try and file an issue against JIRA. I doubt it will get much traction since everyone seems to be using JDBC anyway.

 

Regards,

--

Ilya Kasnacheev

 

 

вт, 21 мая 2019 г. в 11:17, Garaude, Benjamin <[hidden email]>:

Hello,

 

I'm trying to listen locally events of type EventType.EVT_CACHE_QUERY_OBJECT_READ

 

I enable the events with:

ignite.events().enableLocal(EventType.EVT_CACHE_QUERY_OBJECT_READ);

 

An I then register a local listener with:

ignite.events().localListen(myListenerInstance, EventType.EVT_CACHE_QUERY_OBJECT_READ);

 

It works fine except that when I execute a SqlFieldsQuery on a cache, the event I receive has the property queryType set to SQL and not SQL_FIELDS.

 

I've created a test case reproducing this issue:

https://github.com/bgaraude/IgniteTest/tree/master/ignite-query-event

 

Am I missing something?

 

Benjamin