Return-Path: X-Original-To: apmail-cassandra-dev-archive@www.apache.org Delivered-To: apmail-cassandra-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6C7447051 for ; Tue, 9 Aug 2011 21:14:47 +0000 (UTC) Received: (qmail 89931 invoked by uid 500); 9 Aug 2011 21:14:46 -0000 Delivered-To: apmail-cassandra-dev-archive@cassandra.apache.org Received: (qmail 89715 invoked by uid 500); 9 Aug 2011 21:14:45 -0000 Mailing-List: contact dev-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list dev@cassandra.apache.org Received: (qmail 89693 invoked by uid 99); 9 Aug 2011 21:14:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Aug 2011 21:14:45 +0000 X-ASF-Spam-Status: No, hits=4.1 required=5.0 tests=FROM_12LTRDOM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [209.85.213.44] (HELO mail-yw0-f44.google.com) (209.85.213.44) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Aug 2011 21:14:37 +0000 Received: by ywm21 with SMTP id 21so316177ywm.31 for ; Tue, 09 Aug 2011 14:14:16 -0700 (PDT) Received: by 10.90.16.40 with SMTP id 40mr6395124agp.186.1312924455544; Tue, 09 Aug 2011 14:14:15 -0700 (PDT) Received: from [10.0.1.90] (203-114-161-15.wir.sta.inspire.net.nz [203.114.161.15]) by mx.google.com with ESMTPS id o11sm250146anh.49.2011.08.09.14.14.13 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 09 Aug 2011 14:14:15 -0700 (PDT) Sender: Todd Nine Subject: Help with debugging DynamicCompositeType (Sylvain) From: Todd Nine To: "dev@cassandra.apache.org" Content-Type: multipart/alternative; boundary="=-6pUoM7tgzJluR9zEhk3p" Date: Wed, 10 Aug 2011 09:14:10 +1200 Message-ID: <1312924450.19482.26.camel@greenlantern.local> Mime-Version: 1.0 X-Mailer: Evolution 2.32.2 X-Virus-Checked: Checked by ClamAV on apache.org --=-6pUoM7tgzJluR9zEhk3p Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Hi guys, I'm working on the final updates to hector-jpa for 0.8.2, and I've run into a bit of an issue. Now that forward and reverse comparators are natively supported, order by clauses on the indexes are natively sorted in Cassandra. I'm having some issues with my tests, here is my scenario. An index for a "Sale" object is defined with the following format name, order by sale date desc. This translates into the following DynamicComposite. UTF8Type + BytesType(reversed=true) + BytesType (the RK that contains the sale item) When I'm creating the composite, everything appears to be constructed correctly, however when performing range scans where I only scan the first component in the composite, the rows are not returned in the reverse order as I expect, but rather in the order that would match a UTF8Type+BytesType+BytesType encoding. I've created a unit test that manually creates these columns the same as my plugin, and it passes. https://gist.github.com/c8517fb4799676a246d8 This leads me to believe that the serializiation of the column bytes on the client is incorrectly encoded. Where would be the best location in the DynamicCompoisteType comparator code to debug the columns as they are sorted? This will help me pin down the serialization problem, and ultimately get a 0.8.2 compatible version of the plugin deployed. Thanks, Todd --=-6pUoM7tgzJluR9zEhk3p--