Commit Graph

2553 Commits

Author SHA1 Message Date
liangbowen
d98b3deb54
[KYUUBI #3862][Improvement] Bump codecov/codecov-action from v2 to v3
### _Why are the changes needed?_

to close #3862 .

### _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 #3868 from bowenliang123/3862-codecov-v3.

Closes #3862

b5733979 [liangbowen] bump codecov-action from v2 to v3

Authored-by: liangbowen <liangbowen@gf.com.cn>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-12-03 18:52:21 +08:00
fwang12
00c27a42e3 [KYUUBI #3658][FOLLOWUP] Do not use lazy val to prevent port BindException
### _Why are the changes needed?_

If binary ssl enabled, we will bind the port to ssl server socket.
if we invoke the lazy val serverSocket, it will throw BindException.
### _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
![image](https://user-images.githubusercontent.com/6757692/200468915-c7ed70ac-2961-481e-90d7-5231323e56e5.png)

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

Closes #3778 from turboFei/ssl_fix.

Closes #3658

5d6f71b7 [fwang12] Fix ssl port binded

Authored-by: fwang12 <fwang12@ebay.com>
Signed-off-by: fwang12 <fwang12@ebay.com>
2022-12-02 19:53:20 +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
4b74129372
[KYUUBI #3839][Authz] Introduce signature mechanism to protect session variable on engine side
### _Why are the changes needed?_

to close #3839 .

The session signing feature is introduced with asymmetric encryption to prevent manipulation of session user identity or other key session elements, which could cause privilege leaking in scripts.

1. Server: Server creates and holds the singleton `keypair` for session signing if feature enabled
2. Server -> Engine: Server passes the `public key` to Engine when launching
3. Server -> Engine: Server generates session signing on `session user` when opening Kyuubi Session to Engine
4. Session -> Statement: Kyuubi session create Statement with context bringing `publickey` and `session user signature`
5. Engine: Engine verify `session user signature` with signature wherever necessary, e.g. in Authz for session name authentication.

ECDSA, with a shorter key length and better performance than RSA, is the supported asymmetric encryption in the initial implementation, which is widely supported on JDK7+ in HotSpot or OpenJDK. The session signature is generated with `SHA256withECDSA`.

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

Closes #3838 from bowenliang123/check-sessionuser.

Closes #3839

925eee47 [liangbowen] Revert "generalize setSparkLocalProperty"
d726d661 [liangbowen] generalize setSparkLocalProperty
470176db [liangbowen] allow setSparkLocalProperty to set value null
8f2a6e38 [liangbowen] nit
cb5891c9 [liangbowen] nit
edbe3c9c [liangbowen] only set to opensession conf when true, since kyuubi.session.user.sign.enabled is default to false
60546c82 [liangbowen] remove setting setSessionSigningPublicKey in KyuubiSessionManager
9a2a60dd [liangbowen] fix asserts
2e2a51b4 [liangbowen] nit
f37f4dd6 [Bowen Liang] Merge branch 'master' into check-sessionuser
9cd22003 [liangbowen] generalize illegalAccessWithUnverifiedUser in AuthZUtils
c1f27afa [liangbowen] generalize setSessionUserSign and clearSessionUserSign in SparkOperation
3683150f [liangbowen] update error message with `Invalid user identifier`
e143ea77 [liangbowen] fast fail for getting missing session configs
866fc821 [liangbowen] rename param name of base64 encoded pubkey with `Base64` suffix
280a95ef [liangbowen] refactor config key name to new class `ReservedKeys` in Authz
8592070e [liangbowen] nit
bf227e35 [liangbowen] remove redundant ut case
9ed14feb [liangbowen] remove redundant ut case
33a723d0 [liangbowen] add AuthzSessionSigningSuite with session user sign enabled
b77d53e3 [liangbowen] remove config setting in ut
2d56bd30 [liangbowen] remove config setting in ut
a25c1c0b [liangbowen] fail w/ AccessControlException, when kyuubi.session.user.sign.enabled is true and kyuubi.session.user is absent
c8a88fe9 [liangbowen] check not null of userPubKeyStr, userSign
c8bc590a [liangbowen] rename param to publicKeyBase64
b55beb60 [liangbowen] revert to use EC secp256k1 for compatibility
8acfd41d [liangbowen] nit
842b3698 [liangbowen] nit
983585bc [liangbowen] nit
d1003cd7 [liangbowen] nit
f9d6cfb6 [liangbowen] make generateKeyPair return (PrivateKey, PublicKey)
52eaaddc [liangbowen] add ut for SignUtils
b4a44687 [liangbowen] general keypair algorithm
7d40da49 [liangbowen] change to use secp192r1 curve for EC key pair for better performance
1ceed876 [liangbowen] sync settings.md with `false` default value
07d23602 [liangbowen] update ut
eec9d44a [liangbowen] move to _confIgnoreList
b7969446 [liangbowen] create SessionSigningSuite and add ut for 1. verifying user sign , 2. conf kyuubi.session.user.sign.enabled restriction
a50c71a3 [liangbowen] set kyuubi.session.user.sign.enabled to openEngineSessionConf
a2f1ed67 [liangbowen] set kyuubi.session.user.sign.enabled to _confRestrictList
5a12182e [liangbowen] make kyuubi.session.user.sign.enabled default to false, and removed from serverOnlyConfEntries
991a4569 [liangbowen] put SESSION_USER_SIGN_ENABLED in serverOnlyConfEntries
3e863af4 [liangbowen] nit
b232e5c0 [liangbowen] npe
13a046be [liangbowen] nit
2d2a6659 [liangbowen] nit
a0d4721d [liangbowen] move session signing keypair generation to KyuubiSessionImpl on server side. and rename config to KYUUBI_SESSION_SIGN_PUBLICKEY
ab430c39 [liangbowen] make generateKeyPair return Key pair and accept algorithm param
42ee2fe0 [liangbowen] nit
ce5f4af7 [liangbowen] refactoring session pubkey generation on server side (instead of engine side), and passing it to engine via OpenSession op
c2b9d897 [liangbowen] nit: rename to verifySignWithECDSA
d0b2cddb [liangbowen] nit
33a044d0 [liangbowen] add ut
2dc1f57b [liangbowen] change to use spark conf `kyuubi.session.user.sign.enabled` to decide whether verify kyuubi seesion user
b11ba5a5 [liangbowen] clear local prop `kyuubi.session.user.public.key` and `kyuubi.session.user.sign` after execution
2c8b4bf6 [liangbowen] move throwing AccessControlException inside  verifyKyuubiSessionUser method
82f5c265 [liangbowen] update conf doc
7cf0d481 [liangbowen] rename config name to `kyuubi.session.user.sign.enabled`
cc2c3570 [liangbowen] typo: fix KYUUBI_SESSION_USER_PUBIC_KEY
bdec509d [liangbowen] update settings.md for config doc
2d00163a [liangbowen] nit
102561a8 [liangbowen] update
af99ea84 [liangbowen] move algorithmSpec to ecKeyPairGenerator
966a327e [liangbowen] update
41064712 [liangbowen] update
9d276799 [liangbowen] add config `kyuubi.session.user.verify.enabled` to control Whether to verify the integrity of session user name in Spark Authz
8a8840f6 [liangbowen] nit
bafd85e9 [liangbowen] replace RSA with ECDSA
2f0c87a5 [liangbowen] KeyPairGenerator init with new SecureRandom instance
7cb31204 [liangbowen] shorten the key size to 1024
5011cf49 [liangbowen] remove unused imports
045fd822 [liangbowen] add to SparkOperation for scala
ce6d394d [liangbowen] move generateRSAKeyPair and signWithRSA to SignUtils.scala
5f295792 [liangbowen] update
1d7f3191 [liangbowen] initial support for signing and verifying `kyuubi.session.user`

Lead-authored-by: liangbowen <liangbowen@gf.com.cn>
Co-authored-by: Bowen Liang <liangbowen@gf.com.cn>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-12-02 14:01:53 +08:00
Tianlin Liao
30588080a7
[KYUUBI #3875] Filter out kyuubi.metadata.store.* configurations in e…
…ngine process builder

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

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

Before modification:
<img width="1487" alt="snipaste_2022-11-29_21-16-14" src="https://user-images.githubusercontent.com/21362040/204557234-c84d8c0c-373a-4ace-b159-3e221ee0c617.png">

After modification:
<img width="1589" alt="Snipaste_2022-11-29_22-20-11" src="https://user-images.githubusercontent.com/21362040/204557431-602b8a87-79da-4ba4-a09f-5a69cf41a288.png">

Closes #3879 from lightning-L/kyuubi-3875.

Closes #3875

66207dc4 [Tianlin Liao] refactor
4ce01ab4 [Tianlin Liao] [Improvement] Filter out kyuubi.metadata.store.* configurations in engine process builder

Authored-by: Tianlin Liao <tiliao@ebay.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-12-02 13:58:46 +08:00
Cheng Pan
86645ad54a
[KYUUBI #3881] Upgrade playground components to latest versions
### _Why are the changes needed?_

This PR upgrades Kyuubi playground components to latest versions, including Spark 3.3.1, Kyuubi 1.6.1-incubating, Iceberg 1.1.0, and reorganizes the files in catalog folders.

The images has been uploaded to Docker Hub.

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

```
cd docker/playground
docker compose up -d
```

```
docker exec -it kyuubi /opt/kyuubi/bin/beeline -u 'jdbc:hive2://0.0.0.0:10009/tpcds/tiny'
```

<img width="1416" alt="image" src="https://user-images.githubusercontent.com/26535726/204845474-b0dff173-d335-43bf-b61f-d8c34ee26ff8.png">

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

Closes #3881 from pan3793/playground.

Closes #3881

a3d42377 [Cheng Pan] Upgrade playground components to latest versions

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-12-02 10:51:41 +08:00
sychen
e49f775431
[KYUUBI #3847] Add jdbc-shaded profile to support IDE debug
### _Why are the changes needed?_
1. `mvn antrun:runbuild-info -pl kyuubi-common`
2. debug engine suite

### _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 #3847 from cxzl25/profile_jdbc_debug.

Closes #3847

e1c32067 [Cheng Pan] Merge branch 'master' into profile_jdbc_debug
f41d3cd9 [sychen] use jdbc-shaded
25b54b18 [sychen] use jdbc-shaded
dd23f864 [sychen] use kyuubi-hive-jdbc as default
79b0ffcb [sychen] add jdbc profile

Lead-authored-by: sychen <sychen@ctrip.com>
Co-authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-11-30 22:34:48 +08:00
xuefeimiaoao
d2463e2a81
[KYUUBI #3861] Bump manusa/actions-setup-minikube from 2.7.0 to 2.7.1
### _Why are the changes needed?_

to close #3861
I test the  `manusa/actions-setup-minikubev2` and failed, so just set `manusa/actions-setup-minikubev2.7.1`
![企业微信截图_16697294031013](https://user-images.githubusercontent.com/76927591/204546344-2ffa10e9-50c3-4554-950a-f9c89d881041.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.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #3878 from xuefeimiaoao/feature/bump_actions_setup_minikube.

Closes #3861

8452fcf4 [xuefeimiaoao] [KYUUBI #3861] Bump manusa/actions-setup-minikube from 2.7.0 to 2.7.1

Authored-by: xuefeimiaoao <1255072085@qq.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-11-30 10:28:05 +08:00
Cheng Pan
a290dc575a [KYUUBI #3810] [BUILD][TEST] Bump Iceberg 1.1.0
### _Why are the changes needed?_

Test against Iceberg 1.1.0

https://www.mail-archive.com/deviceberg.apache.org/msg03923.html

### _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 #3810 from pan3793/iceberg-1.1.0.

Closes #3810

b250133f3 [Cheng Pan] Update pom.xml
505e26418 [Cheng Pan] rc4
18f4ffef9 [Cheng Pan] [BUILD][TEST] Bump Iceberg 1.1.0

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Fu Chen <cfmcgrady@gmail.com>
2022-11-30 10:23:00 +08:00
fwang12
a30fdde08d [KYUUBI #3876] Return kyuubi instance when opening interactive session via SessionsResource
### _Why are the changes needed?_

Because we do not support multiple node HA now for SessionsResource.
It is difficult to use if load balancer is used for kyuubi gateway.
In this pr, we return the actual kyuubi instance so that user can call the instance directly for follow operations.
It should be a temporary workaround to support multiple kyuubi instances use case.
### _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 #3876 from turboFei/session_instance.

Closes #3876

b123effb [fwang12] Return kyuubi instance when opening interactive session via SessionsResource

Authored-by: fwang12 <fwang12@ebay.com>
Signed-off-by: fwang12 <fwang12@ebay.com>
2022-11-29 22:13:48 +08:00
Fu Chen
599fb3cd64 [KYUUBI #3825] Bump Spark from 3.2.2 to 3.2.3
### _Why are the changes needed?_

test against Spark-3.2.3

https://www.mail-archive.com/devspark.apache.org/msg29609.html

### _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 #3825 from cfmcgrady/spark323.

Closes #3825

a2deabcdf [Fu Chen] release
2fea74cf0 [Fu Chen] spark.archive.name
8245c6490 [Fu Chen] bump spark-3.2.3

Authored-by: Fu Chen <cfmcgrady@gmail.com>
Signed-off-by: Fu Chen <cfmcgrady@gmail.com>
2022-11-29 14:15:03 +08:00
Cheng Pan
496b3ee595
[KYUUBI #3867] Init SQL scripts should create table iff table does not exist
### _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 #3867 from pan3793/sql.

Closes #3867

b3105b5f [Cheng Pan] derby
8ed271a6 [Cheng Pan] Init SQL scripts should create table iff table does not exist

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-11-29 12:39:47 +08:00
Cheng Pan
40ef3d624c
[KYUUBI #3864] Add missing log4j2-test.xml for Kyuubi Spark Hive Connector
### _Why are the changes needed?_

Avoid too much logs on console in 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

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

Closes #3864 from pan3793/nit.

Closes #3864

39687176 [Cheng Pan] Add missing log4j2-test.xml for Kyuubi Spark Hive Connector

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-11-28 19:53:30 +08:00
Fu Chen
081e03de4f
[KYUUBI #3794][FOLLOWUP] Expose kyuubi.operation.result.codec to KyuubiConf
### _Why are the changes needed?_

Expose `kyuubi.operation.result.codec` to KyuubiConf

### _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 #3866 from cfmcgrady/arrow.

Closes #3794

2047f364 [Fu Chen] update
6f3fe24d [Fu Chen] rename
20748ca7 [Fu Chen] expose `kyuubi.operation.result.codec` to KyuubiConf

Authored-by: Fu Chen <cfmcgrady@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-11-28 18:48:50 +08:00
zwangsheng
f67e141096
[KYUUBI #3860] [K8S] Add service account name in values.yaml to config kyuubi's serviceAccountName in helm template file
### _Why are the changes needed?_

For kyuubi run in kubernetes, kyuubi need permissions to create/list/delete pods.

Kubernetes provides serviceAccountName for quick configuration of permissions(Get details in [RBAC](https://kubernetes.io/docs/reference/access-authn-authz/rbac/)).

Add `serviceAccoutName` to the values.yaml file to help users add configurations without changing the template file.

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

![WX20221128-114911](https://user-images.githubusercontent.com/52876270/204190111-b463239f-0427-4197-b3b4-e2a3a0bdf7ad.png)

Closes #3860 from zwangsheng/kubernetes/serviceAccount.

Closes #3860

e87bcb69 [zwangsheng] [K8S] Add service account name in values.yaml for kyuubi's serviceAccountName

Authored-by: zwangsheng <2213335496@qq.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-11-28 16:08:55 +08:00
Fu Chen
a97b843303
[KYUUBI #3803] Improve the data interchange performance via Arrow serialization/deserialization
### _Why are the changes needed?_

to close #3794

This PR introduces the Apache Arrow library to improve the performance of data interchange.

data flow diagram with saprk engine

```
1. Spark Executor -> 2. Spark Driver -> 3. Kyuubi Server -> 4. Beeline/KyuubiHiveDriver
```

1. for simple types(Numeric/String/Binary/Boolean/Datetime/Interval), we serialize the columns on the Spark executor side and deserialize them on the client side.

2. for complex types(Array/Map/Struct), we first convert these columns to hive string and serialize the string columns on the executor side, and finally deserialize them as string type on the client side.

## Local Test

### Input dataset

```scala
spark.sql(
  """
    |select * from tpcds.sf10.catalog_sales limit 2000000
    |""".stripMargin)
  .write
  .mode("overwrite")
  .save("/tmp/parquet/tpcds/sf10/catalog_sales_2000000")
```

### Query

cat /tmp/b.sql

```sql
select * from parquet.`/tmp/parquet/tpcds/sf10/catalog_sales_2000000`;
```

### Beeline command
```
bin/beeline -u 'jdbc:hive2://0.0.0.0:10009/;' --hiveconf kyuubi.session.result.codec=simple/arrow --hiveconf kyuubi.operation.incremental.collect=false/true -f /tmp/b.sql > /dev/null
```

### Spark

```
/Users/fchen/Software/spark-3.3.0-bin-hadoop3/bin/spark-submit \
    --class org.apache.kyuubi.engine.spark.SparkSQLEngine \
    --driver-memory 6g \
    --master local[*] \
    ......
```

### Result

| kyuubi.session.result.codec | kyuubi.operation.incremental.collect | time spent|
| --- | --- | --- |
| arrow | false | 272.178 seconds |
| arrow | true | 146.76 seconds |
| simple | true | 607.523 seconds |
| simple | false | 429.374 seconds |

Closes #3803 from cfmcgrady/arrow.

Closes #3803

05b2b6f5 [Fu Chen] address comment
37e54e93 [Fu Chen] rename `kyuubi.session.result.codec` to `kyuubi.operation.result.codec`
fa44b102 [Fu Chen] address comment
e66b3bbd [Fu Chen] rebase master
08e2a97b [Fu Chen] fix shade
ab796bc6 [Fu Chen] address comment
1c979318 [Fu Chen] only consider spark engine major/minor version
dd61c015 [Fu Chen] add missing relocate dep `netty`
02f1d2f7 [Fu Chen] relocate arrow/jackson deps
4a2f7f09 [Fu Chen] minor refactor SparkDataTypeTests with SemanticVersion
627cc0a2 [Fu Chen] update kyuubi-jdbc-high-shaded NOTICE
815c68c2 [Fu Chen] reduce kyuubi-hive-jdbc/pom.xml
a7e2fcd9 [Fu Chen] fix style
825fda67 [Fu Chen] skip some tests when spark version < 3.3
039dbba1 [Fu Chen] minor refactor
95ad84c4 [Fu Chen] address comment
e1e81f01 [Fu Chen] revert unnecessary changes
36bce1d9 [Fu Chen] clean up
c789327c [Fu Chen] make sure SparkArrowbasedOperationSuite run with arrow enabled
d60c3120 [Fu Chen] clean up array-related implementations
8ca1fcd6 [Fu Chen] clean up unused arrow array implementations
8f96fdf3 [Fu Chen] fix
cdb83cf0 [Fu Chen] rename conf "kyuubi.operation.result.codec" to "kyuubi.session.result.codec"
f30c2c9d [Fu Chen] rename conf "kyuubi.beeline.arrow.enabled" to "kyuubi.operation.result.codec"
109a4f32 [Fu Chen] Fork Apache Spark-3.3.1 org.apache.spark.sql.catalyst.util.quoteIfNeeded to adapt to Spark-3.1.x
9ec23de3 [Fu Chen] revert kyuubi-server/src/main/scala/org/apache/kyuubi/server/BackendServiceMetric.scala
f2b7f2c3 [Fu Chen] revert kyuubi-hive-jdbc/src/main/java/org/apache/kyuubi/jdbc/hive/KyuubiCallableStatement.java
33e820c7 [Fu Chen] revert temporary `pom.xml` changes
daa259e5 [Fu Chen] add SparkArrowbasedOperationSuite
eb5ed344 [Fu Chen] make kyuubi.beeline.arrow.enabled default to false and enabled via url support
5c3a48c7 [Fu Chen] fix ut SparkOperationSuite: execute statement - select column name with dots
0dfd442b [Fu Chen] complex type(array/map/array) support
86b0a485 [Fu Chen] INTERVAL_YEAR_MONTH_TYPE type support
10da4fe9 [Fu Chen] INTERVAL_DAY_TIME_TYPE type support
3a8b0da3 [Fu Chen] implement KyuubiArrowBasedResultSet.getDate
a9fd48c1 [Fu Chen] implement KyuubiArrowBasedResultSet.getInt
a37b5564 [Fu Chen] only ExecuteStatement support arrow
fe47fdc4 [Fu Chen] add java version ArrowUtils
d162a594 [Fu Chen] lisence
5414ccc7 [Fu Chen] remove debug println
335b4e8f [Fu Chen] drop scala dependency for module kyuubi-hive-jdbc
f826e262 [Fu Chen] fix ut
bcf9744d [Fu Chen] license
3ebca27c [Fu Chen] fix style
540423d5 [Fu Chen] timestamp support
0965b8f4 [Fu Chen] revert extensions/spark/kyuubi-spark-connector-tpcds/src/test/scala/org/apache/kyuubi/spark/connector/tpcds/TPCDSQuerySuite.scala
ad1a7092 [Fu Chen] revert
5b4ee403 [Fu Chen] BackendServiceMetric
21b76d29 [Fu Chen] add more types support
ace05a24 [Fu Chen] arrow-based collect

Authored-by: Fu Chen <cfmcgrady@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-11-28 16:07:37 +08:00
zhouyifan279
40e64f014b
[KYUUBI #3859] [Bug] Error when authz command ReplaceArcticData
### _Why are the changes needed?_
Fix #3858

### _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 #3859 from zhouyifan279/3858.

Closes #3859

af5d7e56 [zhouyifan279] [Bug] Error when authz command ReplaceArcticData
5d54eb91 [zhouyifan279] [Bug] Error when authz command ReplaceArcticData

Authored-by: zhouyifan279 <zhouyifan279@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-11-28 12:21:05 +08:00
liangbowen
f463f57262
[KYUUBI #3853] [Improvement] Add fast maven profile for skipping running tests, style checks and building docs
### _Why are the changes needed?_

to close #3853.

With the added `fast` profile,
- skip running tests
- skip style checks including rat, spotless, surefire
- skip building javadoc and source jar
- skip engine binary release tarball downloading

### _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 #3854 from bowenliang123/3853-maven-fast.

Closes #3853

fb4f5243 [liangbowen] skip archive downloads of hive,spark,flink
699fbc68 [liangbowen] Revert "move setting of maven.scaladoc.skip into doc-jar execution section"
0c91f117 [liangbowen] move setting of maven.scaladoc.skip into doc-jar execution section
b988b342 [liangbowen] nit
6a20f1ce [liangbowen] rename props
a6840a62 [liangbowen] nit
1f911671 [liangbowen] make the profile solely control the props, with new props for skipping scala-docjar and scalasytle checks
fae04e64 [liangbowen] remove unuseful property
69d933e6 [liangbowen] add comment for clarification
6bc8a4be [liangbowen] skip `scala:doc-jar` in `scala-maven-plugin` by setting in pluginManagement. and diable scalasytle check.
1dcfeaf9 [liangbowen] disable skipping `maven.resources.skip`
62cb4740 [liangbowen] add new profile `fast`

Authored-by: liangbowen <liangbowen@gf.com.cn>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-11-28 10:40:16 +08:00
liangbowen
b5bfd97e01
[KYUUBI #3848] [Improvement] Sort config map returned inKyuubiConf.getAll
### _Why are the changes needed?_

to close #3848 .

Sort the config map returned in KyuubiConf.getAll to improve readability of engine launching configs in output.

### _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 #3849 from bowenliang123/sort-configs.

Closes #3848

75e60c89 [liangbowen] sort the returned map of getAll in KyuubiConf  (+4 squashed commits) Squashed commits: [f102b423] update method comment [465d7b25] use TreeMap for sorting [1a66e05b] add getAllSorted [2b3dbf91] sort the returned map of getAll in KyuubiConf

Authored-by: liangbowen <liangbowen@gf.com.cn>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-11-25 18:44:52 +08:00
Xuedong Luan
00d2d2eb67
[KYUUBI #3836] [SPARK] Support pyspark batch job by restful api
### _Why are the changes needed?_

Submit pyspark batch job by restful 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 #3836 from leoluan2009/pyspark-1.

Closes #3836

550021ac [Cheng Pan] Update kyuubi-server/src/main/scala/org/apache/kyuubi/engine/KyuubiApplicationManager.scala
357691c2 [Xuedong Luan] fix comment
7dfdbe24 [Xuedong Luan] fix comment
31bda178 [Xuedong Luan] [WIP] Support pyspark batch job by restful api

Lead-authored-by: Xuedong Luan <luanxuedong2009@gmail.com>
Co-authored-by: Cheng Pan <pan3793@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-11-25 02:39:54 +08:00
sychen
ce11e35822
[KYUUBI #3844] Forward the server ip in openSession
### _Why are the changes needed?_
Forward the server ip in `openSession`, and in the Spark engine we get the server ip to start the engine from the Environment tab.

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

Closes #3844 from cxzl25/forward_server_ip.

Closes #3844

7b2cf95b [sychen] fix conf npe
59e7a2fc [sychen] mysql and rest
f50c36d6 [sychen] forward server ip

Authored-by: sychen <sychen@ctrip.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-11-25 02:26:15 +08:00
Fu Chen
0e81b81bdd
[KYUUBI #3805][FOLLOWUP] Skipping PySpark tests for nightly build
### _Why are the changes needed?_

correct the wrong PySpark tag setting, and make it take effect for `spark-master` only.

### _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 #3850 from cfmcgrady/skip-pyspark-tests-for-nightly-build.

Closes #3805

5086c128 [Fu Chen] remove from global setting
2856797f [Fu Chen] skip pyspark tests for nightly build

Authored-by: Fu Chen <cfmcgrady@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-11-25 02:24:19 +08:00
sychen
7ee25b2220
[KYUUBI #3792] [SPARK] Engine UI support grace stop
### _Why are the changes needed?_
Now the kill operation of the Spark engine ui will directly shut down, and the SQL that is being executed by the engine will fail.

We can support grace stop, first log off the engine from the znode, and then wait for the SQL execution to complete.

### _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 #3792 from cxzl25/spark_ui_grace_stop.

Closes #3792

ebde958d [sychen] global
2676c193 [sychen] remove print session count
9acdf37a [sychen] address comment
25203ef9 [sychen] address comment
6e54ddb7 [sychen] engine ui grace stop

Authored-by: sychen <sychen@ctrip.com>
Signed-off-by: Shaoyun Chen <csy@apache.org>
2022-11-24 16:11:07 +08:00
liangbowen
35669b375a [KYUUBI #3805] [FOLLOWUP] transform PySparkTests from trait to class to enable @PySparkTest
### _Why are the changes needed?_

Annotation PySparkTest introduced in <https://github.com/apache/incubator-kyuubi/pull/3832> is not working on trait `PySparkTests`.

 In order to close #3805, transforming `PySparkTests` from trait to class,  to enable PySparkTest for skipping tests in nighty builds correctly.

### _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 #3846 from bowenliang123/3805-followup.

Closes #3805

6aacbea84 [liangbowen] make the type of`PySparkTests` from trait to class, in order to enable annotation @PySparkTest for skipping tests

Authored-by: liangbowen <liangbowen@gf.com.cn>
Signed-off-by: Fu Chen <cfmcgrady@gmail.com>
2022-11-24 10:06:07 +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
liangbowen
a482c49825
[KYUUBI #3840] [Improvement] Bump scalafmt to 3.6.1 and spotless maven plugin to 2.72.2
### _Why are the changes needed?_

to close #3840.

- bump scalafmt from 3.1.1 to 3.6.1
- bump spotless maven plugin from 2.41.1 to 2.72.2
- add `scalaMajorVersion` setting to spotless plugin configs

### _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 #3841 from bowenliang123/bump-scalafmt.

Closes #3840

1714012f [liangbowen] affect exist code with executing dev/reformat
9bafbb48 [liangbowen] change to scalaMajorVersion config name
56bf677d [liangbowen] bump scala fmt version to 3.6.1 and spotless maven plugin to 2.27.2

Authored-by: liangbowen <liangbowen@gf.com.cn>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-11-23 15:23:56 +08:00
Kent Yao
25a8f67555 [KYUUBI #3824] [DOCS] Authority of the documentation belongs to the community
### _Why are the changes needed?_

This PR changes the doc authority from Kent to Apache Kyuubi Community. Meanwhile, the footnotes for copyright/license are also simplified.

### _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 #3824 from yaooqinn/autority.

Closes #3824

fc25156a [Kent Yao] [DOCS] Authority of the documentation belongs to the community

Authored-by: Kent Yao <yao@apache.org>
Signed-off-by: fwang12 <fwang12@ebay.com>
2022-11-23 10:09:03 +08:00
fwang12
b225a42936 [KYUUBI #3835] Allow to use spark-internal as resource for batch job
### _Why are the changes needed?_

Allow to use spark-internal as resource for batch job.

### _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
<img width="654" alt="image" src="https://user-images.githubusercontent.com/6757692/203333994-4dee486b-1b3f-4f46-83f9-39fe02f66f0c.png">

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

Closes #3835 from turboFei/spark_internal.

Closes #3835

552c0e5e [fwang12] allow to use internal resource

Authored-by: fwang12 <fwang12@ebay.com>
Signed-off-by: fwang12 <fwang12@ebay.com>
2022-11-23 09:54:25 +08:00
Xuedong Luan
6bf4e492bf
[KYUUBI #3834] Upgrade SLF4J from 1.7.35 to 1.7.36
### _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 #3834 from leoluan2009/slf4j.

Closes #3834

e17b08ef [Xuedong Luan] Upgrade SLF4J from 1.7.35 to 1.7.36

Authored-by: Xuedong Luan <luanxuedong2009@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-11-22 21:42:42 +08:00
liangbowen
bfba94551d
[KYUUBI #3805] Skip PySpark tests for nightly builds
### _Why are the changes needed?_

to close #3805 .

### _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 #3832 from bowenliang123/skip-pyspark-tests.

Closes #3805

02a59bfb [liangbowen] add maven.plugin.scalatest.exclude.tags=org.scalatest.tags.PySparkTest to pom instead
444b6f4e [liangbowen] introduce @PySparkTest annotation and skip PySparkTests for nightly builds

Authored-by: liangbowen <liangbowen@gf.com.cn>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-11-22 21:04:31 +08:00
liangbowen
00f52a2cb2
[KYUUBI #3828] [PySpark] Support Python style check with spotless in CI style workflow and reformat tool
### _Why are the changes needed?_

to close #3828.

 Python code style checking support.
1. reuse Spotless maven plugin for Python style check
2. add style check to CI style workflow
3. add python linting support to `dev/reformat`. checks whether `black` installed in PATH.

### _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 #3823 from bowenliang123/spotless-python.

Closes #3828

4a4de885 [liangbowen] simplify empty tags
0bb9ec7c [liangbowen] simplify empty tag in pom
9dd39531 [liangbowen] lint python code with black via spotless
f85020fa [liangbowen] typo
4c93bce0 [liangbowen] install python 3.9 first
23fc4b96 [liangbowen] ci install black version from added `spotless.python.black.version` property
73f746b0 [Bowen Liang] Update dev/reformat
46667a00 [liangbowen] update style.yml
9c20b434 [liangbowen] update style.yml
21017e5e [liangbowen] update style.yml
8272c0bc [liangbowen] add python style to style checking for CI
e102726c [liangbowen] add profile spotless in dev/reformat if black found in path
062e9bf2 [liangbowen] add python scan for spotless. add new profile `spotless-python` for python file path.

Lead-authored-by: liangbowen <liangbowen@gf.com.cn>
Co-authored-by: Bowen Liang <bowen.liang.123@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-11-22 19:44:02 +08:00
Yikf
d0f3029908
[KYUUBI #3441][FOLLOWUP] Change default Spark version to 3.3 in kyuubi-spark-authz, kyuubi-spark-lineage's README
### _Why are the changes needed?_

Set Apache Spark3.3 as the default in kyuubi-spark-authz, kyuubi-spark-lineage's readme documentation

### _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 #3826 from Yikf/default-spark3.

Closes #3441

b5ba46b7 [Yikf] Make Spark 3.3 as default

Authored-by: Yikf <yikaifei1@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-11-22 19:29:39 +08:00
liaopeng
c989af68f4
[KYUUBI #3831] Update Dockerfile to include LICENSE NOTICE RELEASE files
### _Why are the changes needed?_

Fix dockerfile image missing RELEASE causes connection kyuubi Times: No such file or directory

### _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 #3831 from forLp811/master.

Closes #3831

0396688d [liaopeng] Merge remote-tracking branch 'origin/master'
715b903b [forLp811] Update Dockerfile
76129f5d [liaopeng] Fix dockerfile image missing RELEASE causes connection kyuubi Times: No such file or directory

Lead-authored-by: liaopeng <Lp%$2wsx@@@@>
Co-authored-by: forLp811 <118807263+forLp811@users.noreply.github.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-11-22 18:56:08 +08:00
liangbowen
3fae1845e7
[KYUUBI #3820] [Subtask] [PySpark] Skip missing MagicNode and code improvements
### _Why are the changes needed?_

to close #3820 .

To improve pyspark script support,
1. skip missing MagicNode implementation, since Jupyter and sparkmagic are not yet supported
2. add missing execute_reply_internal_error method
3. fix by calling clearOutputs before loop
4. ident lines and optimze unsed imports to conform python code style
5. Check Python major version , and exit on Python 2.x
6. fix name typo of `PythonResponse`

### _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 #3819 from bowenliang123/imrove-pyspark.

Closes #3820

473b9952 [liangbowen] add return type to `connect_to_existed_gateway`
66927821 [liangbowen] remove unnecessary comments for magic code
21e1d7a2 [liangbowen] move pyspark path preparing to the top of exeuction_python
9751e094 [liangbowen] revert to use SparkSessionBuilder for session creation
c4f3ef55 [liangbowen] use `SparkSession._create_shell_session()` to create spark session
c2f65630 [liangbowen] delay importing kyuubi_util
5ed893cc [liangbowen] adding Exception to except, to prevent PEP 8: E203
029361a9 [liangbowen] ast module adaptation for >=3.8
00c75fda [liangbowen] remove legacy code for importing unicode
9f56a4f4 [liangbowen] add todo
1da708ed [liangbowen] fix typo for PythonResponse, and minor declaration improvement
910c62fb [liangbowen] remove MagicNode implementation since Jupyter and sparkmagic are not yet supported
5f15c257 [liangbowen] exit on python 2.x
86ff7d06 [liangbowen] ident lines to conform python code style
5634c5e0 [liangbowen] rename get_spark to get_spark_session, and optimize unused imports in kyuubi_util.py
9d3e1d0c [liangbowen] add missing MagicNode implementation
0ade1dbe [liangbowen] add missing execute_reply_internal_error method
aee205a5 [liangbowen] import cStringIO for fix package resolving problem
acdd4b16 [liangbowen] fix by calling clearOutputs before loop

Authored-by: liangbowen <liangbowen@gf.com.cn>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-11-22 10:16:52 +08:00
jiaoqingbo
47e1cfdf08
[KYUUBI #3814] Configurable interval for sessionConfCache in FileSessionConfAdvisor (#3815)
* [KYUUBI #3814] Make the duration of sessionConfCache in FileSessionConfAdvisor configurable instead of a fixed 10 minutes

* fix ut

* fix ut

* fix doc

* code review

* update doc

* update

* update
2022-11-21 14:47:29 +08:00
liangbowen
a54f214bc5
[KYUUBI #3818] [Subtask] [PySpark] set local properties to spark context for python scripts
### _Why are the changes needed?_

to close #3818 .
- add `withLocalProperties` in `ExecutePython`
- set Spark local properties `kyuubi.session.user`, `kyuubi.statement.id`, `spark.scheduler.pool`, `spark.scheduler.pool` in withLocalProperties for other feature relied on it , e.g. Authz 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 #3817 from bowenliang123/pyspark-sessionuser.

Closes #3818

86876391 [liangbowen] add local props `kyuubi.statement.id` , `spark.scheduler.pool`, `spark.scheduler.pool`. and setting job group
1c2bec4e [liangbowen] nit
276ad43b [liangbowen] generalize setSparkLocalProperties
00da08eb [liangbowen] nit
9f2cdaa5 [liangbowen] set session user to spark local property before execute python

Authored-by: liangbowen <liangbowen@gf.com.cn>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-11-20 19:08:07 +08:00
sychen
dcf0ce6dcf
[KYUUBI #3816] Fix release document typo
### _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

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

Closes #3816 from cxzl25/release_typo.

Closes #3816

614d60fe [sychen] typo

Authored-by: sychen <sychen@ctrip.com>
Signed-off-by: Shaoyun Chen <csy@apache.org>
2022-11-17 15:54:30 +08:00
sychen
0433b1d3cc
[KYUUBI #3804][FOLLOWUP][DOCS] Fix quick start broken link
### _Why are the changes needed?_
followup #3804

### _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 #3812 from cxzl25/fix_broken_link.

Closes #3804

ba1de2a2 [sychen] fix quick start broken link

Authored-by: sychen <sychen@ctrip.com>
Signed-off-by: Shaoyun Chen <csy@apache.org>
2022-11-17 15:52:38 +08:00
liangbowen
bfd7f7b6b1
[KYUUBI #3807][Subtask][PySpark] Support get Python path from config and prefer PYSPARK_DRIVER_PYTHON env
### _Why are the changes needed?_

to close #3807

1. Prefer the system env PYSPARK_DRIVER_PYTHON than PYSPARK_PYTHON for Python execute path, to fix the problem when submitting to YARN with client deploy mode.
2. Support get python path from Spark config

As the same order in Spark (<https://github.com/apache/spark/blob/v3.3.1/launcher/src/main/java/org/apache/spark/launcher/SparkSubmitCommandBuilder.java#L330>),

```
// 1. conf spark.pyspark.driver.python
// 2. conf spark.pyspark.python
// 3. environment variable PYSPARK_DRIVER_PYTHON
// 4. environment variable PYSPARK_PYTHON
// 5. python
```

### _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 #3808 from bowenliang123/3807-pysparkpython.

Closes #3807

567a81d6 [liangbowen] fix NoSuchElementException
8a22a15a [liangbowen] nit
adc25463 [liangbowen] Support get python path from Spark config. Prefer the system env PYSPARK_DRIVER_PYTHON than PYSPARK_PYTHON for Python execute path.

Authored-by: liangbowen <liangbowen@gf.com.cn>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-11-16 19:29:53 +08:00
yuqi
c537557fcf
[KYUUBI #3813] [BUG] Caused by: java.lang.ClassNotFoundException: com.google.common.util.concurrent.internal.InternalFutureFailureAccess
### _Why are the changes needed?_

**Fix the following bug:**
```
2022-11-16 13:08:45.540 ERROR org.apache.kyuubi.server.KyuubiTBinaryFrontendService: Error opening session:
org.apache.kyuubi.KyuubiSQLException: Error opening session for test_user client ip 127.0.0.1, due to com/google/common/util/concurrent/internal/InternalFutureFailureAccess
	at org.apache.kyuubi.KyuubiSQLException$.apply(KyuubiSQLException.scala:69) ~[kyuubi-common_2.12-1.7.0-SNAPSHOT.jar:1.7.0-SNAPSHOT]
	at org.apache.kyuubi.session.KyuubiSessionManager.openSession(KyuubiSessionManager.scala:102) ~[kyuubi-server_2.12-1.7.0-SNAPSHOT.jar:1.7.0-SNAPSHOT]
	at org.apache.kyuubi.service.AbstractBackendService.openSession(AbstractBackendService.scala:45) ~[kyuubi-common_2.12-1.7.0-SNAPSHOT.jar:1.7.0-SNAPSHOT]
	at org.apache.kyuubi.server.KyuubiServer$$anon$1.org$apache$kyuubi$server$BackendServiceMetric$$super$openSession(KyuubiServer.scala:111) ~[kyuubi-server_2.12-1.7.0-SNAPSHOT.jar:1.7.0-SNAPSHOT]
	at org.apache.kyuubi.server.BackendServiceMetric.$anonfun$openSession$1(BackendServiceMetric.scala:37) ~[kyuubi-server_2.12-1.7.0-SNAPSHOT.jar:1.7.0-SNAPSHOT]
	at org.apache.kyuubi.metrics.MetricsSystem$.timerTracing(MetricsSystem.scala:111) ~[kyuubi-metrics_2.12-1.7.0-SNAPSHOT.jar:1.7.0-SNAPSHOT]
	at org.apache.kyuubi.server.BackendServiceMetric.openSession(BackendServiceMetric.scala:37) ~[kyuubi-server_2.12-1.7.0-SNAPSHOT.jar:1.7.0-SNAPSHOT]
	at org.apache.kyuubi.server.BackendServiceMetric.openSession$(BackendServiceMetric.scala:30) ~[kyuubi-server_2.12-1.7.0-SNAPSHOT.jar:1.7.0-SNAPSHOT]
	at org.apache.kyuubi.server.KyuubiServer$$anon$1.openSession(KyuubiServer.scala:111) ~[kyuubi-server_2.12-1.7.0-SNAPSHOT.jar:1.7.0-SNAPSHOT]
	at org.apache.kyuubi.service.TFrontendService.getSessionHandle(TFrontendService.scala:181) ~[kyuubi-common_2.12-1.7.0-SNAPSHOT.jar:1.7.0-SNAPSHOT]
	at org.apache.kyuubi.server.KyuubiTBinaryFrontendService.OpenSession(KyuubiTBinaryFrontendService.scala:81) ~[kyuubi-server_2.12-1.7.0-SNAPSHOT.jar:1.7.0-SNAPSHOT]
	at org.apache.hive.service.rpc.thrift.TCLIService$Processor$OpenSession.getResult(TCLIService.java:1497) ~[hive-service-rpc-3.1.3.jar:3.1.3]
	at org.apache.hive.service.rpc.thrift.TCLIService$Processor$OpenSession.getResult(TCLIService.java:1482) ~[hive-service-rpc-3.1.3.jar:3.1.3]
	at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39) ~[libthrift-0.9.3.jar:0.9.3]
	at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39) ~[libthrift-0.9.3.jar:0.9.3]
	at org.apache.kyuubi.service.authentication.TSetIpAddressProcessor.process(TSetIpAddressProcessor.scala:36) ~[kyuubi-common_2.12-1.7.0-SNAPSHOT.jar:1.7.0-SNAPSHOT]
	at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:286) ~[libthrift-0.9.3.jar:0.9.3]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_222]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_222]
	at java.lang.Thread.run(Thread.java:748) ~[?:1.8.0_222]
Caused by: java.lang.NoClassDefFoundError: com/google/common/util/concurrent/internal/InternalFutureFailureAccess
	at java.lang.ClassLoader.defineClass1(Native Method) ~[?:1.8.0_222]
	at java.lang.ClassLoader.defineClass(ClassLoader.java:763) ~[?:1.8.0_222]
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[?:1.8.0_222]
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:468) ~[?:1.8.0_222]
	at java.net.URLClassLoader.access$100(URLClassLoader.java:74) ~[?:1.8.0_222]
	at java.net.URLClassLoader$1.run(URLClassLoader.java:369) ~[?:1.8.0_222]
	at java.net.URLClassLoader$1.run(URLClassLoader.java:363) ~[?:1.8.0_222]
	at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_222]
	at java.net.URLClassLoader.findClass(URLClassLoader.java:362) ~[?:1.8.0_222]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_222]
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) ~[?:1.8.0_222]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_222]
	at java.lang.ClassLoader.defineClass1(Native Method) ~[?:1.8.0_222]
	at java.lang.ClassLoader.defineClass(ClassLoader.java:763) ~[?:1.8.0_222]
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[?:1.8.0_222]
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:468) ~[?:1.8.0_222]
	at java.net.URLClassLoader.access$100(URLClassLoader.java:74) ~[?:1.8.0_222]
	at java.net.URLClassLoader$1.run(URLClassLoader.java:369) ~[?:1.8.0_222]
	at java.net.URLClassLoader$1.run(URLClassLoader.java:363) ~[?:1.8.0_222]
	at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_222]
	at java.net.URLClassLoader.findClass(URLClassLoader.java:362) ~[?:1.8.0_222]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_222]
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) ~[?:1.8.0_222]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_222]
	at java.lang.ClassLoader.defineClass1(Native Method) ~[?:1.8.0_222]
	at java.lang.ClassLoader.defineClass(ClassLoader.java:763) ~[?:1.8.0_222]
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[?:1.8.0_222]
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:468) ~[?:1.8.0_222]
	at java.net.URLClassLoader.access$100(URLClassLoader.java:74) ~[?:1.8.0_222]
	at java.net.URLClassLoader$1.run(URLClassLoader.java:369) ~[?:1.8.0_222]
	at java.net.URLClassLoader$1.run(URLClassLoader.java:363) ~[?:1.8.0_222]
	at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_222]
	at java.net.URLClassLoader.findClass(URLClassLoader.java:362) ~[?:1.8.0_222]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_222]
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) ~[?:1.8.0_222]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_222]
	at com.google.common.cache.LocalCache$LoadingValueReference.<init>(LocalCache.java:3472) ~[guava-30.1-jre.jar:?]
	at com.google.common.cache.LocalCache$LoadingValueReference.<init>(LocalCache.java:3476) ~[guava-30.1-jre.jar:?]
	at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2134) ~[guava-30.1-jre.jar:?]
	at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2045) ~[guava-30.1-jre.jar:?]
	at com.google.common.cache.LocalCache.get(LocalCache.java:3951) ~[guava-30.1-jre.jar:?]
	at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3974) ~[guava-30.1-jre.jar:?]
	at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4935) ~[guava-30.1-jre.jar:?]
	at org.apache.kyuubi.session.FileSessionConfAdvisor.getConfOverlay(FileSessionConfAdvisor.scala:41) ~[kyuubi-server_2.12-1.7.0-SNAPSHOT.jar:1.7.0-SNAPSHOT]
	at org.apache.kyuubi.session.KyuubiSessionImpl.<init>(KyuubiSessionImpl.scala:55) ~[kyuubi-server_2.12-1.7.0-SNAPSHOT.jar:1.7.0-SNAPSHOT]
	at org.apache.kyuubi.session.KyuubiSessionManager.createSession(KyuubiSessionManager.scala:83) ~[kyuubi-server_2.12-1.7.0-SNAPSHOT.jar:1.7.0-SNAPSHOT]
	at org.apache.kyuubi.session.SessionManager.openSession(SessionManager.scala:98) ~[kyuubi-common_2.12-1.7.0-SNAPSHOT.jar:1.7.0-SNAPSHOT]
	at org.apache.kyuubi.session.KyuubiSessionManager.openSession(KyuubiSessionManager.scala:95) ~[kyuubi-server_2.12-1.7.0-SNAPSHOT.jar:1.7.0-SNAPSHOT]
	... 18 more
Caused by: java.lang.ClassNotFoundException: com.google.common.util.concurrent.internal.InternalFutureFailureAccess
	at java.net.URLClassLoader.findClass(URLClassLoader.java:382) ~[?:1.8.0_222]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_222]
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) ~[?:1.8.0_222]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_222]
	at java.lang.ClassLoader.defineClass1(Native Method) ~[?:1.8.0_222]
	at java.lang.ClassLoader.defineClass(ClassLoader.java:763) ~[?:1.8.0_222]
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[?:1.8.0_222]
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:468) ~[?:1.8.0_222]
	at java.net.URLClassLoader.access$100(URLClassLoader.java:74) ~[?:1.8.0_222]
	at java.net.URLClassLoader$1.run(URLClassLoader.java:369) ~[?:1.8.0_222]
	at java.net.URLClassLoader$1.run(URLClassLoader.java:363) ~[?:1.8.0_222]
	at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_222]
	at java.net.URLClassLoader.findClass(URLClassLoader.java:362) ~[?:1.8.0_222]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_222]
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) ~[?:1.8.0_222]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_222]
	at java.lang.ClassLoader.defineClass1(Native Method) ~[?:1.8.0_222]
	at java.lang.ClassLoader.defineClass(ClassLoader.java:763) ~[?:1.8.0_222]
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[?:1.8.0_222]
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:468) ~[?:1.8.0_222]
	at java.net.URLClassLoader.access$100(URLClassLoader.java:74) ~[?:1.8.0_222]
	at java.net.URLClassLoader$1.run(URLClassLoader.java:369) ~[?:1.8.0_222]
	at java.net.URLClassLoader$1.run(URLClassLoader.java:363) ~[?:1.8.0_222]
	at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_222]
	at java.net.URLClassLoader.findClass(URLClassLoader.java:362) ~[?:1.8.0_222]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_222]
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) ~[?:1.8.0_222]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_222]
	at java.lang.ClassLoader.defineClass1(Native Method) ~[?:1.8.0_222]
	at java.lang.ClassLoader.defineClass(ClassLoader.java:763) ~[?:1.8.0_222]
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[?:1.8.0_222]
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:468) ~[?:1.8.0_222]
	at java.net.URLClassLoader.access$100(URLClassLoader.java:74) ~[?:1.8.0_222]
	at java.net.URLClassLoader$1.run(URLClassLoader.java:369) ~[?:1.8.0_222]
	at java.net.URLClassLoader$1.run(URLClassLoader.java:363) ~[?:1.8.0_222]
	at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_222]
	at java.net.URLClassLoader.findClass(URLClassLoader.java:362) ~[?:1.8.0_222]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_222]
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) ~[?:1.8.0_222]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_222]
	at com.google.common.cache.LocalCache$LoadingValueReference.<init>(LocalCache.java:3472) ~[guava-30.1-jre.jar:?]
	at com.google.common.cache.LocalCache$LoadingValueReference.<init>(LocalCache.java:3476) ~[guava-30.1-jre.jar:?]
	at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2134) ~[guava-30.1-jre.jar:?]
	at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2045) ~[guava-30.1-jre.jar:?]
	at com.google.common.cache.LocalCache.get(LocalCache.java:3951) ~[guava-30.1-jre.jar:?]
	at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3974) ~[guava-30.1-jre.jar:?]
	at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4935) ~[guava-30.1-jre.jar:?]
	at org.apache.kyuubi.session.FileSessionConfAdvisor.getConfOverlay(FileSessionConfAdvisor.scala:41) ~[kyuubi-server_2.12-1.7.0-SNAPSHOT.jar:1.7.0-SNAPSHOT]
	at org.apache.kyuubi.session.KyuubiSessionImpl.<init>(KyuubiSessionImpl.scala:55) ~[kyuubi-server_2.12-1.7.0-SNAPSHOT.jar:1.7.0-SNAPSHOT]
	at org.apache.kyuubi.session.KyuubiSessionManager.createSession(KyuubiSessionManager.scala:83) ~[kyuubi-server_2.12-1.7.0-SNAPSHOT.jar:1.7.0-SNAPSHOT]
	at org.apache.kyuubi.session.SessionManager.openSession(SessionManager.scala:98) ~[kyuubi-common_2.12-1.7.0-SNAPSHOT.jar:1.7.0-SNAPSHOT]
	at org.apache.kyuubi.session.KyuubiSessionManager.openSession(KyuubiSessionManager.scala:95) ~[kyuubi-server_2.12-1.7.0-SNAPSHOT.jar:1.7.0-SNAPSHOT]
	... 18 more
```

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

Closes #3813 from ychris78/yuqi_1116.

Closes #3813

7fbfdff8 [yuqi] update dev/dependencyList and LICENSE-binary
f664907d [yuqi] fix bug: Caused by: java.lang.ClassNotFoundException: com.google.common.util.concurrent.internal.InternalFutureFailureAccess

Authored-by: yuqi <1450636878@qq.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-11-16 17:24:23 +08:00
sychen
ca9f542c71
[KYUUBI #3811] Add v1.6.1-incubating changelog
### _Why are the changes needed?_
Add v1.6.1-incubating changelog.

### _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 #3811 from cxzl25/changelog-1.6.1-incubating.

Closes #3811

99310c19 [sychen] v1.6.1-incubating changelog

Authored-by: sychen <sychen@ctrip.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-11-16 14:29:48 +08:00
Kent Yao
6548036453
[KYUUBI #3804] [DOCS] Make the quick start less wordy and easier to understand
### _Why are the changes needed?_

The current quick start is too wordy and not user-friendly.

In this PR, we simply the guide to let newcomers easier build a quick start deployment with Kyuubi and Spark only. The copied logs are removed the make the doc shorter.

<img width="1787" alt="image" src="https://user-images.githubusercontent.com/8326978/201630828-013f3b8b-b88b-4a35-b1ae-e142cb153370.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.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #3804 from yaooqinn/qstart.

Closes #3804

d5bff5d0 [Kent Yao] [DOCS] Make the quick start less wordy and easier
696b2610 [Kent Yao] [DOCS] Make the quick start less wordy and easier
b7e30d95 [Kent Yao] [DOCS] Make the quick start less wordy and easier

Authored-by: Kent Yao <yao@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-11-15 17:59:16 +08:00
yuqi
8788c3b2f3
[KYUUBI #3742] Add FileSessionConfAdvisor to manage session level configuration
### _Why are the changes needed?_

When a kyuubi service connections to multiple engine clusters, we can only explicitly specify relevant parameters after the URL, for example:
`beeline -u 'jdbc:hive2://127.0.0.1:10009/?kyuubi.engineEnv.FLINK_HOME=/opt/flink;kyuubi.ha.namespace=kyuubi-ns-c;kyuubi.engine.type=FLINK_SQL'`
This method is extremely unfriendly to users.

I implemented a SessionConfAdvisor implementation class `org.apache.kyuubi.session.FileSessionConfAdvisor` based on the conf file that to manage session level configurations, so that we can access this cluster only by specifying a unique engine name, for example:
access cluster-a:
`beeline -u 'jdbc:hive2://127.0.0.1:10009/?kyuubi.session.conf.profile=cluster-a'`

access cluster-c:
`beeline -u 'jdbc:hive2://127.0.0.1:10009/?kyuubi.session.conf.profile=cluster-c'`

`kyuubi-session-cluster-a.conf` configuration is as follows:
```
    kyuubi.ha.namespace kyuubi-ns-a
    kyuubi.engine.type SPARK_SQL
    kyuubi.engine.pool.balance.policy POLLING

    kyuubi.engineEnv.SPARK_HOME /opt/spark30
    kyuubi.engineEnv.HADOOP_CONF_DIR /opt/hadoop_conf_dir
```

`kyuubi-session-cluster-c.conf` configuration is as follows:
```
    kyuubi.ha.namespace kyuubi-ns-a
    kyuubi.engine.type SPARK_SQL

    kyuubi.engineEnv.SPARK_HOME /opt/spark32
    kyuubi.engineEnv.HADOOP_CONF_DIR /opt/hadoop_conf_dir
```

### _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 #3742 from ychris78/yuqi_1101.

Closes #3742

e1449867 [yuqi] Style
68bbfecf [yuqi] restructure
1c8daa86 [yuqi] Change the cache expiration time to 10 minutes and remove the manual cache
5b4a6d77 [Cheng Pan] Update kyuubi-server/src/main/scala/org/apache/kyuubi/session/FileSessionConfAdvisor.scala
d332e2d8 [Cheng Pan] Update kyuubi-server/src/main/scala/org/apache/kyuubi/session/FileSessionConfAdvisor.scala
cb644ab4 [Cheng Pan] Update docs/deployment/settings.md
1ee3c980 [Cheng Pan] Update kyuubi-server/src/test/resources/kyuubi-session-cluster-a.conf
30f8fde0 [Cheng Pan] Update kyuubi-common/src/main/scala/org/apache/kyuubi/config/KyuubiConf.scala
5ef5841a [yuqi] Cache upgrade
5c2f7461 [yuqi] add cache and fix bug
1b1f9d67 [yuqi] scalastyle
a0507847 [yuqi] License info amendment
335250fc [yuqi] fix bug
9e8d313a [yuqi] Modify according to suggestions
5f57b637 [yuqi] Modify according to suggestions
5e504252 [yuqi] add org.apache.kyuubi.plugin.FileSessionConfAdvisor When kyuubi.session.conf.advisor=org.apache.kyuubi.plugin.FileSessionConfAdvisor,Specify a session level configuration file, which will be combined with default.conf to have an impact. The corresponding configuration file is conf/kyuubi-session-<profile>.conf
0cb71341 [yuqi] add org.apache.kyuubi.plugin.YamlSessionConfAdvisor
b524c221 [yuqi] add org.apache.kyuubi.plugin.YamlSessionConfAdvisor
51729d15 [yuqi] When a kyuubi service connections to multiple engine clusters, we can only explicitly specify relevant parameters after the URL, for example: beeline -u 'jdbc:hive2://127.0.0.1:10009/?kyuubi.engineEnv.FLINK_HOME=/opt/flink;kyuubi.ha.namespace=kyuubi-ns-c;kyuubi.engine.type=FLINK_SQL' This method is extremely unfriendly to users, and it is extremely unsafe to expose namespaces to users. So I added a yaml file(engine-cluster-env.yaml) to manage the engine clusters, so that we can use this cluster only by specifying a unique engine name, for example: use cluster-a: beeline -u 'jdbc:hive2://127.0.0.1:10009/?kyuubi.engine.cluster.name=cluster-a'

Lead-authored-by: yuqi <1450636878@qq.com>
Co-authored-by: Cheng Pan <pan3793@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-11-14 20:43:25 +08:00
lcy999
979881d687 [KYUUBI #3801] Correctly calculate active stages in SQLOperationListener
### _Code of Conduct_
- [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)

### _Search before asking_
- [x] I have searched in the [issues](https://github.com/apache/incubator-kyuubi/issues?q=is%3Aissue) and found no similar issues.

### _Describe the bug_
activeStages key is StageAttempt, and its value is StageInfo. The contains function defaults to 'containsValue'

### _Affects Version(s)_
master/1.7/1.6

### _Are you willing to submit PR?_
- [x] Yes. I can submit a PR independently to fix.
- [ ] Yes. I would be willing to submit a PR with guidance from the Kyuubi community to fix.
- [ ] No. I cannot submit a PR at this time.

Closes #3801 from lcy999/bug_1113.

Closes #3801

d6d96d30 [lcy999] active stage can't calculate the number of tasks correctly in sql operation listener

Authored-by: lcy999 <1501989483@qq.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-11-13 11:30:22 +00:00
Cheng Pan
be82aca237
[KYUUBI #3798] Bump protobuf-java from 3.21.1 to 3.21.7
Bumps [protobuf-java](https://github.com/protocolbuffers/protobuf) from 3.21.1 to 3.21.7.
<details>
<summary>Commits</summary>
<ul>
<li><a href="54489e95e0"><code>54489e9</code></a> Updating changelog</li>
<li><a href="5fc03e1647"><code>5fc03e1</code></a> Updating version.json and repo version numbers to: 21.7</li>
<li><a href="a3888f5331"><code>a3888f5</code></a> Clean up TextFormat parser (<a href="https://github-redirect.dependabot.com/protocolbuffers/protobuf/issues/10673">#10673</a>)</li>
<li><a href="3b5301c114"><code>3b5301c</code></a> Refactoring Java parsing (21.x) (<a href="https://github-redirect.dependabot.com/protocolbuffers/protobuf/issues/10665">#10665</a>)</li>
<li><a href="bea6726c73"><code>bea6726</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/protocolbuffers/protobuf/issues/10579">#10579</a> from protocolbuffers/21.x-202209142140</li>
<li><a href="b1924e1de9"><code>b1924e1</code></a> Update version.json to: 21.7-dev</li>
<li><a href="929e13d1a9"><code>929e13d</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/protocolbuffers/protobuf/issues/10572">#10572</a> from deannagarcia/21.x</li>
<li><a href="de7597e577"><code>de7597e</code></a> Update python/release.sh to handle delay between twine upload and pip install...</li>
<li><a href="480bd3b970"><code>480bd3b</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/protocolbuffers/protobuf/issues/10557">#10557</a> from protocolbuffers/21.x-202209132118</li>
<li><a href="aa8c73d845"><code>aa8c73d</code></a> Updating changelog</li>
<li>Additional commits viewable in <a href="https://github.com/protocolbuffers/protobuf/compare/v3.21.1...v3.21.7">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=com.google.protobuf:protobuf-java&package-manager=maven&previous-version=3.21.1&new-version=3.21.7)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `dependabot rebase` will rebase this PR
- `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `dependabot merge` will merge this PR after your CI passes on it
- `dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `dependabot cancel merge` will cancel a previously requested merge and block automerging
- `dependabot reopen` will reopen this PR if it is closed
- `dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/apache/incubator-kyuubi/network/alerts).

</details>

Closes #3798 from dependabot[bot]/dependabot/maven/com.google.protobuf-protobuf-java-3.21.7.

Closes #3798

ab92cde0 [Cheng Pan] deplist
5f535b97 [dependabot[bot]] Bump protobuf-java from 3.21.1 to 3.21.7

Lead-authored-by: Cheng Pan <chengpan@apache.org>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-11-11 11:58:57 +08:00
Fu Chen
7295049c9f
[KYUUBI #3795][PYSPARK] Python 3.8+ support
### _Why are the changes needed?_

to close #3795

Python ast api is changed after python 3.8, see https://github.com/ipython/ipython/pull/11593

### _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 #3797 from cfmcgrady/kyuubi-3795.

Closes #3795

44edcea1 [Fu Chen] Revert "debug python version"
f8171b00 [Fu Chen] Revert "print ga debug info"
16fde4ee [Fu Chen] debug python version
331602a8 [Fu Chen] print ga debug info
66eeb3fb [Fu Chen] python 3.8+ support

Authored-by: Fu Chen <cfmcgrady@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-11-11 11:27:23 +08:00
df_liu
a58816609b
[KYUUBI #3790] Avoid using SchemaResolver directly in GetColumns operation
### _Why are the changes needed?_

close #3790

### _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 #3793 from df-Liu/flink_table.

Closes #3790

317434d2 [df_liu] flink table from

Authored-by: df_liu <df_liu@trip.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-11-11 10:08:05 +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
Cheng Pan
de0a92529a
[KYUUBI #3796] Bump Netty from 4.1.73.Final to 4.1.84.Final
### _Why are the changes needed?_

Bump Netty to latest version.

https://github.com/netty/netty/pull/12146 explained that netty-tcnative-classes should be optional, otherwise will cause https://github.com/netty/netty/issues/12101

### _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 #3796 from pan3793/netty.

Closes #3796

2b299233 [Cheng Pan] license
447a8d08 [Cheng Pan] nit
62abe481 [Cheng Pan] nit
506f76bf [Cheng Pan] Bump Netty from 4.1.73.Final to 4.1.84.Final

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-11-10 16:48:09 +08:00
Tianlin Liao
02fe75708d
[KYUUBI #3786] Do not show the app Diagnostic for list batch command
### _Why are the changes needed?_

Close #3786

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

Before: (with diagnostic)
<img width="1780" alt="image (5)" src="https://user-images.githubusercontent.com/21362040/200830694-74276fdf-8c92-4354-9b8d-525564dbdbd6.png">
<img width="1792" alt="image" src="https://user-images.githubusercontent.com/21362040/200831721-36943c48-1e08-4711-8529-621afef638d4.png">

After: (without diagnostic)
![image (4)](https://user-images.githubusercontent.com/21362040/200830746-4bc3b1c2-d106-4929-9005-0a5451e0b9fd.png)

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

Closes #3789 from lightning-L/kyuubi-3786.

Closes #3786

4f5af8b1 [Tianlin Liao] [KYUUBI #3786] Do not show the app Diagnostic for list batch command

Authored-by: Tianlin Liao <tiliao@ebay.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-11-10 12:46:47 +08:00