hbase 基本命令

1、用shell来连接HBase

[[email protected] bin]# cd /usr/hadoop/hbase-1.1.7/bin

[[email protected] bin]# ./hbase shell

HBase Shell; enter ‘help<RETURN>‘ for list of supported commands.
Type "exit<RETURN>" to leave the HBase Shell
Version 1.1.7, re7ee6fa201c4fb1962f8928df3d519b70b4ff717, Fri Oct  7 18:36:27 PDT 2016

hbase(main):001:0> 

2、创建表

hbase(main):001:0> create ‘table1‘,‘col1‘
0 row(s) in 1.4940 seconds

=> Hbase::Table - table1
hbase(main):002:0> 

3、插入记录

hbase(main):003:0> put ‘table1‘,‘row2‘,‘col1:b‘,‘value2‘
0 row(s) in 0.0130 seconds

4、查看记录(scan)

hbase(main):002:0>  scan ‘table1‘

row2                 column=col1:b, timestamp=1478957314808, value=value2
1 row(s) in 30.4430 seconds

5、 用get查看单行数据

hbase(main):011:0> get ‘table1‘,‘row1‘

COLUMN               CELL                                                     

col1:a               timestamp=1317180621803, value=value1                    

1 row(s) in 0.0160 seconds

6、 用disable和drop删除表

hbase(main):017:0> disable ‘table1‘

0 row(s) in 2.0470 seconds

hbase(main):018:0> drop ‘table1‘

0 row(s) in 0.0960 seconds

hbase(main):019:0> list

TABLE                                                                                                                                                   

1 row(s) in 0.0170 seconds
时间: 2024-09-04 16:27:42

hbase 基本命令的相关文章

hbase基本命令

基本命令  建表scores  具有两个列族grad 和courese create 'scores','grade', 'course' 查看当前HBase中具有哪些表 list 查看表结构 describe 'scores' 添加一行数据,rowkey为 key001 列族grad的列名为”” 值位5  put 'scores','key001','grade:','5'  给key001这一行的数据的列族course添加一列<math,97> put 'scores','key001',

HBase入门篇

目录: 1-HBase的安装 2-Java操作HBase例子 3-HBase简单的优化技巧 4–存储 5(集群) -压力分载与失效转发 6 -白话MySQL(RDBMS)与HBase之间 7 -安全&权限 1-HBase的安装 HBase是什么? HBase是Apache Hadoop中的一个子项目,Hbase依托于Hadoop的HDFS作为最基本存储基础单元,通过使用hadoop的DFS工具就可以看到这些这些数据 存储文件夹的结构,还可以通过Map/Reduce的框架(算法)对HBase进行操

HBase Shell操作

Hbase 是一个分布式的.面向列的开源数据库,其实现是建立在google 的bigTable 理论之上,并基于hadoop HDFS文件系统.     Hbase不同于一般的关系型数据库(RDBMS).是一种适用于非结构化数据存储的数据库,且Hbase是基于列的数据库. 下面的内容基于我们已经安装好hadoop.hbase. 一.hbase shell 介绍 hbase shell是用户和hbase 交互的接口之一,当然还可以通过其它方式比如java api等 下表列出了 hbase 基本命令

HBase 超详细介绍

1-HBase的安装 HBase是什么? HBase是Apache Hadoop中的一个子项目,Hbase依托于Hadoop的HDFS作为最基本存储基础单元,通过使用hadoop的DFS工具就可以看到这些这些数据 存储文件夹的结构,还可以通过Map/Reduce的框架(算法)对HBase进行操作,如右侧的图所示: HBase在产品中还包含了Jetty,在HBase启动时采用嵌入式的方式来启动Jetty,因此可以通过web界面对HBase进行管理和查看当前运行的一些状态,非常轻巧. 为什么采用HB

Hbase新手技术入门

HBase是什么? HBase是Apache Hadoop中的一个子项目,Hbase依托于Hadoop的HDFS作为最基本存储基础单元,通过使用hadoop的DFS工具就可以看到这些这些数据 存储文件夹的结构,还可以通过Map/Reduce的框架(算法)对HBase进行操作,如右侧的图所示: 为什么采用HBase? HBase 不同于一般的关系数据库,它是一个适合于非结构化数据存储的数据库.所谓非结构化数据存储就是说HBase是基于列的而不是基于行的模式,这样方面读写你的大数据内容. HBase

【转】HBase 超详细介绍

---恢复内容开始--- http://blog.csdn.net/frankiewang008/article/details/41965543 1-HBase的安装 HBase是什么? HBase是Apache Hadoop中的一个子项目,Hbase依托于Hadoop的HDFS作为最基本存储基础单元,通过使用hadoop的DFS工具就可以看到这些这些数据 存储文件夹的结构,还可以通过Map/Reduce的框架(算法)对HBase进行操作,如右侧的图所示: HBase在产品中还包含了Jetty

hbase 迁库移库步骤

1 将数据导出 hbase org.apache.hadoop.hbase.mapreduce.Export t_zyzx_grzyfwtjxxb /hbase/data_backup/20181030/t_zyzx_grzyfwtjxxb hbase org.apache.hadoop.hbase.mapreduce.Export t_zyzx_jrrz /hbase/data_backup/20181030/t_zyzx_jrrz hbase org.apache.hadoop.hbase.

hbase shell基本命令

1.进入hbase shell [email protected]:~/hbase-0.98.8-hadoop1/conf$ hbase shell HBase Shell; enter 'help<RETURN>' for list of supported commands. Type "exit<RETURN>" to leave the HBase Shell Version 0.98.8-hadoop1, r6cfc8d064754251365e070

hbase shell 基本命令总结

访问hbase,以及操作hbase,命令不用使用分号hbase shell 进入hbase list 查看表hbase shell -d hbase(main):024:0> scan '.META.' =============小例子=================================================== 1. 创建一个表memberhbase(main):025:0> create 'member','m_id','address','info' 2.list