Return-Path: X-Original-To: apmail-hbase-user-archive@www.apache.org Delivered-To: apmail-hbase-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 B02F2D32D for ; Mon, 5 Nov 2012 18:42:02 +0000 (UTC) Received: (qmail 87942 invoked by uid 500); 5 Nov 2012 18:42:00 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 87861 invoked by uid 500); 5 Nov 2012 18:42:00 -0000 Mailing-List: contact user-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hbase.apache.org Delivered-To: mailing list user@hbase.apache.org Received: (qmail 87853 invoked by uid 99); 5 Nov 2012 18:42:00 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Nov 2012 18:42:00 +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 jbishop.rwc@gmail.com designates 209.85.210.169 as permitted sender) Received: from [209.85.210.169] (HELO mail-ia0-f169.google.com) (209.85.210.169) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Nov 2012 18:41:52 +0000 Received: by mail-ia0-f169.google.com with SMTP id h37so5704961iak.14 for ; Mon, 05 Nov 2012 10:41:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=tZZJ0wbWMNcyZBaqd6Pa950IRrrkoKblcop4qZpHFf8=; b=kH8Y56gmk6WKlQY9Iabp2SFCvhuUYGi2CezD9z8N1knCzvDq3M4x+0cNyc2tw/OdGd PGVNufzEkcLk/I9kUxln3IHxxPpFtL6q3DYK6hDBE8be0fVXTZbEuuRmh24VlUVrPe/i ISzcWMZEGPl2/riHMfOzzRimPf0LhU0FvRxNwhLyEst5ZKhR6BBd2NSNDmsBeC8vqULM boyT3FK40OKqgmxCAVObk0mXiEOMVI2aTX27zUxPEnBoUY5cwyrKVitObmsthbr+Fpb8 eGcEx3o2oE/loUHDwt5msXam32hGhvAY9AJRLUx0aGFBKlZ5UOPkbnVPNmYa6yMLltGm wvYw== MIME-Version: 1.0 Received: by 10.50.16.143 with SMTP id g15mr10472850igd.9.1352140891466; Mon, 05 Nov 2012 10:41:31 -0800 (PST) Received: by 10.64.36.35 with HTTP; Mon, 5 Nov 2012 10:41:31 -0800 (PST) Date: Mon, 5 Nov 2012 10:41:31 -0800 Message-ID: Subject: Using doubles and longs as ordering row values From: Jonathan Bishop To: "user@hbase.apache.org" Content-Type: multipart/alternative; boundary=f46d0442820085abb104cdc3d50e X-Virus-Checked: Checked by ClamAV on apache.org --f46d0442820085abb104cdc3d50e Content-Type: text/plain; charset=ISO-8859-1 Hi, In my application my row values are doubles. I would like my scans to traverse the rows in order of increasing values. But if I simply use double d = .... byte[] row = Bytes.toBytes(d); I will get an ordering which is based on the byte values of doubles, not on the value of the doubles themselves. I see also that integer values have the same issue due to the first bit being the sign bit. So negative values will come after positive values. Any suggestions? Thanks, Jon --f46d0442820085abb104cdc3d50e--