Hbase restFul API
获取hbase版本
curl -vi -X GET -H "Accept: text/xml" http://10.8.4.46:20550/version/cluster
1.2.6
获取集群状态:
curl -vi -X GET -H "Accept: text/xml" http://10.8.4.46:20550/status/cluster
4 live servers, 0 dead servers, 1.0000 average load
4 live servers
..........
获取hbase非系统表表名列表
curl -vi -X GET -H "Accept: text/xml" http://10.8.4.46:20550/
hbase_test
hbase_yarnlog
获取hbase所有的命名空间
curl -vi -X GET -H "Accept: text/xml" http://10.8.4.46:20550/namespaces
default
hbase
某个命名空间下表名
curl -vi -X GET -H "Accept: text/xml" http://10.8.4.46:20550/namespaces/namespace/tables
eg:curl -vi -X GET -H "Accept: text/xml" http://10.8.4.46:20550/namespaces/default/tables
hbase_test
hbase_yarnlog
获取表结构:
curl -vi -X GET -H "Accept: text/xml" http://10.8.4.46:20550/hbase_yarnlog/schema
{ NAME=> 'hbase_yarnlog', IS_META => 'false', COLUMNS => [ { NAME => 'yarnlog', DATA_BLOCK_ENCODING => 'NONE', BLOOMFILTER => 'ROW', REPLICATION_SCOPE => '0', VERSIONS => '1', COMPRESSION => 'NONE', MIN_VERSIONS => '0', TTL => '2147483647', KEEP_DELETED_CELLS => 'FALSE', BLOCKSIZE => '65536', IN_MEMORY => 'false', BLOCKCACHE => 'true' } ] }
获取表区域:
curl -vi -X GET -H "Accept: text/xml" http://10.8.4.46:20550/hbase_yarnlog/regions
hbase_yarnlog,,1519360842078.cb06e1f05268947e9598702137918f0e. [
id=1519360842078
startKey=''
endKey=''
location='108443.server.bigdata.com.cn:60020'
]
获取单个行的所有列,编码格式是 Base-64 encoded,需要再解码
curl -vi -X GET -H "Accept: text/xml" http://10.8.4.46:20550/table/row
eg:
curl -vi -X GET -H "Accept: text/xml" http://10.8.4.46:20550/hbase_yarnlog/application_1516606659120_0211
* About to connect() to 10.8.4.46 port 20550 (#0)
* Trying 10.8.4.46... connected
* Connected to 10.8.4.46 (10.8.4.46) port 20550 (#0)
> GET /hbase_yarnlog/application_1516606659120_0211 HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.3.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: 10.8.4.46:20550
> Accept: text/xml
>
< HTTP/1.1 200 OK
HTTP/1.1 200 OK
< Content-Type: text/xml
Content-Type: text/xml
< Content-Length: 4645
Content-Length: 4645
<
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><CellSet><Row key="YXBwbGljYXRpb25fMTUxNjYwNjY1OTEyMF8wMjEx"><Cell column="eWFybmxvZzpkdXJUaW1l" timestamp="1519717201909">NTMwMDA=</Cell><Cell column="eWFybmxvZzplcnJtc2c=" timestamp="1519717184359">PEVSUk9SPklORk86IFN0ZXAxX05vZGU4IGhGaWxlVG9IYmFzZSBUUkFDRTog5YWl5Y+CMD0iaGRmczovLzEwLjguNC43NDo4MDIwL3VzZXIvbHl5L2RhdGEvaGZpbGUiIFRSQUNFOiDlhaXlj4IxPUNvbmZpZ3VyYXRpb246IGNvcmUtZGVmYXVsdC54bWwsIGNvcmUtc2l0ZS54bWwsIHlhcm4tZGVmYXVsdC54bWwsIHlhcm4tc2l0ZS54bWwsIG1hcHJlZC1kZWZhdWx0LnhtbCwgbWFwcmVkLXNpdGUueG1sLCBoZGZzLWRlZmF1bHQueG1sLCBoZGZzLXNpdGUueG1sLCBoYmFzZS1kZWZhdWx0LnhtbCwgaGJhc2Utc2l0ZS54bWwgVFJBQ0U6IOWFpeWPgjI9ImhiYXNlX3Rlc3QiIElORk86IOmAu+i+kei/lOWbnuWAvD0xIElORk86IFN0ZXAxX05vZGUyIOato+W4uOe7k+adnyBJTkZPOiDnu5PmnZ/kuqTmmJMgPC9FUlJPUj4K</Cell><Cell column="eWFybmxvZzppZG1hcA==" timestamp="1519717194545">YXBwbGljYXRpb25fMTUxNjYwNjY1OTEyMF8wMjEyIA==</Cell><Cell column="eWFybmxvZzptYXhUaW1l" timestamp="1519717201909">MjAxOC0wMi0wOSAwOTo1Njo0Mw==</Cell><Cell column="eWFybmxvZzptaW5UaW1l" timestamp="1519717201909">MjAxOC0wMi0wOSAwOTo1NTo1MA==</Cell><Cell column="eWFybmxvZzpvb3ppZWFjdGlvbmlk" timestamp="1519717191278">MDAwMDAwOS0xODAyMDgxMjU0MjYyMjEtb296aWUtb296aS1XQHNwYXJr</Cell><Cell column="eWFybmxvZzpvb3ppZWpvYmlk" timestamp="1519717191278">MDAwMDAwOS0xODAyMDgxMjU0MjYyMjEtb296aWUtb296aS1X</Cell><Cell column="eWFybmxvZzpzcGFya3lhcm50YWdz" timestamp="1519717191278">b296aWUtY2Q4ZWE3MmE5YTdmNGFhOGVjMjhjMTRkMzRiNTdhYzA=</Cell><Cell column="eWFybmxvZzp0cmFkZWxvZw==" timestamp="1519717177817">SU5GTzogbG9nIHN0YXJ0OiBJTkZPOiDlvIDlp4vkuqTmmJMgIG9wSGJhc2U6b3BIYmFzZSBJTkZPOiBTdGVwMSBvcEhiYXNlIElORk86IFN0ZXAxX05vZGUxIOW8gOWniyBJTkZPOiBTdGVwMV9Ob2RlMyBTcGFya+WIneWni+WMliBUUkFDRTog5YWl5Y+CMD1fX1JFUV9fIERFQlVHOiDlvIDlp4vov57mjqVzcGFya+mbhue+pC4uLiAgREVCVUc6IEFwcE5hbWUgPSBudWxsIERFQlVHOiBzcGFya+mbhue+pOW3sui/nuaOpeWujOaIkCEgIElORk86IOmAu+i+kei/lOWbnuWAvD0xIFRSQUNFOiDlh7rlj4IwPW9yZy5hcGFjaGUuc3BhcmsuYXBpLmphdmEuSmF2YVNwYXJrQ29udGV4dEA3Y2E3OTU1MCBUUkFDRTog5Ye65Y+CMT1vcmcuYXBhY2hlLnNwYXJrLnNxbC5TcGFya1Nlc3Npb25AMjlmNGMzYzYgSU5GTzogU3RlcDFfTm9kZTQgaW5pdEhiYXNlIFRSQUNFOiDlhaXlj4IwPSIxMDg0NDcuc2VydmVyLmJpZ2RhdGEuY29tLmNuLDEwODQxOS5zZXJ2ZXIuYml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CwgaGRmcy1kZWZhdWx0LnhtbCwgaGRmcy1zaXRlLnhtbCwgaGJhc2UtZGVmYXVsdC54bWwsIGhiYXNlLXNpdGUueG1sIFRSQUNFOiDlhaXlj4IyPSJoYmFzZV90ZXN0IiBJTkZPOiDpgLvovpHov5Tlm57lgLw9MSBJTkZPOiBTdGVwMV9Ob2RlMiDmraPluLjnu5PmnZ8gSU5GTzog57uT5p2f5Lqk5piTIDwvRVJST1I+b3BIYmFzZSBJTkZPOiDohJrmnKzmiafooYzml7bpl7TvvJoxMDQ3NOavq+enkiBJTkZPOiBsb2cgZW5kOgo=</Cell></Row></CellSet>
获取单个列某个时间戳下的值。 值为Base-64编码。
curl -vi -X GET -H "Accept: text/xml" http://10.8.4.46:20550/hbase_yarnlog/application_1516606659120_0211/yarnlog:errmsg/1519717201909
* About to connect() to 10.8.4.46 port 20550 (#0)
* Trying 10.8.4.46... connected
* Connected to 10.8.4.46 (10.8.4.46) port 20550 (#0)
> GET /hbase_yarnlog/application_1516606659120_0211/yarnlog:errmsg/1519717201909 HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.3.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: 10.8.4.46:20550
> Accept: text/xml
>
< HTTP/1.1 200 OK
HTTP/1.1 200 OK
< Content-Type: text/xml
Content-Type: text/xml
< Content-Length: 745
Content-Length: 745
<
* Connection #0 to host 10.8.4.46 left intact
* Closing connection #0
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><CellSet><Row key="YXBwbGljYXRpb25fMTUxNjYwNjY1OTEyMF8wMjEx"><Cell column="eWFybmxvZzplcnJtc2c=" timestamp="1519717184359">PEVSUk9SPklORk86IFN0ZXAxX05vZGU4IGhGaWxlVG9IYmFzZSBUUkFDRTog5YWl5Y+CMD0iaGRmczovLzEwLjguNC43NDo4MDIwL3VzZXIvbHl5L2RhdGEvaGZpbGUiIFRSQUNFOiDlhaXlj4IxPUNvbmZpZ3VyYXRpb246IGNvcmUtZGVmYXVsdC54bWwsIGNvcmUtc2l0ZS54bWwsIHlhcm4tZGVmYXVsdC54bWwsIHlhcm4tc2l0ZS54bWwsIG1hcHJlZC1kZWZhdWx0LnhtbCwgbWFwcmVkLXNpdGUueG1sLCBoZGZzLWRlZmF1bHQueG1sLCBoZGZzLXNpdGUueG1sLCBoYmFzZS1kZWZhdWx0LnhtbCwgaGJhc2Utc2l0ZS54bWwgVFJBQ0U6IOWFpeWPgjI9ImhiYXNlX3Rlc3QiIElORk86IOmAu+i+kei/lOWbnuWAvD0xIElORk86IFN0ZXAxX05vZGUyIOato+W4uOe7k+adnyBJTkZPOiDnu5PmnZ/kuqTmmJMgPC9FUlJPUj4K</Cell></Row></CellSet>
获取单个列的值。 值为Base-64编码。
curl -vi -X GET -H "Accept: text/xml" http://10.8.4.46:20550/hbase_yarnlog/application_1516606659120_0211/yarnlog:errmsg
* About to connect() to 10.8.4.46 port 20550 (#0)
* Trying 10.8.4.46... connected
* Connected to 10.8.4.46 (10.8.4.46) port 20550 (#0)
> GET /hbase_yarnlog/application_1516606659120_0211/yarnlog:errmsg HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.3.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: 10.8.4.46:20550
> Accept: text/xml
>
< HTTP/1.1 200 OK
HTTP/1.1 200 OK
< Content-Type: text/xml
Content-Type: text/xml
< Content-Length: 745
Content-Length: 745
<
* Connection #0 to host 10.8.4.46 left intact
* Closing connection #0
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><CellSet><Row key="YXBwbGljYXRpb25fMTUxNjYwNjY1OTEyMF8wMjEx"><Cell column="eWFybmxvZzplcnJtc2c=" timestamp="1519717184359">PEVSUk9SPklORk86IFN0ZXAxX05vZGU4IGhGaWxlVG9IYmFzZSBUUkFDRTog5YWl5Y+CMD0iaGRmczovLzEwLjguNC43NDo4MDIwL3VzZXIvbHl5L2RhdGEvaGZpbGUiIFRSQUNFOiDlhaXlj4IxPUNvbmZpZ3VyYXRpb246IGNvcmUtZGVmYXVsdC54bWwsIGNvcmUtc2l0ZS54bWwsIHlhcm4tZGVmYXVsdC54bWwsIHlhcm4tc2l0ZS54bWwsIG1hcHJlZC1kZWZhdWx0LnhtbCwgbWFwcmVkLXNpdGUueG1sLCBoZGZzLWRlZmF1bHQueG1sLCBoZGZzLXNpdGUueG1sLCBoYmFzZS1kZWZhdWx0LnhtbCwgaGJhc2Utc2l0ZS54bWwgVFJBQ0U6IOWFpeWPgjI9ImhiYXNlX3Rlc3QiIElORk86IOmAu+i+kei/lOWbnuWAvD0xIElORk86IFN0ZXAxX05vZGUyIOato+W4uOe7k+adnyBJTkZPOiDnu5PmnZ/kuqTmmJMgPC9FUlJPUj4K</Cell></Row></CellSet>
创建scanner 扫描对象,batch="100"即每批次扫描100行,值为Base-64编码
curl -vi -X PUT -H "Accept: text/xml" -H "Content-Type: text/xml" -d '<Scanner batch="100"/>' http://10.8.4.46:20550/hbase_yarnlog/scanner/
* About to connect() to 10.8.4.46 port 20550 (#0)
* Trying 10.8.4.46... connected
* Connected to 10.8.4.46 (10.8.4.46) port 20550 (#0)
> PUT /hbase_yarnlog/scanner/ HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.3.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: 10.8.4.46:20550
> Accept: text/xml
> Content-Type: text/xml
> Content-Length: 22
>
< HTTP/1.1 201 Created
HTTP/1.1 201 Created
< Location: http://10.8.4.46:20550/hbase_yarnlog/scanner/1520413092046101ffa12
Location: http://10.8.4.46:20550/hbase_yarnlog/scanner/1520413092046101ffa12
< Content-Length: 0
Content-Length: 0
<
* Connection #0 to host 10.8.4.46 left intact
* Closing connection #0
curl -vi -X GET -H "Accept: text/xml" http://10.8.4.46:20550/hbase_yarnlog/scanner/1520413092046101ffa12
* About to connect() to 10.8.4.46 port 20550 (#0)
* Trying 10.8.4.46... connected
* Connected to 10.8.4.46 (10.8.4.46) port 20550 (#0)
> GET /hbase_yarnlog/scanner/1520413092046101ffa12 HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.3.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: 10.8.4.46:20550
> Accept: text/xml
>
< HTTP/1.1 200 OK
HTTP/1.1 200 OK
< Cache-Control: no-cache
Cache-Control: no-cache
< Content-Type: text/xml
Content-Type: text/xml
< Content-Length: 17834
Content-Length: 17834
<
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><CellSet><Row key="YXBwbGljYXRpb25fMTUxNjYwNjY1OTEyMF8wMjEx"><Cell column="eWFybmxvZzpkdXJUaW1l" timestamp="1519717201909">NTMwMDA=</Cell><Cell column="eWFybmxvZzplcnJtc2c=" timestamp="1519717184359">PEVSUk9SPklORk86IFN0ZXAxX05vZGU4IGhGaWxlVG9IYmFzZSBUUkFDRTog5YWl5Y+CMD0iaGRmczovLzEwLjguNC43NDo4MDIwL3VzZXIvbHl5L2RhdGEvaGZpbGUiIFRSQUNFOiDlhaXlj4IxPUNvbmZpZ3VyYXRpb246IGNvcmUtZGVmYXVsdC54bWwsIGNvcmUtc2l0ZS54bWwsIHlhcm4tZGVmYXVsdC54bWwsIHlhcm4tc2l0ZS54bWwsIG1hcHJlZC1kZWZhdWx0LnhtbCwgbWFwcmVkLXNpdGUueG1sLCBoZGZzLWRlZmF1bHQueG1sLCBoZGZzLXNpdGUueG1sLCBoYmFzZS1kZWZhdWx0LnhtbCwgaGJhc2Utc2l0ZS54bWwgVFJBQ0U6IOWFpeWPgjI9ImhiYXNlX3Rlc3QiIElORk86IOmAu+i+kei/lOWbnuWAvD0xIElORk86IFN0ZXAxX05vZGUyIOato+W4uOe7k+adnyBJTkZPOiDnu5PmnZ/kuqTmmJMgPC9FUlJPUj4K</Cell><Cell column="eWFybmxvZzppZG1hcA==" timestamp="1519717194545">YXBwbGljYXRpb25fMTUxNjYwNjY1OTEyMF8wMjEyIA==
删除scanner 扫描对象,释放资源
curl -vi -X DELETE -H "Accept: text/xml" http://10.8.4.46:20550/hbase_yarnlog/scanner/1520413092046101ffa12
* About to connect() to 10.8.4.46 port 20550 (#0)
* Trying 10.8.4.46... connected
* Connected to 10.8.4.46 (10.8.4.46) port 20550 (#0)
> DELETE /hbase_yarnlog/scanner/1520413092046101ffa12 HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.3.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: 10.8.4.46:20550
> Accept: text/xml
>
< HTTP/1.1 200 OK
HTTP/1.1 200 OK
< Content-Length: 0
Content-Length: 0
<
* Connection #0 to host 10.8.4.46 left intact
* Closing connection #0
Hbase restFul API的更多相关文章
- Hbase RESTFul API创建namespace返回500
1.使用官方提供的/namespaces/namespace创建namespace失败,返回500,官方提供示例:/namespaces/namespace POST 创建一个新的namespace. ...
- (转载) RESTful API 设计指南
作者: 阮一峰 日期: 2014年5月22日 网络应用程序,分为前端和后端两个部分.当前的发展趋势,就是前端设备层出不穷(手机.平板.桌面电脑.其他专用设备......). 因此,必须有一种统一的机制 ...
- Node.js实现RESTful api,express or koa?
文章导读: 一.what's RESTful API 二.Express RESTful API 三.KOA RESTful API 四.express还是koa? 五.参考资料 一.what's R ...
- Restful Api 最佳实践
Web APIs has become an very important topic in the last year. We at M-Way Solutions are working ever ...
- 基于轻量型Web服务器Raspkate的RESTful API的实现
在上一篇文章中,我们已经了解了Raspkate这一轻量型Web服务器,今天,我们再一起了解下如何基于Raspkate实现简单的RESTful API. 模块 首先让我们了解一下"模块&quo ...
- RESTful Api 身份认证安全性设计
REST是一种软件架构风格.RESTful Api 是基于 HTTP 协议的 Api,是无状态传输.它的核心是将所有的 Api 都理解为一个网络资源.将所有的客户端和服务器的状态转移(动作)封装到 H ...
- 深入理解 RESTful Api 架构
转自https://mengkang.net/620.html 一些常见的误解 不要以为 RESTful Api 就是设计得像便于 SEO 的伪静态,例如一个 Api 的 URL 类似于 http: ...
- 使用Flask设计带认证token的RESTful API接口[翻译]
上一篇文章, 使用python的Flask实现一个RESTful API服务器端 简单地演示了Flask实的现的api服务器,里面提到了因为无状态的原则,没有session cookies,如果访问 ...
- RESTful API 设计指南
转自:http://www.ruanyifeng.com/blog/2014/05/restful_api.html 网络应用程序,分为前端和后端两个部分.当前的发展趋势,就是前端设备层出不穷(手机. ...
随机推荐
- optimize table 删除空洞--MYSQL
来看看手册中关于 OPTIMIZE 的描述: OPTIMIZE [LOCAL | NO_WRITE_TO_BINLOG] TABLE tbl_name [, tbl_name] ... 如果您已经删除 ...
- 复习宝典之Spring
查看更多宝典,请点击<金三银四,你的专属面试宝典> 第六章:Spring Spring容器是Spring的核心,一切Spring bean都存储在Spring容器内,并由其通过IoC技术管 ...
- SQL优化例子
如下SQL的优化: select count(*) from ( select id,name,col1,col2 from t1 where name='xxxx' union select id ...
- PHP | 获取数组长度的方法
一.获取一维数组的长度 count.sizeof 都可以直接统计一维数组长度. 例如:$arr = Array('0','1','2','3','4'); echo count($arr) ...
- 06JavaScript变量
JavaScript 变量 变量是用于存储信息的"容器". var x=5; var y=6; var z=x+y; 就像代数那样 x=5 y=6 z=x+y 在代数中,我们使用字 ...
- Scala 语法(一)
(1)基本语法 变量 val var(可变变量): 数据类型 Byte,Char,Int,Short,Long,String(字符),Float,Double,Boolean(true,flase). ...
- usb之鼠标作为按键输入
1. 首先搞清楚,鼠标点左键.右键等能得到什么数据,然后分析这些数据上报事件即可. 第一个基本点:usb_alloc_urb函数,创建一个struct urb结构体,只能使用这个函数来创建,它是urb ...
- ruby 条件判断&循环控制
参考:https://www.jb51.net/article/66709.htm
- 推荐 的FPGA设计经验(2)-时钟策略优化
Optimizing Clocking Schemes Avoid using internally generated clocks (other than PLLs) wherever possi ...
- SSM-Spring-23:概念《Spring中的事务是什么?》
------------吾亦无他,唯手熟尔,谦卑若愚,好学若饥------------- 本篇博客会详细讲述Spring中的事务,会展开来用语言解释,用于了解概念和准备面试 事务的概念: 一个或者一组 ...