Am I correct of storing JSON data in HBase?
put 'messages', 123, 'cf:json', '{"foo":"bar"}'
Basically, I need to query it by ID, which is 123 in my example. And JSON is variable length string.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There’s no problem storing JSON in a cell value. Cell sizes of up to 5M are still reasonable. Generally speaking though it is recommended to keep key and column sizes small (http://hbase.apache.org/book.html#keysize) and JSON, while being more compact than XML, is still a wasteful format (vs. binary JSON, Thrift, Avro, MessagePack etc.). if you stay with JSON you might need to consider making the column family compressed