Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id C72A0200BF3 for ; Thu, 5 Jan 2017 12:21:19 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id C5C04160B27; Thu, 5 Jan 2017 11:21:19 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E9CBF160B26 for ; Thu, 5 Jan 2017 12:21:18 +0100 (CET) Received: (qmail 49059 invoked by uid 500); 5 Jan 2017 11:21:18 -0000 Mailing-List: contact user-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@ignite.apache.org Delivered-To: mailing list user@ignite.apache.org Received: (qmail 49050 invoked by uid 99); 5 Jan 2017 11:21:18 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Jan 2017 11:21:18 +0000 Received: from mail-io0-f172.google.com (mail-io0-f172.google.com [209.85.223.172]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id D2B431A012C for ; Thu, 5 Jan 2017 11:21:17 +0000 (UTC) Received: by mail-io0-f172.google.com with SMTP id p127so30504575iop.3 for ; Thu, 05 Jan 2017 03:21:17 -0800 (PST) X-Gm-Message-State: AIkVDXKrm2TNtyElMV+W9NMBNPS3OD/GDWbbUUiyDHTLfnXU8BennYkdSVWMz7M+EW2Jre6bAdkOsvx5zq3MXyw6 X-Received: by 10.107.175.221 with SMTP id p90mr58699104ioo.80.1483615277258; Thu, 05 Jan 2017 03:21:17 -0800 (PST) MIME-Version: 1.0 Received: by 10.79.155.86 with HTTP; Thu, 5 Jan 2017 03:21:16 -0800 (PST) In-Reply-To: References: <1482862198711-9757.post@n6.nabble.com> From: Nikolai Tikhonov Date: Thu, 5 Jan 2017 14:21:16 +0300 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Affinity To: user@ignite.apache.org Content-Type: multipart/alternative; boundary=001a11445e8695c49b0545571941 archived-at: Thu, 05 Jan 2017 11:21:20 -0000 --001a11445e8695c49b0545571941 Content-Type: text/plain; charset=UTF-8 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 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 >> 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. >>> >> >> > --001a11445e8695c49b0545571941 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Kumar!

1) Collocated doesn't mea= n that query will be execting only one node.
2) Yes, you got inco= rrect results.


On Thu, Jan 5, 2017 at 2:05 PM, Tejashwa Kumar Verma <tejashw= a.verma@gmail.com> wrote:
<= div dir=3D"ltr">
Hi ,

I am loading data by using affinity key. And ignite JDBC conn= ection i am enabling =C2=A0collocated tp true. Now i have some following do= ubts--

<= div>1).Will "Collocated=3Dtrue" = flag give assurance that query will get executed on same node, not in distr= ibuted mode(if data is not collocated )?
2). If data is not collocated and "Collocated" fl= ag is true in Ignite JDBC connection then will i get correct response or no= t?

=
c= ollocated : Flag that is used for optimization purposes. Whenever Ignite ex= ecutes a distributed query, it sends sub-queries to individual cluster memb= ers. If you know in advance that the elements of your query selection are c= ollocated together on the same node, Ignite can make significant performanc= e 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 providin= g all the cache entries.

Person cache -> Affini= tyKey(personId, equivalentid)
PersonDetail cache -> AffinityKe= y(detailId, equivalentid)

both caches joined on eq= uivalentId and collated is set to true in jdbc url. Did I miss anything ?

i see others also facing the similar issue [1]
<= /div>


Thanks



On 27 D= ecember 2016 at 23:39, vkulichenko <valentin.kulichenko@gmail.= com> wrote:
Anil,

This will work. There is only one rule - everything with the same affinity<= br> key value will be mapped to the same partition, and therefore will reside o= n
the same node.

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Affinity-tp9744p= 9757.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.



--001a11445e8695c49b0545571941--