Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 87806 invoked from network); 18 Aug 2010 12:57:56 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 18 Aug 2010 12:57:56 -0000 Received: (qmail 81599 invoked by uid 500); 18 Aug 2010 12:57:54 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 81413 invoked by uid 500); 18 Aug 2010 12:57:52 -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 81404 invoked by uid 99); 18 Aug 2010 12:57:51 -0000 Received: from Unknown (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Aug 2010 12:57:51 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of rantav@gmail.com designates 209.85.161.44 as permitted sender) Received: from [209.85.161.44] (HELO mail-fx0-f44.google.com) (209.85.161.44) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Aug 2010 12:57:28 +0000 Received: by fxm18 with SMTP id 18so255785fxm.31 for ; Wed, 18 Aug 2010 05:57:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:from:date :message-id:subject:to:content-type; bh=HRMDJzDTA/dtKTiVUg57ROkN61QlXiVlNCAeedY+BKQ=; b=aQpDVxZLueTGdLQ+SvLR5mNgWHbO65Wz+690AfrjA6mqDXrJFRddO9etegsDVQp7xz xPJRmnIJJvS7Oz/hklHyg6zGk/i9DpngJybimfEzDNyzK3kxl98X24nfHuHfPbQv11zL ocGNG/f2wKWs8HRIqPvlDeqRKmoqyM8xocW+8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=b0j94Txd4xiC8wlTbgxbJw/aKwvfnMWPPdSDb2yZxlGZ/8NhQkI/wGL+sgKObIucuC BGiMoeS8CpYUzZ5G1c0E2LGiBLyfw8QJsraLKXaVU/saUfQuE4vohCiywic5qDFUUePV slOJpefIL2SlfsHp2PyhZ4+1yKgCOJd2QYiJ8= Received: by 10.239.182.67 with SMTP id p3mr376821hbg.122.1282136228300; Wed, 18 Aug 2010 05:57:08 -0700 (PDT) MIME-Version: 1.0 Received: by 10.239.187.69 with HTTP; Wed, 18 Aug 2010 05:56:48 -0700 (PDT) From: Ran Tavory Date: Wed, 18 Aug 2010 15:56:48 +0300 Message-ID: Subject: KeyRange.token in 0.7.0 To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=001485f4504e7109e6048e189a36 X-Virus-Checked: Checked by ClamAV on apache.org --001485f4504e7109e6048e189a36 Content-Type: text/plain; charset=UTF-8 I'm a bit confused WRT KeyRange's tokens in 0.7.0 When making a range query you can either use KeyRange.key or KeyRange.token. In 0.7.0 key was typed as byte[]. tokens remain strings. What does this string represent in case of a RP and in case of an OPP? Did this change in 0.7.0? AFAIK in 0.6.0 if the partitioner is OPP then the tokens are actual strings and they might just be actual subset of the keys. When using a RP tokens are BigIntegers (keys are still strings) and I'm not actually sure if you're allowed to shoot a range query using tokens... In 0.7.0 since keys are now bytes, when using an OPP, how do those bytes translate to strings? I'd assume it'd just be byte[] -> UTF8 conversion, only that this may result in illegal UTF8 chars when keys are just random bytes, so I guess not... Perhaps md5 hashing? But then if using an OPP and keys are actual strings, I want to have the same 0.6.0 functionality in place, meaning tokens are strings like the keys. I actually tested this scenario and it looks working, so it seems like the String keys are translated to UTF8, but what happens when they are invalid UTF8? Another question is what's the story with RP in 0.7.0? Should range query even be supported with tokens? If so, then are the tokens expected to be string of integers? (e.g. "1234567890") Thanks. --001485f4504e7109e6048e189a36 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I'm a bit confused WRT KeyRange's tokens in 0.7.0<= div>When making a range query you can either use KeyRange.key or KeyRange.t= oken. In 0.7.0 key was typed as byte[]. tokens remain strings.
Wh= at does this string represent in case of a RP and in case of an OPP? Did th= is change in 0.7.0?

AFAIK in 0.6.0 if the partitioner is OPP then the token= s are actual strings and they might just be actual subset of the keys. When= using a RP tokens are BigIntegers (keys are still strings) and I'm not= actually sure if you're allowed to shoot a range query using tokens...=

In 0.7.0 since keys are now bytes, when using an OPP, h= ow do those bytes translate to strings? I'd assume it'd just be byt= e[] -> UTF8 conversion, only that this may result in illegal UTF8 chars = when keys are just random bytes, so I guess not... Perhaps md5 hashing? But= then if using an OPP and keys are actual strings, I want to have the same = 0.6.0 functionality in place, meaning tokens are strings like the keys. I a= ctually tested this scenario and it looks working, so it seems like the Str= ing keys are translated to UTF8, but what happens when they are invalid UTF= 8?
Another question is what's the story with RP in 0.7.0? Should rang= e query even be supported with tokens? If so, then are the tokens expected = to be string of integers? (e.g. "1234567890")

Thanks.
--001485f4504e7109e6048e189a36--