kylin icon indicating copy to clipboard operation
kylin copied to clipboard

KYLIN-4423 use spring session to support clustered sessions

Open xiacongling opened this issue 4 years ago • 2 comments

Proposed changes

Add spring session to manage user sessions and a Redis Session Repository as a plugin.

Types of changes

  • [ ] 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

  • [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
  • [x] 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
  • [ ] Any dependent changes have been merged

Further comments

PR #1163 need to be merged to fix a bug for password decryption

To try this feature, one should add and edit the following properties in conf/kylin.properites:

kylin.security.additional-profiles=session-redis
#kylin.session.redis.host=127.0.0.1
#kylin.session.redis.port=6379
#kylin.session.redis.password=

see also: https://issues.apache.org/jira/browse/KYLIN-4423

xiacongling avatar Mar 10 '20 15:03 xiacongling

Pull Request Test Coverage Report for Build 5789

  • 13 of 42 (30.95%) changed or added relevant lines in 2 files are covered.
  • 344 unchanged lines in 9 files lost coverage.
  • Overall coverage decreased (-0.03%) to 27.481%

Changes Missing Coverage Covered Lines Changed/Added Lines %
server-base/src/main/java/org/apache/kylin/rest/session/KylinSessionFilter.java 4 12 33.33%
server-base/src/main/java/org/apache/kylin/rest/session/KylinSessionConfig.java 9 30 30.0%
<!-- Total: 13 42
Files with Coverage Reduction New Missed Lines %
engine-mr/src/main/java/org/apache/kylin/engine/mr/steps/CreateDictionaryJob.java 1 0%
core-cube/src/main/java/org/apache/kylin/cube/inmemcubing/MemDiskStore.java 3 78.42%
engine-mr/src/main/java/org/apache/kylin/engine/mr/common/MapReduceExecutable.java 3 14.76%
server-base/src/main/java/org/apache/kylin/rest/service/DiagnosisService.java 5 32.14%
core-common/src/main/java/org/apache/kylin/common/util/ToolUtil.java 18 21.28%
core-common/src/main/java/org/apache/kylin/common/util/HadoopUtil.java 40 18.45%
tool/src/main/java/org/apache/kylin/tool/JobDiagnosisInfoCLI.java 41 0%
tool/src/main/java/org/apache/kylin/tool/DiagnosisInfoCLI.java 77 0%
core-cube/src/main/java/org/apache/kylin/cube/CubeManager.java 156 41.59%
<!-- Total: 344
Totals Coverage Status
Change from base Build 5753: -0.03%
Covered Lines: 24332
Relevant Lines: 88540

💛 - Coveralls

coveralls avatar Mar 10 '20 17:03 coveralls

Codecov Report

Merging #1157 into master will decrease coverage by 0.04%. The diff coverage is 28.57%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1157      +/-   ##
============================================
- Coverage     25.06%   25.02%   -0.05%     
- Complexity     6248     6258      +10     
============================================
  Files          1446     1451       +5     
  Lines         88305    88540     +235     
  Branches      12357    12379      +22     
============================================
+ Hits          22131    22154      +23     
- Misses        64004    64211     +207     
- Partials       2170     2175       +5     
Impacted Files Coverage Δ Complexity Δ
.../apache/kylin/rest/session/KylinSessionConfig.java 26.66% <26.66%> (ø) 2.00 <2.00> (?)
.../apache/kylin/rest/session/KylinSessionFilter.java 33.33% <33.33%> (ø) 4.00 <4.00> (?)
...he/kylin/dict/lookup/cache/RocksDBLookupTable.java 72.97% <0.00%> (-5.41%) 6.00% <0.00%> (-1.00%)
...rg/apache/kylin/cube/inmemcubing/MemDiskStore.java 70.21% <0.00%> (-0.92%) 7.00% <0.00%> (ø%)
...he/kylin/engine/mr/common/MapReduceExecutable.java 12.91% <0.00%> (-0.42%) 6.00% <0.00%> (ø%)
...c/main/java/org/apache/kylin/cube/CubeManager.java 36.50% <0.00%> (-0.12%) 44.00% <0.00%> (ø%)
...n/java/org/apache/kylin/tool/DiagnosisInfoCLI.java 0.00% <0.00%> (ø) 0.00% <0.00%> (ø%)
...ava/org/apache/kylin/tool/JobDiagnosisInfoCLI.java 0.00% <0.00%> (ø) 0.00% <0.00%> (ø%)
.../java/org/apache/kylin/common/util/HadoopUtil.java 14.56% <0.00%> (ø) 10.00% <0.00%> (ø%)
...rg/apache/kylin/rest/service/DiagnosisService.java 26.78% <0.00%> (ø) 6.00% <0.00%> (ø%)
... and 27 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 b61d498...cba5515. Read the comment docs.

codecov-io avatar Mar 26 '20 18:03 codecov-io