我只是 HBase 的初学者。我想将 RDBMS 表迁移到 HBase。
RDBMS 中的表模式有点像这样:
Field Type Collation Null Key Default Extra Privileges Comment
--------------- ---------------- ----------------- ------ ------ ------- ------------ -- ------------------------------- -------
id int(16) unsigned (NULL) NO PRI (NULL) auto_increment select,insert,update,references
user_id varchar(64) latin1_swedish_ci NO MUL (NULL) select,insert,update,references
type_id int(11) (NULL) NO (NULL) select,insert,update,references
application_id int(16) unsigned (NULL) YES MUL (NULL) select,insert,update,references
title varchar(128) latin1_swedish_ci YES (NULL) select,insert,update,references
body text latin1_swedish_ci YES (NULL) select,insert,update,references
posted_time datetime (NULL) YES (NULL) select,insert,update,references
template_params text latin1_swedish_ci YES (NULL) select,insert,update,references
count int(11) (NULL) YES (NULL) select,insert,update,references
reference_id int(16) (NULL) YES (NULL) select,insert,update,references
viewer_id varchar(64) latin1_swedish_ci YES (NULL) select,insert,update,references
这里 body 和 Templete 有 varchar 格式的 json 数据。现在我想在 HBase 中为这个表创建模式。
对此数据执行的操作:
1. Activity retrival for a user id
2. Activity retrival for a viewer id
3. Activity retrival for particular type_id/particular type_id and user_id.
4. Activity retrival made after t time.
什么是合适的模式?