Commit Graph

619 Commits

Author SHA1 Message Date
fwang12
52d3bf25ed [KYUUBI #4889] Admin command line supports list server command
### _Why are the changes needed?_

Support to list server with kyuubi-admin/kyuubi rest client.

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

- UT for AdminRestAPI
- UT for AminCtlArgument
- UT for AdminCtl

- [ ] Add screenshots for manual tests if appropriate

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

Closes #4889 from turboFei/list_server.

Closes #4889

bfd13fbde [fwang12] nit
0a0131552 [fwang12] list server

Authored-by: fwang12 <fwang12@ebay.com>
Signed-off-by: fwang12 <fwang12@ebay.com>
2023-05-28 09:32:23 +08:00
mans2singh
974fa73cac
[KYUUBI #4864] [DOCS] Fix grammar in HA section
### _Why are the changes needed?_
The upgrade section states <code>Kyuubi server supports **stop** gracefully</code>.  Update to <code>Kyuubi server supports **stopping** gracefully</code>

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

- [ ] Add screenshots for manual tests if appropriate

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

Closes #4864 from mans2singh/ISSUE-4863.

Closes #4864

5e853f84e [mans2singh] Updated key features section

Authored-by: mans2singh <mans2singh@yahoo.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2023-05-21 22:26:17 +08:00
liangbowen
d73ec64b37 [KYUUBI #4733] Introduce Kafka event logger for server events
### _Why are the changes needed?_

- introduce new event logger type `KAFKA`
- send server events to the Kafka topic with initializing and closing Kafka producer properly with server's lifecyle
- use Kafka 3.4.0 as the client version, and tested with Kakfa servers of 2.8.x and 3.4.x

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

- [ ] Add screenshots for manual tests if appropriate

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

Closes #4733 from bowenliang123/kafka-logger.

Closes #4733

b5220d234 [liangbowen] introduce kafka server event logger

Authored-by: liangbowen <liangbowen@gf.com.cn>
Signed-off-by: liangbowen <liangbowen@gf.com.cn>
2023-05-08 22:45:52 +08:00
fwang12
6ae0c8b141 [KYUUBI #4801] Using different engine submit timeout config for kubernetes and yarn
### _Why are the changes needed?_

We shall use different engine submit timeout for different resource manager.

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

- [ ] Add screenshots for manual tests if appropriate

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

Closes #4801 from turboFei/engine_submit_timeout.

Closes #4801

e34852a64 [fwang12] nit
ad69008e7 [fwang12] 1.7.2
db11330c5 [fwang12] save

Authored-by: fwang12 <fwang12@ebay.com>
Signed-off-by: fwang12 <fwang12@ebay.com>
2023-05-08 15:05:47 +08:00
Paul Lin
71d680bef7
[KYUUBI #4742][DOCS] Add docs for Flink application mode
### _Why are the changes needed?_
As titled.

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

- [ ] Add screenshots for manual tests if appropriate

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

Closes #4782 from link3280/KYUUBI-4742.

Closes #4742

10d33dc1d [Cheng Pan] Update docs/deployment/engine_on_yarn.md
268f9e008 [Cheng Pan] Update docs/deployment/engine_on_yarn.md
f5f55be8d [Paul Lin] [KYUUBI #4742][docs] Address comments
077b08c9b [Paul Lin] [KYUUBI #4742][docs] Apply spotless
9df25c1b2 [Paul Lin] [KYUUBI #4742][docs] Improve languages
ad367df52 [Paul Lin] [KYUUBI #4742][docs] Improve docs
6c0462493 [Paul Lin] [KYUUBI #4742][docs] Improve languages
865a4b518 [Paul Lin] [KYUUBI #4742][docs] Improve languages
79a4da217 [Paul Lin] [KYUUBI #4742][docs] Update docs
bdc88949a [Paul Lin] [KYUUBI #4742][docs] Apply spotless
134e3a7fa [Paul Lin] [KYUUBI #4742][docs] Reformat table
cde778ef5 [Paul Lin] [KYUUBI #4742][docs] Add docs for Flink application mode

Lead-authored-by: Paul Lin <paullin3280@gmail.com>
Co-authored-by: Cheng Pan <pan3793@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2023-05-02 16:59:15 +08:00
Kent Yao
5032901dfc
[KYUUBI #4768] [INFRA] Guidelines for Document and Code contributions
### _Why are the changes needed?_

Guidelines for Document and Code Contributions.

- code style
- documentation style
- quick starts
- sphinx-copybutton for copy button in code blocks
- add kind:minor,help wanted,good first issue to doc issue template

### _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="1325" alt="image" src="https://user-images.githubusercontent.com/8326978/234193368-473e2a1d-2deb-4d91-901a-19cea58a489b.png">

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

Closes #4768 from yaooqinn/guide.

Closes #4768

3a0bd395b [Kent Yao] Update docs/contributing/doc/build.rst
8fe4f6d14 [Kent Yao] Update docs/contributing/doc/build.rst
a753bdde5 [Kent Yao] Guidelines for Document and Code contributions
f8393fe8d [Kent Yao] Guidelines for Document and Code contributions
8f2d3ce82 [Kent Yao] Guidelines for Document and Code contributions
4f3a2128b [Kent Yao] Guidelines for Document and Code contributions

Authored-by: Kent Yao <yao@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2023-04-27 19:58:10 +08:00
Cheng Pan
e1e57e5233
[KYUUBI #4763] [DOCS] Fix the Kyuubi JDBC kerberos parameters
### _Why are the changes needed?_

The Kerberos-related parameters in Kyuubi JDBC driver are

- `kyuubiClientPrincipal`
- `kyuubiClientKeytab`
- `principal`. Since 1.7.0, `kyuubiServerPrincipal` is added as an alias

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

- [ ] Add screenshots for manual tests if appropriate

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

Closes #4763 from pan3793/kerberos-doc.

Closes #4763

7400e3a08 [Cheng Pan] nit
021c73174 [Cheng Pan] nit
337fb1229 [Cheng Pan] fix
4c4907bc8 [Cheng Pan] fix
d2478eeb7 [Cheng Pan] nit
3b0899d3e [Cheng Pan] nit
8dfdb6bde [Cheng Pan] [DOCS] Fix the Kyuubi JDBC kerberos parameters

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2023-04-25 02:16:28 +08:00
Cheng Pan
7b97d2fa41
[KYUUBI #4655][DOCS][FOLLOWUP] Recover the missing JDBC URL
### _Why are the changes needed?_

Before:
<img width="835" alt="image" src="https://user-images.githubusercontent.com/26535726/233932083-3a96a48d-bcef-40c7-bef0-07f52c9bad01.png">

After:
<img width="813" alt="image" src="https://user-images.githubusercontent.com/26535726/233932630-5a87d3f4-c1d6-4076-b3a3-fd56c098b07f.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

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

Closes #4759 from pan3793/4655.

Closes #4655

911944d28 [Cheng Pan] fix
1cc9d9591 [Cheng Pan] [KYUUBI #4655][DOCS][FOLLOWUP] Recover the missing code-block

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2023-04-24 15:55:03 +08:00
wforget
19d5a9a371
[KYUUBI #4641] Add MaxFileSizeStrategy to limit max scan file size
### _Why are the changes needed?_

Add MaxFileSizeStrategy to limit max scan file size.
close #4641

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

- [ ] Add screenshots for manual tests if appropriate

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

Closes #4642 from wForget/KYUUBI-4641.

Closes #4641

14a680f8e [wforget] comment
d2a393d97 [wforget] comment
b1ef4c52c [wforget] fix
d9e94bd8e [wforget] fix style
8a9121131 [wforget] use optional value
094eb61e3 [wforget] combine
89e2cb4d0 [wforget] [KYUUBI-4641] Add MaxFileSizeStrategy to limit max scan file size

Authored-by: wforget <643348094@qq.com>
Signed-off-by: ulyssesyou <ulyssesyou@apache.org>
2023-04-23 17:51:44 +08:00
Cheng Pan
609018a6b2
[KYUUBI #4727] [DOC] kyuubi-spark-lineage has no transitive deps
### _Why are the changes needed?_

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

Closes #4727 from pan3793/lineage-doc.

Closes #4727

b6843b282 [Cheng Pan] [DOC] kyuubi-spark-lineage has no transitive deps

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: odone <odone.zhang@gmail.com>
2023-04-19 17:48:14 +08:00
liangbowen
2c2f6f9e93 [KYUUBI #4734] [Docs] Fix typo in docs of custom event handler
### _Why are the changes needed?_

- to fix typo in dependency reference in doc of custom event handler

![image](https://user-images.githubusercontent.com/1935105/233002453-76b04fc1-72a2-4171-b39f-05e558970c4f.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

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

Closes #4734 from bowenliang123/fix-event-doc.

Closes #4734

470c6d1a8 [Bowen Liang] Update docs/extensions/server/events.rst
afbe163b3 [liangbowen] use the `release` directive
1a5542f54 [liangbowen] fix doc of custom event handler

Lead-authored-by: liangbowen <liangbowen@gf.com.cn>
Co-authored-by: Bowen Liang <liangbowen@gf.com.cn>
Signed-off-by: liangbowen <liangbowen@gf.com.cn>
2023-04-19 15:48:09 +08:00
Cheng Pan
a4cdb26ca7
[KYUUBI #4367][DOCS][FOLLOWUP] Kyuubi requires Flink 1.16/1.17
### _Why are the changes needed?_

Kyuubi requires Flink 1.16/1.17 now

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

- [ ] Add screenshots for manual tests if appropriate

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

Closes #4723 from pan3793/flink-1.17.

Closes #4367

1e64dcbf1 [Cheng Pan] [KYUUBI #4367][DOCS][FOLLOWUP] Kyuubi requries Flink 1.16/1.17

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2023-04-17 23:02:18 +08:00
Cheng Pan
b3dc4f8e30
[KYUUBI #4722] [DOCS] Kyuubi requires Spark 3.1 and above now
### _Why are the changes needed?_

Kyuubi requires Spark 3.1 and above since 1.7.0

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

- [ ] Add screenshots for manual tests if appropriate

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

Closes #4722 from pan3793/spark-3.1.

Closes #4722

e2b4c9ca2 [Cheng Pan] [DOCS] Kyuubi requires Spark 3.1 and above now

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2023-04-17 20:44:21 +08:00
Cheng Pan
8d0b3ff50c
[KYUUBI #4387][DOCS][FOLLOWUP] Update Flink version requirements
### _Why are the changes needed?_

Update docs to mention that Kyuubi requires Flink 1.15+ now

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

- [ ] Add screenshots for manual tests if appropriate

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

Closes #4721 from pan3793/doc.

Closes #4387

4fdd9082b [Cheng Pan] [KYUUBI #4387][DOCS][FOLLOUP] Update Flink version requirements

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2023-04-17 20:26:12 +08:00
liangbowen
52251ddae2 [KYUUBI #4677] [AUTHZ] Check generated policy file in test suite
### _Why are the changes needed?_

- add ut to check generated Ranger policy file in #4585
- manually activated `genpolicy` profile in CI builds, as the property based activation not auto-triggered  as expectedly with property `ranger.version=2.4.0` set in project parent pom
- Support regenerated policy file within the same test suite, by running
`KYUUBI_UPDATE=1 build/mvn clean test -pl :kyuubi-spark-authz_2.12 -Dtest=none -DwildcardSuites=org.apache.kyuubi.plugin.spark.authz.gen.PolicyJsonFileGenerator -Pgenpolicy`

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

- [ ] Add screenshots for manual tests if appropriate

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

Closes #4677 from bowenliang123/authz-check-policy-gen.

Closes #4677

a372bdfd4 [liangbowen] remove unnecessary profile used in style workflow
7562c88f2 [liangbowen] include in spotless
37b674223 [liangbowen] update policy id
724ec5e28 [liangbowen] replace counter by using zipWithIndex
d322980e7 [liangbowen] extract KRangerPolicyResource object to simplify resource assembly
42c37606a [liangbowen] nit
18a8f4c51 [liangbowen] add usage comments
4ee254d6d [liangbowen] fix issue name in docs
d3cb08d21 [liangbowen] improve file reading
37e4c9c9f [Bowen Liang] Merge branch 'master' into authz-check-policy-gen
6366c50e4 [liangbowen] rename profile to `gen-policy` and remove activation rule by property setting
892faf5ef [liangbowen] update clue
266baa71a [liangbowen] update
cb94e8014 [liangbowen] update
de1f36531 [liangbowen] cleanup
e88c75d46 [liangbowen] check policy file gen

Lead-authored-by: liangbowen <liangbowen@gf.com.cn>
Co-authored-by: Bowen Liang <bowenliang@apache.org>
Signed-off-by: liangbowen <liangbowen@gf.com.cn>
2023-04-13 16:08:32 +08:00
ulysses-you
f0615a9aab
[KYUUBI #4683] Update spark.sql.finalWriteStage.resourceIsolation.enabled version
### _Why are the changes needed?_

fix the wrong version

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

- [ ] Add screenshots for manual tests if appropriate

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

Closes #4683 from ulysses-you/followup.

Closes #4683

8e5d46fda [ulysses-you] update version

Authored-by: ulysses-you <ulyssesyou18@gmail.com>
Signed-off-by: ulyssesyou <ulyssesyou@apache.org>
2023-04-10 16:47:28 +08:00
liangbowen
d7532c5fd5 [KYUUBI #4615] Bump Ranger from 2.3.0 to 2.4.0
### _Why are the changes needed?_

To close #4615
- bump Ranger version to 2.4.0, release notes: https://cwiki.apache.org/confluence/display/RANGER/Apache+Ranger+2.4.0+-+Release+Notes
- #4585 fixed duplication and conflict in policy file
- update 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.readthedocs.io/en/master/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #4675 from bowenliang123/ranger-2.4.0.

Closes #4615

d403bc324 [liangbowen] bump ranger from 2.3.0 to 2.4.0

Authored-by: liangbowen <liangbowen@gf.com.cn>
Signed-off-by: liangbowen <liangbowen@gf.com.cn>
2023-04-10 13:12:34 +08:00
ulysses-you
91a2ab3665
[KYUUBI #4678] Improve FinalStageResourceManager kill executors
### _Why are the changes needed?_

This pr change two things:
1. add a config to kill executors if the plan contains table caches. It's not always safe to kill executors if the cache is referenced by two write-like plan.
2. force adjustTargetNumExecutors when killing executors. YarnAllocator` might re-request original target executors if DRA has not updated target executors yet. Note, DRA would re-adjust executors if there are more tasks to be executed, so we are safe. It's better to adjuest target num executor once we kill executors.

### _How was this patch tested?_
These issues are found during my POC

Closes #4678 from ulysses-you/skip-cache.

Closes #4678

b12620954 [ulysses-you] Improve kill executors

Authored-by: ulysses-you <ulyssesyou18@gmail.com>
Signed-off-by: ulyssesyou <ulyssesyou@apache.org>
2023-04-10 11:41:37 +08:00
Paul Lin
b315123a6b
[KYUUBI #1652] Support Flink yarn application mode
### _Why are the changes needed?_
Flink yarn application mode is crucial for the production usage of Flink engine.

To test this PR locally, we should:

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

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

- [ ] Add screenshots for manual tests if appropriate

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

Closes #4604 from link3280/KYUUBI-1652.

Closes #1652

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

Authored-by: Paul Lin <paullin3280@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2023-04-07 18:51:48 +08:00
liangbowen
794ba2bba4 [KYUUBI #4672][Authz] Remove Support for Apache Ranger 0.6.0
### _Why are the changes needed?_

As issue [RANGER-4672](https://github.com/apache/kyuubi/issues/4672) reported unresovled failures on Ranger 0.6.0, update docs for unsupported Ranger version 0.6.0.

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

- [ ] Add screenshots for manual tests if appropriate

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

Closes #4673 from bowenliang123/drop-ranger-0.6.0.

Closes #4672

5049596c0 [liangbowen] update README.md
f9ea53449 [liangbowen] drop support for Ranger 0.6.0

Authored-by: liangbowen <liangbowen@gf.com.cn>
Signed-off-by: liangbowen <liangbowen@gf.com.cn>
2023-04-07 13:42:18 +08:00
Cheng Pan
a947dcb792
[KYUUBI #4655] [DOCS] Enrich docs for Kyuubi Hive JDBC driver
### _Why are the changes needed?_

Update the outdated words for Kyuubi Hive JDBC driver, and supply more details about Kerberos authentication.

### _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="1400" alt="image" src="https://user-images.githubusercontent.com/26535726/229476374-d662c3b2-c1bc-44e9-a717-92f401586feb.png">

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

Closes #4655 from pan3793/docs-v2.

Closes #4655

9d2cb4875 [Cheng Pan] Update docs/quick_start/quick_start_with_jdbc.md
00af58e27 [Cheng Pan] address comments
48bf21664 [Cheng Pan] Update docs/quick_start/quick_start_with_jupyter.md
054e2bea0 [Cheng Pan] nit
a0a80b818 [Cheng Pan] nit
41ff97de3 [Cheng Pan] [DOCS] Enrich docs for Kyuubi Hive JDBC Driver

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2023-04-03 18:51:27 +08:00
zwangsheng
d9e14f239d
[KYUUBI #4623][K8S] KubernetesApplicationOperation uses Informer instead of list
### _Why are the changes needed?_

Close #4623

To reduce the pressure on the Api Server (which use the kubernetes client polls with label to find the `spark driver pod` when multiple Rest Application are running at the same time), use informer, the kubernetes-recommended method of maintaining the application state.

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

- [ ] Add screenshots for manual tests if appropriate

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

Closes #4625 from zwangsheng/KYUUBI_4623.

Closes #4623

a415bef7f [Cheng Pan] nit
136d0db4d [Cheng Pan] 171
b5d3c237a [Cheng Pan] re-generate conf
bf14ad870 [Cheng Pan] nit
9ee7e04f9 [Cheng Pan] nit
301162ea0 [Cheng Pan] nit
1d426922b [Cheng Pan] nit
b95d7a650 [Cheng Pan] improve
cc8d2c7f4 [zwangsheng] fix comments
d017bafdf [zwangsheng] Set resycn 0
28f9a70d9 [zwangsheng] Reorder func & slow get app info
22d9c1662 [zwangsheng] fix setting
8e0940334 [zwangsheng] fix comments
10965d3df [zwangsheng] Rename fileter function => isSparkEnginePod
b02677154 [zwangsheng] rename
78c9fdb17 [zwangsheng] fix comments
6d31f70d1 [zwangsheng] Fix IT Test
f43bba2b9 [zwangsheng] fix
17e4f55eb [zwangsheng] debug
be8da790e [zwangsheng] debug
0db45a513 [zwangsheng] retest
a93786abc [zwangsheng] Fix style
652ee837e [zwangsheng] Add Setting & Debug
4add7e4e2 [zwangsheng] improve
1f4341237 [zwangsheng] remove unused import
35acd6106 [zwangsheng] fix compile
05dfc598e [zwangsheng] [KYUUBI #4623][Improvement][K8S] Remove cached app info when out of time
4ab530e99 [zwangsheng] [KYUUBI #4623][Improvement][K8S] kubernetesApplicationOperation Using Informer instead of list

Lead-authored-by: zwangsheng <2213335496@qq.com>
Co-authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2023-03-31 15:21:59 +08:00
fwang12
0fdf145e29 [KYUUBI #4639] Support to specify confOverlay when executing statement with RESTful API
### _Why are the changes needed?_

As title.

With this pr, customer can execute SCALA code with `confOverlay`.
```
kyuubi.operation.language=SCALA
```
execute PYTHON code with
```
kyuubi.operation.language=PYTHON
```
### _How was this patch tested?_
- [x] Add some test cases that check the changes thoroughly including negative and positive cases if possible

- [ ] Add screenshots for manual tests if appropriate

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

Closes #4639 from turboFei/init_scala.

Closes #4639

cdf828f9a [fwang12] add ut
f4f2bc883 [fwang12] doc
2fe8a1659 [fwang12] save
f840cb4d9 [fwang12] conf overlay
eb49537ea [fwang12] conf overlay

Authored-by: fwang12 <fwang12@ebay.com>
Signed-off-by: fwang12 <fwang12@ebay.com>
2023-03-30 19:13:49 +08:00
ulysses-you
9ca00c8aa7
[KYUUBI #4615] Support stage level schedule for final write stage
### _Why are the changes needed?_

Add a new rule `InjectCustomResourceProfile` to  support custom resource profile for final write stage.
It now supports executor configs:

```
executor core
executor memory
executor memory overhead
executor off heap memory
```

### _How was this patch tested?_

add test and manully test

<img width="778" alt="image" src="https://user-images.githubusercontent.com/12025282/226606147-82a29b8c-1a31-4842-97a7-fe702d80e190.png">

Closes #4615 from ulysses-you/resource-profile.

Closes #4615

852b207cd [ulysses-you] Support stage level schedule for final write stag

Authored-by: ulysses-you <ulyssesyou18@gmail.com>
Signed-off-by: ulyssesyou <ulyssesyou@apache.org>
2023-03-30 13:04:51 +08:00
maruilei
6d8fe6c381
[KYUUBI #4627] [Docs] Fix a typo in rest_api.md.
### _Why are the changes needed?_

`GET /batches/{batchId}` should be `GET /batches/${batchId}`

Affected versions 1.6/1.7/master

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

- [ ] Add screenshots for manual tests if appropriate

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

Closes #4627 from merrily01/master-typo.

Closes #4627

ac386f640 [maruilei] [Docs] Fix a typo in rest_api.md.

Authored-by: maruilei <maruilei@58.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2023-03-28 18:14:39 +08:00
Derick Cypho
1811c909e0
[KYUUBI #4624] [Docs] Fix table headers in kyuubi_vs_hive.md
### _Why are the changes needed?_

Fix the Markdown formatting for the table that demonstrates the difference between Kyuubi and HiveServer2.
The before table is as shown down below:
![image](https://user-images.githubusercontent.com/55829354/228123507-6ac2c7a9-d398-4e93-8315-a0a2b0df7287.png)
Document readability improvement.

Closes #4624 from DerickCypho/patch-1.

Closes #4624

4e9394a9c [Bowen Liang] Update docs/overview/kyuubi_vs_hive.md
a9935bfa2 [Bowen Liang] Update docs/overview/kyuubi_vs_hive.md
44c21e23e [Bowen Liang] Update docs/overview/kyuubi_vs_hive.md
776782590 [Bowen Liang] Update docs/overview/kyuubi_vs_hive.md
95b367e33 [DerickCypho] Fix table headers in kyuubi_vs_hive.md
6e42f9d8b [DerickCypho] Fix table headers for kyuubi_vs_hive.md
6684d2f46 [DerickCypho] Update kyuubi_vs_hive.md

Lead-authored-by: Derick Cypho <derickamaze@gmail.com>
Co-authored-by: Bowen Liang <bowenliang@apache.org>
Co-authored-by: DerickCypho <55829354+DerickCypho@users.noreply.github.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2023-03-28 16:40:35 +08:00
guanhua.lgh
932f7ab926
[KYUUBI #4614] [DOCS] Rename Flink Table Store to Apache Paimon (Incubating) in docs Connectors for Flink SQL Query Engine
### _Why are the changes needed?_

To update docs.
Rename Flink Table Store to Apache Paimon (Incubating) in docs `Connectors for Flink SQL Query 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

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

Closes #4614 from huage1994/docs3.

Closes #4614

50f8b2c6f [Kent Yao] Update docs/connector/flink/paimon.rst
2b34c4724 [guanhua.lgh] typos
7d6488351 [guanhua.lgh] [DOCS] Rename Flink Table Store to Apache Paimon (Incubating) in docs under `Connectors for Flink SQL Query Engine`

Lead-authored-by: guanhua.lgh <guanhua.lgh@alibaba-inc.com>
Co-authored-by: Kent Yao <yao@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2023-03-27 13:04:42 +08:00
Cheng Pan
5e541fa09f
[KYUUBI #4599] [DOCS] Simplify project version evaluation
### _Why are the changes needed?_

`build/mvn` is slow than `grep`, the change is aim to simplify and speed up the project version evaluation in `docs/conf.py`

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

- [ ] Add screenshots for manual tests if appropriate

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

```
(apache-kyuubi) ➜  docs git:(doc-beeline) ✗ python
Python 3.8.12 (default, Sep 17 2021, 20:21:14)
[Clang 12.0.0 (clang-1200.0.32.29)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import subprocess
>>> subprocess.getoutput("grep 'kyuubi-parent' -C1 ../pom.xml | grep '<version>' | awk -F '[<>]' '{print $3}'")
'1.8.0-SNAPSHOT'
>>>
```

Closes #4599 from pan3793/doc-version.

Closes #4599

7458aef5b [Cheng Pan] [DOCS] Simplify project version calculation

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2023-03-26 20:07:02 +08:00
guanhua.lgh
e6aab78f65
[KYUUBI #4607] [DOCS] Rename Flink Table Store to Apache Paimon (Incubating) in docs Connectors for Hive SQL Query Engine
### _Why are the changes needed?_

To update docs.
Rename Flink Table Store to Apache Paimon (Incubating) and update in docs under `Connectors for Hive SQL Query 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

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

Closes #4607 from huage1994/docss.

Closes #4607

695d83772 [guanhua.lgh]  [DOCS] Rename Flink Table Store to Apache Paimon (Incubating) and update in docs under  `Connectors for Hive SQL Query Engine`

Authored-by: guanhua.lgh <guanhua.lgh@alibaba-inc.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2023-03-26 18:30:22 +08:00
guanhua.lgh
8a526ced4a
[KYUUBI #4608] [DOCS] Rename Flink Table Store to Apache Paimon (Incubating) in docs Connectors for Trino SQL Query Engine
### _Why are the changes needed?_

To update docs.
This PR is tot rename Flink Table Store to Apache Paimon (Incubating)  in docs under `Connectors for Trino SQL Query 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

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

Closes #4608 from huage1994/docs2.

Closes #4608

61926b7c0 [guanhua.lgh] [DOCS] Rename Flink Table Store to Apache Paimon (Incubating)  in docs under `Connectors for Trino SQL Query Engine`

Authored-by: guanhua.lgh <guanhua.lgh@alibaba-inc.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2023-03-26 18:11:48 +08:00
ulysses-you
b8f452692a [KYUUBI #4592] Support eagerly kill redundant executors
### _Why are the changes needed?_

This pr adds a new rule `FinalStageResourceManager` to eagerly kill redundant executors

We first get the final stage partition which is the actually required cores, then kill the redundant executors. The priority of kill executors follow:
  1. kill executor who is younger than other (The older the JIT works better)
  2. kill executor who produces less shuffle data first

The reason why add this feature is that, if the previous stage contains lots executors but final stage has less, then the tasks of final stage would be scheduled randomly in all exists executors which may cause resource waste. e.g., each executor only run 1 or 2 tasks but holds 4 or 5 cores.

### _How was this patch tested?_
test manually

- test for the kill executor
<img width="755" alt="image" src="https://user-images.githubusercontent.com/12025282/227203809-9fe0731c-f97f-40d2-ac7f-b892a2a35289.png">

Closes #4592 from ulysses-you/eagerly-kill-executors.

Closes #4592

f35208bfd [ulysses-you] nit
ec627ee4f [ulysses-you] nit
28d4230f8 [ulysses-you] address comments
f2492cec6 [ulysses-you] nit
f44e48451 [ulysses-you] Support eagerly kill redundant executors

Authored-by: ulysses-you <ulyssesyou18@gmail.com>
Signed-off-by: ulyssesyou <ulyssesyou@apache.org>
2023-03-24 18:24:53 +08:00
Cheng Pan
e21ec213c5
[KYUUBI #4593] [DOCS] Keep promote the release step update-to-date
### _Why are the changes needed?_

Kyuubi website dropped the old way for update docs, we should update the docs to keep it reflect this change.

Ref: cbc7df1209 (diff-87c53e762995c279bfb9cba355186bc80fdf748d4cd29b3898d06368d7eeb99fR340)

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

- [ ] Add screenshots for manual tests if appropriate

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

Closes #4593 from pan3793/doc.

Closes #4593

0dfcd47e4 [Cheng Pan] [DOCS] Keep promote the release step update-to-date

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2023-03-24 14:53:53 +08:00
guanhua.lgh
3771dc9bf2
[KYUUBI #4583] [DOCS] Rename Flink Table Store to Apache Paimon (Incubating)
… `Connectors for Spark SQL Query Engine `

### _Why are the changes needed?_

To update docs.
Update Flink Table Store to Apache Paimon (Incubating) in docs `Connectors for Spark SQL Query 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

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

Closes #4583 from huage1994/docss-3067.

Closes #4583

5eaf76b84 [guanhua.lgh] [DOC] Update Flink Table Store  to Apache Paimon (Incubating) in docs `Connectors for Spark SQL Query Engine `

Authored-by: guanhua.lgh <guanhua.lgh@alibaba-inc.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2023-03-23 13:00:08 +08:00
Tianlin Liao
141919308e [KYUUBI #4523] support close engine session gracefully
### _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.readthedocs.io/en/master/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #4545 from lightning-L/kyuubi-4523.

Closes #4523

2ee634cd5 [Tianlin Liao] modify conf description; add test case
12b930456 [Tianlin Liao] refer to HIVE-13415
c8a9db6a2 [Tianlin Liao] minor fix
9942d2515 [Tianlin Liao] move logic to SessionManager.closeSession
62b990b3e [Tianlin Liao] [KYUUBI #4523] support close engine session gracefully

Authored-by: Tianlin Liao <tiliao@ebay.com>
Signed-off-by: fwang12 <fwang12@ebay.com>
2023-03-22 13:42:03 +08:00
wForget
c4f3195bd6 [KYUUBI #3929] Refactor lineage plugin to add LineageDispatcher
### _Why are the changes needed?_

Refactor lineage plugin to add LineageDispatcher.

close #3929

### _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 #3919 from wForget/dev-lineage-dispatcher.

Closes #3929

5df2aa2f [wforget] add doc
98683ebc [wforget] fix
7b97b2e0 [wForget] rebase
4b046868 [wForget] separate LineageDispatcherType class file
e14cf838 [wForget] Refactor lineage plugin to add LineageDispatcher

Lead-authored-by: wForget <643348094@qq.com>
Co-authored-by: wforget <643348094@qq.com>
Signed-off-by: ulyssesyou <ulyssesyou@apache.org>
2023-03-22 09:46:14 +08:00
Alex
e00f6b5bf4
[KYUUBI #4568] Make kyuubi-ctl doc enable variable 'release' automatic substitution
### _Why are the changes needed?_
Kyuubi-ctl doc kyuubi version not convert automatic. The version of doc is 1.8.0-SNAPSHOT, but  kyuubi version is 1.6.0-SNAPSHOT.

<img width="1911" alt="image" src="https://user-images.githubusercontent.com/43542750/226536654-23a28284-76ef-4c03-bb47-24146a92a94f.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
<img width="1920" alt="image" src="https://user-images.githubusercontent.com/43542750/226536803-08a6d89e-e6fd-4134-b438-052d87fdb0a3.png">

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

Closes #4568 from Kiss736921/optimize_ctl_doc.

Closes #4568

eb10a9e3b [Alex] Update docs/tools/kyuubi-ctl.rst
2006a59b3 [Alex] Update docs/tools/kyuubi-ctl.rst
2501e119f [Alex] convert kyuubi-ctl.md to kyuubi-ctl.rst to enable variable 'release' automatic substitution

Lead-authored-by: Alex <zoulimin@kanzhun.com>
Co-authored-by: Alex <43542750+Kiss736921@users.noreply.github.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2023-03-21 20:58:01 +08:00
liangbowen
301a05af59 [KYUUBI #4558] [CHAT] Make ChatGPT model ID configurable
### _Why are the changes needed?_

- Make ChatGPT model ID configurable

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

- [ ] Add screenshots for manual tests if appropriate

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

Closes #4558 from bowenliang123/chatgpt-model.

Closes #4558

63f8ee30d [liangbowen] nit
3012ccaaa [liangbowen] make chatgpt model configurable

Authored-by: liangbowen <liangbowen@gf.com.cn>
Signed-off-by: liangbowen <liangbowen@gf.com.cn>
2023-03-19 22:27:58 +08:00
sychen
6ded07974e
[KYUUBI #4548] Kyuubi Chat Engine supports Chinese questions and HTTP proxy
### _Why are the changes needed?_

- Support Chinese question
- Support proxy settings
- Support setting timeout

<img width="1228" alt="image" src="https://user-images.githubusercontent.com/3898450/225851246-8762a451-9743-4c1d-8a33-cc49a926dfec.png">

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

- [x] Add screenshots for manual tests if appropriate

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

Closes #4548 from cxzl25/chatgpt_followup.

Closes #4548

1d5715442 [Cheng Pan] Update externals/kyuubi-chat-engine/src/main/scala/org/apache/kyuubi/engine/chat/provider/ChatGPTProvider.scala
7add6a733 [Cheng Pan] Update externals/kyuubi-chat-engine/src/main/scala/org/apache/kyuubi/engine/chat/provider/ChatGPTProvider.scala
55974f298 [sychen] fix
2d360e102 [sychen] typo
19b5d0814 [sychen] doc
bdf8e29b6 [sychen] 1.utf8;2.proxy;timeout

Lead-authored-by: sychen <sychen@ctrip.com>
Co-authored-by: Cheng Pan <pan3793@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2023-03-17 21:48:58 +08:00
Cheng Pan
f1eb449c42
[KYUUBI #4544] Initial implement Kyuubi Chat Engine
### _Why are the changes needed?_

Introduce a brand new CHAT engine, it's supposed to support different backends, e.g. ChatGPT, 文心一言, etc.

This PR implements the following providers:

- ECHO, simply replies a welcome message.
- GPT: a.k.a ChatGPT, powered by OpenAI, which requires a API key for authentication. https://platform.openai.com/account/api-keys

Add the following configurations in `kyuubi-defaults.conf`
```
kyuubi.engine.chat.provider=[ECHO|GPT]
kyuubi.engine.chat.gpt.apiKey=<chat-gpt-api-key>
```

Open an ECHO beeline chat engine.
```
beeline -u 'jdbc:hive2://localhost:10009/?kyuubi.engine.type=CHAT;kyuubi.engine.chat.provider=ECHO'
```

```
Connecting to jdbc:hive2://localhost:10009/
Connected to: Kyuubi Chat Engine (version 1.8.0-SNAPSHOT)
Driver: Kyuubi Project Hive JDBC Client (version 1.7.0)
Beeline version 1.7.0 by Apache Kyuubi
0: jdbc:hive2://localhost:10009/> Hello, Kyuubi!;
+----------------------------------------+
|                 reply                  |
+----------------------------------------+
| This is ChatKyuubi, nice to meet you!  |
+----------------------------------------+
1 row selected (0.397 seconds)
```

Open a ChatGPT beeline chat engine. (make sure your network can connect the open API and configure the API key)
```
beeline -u 'jdbc:hive2://localhost:10009/?kyuubi.engine.type=CHAT;kyuubi.engine.chat.provider=GPT'
```

<img width="1109" alt="image" src="https://user-images.githubusercontent.com/26535726/225813625-a002e6e2-3b0d-4194-b061-2e215d58ba94.png">

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

- [x] Add screenshots for manual tests if appropriate

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

Closes #4544 from pan3793/chatgpt.

Closes #4544

87bdebb6d [Cheng Pan] nit
f7dee18f3 [Cheng Pan] Update docs
9beb55162 [cxzl25] chat api (#1)
af38bdc7c [Cheng Pan] update docs
9aa6d83a6 [Cheng Pan] Initial implement Kyuubi Chat Engine

Lead-authored-by: Cheng Pan <chengpan@apache.org>
Co-authored-by: cxzl25 <cxzl25@users.noreply.github.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2023-03-17 13:39:30 +08:00
fwang12
47376c9ff2 [KYUUBI #3739][FOLLOWUP][REST] Remove unused parameters in SessionsResource rest docs
### _Why are the changes needed?_

as title.

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

- [ ] Add screenshots for manual tests if appropriate

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

Closes #4521 from turboFei/rest_docs.

Closes #3739

589237ca6 [fwang12] save
8e7d9bec6 [fwang12] final
35b67ba1e [fwang12] doc
40163311f [fwang12] save
5711d3d72 [fwang12] fix
bab07902f [fwang12] fix ut
d58c2753a [fwang12] save
989eaffd5 [fwang12] remove
2960602bc [fwang12] remove outdate docs

Authored-by: fwang12 <fwang12@ebay.com>
Signed-off-by: fwang12 <fwang12@ebay.com>
2023-03-16 17:04:02 +08:00
odone
25e7b22553 [KYUUBI #4330] Non-temporary views do not resolve to a specific real table
close #4330

### _Why are the changes needed?_

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

- [ ] Add screenshots for manual tests if appropriate

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

Closes #4503 from iodone/kyuubi-4330.

Closes #4330

d2c48e7a [odone] Instead of `optimizedPlan` with `analyzedPlan`
12614d19 [odone] add skip permenent view support

Authored-by: odone <odone.zhang@gmail.com>
Signed-off-by: ulyssesyou <ulyssesyou@apache.org>
2023-03-16 12:58:41 +08:00
zwangsheng
b23c87c318
[KYUUBI #4467][K8S][BATCH] Tolerate Driver Pod ephemerally invisible after submitting
### _Why are the changes needed?_

The following discussion assumes using Spark cluster mode w/ `waitCompletion=false`.

In Spark on Yarn, the application is visible immediately after `spark-submit` is returned, but things are different in Spark on K8s, Driver Pod is ephemerally invisible after submitting, so NOT_FOUND is returned instead of UNKNOWN or PENDING.

To tolerate the above case, `kyuubi.engine.submit.timeout` is introduced, ApplicationManager will report UNKNOWN instead of NOT_FOUND during the Driver Pod scheduling period.

More detail in #4467
1. Remove `KubernetesApplicationOperation`'s `JpsApplicationOperation` for handle Client Deploy Mode(`YarnApplicationOperation` doesn't handle this either)
2. Add engine submit timeout for `KubernetesApplicationOperation` to return Unknown status when not found driver pod in time range.
3. GetApplicationInfo with it's submit time

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

- [ ] Add screenshots for manual tests if appropriate

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

Closes #4469 from zwangsheng/4467.

Closes #4467

562b67463 [zwangsheng] [KYUUBI #4467] Fix Setting.md
362c43d1b [zwangsheng] [KYUUBI #4467] Fix Setting.md
ac69f4d81 [zwangsheng] [KYUUBI #4467] Add Config Desc
d2b9fb660 [zwangsheng] [KYUUBI #4467] save tab
eac880fcf [zwangsheng] [KYUUBI #4467] Ingnore Kubernetes Operation for client mode test
7a20b97a4 [Cheng Pan] Update kyuubi-server/src/main/scala/org/apache/kyuubi/engine/KubernetesApplicationOperation.scala
aa4c7716a [zwangsheng] [KYUUBI #4467] Ingnore Kubernetes Operation for client mode test
c5bd888ab [zwangsheng] [KYUUBI #4467] note it test
a86dcefba [zwangsheng] [KYUUBI #4467] Using default none
aed7f8794 [Cheng Pan] Update docs/deployment/settings.md
490df7dc0 [zwangsheng] [KYUUBI #4467] fix complie
33f3a5be8 [zwangsheng] [KYUUBI #4467] fix comments
4745790cf [zwangsheng] [KYUUBI #4467] Fix IT Test
924cfe38e [zwangsheng] [KYUUBI #4467] Fix Setting.md
5f8aeaacc [zwangsheng] [KYUUBI #4467] KubernetesApplicationOperation Wait if not fount driver pod in limit time range

Lead-authored-by: zwangsheng <2213335496@qq.com>
Co-authored-by: Cheng Pan <pan3793@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2023-03-14 23:01:43 +08:00
Cheng Pan
a47bf6e633
[KYUUBI #4483] Enable REST frontend protocol by default
### _Why are the changes needed?_

REST frontend protocol was introduced in Kyuubi 1.4.0 https://github.com/apache/kyuubi/pull/1349, more and more users are using REST in recent days, and to simplify the planned Web UI developments, I think we should enable the REST by default for master(1.8.0-SNAPSHOT).

I do not remove the "experiment" because we don't have strong confident to ensure the API stability in this time, I would like to defer it until the community has confident to mark it as stable.

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

- [ ] Add screenshots for manual tests if appropriate

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

Closes #4483 from pan3793/enable-rest.

Closes #4483

66fef0224 [Cheng Pan] http
91a29b453 [Cheng Pan] nit
29a4826da [Cheng Pan] Enable REST frontend protocol in default

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2023-03-09 02:15:47 +08:00
yeatsliao
b40fea20e9
[KYUUBI #4171] Support skip retrieving table's properties to speed up GetTables operation
### _Why are the changes needed?_

`GetTables` operation is too slow because it queries table details info one by one, but then only a table comment is used to construct a result row, which i think could be optional.
This PR add an optional config which can control this operation. By default, `GetTables` operation queries all message. Otherwise, `GetTables` operation just return table identifiers.

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

- [ ] Add screenshots for manual tests if appropriate

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

Closes #4444 from liaoyt/master.

Closes #4171

af5e60e36 [yeatsliao] rename config
0c9985e32 [yeatsliao] add doc
5e8687cb3 [yeatsliao] Supports ignore table comment when list all tables.

Authored-by: yeatsliao <liaoyt66066@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2023-03-06 10:38:53 +08:00
Cheng Pan
835454de63
[KYUUBI #4418] Allow disable metadata operation async retry and fail fast on unrecoverable DB error
### _Why are the changes needed?_

The key changes are

1. allow disabling metadata operation retry
2. always fail fast on "duplicated key on unique index" error

Currently, when metadata operations failed, we always do async retry, to tolerate long-time metadata store outages w/o blocking the submission request, but it can not guarantee metadata consistency eventually, e.g. when inserting data violates the unique key restriction, it will never succeed, and block any following update request for the batch job, in such cases, the client gets succeed response but the metadata can not be updated correctly.

We should distinguish between recoverable and unrecoverable errors, for unrecoverable errors, we should fail fast, but the fact is it's hard to enumerate all recoverable nor unrecoverable errors, in this PR, we just enumerate the "duplicated key" as unrecoverable errors, and provide a switch to disable async retry so that the error can propagate to client correctly.

Some configurations are renamed w/ the `async.` prefix(the original key still takes effect) because we may introduce the sync retry logic in the future.

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

- [ ] Add screenshots for manual tests if appropriate

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

Closes #4418 from pan3793/sync-retry.

Closes #4418

ce58ac58c [Cheng Pan] revert migration-guide.md
c2d8377a4 [Cheng Pan] simplify

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2023-02-28 21:14:36 +08:00
Cheng Pan
7a9eb969ff
[KYUUBI #4410] Improve kyuubi-defaults.conf.template
### _Why are the changes needed?_

This PR changes the `kyuubi-defaults.conf.template` because

- remove deprecated conf `kyuubi.frontend.bind.port`
- add some properties which were frequently asked by users

### _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="825" alt="image" src="https://user-images.githubusercontent.com/26535726/221521262-9de7d4e0-ca68-4718-a186-fad5f71b5e5a.png">

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

Closes #4410 from pan3793/conf-template.

Closes #4410

aab459753 [Cheng Pan] nit
d3d8a9a28 [Cheng Pan] nit
e278fa98d [Cheng Pan] update
169db65d4 [Cheng Pan] nit
15a1f656a [Cheng Pan] Improve kyuubi-defaults.conf.template

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2023-02-27 19:08:52 +08:00
Tianlin Liao
59c1875bc1 [KYUUBI #4376] Support to config the kyuubi service administrator with kyuubi conf
### _Why are the changes needed?_

Close #4376

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

- [ ] Add screenshots for manual tests if appropriate

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

Closes #4405 from lightning-L/kyuubi-4376.

Closes #4376

1a01a75a8 [Tianlin Liao] rename and refactor
7324cab3d [Tianlin Liao] [KYUUBI #4376] Support to config the kyuubi service administrator with kyuubi conf

Authored-by: Tianlin Liao <tiliao@ebay.com>
Signed-off-by: fwang12 <fwang12@ebay.com>
2023-02-26 21:09:57 +08:00
fwang12
86dc59c4cf [KYUUBI #3876][FOLLOWUP] Update the rest api docs for open session response
### _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.readthedocs.io/en/master/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #4396 from turboFei/rest_doc.

Closes #3876

de23e30e5 [fwang12] nit
41bd4ca4e [fwang12] save:

Authored-by: fwang12 <fwang12@ebay.com>
Signed-off-by: fwang12 <fwang12@ebay.com>
2023-02-24 08:27:23 +08:00
Cheng Pan
fafd017df5
[KYUUBI #4397] [BUILD] build/dist supports --web-ui
### _Why are the changes needed?_

```
Usage:
+----------------------------------------------------------------------------------------------+
| ./build/dist [--name <custom_name>] [--tgz] [--web-ui] [--flink-provided] [--hive-provided]  |
|              [--spark-provided] [--mvn <maven_executable>] <maven build options>             |
+----------------------------------------------------------------------------------------------+
name:           -  custom binary name, using project version if undefined
tgz:            -  whether to make a whole bundled package
web-ui:         -  whether to include web ui
flink-provided: -  whether to make a package without Flink binary
hive-provided:  -  whether to make a package without Hive binary
spark-provided: -  whether to make a package without Spark binary
mvn:            -  external maven executable location

```

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

Create binary artifacts using `build/dist --tgz --web-ui` and run, then open `http://0.0.0.0:10099/ui`

<img width="1401" alt="image" src="https://user-images.githubusercontent.com/26535726/220753103-ce801f12-f394-4ece-92a4-1902e93c62c7.png">

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

Closes #4397 from pan3793/webui-build.

Closes #4397

97901d63e [Cheng Pan] doc
37d5e2ad3 [Cheng Pan] mirror-cdn
c5751dd5b [Cheng Pan] remove unused dep
d308defb7 [Cheng Pan] nit
9abca4705 [Cheng Pan] nit
c1d184afd [Cheng Pan] nit
7091d5bf5 [Cheng Pan] regex
f0ac16b3c [Cheng Pan] [BUILD] `build/dist` support --web-ui

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2023-02-23 11:45:58 +08:00
fwang12
171473ec71 [KYUUBI #3957][FOLLOWUP] Rename the config prefix from kyuubi.server.batch.limit to kyuubi.server.limit.batch
### _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.readthedocs.io/en/master/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #4398 from turboFei/rename_batch_limit.

Closes #3957

28228e4ed [fwang12] 3957 followup
ef1ad6ea5 [fwang12] save

Authored-by: fwang12 <fwang12@ebay.com>
Signed-off-by: fwang12 <fwang12@ebay.com>
2023-02-23 09:21:34 +08:00