调用kylin的restAPI接口构建cube
2017-08-15 16:03
459 查看
调用kylin的restAPI接口构建cube
1. 调用cube的构建操作
curl -X PUT -H "Authorization: Basic QURNSU46IUB3c3VPOTAtQw==" -H 'Content-Type: application/json' -d '{"startTime":'1501632000000', "endTime":'1501718400000', "buildType":"BUILD"}' http://10.214.234.111:7070/kylin//api/cubes/test_cube_gov_hall_movie_box/build[/code] kylin的cube的buid操作需要输入的参数:{ "startTime":'1501632000000', "endTime":'1501718400000', "buildType":"BUILD" }
其中kylinUI上默认的时间是8点整。2017/8/3 08时0分0秒转换成毫秒数,就是开始startTime的值。
startTime 和endTime都需要是每天的8点整的毫秒数。
调用kylin restapi的权限认证:使用Base64编码的用户名和密码,作为权限码。
可以使用如下方法生成Base64编码。public class Base64Demo { public static void main(String[] args){ String encode_str = "ADMIN:!@wsuO90-C"; String decode_str = "QURNSU46S1lMSU4="; try{ // 编码 byte[] encodeBase64 = Base64.encodeBase64(encode_str.getBytes("UTF-8")); System.out.println("ENCODE RESULT: " +new String(encodeBase64)); // 解码 byte[] decodeBase64 = Base64.decodeBase64(decode_str.getBytes("UTF-8")); System.out.println("DECODE RESULT: " +new String(decodeBase64)); } catch(UnsupportedEncodingException e){ e.printStackTrace(); } } }
参考官方说明文档
http://kylin.apache.org/docs/howto/howto_build_cube_with_restapi.html2. 删除kylin中无用的segment
REST API for deleting segment
https://issues.apache.org/jira/browse/KYLIN-1540curl -X DELETE -H "Authorization: Basic QURNSU46IUB3c3VPOTAtQw==" http://10.214.234.111:7070/kylin/api/cubes/test_cube_gov_hall_movie_box/segs/19700118090516_19700118090643[/code]
相关文章推荐
- Spring中使用RestTemplate调用第三方接口API
- Python调用REST API接口的几种方式 推荐
- 如何使用python3调用openstack keystone identity REST api接口获取X-AUTH-TOKEN
- Atitit 图像处理之编程之类库调用的接口api cli gui ws rest attilax大总结.docx
- Ryu控制器部署及其与Rest API接口调用问题解决
- REST API调用keystone
- 调用支付宝PHP接口API实现在线即时支付功能(UTF-8编码)
- java调用Jenkins接口api
- 利用resteasy框架构建rest webservice----第五波:java代码调用乱码解决方案
- 在Java程序中调用Salesforce REST API
- python 调用航空公司的接口 获取机票数据 api简单案例
- Jenkins RestAPI调用出现Error 403 No valid crumb was included in the request
- Java调用 新浪微博API 接口发微博,逐条讲解,绝对清晰
- 【Python】调用百度REST API实现语音识别
- 如何在kylin中构建一个cube
- Python3调用face++免费API接口识别身份证信息
- Ryu基本操作的REST API调用演示样例
- RestEasy 调用Rest接口使用详解
- SpringMVC构建REST接口:第六篇 服务层实现
- html调用hadoop WebHDFS REST API