HBase Shell 命令——Quick Start
来源:互联网 发布:孕囊只有两个数据准吗 编辑:程序博客网 时间:2024/06/05 04:06
The Apache HBase Shell is JRuby's IRB with some HBase particular commands added. Anything you can do in IRB, you should be able to do in the HBase Shell.
Apache HBase Shell 命令在Ruby的IRB命令的基础上加入了一些特殊的HBase命令。任何在IRB中使用的命令,你都可以在HBase Shell中使用。
1、在启动HBase之后,通过shell命令连接HBase
bin/hbase shell
hbase(main):001:0>
2、显示HBase 帮助文本hbase(main):002:0>help
3、创建表,创建表的时候必须写出表名(test)和列族名(cf)
hbase(main):003:0>create 'test','cf'
4、列出HBase中的表
hbase(main):004:0>list 'test'
5、向test表中插入数据,在插入数据时,可以定义行名(row1)列族名下的列名(a),并赋值(value1)
hbase(main):005:0>put 'test','row1','cf:a','value1'
6、扫描全表
hbase(main):006:0>scan 'test'
7、获得单个行的数据
hbase(main):007:0>get 'test','row1'
8、获得某个行键,某个列族中具体列名的信息。
hbase(main):008:0>get 'test','row1','cf:a'
9、在删除表或修改表之前,首先要是表失效。
hbase(main):009:0>disable 'test'
使表有效:hbase(main):010:0>enable 'test'
10、修改表
1)删除列族(cf)
hbase(main):011:0>alter 'test',NAME=>'cf',METHOD=>'delete'
2)改变或添加一个列族
hbase(main):012:0>alter 'test',NAME=>'cf',VERSIONS=>5
11、删除行列(不需要表离线)
1)删除指定的行健字段
hbase(main):013:0>delete 'test','row1','cf:a'
2)删除整行hbase(main):014:0>deleteall 'test','row1'
12、删除整表
hbase(main):015:0>drop 'test'
13、查看集群状态status
14、查看版本号version
15、检查表是否存在
hbase(main):016:0>exists 'test'
16、判断表是否离线hbase(main):017:0>is_enabled 'test'
hbase(main):018:0>is_disabled 'test'
17、统计表的行数
hbase(main):019:0>count 'test'
18、清空表hbase(main):020:0>trancate 'test'
19、退出shell命令
hbase(main):021:0>quit
参考资料:1、点击打开链接
2、 http://itlab.idcquan.com/linux/set/939223_2.html
0 0
- HBase Shell 命令——Quick Start
- Hbase--Quick Start
- HBase Quick Start
- Hadoop之——Hbase Shell命令
- Hbase之——常用Shell命令
- Quick Start 1 —— Desktop Basics
- nunit使用指南之—NUnit Quick Start
- Hbase快速开始——shell命令操作
- hbase--HBase 常用Shell命令
- HBASE-hbase shell基础命令
- hbase shell命令
- hbase shell命令扩展
- hbase shell 基本命令
- HBase Shell基本命令
- hbase shell命令
- Hbase Shell 命令
- hbase 基本shell命令
- hbase的shell命令
- 教你如何迅速秒杀掉:99%的海量数据处理面试题
- js--javascript 简单的正则表达式
- iOS tableView 固定住
- dyld: Library not loaded: @rpath/MySDK.framework/MySDK 错误解决
- 多线程模拟销售火车票
- HBase Shell 命令——Quick Start
- 复选框变成单选框
- Eclipse的Lua开发插件 Koneki
- 树状数组+逆序数与顺序数——HDU 2492
- Web.xml配置详解之context-param
- iOS 开发中常用的一些工具推荐
- 51单片机各中断初始化及子程序模板
- ViewController的生命周期分析和使用
- 代码重构