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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With