Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 94B0710560 for ; Thu, 11 Jul 2013 15:55:22 +0000 (UTC) Received: (qmail 83822 invoked by uid 500); 11 Jul 2013 15:55:20 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 83652 invoked by uid 500); 11 Jul 2013 15:55:19 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 83639 invoked by uid 99); 11 Jul 2013 15:55:18 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Jul 2013 15:55:18 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of haithem.jarraya@struq.com designates 209.85.212.54 as permitted sender) Received: from [209.85.212.54] (HELO mail-vb0-f54.google.com) (209.85.212.54) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Jul 2013 15:55:12 +0000 Received: by mail-vb0-f54.google.com with SMTP id q12so683331vbe.41 for ; Thu, 11 Jul 2013 08:54:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type :x-gm-message-state; bh=dp0MnC6eeuAZzgDzYmlh0TxO8xv45SVRgXtn21x0f0U=; b=JCth9SDKRGq20v71GLrpZ+uq+pvv2bxZIoZmE981F24K5lnKIOC4+GIQ43UbLwjQSn 5OmiIBpBN4dFxlM5wOdtCrpaVLsnMZAfy52rDOT5F78vc9nxXrqxj9xLu2atJCRSHQLS UKNFNTSxm8uXVsAkkQenweO6UdyJV3blLN9edQXNoMwCt/KbNyUg8pBKaFhQ7+Moq4nt cWJ5KV+/q82Z5TpEt5u47AvMgiTQE3/Mk+3/vXqWnXAFC1SVbdN+oIl8t9CVkY1vHLUt wO49cGQ/aDn5azc9OeJMcrU5+OSoslh00pP91kNkS6D/MaTc1sBTgHDTbKl32bEvKwUv vMSQ== MIME-Version: 1.0 X-Received: by 10.220.20.3 with SMTP id d3mr22235967vcb.55.1373558091484; Thu, 11 Jul 2013 08:54:51 -0700 (PDT) Received: by 10.58.49.197 with HTTP; Thu, 11 Jul 2013 08:54:51 -0700 (PDT) Date: Thu, 11 Jul 2013 16:54:51 +0100 Message-ID: Subject: Token Aware Routing: Routing Key Vs Composite Key with vnodes From: Haithem Jarraya To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=001a11c3b6de1f22e304e13e6a20 X-Gm-Message-State: ALoCoQl6J2TofAv11CeuknLIryjUR86wBbdkICEBg+pLnietHdYHc7LWjNo9KnGdU4b8swh7xbjy X-Virus-Checked: Checked by ClamAV on apache.org --001a11c3b6de1f22e304e13e6a20 Content-Type: text/plain; charset=ISO-8859-1 Hi All, I am a bit confused on how the underlying token aware routing is working in the case of composite key. Let's say I have a column family like this USERS( uuid userId, text firstname, text lastname, int age, PRIMARY KEY(userId, firstname, lastname)) My question is do we need to have the values of the userId, firstName and lastName available in the same time to create the token from the composite key, or we can get the right token just by looking at the routing key userId? Looking at the datastax driver code, is a bit confusing, it seems that it calculate the token only when all the values of a composite key is available, or I am missing something? Thanks, Haithem --001a11c3b6de1f22e304e13e6a20 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi All,

I am a bit confused on ho= w the underlying token aware routing is working in the case of composite ke= y.
Let's say I have a column family like this USERS( uu= id userId, text firstname, text lastname, int age, PRIMARY KEY(userId, firs= tname, lastname))

My question is do we need to have the value= s of the userId, firstName and lastName available in the same time to creat= e the token from the composite key, or we can get the right token just by l= ooking at the routing key userId?

Looking at the datastax driver code, is a b= it confusing, it seems that it calculate the token only when all the values= of a composite key is available, or I am missing something?

Thanks,

Haithem

--001a11c3b6de1f22e304e13e6a20--