Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KYLIN-4312 Specified cube when querying by API #1070

Merged
merged 2 commits into from Feb 3, 2020

Conversation

hit-lacus
Copy link
Member

@hit-lacus hit-lacus commented Jan 19, 2020

This is backend part, check https://issues.apache.org/jira/browse/KYLIN-4312.

After frontend part finsihed, should be look like this.
image

@hit-lacus
Copy link
Member Author

需求背景

  1. 数据缺失
    比如A这个人 她想查abcf四个维度 ,B这个人她想查bcd这三个维度,指标都一样。但是A是在 1月3号建了Cube,B是在8号建的Cube。
    这时候我查bc这两个维度的时候就会命中B的cube ,那前面的时间就没有了

  2. 满足测试
    测试时无法测试特定的Cube,只能频繁地Enable Disable Cube

测试

  1. 为两个设置相同的Cube 分别构建Segment,但是Segment Range不同

image

  1. WebUI 查询

命中SimpleCube_02
image

  1. 强制切换Cube,使之命中 SimpleCube_01
{  
   "sql":"select part_dt, count(*) from KYLIN_SALES group by part_dt order by part_dt",
   "offset":0,
   "limit":50000,
   "acceptPartial":false,
   "project":"learn_kylin",
   "backdoorToggles":{"DEBUG_TOGGLE_HIT_CUBE":"SimpleCube_01"}
}

image

@coveralls
Copy link

Pull Request Test Coverage Report for Build 5544

  • 0 of 4 (0.0%) changed or added relevant lines in 2 files are covered.
  • 11 unchanged lines in 5 files lost coverage.
  • Overall coverage decreased (-0.007%) to 27.509%

Changes Missing Coverage Covered Lines Changed/Added Lines %
core-common/src/main/java/org/apache/kylin/common/debug/BackdoorToggles.java 0 1 0.0%
query/src/main/java/org/apache/kylin/query/routing/QueryRouter.java 0 3 0.0%
Files with Coverage Reduction New Missed Lines %
core-dictionary/src/main/java/org/apache/kylin/dict/lookup/cache/RocksDBLookupTable.java 1 81.08%
query/src/main/java/org/apache/kylin/query/routing/QueryRouter.java 1 0%
core-job/src/main/java/org/apache/kylin/job/impl/threadpool/DefaultScheduler.java 2 80.23%
stream-core/src/main/java/org/apache/kylin/stream/core/storage/columnar/ColumnarStoreCache.java 2 57.95%
core-cube/src/main/java/org/apache/kylin/cube/inmemcubing/MemDiskStore.java 5 77.81%
Totals Coverage Status
Change from base Build 5537: -0.007%
Covered Lines: 24135
Relevant Lines: 87734

💛 - Coveralls

@codecov-io
Copy link

Codecov Report

Merging #1070 into master will decrease coverage by <.01%.
The diff coverage is 0%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1070      +/-   ##
============================================
- Coverage     25.05%   25.05%   -0.01%     
+ Complexity     6223     6222       -1     
============================================
  Files          1438     1438              
  Lines         87729    87734       +5     
  Branches      12257    12258       +1     
============================================
- Hits          21984    21982       -2     
- Misses        63596    63602       +6     
- Partials       2149     2150       +1
Impacted Files Coverage Δ Complexity Δ
...va/org/apache/kylin/query/routing/QueryRouter.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...org/apache/kylin/common/debug/BackdoorToggles.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...he/kylin/dict/lookup/cache/RocksDBLookupTable.java 72.97% <0%> (-5.41%) 6% <0%> (-1%)
...rg/apache/kylin/cube/inmemcubing/MemDiskStore.java 69.3% <0%> (-0.92%) 7% <0%> (ø)
...rg/apache/kylin/metadata/TableMetadataManager.java 58.2% <0%> (-0.3%) 26% <0%> (ø)
.../apache/kylin/cube/cuboid/TreeCuboidScheduler.java 66.15% <0%> (+2.3%) 0% <0%> (ø) ⬇️

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 b87753f...5bd802d. Read the comment docs.

@hit-lacus
Copy link
Member Author

hit-lacus commented Feb 3, 2020

Test

Env

Safari and chrome in latest mac os.

Prepare

image

Test Query

  • Force hit SECOND_KYLIN_SALES
    image

  • Force hit FIRST_KYLIN_SALES

image

@hit-lacus
Copy link
Member Author

LGTM

@hit-lacus hit-lacus merged commit 0b2b94e into apache:master Feb 3, 2020
@hit-lacus hit-lacus deleted the KYLIN-4312 branch March 18, 2020 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants