HBase Shell操作 DDL语言

1 查看所有表

list

2 创建表

create 'student','info'

create 'stu','info1','info2'

创建表时指定列族的最大版本(hbase物理存储几个版本)
create 'bigdata:stu2',{NAME=>'info',VERSIONS=>3}

3 修改最大版本数

alter 'student',{NAME=>'info',VERSIONS=>3}

4 查看表结构

describe 'student'

5 删除表

①使表下线
disable 'student'
②删除表
drop 'student'

 

6 查看所有的命名空间

list_namespace

7 创建命名空间

create_namespace 'bigdata'

8 在指定命名空间下创建表

create 'bigdata:stu','info'

9 删除命名空间(必须先清空此命名空间下的所有表)

drop_namespace 'bigdata'

 

posted @ 2020-06-13 10:42  地中有山  阅读(194)  评论(0编辑  收藏  举报