[
https://issues.apache.org/jira/browse/KYLIN-1605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15261521#comment-15261521
]
Richard Calaba commented on KYLIN-1605:
---------------------------------------
One more addition - in last comment I wrote:
"To achieve this now -> it requires backup of metastore, manual selection of
relevant json files, manual modification of json files and then restore to the
target system from this modified metadata backup. Lot of manual steps - high
probability of human mistake."
Well I just tried the manual changes and import it back using metastore.sh
script. Import is fine, all seems perfectly consistent - but when trying to
Build the cube I am getting an error -> Inconsistent Cube Desc Signature ...
To workaround this error -> I have to manually after the metastore.sh restore
<srcDir> go to the Cube Admin UI -> Edit JSON and re-save (by modyfing cube
description) the JSON again to generate correct signature. That calls for
another new JIRA ticket , right ?? Why even we have the signature protection
concept for Cube Desc JSON ?? The other JSONs do not have it (good). Why then
Cube Desc ?? Shouldn't be the cube signature removed/ignored from Cube Desc
JSON ??? Or if need to be kept -> shouldn't the metastore.sh restore check it
and if invalid then correct it ???
How is the "signature" JSON field in Cube Desc even calculated ?? Some hash /
CRC / ECC ???
> Functionality to Export/Import Hive/Model/Cube Metadata - API
> -------------------------------------------------------------
>
> Key: KYLIN-1605
> URL: https://issues.apache.org/jira/browse/KYLIN-1605
> Project: Kylin
> Issue Type: New Feature
> Components: General
> Affects Versions: Future
> Reporter: Richard Calaba
> Priority: Critical
>
> Hello,
> I wonder what is the official way to copy a Kylin Cube definition from one
> system to another ??? I didn't find any official docu for that in Kylin. I
> also checked REST API and didn't find all building blocks which would be
> needed to achieve this.
> The scenario is to transfer Cube definition from one system to another system
> (like DEV to QAS / QAS to PRD, ...). So it can be rebuild there from that
> actual system's data.
> I imagine the functionality to be split into:
> 1) Export Hive Table Metadata (REST API) to JSON
> 2) Import Hive Table Metadata (REST API) from JSON - checks whether the Hive
> DB table meta in JSON is consistent with actual Hive DB table
> 3) Export Cube Model Metadata (REST API) to JSON
> 4) Import Cube Model Metadata (REST API) from JSON - checks whether the
> underlying Hive DB tables exists and are consistent with Model; returns new
> unique ID of the imported model
> 5) Export Cube Descriptor (metadata) (REST API) to JSON
> 6) Import Cube Descriptor (metadata) (REST API) from JSON. Check that Cube
> metadata is consistent (i.e. that the referred Model is existing in the
> system). Returns new unique ID of the imported Cube so it can be used for
> example to call Build Cube REST API after successful import.
> Optionally the Export/Import functions can be then connected to UI.
> Because of the Dependencies (Hive DB table Meta -> Cube Model -> Cube
> Descriptor) and because of the reusability of the building blocks (several
> Models referring same Hive DB Tables/Views; several Cubes referring same
> Model) we should have independent Export/Import REST APIs for each level
> separately (Hive DB meta / Model / Cube Descriptor).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)