-
create Table
create 'mytable', {NAME => 'colfam1', VERSIONS => 1, TTL => 2592000, BLOCKCACHE => true}, {NAME => 'colfam2'} - truncate mytable == disable / drop table
-
Alter a table / add column family (Note: table must be disabled to make ColumnFamily modifications)
alter 'mytable', {NAME => 'new_colfam'}, {NAME => 'colfam_to_delete', METHOD => 'delete'} - scan mytable
scan ‘mytable’, {LIMIT=>10, STARTROW=>”start_row”, STOPROW=>”stop_row”}scan 'zchx_ais',{STARTROW=>"44164100020130903164330", STOPROW=>"44164100020130904164330"} - get mytable, row_key
- put mytable, row_key, colfam:qual, value
- delete 'mytable', 'row_key','colfam:qual'
- major_compact mytable
- split 'mytable'
- status 'detailed'
-
查看某个表占空间大小
hadoop fs -du /hbase/tablename
本文介绍了HBase中常见表操作命令的使用方法,包括创建表、截断表、修改表结构、扫描表数据等关键步骤,并提供了具体示例。
14万+

被折叠的 条评论
为什么被折叠?



