[ 
https://issues.apache.org/jira/browse/KYLIN-1605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15253926#comment-15253926
 ] 

Shaofeng SHI commented on KYLIN-1605:
-------------------------------------

--- what is the official way to copy a Kylin Cube definition from one system to 
another ???

There is a tool for you to quickly release (migrate) a cube from an env to 
another;

For example, from staging (kylin-qa:7070) to production (kylin-prod:7070):

./bin/kylin.sh org.apache.kylin.storage.hbase.util.CubeMigrationCLI 
kylin-qa:7070  kylin-prod:7070  cube_name  project_name true false false false

With the last parameter be "false", it won't really execute the migration, just 
print on which resources will be moved. You can have a check and then change 
the last parater to "true" and run it, it will copy the metadata to target 
server; the underlying hdfs resources and htables will also be updated to the 
target env (assuming both env run in the same hadoop cluster)

If you're running kylin 1.5.0/1.5.1, please note this bug: 
https://issues.apache.org/jira/browse/KYLIN-1592



> 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
>
> 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)

Reply via email to