Commit Graph

149 Commits

Author SHA1 Message Date
ITzhangqiang
e51095edaa
[KYUUBI #5365] Don't use Log4j2's extended throwable conversion pattern in default logging configurations
### _Why are the changes needed?_

The Apache Spark Community found a performance regression with log4j2. See https://github.com/apache/spark/pull/36747.

This PR to fix the performance issue on our side.

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

### _Was this patch authored or co-authored using generative AI tooling?_
No.

Closes #5400 from ITzhangqiang/KYUUBI_5365.

Closes #5365

dbb9d8b32 [ITzhangqiang] [KYUUBI #5365] Don't use Log4j2's extended throwable conversion pattern in default logging configurations

Authored-by: ITzhangqiang <itzhangqiang@163.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2023-10-11 21:41:22 +08:00
Cheng Pan
1a925d8c73 [KYUUBI #5253][FOLLOWUP] Supply testcontainers-scala-scalatest deps
### _Why are the changes needed?_

Recover CI.

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

### _Was this patch authored or co-authored using generative AI tooling?_

No

Closes #5258 from pan3793/testcontainers.

Closes #5253

c1c8241af [Cheng Pan] fix
ce4f9ed2c [Cheng Pan] [KYUUBI #5253][FOLLOWUP] Supply testcontainers-scala-scalatest deps for ha module

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2023-09-06 09:23:06 +00:00
Cheng Pan
6061a05f24
Bump 1.9.0-SNAPSHOT 2023-09-04 14:23:12 +08:00
Bowen Liang
9b932df25a [KYUUBI #5213] [Improvement] Check config value by enum values
### _Why are the changes needed?_

- check config values in the range of targeted enum values

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

### _Was this patch authored or co-authored using generative AI tooling?_

No.

Closes #5213 from bowenliang123/config-checkenum.

Closes #5213

857af7c6b [Bowen Liang] is valid enum
2862e5e7c [Bowen Liang] embrace
afe6a5333 [Bowen Liang] assert
00d22f73b [liangbowen] support checking config in the range of enumeration values

Lead-authored-by: Bowen Liang <liangbowen@gf.com.cn>
Co-authored-by: liangbowen <liangbowen@gf.com.cn>
Signed-off-by: liangbowen <liangbowen@gf.com.cn>
2023-08-30 22:32:39 +08:00
liangbowen
0b1a0cb4f2 [KYUUBI #5183] Introducing profile scala-2.13 for development use
### _Why are the changes needed?_

- introducing `scala-2.13` for development use only
- adapt the common modules compilable on Scala 2.13, including
  - kyuubi-common
  - kyuubi-ctl
  - kyuubi-ha
- use separate compile options for Scala 2.13 , skipping deprecated scala compiler option `-Yno-adapted-args`

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

### _Was this patch authored or co-authored using generative AI tooling?_

Closes #5183 from bowenliang123/scala213-common.

Closes #5183

1e65a5d03 [Bowen Liang] Align scala 2.13 version with Spark to 2.13.8
0003c8bed [liangbowen] duplicate scala-maven-plugin configs in profile
8b448a5f0 [liangbowen] 2.13.11
36d2284c4 [liangbowen] comment
28b515a0c [liangbowen] comment
865c5e55b [liangbowen] update
52e381200 [liangbowen] ensure kyuubi-ctl module compilable on scala 2.13
70dbc7ae2 [liangbowen] ensure kyuubi-ha module compilable on scala 2.13
84c1e4b4d [liangbowen] ensure kyuubi-common module compilable on scala 2.13
e116d77f5 [liangbowen] skip deprecated compiler option "-Yno-adapted-args" in 2.13
26c27a2ee [liangbowen] introduce new profile scala-2.13

Lead-authored-by: liangbowen <liangbowen@gf.com.cn>
Co-authored-by: Bowen Liang <liangbowen@gf.com.cn>
Signed-off-by: liangbowen <liangbowen@gf.com.cn>
2023-08-22 17:36:21 +08:00
liangbowen
4213e20945 [KYUUBI #5177] Use Scala binary version placeholder in Maven module's artifactId suffix
### _Why are the changes needed?_

- Change hardcoded Scala's version 2.12 in Maven module's `artifactId` to placeholder `scala.binary.version` which is defined in project parent pom as 2.12
- Preparation for Scala 2.13/3.x support in the future
- No impact on using or building Maven modules
- Some ignorable warning messages for unstable artifactId will be thrown by Maven.
```
Warning:  Some problems were encountered while building the effective model for org.apache.kyuubi:kyuubi-server_2.12🫙1.8.0-SNAPSHOT
Warning:  'artifactId' contains an expression but should be a constant
```
### _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/master/contributing/code/testing.html#running-tests) locally before make a pull request

### _Was this patch authored or co-authored using generative AI tooling?_

No.

Closes #5175 from bowenliang123/artifactId-scala.

Closes #5177

2eba29cfa [liangbowen] use placeholder of scala binary version for artifactId

Authored-by: liangbowen <liangbowen@gf.com.cn>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2023-08-20 16:03:23 +00:00
Cheng Pan
7bc0dbf932
[KYUUBI #5130] Allow setting Zookeeper SPN using Kyuubi configuration
### _Why are the changes needed?_

One of the basic ideas of Kerberos authentication is that the Client MUST provide the Server Principal Name (SPN).

[ZOOKEEPER-1467](https://issues.apache.org/jira/browse/ZOOKEEPER-1467) (fixed in 3.6.0, 3.5.7) allows to configure Zookeeper SPN at the client side.

Previously, there is no way but only `-Dzookeeper.server.principal=zookeeper/_HOSTREALM` to set ZK SPN, this PR allows the user to set it via Kyuubi configuration `kyuubi.ha.zookeeper.auth.serverPrincipal`.

In default, if `zookeeper.server.principal` is not configured, it assumes that the Zookeeper server uses `zookeeper/_HOST<SAME_REALM_WITH_CLIENT_PRINCIPAL>`

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

Closes #5130 from pan3793/zk-spn.

Closes #5130

6f0a1bbdc [Cheng Pan] doc
290e172aa [Cheng Pan] docs
a43b0c67a [Cheng Pan] nit
9a33446b7 [Cheng Pan] Allow set Zookeeper server principal

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2023-08-03 19:29:02 +08:00
Cheng Pan
0bd59e5bba
[KYUUBI #3920][TEST] Fix flaky test - distribute lock
### _Why are the changes needed?_

Fix #3920

https://github.com/apache/kyuubi/actions/runs/5711863703/job/15474230690?pr=4790

```
DockerizedZkServiceDiscoverySuite:
- distribute lock *** FAILED ***
  Expected exception org.apache.kyuubi.KyuubiSQLException to be thrown, but no exception was thrown (DiscoveryClientTests.scala:147)
```

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

Closes #5112 from pan3793/test-lock.

Closes #3920

d980f87dc [Cheng Pan] Fix flaky test - distribute lock

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2023-08-01 11:34:33 +08:00
Cheng Pan
ea099271de
[KYUUBI #5072] [TEST] Fix KyuubiOperationWithEngineSecuritySuite and related issues
### _Why are the changes needed?_

Currently, the `KyuubiOperationWithEngineSecuritySuite` is not valid, because

1. `InternalSecurityAccessor` is a singleton, only the first initialized one takes effect, which means if we change the testing orders, some tests may fail.
2. `discoveryClient.startSecretNode` calls `PersistentNode#start` underlying, which is async, we should call `waitForInitialCreate` to ensure it is created before running the test. Base on my analysis, it may take 30s for waiting. (mtime-ctime)
   ```
   [zk: 10.221.106.196:55408(CONNECTED) 2] get /SECRET
   _ENGINE_SECRET_
   cZxid = 0x5
   ctime = Wed Jul 19 23:01:57 CST 2023
   mZxid = 0x7
   mtime = Wed Jul 19 23:02:17 CST 2023
   pZxid = 0x5
   cversion = 0
   dataVersion = 1
   aclVersion = 0
   ephemeralOwner = 0x0
   dataLength = 15
   numChildren = 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

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

Closes #5072 from pan3793/security.

Closes #5072

69cce2935 [Cheng Pan] fix
2d623555c [Cheng Pan] fix
74eb2cb18 [Cheng Pan] fix
6d8f4ce4e [Cheng Pan] KyuubiOperationWithEngineSecurity

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2023-07-20 17:02:24 +08:00
liangbowen
eeee5c1ae3 [KYUUBI #4959] [MINOR] Code improvements for Scala
### _Why are the changes needed?_

- To improve Scala code with corrections, simplification, scala style, redundancy cleaning-up. No feature changes introduced.

Corrections:
- Class doesn't correspond to file name (SparkListenerExtensionTest)
- Correct package name in ResultSetUtil and PySparkTests

Improvements:
- 'var' could be a 'val'
- GetOrElse(null) to orNull

Cleanup & Simplification:
- Redundant cast inspection
- Redundant collection conversion
- Simplify boolean expression
- Redundant new on case class
- Redundant return
- Unnecessary parentheses
- Unnecessary partial function
- Simplifiable empty check
- Anonymous function convertible to a method value

Scala Style:
- Constructing range for seq indices
- Get and getOrElse to getOrElse
- Convert expression to Single Abstract Method (SAM)
- Scala unnecessary semicolon inspection
- Map and getOrElse(false) to exists
- Map and flatten to flatMap
- Null initializer can be replaced by _
- scaladoc link to method

Other Improvements:
- Replace map and getOrElse(true) with forall
- Unit return type in the argument of map
- Size to length on arrays and strings
- Type check can be pattern matching
- Java mutator method accessed as parameterless
- Procedure syntax in method definition

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

Closes #4959 from bowenliang123/scala-Improve.

Closes #4959

2d36ff351 [liangbowen] code improvement for Scala

Authored-by: liangbowen <liangbowen@gf.com.cn>
Signed-off-by: liangbowen <liangbowen@gf.com.cn>
2023-06-16 21:20:17 +08:00
liangbowen
4deb98cd42 [KYUUBI #4970] Unified reflection methods invokeAs and getField
### _Why are the changes needed?_

- comment https://github.com/apache/kyuubi/pull/4963#discussion_r1230490326
- simplify reflection calling with unified `invokeAs` / `getField` method for either declared, inherited, or static methods / fields

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

Closes #4970 from bowenliang123/unify-invokeas.

Closes #4970

592833459 [liangbowen] Revert "dedicate invokeStaticAs method"
ad45ff3fd [liangbowen] dedicate invokeStaticAs method
f08528c0f [liangbowen] nit
42aeb9fcf [liangbowen] add ut case
b5b384120 [liangbowen] nit
072add599 [liangbowen] add ut
8d019ab35 [liangbowen] unified invokeAs and getField

Authored-by: liangbowen <liangbowen@gf.com.cn>
Signed-off-by: liangbowen <liangbowen@gf.com.cn>
2023-06-16 20:08:42 +08:00
liangbowen
d0675a35a7 [KYUUBI #4879] Refactor and promote relection utils and cleanup similar reflection methods
### _Why are the changes needed?_

- apply the usage of `ReflectUtils` and `Dyn*` to the modules of engines and plugins (eg. Spark engine, Authz plugin, lineage plugin, beeline)
- remove similar redundant methods for calling reflected methods or getting field values
- unified reflection helper methods with type casting support, as `getField[T]` for getting field values from `getFields`, `invokeAs[T]` for invoking methods in `getMethods`.

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

Closes #4879 from bowenliang123/reflect-use.

Closes #4879

c685fb67d [liangbowen] bug fix for "Cannot bind static field options" when executing "bin/beeline"
fc1fdf1de [liangbowen] import
59c3dd032 [liangbowen] comment
c435c131d [liangbowen] reflect util usage

Authored-by: liangbowen <liangbowen@gf.com.cn>
Signed-off-by: liangbowen <liangbowen@gf.com.cn>
2023-06-06 18:59:18 +08:00
Cheng Pan
01d80eb272
[KYUUBI #4870] Add kyuubi-util and kyuubi-util-scala modules
### _Why are the changes needed?_

Close #4870

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

Closes #4872 from pan3793/util.

Closes #4870

0b9fe3cba [Cheng Pan] nit
ecc5ee4f2 [Cheng Pan] fix
63be7a20c [Cheng Pan] test
85363c187 [Cheng Pan] style
2227247dd [Cheng Pan] fix package
11d10a081 [Cheng Pan] Add kyuubi-util and kyuubi-util-scala modules

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2023-05-22 22:13:56 +08:00
Cheng Pan
208ab3af62
[KYUUBI #4852] Switch to Kyuubi Shaded Zookeeper
### _Why are the changes needed?_

This PR aims to migrate the vanilla Zookeeper and Curator to the Kyuubi Shaded Zookeeper. It's the first step to adapting JDK 17.

There is a known issue [ZOOKEEPER-3779](https://issues.apache.org/jira/browse/ZOOKEEPER-3779) that Zookeeper 3.4 client can not run on JDK 14 and above, in https://github.com/apache/kyuubi-shaded/pull/5, we fixed this issue by a surgical.

With the above fixing, zk-3.4 and zk-3.6 clients both work well on JDK 17, we just randomly pick some cases to make sure zk-3.6 is tested

zk-3.4 client supports zk-3.4+ server, but zk-3.6 client only supports zk-3.5+ server; in the meanwhile, zk-3.4 is adopted widely, (CDH 5/6, HDP, EMR created before 2023).

We are sticky to zk-3.4 to ensure that Kyuubi can be out-of-box in the most existing Hadoop cluster but also provide zk-3.6 as an alternative(simply replace the kyuubi-shaded-zk-3.4 jar w/ kyuubi-shaded-zk-3.6, or build w/ -Pzookeeper-3.6) for users who concerns that zk-3.4 is EOL.

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

Closes #4852 from pan3793/shaded-zk.

Closes #4852

d960cc945 [Cheng Pan] remove staging repo
1b3622080 [Cheng Pan] Switch to Kyuubi Shaded Zookeeper

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2023-05-21 20:49:00 +08:00
fwang12
2e3919f5a6 [KYUUBI #4842] [MINOR] Fix typo in etcd client config
### _Why are the changes needed?_

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

Closes #4842 from turboFei/etcd_typo.

Closes #4842

218374976 [fwang12] fix typo for etcd client

Authored-by: fwang12 <fwang12@ebay.com>
Signed-off-by: fwang12 <fwang12@ebay.com>
2023-05-16 14:48:28 +08:00
fwang12
f3c037d6f3 [KYUUBI #4652][FOLLOWUP] Fix JaasConfiguration ClassNotFoundException for Hadoop 3.3.4 and previous
### _Why are the changes needed?_

JaasConfiguration is a static class.

Before:
<img width="1151" alt="image" src="https://user-images.githubusercontent.com/6757692/234147288-d1251e5b-7c23-4746-80fb-335945c408c7.png">

After:
<img width="1189" alt="image" src="https://user-images.githubusercontent.com/6757692/234147251-e0007ac8-bb9e-49a5-95eb-3ea0b9671996.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/master/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #4765 from turboFei/zk_not_found.

Closes #4652

77dceb2bc [fwang12] fix class not found issue

Authored-by: fwang12 <fwang12@ebay.com>
Signed-off-by: fwang12 <fwang12@ebay.com>
2023-04-25 11:31:55 +08:00
Cheng Pan
a9d3e11926
[KYUUBI #4652] Upgrade Hadoop from 3.3.4 to 3.3.5
### _Why are the changes needed?_

Upgrade Hadoop from 3.3.4 to 3.3.5, close #4652

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

Closes #4689 from huapan123456/master.

Closes #4652

810af9848 [Cheng Pan] fix
380786e9f [Cheng Pan] nit
7c5f18ef9 [Cheng Pan] nit
2d308943b [Cheng Pan] nit
76869d822 [Cheng Pan] handle HDFS-16591
36142c787 [huapan] fix(KYUUBI #4652): the position of JaasConfiguration has changed on hadoop-clint-api-3.3.5
1b5de6dfe [huapan] feat(KYUUBI #4652): upgrade hadoop-version from 3.3.4 to 3.3.5
f9d34c716 [huapan] feat(KYUUBI #4652): upgrade hadoop-client-api from 3.3.4 to 3.3.5

Lead-authored-by: Cheng Pan <chengpan@apache.org>
Co-authored-by: huapan <huapan@52tt.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2023-04-13 13:06:29 +08:00
Paul Lin
b315123a6b
[KYUUBI #1652] Support Flink yarn application mode
### _Why are the changes needed?_
Flink yarn application mode is crucial for the production usage of Flink engine.

To test this PR locally, we should:

1) set `flink.execution.target=yarn-application` in `kyuubi-defaults.conf`.

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

Closes #4604 from link3280/KYUUBI-1652.

Closes #1652

49b454f1e [Paul Lin] [KYUUBI #1652] Delay access to thrift services to stablize tests
b91b64bf6 [Paul Lin] Revert "[KYUUBI #1652] Avoid hadoop conf injecting into kyuubi conf"
c9f710b0f [Paul Lin] [KYUUBI #1652] Avoid hadoop conf injecting into kyuubi conf
cde8a5477 [Paul Lin] [KYUUBI #1652] Improve docs
edba0ec79 [Paul Lin] [KYUUBI #1652] Improve codestyle
e03e055ae [Paul Lin] [KYUUBI #1652] Update docs according to the comments
490559cd8 [Paul Lin] [KYUUBI #1652] Update docs
769d1a8fa [Paul Lin] [KYUUBI #1652] Move zookeeper to test scope
bafb3f5a4 [Paul Lin] [KYUUBI #1652] Fix flink-it test
dd40c72b8 [Paul Lin] [KYUUBI #1652] Update docs
36c993fc2 [Paul Lin] [KYUUBI #1652] Fix javax.activation not found in flink-it
2a751bdd6 [Paul Lin] [KYUUBI #1652] Introduce EmbeddedZookeeper in Flink yarn tests
0933b7082 [Paul Lin] [KYUUBI #1652] Fix spotless issue
b858f7df6 [Paul Lin] [KYUUBI #1652] Fix Flink submit timeout because failing to find hadoop conf
15801b598 [Paul Lin] [KYUUBI #1652] Replace unused jaxb
b210615e4 [Paul Lin] Update externals/kyuubi-flink-sql-engine/pom.xml
24b23da2c [Paul Lin] [KYUUBI #1652] Update jaxb scope to test
240efae1a [Paul Lin] [KYUUBI #1652] Update jaxb scope to runtime
0e9a508b6 [Paul Lin] [KYUUBI #1652] Update jaxb scope to runtime
b5dbd3346 [Paul Lin] [KYUUBI #1652] Fix jdk11 jaxb ClassNotFoundException
72ba3ee6d [Paul Lin] [KYUUBI #1652] Update tm memory to 1gb
4e10ea21f [Paul Lin] [KYUUBI #1652] Refactor flink engin tests
e9cec4a65 [Paul Lin] [KYUUBI #1652] Add flink-it tests
6eb9fd3ad [Paul Lin] [KYUUBI #1652] Fix ProcessBuilder tests
6aca061e6 [Paul Lin] [KYUUBI #1652] Fix ClassNotFoundException
7581a2a0d [Paul Lin] [KYUUBI #1652] Fix missing minicluster
412c34571 [Paul Lin] [KYUUBI #1652] Remove flink-yarn dependencies
0eafbd7b0 [Paul Lin] Update externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/result/ResultSet.scala
ee2c64d04 [Paul Lin] [KYUUBI #1652] Add Flink YARN application tests
a72627393 [Paul Lin] [KYUUBI #1652] Avoid flink-yarn dependencies
a75cb2579 [Paul Lin] [KYUUBI #1652] Fix test issue
b7e173f30 [Paul Lin] [KYUUBI #1652] Replace file-based Kyuubi conf with cli args
693ad6529 [Paul Lin] [KYUUBI #1652] Removed unused imports
68e0081e1 [Paul Lin] Update kyuubi-server/src/main/scala/org/apache/kyuubi/engine/flink/FlinkProcessBuilder.scala
ba021de9d [Paul Lin] [KYUUBI #1652] Search flink-sql.* jars and add them to pipeline jars
0846babbd [Paul Lin] [KYUUBI #1652] Avoid Scala bug
56413fe83 [Paul Lin] [KYUUBI #1652] Improve tmp files cleanup
8bdb672c4 [Paul Lin] [KYUUBI #1652] Explicitly load Kyuubi conf on Flink engine start
0b6325000 [Paul Lin] [KYUUBI #1652] Fix test failures
0ba03e439 [Paul Lin] [KYUUBI #1652] Fix wrong Flink args
00f036b04 [Paul Lin] [KYUUBI #1652] Remove unused util methods
dfd2777ac [Paul Lin] [KYUUBI ##1652] Support Flink yarn application mode

Authored-by: Paul Lin <paullin3280@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2023-04-07 18:51:48 +08:00
ulysses-you
86f7537a8e
[KYUUBI #4451] Skip etcd test if no docker env
### _Why are the changes needed?_

Skip etcd test if no docker env.

It would fail if no docker env
```
org.apache.kyuubi.ha.client.etcd.EtcdDiscoveryClientSuite *** ABORTED ***
  java.lang.IllegalStateException: Could not find a valid Docker environment. Please see logs and check configuration
  at org.testcontainers.dockerclient.DockerClientProviderStrategy.lambda$getFirstValidStrategy$6(DockerClientProviderStrategy.java:257)
  at java.util.Optional.orElseThrow(Optional.java:290)
  at org.testcontainers.dockerclient.DockerClientProviderStrategy.getFirstValidStrategy(DockerClientProviderStrategy.java:247)
  at org.testcontainers.DockerClientFactory.getOrInitializeStrategy(DockerClientFactory.java:135)
  at org.testcontainers.DockerClientFactory.client(DockerClientFactory.java:171)
  at org.testcontainers.containers.Network$NetworkImpl.create(Network.java:69)
  at org.testcontainers.containers.Network$NetworkImpl.getId(Network.java:62)
  at io.etcd.jetcd.launcher.EtcdClusterImpl.start(EtcdClusterImpl.java:72)
  at org.apache.kyuubi.ha.client.etcd.EtcdDiscoveryClientSuite.beforeAll(EtcdDiscoveryClientSuite.scala:48)
```
### _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/master/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #4451 from ulysses-you/skip-etcd.

Closes #4451

a5e65adb4 [ulysses-you] isDockerAvailable
39baad662 [ulysses-you] Skip etcd test is no docker env

Authored-by: ulysses-you <ulyssesyou18@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2023-03-08 09:57:12 +08:00
Cheng Pan
4e226ac3cc
Bump 1.8.0-SNAPSHOT 2023-02-10 15:25:49 +08:00
Cheng Pan
547e5ca617
[KYUUBI #4145] Change lock and polling seq_num path on service discovery
### _Why are the changes needed?_

This PR proposes to change the paths of distributed lock and seq_num(used for POLLING engine pool select policy) on the Service Discovery component. The reason is that namespace `${serverSpace}_${KYUUBI_VERSION}_${shareLevel}_${engineType}/` should be dedicated to engine registration, we'd better use the separated namespace for other functionalities.

- lock path
```
# before
${serverSpace}_${shareLevel}_${engineType}/lock/${user}/${subdomain}

# after
${serverSpace}_${KYUUBI_VERSION}_${shareLevel}_${engineType}_lock/${user}/${subdomain}
```

- seq_num
```
# before
${serverSpace}_${KYUUBI_VERSION}_${shareLevel}_${engineType}/seq_num/${user}/${poolName}

# after
${serverSpace}_${KYUUBI_VERSION}_${shareLevel}_${engineType}_seqNum/${user}/${poolName}
```

### _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 #4145 from pan3793/namespace.

Closes #4145

c912b3f66 [Cheng Pan] name
3326b9b95 [Cheng Pan] name
10083db0b [Cheng Pan] Change lock and polloing seq_num path on service discovery

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2023-02-10 13:04:24 +08:00
liangbowen
f6778487ea [KYUUBI #4239] Remove duplicate buildConf methods and use KyuubiConf.buildConf directly
### _Why are the changes needed?_

- Remove duplicate buildConf methods in a series configs , change to import and use `KyuubiConf.buildConf` directly

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

Closes #4239 from bowenliang123/duplicate-buildconf.

Closes #4239

04495e69 [liangbowen] remove duplciate buildConf methods

Authored-by: liangbowen <liangbowen@gf.com.cn>
Signed-off-by: liangbowen <liangbowen@gf.com.cn>
2023-02-03 16:57:12 +08:00
liangbowen
89c7435dca
[KYUUBI #4161] [DOCS] Refine settings page with correction in grammar and spelling mistakes of config descriptions
### _Why are the changes needed?_

As Kyuubi graduated as top level project, the setting page will be more often requested and should be increasingly reliable and readable with less grammar and spelling mistakes.

This PR is to
- correct mistakes in grammar, spelling, abbreviation and terminology
- with no config name or essential meanings changed

### _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 #4161 from bowenliang123/conf-grammar.

Closes #4161

038edfbea [liangbowen] nit
1ec073a4b [liangbowen] to JSON
4f5259a32 [liangbowen] to Prometheus
523855008 [liangbowen] to K8s
fc7a3a81e [liangbowen] to AUTO-GENERATED
da64f54fa [liangbowen] update
d54f9a528 [liangbowen] fix `comma separated` to `comma-separated`
f1d7cc1f1 [liangbowen] update
d84208844 [liangbowen] update
1b75f011c [liangbowen] correction of grammar and spelling mistakes

Authored-by: liangbowen <liangbowen@gf.com.cn>
Signed-off-by: Kent Yao <yao@apache.org>
2023-01-16 18:34:01 +08:00
sychen
6e61238d41 [KYUUBI #4016] Print engine id when get service node info
### _Why are the changes needed?_

Current
```
2022-12-20 13:00:34.038 INFO org.apache.kyuubi.ha.client.zookeeper.ZookeeperDiscoveryClient:
Get service instance:XXX:54876 and version:Some(1.7.0-SNAPSHOT) under /kyuubi_1.7.0-SNAPSHOT_USER_SPARK_SQL/anonymous/default
```
Fix
```
2022-12-20 13:02:01.622 INFO org.apache.kyuubi.ha.client.zookeeper.ZookeeperDiscoveryClient:
Get service instance:XXX:55039 engine id:local-1671512509106 and version:1.7.0-SNAPSHOT under /kyuubi_1.7.0-SNAPSHOT_USER_SPARK_SQL/anonymous/default
```

### _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 #4016 from cxzl25/print_engine_id.

Closes #4016

5eabfe7fa [sychen] print engine id when get service node

Authored-by: sychen <sychen@ctrip.com>
Signed-off-by: fwang12 <fwang12@ebay.com>
2022-12-20 20:45:47 +08:00
yongqian
4948056640
[KYUUBI #3686] The authentication.kerberos.principal value posted to zk should keep the original value
### _Why are the changes needed?_

close #3686

### _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 #3961 from QianyongY/features/kyuubi-3686.

Closes #3686

958432c6 [yongqian] [KYUUBI #3686] The  value posted to zk should keep the original value

Authored-by: yongqian <yongqian@trip.com>
Signed-off-by: Shaoyun Chen <csy@apache.org>
2022-12-12 11:30:33 +08:00
hongdongdong
840060ceae [KYUUBI #3917] Optimize discovery makePath api
### _Why are the changes needed?_

Optimize discovery makePath api.

### _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 #3917 from hddong/optimize-ds-path-api.

Closes #3917

a152373e [hongdongdong] Update
9dc37929 [hongdongdong] Optimize discovery makePath api

Authored-by: hongdongdong <hongdd@apache.org>
Signed-off-by: hongdongdong <hongdd@apache.org>
2022-12-08 10:17:54 +08:00
CHzxp
2a903b01fe
[KYUUBI #3910] Add delta parameter for getAndIncrement method
### _Why are the changes needed?_
getAndIncrement method only increase index before this pr,  add a delta parameter can increase and decrease index. this pr is mainly for pr KYUUBI #3695

### _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 #3910 from CHzxp/getAndIncrement_branch.

Closes #3910

5c0cca85 [CHzxp] fix bug
3514471e [CHzxp] modify imp
f1ae57d6 [xinping] add delta parameter for getAndIncrement

Lead-authored-by: CHzxp <1959044956@qq.com>
Co-authored-by: xinping <jXD8_1uG>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-12-06 16:07:40 +08:00
zwangsheng
9bbccb25d0
[KYUUBI #3888] [HA] Add more info to log when zk auth keytab not found
### _Why are the changes needed?_

Add more info to log, when zookeeper auth keytab not fount.

### _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 #3888 from zwangsheng/improve/zk_keytab_not_found.

Closes #3888

e12f4cf1 [zwangsheng] add more info in log

Authored-by: zwangsheng <2213335496@qq.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-12-02 16:09:24 +08:00
liangbowen
2ac10f91d5
[KYUUBI #3842] [Improvement] Support maven pom.xml code style check with spotless plugin
### _Why are the changes needed?_

Introduce code style check support for Maven's pom.xml with sortPom in spotless maven plugin.

### _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 #3843 from bowenliang123/spotless-pom.

Closes #3842

3c654597 [liangbowen] apply to pom.xml
fd1536f7 [liangbowen] set expandEmptyElements to true
e498423f [liangbowen] apply spotless:apply to all pom.xml
e46bcfec [liangbowen] add pom style check support in spotless

Authored-by: liangbowen <liangbowen@gf.com.cn>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-11-23 22:08:00 +08:00
Cheng Pan
72c1f53dd0
[KYUUBI #3776] [BUILD] Revise Kyuubi Spark engine shaded
### _Why are the changes needed?_

This PR revises the shaded rule of spark engine module, especially to make sure that netty native libs is shaded properly.

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

```
(kyuubi) ➜  apache-kyuubi git:(spark-engine-shade) tree externals/kyuubi-spark-sql-engine/target/unpacked -L 5 | grep -v class
externals/kyuubi-spark-sql-engine/target/unpacked
├── META-INF
│   ├── LICENSE
│   ├── MANIFEST.MF
│   ├── NOTICE
│   ├── io.netty.versions.properties
│   ├── native
│   │   ├── liborg_apache_kyuubi_shade_netty_transport_native_epoll_aarch_64.so
│   │   └── liborg_apache_kyuubi_shade_netty_transport_native_epoll_x86_64.so
│   ├── services
│   │   ├── org.apache.kyuubi.shade.io.grpc.LoadBalancerProvider
│   │   ├── org.apache.kyuubi.shade.io.grpc.ManagedChannelProvider
│   │   ├── org.apache.kyuubi.shade.io.grpc.NameResolverProvider
│   │   ├── org.apache.kyuubi.shade.io.grpc.ServerProvider
│   │   ├── org.apache.kyuubi.shade.io.vertx.core.spi.launcher.CommandFactory
│   │   ├── org.apache.spark.status.AppHistoryServerPlugin
│   │   └── reactor.blockhound.integration.BlockHoundIntegration
│   ├── versions
│   │   └── 11
│   │       └── io
│   │           └── vertx
│   └── vertx
│       └── vertx-version.txt
├── kyuubi-version-info.properties
├── log4j2-defaults.xml
├── org
│   └── apache
│       ├── kyuubi
│       │   ├── cli
│       │   ├── config
│       │   │   └── internal
│       │   ├── engine
│       │   │   └── spark
│       │   ├── events
│       │   │   └── handler
│       │   ├── ha
│       │   │   └── client
│       │   ├── operation
│       │   │   ├── log
│       │   │   └── meta
│       │   ├── reflection
│       │   ├── service
│       │   │   └── authentication
│       │   ├── session
│       │   ├── shade
│       │   │   ├── android
│       │   │   ├── com
│       │   │   ├── io
│       │   │   ├── net
│       │   │   └── org
│       │   └── util
│       └── spark
│           ├── api
│           │   └── python
│           ├── kyuubi
│           └── ui
└── python
    ├── execute_python.py
    └── kyuubi_util.py

40 directories, 211 files
```

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

Closes #3776 from pan3793/spark-engine-shade.

Closes #3776

6a6e2a64 [Cheng Pan] nit
e247923a [Cheng Pan] 1
a53b7c06 [Cheng Pan] nit
19382ef3 [Cheng Pan] [BUILD] Revisit Kyuubi Spark engine shaded

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-11-11 10:05:23 +08:00
zhouyifan279
78e80b8e01
[KYUUBI #3744][Bug] InvalidACL appears in engine after upgrade to Kyuubi 1.6.0
### _Why are the changes needed?_
Fix #3744

### _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 #3771 from zhouyifan279/3744.

Closes #3744

58764296 [zhouyifan279] [KYUUBI #3744][Bug] InvalidACL appears in engine after upgrade to Kyuubi 1.6.0
554e8898 [zhouyifan279] [KYUUBI #3744][Bug] InvalidACL appears in engine after upgrade to Kyuubi 1.6.0
a6bfa3d4 [zhouyifan279] [KYUUBI #3744][Bug] InvalidACL appears in engine after upgrade to Kyuubi 1.6.0
c90470f4 [zhouyifan279] [KYUUBI #3744][Bug] InvalidACL appears in engine after upgrade to Kyuubi 1.6.0
fe55f4ad [zhouyifan279] [KYUUBI #3744][Bug] InvalidACL appears in engine after upgrade to Kyuubi 1.6.0
e262872a [zhouyifan279] [KYUUBI #3744][Bug] InvalidACL appears in engine after upgrade to Kyuubi 1.6.0
ed5e8bda [zhouyifan279] [KYUUBI #3744][Bug] InvalidACL appears in engine after upgrade to Kyuubi 1.6.0

Authored-by: zhouyifan279 <zhouyifan279@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-11-07 22:16:03 +08:00
Fei Wang
c0ecb4bdc0 [KYUUBI #3684] Expose the engine id when registering and show the engine details for list engine command
### _Why are the changes needed?_

Expose the engine id when registering the service.

So that we can get more details about the engine when using `list engine` command.

### _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 #3684 from turboFei/extra_info.

Closes #3684

afbcfdef3 [Fei Wang] refactor
513dd7234 [Fei Wang] split 2
ad3a6ac4f [Fei Wang] comments
cc51c5954 [Fei Wang] fix ut
32e31618a [Fei Wang] check engine id
202bbdb68 [Fei Wang] refactor to details
c5c153b8d [Fei Wang] render extra info
d2642cc8a [Fei Wang] save
1da67c258 [Fei Wang] dto
724ac3af4 [Fei Wang] save
c16c15988 [Fei Wang] expose engine id
e91a61e5a [Fei Wang] save
e38bb0b93 [Fei Wang] save
b1c158ba8 [Fei Wang] parse extra info

Authored-by: Fei Wang <fwang12@ebay.com>
Signed-off-by: Fei Wang <fwang12@ebay.com>
2022-11-03 14:22:05 +08:00
yuqi
c25961ea02 [KYUUBI #2887] Add a POLLING balance policy for spark engine pool
### _Why are the changes needed?_

As described in #2887, random policy may cause task-hot-issues or production accident, so a POLLING balance policy is added to avoid this problem, we can "set kyuubi.engine.pool.balance.policy = POLLING" to use it.

### _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 #3662 from ychris78/epbp_1018.

Closes #2887

90834c1f [yuqi] fix bug
c0ce8a7e [yuqi] Fix typos
bec4ca13 [yuqi] Fix typos
dc4e3637 [yuqi] please add test case to cover the added methods
837c920b [yuqi] rename method getAndInc to getAndIncrement and modify the doc
02a8311f [yuqi] add getAndInc method and refer it
9436937d [yuqi] Improve configuration documentation
21b5d7d1 [yuqi] [KYUUBI #2887] Add a polling balance policy for spark engine pool Improve configuration documentation and delete useless comments
f0699b3c [yuqi] [KYUUBI #2887] Add a polling balance policy for spark engine pool

Authored-by: yuqi <1450636878@qq.com>
Signed-off-by: Fei Wang <fwang12@ebay.com>
2022-10-24 14:17:59 +08:00
sychen
72c11b2b2a
[KYUUBI #3543] Handle zookeeper watch events
### _Why are the changes needed?_

In #1785, the `stop()` call of `org.apache.kyuubi.ha.client.ServiceDiscovery#stopGracefully` was removed, causing the znode to be recreated after deletion.

Currently in `DeRegisterWatcher`, the `NodeDeleted` event is received, and the znode is not immediately closed, which causes `org.apache.curator.framework.recipes.nodes.PersistentNode#watcher` to receive the `NodeDeleted` event and asynchronously creates the same znode, which makes the service node unable to gracefully shutdown.

In addition, because the watcher is one-time, after receiving the `NodeDataChanged` event, we should re-register the watcher to avoid missing the next `NodeDeleted` event.

### _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 #3543 from cxzl25/ha_zk_watcher.

Closes #3543

b3a109e4 [sychen] volatile
eb16380f [sychen] Merge branch 'master' into ha_zk_watcher
8621aee0 [sychen] add test
c4ad5309 [sychen] handle zk watch events

Authored-by: sychen <sychen@ctrip.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-10-14 12:36:51 +08:00
Cheng Pan
c24a192dcb
[KYUUBI #2040] [TEST] Add Zookeeper 3.4/3.5/3.6/3.7 integration test
### _Why are the changes needed?_

This PR proposes to add Testcontainers based Zookeeper 3.4/3.5/3.6/3.7 integration test, we need it to verify the compatibility if we upgrade Zookeeper client to the new version. See details in #1941

### _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 #2040 from pan3793/zk-3-4-it.

Closes #2040

929540f6 [Cheng Pan] [TEST] Add Zookeeper 3.4/3.5/3.6 integration test

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-09-13 09:32:16 +08:00
Brandon Grams
bc16852717
[KYUUBI #3272] Synchronize graceful shutdown with main stop sequence
### _Why are the changes needed?_

Fixes #3272

Kyuubi server stop sequence doesn't respect graceful shutdown triggered in the discovery clients' `DeRegisterWatcher` loops. This leads to frontend service components being stopped before sessions close, resetting connections and leading to client disruption.

PR synchronizes these threads to ensure that service components wait for client sessions to close before continuing the stop sequence.
* Existing service discovery deregistration functionality is maintained to ensure that new connections are established with healthy instances once the stop sequence has begun.
* Existing Hadoop shutdown hooks ensure that the watcher can be timed out, and are configurable via `hadoop.service.shutdown.timeout`. The Kyuubi server will always shut down within 30 seconds when using default config.

### _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 #3291 from bgrams/fix/graceful-shutdown.

Closes #3272

ffec2a2a [Brandon Grams] Synchronize graceful session shutdown

Authored-by: Brandon Grams <brandongr@zillowgroup.com>
Signed-off-by: Kent Yao <yao@apache.org>
2022-08-22 15:14:13 +08:00
SteNicholas
77b036f3a8
[KYUUBI #3264] [RELEASE] Bump 1.7.0-SNAPSHOT
### _Why are the changes needed?_

Preparing v1.7.0-SNAPSHOT with branch-1.6 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 #3264 from SteNicholas/prepare-1.7.0-snapshot.

Closes #3264

374d56bf [SteNicholas] preparing v1.7.0-SNAPSHOT with branch-1.6 cut

Authored-by: SteNicholas <programgeek@163.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-08-18 11:23:54 +08:00
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