Commit Graph

504 Commits

Author SHA1 Message Date
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
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
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
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
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
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
Luning Wang
373835536e
[KYUUBI #3039][DOCS] Add operation resource REST docs
### _Why are the changes needed?_
Add operation resource REST docs

### _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 #3709 from deadwind4/operation-rest-doc.

Closes #3039

437685c40 [Luning Wang] Fix descriptions of action
eb9557d41 [Luning Wang] Fix descriptions
60d038a43 [Luning Wang] [KYUUBI #3039][DOCS] Add operation resource REST docs

Authored-by: Luning Wang <wang4luning@gmail.com>
Signed-off-by: Kent Yao <yao@apache.org>
2022-11-09 15:47:07 +08:00
Kent Yao
a3935d8b15
[KYUUBI #3784] [DOCS] Remove unused stale imagine from documentation
### _Why are the changes needed?_

The following pictures are removed from master branch, some of them with A-prefix are renamed
```
D	docs/imgs/authorization.png
D	docs/imgs/ha_failover.png
D	docs/imgs/impersonation.png
D	docs/imgs/kyuubi.png
D	docs/imgs/kyuubi_architecture.png
D	docs/imgs/kyuubi_internal.png
D	docs/imgs/kyuubi_logo.png
D	docs/imgs/kyuubi_logo_gray.png
D	docs/imgs/kyuubi_logo_legacy.png
D	docs/imgs/kyuubi_logo_red.png
D	docs/imgs/kyuubi_logo_white_2.png
D	docs/imgs/kyuubi_logo_white_legacy.png
A	docs/imgs/logo.png
A	docs/imgs/logo_gray_short.png
A	docs/imgs/logo_red_short.png
A	docs/imgs/logo_white_short.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

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

Closes #3784 from yaooqinn/cleanup.

Closes #3784

66ce11b0 [Kent Yao] [DOCS] Remove unused stale imagine from documentation

Authored-by: Kent Yao <yao@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-11-09 10:44:10 +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
Kent Yao
d3735eab2d
[KYUUBI #3763] [DOCS] Update the home page of documentation to keep the latest updates
### _Why are the changes needed?_

The doc home page is stale now for the scope of the Kyuubi community and project as it is written based on spark SQL scenario only.

This PR changes the kyuubi_layers.drawio to add missing Doris, Flink, and Hive logos.

And other changes can be viewed from the screenshot pinned below.

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

![image](https://user-images.githubusercontent.com/8326978/199940090-2d521ae5-e7b8-408c-a542-333c1acfbadc.png)

![image](https://user-images.githubusercontent.com/8326978/199940183-caaccfa7-303f-47ea-82c7-9ab9ecb4fd04.png)

![image](https://user-images.githubusercontent.com/8326978/199940321-dd67ce8f-f0d4-4659-a114-c72912ad730a.png)
![image](https://user-images.githubusercontent.com/8326978/199940573-b99d9358-34b9-40df-b9ed-b0b323c9bec3.png)

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

Closes #3763 from yaooqinn/welcome.

Closes #3763

a998c8792 [Kent Yao] [DOCS] Update the home page of documentation to keep the latest updates
2450fe141 [Kent Yao] Merge branch 'master' of github.com:apache/incubator-kyuubi into welcome
6e71a6b3a [Kent Yao] [DOCS] Update the home page of documentation to keep the latest updates

Authored-by: Kent Yao <yao@apache.org>
Signed-off-by: Kent Yao <yao@apache.org>
2022-11-07 14:11:24 +08:00
Bowen Liang
31d2ec1184 [KYUUBI #3406] [FOLLOWUP] Fix doc link to Spark Hive Dialect plugin
### _Why are the changes needed?_

- Fix the doc link to Spark Hive Dialect 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 #3741 from bowenliang123/fix-hivedialect-link.

Closes #3406

61d19335 [Bowen Liang] fix link to dialect page

Authored-by: Bowen Liang <liangbowen@gf.com.cn>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-11-03 15:39:45 +00:00
Yikf
fab6f7a736 [KYUUBI #3441][FOLLOWUP] Make Spark 3.3 as default in build.md
### _Why are the changes needed?_

Make Spark 3.3 as default in build.md

### _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 #3757 from Yikf/build-3.

Closes #3441

03873876 [Yikf] Make Spark 3.3 as default in build.md

Authored-by: Yikf <yikaifei1@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-11-03 15:30:08 +00:00
Fei Wang
6de2f68713 [KYUUBI #3748] Adding metrics kyuubi.metadata.request.opened and fix flaky test - MetadataManagerSuite
### _Why are the changes needed?_

Seems there is some delay for the finally block.
<img width="749" alt="image" src="https://user-images.githubusercontent.com/6757692/199627847-7555a2d6-044f-4e91-88f7-6353084c788a.png">
Add a new metrics for opened metadata requests to track after each test.

### _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 #3748 from turboFei/flaky_test_metadata_requests_v2.

Closes #3748

c130b6e9 [Fei Wang] 1.6.1
bc327752 [Fei Wang] Add kyuubi.metadata.request.opened to fix flaky test
6153f9a6 [Fei Wang] Revert "fix flaky test"
f067c5aa [Fei Wang] fix flaky test

Authored-by: Fei Wang <fwang12@ebay.com>
Signed-off-by: Fei Wang <fwang12@ebay.com>
2022-11-03 11:29:11 +08:00
Fei Wang
08b38c8c8c [KYUUBI #3720][FOLLOWUP] Using correct config version for CTL_BATCH_LOG_ON_FAILURE_TIMEOUT
### _Why are the changes needed?_

Set the config version to 1.6.1.

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

- [ ] Add screenshots for manual tests if appropriate

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

Closes #3734 from turboFei/typo_version.

Closes #3720

4a552048 [Fei Wang] [KYUUBI #3720][FOLLOWUP] Using correct config version for CTL_BATCH_LOG_ON_FAILURE_TIMEOUT

Authored-by: Fei Wang <fwang12@ebay.com>
Signed-off-by: Fei Wang <fwang12@ebay.com>
2022-10-31 21:30:54 +08:00
Fei Wang
528afce614 [KYUUBI #3720] Support to show remaining logs with timeout if the batch failed
### _Why are the changes needed?_

If the batch failed, we shall try to show the remaining logs with timeout.

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

Closes #3720 from turboFei/wait_log_fetched.

Closes #3720

a5d0b37f [Fei Wang] comments
220be4ee [Fei Wang] in same thread
90ada13c [Fei Wang] revert
e3ab5ec8 [Fei Wang] address comments
e94a348c [Fei Wang] refactor
c901e4b6 [Fei Wang] prevent NPE
9ed76685 [Fei Wang] save
1f3560bd [Fei Wang] save

Authored-by: Fei Wang <fwang12@ebay.com>
Signed-off-by: Fei Wang <fwang12@ebay.com>
2022-10-31 20:34:37 +08:00
hongdongdong
96570a45e2 [KYUUBI #3726] [DOCS] Place comments above line to avoid mislead users
### _Why are the changes needed?_

When users copy the config directly, the suffix comments will cause run failure.

### _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 #3726 from hddong/improve-trino-quick-start.

Closes #3726

1b330d5e [hongdongdong] [DOCS] Place comments above line to avoid mislead users

Authored-by: hongdongdong <hongdd@apache.org>
Signed-off-by: hongdongdong <hongdd@apache.org>
2022-10-31 16:44:49 +08:00
Fei Wang
14b9fd5e75 [KYUUBI #3722] Set default parameters for BatchesResource in server side
### _Why are the changes needed?_

Set the same default values for BatchesResource in server 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

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

Closes #3722 from turboFei/batch_user_defaults.

Closes #3722

496e61a55 [Fei Wang] default in server side

Authored-by: Fei Wang <fwang12@ebay.com>
Signed-off-by: Fei Wang <fwang12@ebay.com>
2022-10-30 17:53:31 +08:00
Luning Wang
0f51279cb3 [KYUUBI #3703][DOCS] Fix typo in localLog REST API
### _Why are the changes needed?_
Fix typo in localLog of batch REST 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

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

Closes #3704 from deadwind4/batch-typo.

Closes #3703

d89390d9 [Luning Wang] [KYUUBI #3703][DOCS] Fix typo in localLog REST API

Authored-by: Luning Wang <wang4luning@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-10-29 10:37:55 +00:00
Bowen Liang
738e35100a
[KYUUBI #3705] Add docs for JDBC authentication usage with in-memory database
### _Why are the changes needed?_

to close #3705 .

Add docs for JDBC authentication usage with in-memory database with config example for token validation example.

### _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 #3706 from bowenliang123/jdbc-inmem.

Closes #3705

3de9bceb [Bowen Liang] use backslash for multi-line config value
26a4d1b7 [Bowen Liang] nit
e078e985 [Bowen Liang] add JDBC auth usage with in-memory db for token validation
67624faf [liangbowen] init jdbc inmem doc

Lead-authored-by: Bowen Liang <liangbowen@gf.com.cn>
Co-authored-by: liangbowen <liangbowen@gf.com.cn>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-10-27 11:06:36 +08:00
Tianlin Liao
d8fc3ec867 [KYUUBI #3688] add rest_api and kyuubi-admin docs for admin delete/list engine operation
### _Why are the changes needed?_

close #3688

### _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="1413" alt="image" src="https://user-images.githubusercontent.com/21362040/197667408-679b940d-d217-473a-8131-7fe106faa8c5.png">
<img width="1370" alt="image" src="https://user-images.githubusercontent.com/21362040/197667453-2ad673f8-286c-4031-a804-8d354ce688b2.png">
<img width="1593" alt="image" src="https://user-images.githubusercontent.com/21362040/197670699-e06654fc-5b31-44a5-88da-da3ec157250b.png">

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

Closes #3689 from lightning-L/doc.

Closes #3688

7292596bc [Tianlin Liao] fix wording
cd5657d86 [Tianlin Liao] [KYUUBI #3688] add rest_api and kyuubi-admin docs for admin delete/list engine operation

Authored-by: Tianlin Liao <tiliao@ebay.com>
Signed-off-by: Fei Wang <fwang12@ebay.com>
2022-10-25 19:40:51 +08:00
zwangsheng
9827c60aa4
[KYUUBI #3663] [SPARK][K8S] Support auto build Kubernetes client from env when Kyuubi running in Pod
### _Why are the changes needed?_

Current kyuubi build kubernetes client for `KyuubiApplicationOperator` to find or kill spark engine on kubernetes.

This pr aims to extract the code for building kubernetes client into `KubernetesUtils` and to do auto build following the logic in Spark.

We prefer to building with user-configured parameters; When missing, the kubernetes client logic will build one from environment variables and kubeconfig.

### _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 #3663 from zwangsheng/feature/perfer_build_from_pod_env.

Closes #3663

0a4c8c79 [zwangsheng] clear properties
ce408db0 [zwangsheng] fix test
fb28ea7a [zwangsheng] add ci test
943c68dd [zwangsheng] add unit test
ddc9a2b2 [zwangsheng] fix scala
75380d13 [zwangsheng] comment
e6826609 [zwangsheng] master
683cc260 [zwangsheng] context provided master
7b42133c [zwangsheng] add doc
b56829c5 [zwangsheng] fix helm
5884475d [zwangsheng] rebuild
a7f0b551 [zwangsheng] ad
e7f9ec05 [zwangsheng] add setting
b77bbd9b [zwangsheng] add doc
3f3253d3 [zwangsheng] init

Authored-by: zwangsheng <2213335496@qq.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-10-25 14:21:41 +08:00
Fei Wang
7bcb522d6e [KYUUBI #3658] Support SSL for Kyuubi thrift binary connection
### _Why are the changes needed?_

Support SSL for kyuubi thrift binary conenction.
### _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
Will add screenshot for IT.

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

Closes #3658 from turboFei/ssl_binary.

Closes #3658

ffd603ec [Fei Wang] comment
ce652b7e [Fei Wang] revert UT
52e24abb [Fei Wang] ut
f6cae357 [Fei Wang] save
c6b664f1 [Fei Wang] exclude passwords
d34a4ca2 [Fei Wang] comments
11bfa9ad [Fei Wang] refactor
e2ca77ea [Fei Wang] align
86aaf87c [Fei Wang] with alternative
d17e0d11 [Fei Wang] style
eb4ba52a [Fei Wang] Support SSL for Kyuubi thrift binary connection

Authored-by: Fei Wang <fwang12@ebay.com>
Signed-off-by: Fei Wang <fwang12@ebay.com>
2022-10-24 21:39:31 +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
Fu Chen
393d32a30c
[KYUUBI #3615] Retry opening the engine when encountering a special error
### _Why are the changes needed?_

to close #3615

steps to reproduce

1. start kyuubi server
2. connect to the kyuubi server with client beeline and run query `select 1`
3. force kill the spark application
4. connect to the kyuubi server with another client **A** immediately

```
Error: org.apache.kyuubi.KyuubiSQLException: Error operating LaunchEngine: org.apache.thrift.transport.TTransportException: java.net.ConnectException: Connection refused (Connection refused)
        at org.apache.thrift.transport.TSocket.open(TSocket.java:226)
        at org.apache.thrift.transport.TSaslTransport.open(TSaslTransport.java:266)
        at org.apache.thrift.transport.TSaslClientTransport.open(TSaslClientTransport.java:37)
        at org.apache.kyuubi.client.KyuubiSyncThriftClient$.createTProtocol(KyuubiSyncThriftClient.scala:466)
        at org.apache.kyuubi.client.KyuubiSyncThriftClient$.createClient(KyuubiSyncThriftClient.scala:482)
        at org.apache.kyuubi.session.KyuubiSessionImpl.$anonfun$openEngineSession$1(KyuubiSessionImpl.scala:128)
        at org.apache.kyuubi.session.KyuubiSessionImpl.$anonfun$openEngineSession$1$adapted(KyuubiSessionImpl.scala:113)
        at org.apache.kyuubi.ha.client.DiscoveryClientProvider$.withDiscoveryClient(DiscoveryClientProvider.scala:36)
        at org.apache.kyuubi.session.KyuubiSessionImpl.openEngineSession(KyuubiSessionImpl.scala:113)
        at org.apache.kyuubi.operation.LaunchEngine.$anonfun$runInternal$2(LaunchEngine.scala:60)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.net.ConnectException: Connection refused (Connection refused)
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
        at java.net.Socket.connect(Socket.java:589)
        at org.aache.thrift.transport.TSocket.open(TSocket.java:221)
        ... 14 more (state=,code=0)
```

If the engine exits without calling the shutdown hook, the ZNODE with EPHEMERAL_SEQUENTIAL mode will be deleted upon the client's disconnect, and note that the engine will be marked as disconnected after `kyuubi.zookeeper.embedded.max.session.timeout` (the default value is 1 minutes)

This PR retries opening the engine when encountering a specialty exception (java.net.ConnectException). Before this PR, client **A** will throw an exception, after this PR, client **A** will work properly.

### _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 #3618 from cfmcgrady/kyuubi-3615.

Closes #3615

96acd66b [Fu Chen] address comment
a1395a60 [Fu Chen] fix style
870216d1 [Fu Chen] Retry opening the engine when encountering a special error

Authored-by: Fu Chen <cfmcgrady@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-10-20 14:31:35 +08:00
jiaoqingbo
17df2428e6
[KYUUBI #3640] Change the default event logger description of hive and trino to json instead of spark
### _Why are the changes needed?_

fix #3640

### _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 #3641 from jiaoqingbo/kyuubi3640.

Closes #3640

c1b2d4a6 [jiaoqingbo] code review
a65bc132 [jiaoqingbo] code review
ab04f135 [jiaoqingbo] [KYUUBI #3640] Change the default event logger description of hive and trino to json instead of spark

Authored-by: jiaoqingbo <1178404354@qq.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-10-19 17:32:00 +08:00
Luning Wang
9d0b6909db
[KYUUBI #3621][DOCS] Add a hint in create batch REST api
### _Why are the changes needed?_

Add a hint in creating batch REST 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

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

Closes #3622 from deadwind4/create-batch-rest-doc.

Closes #3621

0d1e6764 [Luning Wang] [KYUUBI #3621][DOCS] Add a hint in create batch REST api

Authored-by: Luning Wang <wang4luning@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-10-19 00:25:09 +08:00
Luning Wang
797957629d
[KYUUBI #3611][DOCS] Add session resource REST docs
### _Why are the changes needed?_
Add session resource REST docs in `rest_api.md`

### _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 #3642 from deadwind4/session-rest-doc.

Closes #3611

3d8e5e6b [Luning Wang] Fix wrong description
8a1372a5 [Luning Wang] [KYUUBI #3611][DOCS] Add session resource REST docs

Authored-by: Luning Wang <wang4luning@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-10-19 00:22:07 +08:00
ulysses-you
2acee9ea97
[KYUUBI #3601] [SPARK] Support infer columns for rebalance and sort
### _Why are the changes needed?_

Improve the rebalance before writing rule.

The rebalance before writing rule adds a rebalance at the top of query for data writing command, however the default partitioning of rebalance uses RoundRobinPartitioning which would break the original partitioning of data. It may cause the the output data size bigger than before.

This pr supports infer the columns from join and aggregate for rebalance and sort to improve the compression ratio.

Note that, this improvement only works for static partition writing.

### _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 #3601 from ulysses-you/smart-order.

Closes #3601

c190dc1a [ulysses-you] docs
995969b5 [ulysses-you] view
ea23c417 [ulysses-you] Support infer columns for rebalance and sort

Authored-by: ulysses-you <ulyssesyou18@gmail.com>
Signed-off-by: ulysses-you <ulyssesyou@apache.org>
2022-10-17 18:13:50 +08:00
胡安忠
b268fcee62
[KYUUBI #3596] [DOCS]update plan only execution mode doc
### _Why are the changes needed?_

        it seems Flink engine is also supported

_Originally posted in https://github.com/apache/incubator-kyuubi/pull/3557#discussion_r984316871_

### _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/25081842/194746011-888752ca-f096-4b98-b5d8-e1a118e97268.png)

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

Closes #3596 from CauchyHu/update-plan-only-doc.

Closes #3596

56247b9f [胡安忠] [DOCS]revise uppercase and lowercase
1e41a924 [胡安忠] [DOCS]update parameters values
295065d1 [胡安忠] [DOCS]update plan only execution mode doc

Authored-by: 胡安忠 <huanzhong@xiaomi.com>
Signed-off-by: ulysses-you <ulyssesyou@apache.org>
2022-10-10 19:21:23 +08:00
Cheng Pan
2cb34c4d00
[KYUUBI #3597] Engine should prefer ip for registering on K8s cluster mode
### _Why are the changes needed?_

When Kyuubi runs outside of K8s, and w/o enhanced DNS infrastructure, Kyuubi can not access the Pod by using the hostname of Pod, it blocks the user to run Spark on K8s w/ cluster mode out-of-box.

Kyuubi provided a configuration `kyuubi.frontend.connection.url.use.hostname`, turn it off could address this issue, but we can not change the default value globally because of https://github.com/apache/incubator-kyuubi/issues/2266

To improve user experience, we can detect if the Driver is running inside the Pod, and if yes,
change `kyuubi.frontend.connection.url.use.hostname` default value to `false`.

Close #3578

### _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 #3597 from pan3793/k8s.

Closes #3597

8b411781 [Cheng Pan] doc
0df15e79 [Cheng Pan] Engine should prefer to use ip for registing on K8s cluster mode

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-10-10 12:04:41 +08:00
Yikf
612a82e00c
[KYUUBI #3531] [FOLLOWUP] Fix malforme format in hive connector doc
### _Why are the changes needed?_

This pr aims to fix malforme format in hive connector doc.

### _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 #3587 from Yikf/doc-follow.

Closes #3531

e6238f6f [Yikf] fix

Authored-by: Yikf <yikaifei1@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-10-02 23:49:01 +08:00
Fu Chen
bb50c52c2f
[KYUUBI #3545][KYUUBI #3563] Support restrict spark configurations
### _Why are the changes needed?_

ban end-user from security settings

### _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 #3564 from cfmcgrady/kyuubi-3563.

Closes #3545

Closes #3563

9d912b11 [Fu Chen] rename
ee44f7df [Fu Chen] fix ci
158f1552 [Fu Chen] address comment
3cbf4794 [Fu Chen] doc
0125a862 [Fu Chen] address comment
e4e554f5 [Kent Yao] Update extensions/spark/kyuubi-spark-authz/src/main/scala/org/apache/kyuubi/plugin/spark/authz/ranger/AuthzConfigurationCheckExtension.scala
a8d35efa [Fu Chen] ban end-user from security settings

Lead-authored-by: Fu Chen <cfmcgrady@gmail.com>
Co-authored-by: Kent Yao <yao@apache.org>
Signed-off-by: Kent Yao <yao@apache.org>
2022-09-30 15:43:58 +08:00
Luning Wang
94d2649a86
[KYUUBI #3083][DOC] Add a doc of Iceberg for Hive SQL engine
### _Why are the changes needed?_

Add a doc of Iceberg for Hive SQL engine

### _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 #3580 from deadwind4/iceberg-hive-doc.

Closes #3083

505b84ea [Luning Wang] [KYUUBI #3083][DOC] Add a doc of Iceberg for Hive SQL engine

Authored-by: Luning Wang <wang4luning@gmail.com>
Signed-off-by: Kent Yao <yao@apache.org>
2022-09-30 15:38:36 +08:00
yikf
12a85fe337
[KYUUBI #3512] Use dedicated ExecutionContext for EventBus async execution
### _Why are the changes needed?_

Fix https://github.com/apache/incubator-kyuubi/issues/3512

Currently, Kyuubi EventBus uses `scala.concurrent.ExecutionContext.Implicits.global` to execute async event handler. Generally, it's discouraged to use that global ec, instead, we should create dedicated ec for each workload, this pr aims to use dedicated ExecutionContext for EventBus async execution

### _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 #3524 from Yikf/ec.

Closes #3512

9757372d [yikf] Use dedicated ExecutionContext for EventBus async execution

Authored-by: yikf <yikaifei1@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-09-28 13:56:48 +08:00
胡安忠
c77900f47a
[KYUUBI #3557] [DOCS] Add documents for Kyuubi client advanced features plan_only.md
### Code of Conduct
 - [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)

### _Why are the changes needed?_

Documents for Kyuubi client advanced features plan_only.md

### _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/25081842/192269137-76bff685-b18b-4ec4-b7aa-58ebf3e63c68.png)
- [x] [Run test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #3557 from CauchyHu/plan-only-doc.

Closes #3557

084ce5dd [胡安忠] [DOCS]update documents for Kyuubi client advanced features plan_only.md
75ec33d3 [胡安忠] [DOCS] Add documents for Kyuubi client advanced features plan_only.md

Authored-by: 胡安忠 <huanzhong@xiaomi.com>
Signed-off-by: ulysses-you <ulyssesyou@apache.org>
2022-09-28 12:05:52 +08:00
ulysses-you
00aa49c5c0
[KYUUBI #3562] Fix the outdate docs index
### _Why are the changes needed?_

change kerberized_kyuubi to kerberos since the docs file name is kerberos.md

### _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 #3562 from ulysses-you/fix-docs.

Closes #3562

615c7fcf [ulysses-you] docs

Authored-by: ulysses-you <ulyssesyou18@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-09-27 19:59:46 +08:00
yikf
97a50acb18
[KYUUBI #3531] [DOC] Add documentation for Hive connector
### _Why are the changes needed?_

Fix https://github.com/apache/incubator-kyuubi/issues/3531

This pr aims to add documentation for Hive connector

### _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 #3532 from Yikf/hive-doc.

Closes #3531

e10a98b2 [yikf] Add documentation for Hive connector

Authored-by: yikf <yikaifei1@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-09-26 16:18:51 +08:00
Bowen Liang
eb04c7f2ef
[KYUUBI #3406] [FOLLOWUP] Add create datasource table DDL usage to Pyspark docs
### _Why are the changes needed?_

Following #3406 , fixing spelling mistakes  and  adding new DDL usage for jdbc source in  PySpark client docs.

### _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 #3552 from bowenliang123/pyspark-docs-improve.

Closes #3406

eb05a302 [Bowen Liang] add docs for using as JDBC Datasource table with DDL. and minor spelling fix.

Authored-by: Bowen Liang <liangbowen@gf.com.cn>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-09-26 15:13:22 +08:00
Bowen Liang
f1c49bb75c
[KYUUBI #3406] [Subtask] [Doc] Add PySpark client docs
### _Why are the changes needed?_

close #3406.

Add PySpark client docs.

### _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 #3407 from bowenliang123/3406-pyspark-docs.

Closes #3406

a181a5ba [Bowen Liang] nit
fb0cfcdf [Bowen Liang] nit
378ca025 [Bowen Liang] nit
70b007a8 [Bowen Liang] update docs of including jdbc jars
170a3b4b [liangbowen] nit
ebb56e14 [liangbowen] add pyspark link to python page
76bef457 [liangbowen] add start shell docs for adding jars
65d8dbf9 [liangbowen] add docs
c55d3ae2 [Bowen Liang] update jdbc usage sample
692197e0 [Bowen Liang] init pyspark client docs

Lead-authored-by: Bowen Liang <liangbowen@gf.com.cn>
Co-authored-by: liangbowen <liangbowen@gf.com.cn>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-09-24 23:37:30 +08:00
HYBG
78f5865599
[KYUUBI #3502] [DOCS] Fix typo and use beeline provided by Kyuubi
1. Fix typo ${SPAAK_HOME}
2. Change ${SPAAK_HOME} to ${KYUUBI_HOME}

Closes #3502 from HYBG-1126/master.

Closes #3502

acf43e08 [海洋饼干] 更新文档docs/deployment/kyuubi_on_kubernetes.md 1、61行${SPAAK_HOME}为${SPARK_HOME} 2、91、96行,${SPAAK_HOME}应为${KYUUBI_HOME}

Lead-authored-by: HYBG <hybg1126@outlook.com>
Co-authored-by: 海洋饼干 <hybg1126@outlook.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-09-16 19:41:04 +08:00
Bowen Liang
1a9bf93051
[KYUUBI #3487] Provide Hive JDBC Dialect support for Spark/PySpark to connect Kyuubi via JDBC Source
…and register to JdbcDialects

### _Why are the changes needed?_

close #3487 .

1. add kyuubi-extension-spark-client_2.12 module, and introduce KyuubiSparkClientExtension
2. implement HiveDialect and register to JdbcDialects

### _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 #3489 from bowenliang123/3487-hive-jdbc-dialect.

Closes #3487

3ed8be75 [Bowen Liang] nit
47be0ba6 [Bowen Liang] update docs for hive jdbc dialect
84623a35 [Bowen Liang] update pom in minor details
b7edc6cf [Bowen Liang] add ut
968bb722 [Bowen Liang] move to package org.apache.spark.sql.dialect
03eab323 [Bowen Liang] renamed to kyuubi-extension-spark-jdbc-dialect module and moved to extensions/spark
9a4eaf44 [Bowen Liang] add kyuubi-extension-spark-client_2.12 module, implement HiveDialect and register to JdbcDialects

Authored-by: Bowen Liang <liangbowen@gf.com.cn>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-09-16 10:29:39 +08:00
yikf
4de12cdb6f
[KYUUBI #3449] Change default server info provider to ENGINE
### _Why are the changes needed?_

close https://github.com/apache/incubator-kyuubi/issues/3449, this pr aims to change `kyuubi.server.info.provider` default value to "ENGINE", and modify corresponding tests.

### _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 #3476 from Yikf/default-server-info.

Closes #3449

bc474d3b [Cheng Pan] Update docs/deployment/migration-guide.md
23e7690e [yikf] Change default server info provider to ENGINE

Lead-authored-by: yikf <yikaifei1@gmail.com>
Co-authored-by: Cheng Pan <pan3793@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-09-14 10:32:53 +08:00
yikf
3905225aeb
[KYUUBI #3423] Bump Flink from 1.15.1 to 1.15.2
### _Why are the changes needed?_

close https://github.com/apache/incubator-kyuubi/issues/3423

### _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 #3475 from Yikf/bump-flink.

Closes #3423

dfaaf887 [yikf] Bump flink

Authored-by: yikf <yikaifei1@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-09-11 21:30:27 +08:00
Min
c79775036b
[KYUUBI #3179] Add custom event handler docs
### _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 #3179 from zhaomin1423/custom_event_doc.

Closes #3179

9456c997 [Xiao Zhao] fix
2e6f3030 [Xiao Zhao] fix
c13bdb5b [Min] update
ff88386e [Min] fix
38a5708d [Min] Add custom event handler docs

Lead-authored-by: Min <zhaomin1423@163.com>
Co-authored-by: Xiao Zhao <zhaomin1423@163.com>
Signed-off-by: ulysses-you <ulyssesyou@apache.org>
2022-09-09 10:00:27 +08:00
Min
9440d1b708
[KYUUBI #3309] Add configs of engine event logger for each engine
### _Why are the changes needed?_

The default value of kyuubi.engine.event.loggers is SPARK, but it can't be used outside the spark engine, so we add the config for each engines.
### _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 #3309 from zhaomin1423/add_engine_logger_conf.

Closes #3309

37b3c05f [Xiao Zhao] fix
b22356f2 [Min] fix typo
431bb02b [Min] update settings.md
44475f46 [Min] Add configs of engine event logger for each engine

Lead-authored-by: Min <zhaomin1423@163.com>
Co-authored-by: Xiao Zhao <zhaomin1423@163.com>
Signed-off-by: ulysses-you <ulyssesyou@apache.org>
2022-09-09 09:58:50 +08:00
Cheng Pan
29caadb2ba Revert "[KYUUBI #3020] kyuubi ldap add new config property kyuubi.authentication.ldap.bindpw and kyuubi.authentication.ldap.attrs"
This reverts commit 5d88c7b207.
2022-09-08 08:59:50 +00:00
Cheng Pan
6a90b3e824 [KYUUBI #3122] GetInfo supports return server/engine info
### _Why are the changes needed?_

Workaround for #3032, close #3323

There are known some ODBC drivers e.g. [Databricks ODBC driver](https://www.databricks.com/spark/odbc-drivers-download) depending on `TGetInfoType.CLI_DBMS_VER` and `TGetInfoType.CLI_DBMS_NAME` to check server compatibilities and abilities.

This PR proposes to introduce a new configuration `kyuubi.server.info.provider=SERVER/ENGINE` to make GetInfo support return either server or engine information.

Since beeline will call GetInfo in the initialization phase, to make sure the beeline fast open experience, in async launch mode, when the engine is not ready, return server info regardless `kyuubi.server.info.provider`.

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

Testing w/ PowerBI

![image](https://user-images.githubusercontent.com/26535726/188945975-0d0fc95c-f989-4025-ad7d-c024e23ec328.png)

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

Closes #3122 from pan3793/info.

Closes #3122

742bdbe3 [Cheng Pan] nit
bb85d2ba [Cheng Pan] style
fd75238c [Cheng Pan] fix
9ddb2afd [Cheng Pan] nit
fd8f7979 [Cheng Pan] fix ut
840205e5 [Cheng Pan] nit
f9996d53 [Cheng Pan] GetInfo supports returning engine info

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-09-08 02:14:38 +00:00