You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by "Garaude, Benjamin" <Be...@wolterskluwer.com> on 2019/05/21 08:16:47 UTC
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
Re: Issue with CacheQueryReadEvent's queryType
Posted by Ilya Kasnacheev <il...@gmail.com>.
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 <
Benjamin.Garaude@wolterskluwer.com>:
> 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 <il...@gmail.com>
> *Sent:* Wednesday, 22 May 2019 18:24
> *To:* user@ignite.apache.org
> *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 <
> Benjamin.Garaude@wolterskluwer.com>:
>
> 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
> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fbgaraude%2FIgniteTest%2Ftree%2Fmaster%2Fignite-query-event&data=02%7C01%7CBenjamin.Garaude%40wolterskluwer.com%7Cbe19a52b392a4a82e1ab08d6ded1ef28%7C8ac76c91e7f141ffa89c3553b2da2c17%7C0%7C0%7C636941390578265573&sdata=zjXMD%2FltAjAaK89OD%2Bk1E1Vw6cluF1PaCFOW7JWxbxo%3D&reserved=0>
>
>
>
> Am I missing something?
>
>
>
> Benjamin
>
>
RE: Issue with CacheQueryReadEvent's queryType
Posted by "Garaude, Benjamin" <Be...@wolterskluwer.com>.
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 <il...@gmail.com>
Sent: Wednesday, 22 May 2019 18:24
To: user@ignite.apache.org
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 <Be...@wolterskluwer.com>>:
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<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fbgaraude%2FIgniteTest%2Ftree%2Fmaster%2Fignite-query-event&data=02%7C01%7CBenjamin.Garaude%40wolterskluwer.com%7Cbe19a52b392a4a82e1ab08d6ded1ef28%7C8ac76c91e7f141ffa89c3553b2da2c17%7C0%7C0%7C636941390578265573&sdata=zjXMD%2FltAjAaK89OD%2Bk1E1Vw6cluF1PaCFOW7JWxbxo%3D&reserved=0>
Am I missing something?
Benjamin
Re: Issue with CacheQueryReadEvent's queryType
Posted by Ilya Kasnacheev <il...@gmail.com>.
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 <
Benjamin.Garaude@wolterskluwer.com>:
> 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
>