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 8C55BD3D9 for ; Wed, 3 Oct 2012 14:20:40 +0000 (UTC) Received: (qmail 35532 invoked by uid 500); 3 Oct 2012 14:20:38 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 35501 invoked by uid 500); 3 Oct 2012 14:20:38 -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 35493 invoked by uid 99); 3 Oct 2012 14:20:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Oct 2012 14:20:38 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of cperezmig@gmail.com designates 209.85.212.172 as permitted sender) Received: from [209.85.212.172] (HELO mail-wi0-f172.google.com) (209.85.212.172) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Oct 2012 14:20:31 +0000 Received: by mail-wi0-f172.google.com with SMTP id hq12so1805113wib.7 for ; Wed, 03 Oct 2012 07:20:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=o3ceNSd53eCn9O8Lsp4iYRlg4SOOcInI9ht5YB47GQQ=; b=xYrl7v4HD/AR393vIEBRc6J/5wiTB8ZrIf2oBGGivjb9iZU3hiCykj5Bp36UMm6vrp Rxs4ru/oqAhmc4JD7gqWBWCOkUekhum8jzWCvRxigaF/6+SpX9iNYH6m/34KRRiwyIwQ b79aja5yPM+gRSNBnKp+zpLBKFSlrj1o3TEmJzN0wVkOMu7KgMBlvHuhwCAAp1NCb+In i+Q8TysOApb7TQqpIPgI0KXeb2udicG+tCoaNFiutJqcmkNdEc4mtp/IimoP+A4s/57L Z5MkoFO8GvOXSU1YiW45kyPqGTxjU5Zj2qoSOS+tXplMRuzw8VPJH+ICnVuwp7BiBvQi mNQQ== Received: by 10.180.79.100 with SMTP id i4mr30101771wix.12.1349274010345; Wed, 03 Oct 2012 07:20:10 -0700 (PDT) MIME-Version: 1.0 Received: by 10.194.36.229 with HTTP; Wed, 3 Oct 2012 07:19:50 -0700 (PDT) From: =?ISO-8859-1?Q?Carlos_P=E9rez_Miguel?= Date: Wed, 3 Oct 2012 16:19:50 +0200 Message-ID: Subject: RandomPartitioner and the token limits To: user@cassandra.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Hello, Reading the wiki of operations (http://wiki.apache.org/cassandra/Operations) I noticed something strange. When using RandomPartitioner, tokens are integers in the range [0,2**127] (both limits included) but keys are converted into this range using MD5. MD5 has 128 bits, so, tokens should not be in the range [0, (2**128)-1]? Anyway, if Cassandra uses only 127 bits of that 128 bits because it tries to convert this 128 bit into a signed int, tokens should not be in the range [0, 2**127) (first limit included, last not included)? Thank you Carlos P=E9rez Miguel