hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Subhash Bhushan <subhash.bhus...@stratalabs.in>
Subject Converting Double value received via Stargate
Date Fri, 24 Dec 2010 15:20:16 GMT
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.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message