RELATEED CONSULTING
相关咨询
选择下列产品马上在线沟通
服务时间:8:30-17:00
你可能遇到了下面的问题
关闭右侧工具栏

新闻中心

这里有您想知道的互联网营销解决方案
kylin通过API增量build

官方文档参考:http://kylin.apache.org/cn/docs21/howto/howto_build_cube_with_restapi.html (写的不详细)

创新互联公司是一家朝气蓬勃的网站建设公司。公司专注于为企业提供信息化建设解决方案。从事网站开发,网站制作,网站设计,网站模板,微信公众号开发,软件开发,微信小程序,十载建站对火锅店设计等多个行业,拥有丰富的网站制作经验。

账户:我们使用的默认账户:ADMIN/KYLIN的basic认证码为:QURNSU46S1lMSU4=

格式如下:
curl -X PUT -H "Authorization: Basic QURNSU46S1lMSU4=" -H 'Content-Type: application/json' -d '{"endTime":'$endTime', "buildType":"BUILD"}' http:/$host:7070/kylin/api/cubes/$(cube_name)/rebuild

我的脚本:
···
‘’#!/bin/bash

kylinMinusTime=$((8 60 60 1000)) #8小时对应的毫秒时间,这里是utc时间,需要+8小时
today=date -d now +%Y-%m-%d
todayTimeStamp=date -d "$today 00:00:00" +%s
todayTimeStampMs=$(($todayTimeStamp
1000 + date "+%N"/1000000)) #将current转换为时间戳,精确到毫秒
endTime=$(($todayTimeStampMs+$kylinMinusTime))

curl -X PUT -H "Authorization: Basic QURNSU46S1lMSU4=" -H 'Content-Type: application/json' -d '{"endTime":'$endTime', "buildType":"BUILD"}' http://stream5:7070/kylin/api/cubes/campaignCube/rebuild
curl -X PUT -H "Authorization: Basic QURNSU46S1lMSU4=" -H 'Content-Type: application/json' -d '{"endTime":'$endTime', "buildType":"BUILD"}' http://stream5:7070/kylin/api/cubes/salesCube/rebuild
curl -X PUT -H "Authorization: Basic QURNSU46S1lMSU4=" -H 'Content-Type: application/json' -d '{"endTime":'$endTime', "buildType":"BUILD"}' http://stream5:7070/kylin/api/cubes/marketingCube/rebuild
···


文章标题:kylin通过API增量build
网址分享:http://scyingshan.cn/article/jpgcss.html