Skip to content

Comments

KYLIN-4817 Refine CubeMigrationCLI for kylin4#1496

Merged
hit-lacus merged 1 commit intoapache:kylin-on-parquet-v2from
zhangayqian:KYLIN-4817
Dec 4, 2020
Merged

KYLIN-4817 Refine CubeMigrationCLI for kylin4#1496
hit-lacus merged 1 commit intoapache:kylin-on-parquet-v2from
zhangayqian:KYLIN-4817

Conversation

@zhangayqian
Copy link
Contributor

Proposed changes

Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue.

Types of changes

What types of changes does your code introduce to Kylin?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • I have create an issue on Kylin's jira, and have described the bug/feature there in detail
  • Commit messages in my PR start with the related jira ID, like "KYLIN-0000 Make Kylin project open-source"
  • Compiling and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • If this change need a document change, I will prepare another pr against the document branch
  • Any dependent changes have been merged

Further comments

If this is a relatively large or complex change, kick off the discussion at user@kylin or dev@kylin by explaining why you chose the solution you did and what alternatives you considered, etc...

@zhangayqian
Copy link
Contributor Author

zhangayqian commented Dec 4, 2020

Test Evidence

  • src kylin instance url: ADMIN:KYLIN@10.1.3.94:7070
  • target Kylin instance url: ADMIN:KYLIN@10.1.3.93:7072
  • migrate cube: kylin_sales_cube
  • src project: learn_kylin
  • target project: test_migration_kylin

  • cmd
bin/kylin.sh org.apache.kylin.tool.CubeMigrationCLI ADMIN:KYLIN@10.1.3.94:7070 ADMIN:KYLIN@10.1.3.93:7072 kylin_sales_cube test_migration_kylin true false true true true
  • Result:
    kylin_sales_cube be migrated to project test_migration_kylin of 10.1.3.93:7072, and the related hdfs resource(dict、snapshot、parquet file) be copied to target kylin instance HDFS working dir.

  • Migrate log

image

  • Migrated cube can be queried

image

@codecov-io
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (kylin-on-parquet-v2@c7e08d6). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@                  Coverage Diff                   @@
##             kylin-on-parquet-v2    #1496   +/-   ##
======================================================
  Coverage                       ?   24.12%           
  Complexity                     ?     4611           
======================================================
  Files                          ?     1136           
  Lines                          ?    64388           
  Branches                       ?     9501           
======================================================
  Hits                           ?    15536           
  Misses                         ?    47240           
  Partials                       ?     1612           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c7e08d6...e0cfed8. Read the comment docs.

}

public void checkMigrationSuccess(KylinConfig kylinConfig, String cubeName, Boolean ifFix) throws IOException {
CubeMigrationCheckCLI checkCLI = new CubeMigrationCheckCLI(kylinConfig, ifFix);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After remove HBase, looks like we do not need CubeMigrationCheckCLI any more.

for (DictionaryDesc dictionaryDesc : cubeDesc.getDictionaries()) {
String[] columnInfo = dictionaryDesc.getColumnRef().getColumnWithTable().split("\\.");
String globalDictPath;
if (columnInfo.length == 3) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In which case columnInfo.length is not 3?

Copy link
Member

@hit-lacus hit-lacus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved.

Thank you for contribution. @zhangayqian

@hit-lacus hit-lacus merged commit cd449ea into apache:kylin-on-parquet-v2 Dec 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants