Have you tried extracting values using Bytes.toDouble(value) or Bytes.toLong(value)?
On Fri, Dec 24, 2010 at 9:20 AM, Subhash Bhushan < [email protected]> wrote: > 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: > val...@\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. >
