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 网络应用程序,分为前端和后端两个部分.当前的发展趋势,就是前端设备层出不穷(手机. ...
随机推荐
- css代码添加背景图片常用代码
css代码添加背景图片常用代码 1 背景颜色 { font-size: 16px; content: ""; display: block; width: 700px; heigh ...
- 入门——Bootstrap栅格系统
作为刚接触到Bootstrap框架的新手一枚,刚开始对Bootstrap中的栅格系统一脸懵逼,后来经过反复的上网查找资料以及自己一直在练习,总算对栅格系统了解个差不多,所以我将我所了解的当成是日记写下 ...
- 选择排序_c++
选择排序_c++ GitHub 文解 选择排序的核心思想是对于 N 个元素进行排序时,对其进行 K = (N - 1) 次排序,每次排序从后(N + 1 - K)个数值中选择最小的元素与以 (K - ...
- 『ACM C++』 Codeforces | 1005D - Polycarp and Div 3
今天佛了,魔鬼周一,在线教学,有点小累,但还好,今天AC了一道,每日一道,还好达成目标,还以为今天完不成了,最近任务越来越多,如何高效完成该好好思考一下了~最重要的还是学业的复习和预习. 今日兴趣新闻 ...
- Java5~11新特性
Java5~11版本新特性 Java5 Java6 Java7 Java8 Java9 Java10 Java11 Java5 Java5开发代号为Tiger(老虎),于2004-09-30发行 特性 ...
- jquery优化
选择器优化执行的速度 选择器 优先:id>元素>类 使用对象缓存:即使用变量来保存对象名,var $myDiv = $("#myDiv"):$myDiv.show(); ...
- django的Request-7
目录 1. 从url中获取截取 2. QueryDict (1). QueryDict.get(key, [default]) (2). QueryDict.getlist(key, [default ...
- kubernetes基础使用
查看节点详细信息 kubectl describe node vm2 显示版本号 kubectl version Client Version: version.Info{Major:"1& ...
- 流程控制之--if。
假如把写程序比做走路,那我们到现在为止,一直走的都是直路,还没遇到过分叉口,想象现实中,你遇到了分叉口,然后你决定往哪拐必然是有所动机的.你要判断那条岔路是你真正要走的路,如果我们想让程序也能处理这样 ...
- Facebook 被指收集用户数据:通过照片和文本
北京时间5月25日消息,在加利福尼亚州进行的对Facebook泄露用户信息一案中,法院对Facebook提起一项新的诉讼,指控该公司通过App收集了用户及他们朋友的信息. 上周向加利福尼亚州圣马特奥市 ...