Hbase 笔记(6) HBae Shell、REST、Thrift/Avro

来源:互联网 发布:淘宝护肤品模板 编辑:程序博客网 时间:2024/06/06 03:49

1、REST

支持现有的基于Web的体系,能够完美融合反向代理和其他缓存技术,并行运行许多Rest服务可以分摊他们之间的负载。


2、Thrift / Avro

当用户吞吐量角度考虑需要的最佳性能,可以使用严谨的二进制协议。


3、HBase Shell

hbase shell 基于JRuby


状态信息:status

版本:version

打开/关闭 调试模式:debug

获得某特定列族:get 'testtable', 'row-11', 'cf1'

获得某特定列:get 'testtable', 'row-11', 'cf1:a'

指定返回列数目:get 'testtable', 'row-11', MAXLENGTH => 60

创建表的选项: create 'testtable' ,  { NAME => 'cf1', VERSIONS => 1,  TTL => 2592000, BLOCKCACHE => true  }


管道运行命令: echo 'list' | hbase shell

运行脚本: hbase shell   ~/hbase-shell-cmd.rb

调用Java类:hbase(main):088:0>  java.util.Date.new(11111111111).toString()

循环:for i in '1'..'9'  do for j in 'a'..'z' do \

               put 't2',"row-#{i}#{j}","cf1:#{j}","#{j}" end end



--------------
待续




0 0
原创粉丝点击