ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nikolai Tikhonov <ntikho...@apache.org>
Subject Re: Affinity
Date Thu, 05 Jan 2017 11:21:16 GMT
Hi Kumar!

1) Collocated doesn't mean that query will be execting only one node.
2) Yes, you got incorrect results.

See the following page:
http://apacheignite.gridgain.org/docs/sql-queries#section-distributed-joins

On Thu, Jan 5, 2017 at 2:05 PM, Tejashwa Kumar Verma <
tejashwa.verma@gmail.com> wrote:

> Hi ,
>
> I am loading data by using affinity key. And ignite JDBC connection i am
> enabling  collocated tp true. Now i have some following doubts--
>
> 1).Will "Collocated=true" flag give assurance that query will get executed
> on same node, not in distributed mode(if data is not collocated )?
> 2). If data is not collocated and "Collocated" flag is true in Ignite JDBC
> connection then will i get correct response or not?
>
>
> Some reference form : http://apacheignite.gridgain.org/docs/jdbc-driver
> collocated : Flag that is used for optimization purposes. Whenever Ignite
> executes a distributed query, it sends sub-queries to individual cluster
> members. If you know in advance that the elements of your query selection
> are collocated together on the same node, Ignite can make significant
> performance and network optimizations.
>
>
> Thanks & regards
> Tejas
>
>
>
> On Thu, Dec 29, 2016 at 3:11 PM, Anil <anilklce@gmail.com> wrote:
>
>> Hi Val,
>>
>> I did the same and seems join is not providing all the cache entries.
>>
>> Person cache -> AffinityKey(personId, equivalentid)
>> PersonDetail cache -> AffinityKey(detailId, equivalentid)
>>
>> both caches joined on equivalentId and collated is set to true in jdbc
>> url. Did I miss anything ?
>>
>> i see others also facing the similar issue [1]
>>
>> 1. http://apache-ignite-users.70518.x6.nabble.com/Re-Afinity
>> -Key-td9774.html#a9794
>>
>> Thanks
>>
>>
>>
>> On 27 December 2016 at 23:39, vkulichenko <valentin.kulichenko@gmail.com>
>> wrote:
>>
>>> Anil,
>>>
>>> This will work. There is only one rule - everything with the same
>>> affinity
>>> key value will be mapped to the same partition, and therefore will
>>> reside on
>>> the same node.
>>>
>>> -Val
>>>
>>>
>>>
>>> --
>>> View this message in context: http://apache-ignite-users.705
>>> 18.x6.nabble.com/Affinity-tp9744p9757.html
>>> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>>>
>>
>>
>

Mime
View raw message