kylin icon indicating copy to clipboard operation
kylin copied to clipboard

KYLIN-4567 Improve TopN merge performance in MR engine

Open guangxuCheng opened this issue 4 years ago • 7 comments

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)
  • [x] 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.

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

guangxuCheng avatar Jun 15 '20 08:06 guangxuCheng

Codecov Report

Merging #1259 into master will decrease coverage by 0.28%. The diff coverage is 14.31%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1259      +/-   ##
============================================
- Coverage     25.71%   25.43%   -0.29%     
- Complexity     6626     6732     +106     
============================================
  Files          1484     1505      +21     
  Lines         91185    93324    +2139     
  Branches      12726    13086     +360     
============================================
+ Hits          23452    23733     +281     
- Misses        65431    67252    +1821     
- Partials       2302     2339      +37     
Impacted Files Coverage Δ Complexity Δ
...main/java/org/apache/kylin/common/KylinConfig.java 38.29% <0.00%> (-2.08%) 29.00 <0.00> (+1.00) :arrow_down:
.../java/org/apache/kylin/common/KylinConfigBase.java 12.70% <0.00%> (+0.99%) 51.00 <0.00> (+7.00)
...org/apache/kylin/common/restclient/RestClient.java 15.25% <0.00%> (-3.11%) 6.00 <1.00> (ø)
...n/java/org/apache/kylin/common/util/CheckUtil.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...c/main/java/org/apache/kylin/cube/CubeSegment.java 42.27% <0.00%> (-6.25%) 65.00 <0.00> (ø)
...rg/apache/kylin/cube/gridtable/CubeCodeSystem.java 22.07% <0.00%> (-3.30%) 8.00 <0.00> (ø)
.../org/apache/kylin/cube/model/AggregationGroup.java 77.15% <ø> (ø) 85.00 <0.00> (ø)
...ain/java/org/apache/kylin/cube/model/CubeDesc.java 58.15% <0.00%> (-4.14%) 182.00 <0.00> (ø)
...va/org/apache/kylin/cube/model/DictionaryDesc.java 48.57% <0.00%> (-16.82%) 8.00 <0.00> (ø)
...apache/kylin/cube/model/HBaseColumnFamilyDesc.java 23.80% <0.00%> (-14.66%) 4.00 <0.00> (ø)
... and 103 more

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 b5ef6dd...b145eb7. Read the comment docs.

codecov-commenter avatar Jun 15 '20 09:06 codecov-commenter

@zzcclp update PR according to review comments. Thanks

guangxuCheng avatar Jul 09 '20 13:07 guangxuCheng

@guangxuCheng there are some failed test cases, please fix them.

zzcclp avatar Jul 10 '20 09:07 zzcclp

@guangxuCheng there are some failed test cases, please fix them.

@zzcclp Fixed. Please review, Thanks

guangxuCheng avatar Jul 13 '20 08:07 guangxuCheng

@shaofengshi please review, thanks.

zzcclp avatar Jul 16 '20 10:07 zzcclp

Pull Request Test Coverage Report for Build 6158

  • 18 of 23 (78.26%) changed or added relevant lines in 3 files are covered.
  • 7 unchanged lines in 3 files lost coverage.
  • Overall coverage increased (+0.02%) to 28.04%

Changes Missing Coverage Covered Lines Changed/Added Lines %
core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java 0 1 0.0%
core-metadata/src/main/java/org/apache/kylin/measure/topn/TopNAggregator.java 0 4 0.0%
<!-- Total: 18 23
Files with Coverage Reduction New Missed Lines %
core-metadata/src/main/java/org/apache/kylin/measure/topn/TopNAggregator.java 1 0%
tool/src/main/java/org/apache/kylin/tool/query/ProbabilityGenerator.java 1 83.33%
core-cube/src/main/java/org/apache/kylin/cube/inmemcubing/MemDiskStore.java 5 77.81%
<!-- Total: 7
Totals Coverage Status
Change from base Build 6149: 0.02%
Covered Lines: 26240
Relevant Lines: 93579

💛 - Coveralls

coveralls avatar Jul 16 '20 10:07 coveralls

LGTM

zzcclp avatar Jul 16 '20 15:07 zzcclp