You need to enable JavaScript to run this app.
文档中心
表格数据库 HBase 版

表格数据库 HBase 版

复制全文
下载 pdf
连接管理
如何使用 HBase Shell
复制全文
下载 pdf
如何使用 HBase Shell
本文介绍如何使用 HBase Shell 执行 HBase 数据库管理相关命令。​
前提条件​
已通过 HBase Shell 成功连接并访问目标 HBase 数据库。连接方法,请参见使用 HBase Shell 工具连接实例。​
创建表​
您可以通过如下命令创建一个名为 tb1 的表,且该表的 ColumnFamily 名为 cf。​
​
hbase(main):001:0> create 'tb1', 'cf'​
​
返回结果如下。​
​
Created table tb1​
Took 1.1770 seconds​
=> Hbase::Table - tb1​
​
设置值​
您可以通过如下命令,将表 tb1 在 cf:col1 列 r1 行的值设置为 v1。​
​
hbase(main):001:0>put 'tb1', 'r1', 'cf:col1', 'v1'​
​
返回结果如下。​
​
Took 0.2374 seconds ​
​
查看值​
您可以通过如下命令,查看表 tb1 在 r1 行的值。​
​
hbase(main):001:0>get 'tb1', 'r1'​
​
返回结果如下。​
​
COLUMN CELL ​
f1:col1 timestamp=1657619446922, value=v1​
1 row(s)​
Took 0.0927 seconds ​
​
相关文档​
关于 HBase Shell 命令的更多信息,请参见 HBase Shell Exercises 和 HBase Shell Commands。​
​
最近更新时间:2025.09.11 11:31:59
这个页面对您有帮助吗?
有用
有用
无用
无用