HBase的shell客户端及常用命令介绍(二)

 

1.开启客户端

[root@linux01 /]# hbase shell
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/opt/apps/hadoop-3.2.1/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/opt/apps/hbase-2.2.5/lib/client-facing-thirdparty/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
HBase Shell
Use "help" to get list of supported commands.
Use "exit" to quit this interactive shell.
For Reference, please visit: http://hbase.apache.org/2.0/book.html#shell
Version 2.2.5, rf76a601273e834267b55c0cda12474590283fd4c, 2020年 05月 21日 星期四 18:34:40 CST
Took 0.0060 seconds 

客户端的基本命令

hbase(main):002:0> status    --查看当前hbase的状态--
1 active master, 0 backup masters, 3 servers, 0 dead, 0.6667 average load
Took 1.0122 seconds                                                                               
hbase(main):003:0> version    --查看版本--
2.2.5, rf76a601273e834267b55c0cda12474590283fd4c, 2020年 05月 21日 星期四 18:34:40 CST
Took 0.0007 seconds                                                                               
hbase(main):004:0> whoami    --当前用户
root (auth:SIMPLE)
    groups: root
Took 0.0429 seconds 

2.help查看所有命令

help "commands"  查看命令的使用方法(常用)

注意:单引号双引号通用

hbase(main):013:0> help "list"
List all user tables in hbase. Optional regular expression parameter could
be used to filter the output. Examples:

  hbase> list
  hbase> list 'abc.*'
  hbase> list 'ns:abc.*'
  hbase> list 'ns:.*'

3.namespace

hbase中没有数据库的概念,他是使用namespace来实现数据库的作用

4.create创建表(指定列族)

hbase(main):006:0> create "tb_user" , "cf1"    --表名tb_user,列族cf1--
Created table tb_user
Took 1.50
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值