Reputation: 99
I have one Json string which I am writing to HBase as a column using Put Bytes.toBytes conversion.
The value of the Json is : "^~\&" But when I check the data in HBase database it is written like : "^~\x5C\x5C&"
How can I avoid such conversion in database? Thanks in advance for your help.
Thanks and Regards,
Geeta
Upvotes: 0
Views: 3216
Reputation: 1812
It is not converted to that values, they are byte represantation of every char in your value. Hbase stores bytes, and shows byte[] in shell when you query. If you want to get real values, you should convert it to String again, after getting column value by Bytes.toString(columnVal) , like other data types as well.
Upvotes: 1