Return-Path: Delivered-To: apmail-hbase-user-archive@www.apache.org Received: (qmail 33685 invoked from network); 24 Dec 2010 15:20:48 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 24 Dec 2010 15:20:48 -0000 Received: (qmail 22706 invoked by uid 500); 24 Dec 2010 15:20:47 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 22418 invoked by uid 500); 24 Dec 2010 15:20:47 -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 22410 invoked by uid 99); 24 Dec 2010 15:20:46 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Dec 2010 15:20:46 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.216.169] (HELO mail-qy0-f169.google.com) (209.85.216.169) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Dec 2010 15:20:38 +0000 Received: by qyk7 with SMTP id 7so8006096qyk.14 for ; Fri, 24 Dec 2010 07:20:16 -0800 (PST) MIME-Version: 1.0 Received: by 10.229.248.212 with SMTP id mh20mr8455671qcb.89.1293204016819; Fri, 24 Dec 2010 07:20:16 -0800 (PST) Sender: subhash.bhushan@strata.co.in Reply-To: subhash.bhushan@stratalabs.in Received: by 10.229.185.149 with HTTP; Fri, 24 Dec 2010 07:20:16 -0800 (PST) X-Originating-IP: [117.192.111.51] Date: Fri, 24 Dec 2010 20:50:16 +0530 X-Google-Sender-Auth: wCzI7NBmA30TNssYWrDBA8BdKX4 Message-ID: Subject: Converting Double value received via Stargate From: Subhash Bhushan To: user@hbase.apache.org Content-Type: multipart/alternative; boundary=001485f6ca180b6de70498298680 --001485f6ca180b6de70498298680 Content-Type: text/plain; charset=ISO-8859-1 Hi, I am using a Ruby on Rails client to extract values from HBase via Stargate. -------------------------------------------------------------------------------------------------------- "price" field has been defined as follows: private Double price; -------------------------------------------------------------------------------------------------------- I have inserted values into HBase like this: p.add( Bytes.toBytes("detail"), Bytes.toBytes("price"), timeStamp, Bytes.toBytes(item.getPrice())); -------------------------------------------------------------------------------------------------------- When I extract value of price via Stargate, i get the following value: value=@\x91,\x00\x00\x00\x00\x00 -------------------------------------------------------------------------------------------------------- How do I convert this into proper Double value in Ruby? Or should I always store fields as String? The same applies to my Long variables too. Regards, Subhash Bhushan. --001485f6ca180b6de70498298680--