#查看表
describe 'edw_applications:rec_cb_item_user'
#创建表
create 'edw_applications:rec_cb_item_user', {NAME => 'fangyuan', VERSIONS => 2, COMPRESSION => 'SNAPPY'}, {NAME => 'loupan', VERSIONS => 2, COMPRESSION => 'SNAPPY'}
#删除表
disable 'edw_applications:rec_cb_item_user'
drop 'edw_applications:rec_cb_item_user'
#范围扫描
scan 'edw_applications:user_profile_customer', STARTROW=> '00502be7c4df-8509-d144-b2c8-03108f00', ENDROW=> '00502be7c4df-8509-d144-b2c8-03108f00'
#rowkey值扫描
scan 'edw_applications:user_profile_cid_mapping', FILTER=>"ValueFilter(=,'binary:01b4e8ef4619-daaa-8d54-21d3-a2ba2dbf ')"
#列值扫描
scan 'event_new', STARTROW=> '0000893000', FILTER=>"ColumnPrefixFilter('biz_type') AND ( ValueFilter(=,'binary:1') OR ValueFilter(=,'binary:3') )"
scan 'edw_applications:user_profile_customer',{LIMIT=>5}
#插入
put 'edw_applications:user_profile_customer','000002f13285-7b48-29b4-5e9e-684068a3','basic_info:name','18600024218'
#查询(cf、qualifier)
get 'edw_applications:user_profile_customer','000002f13285-7b48-29b4-5e9e-684068a3',COLUMN=>'basic_info:name',VERSIONS=>5
get 'edw_applications:user_profile_customer','000002f13285-7b48-29b4-5e9e-684068a3',COLUMN=>'basic_info',VERSIONS=>5
#表记录条数
count 'edw_applications:rec_cb_item_user', {INTERVAL => 100, CACHE => 500}
#表edw_applications:rec_cb_item_user_1重命名为edw_applications:rec_cb_item_user_2
disable 'edw_applications:rec_cb_item_user_1'
snapshot 'edw_applications:rec_cb_item_user_1', 'rec_cb_item_user_snapshot'
clone_snapshot 'rec_cb_item_user_snapshot', 'edw_applications:rec_cb_item_user_2'
delete_snapshot 'rec_cb_item_user_snapshot'
drop 'edw_applications:rec_cb_item_user_1'
hbase常用shell命令
最新推荐文章于 2024-09-29 15:31:41 发布