hbase shell常规指令解释篇

  1. status (显示集群状态,master,server情况,显示内容的详略程度可选)

hbase(main)::> help 'status'
Show cluster status. Can be 'summary', 'simple', 'detailed', or 'replication'. The
default is 'summary'. Examples: hbase> status                #默认等价于 status 'summary'
hbase> status 'simple'           #显示region,storefile,request,read,write等等状况,通常使用计数器进行描述
hbase> status 'summary'           #显示各个节点的状态,alive or dead
hbase> status 'detailed'           #各个节点存储的详细情况
hbase> status 'replication'
hbase> status 'replication', 'source'
hbase> status 'replication', 'sink'
hbase(main)::> status
active master, backup masters, servers, dead, 5.3333 average load 

  2. table_help (表的引用,通过获取一张表的引用来对这张表进行添加删除数据等等操作,现在不推荐使用)

hbase(main)::> help 'table_help'
 Help for table-reference commands.

 You can either create a table via 'create' and then manipulate the table via commands like 'put', 'get', etc.
See the standard help information for how to use each of these commands. However, as of 0.96, you can also get a reference to a table, on which you can invoke commands.
For instance, you can get create a table and keep around a reference to it via: hbase> t = create 't', 'cf' Or, if you have already created the table, you can get a reference to it: hbase> t = get_table 't' You can do things like call 'put' on the table: hbase> t.put 'r', 'cf:q', 'v' which puts a row 'r' with column family 'cf', qualifier 'q' and value 'v' into table t. To read the data out, you can scan the table: hbase> t.scan which will read all the rows in table 't'. Essentially, any command that takes a table name can also be done via table reference.
Other commands include things like: get, delete, deleteall,
get_all_columns, get_counter, count, incr. These functions, along with
the standard JRuby object methods are also available via tab completion. For more information on how to use each of these commands, you can also just type: hbase> t.help 'scan' which will output more information on how to use that command. You can also do general admin actions directly on a table; things like enable, disable,
flush and drop just by typing: hbase> t.enable
hbase> t.flush
hbase> t.disable
hbase> t.drop Note that after dropping a table, your reference to it becomes useless and further usage
is undefined (and not recommended).

  3. version (查看系统版本,hbase shell进入时也会打印显示,详细情况见http://www.cnblogs.com/husky/p/6374802.html)

 hbase(main)::> version
1.2.-cdh5.9.0, rUnknown, Fri Oct :: PDT

  4. whoami  (查看当前用户)

 hbase(main)::> whoami
xwtech (auth:SIMPLE)
groups: xwtech

最新文章

  1. 【BZOJ2874】训练士兵(主席树)
  2. Java 集合 — HashMap
  3. Android 中的 WebView实现 Html5 标签网页加载
  4. andorid SQLite数据库创建文件
  5. vi命令示例大全
  6. C# 文件读取(一)
  7. Java ZK image 處理
  8. windows API 实现截图
  9. jQuery Ajax 分页插件
  10. 七、Solr服务部署和安全
  11. (转载)js获取JqueryString方法小结
  12. gets()函数
  13. ASP.NET MVC5 学习笔记-5 测试
  14. Android高效内存1:一张图片占用多少内存
  15. Javascript、CSS、HTML面试题
  16. 网络协议 18 - CDN:家门口的小卖铺
  17. VMware虚拟机扩充硬盘容量
  18. Android入门第一课之Java基础
  19. ServletContextListener中的方法contextInitialized执行了两次
  20. Revit Family API 添加参数与尺寸标注

热门文章

  1. asp.net core mvc视频A:笔记3-4.母版页与部分视图
  2. 搭建nginx服务器和直播流媒体服务器
  3. sersync简介与测试报告
  4. 浅析Apache中RewriteCond规则参数的详细介绍
  5. Crashing Robots - poj 2632
  6. 【问题】:spring cloud sleuth日志组件冲突问题
  7. VirtualBox + CentOS 虚拟机网卡配置
  8. Github上好的Android开源框架
  9. centos7.0 安装pdo_mysql扩展
  10. Web前端开发规范【HTML/JavaScript/CSS】