You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Tejashwa Kumar Verma <te...@gmail.com> on 2016/12/28 09:12:24 UTC
Re: Afinity Key
Hi,
I have doubt regarding affinity key.
I have 2 cache :
Cache 1 and 2 both should be related with "equipmentID". Hence
"equipmentID" should be affinity key for cache2.
Hence in Cache2 creating affinity key like --new AffinityKey<>(pk, eqID);
now the question is how to relate this with cache1??
Thanks & Regards
Tejas
Re: Afinity Key
Posted by vkulichenko <va...@gmail.com>.
This discussion seems to be a complete duplicate of this one:
http://apache-ignite-users.70518.x6.nabble.com/Affinity-td9744.html. Let's
continue there.
-Val
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Re-Afinity-Key-tp9774p9804.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: Afinity Key
Posted by Tejashwa Kumar Verma <te...@gmail.com>.
Hi ,
Scenario is :
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 ??
Query will be:
SELECT p.*, m.* from person p join PERSONDETAILS_CACHE.PersonDetail m on p.
equivalentId = m.equivalentId;
Regards
Tejas
On Thu, Dec 29, 2016 at 4:44 PM, dkarachentsev <dk...@gridgain.com>
wrote:
> Could you give example of your query? I will try to reproduce.
>
>
>
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/Re-Afinity-Key-tp9774p9799.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>
Re: Afinity Key
Posted by dkarachentsev <dk...@gridgain.com>.
Could you give example of your query? I will try to reproduce.
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Re-Afinity-Key-tp9774p9799.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: Afinity Key
Posted by Tejashwa Kumar Verma <te...@gmail.com>.
Yes sure ,
I have one cache1 with some records and Cache2 with some more records
both cache are related to each other through eqID. I am trying to collocate
both cache by using below code snippet.
cache1.put(new AffinityKey<>(*pk0*, eqID),value1);
cache2.put(new AffinityKey<>(*pk1*, eqID), value2);
After loading both cache . I am executing ignite query and i am not getting
proper data. Some data is missing out in join query.
Thanks & Regards
Tejas
On Thu, Dec 29, 2016 at 1:59 PM, dkarachentsev <dk...@gridgain.com>
wrote:
> Yes, that's right.
>
> Could you, please, describe more detailed what exact problem you faced
> with?
>
>
>
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/Re-Afinity-Key-tp9774p9794.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>
Re: Afinity Key
Posted by dkarachentsev <dk...@gridgain.com>.
Yes, that's right.
Could you, please, describe more detailed what exact problem you faced with?
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Re-Afinity-Key-tp9774p9794.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: Afinity Key
Posted by Tejashwa Kumar Verma <te...@gmail.com>.
Hi,
cache1.put(new AffinityKey<>(*pk0*, eqID),
value2);
cache2.put(new AffinityKey<>(*pk1*, eqID), value2);
If we are using 2 different primary key for eqId then data of cache1 and
cache2 will collocated on the basis of *eqID*
Thanks & regards
Tejas
On Thu, Dec 29, 2016 at 10:25 AM, Tejashwa Kumar Verma <
tejashwa.verma@gmail.com> wrote:
> Hi,
>
> I think this affinity part is working fine, but now i am seeing data
> discrepancy. Do we need to enable 'distributed join' also?
>
>
>
> Thanks & regards
> Tejas
>
> On Wed, Dec 28, 2016 at 5:24 PM, dkarachentsev <dkarachentsev@gridgain.com
> > wrote:
>
>> Duplicates [1]
>>
>> [1] http://apache-ignite-users.70518.x6.nabble.com/Affinity-Key-
>> td9772.html
>>
>>
>>
>> --
>> View this message in context: http://apache-ignite-users.705
>> 18.x6.nabble.com/Re-Afinity-Key-tp9774p9778.html
>> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>>
>
>
Re: Afinity Key
Posted by Tejashwa Kumar Verma <te...@gmail.com>.
Hi,
I think this affinity part is working fine, but now i am seeing data
discrepancy. Do we need to enable 'distributed join' also?
Thanks & regards
Tejas
On Wed, Dec 28, 2016 at 5:24 PM, dkarachentsev <dk...@gridgain.com>
wrote:
> Duplicates [1]
>
> [1] http://apache-ignite-users.70518.x6.nabble.com/Affinity-
> Key-td9772.html
>
>
>
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/Re-Afinity-Key-tp9774p9778.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>
Re: Afinity Key
Posted by dkarachentsev <dk...@gridgain.com>.
Duplicates [1]
[1] http://apache-ignite-users.70518.x6.nabble.com/Affinity-Key-td9772.html
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Re-Afinity-Key-tp9774p9778.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.