You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by agura <ag...@apache.org> on 2017/05/09 14:56:24 UTC

Re: How to execute ignite jdbc query on specific node

Hi,

Please properly subscribe to the mailing list so that the community can
receive email notifications for your messages. To subscribe, send empty
email to user-subscribe@ignite.apache.org and follow simple instructions in
the reply.

If I understand your question correctly you want to execute query using key
that we used previously to insert data. Am I right? If yes then you should
have configured indexing using query entities [1] for required fields and
use regular SQL query to request value by this key.

[1]
https://apacheignite.readme.io/docs/indexes#queryentity-based-configuration



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/How-to-execute-ignite-jdbc-query-on-specific-node-tp12562p12563.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: How to execute ignite jdbc query on specific node

Posted by Andrey Gura <ag...@apache.org>.
Ok, it means that only sub-queries will be executed by affinity on
collocated data.
So answer to your question is no, it is impossible to execute query on
one node at this moment.


On Tue, May 9, 2017 at 7:45 PM, Ajay <aj...@6dtech.co.in> wrote:
> I tried with
> jdbc:ignite:cfg://cache=persons:collocated=true@file:///dir/ignite_client_config.xml
> but still  query executed on both servers.
>
>
>
> --
> View this message in context: http://apache-ignite-users.70518.x6.nabble.com/How-to-execute-ignite-jdbc-query-on-specific-node-tp12562p12571.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: How to execute ignite jdbc query on specific node

Posted by Ajay <aj...@6dtech.co.in>.
I tried with
jdbc:ignite:cfg://cache=persons:collocated=true@file:///dir/ignite_client_config.xml
but still  query executed on both servers.



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/How-to-execute-ignite-jdbc-query-on-specific-node-tp12562p12571.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: How to execute ignite jdbc query on specific node

Posted by Andrey Gura <ag...@apache.org>.
You can try to add "collocated=true" parameter to your JDBC connection
string. But it will affect all queries that will be executed via your
JDBC connection.

On Tue, May 9, 2017 at 7:25 PM, Ajay <aj...@6dtech.co.in> wrote:
> Hi
>
> Thanks quick reply,i did subscription.
>
> Coming to question:
>
> I loaded data using affinity key, so all keys with the same affinityKey will
> store in same node right? If yes now i want to select specific key, i
> observed in logs query was executed in both servers.If data reside in single
> node why query executed in both servers, is there any way to  execute query
> on data reside node  instead of all nodes.
>
>
>
>
>
> --
> View this message in context: http://apache-ignite-users.70518.x6.nabble.com/How-to-execute-ignite-jdbc-query-on-specific-node-tp12562p12567.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: How to execute ignite jdbc query on specific node

Posted by Ajay <aj...@6dtech.co.in>.
Hi 

Thanks quick reply,i did subscription.

Coming to question:

I loaded data using affinity key, so all keys with the same affinityKey will
store in same node right? If yes now i want to select specific key, i
observed in logs query was executed in both servers.If data reside in single
node why query executed in both servers, is there any way to  execute query
on data reside node  instead of all nodes.





--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/How-to-execute-ignite-jdbc-query-on-specific-node-tp12562p12567.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.