Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Kylin increments build through API

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

Official documentation reference: http://kylin.apache.org/cn/docs21/howto/howto_build_cube_with_restapi.html (not detailed)

Account: the default account we use: ADMIN/KYLIN 's basic authentication code is: QURNSU46S1lMSU4=

The format is as follows:

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

My script:

'#! / bin/bash

KylinMinusTime=$ ((8 60 60 1000)) # milliseconds corresponding to 8 hours. Here is the utc time, which takes + 8 hours.

Today=date-d now +% Y-%m-%d

TodayTimeStamp=date-d "$today 00:00:00" + s

TodayTimeStampMs=$ (($todayTimeStamp1000 + date "+% N" / 1000000)) # converts current to a timestamp, accurate to milliseconds

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

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report