<!--
Thanks for sending a pull request!
Here are some tips for you:
1. If this is your first time, please read our contributor guidelines: https://kyuubi.readthedocs.io/en/latest/community/contributions.html
2. If the PR is related to an issue in https://github.com/NetEase/kyuubi/issues, add '[KYUUBI #XXXX]' in your PR title, e.g., '[KYUUBI #XXXX] Your PR title ...'.
3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][KYUUBI #XXXX] Your PR title ...'.
-->
### _Why are the changes needed?_
<!--
Please clarify why the changes are needed. For instance,
1. If you add a feature, you can talk about the use case of it.
2. If you fix a bug, you can clarify why it is a bug.
-->
1. refine the zk lock to lock only during engine bootstrapping, not wrap the part that only gets the address of engines. This can significantly reduce overhead.
2. add tests for the locking proccess.
### _How was this patch tested?_
- [x] Add some test cases that check the changes thoroughly including negative and positive cases if possible
- [ ] Add screenshots for manual tests if appropriate
- [x] [Run test](https://kyuubi.readthedocs.io/en/latest/tools/testing.html#running-tests) locally before make a pull request
Closes#629 from yaooqinn/lock.
Closes#629
a1b4e5f1 [Kent Yao] Refine distributed lock to lock only engine bootstrap
a6738652 [Kent Yao] Refine distributed lock to lock only engine bootstrap
ff238e6f [Kent Yao] Refine distributed lock to lock only engine bootstrap
f3979fce [Kent Yao] Refine distributed lock to lock only engine bootstrap
e8ca9954 [Kent Yao] Refine distributed lock to lock only engine bootstrap
Authored-by: Kent Yao <yao@apache.org>
Signed-off-by: Cheng Pan <379377944@qq.com>
<!--
Thanks for sending a pull request!
Here are some tips for you:
1. If this is your first time, please read our contributor guidelines: https://kyuubi.readthedocs.io/en/latest/community/contributions.html
2. If the PR is related to an issue in https://github.com/NetEase/kyuubi/issues, add '[KYUUBI #XXXX]' in your PR title, e.g., '[KYUUBI #XXXX] Your PR title ...'.
3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][KYUUBI #XXXX] Your PR title ...'.
-->
### _Why are the changes needed?_
<!--
Please clarify why the changes are needed. For instance,
1. If you add a feature, you can talk about the use case of it.
2. If you fix a bug, you can clarify why it is a bug.
-->
This PR adds multiple engine support for non-connection share levels. A new configuration called `kyuubi.engine.share.level.sub.domain` is added for this functionality. For simplification, the configuration only accepts [1, 10]-length case insensitive string, only '_' and alphabets are valid.
Unlike connection mode, user mode supports the "long-running" feature across different JDBC connections. But the current implementation only is able to create one engine for a user. End-users don't want to put all eggs into one basket. It's not only less robust and flexible for a static engine to handle different workloads, and also hard to leverage failover when there is a zombied engine being cached.
With multiple engines support, end-users are able to
1. create as many engines as they want to meet the concurrency.
2. leverage different queue/namespace resource with long-running mode
3. can give different resources or priorities to their own engines for different workloads
4. can perform fast failover by creating a new sub domain
5. etc.
### _How was this patch tested?_
- [x] Add some test cases that check the changes thoroughly including negative and positive cases if possible
- [ ] Add screenshots for manual tests if appropriate
- [x] [Run test](https://kyuubi.readthedocs.io/en/latest/tools/testing.html#running-tests) locally before make a pull request
Closes#627 from yaooqinn/multipleengines.
Closes#627
9f04bc3e [Kent Yao] fix tests
d7af751e [Kent Yao] address comments
be9c46d8 [Kent Yao] address comments
ccce87d7 [Kent Yao] address comments
d49116c7 [Kent Yao] Support multiple engines for non-connection share levels
f1d8bc17 [Kent Yao] Support multiple engines for non-connection share levels
Authored-by: Kent Yao <yao@apache.org>
Signed-off-by: Cheng Pan <379377944@qq.com>
<!--
Thanks for sending a pull request!
Here are some tips for you:
1. If this is your first time, please read our contributor guidelines: https://kyuubi.readthedocs.io/en/latest/community/contributions.html
2. If the PR is related to an issue in https://github.com/NetEase/kyuubi/issues, add '[KYUUBI #XXXX]' in your PR title, e.g., '[KYUUBI #XXXX] Your PR title ...'.
3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][KYUUBI #XXXX] Your PR title ...'.
-->
### _Why are the changes needed?_
<!--
Please clarify why the changes are needed. For instance,
1. If you add a feature, you can talk about the use case of it.
2. If you fix a bug, you can clarify why it is a bug.
-->
We may create multiple SparkContext in non-CONNECTION ShareLevel.
### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible
- [ ] Add screenshots for manual tests if appropriate
- [ ] [Run test](https://kyuubi.readthedocs.io/en/latest/tools/testing.html#running-tests) locally before make a pull request
Closes#624 from Honglun/feature/lock.
Closes#624
87445522 [Honglun] Add lock while creating engine with non-CONNECTION mode
Authored-by: Honglun <283471011@qq.com>
Signed-off-by: Cheng Pan <379377944@qq.com>
<!--
Thanks for sending a pull request!
Here are some tips for you:
1. If this is your first time, please read our contributor guidelines: https://kyuubi.readthedocs.io/en/latest/community/contributions.html
2. If the PR is related to an issue in https://github.com/NetEase/kyuubi/issues, add '[KYUUBI #XXXX]' in your PR title, e.g., '[KYUUBI #XXXX] Your PR title ...'.
3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][KYUUBI #XXXX] Your PR title ...'.
-->
### _Why are the changes needed?_
<!--
Please clarify why the changes are needed. For instance,
1. If you add a feature, you can talk about the use case of it.
2. If you fix a bug, you can clarify why it is a bug.
-->
TL;DR The UnboundID LDAP SDK for Java has much friendly API and zero dependencies.
https://ldap.com/unboundid-ldap-sdk-for-java/
Apache Directory Service vs UnboundID LDAP SDK
1. Apache Directory Service is quite heavy stuff compare to our requirement, we just need a embedded LDAP server for UT.
2. The API of Apache Directory Service and Java Naming are not straightforward, because it's not specifically designed for LDAP.
3. Apache Directory Service provided a single fat-jar contains dependencies which aren't relocated.
### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible
- [ ] Add screenshots for manual tests if appropriate
- [x] [Run test](https://kyuubi.readthedocs.io/en/latest/tools/testing.html#running-tests) locally before make a pull request
> The UnboundID LDAP SDK for Java is free to use and redistribute in open source or proprietary applications under the terms of the Apache License, Version 2 (or, for legacy purposes, the GPLv2, the LGPLv2.1, or the UnboundID LDAP SDK Free Use License).
According to https://opensource.stackexchange.com/questions/2115/if-something-is-licensed-to-me-under-two-open-source-licences-can-i-redistrib?rq=1, we can pick up one of the licenses declared by the library, not all of them.
Closes#541 from pan3793/ldap.
Closes#541
7cb01298 [Cheng Pan] avoid unnecessary deps order change
130b2920 [Cheng Pan] deps
53641001 [Cheng Pan] [TEST][DEP] Replace apacheds by ldapsdk for LDAP tests
Authored-by: Cheng Pan <379377944@qq.com>
Signed-off-by: Cheng Pan <379377944@qq.com>
 [](https://github.com/yaooqinn/kyuubi/pull/399)    [❨?❩](https://pullrequestbadge.com/?utm_medium=github&utm_source=yaooqinn&utm_campaign=badge_info)<!-- PR-BADGE: PLEASE DO NOT REMOVE THIS COMMENT -->
<!--
Thanks for sending a pull request!
Here are some tips for you:
1. If this is your first time, please read our contributor guidelines: https://kyuubi.readthedocs.io/en/latest/community/contributions.html
2. If the PR is related to an issue in https://github.com/yaooqinn/kyuubi/issues, add '[KYUUBI #XXXX]' in your PR title, e.g., '[KYUUBI #XXXX] Your PR title ...'.
3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][KYUUBI #XXXX] Your PR title ...'.
-->
### _Why are the changes needed?_
<!--
Please clarify why the changes are needed. For instance,
1. If you add a feature, you can talk about the use case of it.
2. If you fix a bug, you can clarify why it is a bug.
-->
close#398
### _How was this patch tested?_
- [x] Add some test cases that check the changes thoroughly including negative and positive cases if possible
- [x] Add screenshots for manual tests if appropriate
- [x] [Run test](https://kyuubi.readthedocs.io/en/latest/tools/testing.html#running-tests) locally before make a pull request
manual test release workflow
```
➜ kyuubi git:(KYUUBI-398) ll | grep tar.gz
-rw-r--r-- 1 chengpan staff 265M Mar 4 21:38 kyuubi-1.1.0-SNAPSHOT-bin-spark-3.0-hadoop2.7.tar.gz
-rw-r--r-- 1 chengpan staff 269M Mar 4 21:40 kyuubi-1.1.0-SNAPSHOT-bin-spark-3.0-hadoop3.2.tar.gz
-rw-r--r-- 1 chengpan staff 269M Mar 4 21:46 kyuubi-1.1.0-SNAPSHOT-bin-spark-3.1-hadoop2.7.tar.gz
-rw-r--r-- 1 chengpan staff 273M Mar 4 21:44 kyuubi-1.1.0-SNAPSHOT-bin-spark-3.1-hadoop3.2.tar.gz
```
Closes#399 from pan3793/KYUUBI-398.
a9294a1 [Cheng Pan] fix ut
d1d816d [Cheng Pan] fix dist script
2e3bc20 [Cheng Pan] update release workflow and dist script
0428b1b [Cheng Pan] update travis.yml
4a9bc1b [Cheng Pan] [KYUUBI #398] move to hadoop shaded client
Authored-by: Cheng Pan <379377944@qq.com>
Signed-off-by: Kent Yao <yao@apache.org>
 [](https://github.com/yaooqinn/kyuubi/pull/387)     [❨?❩](https://pullrequestbadge.com/?utm_medium=github&utm_source=yaooqinn&utm_campaign=badge_info)<!-- PR-BADGE: PLEASE DO NOT REMOVE THIS COMMENT -->
<!--
Thanks for sending a pull request!
Here are some tips for you:
1. If this is your first time, please read our contributor guidelines: https://kyuubi.readthedocs.io/en/latest/community/contributions.html
2. If the PR is related to an issue in https://github.com/yaooqinn/kyuubi/issues, add '[KYUUBI #XXXX]' in your PR title, e.g., '[KYUUBI #XXXX] Your PR title ...'.
3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][KYUUBI #XXXX] Your PR title ...'.
-->
### _Why are the changes needed?_
<!--
Please clarify why the changes are needed. For instance,
1. If you add a feature, you can talk about the use case of it.
2. If you fix a bug, you can clarify why it is a bug.
-->
In connection level, we will release engine if the session connection is closed but we don't clean up the discovery service (i.e. the namespace in zookeeper). That may cause the disk stress after running a long time.
### _How was this patch tested?_
Add some new suites in spark engine moudle with zk emmbedded.
Closes#387 from ulysses-you/issue-386.
ccb1112 [ulysses-you] move method
1558dd9 [ulysses-you] test
6cd7e57 [ulysses-you] nit
f8559d2 [ulysses-you] check level at engine discovery
eedfaee [ulysses-you] split ServiceDiscovery to server and engine
8b20e6c [ulysses-you] timeout
0cf524c [ulysses-you] remove unnecessary test
41d36f9 [ulysses-you] move exception
eaaa12d [ulysses-you] avoid stop twice
b801c14 [ulysses-you] fix test
db39960 [ulysses-you] add start check
2d1f6dd [ulysses-you] add state check
e7374aa [ulysses-you] nit
ddf383c [ulysses-you] fi
ee088be [ulysses-you] nit
3c2013b [ulysses-you] nit
73b386f [ulysses-you] improve conf of test
2185f49 [ulysses-you] init
Authored-by: ulysses-you <ulyssesyou18@gmail.com>
Signed-off-by: Kent Yao <yao@apache.org>
fixes#271
Squashed commit of the following:
commit fe0f469b2068865398d6e5be1957fdf6c6f5eb87
Author: Cheng Pan <379377944@qq.com>
Date: Sat Jan 9 22:28:43 2021 +0800
followup
commit 527e32419ecb2ae584d1251cb345e3fc870965a9
Author: Cheng Pan <379377944@qq.com>
Date: Sat Jan 9 22:21:29 2021 +0800
revert some stuffs
commit 82f188972b8491c5d381ba076a53f84a2fbc1898
Author: Cheng Pan <379377944@qq.com>
Date: Sat Jan 9 16:49:14 2021 +0800
remove unused dependencies
commit c7eb27228d2749ab9100102467e94d3a6a98cf44
Author: Cheng Pan <379377944@qq.com>
Date: Sat Jan 9 15:41:59 2021 +0800
minimize dependencies in kyuubi-spark-sql-engine
commit da902b1b1e02c7e93810ca832f6c9e7109cf95b9
Author: Cheng Pan <379377944@qq.com>
Date: Sat Jan 9 13:26:34 2021 +0800
exclude hive dependencies
commit 55ae7f025a5ffcec402919e28b7b3af5987dfe16
Author: Cheng Pan <379377944@qq.com>
Date: Sat Jan 9 01:08:09 2021 +0800
pin versions and excludes in <dependencyManagement>
commit 9ef84a5f62afd66fb4b817d593ba1b13ff8348ed
Author: Cheng Pan <379377944@qq.com>
Date: Sat Jan 9 14:12:04 2021 +0800
trigger kyuubi-spark-sql-engine package
commit d492e3fdce64e6554fe0db1d810c6f4bea198baa
Author: Cheng Pan <379377944@qq.com>
Date: Sat Jan 9 13:44:13 2021 +0800
trigger kyuubi-download
commit 050281b8fc400f3ae5fa1d43d56da49846664ea4
Author: Cheng Pan <379377944@qq.com>
Date: Sat Jan 9 15:30:58 2021 +0800
pin modules version in dependencyManagement
commit 1655fc453ded4626ae5e12e7b17af6f10c30a0dd
Author: Cheng Pan <379377944@qq.com>
Date: Fri Jan 8 19:45:27 2021 +0800
tune modules in alphabetical order
commit 7f3f4d987336d71d73eab059e93f3d008cfcd1a6
Author: Cheng Pan <379377944@qq.com>
Date: Sat Jan 9 00:09:49 2021 +0800
change dependencies scope to test