kylin icon indicating copy to clipboard operation
kylin copied to clipboard

KYLIN-4720 support htable read quota

Open fengpod opened this issue 5 years ago • 4 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)
  • [ ] 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"
  • [ ] 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...

fengpod avatar Aug 26 '20 08:08 fengpod

In order to avoid the pressure of massive queries on hbase,htable read quota is necessary。Through a new configuration “kylin.hbase.htable-quota”,we can control the read quota when the htable created。The default value of this conf is -1,means will not limit queries。You can set it to any intger greater than 0 as needed。

fengpod avatar Aug 26 '20 08:08 fengpod

Pull Request Test Coverage Report for Build 6291

  • 0 of 6 (0.0%) changed or added relevant lines in 2 files are covered.
  • 5 unchanged lines in 3 files lost coverage.
  • Overall coverage increased (+0.004%) to 28.061%

Changes Missing Coverage Covered Lines Changed/Added Lines %
core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java 0 1 0.0%
storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/CubeHTableUtil.java 0 5 0.0%
<!-- Total: 0 6
Files with Coverage Reduction New Missed Lines %
tool/src/main/java/org/apache/kylin/tool/query/ProbabilityGenerator.java 1 81.58%
stream-core/src/main/java/org/apache/kylin/stream/core/storage/CheckPointStore.java 2 73.74%
stream-core/src/main/java/org/apache/kylin/stream/core/storage/columnar/ColumnarStoreCache.java 2 57.95%
<!-- Total: 5
Totals Coverage Status
Change from base Build 6276: 0.004%
Covered Lines: 26249
Relevant Lines: 93544

💛 - Coveralls

coveralls avatar Aug 26 '20 09:08 coveralls

有个疑问,表级别设置quota的业务意义何在。 因为查询是跨segment的,也就是跨表,单张表限制quota了,但一次查询可能跨多张表。如果是防止查挂机器,那在ns级别或用户级别设置quota就可以了。 这么设置有些粗暴,一旦查询失败,如果单个sql超过quota,几乎就不可能成功了,如果要控制查询并发量,应该用其他方式。

bigxiaochu avatar Oct 20 '20 01:10 bigxiaochu

@bigxiaochu 这项配置支持项目级别和cube级别,对项目下的所有cube的所有segment或者某个cube的所有segment生效。是针对业务方高并发查询某个cube的数据占用大量regionserver资源从而影响核心业务查询。这种场景下超过quota限制是允许失败的。

fengpod avatar Oct 21 '20 05:10 fengpod