Commit Graph

162 Commits

Author SHA1 Message Date
Fu Chen
fdb916869e
[KYUUBI #3194][Scala-2.13] Refine deprecated config
### _Why are the changes needed?_

1. add a warning message when the user sets the deprecated configuration
```
10:49:58.558 WARN org.apache.kyuubi.config.KyuubiConf: The Kyuubi config 'kyuubi.frontend.bind.port' has been deprecated in Kyuubi v1.4.0 and may be removed in the future. Use kyuubi.frontend.thrift.binary.bind.port instead
```

2. make the annotation `deprecated` arguments only contain constants to fix the error when compiling for scala-2.13

```
[ERROR] /home/chenfu/workspace/incubator-kyuubi/kyuubi-common/src/main/scala/org/apache/kyuubi/config/KyuubiConf.scala:353: annotation argument needs to be a constant; found: "using ".+(KyuubiConf.this.FRONTEND_THRIFT_BINARY_BIND_PORT.key).+(" instead")
```

### _How was this patch tested?_

Pass CI.

Closes #3195 from cfmcgrady/log-deprecated-config.

Closes #3194

2c7567fc [Fu Chen] revert log4j2-test.xml
b97306d5 [Fu Chen] deprecated config
264d1276 [Fu Chen] log deprecated config

Authored-by: Fu Chen <cfmcgrady@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-08-08 20:16:49 +08:00
Cheng Pan
a46d6550c7 [KYUUBI #3189] [BUILD] Bump jetcd 0.7.3 and pin Netty dependencies
### _Why are the changes needed?_

This PR proposes to upgrade the latest version of jetcd. As https://github.com/etcd-io/jetcd/pull/1074 has been included, https://github.com/apache/incubator-kyuubi/pull/3148 is not required then.

This PR also pin Netty dependecies' version.

### _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.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #3189 from pan3793/etcd.

Closes #3189

1b2317af [Cheng Pan] [BUILD] Bump jetcd 0.7.3 and pin Netty dependencies

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: hongdongdong <hongdongdong@cmss.chinamobile.com>
2022-08-08 14:02:51 +08:00
hongdongdong
c17829bf10
[KYUUBI #3104] Support SSL for Etcd
### _Why are the changes needed?_

Support SSL for Etcd

### _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.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #3105 from hddong/support-etcd-ssl.

Closes #3104

49aadb9c [hongdongdong] change enable to enabled
87fa6269 [hongdongdong] [KYUUBI #3104] Support SSL for Etcd

Authored-by: hongdongdong <hongdongdong@cmss.chinamobile.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-07-29 16:24:50 +08:00
Cheng Pan
137e818ccb
[KYUUBI #3148] Change etcd docker image to recover arm64 CI
### _Why are the changes needed?_

The current etcd docker image supports x86 only, so travis fail consistently.

https://hub.docker.com/layers/etcd/pachyderm/etcd/v3.5.2/images/sha256-48c43c7cb17b4a997490508d0ffcc7d3300f7fbbe07b899d6df37f9671dbcb63?context=explore

### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible

- [x] Add screenshots for manual tests if appropriate

Test passed on arm64 platform
```
➜  incubator-kyuubi git:(PR_3148) build/mvn clean install -Dtest=none -DwildcardSuites=org.apache.kyuubi.ha.client.etcd.EtcdDiscoveryClientSuite -pl :kyuubi-ha_2.12 -am
```
```
[INFO] --- scalatest-maven-plugin:2.0.2:test (test)  kyuubi-ha_2.12 ---
Discovery starting.
Discovery completed in 1 second, 902 milliseconds.
Run starting. Expected test count is: 4
EtcdDiscoveryClientSuite:
- publish instance to embedded zookeeper server
- KYUUBI-304: Stop engine service gracefully when related zk node is deleted
- parse host and port from instance string
- etcd test: set, get and delete
Run completed in 1 minute, 7 seconds.
Total number of tests run: 4
Suites: completed 2, aborted 0
Tests: succeeded 4, failed 0, canceled 0, ignored 0, pending 0
All tests passed.
```

- [x] [Run test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #3148 from pan3793/etcd.

Closes #3148

17eaa8fc [Cheng Pan] nit
834a80e3 [Cheng Pan] nit
afb40915 [Cheng Pan] Change etcd docker image to recover arm64 CI

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-07-27 12:14:44 +08:00
hongdongdong
16f4169405 [KYUUBI #3102] Fix multi endpoints for etcd
### _Why are the changes needed?_

Fix multi endpoints for etcd.

### _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.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #3102 from hddong/fix-multi-endpoints.

Closes #3102

1ed1e0e7 [hongdongdong] Fix multi endpoints for etcd

Authored-by: hongdongdong <hongdongdong@cmss.chinamobile.com>
Signed-off-by: hongdongdong <hongdongdong@cmss.chinamobile.com>
2022-07-21 15:23:37 +08:00
hongdongdong
ce72a502a3
[KYUUBI #3054] Add description of the discovery client in the conf doc
### _Why are the changes needed?_

Add description of the discovery client in the conf doc.

### _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.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #3054 from hddong/conf-to-etcd.

Closes #3054

d364d099 [hongdongdong] Add description of the discovery client in the conf doc

Authored-by: hongdongdong <hongdongdong@cmss.chinamobile.com>
Signed-off-by: Kent Yao <yao@apache.org>
2022-07-14 14:31:17 +08:00
hongdongdong
32970ce685
[KYUUBI #2644] Add etcd discovery client for HA
### _Why are the changes needed?_

Add etcd discovery client for HA

### _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.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #2767 from hddong/etcd-support.

Closes #2644

6fa37578 [hongdongdong] Rebase and remove from rat-excludes
fc23a2b4 [hongdongdong] upgrade grpc-1.47.0
61c77d27 [hongdongdong] Fix tests
28abd13e [hongdongdong] fix comments
9e81a6a3 [hongdongdong] Rename HA_ZK_ENGINE_REF_ID to HA_ENGINE_REF_ID
aa2b4260 [hongdongdong] [KYUUBI #2644][WIP] Add etcd discovery client for HA

Authored-by: hongdongdong <hongdongdong@cmss.chinamobile.com>
Signed-off-by: Kent Yao <yao@apache.org>
2022-07-12 11:04:35 +08:00
Cheng Pan
c5d29260a3
[KYUUBI #3037] Handles configuring the JUL -> SLF4J bridge
### _Why are the changes needed?_

Handles configuring the JUL -> SLF4J bridge, otherwise, the components which use JUL like Jersey will be not controlled by log4j2 configurations

### _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.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #3037 from pan3793/jul.

Closes #3037

fda05ff6 [Cheng Pan] update license
31f579fd [Cheng Pan] nit
7da0f9fb [Cheng Pan] Fix dependencyList
3179e6bd [Cheng Pan] Handles configuring the JUL -> SLF4J bridge

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-07-11 17:54:39 +08:00
Fu Chen
0acf9717d0
[KYUUBI #2247] Change log4j2 properties to xml
### _Why are the changes needed?_

- change log4j2-test.properties to log4j2-test.xml
- add the unit test log4j2.xml for spark relative submodule, and remove the log4j.properties

### _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.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #2850 from cfmcgrady/kyuubi-2247.

Closes #2247

a33d4d80 [Fu Chen] style
f99dadac [Fu Chen] fix style
49c99dea [Fu Chen] add log4j2.xml for spark relative submodule
a8a38561 [Fu Chen] change log4j2-test.properties to log4j2-test.xml

Authored-by: Fu Chen <cfmcgrady@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-06-10 18:57:25 +08:00
Cheng Pan
8539a568f5
[KYUUBI #2822] [GA] Set log level to info
### _Why are the changes needed?_

Have seen run out of disk spaces in GitHub Action, set log level to info to reduce log size

### _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.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #2822 from pan3793/log.

Closes #2822

b355452a [Cheng Pan] followup
541ca5fe [Cheng Pan] remove unsed filter
41f656ca [Cheng Pan] [GA] Set log level to info

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-06-07 22:33:41 +08:00
Fei Wang
73c6b1b14a [KYUUBI #2717] [SUB-TASK][KPIP-4] Introduce jdbc session state store for batch session multiple HA
### _Why are the changes needed?_

Close #2715
Close #2374
Introduce jdbc based session state store to share the batch state information across kyuubi instances.

This pr is based on docs: https://docs.google.com/document/d/1_BMekMT88P2vCHCl4ZacWEeWslpIv4pxsJH32PAnWSI and  refactor it during implementation.

In this PR, I introduce `StateStore` interface and implement the default `JDBCStateStore`.

The data structures:
1. BatchState - the batch state info for multiple-HA, including batch operation state and application information
2. BatchMeta - the meta data used for batch recovery, including sessionConf, batchRequest information

For JDBCStateStore:
- support to specify data base type:
  - 1. DERBY - it will use derby jdbc driver by default
  - 2. MYSQL - it will use mysql jdbc by default
  - 3. CUSTOM - the user need specify the jdbc driver
- support to init schema

By default, the jdbc url is a derby in-memory database url for single kyuubi instance.

To support multiple HA in production env, we should config the production jdbc url to share batch info across kyuubi instances.

The datasource is managed by HiKariCP.

### _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.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #2717 from turboFei/kyuubi_2715_hikaricp_v2.

Closes #2717

367b944a3 [Fei Wang] comments
9a7963dbd [Fei Wang] post session type in event
b1c130853 [Fei Wang] move session type to session package
66def0cb6 [Fei Wang] add JDBCStateStoreConf
839b72bf6 [Fei Wang] refactor
644cbcd28 [Fei Wang] filter by session type
58f1c7854 [Fei Wang] refactor
1c0035208 [Fei Wang] add session type
34a087ee5 [Fei Wang] refactor
fba38e473 [Fei Wang] refactor
fcbde25a0 [Fei Wang] refactor
332a67537 [Fei Wang] comments
135ba9b6d [Fei Wang] Revert "revert class utils change"
0e045a483 [Fei Wang] Revert "Revert "move""
05048416e [Fei Wang] Revert "test again"
01a50c35b [Fei Wang] test again
b89159d13 [Fei Wang] Revert "move"
3764a9051 [Fei Wang] move
eef17822c [Fei Wang] revert
4166db261 [Fei Wang] adjust engine idle timeout
5fc95a824 [Fei Wang] revert class utils change
23f88d63d [Fei Wang] refactor
a66cb811d [Fei Wang] refactor
89fa0edb4 [Fei Wang] fix
e5228fefd [Fei Wang] refactor
581908d86 [Fei Wang] exclude sql
3446aaa06 [Fei Wang] UPPER
ab980c677 [Fei Wang] [KYUUBI #2715] Introduce session state store for batch session multiple HA

Authored-by: Fei Wang <fwang12@ebay.com>
Signed-off-by: Fei Wang <fwang12@ebay.com>
2022-05-31 15:06:39 +08:00
hongdongdong
3b81a4953f [KYUUBI #2631] Rename high availability config key to support multi discovery client
### _Why are the changes needed?_

Rename high availability config key to support muti discovery client

### _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.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #2633 from hddong/muti-discovery-config-support.

Closes #2631

bc434ac9 [hongdongdong] [KYUUBI #2631] Rename high availability config key to support muti discovery client

Authored-by: hongdongdong <hongdongdong@cmss.chinamobile.com>
Signed-off-by: hongdongdong <hongdongdong@cmss.chinamobile.com>
2022-05-25 10:01:46 +08:00
Fei Wang
f1cf95fe96 [KYUUBI #2719] [SUB-TASK][KPIP-4] Support internal rest request authentication to enable http request redirection across kyuubi instances
### _Why are the changes needed?_

Support internal rest request authentication to enable redirect http request across kyuubi instances

### _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.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #2719 from turboFei/internal_access.

Closes #2719

b9e150e9 [Fei Wang] revert config key change
aa378727 [Fei Wang] make it internal
ce96d922 [Fei Wang] comments
6fe8523b [Fei Wang] Support internal rest request authentication to enable redirect http request across kyuubi instances

Authored-by: Fei Wang <fwang12@ebay.com>
Signed-off-by: Fei Wang <fwang12@ebay.com>
2022-05-23 15:44:48 +08:00
ulysses-you
c210fdae69
[KYUUBI #2686] Fix lock bug if engine initialization timeout
### _Why are the changes needed?_

closes #2686

### _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

- [ ] [Run test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #2687 from ulysses-you/lock.

Closes #2686

e5dcacdb [ulysses-you] finally
868f95b3 [ulysses-you] address comment
1ba65381 [ulysses-you] flaky test
11fad96c [ulysses-you] Fix lock bug if engine initialization timeout

Authored-by: ulysses-you <ulyssesyou18@gmail.com>
Signed-off-by: ulysses-you <ulyssesyou@apache.org>
2022-05-19 16:27:34 +08:00
sychen
866e4d1f06
[KYUUBI #2683] Add INFO log in ServiceDiscovery.stopGracefully
### _Why are the changes needed?_
close #2683

Once the administrator starts to stop the server or engine, there is no intuitive log to tell the administrator, the number of open sessions now.

### _How was this patch tested?_
- [ ] 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.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #2684 from cxzl25/KYUUBI-2683.

Closes #2683

19094c23 [sychen] use INFO level

Authored-by: sychen <sychen@ctrip.com>
Signed-off-by: ulysses-you <ulyssesyou@apache.org>
2022-05-18 20:35:57 +08:00
BoYang
50584f2a81 [KYUUBI #2601] Add a config to support different service discovery client class implementation
### _Why are the changes needed?_
We want to implement different service discovery client, thus add a config to support different service discovery client class implementation.

### _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.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #2601 from hiboyang/datapunch-DiscoveryClient-Configurable.

Closes #2601

719685f1 [BoYang] Update settings.md
8af4f5da [BoYang] Change name to HA_DISCOVERY_CLIENT_CLASS
22139b6d [BoYang] Update settings.md
c9845cee [BoYang] Revert unrelated changes
1713e050 [BoYang] Add .github files
22222a4d [BoYang] Merge branch 'master' into datapunch-DiscoveryClient-Configurable
c0c293db [BoYang] Merge branch 'master' of https://github.com/apache/incubator-kyuubi
3e53ef48 [BoYang] Do not copy spark files in docker
887be439 [BoYang] Add dot after docker build command
48b70053 [BoYang] Update manual-release.yml
39d0bb21 [BoYang] Update workflow: cd dist
9adae8c1 [BoYang] Update manual-release.yml
da76f568 [BoYang] Use nonEmpty
bf8fe2ff [BoYang] Run mvn spotless:apply
188d71c5 [BoYang] Update per comments
fffa3bfe [BoYang] Create manual-release.yml
65c62c31 [BoYang] Add KyuubiConf.createInstance and reuse some class checking code
30f0ff35 [BoYang] Add a config to support different service discovery client class implementation
1cdf8809 [BoYang] Delete github workflows

Authored-by: BoYang <datapunch2021@gmail.com>
Signed-off-by: hongdongdong <hongdongdong@cmss.chinamobile.com>
2022-05-12 17:09:27 +08:00
hongdongdong
91010689db
[KYUUBI #1989] Decouple curator from other modules
### _Why are the changes needed?_

Decouple curator from other modules.

Mainly changes:
1. `ZookeeperClientProvider` -> `zookeeper.ClientProvider`
2. `zkClient` apis -> `DiscoveryClient`
3. `ZooKeeperClientProvider.withZkClient` -> `DiscoveryClientProvider.withDiscoveryClient`

### _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

- [ ] [Run test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #1991 from hddong/decuple-discovery.

Closes #1989

3efcbbff [hongdongdong] fix
2233acc2 [hongdongdong] [KYUUBI #1989] Decouple curator from other modules

Authored-by: hongdongdong <hongdongdong@cmss.chinamobile.com>
Signed-off-by: Kent Yao <yao@apache.org>
2022-04-13 11:32:13 +08:00
Cheng Pan
6a23151945
[KYUUBI #2277] Inline kyuubi prefix in KyuubiConf
### _Why are the changes needed?_

Inline `kyuubi.` prefix in `KyuubiConf` to keep consistently with the document and make searching friendly.

### _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.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #2277 from pan3793/conf.

Closes #2277

cca77ccb [Cheng Pan] fixup
9c38925a [Cheng Pan] Inline kyuubi prefix in KyuubiConf

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Kent Yao <yao@apache.org>
2022-04-02 22:33:18 +08:00
Cheng Pan
f8efcb7125
[KYUUBI #2103] Revert "[KYUUBI #1948] Upgrade thrift version to 0.16.0"
### _Why are the changes needed?_

This PR reverts "[KYUUBI #1948] Upgrade thrift version to 0.16.0" in branch-1.5 and some subsequent commits due to issues caused by breaking changes in Thrift, e.g. #2101, #2093

We need more time to evaluate it and add more test cases to ensure stability before the next release.

### _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.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #2103 from pan3793/revert.

Closes #2103

Closes #1948

575dfe8d [Cheng Pan] properties order
4c94481e [Cheng Pan] fix deps
bfbdeb89 [Cheng Pan] Add log4j deps for kyuubi-hive-jdbc test
bad4e90e [Cheng Pan] surefire
f2ae8b9b [Cheng Pan] Revert "[KYUUBI #1948] Upgrade thrift version to 0.16.0"
4501f743 [Cheng Pan] Revert "[KYUUBI #1948][FOLLOWUP] Remove TFramedTransport in extension-spark-3-1 and extension-spark-3-2"
cc04df49 [Cheng Pan] Revert "[KYUUBI #1996] Clean up log4j2 conf and enhance surefire plugin conf"
52a20e17 [Cheng Pan] Revert "[KYUUBI #1948][FOLLOWUP] Relocate fb303 classes"

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-03-12 21:05:39 +08:00
Kent Yao
abf2026816
[KYUUBI #2045] Preparing v1.6.0-SNAPSHOT
### _Why are the changes needed?_

Preparing v1.6.0-SNAPSHOT with branch-1.5 cut

### _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.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #2045 from yaooqinn/pv.

Closes #2045

6a506a8f [Kent Yao] Preparing v1.6.0-SNAPSHOT

Authored-by: Kent Yao <yao@apache.org>
Signed-off-by: Kent Yao <yao@apache.org>
2022-03-06 22:21:45 +08:00
Cheng Pan
7887a47e02
[KYUUBI #1996] Clean up log4j2 conf and enhance surefire plugin conf
### _Why are the changes needed?_

[THRIFT-4805](https://issues.apache.org/jira/browse/THRIFT-4805) has been fixed in thrift 0.13.0, we can remove the workaround of log4j2 configurations because we use thrift 0.16.0 now, the change also removes the following warnings.

```
2022-03-01 23:18:16,530 main ERROR Filters contains invalid attributes "onMatch", "onMismatch"
2022-03-01 23:18:16,543 main ERROR Filters contains invalid attributes "onMatch", "onMismatch"
```

`maven-surefire-plugin` is only used in `kyuubi-hive-jdbc`, we should disable it in other modules.

```
[INFO] --- maven-surefire-plugin:2.22.0:test (default-test)  kyuubi-ctl_2.12 ---
[INFO]
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
2022-03-01 23:18:16,530 main ERROR Filters contains invalid attributes "onMatch", "onMismatch"
2022-03-01 23:18:16,543 main ERROR Filters contains invalid attributes "onMatch", "onMismatch"
[INFO] Running org.apache.kyuubi.ctl.ServiceControlCliSuite
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.031 s - in org.apache.kyuubi.ctl.ServiceControlCliSuite
[INFO] Running org.apache.kyuubi.ctl.ServiceControlCliArgumentsSuite
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 s - in org.apache.kyuubi.ctl.ServiceControlCliArgumentsSuite
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
```

### _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.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #1996 from pan3793/log.

Closes #1996

291441c0 [Cheng Pan] nit
f2c94246 [Cheng Pan] Tune surefire plugin in conf
e1ee6402 [Cheng Pan] Clean up log4j2 conf

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-03-03 12:58:38 +08:00
Kent Yao
d6bbe32a01
[KYUUBI #1981] Remove unused artifacts for common and parent module
### _Why are the changes needed?_

### _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.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #1981 from yaooqinn/branch-dep.

Closes #1981

07bf0e29 [Kent Yao] codec
96e41e7d [Kent Yao] codec
1da26432 [Kent Yao] guava
6cf0abb3 [Kent Yao] base64 & sha1
3b45ec2a [Kent Yao] base64
5490cfa7 [Kent Yao] http
6f4b48b8 [Kent Yao] n
2a87a4cf [Kent Yao] d
a5ad3ccc [Kent Yao] Refine Deps in common module
24d5299e [Kent Yao] Refine Deps in common module

Authored-by: Kent Yao <yao@apache.org>
Signed-off-by: Kent Yao <yao@apache.org>
2022-03-01 13:35:49 +08:00
Kent Yao
f25e5c93b8
[KYUUBI #1949] [INFA] Add homepage for every module in maven central
<!--
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/apache/incubator-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.
-->

Take spark as an example.

![image](https://user-images.githubusercontent.com/8326978/154938094-87e53b38-5264-4aca-a7e2-269f9bb3c2d1.png)

[link](https://mvnrepository.com/artifact/org.apache.spark/spark-core_2.13/3.2.1)

### _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.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #1949 from yaooqinn/url.

Closes #1949

f88c0598 [Kent Yao] [INFA] Add homepage for every module in maven cental
684f588f [Kent Yao] [INFA] Add homepage for every module in maven cental

Authored-by: Kent Yao <yao@apache.org>
Signed-off-by: Kent Yao <yao@apache.org>
2022-02-21 21:09:29 +08:00
Paul Lin
0233fbe5ab
[KYUUBI #1878] Fix typo in log4j2-test.properties
<!--
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/apache/incubator-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.
-->

Fix typo.

### _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.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #1879 from link3280/bug/KYUUBI-1878.

Closes #1878

ed1f3268 [Paul Lin] [KYUUBI #1878] Fix typo in log4j2-test.properties

Authored-by: Paul Lin <paullin3280@gmail.com>
Signed-off-by: ulysses-you <ulyssesyou@apache.org>
2022-02-09 11:47:51 +08:00
Paul Lin
8b389f27fd
[KYUUBI #1858] Rename test log4j2 properties to log4j2-test.properties
<!--
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/apache/incubator-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.
-->

Avoid test log4j2 configurations overtaken by the ones in 3rd party dependencies.

### _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.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #1860 from link3280/bug/KYUUBI-1858.

Closes #1858

614e7937 [Paul Lin] [KYUUBI #1858] Update log2j configuration path in pom.xml
71c95613 [Paul Lin] [KYUUBI #1858] Rename test log4j2 properties to log4j2-test.properties

Authored-by: Paul Lin <paullin3280@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-02-01 01:22:58 +08:00
Cheng Pan
3323bae886 [KYUUBI #1855] Suppress logging to console in scalatest
### _Why are the changes needed?_

This change recovers the previous behavior, writing logs to `target/unit-tests.log` instead of print log to console in scalatest.

### _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.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #1855 from pan3793/debug.

Closes #1855

a6ea4e46 [Cheng Pan] Suppress logging to console in scalatest

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Fei Wang <fwang12@ebay.com>
2022-01-30 14:18:23 +08:00
Fei Wang
885ace06c8 [KYUUBI #1769][FOLLOWUP] Some cleanups for log4j properties
<!--
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/apache/incubator-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 is a followup of #1769. Cleanup the log4j properties files and using log4j2.properties for UT.

### _How was this patch tested?_

Passed UT.

Closes #1842 from turboFei/remove_log4j1.

Closes #1769

b6757555 [Fei Wang] unused change
365fbec7 [Fei Wang] revert license
14c64ec9 [Fei Wang] exclude log4j 1.2.17 in slf4j-log4j12
034b04db [Fei Wang] recover jcl-over-slf4j and slf4j-api for k8s it
2beae75e [Fei Wang] remove log4j 1.2.17
b00f07b5 [Fei Wang] remove from license
e55fd2ec [Fei Wang] remove unused dependencies
ab86f023 [Fei Wang] [KYUUBI #1769][FOLLOWUP] Some cleanups for log4j properties

Authored-by: Fei Wang <fwang12@ebay.com>
Signed-off-by: Fei Wang <fwang12@ebay.com>
2022-01-28 00:58:25 +08:00
Fei Wang
33d53db3ff
[KYUUBI #1813] Enable the internal secure authentication between Kyuubi server and engine
<!--
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/apache/incubator-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.
-->

Enable the internal secure access between Kyuubi server and engine.

This pr use secret and cipher to encrypt a dynamic token identifier for authentication.

### _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.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #1813 from turboFei/engine_secure.

Closes #1813

aa7ad0de [Fei Wang] run a simple query for engien security
34354d97 [Fei Wang] requre zk node must be defined for zk secret provider
f84ce7c9 [Fei Wang] Require zk secret node non empty
b545281d [Fei Wang] refactor
d8d6dfd2 [Fei Wang] address comments
0e9273e1 [Fei Wang] refactor provider conf
d3263c08 [Fei Wang] place holder
e1266e32 [Fei Wang] reformat
9e252fea [Fei Wang] enhance prompt
dbc9100c [Fei Wang] fix conf
ff6b6dea [Fei Wang] refactor
4ea020ed [Fei Wang] refactor
20915902 [Fei Wang] refactor
a7b4e41e [Fei Wang] add more ut:
1e1ceb27 [Fei Wang] use orignal cipher
8d8387b2 [Fei Wang] save
ad777cb4 [Fei Wang] refactor
b8997313 [Fei Wang] save
b997095d [Fei Wang] refactor
e05b47c5 [Fei Wang] move
a322b784 [Fei Wang] refactor
b14f7cbf [Fei Wang]  Enable the internal secure authentication

Authored-by: Fei Wang <fwang12@ebay.com>
Signed-off-by: ulysses-you <ulyssesyou@apache.org>
2022-01-27 14:33:53 +08:00
Fei Wang
53d59a02bf [KYUUBI #1769] [BUILD] Migrate from log4j1 to log4j2
<!--
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/apache/incubator-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 patch proposes to migrate from log4j1 to log4j2 in Kyuubi.
Refer the spark patch: https://github.com/apache/spark/pull/34895

### Does this PR introduce any user-facing change?
Yes. Users may need to rewrite their log4j properties file for log4j2. As of version 2.4, log4j now supports configuration via properties files. Note that the property syntax is not the same as the syntax used in log4j 1, but during the migration I found the syntax is pretty close so the migration should be straightforward.

### _How was this patch tested?_
Passed all existing tests.

Closes #1769 from turboFei/log4j2.

Closes #1769

8613779c [Fei Wang] remove log4j dependencies from spark-sql-engine
b2fe6dba [Fei Wang] Use String to present default log level
762e2d03 [Fei Wang] only remove org.apache.logging.log4j:log4j-slf4j-impl
8a912086 [Fei Wang] remove dependencies from spark-sql-engine
7e3a4980 [Fei Wang] address commments
051f49f5 [Fei Wang] address comments
85316a0b [Fei Wang] Keep compatible with log4j12
01d1a84e [Fei Wang] for log4j1
b9e17e1b [Fei Wang] refactor
e24391ed [Fei Wang] revert log count
38803002 [Fei Wang] add log4j2.properties.template
4f0b22fc [Fei Wang] save
7ce84119 [Fei Wang] modify log level
1ea5ca53 [Fei Wang] add log4j to engine
c4a86d4d [Fei Wang] use AbstractFilter
27b08b6a [Fei Wang] remove more
8cc15ae7 [Fei Wang] reformat
c13ec29e [Fei Wang] save temporarily
33a38e2e [Fei Wang] exclude log4j12 from spark-sql
9129a64a [Fei Wang] refactor
5362b43d [Fei Wang] make it run at first
7f27f519 [Fei Wang] more
56f4f1ff [Fei Wang] fix logging
a74b6d37 [Fei Wang] start appender
dea964aa [Fei Wang] fix build erorr at first
e20b7500 [Fei Wang] address comments
2ec02b4d [Fei Wang] fix LogDivertAppender
dded1290 [Fei Wang] more
c63e0008 [Fei Wang] add log4j2.properties

Authored-by: Fei Wang <fwang12@ebay.com>
Signed-off-by: Fei Wang <fwang12@ebay.com>
2022-01-26 10:53:16 +08:00
Kent Yao
3aba64d9bb
[KYUUBI #1785] Stop Discovery services properly
<!--
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/apache/incubator-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.
-->

Fix some issues:

1. EngineServiceDiscovery calls deregister twice
2. When LOST zk-server, the delay for gracefully stop shall be calculated via retry policy not retrywait * maxWaitMs
     - engine default using n time retry policy, we can avoid unnecessary cache for engines when the whole test file finished and server stopped
     - otherwise, we are very likey to hit the GA memory limits
```
     KyuubiOperationPerGroupSuite:
./build/mvn: line 99:  1725 Killed                  ${MVN_BIN} $MAVEN_CLI_OPTS "$"
Error: Process completed with exit code 137.
```
3. When LOST, we shall skip connection retries, closing znode & closingclient

### _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/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #1785 from yaooqinn/stop.

Closes #1785

afdd4b47 [Kent Yao] Stop Discovery services properly
5efa493a [Kent Yao] Stop Discovery services properly
45f9312e [Kent Yao] Stop Discovery services properly
d899012e [Kent Yao] Stop Discovery services properly
925ff3e9 [Kent Yao] Stop Discovery services properly
1f766116 [Kent Yao] Stop Discovery services properly
0d25f6a1 [Kent Yao] Stop Discovery services properly
ff833751 [Kent Yao] Stop Discovery services properly
55d64c02 [Kent Yao] Stop Discovery services properly

Authored-by: Kent Yao <yao@apache.org>
Signed-off-by: ulysses-you <ulyssesyou@apache.org>
2022-01-18 10:41:57 +08:00
Kent Yao
b91854e33b
[KYUUBI #1761] [SubTask][THTTP] Make abstract TFrontendService for thrift http protocol support
<!--
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/apache/incubator-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 mainly focus on refactoring
1. Use Apache Thrift Naming style for thrift-based classes which is `TXyzAbc`, e.g. `TFrontendService`
2. Created `TFrontendService` and move the `TCLIService.Iface` APIs and other common fields in `TFrontendService`, later we will use it to implement the `KyuubiTHttpFrontendService` in the server module
3. introduce a new conf also for server FEs to be able to pick IP first

### _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/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #1761 from yaooqinn/http1.

Closes #1761

98b4afdd [Kent Yao] address comment
3138af29 [Kent Yao] [WIP] Thrift Http protocol support 1
a06026af [Kent Yao] [WIP] Thrift Http protocol support 1
efa899fa [Kent Yao] [WIP] Thrift Http protocol support 1
d1403e30 [Kent Yao] [WIP] Thrift Http protocol support 1
d114efd4 [Kent Yao] [WIP] Thrift Http protocol support 1
86e30c47 [Kent Yao] [WIP] Thrift Http protocol support 1
8117d12d [Kent Yao] [WIP] Thrift Http protocol support 1
62194323 [Kent Yao] [WIP] Thrift Http protocol support 1

Authored-by: Kent Yao <yao@apache.org>
Signed-off-by: Kent Yao <yao@apache.org>
2022-01-14 17:03:44 +08:00
Cheng Pan
e4f5ba7010
[KYUUBI #1673] [BUILD] Improve log4j configurations
### _Why are the changes needed?_

- Flink engine print log to console on UT, and use `$FLINK_CONF_DIR/log4j.properties` in production.
- Add missing log4j conf `kyuubi-trino-engine` module.
- Fix log4j configuration issue of THRIFT

### _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/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #1673 from pan3793/log.

Closes #1673

8abe9d08 [Cheng Pan] Remove flink-sql-engine conf
b1726288 [Cheng Pan] Improve log4j configurations

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Kent Yao <yao@apache.org>
2022-01-04 19:43:14 +08:00
sychen
602bb23d36
[KYUUBI #1174][FOLLOWUP] change configuration(ha.zookeeper.publish.configs) default value to false
### _Why are the changes needed?_
Compatible with lower version of hive driver.
https://github.com/apache/incubator-kyuubi/issues/1174

### _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/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #1553 from cxzl25/KYUUBI-1174-followup.

Closes #1174

39cbdf4c [sychen] trigger test
908c4750 [sychen] gen settings
f9e2eda0 [sychen] typo
25300d56 [sychen] Modify the default value to false

Authored-by: sychen <sychen@trip.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2021-12-15 00:09:30 +08:00
Kent Yao
c30d580686
[KYUUBI #1527] [DOC] Improve High Availability Guide
<!--
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/apache/incubator-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.
-->

![image](https://user-images.githubusercontent.com/8326978/145179241-050e66aa-32d6-471d-82bd-a88972c3ca98.png)

### _How was this patch tested?_
- [ ] 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/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #1527 from yaooqinn/hadoc.

Closes #1527

249701b6 [Kent Yao] [DOC] Improve High Availability Guide
03244332 [Kent Yao] [DOC] Improve High Availability Guide
54c1cd9d [Kent Yao] [DOC] Improve High Availability Guide
6d8a0991 [Kent Yao] [DOC] Improve High Availability Guide
5b4dff3d [Kent Yao] [DOC] Improve High Availability Guide

Authored-by: Kent Yao <yao@apache.org>
Signed-off-by: Kent Yao <yao@apache.org>
2021-12-09 13:58:00 +08:00
hongdongdong
542ceadcf3
[KYUUBI #1505] Move ServiceNodeInfo to a separate file
<!--
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/apache/incubator-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.
-->
Decouple zookeeper #1392

### _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/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #1506 from hddong/move-serviceNodeInfo.

Closes #1505

7bd7f18d [hongdongdong] [KYUUBI #1505] Move ServiceNodeInfo to a separate file

Authored-by: hongdongdong <hongdongdong@cmss.chinamobile.com>
Signed-off-by: Kent Yao <yao@apache.org>
2021-12-06 17:07:11 +08:00
hongdongdong
ff0441c1be
[KYUUBI #1446] Decouple zookeeper from abstract ServiceDiscovery
<!--
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/apache/incubator-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.
-->
Decouple zookeeper from abstract ServiceDiscovery

### _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/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #1448 from hddong/decouple-zeekeeper.

Closes #1446

0294c3c3 [hongdongdong] remove
5da2f944 [hongdongdong] fix
be066f64 [hongdongdong] fix
03038558 [hongdongdong] [KYUUBI #1446] Decouple zookeeper from abstract ServiceDiscovery

Authored-by: hongdongdong <hongdongdong@cmss.chinamobile.com>
Signed-off-by: Kent Yao <yao@apache.org>
2021-11-30 17:16:28 +08:00
fwang12
119e7f2c2c [KYUUBI #1441] [BUILD] Bump 1.5.0-SNAPSHOT
<!--
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/apache/incubator-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.
-->

### _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/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #1441 from turboFei/bump_1.5.0.

Closes #1441

0c03c75d [fwang12] [BUILD] Bump 1.5.0-SNAPSHOT

Authored-by: fwang12 <fwang12@ebay.com>
Signed-off-by: fwang12 <fwang12@ebay.com>
2021-11-23 22:22:26 +08:00
hongdongdong
e19d463e85
[KYUUBI #1404] Decouple zookeeper persistentNode from other modules
<!--
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/apache/incubator-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.
-->
Decouple zookeeper persistentNode from other modules

### _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/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #1405 from hddong/decouple-persistentNode.

Closes #1404

fcdce91d [hongdongdong] [KYUUBI #1404] Decouple zookeeper persistentNode from other modules

Authored-by: hongdongdong <hongdongdong@cmss.chinamobile.com>
Signed-off-by: Kent Yao <yao@apache.org>
2021-11-23 17:10:54 +08:00
zhouyifan279
ffe41631ce
[KYUUBI #1383] Leverage Scalafmt to auto format scala code
### _Why are the changes needed?_
#1383

As IntelliJ IDEA's `Optimize Imports` result does not meet rules in `scalastyle-config.xml`,  currently developers have to arrange package imports manually.

In this PR, we introduce a `.scalafmt.conf` file to solve the problem.
It works as follows:
1. Set scala code style formatter to `scalafmt`.
2. Execute `Reformat Code`
3. IDEA picks up configurations in  `.scalafmt.conf` and format both code lines and imports.

We also formatted all historical scala codes.

### _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/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #1391 from zhouyifan279/1383.

Closes #1383

e0696a9e [zhouyifan279] [KYUUBI #1383] Leverage Scalafmt to auto format scala code
18b8e229 [zhouyifan279] [KYUUBI #1383] Leverage Scalafmt to auto format scala code

Authored-by: zhouyifan279 <zhouyifan279@gmail.com>
Signed-off-by: ulysses-you <ulyssesyou@apache.org>
2021-11-22 17:51:23 +08:00
wForget
10582c8b96
[KYUUBI #1417] Parse instance information in a compatible way
<!--
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/apache/incubator-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.
-->

Fix bug #1417.

After fix, run the `bin/kyuubi-ctl list server` command successfully.

![image](https://user-images.githubusercontent.com/17894939/142574175-161e40d8-ada2-4a8f-bd80-1835118ac281.png)

### _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/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #1418 from wForget/KYUUBI-1417.

Closes #1417

4c662617 [wForget] [KYUUBI-1417] fix checkstyle
44759fea [wForget] [KYUUBI-1417] Parse instance information in a compatible way

Authored-by: wForget <643348094@qq.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2021-11-19 15:27:49 +08:00
zhouyifan279
884de795c2
[KYUUBI #1361] Update available version of backported configurations to 1.3.2
### _Why are the changes needed?_
Sub task of #1361

### _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/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #1373 from zhouyifan279/1361-4.

Closes #1361

86b92e86 [zhouyifan279] [KYUUBI #1361] Update available version of backported configurations to 1.3.2

Authored-by: zhouyifan279 <zhouyifan279@gmail.com>
Signed-off-by: ulysses-you <ulyssesyou@apache.org>
2021-11-12 22:40:10 +08:00
Cheng Pan
4ac8b09b2f
[KYUUBI #1331] [TEST] Refactor test classes to match multi frontend protocol
### _Why are the changes needed?_

As Kyuubi supports REST frontend protocol now, and MySQL frontend protocol is coming soon, Thrift is not the only one, this PR refacotor the test classes to match the changes.

### _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/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #1331 from pan3793/test.

Closes #1331

67c65810 [Cheng Pan] nit
f9168358 [Cheng Pan] [TEST] Refactor test classes to match multi frontend protocol

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2021-11-09 13:28:25 +08:00
fwang12
24cf1bd720
[KYUUBI #1262] Support both KERBEROS and PLAIN authentication at the same time
<!--
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/apache/incubator-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.
-->

Support both KERBEROS and PLAIN authentication at the same time.

### _How was this patch tested?_

Added UT & IT.
I make integration testing on our dev cluster with KERBEROS and CUSTOM authentication.
```
kyuubi.authentication	KERBEROS,CUSTOM
kyuubi.authentication.custom.class=org.apache.kyuubi.ZeusCustom
```

For org.apache.kyuubi.ZeusCustom,  it checks whether the user equals password.
```
package org.apache.kyuubi

import javax.security.sasl.AuthenticationException

import org.apache.kyuubi.service.authentication.PasswdAuthenticationProvider

class ZeusCustom
  extends PasswdAuthenticationProvider with Logging {

  override def authenticate(user: String, password: String): Unit = {
    if (user == password) {
      info(s"Success log in of user: $user")
    } else {
      throw new AuthenticationException("Username or password is not valid!")
    }
  }
}
```

1. kerberos testing with user b_zeus
![image](https://user-images.githubusercontent.com/6757692/138547539-23ce62cf-07bc-4027-ba91-d5099126afde.png)

2. CUTOM authentication testing with user b_zeus
![image](https://user-images.githubusercontent.com/6757692/138547423-e68b3d82-64ab-450a-8fe7-990cab292fd7.png)

Note that: they share the same backend spark engine, because they are the same user.

Closes #1266 from turboFei/multiple_auth_KYUUBI-1262.

Closes #1262

71053aef [fwang12] adress nit
850d6b5d [fwang12] fix ut
ea7db79f [fwang12] complete
11f409cb [fwang12] Update docs
b1f83e55 [fwang12] add ut
8d137db9 [fwang12] make ldap password diff with custom
d227aa74 [fwang12] fix ut
d7cfaf4c [fwang12] only the first is valid
2e2283ba [fwang12] after all
ee0e8bc0 [fwang12] make kerberoes enabled
4fc63081 [fwang12] refactor kerbereos helper
6691cc57 [fwang12] save
cd813ecf [fwang12] refactor
dd706740 [fwang12] retest
f4038e93 [fwang12] fix code style
7b590a23 [fwang12] add ut
e39e19e6 [fwang12] add it
7dc7c927 [fwang12] with password
8dadfd32 [fwang12] refactor ldap suite
8545a033 [fwang12] add ut
1aa30a5c [fwang12] refactor
8cc2ea66 [fwang12] fix ut
10f788ae [fwang12] before all
98f93640 [fwang12] revert sth
bb75f8e9 [fwang12] save
314579f1 [fwang12] update default
ac8b195f [fwang12] [KYUUBI #1262] Support multiple kinds of SASL authentication type

Authored-by: fwang12 <fwang12@ebay.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2021-10-25 13:03:55 +08:00
wForget
0653dada40
[KYUUBI #1204] Enhance zookeeper authentication and acls
<!--
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/apache/incubator-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.
-->

Please see #1204 for details.

### _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/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #1213 from wForget/KYUUBI-1204.

Closes #1204

fa88ffbe [wForget] [KYUUBI #1204] Change the default value of kyuubi.ha.zookeeper.auth.type to NONE
13cd7ecd [wForget] Merge branch 'master' of https://github.com/apache/incubator-kyuubi into dev-1.3.0
3a84c0e1 [wForget] [KYUUBI #1204] fix tests and re-generate settings.md
92c331c7 [wForget] [KYUUBI #1204] Adjust the parameters of zookeeper authentication
db016a03 [wForget] [KYUUBI #1204] Adjust the logic of obtaining the keytab file path
8adb812b [wForget] [KYUUBI #1204] Enhance zookeeper authentication and acls

Authored-by: wForget <643348094@qq.com>
Signed-off-by: Kent Yao <yao@apache.org>
2021-10-22 12:19:04 +08:00
Cheng Pan
eb5749d34b
[KYUUBI #1238] [BUILD] Add back Scala stuff to root POM
<!--
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/apache/incubator-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 partial revert [KYUUBI #1203], recover codecov

### _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/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #1238 from pan3793/mvn.

Closes #1238

b3ba87b2 [Cheng Pan] remove unnecessary changes
c124340a [Cheng Pan] nit
39c436be [Cheng Pan] pom
28546cbd [Cheng Pan] CI
f22e9c91 [Cheng Pan] nit
72e9542d [Cheng Pan] Rebase master
7cd1cba3 [Cheng Pan] [BUILD] Add back Scala stuff to root POM

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2021-10-15 17:49:48 +08:00
Cheng Pan
5d7a6056c6
[KYUUBI #1221] Revert "[KYUUBI #1176][FOLLOWUP] change configuration(ha.zookeeper.acl.engine.enabled) version"
<!--
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/apache/incubator-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 reverts commit 464fdf456b.
The change of [KYUUBI #1176] breaks branch-1.3.
cc cxzl25

### _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/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #1221 from pan3793/revert.

Closes #1221

Closes #1176

5e7294dc [Cheng Pan] Revert "[KYUUBI #1176][FOLLOWUP] change configuration(ha.zookeeper.acl.engine.enabled) version"

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: ulysses-you <ulyssesyou@apache.org>
2021-10-13 10:13:16 +08:00
Cheng Pan
9e6eb086b1
[KYUUBI #1203] [SUB-TASK][BUILD] Remove Scala stuff from kyuubi-hive-jdbc pom
<!--
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/apache/incubator-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.
-->
#1131

### _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/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #1203 from pan3793/pom.

Closes #1203

8e6b8f9b [Cheng Pan] fix
d31fd198 [Cheng Pan] fix
9da82843 [Cheng Pan] fix
6d150de9 [Cheng Pan] fix
9faf77e5 [Cheng Pan] Remove Scala stuff from kyuubi-hive-jdbc pom

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2021-10-09 19:24:05 +08:00
sychen
464fdf456b
[KYUUBI #1176][FOLLOWUP] change configuration(ha.zookeeper.acl.engine.enabled) version
https://github.com/apache/incubator-kyuubi/pull/1177
### _Why are the changes needed?_
change configuration(ha.zookeeper.acl.engine.enabled) version to `1.3.1`

### _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/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #1193 from cxzl25/KYUUBI-1176-followup.

Closes #1176

72753ae5 [sychen] change config version

Authored-by: sychen <sychen@trip.com>
Signed-off-by: ulysses-you <ulyssesyou@apache.org>
2021-10-08 16:56:15 +08:00
sychen
6420a7eb04
[KYUUBI #1174] Service discovery supports kerberos
### _Why are the changes needed?_
https://github.com/apache/incubator-kyuubi/issues/1174
Now kyuubi servcie uses kerberos authentication and registers with the zookeeper to the node information, but the client cannot connect to the service.

### _How was this patch tested?_
- [ ] 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/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #1175 from cxzl25/KYUUBI-1174.

Closes #1174

386c7d57 [sychen] add comment
dc37a158 [sychen] respect user's setting
97401a96 [sychen] update settings.md
fd8cceda [sychen] Service discovery supports kerberos

Authored-by: sychen <sychen@trip.com>
Signed-off-by: Kent Yao <yao@apache.org>
2021-10-08 13:50:22 +08:00
sychen
d332534325
[KYUUBI #1176] InvalidACL appears in the engine when zookeeper acl is turned on
### _Why are the changes needed?_
https://github.com/apache/incubator-kyuubi/issues/1176
When `kyuubi.ha.zookeeper.acl.enabled=true`, both service and engine will use zookeeper acl to create znode, but engine has no keytab information and cannot write information to zookeeper, throwing an exception.

```java
Caused by: org.apache.zookeeper.KeeperException$InvalidACLException: KeeperErrorCode = InvalidACL for /kyuubi_USER/XXXX
	at org.apache.zookeeper.KeeperException.create(KeeperException.java:124)
	at org.apache.zookeeper.KeeperException.create(KeeperException.java:54)
	at org.apache.zookeeper.ZooKeeper.create(ZooKeeper.java:792)
	at org.apache.kyuubi.shade.org.apache.curator.framework.imps.CreateBuilderImpl$11.call(CreateBuilderImpl.java:740)
```

### _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/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #1177 from cxzl25/KYUUBI-1176.

Closes #1176

ecc08fa7 [sychen] fix engine acl
0b7cc2ec [sychen] fix InvalidACL

Authored-by: sychen <sychen@trip.com>
Signed-off-by: Kent Yao <yao@apache.org>
2021-10-08 10:08:30 +08:00
Kent Yao
0ee8eff5a0
[KYUUBI #1143] Refact Serverable/FrontendService/ServiceDiscovery hierarchy
<!--
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/apache/incubator-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.
-->

After this PR, the service named service discovery will be a child service of frontend service and it's optional.

A servalable will contain a backend and a list of frontends, the former one stay AS-IS and the latter is changed from single to multiple, which means a serverable can have multiple interfaces to interact with its different clients

### _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/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #1144 from yaooqinn/1143.

Closes #1143

f2beb721 [Kent Yao] fix test
128cf282 [Kent Yao] nit
37aaff9c [Kent Yao] lift FrontendService trait
add335c4 [Kent Yao] nit
3a111cba [Kent Yao] [KYUUBI #1143] Refact Serverable/FrontendService/ServiceDiscovery hierarchy
bfa63b81 [Kent Yao] [KYUUBI #1143] Refact Serverable/FrontendService/ServiceDiscovery hierarchy
7e5a5cbb [Kent Yao] Merge branch 'master' into 1143
09263bc0 [Kent Yao] [KYUUBI #1143] Refact Serverable/FrontendService/ServiceDiscovery hierarchy

Authored-by: Kent Yao <yao@apache.org>
Signed-off-by: Kent Yao <yao@apache.org>
2021-09-24 13:35:20 +08:00
ulysses-you
347c932768 [KYUUBI #1032] Keep server session id and engien session id consistent
<!--
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/apache/incubator-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.
-->
Closes https://github.com/apache/incubator-kyuubi/issues/1032

### _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

- [ ] [Run test](https://kyuubi.readthedocs.io/en/latest/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #1033 from ulysses-you/engine-session-id.

Closes #1032

5aa5f5f8 [ulysses-you] indention
a97ae1b5 [ulysses-you] nit
aef754b4 [ulysses-you] engine ref id
62399c40 [ulysses-you] cleanup
2bf13a63 [ulysses-you] nit
11e925dd [ulysses-you] engine side generate
da3f51be [ulysses-you] nit
6136f66b [ulysses-you] keep server session id and engien session id consistent

Authored-by: ulysses-you <ulyssesyou18@gmail.com>
Signed-off-by: ulysses-you <ulyssesyou18@gmail.com>
2021-09-07 09:51:08 +08:00
yanghua
01bebe36e8 [KYUUBI #1011] Fallback some frontend service config option about thrift
<!--
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/apache/incubator-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.
-->

### _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/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #1016 from yanghua/KYUUBI-1011.

Closes #1011

78107b76 [yanghua] Addressed review suggestion
651b5989 [yanghua] [KYUUBI #1011] Fallback some frontend service config option about thrift

Authored-by: yanghua <yanghua1127@gmail.com>
Signed-off-by: ulysses-you <ulyssesyou18@gmail.com>
2021-09-03 09:30:29 +08:00
zhouyifan279
866a63d7a7
[KYUUBI #1005] ServiceDiscoverySuite fails if hostname contains uppercase letter
<!--
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/apache/incubator-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.
-->
Executing test case "ServiceDiscoverySuite set up zookeeper auth" on a Linux host named "KYUUBI" fails.

### _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/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #1006 from zhouyifan279/KYUUBI#1005.

Closes #1005

045c6b34 [zhouyifan279] [KYUUBI #1005] ServiceDiscoverySuite fails if hostname contains uppercase letter

Authored-by: zhouyifan279 <zhouyifan279@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2021-08-31 20:36:37 +08:00
timothy65535
32b18ba19c
[KYUUBI #933] Enhance the detection mechanism for engine startup
### 1. Description

EngineRef use exists znode to determine whether engine started successfully or not(use the last znode), there are inconsistencies in this. So, take an idea to improve the detection mechanism by adding the started sessionid to the znone. `EngineRef` will check the sessionid in a loop after a engine started.

### 2. Here are two options
**Option I, add sesssionid to the data of znode**
![image](https://user-images.githubusercontent.com/86483005/128994276-5c9c7839-0a21-4253-8989-110b88ac0e74.png)

**Option II, add sessionid to the path of znode**
![image](https://user-images.githubusercontent.com/86483005/129527282-46f7f726-e110-4d87-9272-dda9b9f325bf.png)

### 3. Solution

In order to be consistent with the design of server znode, prefer to choose _Option II_ .

**Demo**
```
/kyuubi
- serviceUri=bigdata:10009;version=1.3.0-SNAPSHOT;sequence=0000000000
/kyuubi_USER/test
- serviceUri=bigdata:39869;version=1.3.0-SNAPSHOT;session=8178069f-0b22-4d06-b1c0-908094769397;sequence=0000000000]
```

Closes #935 from timothy65535/ky-933.

Closes #933

ab5d6d80 [timothy65535] add issue id
d21cb990 [timothy65535] compatible with back
568acf21 [timothy65535] fix error
3db8ba7f [timothy65535] move EngineRef get to Discovery
827f3780 [timothy65535] rename get to getEngineBySessionId
88229314 [timothy65535] update session id using internal
ab06adf8 [timothy65535] improve EngineRef get logic
6a1cc39a [timothy65535] update session version
c94b6e55 [timothy65535] rename sessionId to createSessionId
0cc6aae2 [timothy65535] update ha conf
d24a152f [timothy65535] update ha conf
1a67c864 [timothy65535] fix initialize sql suite
b3b502de [timothy65535] [KYUUBI #933] Enhance the detection mechanism for engine startup

Authored-by: timothy65535 <timothy65535@163.com>
Signed-off-by: Kent Yao <yao@apache.org>
2021-08-19 11:10:21 +08:00
Cheng Pan
98f38ba517
[BUILD] Bump 1.4.0-SNAPSHOT 2021-08-17 01:39:06 +08:00
timothy65535
9efa78b65e
[KYUUBI #930] Extract the zookeeper part from ServiceDiscovery
<!--
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/apache/incubator-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?_
### Description

`ServiceDiscovery` contains `discovery` and `zookeeper` part, `ServiceDiscovery` should only has one responsibility.

![image](https://user-images.githubusercontent.com/86483005/129339811-9cfaeabf-10dc-4962-9d59-4ca7835ccce5.png)

### _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/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #931 from timothy65535/ky-930.

Closes #930

29d48921 [timothy65535] Add ZooKeeperClientProvider
17fbe5a2 [timothy65535] [KYUUBI #930] Extract the zookeeper part from ServiceDiscovery

Authored-by: timothy65535 <timothy65535@163.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2021-08-14 23:11:18 +08:00
Cheng Pan
4fecf13902 [KYUUBI #888] Add scala version suffix on scala modules
<!--
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/apache/incubator-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.
-->
- Add scala version suffix on scala modules to match the name pattern.
- Enable `kyuubi-extension-spark-3-1` in daily publish snapshot

### _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 #888 from pan3793/scala.

Closes #888

571eb9c3 [Cheng Pan] comments
16cb263a [Cheng Pan] remove hardcode scala version in pom
6090c798 [Cheng Pan] Fix shade
5178847f [Cheng Pan] Fixup
a1547753 [Cheng Pan] Fix engine jar name
2cf4793e [Cheng Pan] fix
cac96531 [Cheng Pan] Enable kyuubi-extension-spark-3-1 in daily publish snapshot
1ca31de5 [Cheng Pan] Add scala version suffix on scala modules

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: ulysses-you <ulyssesyou18@gmail.com>
2021-08-04 09:31:19 +08:00
Cheng Pan
ce5fb97036
[KYUUBI #849] ASF Nexus SNAPSHOT publish
<!--
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/apache/incubator-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.
-->
https://infra.apache.org/publishing-maven-artifacts.html
https://issues.apache.org/jira/browse/INFRA-22114

### _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 #849 from pan3793/asf.

Closes #849

c609f6ba [Cheng Pan] update pom
31f1f2e1 [Cheng Pan] rename root project name to kyuubi-parent
9c5616d8 [Cheng Pan] [INFRA] Update POM for Apache release

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Kent Yao <yao@apache.org>
2021-07-23 13:15:05 +08:00
timothy65535
980d559f1c
[KYUUBI #732] Fix always print the name of abstract ServiceDiscovery class
### _Why are the changes needed?_

The abstract `ServiceDiscovery` class has two subclass (KyuubiServiceDiscovery and EngineServiceDiscovery), but only abstract class name is always printed in the log.

```
2021-07-01 00:47:30.046 INFO kyuubi.SparkSQLEngineListener: Received ApplicationEnd Message from Spark at INITIALIZED, stopping
2021-07-01 00:47:30.047 INFO spark.SparkSQLEngine: Service: [ServiceDiscovery] is stopping.
2021-07-01 00:47:30.051 INFO imps.CuratorFrameworkImpl: backgroundOperationsLoop exiting
```

### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible

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

```
2021-07-01 01:53:09.124 INFO zookeeper.ClientCnxn: Socket error occurred: localhost/127.0.0.1:2181: Connection refused
2021-07-01 01:53:09.128 INFO client.EngineServiceDiscovery: Service[EngineServiceDiscovery] is initialized.
2021-07-01 01:53:09.128 INFO spark.SparkSQLEngine: Service[SparkSQLEngine] is initialized.

2021-07-01 01:54:13.417 INFO kyuubi.SparkSQLEngineListener: Received ApplicationEnd Message from Spark at INITIALIZED, stopping
2021-07-01 01:54:13.418 INFO spark.SparkSQLEngine: Service: [EngineServiceDiscovery] is stopping.
2021-07-01 01:54:13.420 INFO imps.CuratorFrameworkImpl: backgroundOperationsLoop exiting
```

Closes #733 from timothy65535/work.

Closes #732

31d8b04b [timothy65535] remove redundant constructor
2fa8e7b2 [timothy65535] [KYUUBI #732] Fix always print the name of abstract ServiceDiscovery class

Authored-by: timothy65535 <timothy65535@163.com>
Signed-off-by: Kent Yao <yao@apache.org>
2021-07-01 17:51:00 +08:00
Kent Yao
bb9e8a50e5
Prepare Kyuubi v1.3.0 2021-05-13 13:58:20 +08:00
Kent Yao
d2be0f34e8 [KYUUBI #629] Refine distributed lock to lock only engine bootstrap
<!--
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>
2021-05-12 13:19:15 +08:00
Kent Yao
b4a505971c [KYUUBI #627] Support multiple engines for non-connection share levels
<!--
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>
2021-05-11 10:14:23 +08:00
Honglun
41f0274ba4 [KYUUBI #624] Add lock while creating engine with non-CONNECTION mode
<!--
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>
2021-05-08 19:12:01 +08:00
Cheng Pan
c47ff0c6fa [KYUUBI #541] [TEST][DEP] Replace apacheds by ldapsdk for LDAP tests
<!--
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>
2021-04-19 22:03:51 +08:00
fwang12
05776488d4 [KYUUBI #511] Use PersistentNode to take place of deprecated PersistentEphemeralNode
![turboFei](https://badgen.net/badge/Hello/turboFei/green) [![Closes #511](https://badgen.net/badge/Preview/Closes%20%23511/blue)](https://github.com/yaooqinn/kyuubi/pull/511) ![4](https://badgen.net/badge/%2B/4/red) ![3](https://badgen.net/badge/-/3/green) ![1](https://badgen.net/badge/commits/1/yellow) ![Target Issue](https://badgen.net/badge/Missing/Target%20Issue/ff0000) ![Test Plan](https://badgen.net/badge/Missing/Test%20Plan/ff0000) [<img width="16" alt="Powered by Pull Request Badge" src="https://user-images.githubusercontent.com/1393946/111216524-d2bb8e00-85d4-11eb-821b-ed4c00989c02.png">](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.
-->

PersistentEphemeralNode is deprecated, in this pr, use PersistentNode with EPHEMERAL_SEQUENTIAL  mode to take place of  PersistentEphemeralNode.

FYI:

15a9f03f6f/curator-recipes/src/main/java/org/apache/curator/framework/recipes/nodes/PersistentEphemeralNode.java (L34)

### _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 #511 from turboFei/deprecated_persist_em_node.

Closes #511

8611fc1 [fwang12] Use PersistentNode to take place of deprecated PersistentEphemeralNode

Authored-by: fwang12 <fwang12@ebay.com>
Signed-off-by: fwang12 <fwang12@ebay.com>
2021-04-12 11:36:46 +08:00
fwang12
32b9ad0d6e [KYUUBI #304] Kyuubi service control client action implementation
![turboFei](https://badgen.net/badge/Hello/turboFei/green) [![Closes #478](https://badgen.net/badge/Preview/Closes%20%23478/blue)](https://github.com/yaooqinn/kyuubi/pull/478) ![992](https://badgen.net/badge/%2B/992/red) ![253](https://badgen.net/badge/-/253/green) ![9](https://badgen.net/badge/commits/9/yellow) ![Feature](https://badgen.net/badge/Label/Feature/) [<img width="16" alt="Powered by Pull Request Badge" src="https://user-images.githubusercontent.com/1393946/111216524-d2bb8e00-85d4-11eb-821b-ed4c00989c02.png">](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.
-->
Implement the create/list/get/delete action for Kyuubi-ctl

### _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 #478 from turboFei/KYUUBI_CTL_304_CREATE.

Closes #304

d81be9e8 [fwang12] refactor column name
f4e18d1f [fwang12] address comments
94941079 [fwang12] use function t o generate expected output
b07e55b6 [fwang12] align class name with ServiceControlCli
641f7021 [fwang12] refactor format
8098f96a [fwang12] refactor for delete action
489dad32 [fwang12] address comments
16f60218 [fwang12] add list/get/delete action and refer the zk nodes info
85c147ee [fwang12] [KYUUBI #304] Kyuubi service control client action- expose existing kyuubi server instances to another domain

Authored-by: fwang12 <fwang12@ebay.com>
Signed-off-by: Cheng Pan <379377944@qq.com>
2021-04-11 21:47:34 +08:00
fwang12
9a8b2860f6 [KYUUBI #506] Shade curator dependencies to avoid impaction by external jars
![turboFei](https://badgen.net/badge/Hello/turboFei/green) [![Closes #506](https://badgen.net/badge/Preview/Closes%20%23506/blue)](https://github.com/yaooqinn/kyuubi/pull/506) ![26](https://badgen.net/badge/%2B/26/red) ![3](https://badgen.net/badge/-/3/green) ![1](https://badgen.net/badge/commits/1/yellow) ![Target Issue](https://badgen.net/badge/Missing/Target%20Issue/ff0000) ![Test Plan](https://badgen.net/badge/Missing/Test%20Plan/ff0000) ![Bug](https://badgen.net/badge/Label/Bug/) [<img width="16" alt="Powered by Pull Request Badge" src="https://user-images.githubusercontent.com/1393946/111216524-d2bb8e00-85d4-11eb-821b-ed4c00989c02.png">](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?_
Shade curator dependencies to avoid impaction by external jars.

### _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 #506 from turboFei/shade_curator_new.

Closes #506

4c6fdeaa [fwang12] Shade curator dependencies to avoid impaction by external jars

Authored-by: fwang12 <fwang12@ebay.com>
Signed-off-by: Cheng Pan <379377944@qq.com>
2021-04-10 11:07:13 +08:00
Cheng Pan
b7ac3cb48c Revert "[KYUUBI #488] Add kyuubi-shaded module to avoid conflicts with external jars"
This reverts commit e058b87dd2.
2021-04-10 00:16:04 +08:00
fwang12
e058b87dd2
[KYUUBI #488] Add kyuubi-shaded module to avoid conflicts with external jars
![turboFei](https://badgen.net/badge/Hello/turboFei/green) [![Closes #488](https://badgen.net/badge/Preview/Closes%20%23488/blue)](https://github.com/yaooqinn/kyuubi/pull/488) ![454](https://badgen.net/badge/%2B/454/red) ![289](https://badgen.net/badge/-/289/green) ![10](https://badgen.net/badge/commits/10/yellow) ![Target Issue](https://badgen.net/badge/Missing/Target%20Issue/ff0000) ![Feature](https://badgen.net/badge/Label/Feature/) [<img width="16" alt="Powered by Pull Request Badge" src="https://user-images.githubusercontent.com/1393946/111216524-d2bb8e00-85d4-11eb-821b-ed4c00989c02.png">](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?_
Shade curator dependency in kyuubi-ha module to avoid impaction by external jars.

### _How was this patch tested?_
Existing UT.

- [x] [Run test](https://kyuubi.readthedocs.io/en/latest/tools/testing.html#running-tests) locally before make a pull request

Closes #488 from turboFei/shade_curator.

Closes #488

c88414c [fwang12] Use wildcards when selecting more than 6 elements
a2dfbf6 [fwang12] add doc for install shaded jars
224cc38 [fwang12] remove transactions
c7b9df3 [fwang12] address comments
81fc123 [fwang12] scala style
408c978 [fwang12] create kyuubi-shaded module to shade dependencies
6b15b45 [fwang12] shade hive service rpc
b4b3b1a [fwang12] include curator-client
65086ed [fwang12] address comments
a46f00f [fwang12] Shade curator dependencies to avoid impaction by external jars

Authored-by: fwang12 <fwang12@ebay.com>
Signed-off-by: Kent Yao <yao@apache.org>
2021-04-09 11:29:24 +08:00
fwang12
5b9ef3c3df
[KYUUBI #483] Add configEntry for zookeeper node timeout
![turboFei](https://badgen.net/badge/Hello/turboFei/green) [![Closes #484](https://badgen.net/badge/Preview/Closes%20%23484/blue)](https://github.com/yaooqinn/kyuubi/pull/484) ![45](https://badgen.net/badge/%2B/45/red) ![2](https://badgen.net/badge/-/2/green) ![2](https://badgen.net/badge/commits/2/yellow) [<img width="16" alt="Powered by Pull Request Badge" src="https://user-images.githubusercontent.com/1393946/111216524-d2bb8e00-85d4-11eb-821b-ed4c00989c02.png">](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?_
Add configEntry for zookeeper node timeout instead of using constant value

### _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 #484 from turboFei/KYUUBI_304_znode_timeout.

Closes #483

786b915 [fwang12] address comments
5c8dbc1 [fwang12] [KYUUBI #483] Add configEntry for zookeeper node timeout

Authored-by: fwang12 <fwang12@ebay.com>
Signed-off-by: Kent Yao <yao@apache.org>
2021-04-05 20:00:46 +08:00
fwang12
c8a5b06019
[KYUUBI #304] Stop engine server gracefully when related zk node is deleted
![turboFei](https://badgen.net/badge/Hello/turboFei/green) [![Closes #477](https://badgen.net/badge/Preview/Closes%20%23477/blue)](https://github.com/yaooqinn/kyuubi/pull/477) ![76](https://badgen.net/badge/%2B/76/red) ![36](https://badgen.net/badge/-/36/green) ![1](https://badgen.net/badge/commits/1/yellow) ![Feature](https://badgen.net/badge/Label/Feature/) [<img width="16" alt="Powered by Pull Request Badge" src="https://user-images.githubusercontent.com/1393946/111216524-d2bb8e00-85d4-11eb-821b-ed4c00989c02.png">](https://pullrequestbadge.com/?utm_medium=github&utm_source=yaooqinn&utm_campaign=badge_info)<!-- PR-BADGE: PLEASE DO NOT REMOVE THIS COMMENT -->

### _Why are the changes needed?_
Stop engine server gracefully when related zk node is deleted

### _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 #477 from turboFei/KYUUBI_304_STOP_ON_DELETE.

Closes #304

be7d975 [fwang12] [KYUUBI #304] Stop engine server gracefully when related zk node is deleted

Authored-by: fwang12 <fwang12@ebay.com>
Signed-off-by: Kent Yao <yao@apache.org>
2021-04-03 20:59:57 +08:00
Kent Yao
c6585b4708
[KYUUBI #471] Separate Embedded Zookeeper server from ha
![yaooqinn](https://badgen.net/badge/Hello/yaooqinn/green) [![Closes #471](https://badgen.net/badge/Preview/Closes%20%23471/blue)](https://github.com/yaooqinn/kyuubi/pull/471) ![386](https://badgen.net/badge/%2B/386/red) ![152](https://badgen.net/badge/-/152/green) ![8](https://badgen.net/badge/commits/8/yellow) ![Target Issue](https://badgen.net/badge/Missing/Target%20Issue/ff0000) [<img width="16" alt="Powered by Pull Request Badge" src="https://user-images.githubusercontent.com/1393946/111216524-d2bb8e00-85d4-11eb-821b-ed4c00989c02.png">](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.
-->

1. Separated embedded zk from ha module, as it's only used for setup a zk from Kyuubi server for now if there is not an external one
2. Support more configuration for the embedded zookeeper, for example, HOSTNAME, then it's more close to prod usage.
3. TODO: Make the embedded zookeeper of our own, which should support as quorum peers

### _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

- [ ] [Run test](https://kyuubi.readthedocs.io/en/latest/tools/testing.html#running-tests) locally before make a pull request

Closes #471 from yaooqinn/qp.

Closes #471

1c24d02 [Kent Yao] address comments
9666a40 [Kent Yao] refine
f069fc0 [Kent Yao] refine
8bb2f3a [Kent Yao] refine
c20593a [Kent Yao] refine
8fa9a40 [Kent Yao] Merge branch 'master' into qp
1e2e1a3 [Kent Yao] tmp
7d66d05 [Kent Yao] tmp

Authored-by: Kent Yao <yao@apache.org>
Signed-off-by: Kent Yao <yao@apache.org>
2021-03-30 18:34:01 +08:00
Kent Yao
392a10ce71
[KYUUBI #458] Mute Console Appender for CI
![yaooqinn](https://badgen.net/badge/Hello/yaooqinn/green) [![Closes #458](https://badgen.net/badge/Preview/Closes%20%23458/blue)](https://github.com/yaooqinn/kyuubi/pull/458) ![66](https://badgen.net/badge/%2B/66/red) ![12](https://badgen.net/badge/-/12/green) ![1](https://badgen.net/badge/commits/1/yellow) ![Target Issue](https://badgen.net/badge/Missing/Target%20Issue/ff0000) [<img width="16" alt="Powered by Pull Request Badge" src="https://user-images.githubusercontent.com/1393946/111216524-d2bb8e00-85d4-11eb-821b-ed4c00989c02.png">](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.
-->
Rely on the unit-tests.log is better for us to reduce the overhead of CIs

### _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

Closes #458 from yaooqinn/log.

7eb1521 [Kent Yao] logbetter

Authored-by: Kent Yao <yao@apache.org>
Signed-off-by: Kent Yao <yao@apache.org>
2021-03-26 16:41:56 +08:00
谢波
9c13f73bd9 [KYUUBI #417] [MINOR] Remove all unused import
![MyLanPangzi](https://badgen.net/badge/Hello/MyLanPangzi/green) [![Closes #417](https://badgen.net/badge/Preview/Closes%20%23417/blue)](https://github.com/yaooqinn/kyuubi/pull/417) ![29](https://badgen.net/badge/%2B/29/red) ![27](https://badgen.net/badge/-/27/green) ![7](https://badgen.net/badge/commits/7/yellow) ![Target Issue](https://badgen.net/badge/Missing/Target%20Issue/ff0000) ![Test Plan](https://badgen.net/badge/Missing/Test%20Plan/ff0000) [&#10088;?&#10089;](https://pullrequestbadge.com/?utm_medium=github&utm_source=yaooqinn&utm_campaign=badge_info)<!-- PR-BADGE: PLEASE DO NOT REMOVE THIS COMMENT -->

### _Why are the changes needed?_
remove all unused import and replace deprecated class PersistentEphemeralNode with PersistentNode in ServiceDiscovery

### _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 #417 from MyLanPangzi/master.

821e0d2 [hiscat] Merge branch 'master' into master
db9cd3c [谢波] [MINOR]: revert ServiceDiscovery change and add scala maven plugin compiler args
c56cd2b [谢波] [MINOR]: revert ProcBuilder indent
ad5e24a [谢波] [MINOR]: revert maven.plugin.scalatest.exclude.tags properties
7c23e37 [谢波] [MINOR]: scala maven plugin config move to plugin management
6029b99 [谢波] [MINOR]: remove all unused import
a305567 [谢波] [MINOR]: remove all unused import

Lead-authored-by: 谢波 <xiebo1@yonghui.cn>
Co-authored-by: hiscat <46845236+MyLanPangzi@users.noreply.github.com>
Signed-off-by: Cheng Pan <379377944@qq.com>
2021-03-15 20:05:08 +08:00
yangrong688
03ba80dbcd
[KYUUBI #434] [DOCS] Rename BONDED_EXPONENTIAL_BACKOFF to BOUNDED_EXPONENTIAL_BACKOFF
![yangrong688](https://badgen.net/badge/Hello/yangrong688/green) [![Closes #434](https://badgen.net/badge/Preview/Closes%20%23434/blue)](https://github.com/yaooqinn/kyuubi/pull/434) ![7](https://badgen.net/badge/%2B/7/red) ![7](https://badgen.net/badge/-/7/green) ![2](https://badgen.net/badge/commits/2/yellow) ![Target Issue](https://badgen.net/badge/Missing/Target%20Issue/ff0000) ![Test Plan](https://badgen.net/badge/Missing/Test%20Plan/ff0000) ![Doc](https://badgen.net/badge/Label/Doc/) [&#10088;?&#10089;](https://pullrequestbadge.com/?utm_medium=github&utm_source=yaooqinn&utm_campaign=badge_info)<!-- PR-BADGE: PLEASE DO NOT REMOVE THIS COMMENT -->

change BONDED_EXPONENTIAL_BACKOFF to BOUNDED_EXPONENTIAL_BACKOFF

Closes #434 from yangrong688/master.

492ceb9 [yangrong688] fix typo
8bd6809 [yangrong688] fix typo

Authored-by: yangrong688 <yangrong.jxufe@gmail.com>
Signed-off-by: Kent Yao <yao@apache.org>
2021-03-15 11:45:12 +08:00
Kent Yao
5e2a1290c3
Prepare Kyuubi v1.2.0 2021-03-08 19:50:12 +08:00
ulysses-you
9cb507d3d1 [KYUUBI #395] [WIP] FIx flaky test in ConnectionLevelSparkEngineSuite
![ulysses-you](https://badgen.net/badge/Hello/ulysses-you/green) [![Closes #395](https://badgen.net/badge/Preview/Closes%20%23395/blue)](https://github.com/yaooqinn/kyuubi/pull/395) ![2](https://badgen.net/badge/%2B/2/red) ![1](https://badgen.net/badge/-/1/green) ![10](https://badgen.net/badge/commits/10/yellow) ![Target Issue](https://badgen.net/badge/Missing/Target%20Issue/ff0000) ![Test Plan](https://badgen.net/badge/Missing/Test%20Plan/ff0000) [&#10088;?&#10089;](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.
-->

### _How was this patch tested?_

Closes #395 from ulysses-you/flaky-test.

e8bdd4d [ulysses-you] empty
08febfc [ulysses-you] empty
c3805d1 [ulysses-you] empty
702ac2c [ulysses-you] empty
a544ef0 [ulysses-you] empty
0bd8878 [ulysses-you] empty
dbd53e4 [ulysses-you] fix
f4be895 [ulysses-you] empty
195933a [ulysses-you] empty
cb69e0d [ulysses-you] wip

Authored-by: ulysses-you <ulyssesyou18@gmail.com>
Signed-off-by: ulysses-you <ulyssesyou18@gmail.com>
2021-03-05 17:14:07 +08:00
Cheng Pan
4abc3ff6a0
[KYUUBI #398] Move to hadoop shaded client
![pan3793](https://badgen.net/badge/Hello/pan3793/green) [![Closes #399](https://badgen.net/badge/Preview/Closes%20%23399/blue)](https://github.com/yaooqinn/kyuubi/pull/399) ![101](https://badgen.net/badge/%2B/101/red) ![41](https://badgen.net/badge/-/41/green) ![5](https://badgen.net/badge/commits/5/yellow) [&#10088;?&#10089;](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>
2021-03-04 23:33:31 +08:00
ulysses-you
aa878e4d48
[KYUUBI #386] Clean up discovery service before engine stop in connection share level
![ulysses-you](https://badgen.net/badge/Hello/ulysses-you/green) [![Closes #387](https://badgen.net/badge/Preview/Closes%20%23387/blue)](https://github.com/yaooqinn/kyuubi/pull/387) ![330](https://badgen.net/badge/%2B/330/red) ![52](https://badgen.net/badge/-/52/green) ![18](https://badgen.net/badge/commits/18/yellow) ![Test Plan](https://badgen.net/badge/Missing/Test%20Plan/ff0000) [&#10088;?&#10089;](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>
2021-03-04 11:31:41 +08:00
Kent Yao
8e8679e92b
[KYUUBI #392] Remove netty dependency
![yaooqinn](https://badgen.net/badge/Hello/yaooqinn/green) [![Closes #392](https://badgen.net/badge/Preview/Closes%20%23392/blue)](https://github.com/yaooqinn/kyuubi/pull/392) ![0](https://badgen.net/badge/%2B/0/red) ![23](https://badgen.net/badge/-/23/green) ![2](https://badgen.net/badge/commits/2/yellow) ![Target Issue](https://badgen.net/badge/Missing/Target%20Issue/ff0000) [&#10088;?&#10089;](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.
-->

netty is unnecessary

### _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

Closes #392 from yaooqinn/netty.

824d84e [Kent Yao] nit
402317d [Kent Yao] Remove netty dependency

Authored-by: Kent Yao <yao@apache.org>
Signed-off-by: Kent Yao <yao@apache.org>
2021-03-03 22:23:38 +08:00
Kent Yao
0f62568171
[KYUUBI #379] Improve engine log capture
![yaooqinn](https://badgen.net/badge/Hello/yaooqinn/green) [![Closes #379](https://badgen.net/badge/Preview/Closes%20%23379/blue)](https://github.com/yaooqinn/kyuubi/pull/379) ![143](https://badgen.net/badge/%2B/143/red) ![121](https://badgen.net/badge/-/121/green) ![5](https://badgen.net/badge/commits/5/yellow) ![Target Issue](https://badgen.net/badge/Missing/Target%20Issue/ff0000) [&#10088;?&#10089;](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.
-->

1. limit error size with `kyuubi.session.engine.startup.error.max.size` to reduce long time pause or heap overhead
2. update `error` immediately when detecting errors at the very first line ASAP
3. Using `Exception:` instead of `Exception` to search each line to filter better
4. add the engine log address in the exception message in  case of error bootstraping

### _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 #379 from yaooqinn/logsize.

7cf58da [Kent Yao] mute in console
b58a3a2 [Kent Yao] update
fbc4a0b [Kent Yao] update
0815f77 [Kent Yao] log
93f5f2f [Kent Yao] log

Authored-by: Kent Yao <yao@apache.org>
Signed-off-by: Kent Yao <yao@apache.org>
2021-02-26 17:31:44 +08:00
Kent Yao
d94b1c4519
[KYUUBI #369] Using a lightweight zk client for kyuubi session
![yaooqinn](https://badgen.net/badge/Hello/yaooqinn/green) [![Closes #369](https://badgen.net/badge/Preview/Closes%20%23369/blue)](https://github.com/yaooqinn/kyuubi/pull/369) ![60](https://badgen.net/badge/%2B/60/red) ![34](https://badgen.net/badge/-/34/green) ![3](https://badgen.net/badge/commits/3/yellow) ![Target Issue](https://badgen.net/badge/Missing/Target%20Issue/ff0000) [&#10088;?&#10089;](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.
-->

1. limit zkClient to method wide
2. a more lightweight retry policy
3. add some trace log for Kyuubi session
### _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

Closes #369 from yaooqinn/zk.

5cbe14f [Kent Yao] typo
731bae8 [Kent Yao] typo
51365da [Kent Yao] Using a lightweight zk client for kyuubi session

Authored-by: Kent Yao <yao@apache.org>
Signed-off-by: Kent Yao <yao@apache.org>
2021-02-25 16:57:55 +08:00
Kent Yao
efdd9fafc8
[KYUUBI #307]GetCatalogs supports DSv2 and keeps its backward compatibility (#307)
![yaooqinn](https://badgen.net/badge/Hello/yaooqinn/green) [![PR 307](https://badgen.net/badge/Preview/PR%20307/blue)](https://github.com/yaooqinn/kyuubi/pull/307) ![Feature](https://badgen.net/badge/Label/Feature/) [&#10088;?&#10089;](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
-->

### Please add issue ID here?
<!-- replace ${issue ID} with the actual issue id -->
Fixes #307

### 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 user case of it.
  2. If you fix a bug, you can clarify why it is a bug.
-->

GetCatalogs supports DSv2 and keeps its backward compatibility

### Test Plan:
- [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
![image](https://user-images.githubusercontent.com/8326978/106161043-7259c400-61c1-11eb-9beb-3326f6093284.png)

- [x] [Run test](https://kyuubi.readthedocs.io/en/latest/tools/testing.html#running-tests) locally before make a pull request

* GetCatalogs supports DSv2

* pr template

* nit

* nit

* shim

* add iceberg tests

* nit
2021-01-29 10:27:48 +08:00
Cheng Pan
0eeb99774f
Tune pom
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
2021-01-09 23:30:46 +08:00
ulysses-you
7b56bb27f9
Fix EmbeddedZkServerSuite embedded zookeeper server NPE problem
fixes #267
Squashed commit of the following:

commit 38b3278e2bd4285dabeee093df855a1497ad35f8
Author: ulysses-you <ulyssesyou18@gmail.com>
Date:   Fri Jan 8 12:43:14 2021 +0800

    user name

commit 76c5691f4a9dc419668d8610f5cf148d266ff46c
Author: cathy <cathy@cathydeMacBook-Pro.local>
Date:   Fri Jan 8 12:11:31 2021 +0800

    move to stop

commit 15e0ca8f7ec5e3fa27fda3572dc44ab3fa83c9ac
Author: cathy <cathy@cathydeMacBook-Pro.local>
Date:   Fri Jan 8 11:50:49 2021 +0800

    init
2021-01-08 13:09:44 +08:00
Kent Yao
ca1b452e9a
Prepare Kyuubi v1.1.0 2020-12-31 15:51:12 +08:00
Kent Yao
17fe83778e
ServiceDiscovery for kyuubi servver 2020-12-28 13:05:35 +08:00
Kent Yao
a0f900a629
Reformat ServiceDiscovery 2020-12-28 00:10:31 +08:00
Kent Yao
3ec0db6a40
Improve Session Share Level 2020-12-27 00:05:07 +08:00
Kent Yao
b11a9d4172
Support _HOST 2020-12-14 20:47:11 +08:00
Kent Yao
15820a2b09 fix 2020-11-16 19:42:06 +08:00
Kent Yao
f8dc5a9ca3 Using ha.zookeeper.acl.enabled to control ZK acl 2020-11-09 17:34:55 +08:00
Kent Yao
cdb46e90db Add Configurations Guide 2020-11-04 22:40:02 +08:00
Kent Yao
c1b44de85c ignore test 2020-11-03 11:43:56 +08:00
Kent Yao
67858e8c15 [DOCS] Add qucik start documentation 2020-11-02 21:07:11 +08:00
Kent Yao
91c14960f4 nit 2020-10-30 19:34:41 +08:00
Kent Yao
1a4299f8a1 KinitAuxiliaryService added 2020-10-29 16:21:58 +08:00
Kent Yao
e7a1054fd2 fix work dir bug 2020-10-14 14:59:49 +08:00
Kent Yao
0b07dfd6dd improve test cov 2020-10-14 11:33:56 +08:00