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 85EEA200B3C for ; Wed, 13 Jul 2016 16:19:23 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 84728160A6A; Wed, 13 Jul 2016 14:19:23 +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 A549E160A62 for ; Wed, 13 Jul 2016 16:19:22 +0200 (CEST) Received: (qmail 90096 invoked by uid 500); 13 Jul 2016 14:19:21 -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 90085 invoked by uid 99); 13 Jul 2016 14:19:21 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Jul 2016 14:19:21 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 6390D1A5DD5 for ; Wed, 13 Jul 2016 14:19:21 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.879 X-Spam-Level: * X-Spam-Status: No, score=1.879 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id RlKEr3qCkfOr for ; Wed, 13 Jul 2016 14:19:18 +0000 (UTC) Received: from mail-yw0-f182.google.com (mail-yw0-f182.google.com [209.85.161.182]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id B802E5F1E5 for ; Wed, 13 Jul 2016 14:19:17 +0000 (UTC) Received: by mail-yw0-f182.google.com with SMTP id l125so44289330ywb.2 for ; Wed, 13 Jul 2016 07:19:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=P2LB7WjYnUvlBreZ0I/itfA4BOOfvFcJjc4t3g1wdSo=; b=JsfrxMsQYJhG35Qc1qBjlVUWgamCNKE3po8h4+YYDIYpQU3zW8YLE1qJbhEBMBM5AB q8ZJeYuy+IzGkol0umaawMHgK6PRHqCcIcGZPaGub/IDx1Z3dJwoTidldJFhKHhSkUqO GmdnXgovN2V7MJIUq0Wn6+kSxzP8T53YMaPfCLvV0eJUIyfzoUcJ291aEk7s85Ln/6D0 3AOrr8f86K5GBl57NmF0E9n3jl+x97QJFXKuyQP575q2EPwYCppYL5U/lvQZwtX/+j5s FSPKt4Lh5J6/5+Typ/vaJ4ie1rTjoZrDlc5+iZ5iPP2bSp78vA14ANLyw37h1gLIRiW7 scAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=P2LB7WjYnUvlBreZ0I/itfA4BOOfvFcJjc4t3g1wdSo=; b=H8wXKOqrguYw3A9vFVYouc+VF5XWIZBcv/lOma3vAqtzIlc6BaPd/d+/zXQKz6numP dP376EmspeTXAjZYOYTMfzbqhjmtoY05ix294o7h4mp/ZmQx+ya3AVBOD7SXRKdSHkv6 Y53tz3xD2Y8S119ehbRauTCvucISH54YC2HFh/Z+5zoryziOXCwWECz1uto5N3jp3/R8 gfMQjfSiLM0NhgH+WhdHHR+IurPG8hNvPQ8x4Th+1KDtHvaqHziKV7Zv3CjsCamB1zh9 9mb2Mo+3j4oNp5PZIMZnr+YlgCBuYEaHZdEK9angEd9plQZu6OBPy69LjfpP8VkMD/+z 0N+Q== X-Gm-Message-State: ALyK8tKnUL6uQE8Dnv06Xv8eoPXJtGOsllx3ihD3LRP5LePO6PJpwvHjeOPqedYAVD8R0ujqCiGDJQDx3xFHxQ== X-Received: by 10.37.96.7 with SMTP id u7mr5621674ybb.81.1468419556586; Wed, 13 Jul 2016 07:19:16 -0700 (PDT) MIME-Version: 1.0 Received: by 10.37.230.214 with HTTP; Wed, 13 Jul 2016 07:19:16 -0700 (PDT) In-Reply-To: <1468417724460-6275.post@n6.nabble.com> References: <1468400302892-6260.post@n6.nabble.com> <1468417724460-6275.post@n6.nabble.com> From: Vladislav Pyatkov Date: Wed, 13 Jul 2016 17:19:16 +0300 Message-ID: Subject: Re: How does AffinityKey mapped? To: user@ignite.apache.org Content-Type: multipart/alternative; boundary=001a1143e0c00d3e0c05378512bf archived-at: Wed, 13 Jul 2016 14:19:23 -0000 --001a1143e0c00d3e0c05378512bf Content-Type: text/plain; charset=UTF-8 Hello, You can to use both key with affinity part. For example: public class cache1Key { private int uniqueId1; @AffinityKeyMapped private int DEV_LV; } public class cache2Key { private int uniqueId2; @AffinityKeyMapped private int DEV_LV; } On Wed, Jul 13, 2016 at 4:48 PM, November wrote: > Thanks for reply > > I have another question. There are two tables. > > CREATE TABLE T1 > ( LAT_ID SMALLINT, > DEV_ID VARCHAR(20), > DEV_LV SMALLINT > ); > > CREATE TABLE T2 > ( THE_DATE DATE, > DEV_ID VARCHAR(20), > DEV_LV SMALLINT > ); > > SQL query: > SELECT t1.* from t1, t2 where t2.DEV_LV = t1.DEV_LV > > I use cache1 and cache2 (use > DEV_LV as key) to store it. > > public class cache1Key { > private int DEV_LV; > > /** Organization ID. */ > @AffinityKeyMapped > private int cache2_DEV_LV; > } > > What if there are repeat DEV_LV in both tables(but the cache's key need to > be unique) ? Is there any other way to achieve collocate using > @AffinityKeyMapped? > > > > -- > View this message in context: > http://apache-ignite-users.70518.x6.nabble.com/How-does-AffinityKey-mapped-tp6260p6275.html > Sent from the Apache Ignite Users mailing list archive at Nabble.com. > -- Vladislav Pyatkov --001a1143e0c00d3e0c05378512bf Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hello,

You can to use both key wit= h affinity part.

For example:

=
public class cache1Key {
=C2=A0 =C2=A0 private int uniqueId1= ;

=C2=A0 =C2=A0 @AffinityKeyMapped
=C2= =A0 =C2=A0 private int DEV_LV;
}

public = class cache2Key {
=C2=A0 =C2=A0 private int uniqueId2;
=
=C2=A0 =C2=A0 @AffinityKeyMapped
=C2=A0 =C2=A0 pri= vate int DEV_LV;
}
On Wed, Jul 13, 2016 at 4:48 PM, November <y= ufeng7144@126.com> wrote:
T= hanks for reply

I have another question. There are two tables.

CREATE TABLE=C2=A0 T1
=C2=A0( LAT_ID=C2=A0 =C2=A0 =C2=A0 =C2=A0 SMALLINT,
=C2=A0 =C2=A0DEV_ID=C2=A0 =C2=A0 VARCHAR(20),
=C2=A0 =C2=A0DEV_LV=C2=A0 =C2=A0 SMALLINT
=C2=A0);

=C2=A0 CREATE TABLE=C2=A0 T2
=C2=A0( THE_DATE=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 DATE,
=C2=A0 =C2=A0DEV_ID=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0VARCHAR(20), =C2=A0 =C2=A0DEV_LV=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 SMALLINT
=C2=A0);

=C2=A0SQL query:
SELECT t1.* from t1, t2 where t2.DEV_LV =3D t1.DEV_LV

I use cache1<cache1Key, cache1Value> and cache2<Integer, cache2Val= ue> (use
DEV_LV as key) to store it.

public class cache1Key {
=C2=A0 =C2=A0 private int DEV_LV;

=C2=A0 =C2=A0 /** Organization ID. */
=C2=A0 =C2=A0 @AffinityKeyMapped
=C2=A0 =C2=A0 private int cache2_DEV_LV;
}

What if there are repeat DEV_LV in both tables(but the cache's key need= to
be unique) ? Is there any other way to achieve collocate using
@AffinityKeyMapped?



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/How-doe= s-AffinityKey-mapped-tp6260p6275.html
Sent from the Apache Ignite Users m= ailing list archive at Nabble.com.



--
=
Vladislav= Pyatkov
--001a1143e0c00d3e0c05378512bf--