KYLIN-5291 introducing redis as a distributed cache for kylin
Proposed changes
- Build the AbstractRedisClient class for introduction by other redis clients
- Introduce jedis client
- Create a MultiLevelCacheManager. Data is cached locally and remotely to prevent cache avalanches, and can be downgraded to local when distributed cache is unavailable
Branch to commit
- [ ] Branch kylin3 for v2.x to v3.x
- [x] Branch kylin4 for v4.x
- [ ] Branch kylin5 for v5.x
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 created 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
- [ ] I have added necessary documentation (if appropriate)
- [ ] Any dependent changes have been merged
Further comments
If this is a relatively large or complex change, kick off the discussion at [email protected] or [email protected] by explaining why you chose the solution you did and what alternatives you considered, etc...
This pull request introduces 1 alert when merging 467b8f5fae0d57fd536cef44162df5528daab744 into fd2977e21c51f1afed668f2d9713cf562f2dc42d - view on LGTM.com
new alerts:
- 1 for Implicit conversion from array to string
Hi, here I share a completed version on kylin5 branch for reference : https://github.com/apache/kylin/blob/kylin5/src/common-service/src/main/java/org/apache/kylin/rest/cache/RedisCache.java .
Besides, where can I find the config entry of enable/disable redis cache?
Besides, where can I find the config entry of enable/disable redis cache?
Originally, the bean was configured in server/src/main/resources/applicationContext.xml to enable/disable redis, but this method is not very good, I will modify it to enable/disable redis cache through the parameters of the configuration file
This pull request introduces 1 alert when merging 85b8831eed3f366110a29fd1b6f289bdc9edd386 into fd2977e21c51f1afed668f2d9713cf562f2dc42d - view on LGTM.com
new alerts:
- 1 for Implicit conversion from array to string
Heads-up: LGTM.com's PR analysis will be disabled on the 5th of December, and LGTM.com will be shut down ⏻ completely on the 16th of December 2022. Please enable GitHub code scanning, which uses the same CodeQL engine :gear: that powers LGTM.com. For more information, please check out our post on the GitHub blog.
The code was resubmitted with the following changes:
- Support to enable or disable redis through the configuration file.
- Refer to the kylin5 branch. On kylin4, redis already supports clearAll()
- redis support userCache
- For CR suggestions, modifications have been made @hit-lacus @Mukvin
@SeventeenToOne , I am glad to see you have fix these issues, but do you know why UT is not passed in Travis CI?
