hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Meil <doug.m...@explorysmedical.com>
Subject Re: Different value of integer on querying in hbase!
Date Wed, 14 Dec 2011 13:31:44 GMT

re:  "Though hbase stores everything as string"

Not so, Hbase stores everything as bytes and you are responsible for



On 12/14/11 6:26 AM, "neuron005" <neuron005@gmail.com> wrote:

>Hii there,
>I just created a simple hbase table from my java program, Inserted value
>it. But I got into an issue that whenever I store an integer value in
>and retrieve it by my java program , It gives a different value.
>For eg. 
>I inserted an int value in my hbase table '1234'
>When I queried from this using my java code -It showed a value
>Though hbase stores everything as string but I casted my result as
>ResultSet rs=stmt.execute("select * from mapping_name");
>int val2=rs.getInt("val2");//val2 of type string
>Please help me out. Thanks in advance.
>View this message in context:
>Sent from the HBase User mailing list archive at Nabble.com.

View raw message