HBase表创建、删除、清空

HBase shell窗口进入

执行命令hbase shell

HBase表的创建

# 语法:create <table>, {NAME => <family>, VERSIONS => <VERSIONS>}
# 例如:创建表t1,有两个family name:f1,f2,且版本数前者为3,后者为1

hbase(main)> create 't1',{NAME => 'f1', VERSIONS => 3},{NAME => 'f2', VERSIONS => 1}

HBase表的删除

  1. disable表
  2. drop表

hbase(main)> disable 't1'
hbase(main)> drop 't1'

HBase表的清空

hbase(main)> truncate 't1'

猜你喜欢

转载自blog.csdn.net/oZuoLuo123/article/details/86647478
今日推荐