HBase的Shell操作
2016-02-26 23:02
447 查看
1、进入命令行
bin/hbase shell2、输入help 查看各种命令组。
命令是分组的,可以执行help 'general'查看general组的命令。3、常用命令
--显示有哪些表 list --显示表的DDL信息 describe '表名' --创建表 create 'table name','family name'... create 'table name',{NAME=>'family name',VERSIONS=>'5'} --删除表 --先关闭表 disable 'table name' drop 'table name' --判断表是否可用 is_enabled 'table name' is_disabled 'table name' --启用表 enable 'table name' --插入数据 put 'table name','row key','family:column',value --同样语句可以修改值 put 'table name','row key','family:column',newvalue --扫描表 scan 'table name' --查看多个版本的信息 scan 'table name',{RAW=true,VERSIONS=>3} --指定列族 scan 'tt1',{COLUMN='f1'} --获取值 get 'table name','row key',[{COLUMN=>'COLUMN',TIMESTAMP=''}] --保存值的时候,指定时间戳 put 'table name','row key','family:column',value,ts --清空数据(disable->drop->create) truncate 'table name'
*语句结尾不带分号
相关文章推荐
- GitBash 自定义命令提示符
- shell编程练习001(20160226)
- shell 编程之 if...else case...esac
- ubuntu 12.04 怎么取得超级用户权利
- shell 常用命令
- shell 脚本格式化输出
- Linux中Shell脚本总结
- CentOS6.5安装Tab增强版:bash-completion
- 正则表达式 linux shell
- HBase shell使用教程
- Shell脚本了解
- Shell脚本了解
- Shell脚本了解
- Shell脚本了解
- Shell中各种判断语法
- 执行shell脚本出现bin/bash: bad interpreter: No such file or directory
- jenkins执行shell启动tomcat失败
- linux下shell显示-bash-4.1#不显示路径解决方法
- jenkins执行shell启动tomcat失败
- 自动化交互脚本Expect简单介绍及应用实例