Commit Graph

2669 Commits

Author SHA1 Message Date
xuefeimiaoao
bca43af01a
[KYUUBI #4058] [IT][Test][K8S] Fix the missing of connectionConf in SparkQueryTests
### _Why are the changes needed?_

to close issue #4058 and help to close pr #3852.
When execute test `KyuubiOnKubernetesWithClientSparkTestsSuite` with `execute statement - select with variable substitution`, the initial method
`org.apache.kyuubi.operation.HiveJDBCTestHelper#withThriftClient` will overlook the connectionConf in `org.apache.kyuubi.operation.JDBCTestHelper#jdbcUrl`:
```
  def withThriftClient[T](user: Option[String] = None)(f: TCLIService.Iface => T): T = {
    TClientTestUtils.withThriftClient(
      jdbcUrl.stripPrefix(URL_PREFIX).split("/;").head,
      user)(f)`
  }
```
Here we just aborted the tail of `jdbcUrl.stripPrefix(URL_PREFIX).split("/;")`, in which the connectionConfs are set.
In that case the `org.apache.kyuubi.kubernetes.test.deployment.KyuubiOnKubernetesWithClientSparkTestsSuite#connectionConf` was invalid actually.

### _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 #4059 from xuefeimiaoao/branch-fix-connectionConf.

Closes #4058

a6395631 [xuefeimiaoao] [KYUUBI #4058] [IT][Test][K8S] Fix the missing of connectionConf of SparkQueryTests

Authored-by: xuefeimiaoao <1255072085@qq.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2023-01-04 20:40:45 +08:00
liangbowen
090e5bf4f2
[KYUUBI #4086] Remove reference to removed DISCLAIMER file in build/dist script and doc
### _Why are the changes needed?_

- DISCLAIMER file on top-level folder of project was already removed after graduation in (https://github.com/apache/kyuubi/issues/4020)
- fix build/dist for `cp` non-existed DISCLAIMER file
- remove DISCLAIMER file reference in dev/dist script, doc

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

- [ ] Add screenshots for manual tests if appropriate

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

Closes #4086 from bowenliang123/desclaimer-ref.

Closes #4086

18be7489 [liangbowen] remove DISCLAIMER file reference in dev/dist script, doc, docker , labeler.yml

Authored-by: liangbowen <liangbowen@gf.com.cn>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2023-01-04 19:49:36 +08:00
Fu Chen
8b797725b5
[KYUUBI #4075] [ARROW] Rename configuration from kyuubi.operation.result.codec to kyuubi.operation.result.format
### _Why are the changes needed?_

After some offline discussions, I propose to change the configuration key from`kyuubi.operation.result.codec` to `kyuubi.operation.result.format`.

### _How was this patch tested?_

Pass CI.

Closes #4075 from cfmcgrady/arrow-conf-rename.

Closes #4075

5ad45507 [Fu Chen] fix
214b43fd [Fu Chen] rename

Authored-by: Fu Chen <cfmcgrady@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2023-01-04 18:05:58 +08:00
Cheng Pan
71e46bd316
[KYUUBI #4076] [AUTHZ] Modified query plan should correctly report stats
### _Why are the changes needed?_

It was reported in https://github.com/apache/kyuubi/discussions/4063

When run `SHOW DATABASES;` on Databricks Runtime, the error occurs

```
com.databricks.backend.common.rpc.SparkDriverExceptions$SQLExecutionException: java.lang.UnsupportedOperationException
	at org.apache.spark.sql.catalyst.plans.logical.LeafNode.computeStats(LogicalPlan.scala:183)
	at org.apache.spark.sql.catalyst.plans.logical.LeafNode.computeStats$(LogicalPlan.scala:183)
	at org.apache.kyuubi.plugin.spark.authz.util.ObjectFilterPlaceHolder.computeStats(ObjectFilterPlaceHolder.scala:23)
	at org.apache.spark.sql.catalyst.plans.QueryPlanStats.$anonfun$stats$1(QueryPlanStats.scala:39)
	at scala.Option.getOrElse(Option.scala:189)
	at org.apache.spark.sql.catalyst.plans.QueryPlanStats.stats(QueryPlanStats.scala:38)
	at org.apache.spark.sql.catalyst.plans.QueryPlanStats.stats$(QueryPlanStats.scala:38)
	at org.apache.spark.sql.catalyst.plans.logical.LogicalPlan.stats(LogicalPlan.scala:31)
```

### _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 #4076 from pan3793/stats.

Closes #4076

8238f317 [Cheng Pan] ut
a3c5f7d3 [Cheng Pan] [AUTHZ] Modified query plan should correctly report stats

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2023-01-04 18:04:33 +08:00
jiaoqingbo
08f99d5270
[KYUUBI #4070] Add missing spark commands to lineage.md
### _Why are the changes needed?_

fix #4070 ,all commands in alphabetical order

### _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 #4072 from jiaoqingbo/kyuubi4070.

Closes #4070

abb62aeb [jiaoqingbo] [KYUUBI #4070] Add missing spark commands to lineage.md

Authored-by: jiaoqingbo <1178404354@qq.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2023-01-04 18:03:15 +08:00
liangbowen
bfc56b2cf5
[KYUUBI #4079] Bump Jetty from 9.4.48.v20220622 to 9.4.50.v20221201
### _Why are the changes needed?_

- https://github.com/eclipse/jetty.project/releases/tag/jetty-9.4.50.v20221201
- https://github.com/eclipse/jetty.project/releases/tag/jetty-9.4.49.v20220914

### _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 #4079 from bowenliang123/jetty-9.4.50.

Closes #4079

e60883c1 [liangbowen] Bump Jetty from 9.4.48.v20220622 to 9.4.50.v20221201
6763d56f [liangbowen] Bump Jetty from 9.4.48.v20220622 to 9.4.50.v20221201

Authored-by: liangbowen <liangbowen@gf.com.cn>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2023-01-04 18:01:55 +08:00
Kent Yao
c3741ae562
[KYUUBI #4044] [Authz] Serde for queries
### _Why are the changes needed?_

Add serde layer for queries, which extracts table information from a scan relation, such as HiveTableRelation, logical relation, etc.

### _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 #4044 from yaooqinn/scan.

Closes #4044

d2d830c50 [Kent Yao] addr comments
3cac8dd54 [Kent Yao] [Authz] Serde for queries
fd5425679 [Kent Yao] [Authz] Serde for queries
d42778999 [Kent Yao] Merge branch 'master' of github.com:apache/incubator-kyuubi into scan2
e19282e1f [Kent Yao] [Authz] Serde for queries
50ee2335d [Kent Yao] [Authz] Serde for queries
78ce87855 [Kent Yao] [Authz] Serde for queries

Authored-by: Kent Yao <yao@apache.org>
Signed-off-by: Kent Yao <yao@apache.org>
2023-01-04 17:21:41 +08:00
liangbowen
2563e3c3ad
[KYUUBI #3982] [FOLLWUP] Add REST Api doc for refresh/user_defaults_conf of AdminResource
### _Why are the changes needed?_

- add  doc for`POST /admin/refresh/user_defaults_conf` REST Api , which introduced in #3982

### _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 #4077 from bowenliang123/3982-followup.

Closes #3982

a6acb389 [liangbowen] add REST api doc of `POST /admin/refresh/user_defaults_conf`

Authored-by: liangbowen <liangbowen@gf.com.cn>
Signed-off-by: ulysses-you <ulyssesyou@apache.org>
2023-01-04 14:14:35 +08:00
liangbowen
75d0b7f6b7
[KYUUBI #3983] [KYUUBI #3982] [FEATURE] introduce refreshing user defaults configs
### _Why are the changes needed?_

to close #3982 .

Introduce feature of refresh user defaults config (as `___${user}___.*` which starts with three continuous underscores "___") from config file via `kyuubi-admin` cli and `refresh/user_defaults_conf` Rest API.

1. add `refreshUserDefaultsConf` methond in KyuubiServer to read user defautls configs from property file and apply config changes to server's KyuubiConf
3. add `refresh/user_defaults_conf` api to AdminRestApi calling `refreshUserDefaultsConf` of KyuubiServer
3. add config type `userDefautls` in kyuubi-admin cli refresh command

This feature will
- help to apply user defaults conf without restarting server or losing connections
- load latest config for engine launch, e.g. spark related config `spark.*`

It won't
- affect the components already started and using the clone of server conf
- affect configs for launched engine instance

### _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 #3983 from bowenliang123/3982-reload-server-conf.

Closes #3983

a8fb0bf2 [liangbowen] fix typo
b9b80f56 [liangbowen] update
b47a1541 [liangbowen] minor
786cb2a0 [liangbowen] add logging for statistics
0860e3a7 [liangbowen] fix: loadFileDefaults in refreshUserDefaultsConf
8dbbbcb8 [liangbowen] fix typo
619acd2e [liangbowen] import
e405dc8e [liangbowen] fix user defaults key filtering by adding `getAllUserDefaults` to `KyuubiConf`
ac407bd5 [liangbowen] rename config refresh option to `userDefaultsConf` and extracted to RefreshConfigCommandConfigType
c65398b2 [liangbowen] fix redundant loadFileDefaults in refreshUserDefaultsConf
1b046feb [liangbowen] update comments
e5dd5dbb [liangbowen] typo
c0a358ba [liangbowen] change to refresh users' config. rename cli command to `refresh config userDefaults`
bf5448e3 [liangbowen] support reload server config from config file 1. add reloadServerConf in KyuubiServer to read config and put all to config, 2. add "refresh/server_conf" api to AdminRestApi, 3. add config type "serverConf" in kyuubi-admin cli

Authored-by: liangbowen <liangbowen@gf.com.cn>
Signed-off-by: ulysses-you <ulyssesyou@apache.org>
2023-01-04 13:24:16 +08:00
Tianlin Liao
8e8d8be8d2
[KYUUBI #4020] remove incubating from kyuubi source code
### _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 #4069 from lightning-L/kyuubi-4020.

Closes #4020

97406ca0 [Tianlin Liao] [KYUUBI #4020] remove incubating from kyuubi source code

Authored-by: Tianlin Liao <tiliao@ebay.com>
Signed-off-by: ulysses-you <ulyssesyou@apache.org>
2023-01-04 09:43:20 +08:00
fwang12
2c6f17daf1
[KYUUBI #4067] Reset the operation log before fetching new one
### _Why are the changes needed?_

9342a29284/kyuubi-ctl/src/main/scala/org/apache/kyuubi/ctl/cmd/log/LogBatchCommand.scala (L134-L141)

We need to reset the operation log before fetching new operation log, otherwise, we might meet corner case.

- The last operation log is not empty
- we meet log not found exception
- we can not terminate the loop because the `shouldFinishLog` is always false

### _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 #4067 from turboFei/check_status.

Closes #4067

b61e14f6 [fwang12] style
5787ad97 [fwang12] do not fetch again
6dc479d1 [fwang12] refactor
37a91909 [fwang12] reset the log before fetch log

Authored-by: fwang12 <fwang12@ebay.com>
Signed-off-by: ulysses-you <ulyssesyou@apache.org>
2023-01-04 09:39:42 +08:00
Yikf
9342a29284
[KYUUBI #4065] Support GetTypeInfo for Trino Fe
### _Why are the changes needed?_

Close https://github.com/apache/kyuubi/issues/4065, This pr aims to support `GetTypeInfo` for Trino Fe

### _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 #4066 from Yikf/master.

Closes #4065

bafe4ba4 [Yikf] Support GetTypeInfo for Trino Fe

Authored-by: Yikf <yikaifei1@gmail.com>
Signed-off-by: ulysses-you <ulyssesyou@apache.org>
2023-01-03 20:31:15 +08:00
Yikf
5e9ef7a0d1
[KYUUBI #4053] Support GetTableTypes for trino fe
### _Why are the changes needed?_

We intend to introduce Trino FE at https://github.com/apache/kyuubi/issues/3901, This issue aims to support `GetTableTypes` as subtask.

### _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 #4054 from Yikf/getTableTypes.

Closes #4053

d702cf85 [Yikf] Support GetTableTypes for trino fe

Authored-by: Yikf <yikaifei1@gmail.com>
Signed-off-by: ulysses-you <ulyssesyou@apache.org>
2023-01-03 15:18:20 +08:00
AdithyaPadmashali
cca9622ffc
[KYUUBI #4061] Update NOTICE to mention 2023
### _Why are the changes needed?_
It is now 2023. Happy new year!

### _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 #4062 from AdithyaPadmashali/Update-NOTICE.

Closes #4061

4abb2bc3 [AdithyaPadmashali] Update NOTICE-binary to mention 2023
5ba49f7a [AdithyaPadmashali] Update NOTICE to mention 2023

Lead-authored-by: AdithyaPadmashali <adithya.p2001@gmail.com>
Co-authored-by: AdithyaPadmashali <57041819+AdithyaPadmashali@users.noreply.github.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2023-01-03 13:37:09 +08:00
dnskr
1efc37d725
[KYUUBI #4060] [K8S][HELM] Add initContainers and containers support to helm chart
### _Why are the changes needed?_
The changes allow to add initContainers and containers to Kyuubi server pod.

### _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 #4060 from dnskr/add_initcontainers.

Closes #4060

355d8d0e [dnskr] [K8S][HELM] Add initContainers and containers support to helm chart

Authored-by: dnskr <dnskrv88@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2023-01-03 09:45:23 +08:00
Yikf
05e400dff0 [KYUUBI #4050] [BUILD] Suppress warnning of the maven-antrun-plugin echo
### _Why are the changes needed?_

This pr aims to suppress warnning of the maven-antrun-plugin echo;

before:
```log
[WARNING]      [echo] unpacking netty jar
[WARNING]      [echo] renaming netty native libraries
[WARNING]      [echo] deleting META-INF/native-image folder
[WARNING]      [echo] repackaging netty jar
```

after:
```log
[INFO]      [echo] unpacking netty jar
[INFO]      [echo] renaming netty native libraries
[INFO]      [echo] deleting META-INF/native-image folder
[INFO]      [echo] repackaging netty jar
```

### _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 #4050 from Yikf/echo.

Closes #4050

2729f7988 [Yikf] Suppress warnning of the maven-antrun-plugin echo

Authored-by: Yikf <yikaifei1@gmail.com>
Signed-off-by: fwang12 <fwang12@ebay.com>
2022-12-30 19:56:42 +08:00
fwang12
4942a53470 [KYUUBI #4035][FOLLOWUP] Add eventEnabled method for KyuubiOperation and SparkOperation
### _Why are the changes needed?_

Followup for #4035
Add `eventEnabled` method for KyuubiOperation and SparkOperation.

For `KyuubiOperation`, enable below operations as before
- ExecuteStatement
- BatchJobSubmission

For `SparkOperation`, disable
- GetTypeInfo
   -  because it is used by `KyuubiConnection::isValid` and might be called with interval to check session alive
### _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 #4046 from turboFei/post_event.

Closes #4035

d558d7706 [fwang12] event enabled
4926c8b56 [fwang12] event enabled

Authored-by: fwang12 <fwang12@ebay.com>
Signed-off-by: fwang12 <fwang12@ebay.com>
2022-12-30 19:53:34 +08:00
fwang12
73e49f1360 [KYUUBI #4045] Add withAcquireRelease for newExecuteOnServerOperation
### _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 #4045 from turboFei/with_release.

Closes #4045

1382f96ab [fwang12] withAcquireRelease

Authored-by: fwang12 <fwang12@ebay.com>
Signed-off-by: fwang12 <fwang12@ebay.com>
2022-12-30 19:52:19 +08:00
odone
8535037d45
[KYUUBI #4033] [KYUUBY #3978] add DatasourceV2 command support
close #3978
### _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.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #4033 from iodone/kyuubi-3978.

Closes #4033

2a3ae68b [odone] add datasource v2 support
72feb958 [odone] add datasourcev2 support

Authored-by: odone <odone.zhang@gmail.com>
Signed-off-by: ulysses-you <ulyssesyou@apache.org>
2022-12-30 17:51:16 +08:00
Yikf
4ea74cb6b5
[KYUUBI #3990] Support GetCatalogs for trino fe
### _Why are the changes needed?_

Close https://github.com/apache/kyuubi/issues/3990

This pr aims to support `GetCatalogs` for trino fe.

### _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 #4048 from Yikf/catalogs.

Closes #3990

6ace4a6f [Yikf] Support GetCatalogs for trino fe

Authored-by: Yikf <yikaifei1@gmail.com>
Signed-off-by: ulysses-you <ulyssesyou@apache.org>
2022-12-30 17:45:24 +08:00
liangbowen
2b394c2d4e
[KYUUBI #4047] [Authz] Unit test of row filter for MergeIntoIcebergTable of Iceberg command
### _Why are the changes needed?_

add unit test of row filter for MergeIntoIcebergTable of Iceberg catalog.

### _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 #4047 from bowenliang123/iceberg-rowfilter-ut.

Closes #4047

c6b7d5e17 [liangbowen] update ut name
c26c61b0d [liangbowen] add e2e ut for row filter of iceberg

Authored-by: liangbowen <liangbowen@gf.com.cn>
Signed-off-by: Kent Yao <yao@apache.org>
2022-12-30 17:30:57 +08:00
liangbowen
fe084ad4a5
[KYUUBI #4032] [Authz] Extract catalog for DataSourceRelationV2 in buildQuery and pass catalog of queries and commands to PrivilegeObject
### _Why are the changes needed?_

subtask of #3586 .

1. passing catalog field from `Table` and `Database` to PrivilegeObject for privilege checks. As for`Function` related commands,  no catalog supported other than spark_catalog or v1 catalog in Spark 3.1-3.3.
2. extract catalog from `DataSourceRelationV2` in buildQuery with added `CatalogPluginOptionCatalogExtractor`
3. add ut for v2commands SetNamespaceProperties/CreateNamespace/SetNamespaceLocation/DescribeNamespace/DropNameSpace to verify related PrivilegeObject extraction with catalog in spark 3.3
4. in future PR,  SparkRangerAdminPlugin will use catalog-related instances for privilege checks using catalog info from PrivilegeObject

### _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 #4032 from bowenliang123/catalog-priviobj.

Closes #4032

f66e2f40f [liangbowen] typo
24abdb1dc [liangbowen] add ut for v2commands SetNamespaceProperties/CreateNamespace/SetNamespaceLocation/DescribeNamespace/DropNameSpace
01af55f5f [liangbowen] change assertion to sparkCatalogVal to sparkSessionCatalogName of string type
72dd64e0e [liangbowen] fix catalog assertion for some spark version variation
25160b120 [liangbowen] fix catalog assertion for some spark version variation
4a89b87f4 [liangbowen] fix catalog assertion for some spark version variation
333d47b9e [liangbowen] add catalog assertion to PrivilegesBuilderSuite and V2CommandsPrivilegesSuite
a02b6803e [liangbowen] pass catalog from Database in databasePrivileges
b68a0dc8a [liangbowen] fix
30c7e7de9 [Bowen Liang] Merge branch 'master' into catalog-priviobj
598c6bfef [liangbowen] implement CatalogPluginOptionCatalogExtractor
003c97a58 [liangbowen] add catalog support in method tablePrivileges/v2TablePrivileges of PrivilegesBuilder and pass catalog to PrivilegeObject

Lead-authored-by: liangbowen <liangbowen@gf.com.cn>
Co-authored-by: Bowen Liang <liangbowen@gf.com.cn>
Signed-off-by: Kent Yao <yao@apache.org>
2022-12-30 11:43:04 +08:00
dnskr
e9b713f4e9
[KYUUBI #4043] [K8S][HELM] Add volumes and volumeMounts support to helm chart
### _Why are the changes needed?_
The changes allow to add volumes to Kyuubi server pod and volumeMounts to  Kyuubi server container.

### _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 #4043 from dnskr/add_volumes_and_volumeMounts.

Closes #4043

a332b92a [dnskr] [K8S][HELM] Add volumes and volumeMounts support to helm chart

Authored-by: dnskr <dnskrv88@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-12-30 10:00:03 +08:00
Yikf
0dfe089ca7
[KYUUBI #4040] Abstract and rename parser module related classes
### _Why are the changes needed?_

This pr aims to abstract and rename parser module related classes.

### _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 #4040 from Yikf/trino-fe-parser-rename.

Closes #4040

a13887a7 [Yikf] Abstract parser related classes

Authored-by: Yikf <yikaifei1@gmail.com>
Signed-off-by: ulysses-you <ulyssesyou@apache.org>
2022-12-30 09:10:37 +08:00
Hyukjin Kwon
a64436459c
[KYUUBI #4042] Fix a typo from architect to architecture in README.md
### _Why are the changes needed?_

Fixes a typo in README.md from architect to architecture. This is a simple typo fix.

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

Simple typo fix, and I checked it manually via the web browser.

Closes #4042 from HyukjinKwon/minor-typo.

Closes #4042

dec2faae [Hyukjin Kwon] Fix a typo from architect to architecture in README.md

Authored-by: Hyukjin Kwon <gurwls223@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-12-29 19:50:10 +08:00
Yikf
ad1e9a422b
[KYUUBI #4039] Bump antlr4 from 4.8 to 4.9.3
### _Why are the changes needed?_

This PR aims to bump [antlr4](https://github.com/antlr/antlr4) from 4.8 to 4.9.3.

Version 4.8 was released on Jan 21, 2020, It's been nearly three years, and there have been a lot of bug fixes during that time, see more at [change list](https://github.com/antlr/antlr4/compare/4.8...4.9.3).

### _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 #4039 from Yikf/bump-antlr4.

Closes #4039

24aed3a7 [Yikf] Bump Antlr4 from 4.8 to 4.9.3

Authored-by: Yikf <yikaifei1@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-12-29 15:53:54 +08:00
zwangsheng
8b3b621e82
[KYUUBI #4038][FOLLOWUP] Use globalSparkContext
### _Why are the changes needed?_

Use `globalSparkContext` to simplify the 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

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

Closes #4041 from zwangsheng/improve/diagnostics_deploy_mode_for_k8s_cluster.

Closes #4038

9426944c [zwangsheng] [FOLLOW UP]Improve print diagnostics info in kubernetes cluster deploy-mode

Authored-by: zwangsheng <2213335496@qq.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-12-29 15:51:59 +08:00
ulysses-you
0495350082
[KYUUBI #3988] Final stage config isolation support write only
### _Why are the changes needed?_

Detect and inject a tag if plan is for writing, then skip doing final stage isolation at query preparation phase.

To make final stage config more flexible with complex Spark application.

### _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 #3988 from ulysses-you/final-stage.

Closes #3988

d0f2b622 [ulysses-you] fix
e5351fd5 [ulysses-you] nit
39082b20 [ulysses-you] Final stage config isolation support write only

Authored-by: ulysses-you <ulyssesyou18@gmail.com>
Signed-off-by: ulysses-you <ulyssesyou@apache.org>
2022-12-29 15:35:42 +08:00
zwangsheng
b0e7c07ce9
[KYUUBI #4038] [K8S][LOG]Improve print diagnostics info in kubernetes cluster deploy-mode case
### _Why are the changes needed?_

For Spark On Kubernetes Cluster Deploy-Mode, spark will set `spark.submit.deployMode=client` and `spark.kubernetes.submitInDriver=true`.

Kyuubi print diagnostics about deploy-mode for spark sql engine should not only dependence on `spark.submit.deployMode`.

### _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 #4038 from zwangsheng/improve/diagnostics_deploy_mode_for_k8s_cluster.

Closes #4038

5149a0be [zwangsheng] Improve Diagnostics Info in Kubernetes Cluster Mode Case

Authored-by: zwangsheng <2213335496@qq.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-12-29 15:35:21 +08:00
ulysses-you
985330f01c
[KYUUBI #4029] Support trino get schemas
### _Why are the changes needed?_

Support Trino get schemas statement. We convert statement to operation at Trino frontend.

Note, this pr does not support the whole code path from Trino frontend. This pr aims to add an example how to make Trino frontend work with existed Kyuubi server framework.

### _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 #4030 from ulysses-you/trino-get-schemas.

Closes #4029

f43408c2 [ulysses-you] address comments
a29bcdb8 [ulysses-you] fix
6fddbe6e [ulysses-you] support trino get schemas

Authored-by: ulysses-you <ulyssesyou18@gmail.com>
Signed-off-by: ulysses-you <ulyssesyou@apache.org>
2022-12-29 12:59:51 +08:00
liangbowen
56072d8f48
[KYUUBI #4015] [Authz] Support catalog in DatabaseDesc and extract catalog for ResolvedNamespace and ResolvedDBObjectName of dsv2
### _Why are the changes needed?_

1. make DatabaseDesc return added `Database` type instance
2. add `catalogDesc` to DatabaseDesc and  `catalog` filed in Database
3. extract catalog for  ResolvedNamespaceDatabaseExtractor and ResolvedDBObjectName in databaseExtractors of DSV2

### _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 #4015 from bowenliang123/catalog-v2database.

Closes #4015

2d925f046 [liangbowen] remove ut for SetCatalogAndNamespace
cd56ca6a7 [liangbowen] move ut to V2CommandsPrivilegesSuite
36e44415b [liangbowen] update
8ca4f7f9d [liangbowen] add ut for SetCatalogAndNamespace
a29068d21 [liangbowen] move ut for SetNamespaceCommand to V2CommandsPrivilegesSuite
bce9471f2 [liangbowen] revert workaround for blank fieldName of CatalogDesc
63c341797 [Bowen Liang] Merge branch 'master' into catalog-v2database
7d043d7db [liangbowen] remove CurrentCatalogExtractor
49e52ff14 [liangbowen] fix None catalog of `USE NAMESPACE` in spark 3.1/3.2 by filling current catalog name into it
ae1f84030 [liangbowen] implement CurrentCatalogExtractor to fetch current catalog from session state, and fill catalog for SetNamespaceCommand
d1654b936 [liangbowen] implement StringOptionCatalogExtractor for using with StringSeqOptionDatabaseExtractor in SetCatalogAndNamespace
ff464828f [liangbowen] change var order moving catalogSpec before isInput
f924bbc88 [liangbowen] regenerate db spec
a6c58accf [liangbowen] add CatalogPluginCatalogExtractor to  catalogDesc for CreateNamespace following StringSeqDatabaseExtractor
696e38c51 [liangbowen] update
08c1c7edd [liangbowen] add ut for ResolvedNamespaceDatabaseExtractor
4101a7294 [liangbowen] use CatalogPluginCatalogExtractor in ResolvedNamespaceDatabaseExtractor
e97f1dd2b [liangbowen] use CatalogPluginCatalogExtractor in ResolvedDBObjectNameDatabaseExtractor
d1b68c25d [liangbowen] support catalog in Database and databaseExtractors

Lead-authored-by: liangbowen <liangbowen@gf.com.cn>
Co-authored-by: Bowen Liang <liangbowen@gf.com.cn>
Signed-off-by: Kent Yao <yao@apache.org>
2022-12-29 11:58:55 +08:00
fwang12
a96df17bcd [KYUUBI #4035] Post SparkOperationEvent for all SparkOperations and show sessionId for statements
### _Why are the changes needed?_

Before, we can only see sql query on the kyuubi query engine tab.
<img width="1727" alt="image" src="https://user-images.githubusercontent.com/6757692/209688435-5fc45e5f-2aa9-4991-9cad-1268fc61fc66.png">

After this pr, we can see both scala & python code in the kyuubi query engine tab.

<img width="1727" alt="image" src="https://user-images.githubusercontent.com/6757692/209742783-9867d42d-b04d-403d-872a-c501db483ac6.png">

Also support to show sessionId.
![image](https://user-images.githubusercontent.com/6757692/209756690-b3eb5465-5d29-4983-9178-c86361eb9d13.png)

It also close #2886
### _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 #4035 from turboFei/scala_python_event.

Closes #4035

33c3a4879 [fwang12] refactor
20dfa874e [fwang12] fix ut
d68fce9a3 [fwang12] support progress
8a86e3235 [fwang12] refactor
568ef8624 [fwang12] sessionId
1d623a29a [fwang12] h link
613e829bb [fwang12] show session id
2f120f1d3 [fwang12] add operation listener
529d91c89 [fwang12] move to spark operation
af21769a7 [fwang12] SQL => Statement
713c593ce [fwang12] scala python

Authored-by: fwang12 <fwang12@ebay.com>
Signed-off-by: fwang12 <fwang12@ebay.com>
2022-12-29 11:13:45 +08:00
jiaoqingbo
86d880e9e7
[KYUUBI #4037] [KYUUBY #4036] Remove redundant Casting session to KyuubiSession
### _Why are the changes needed?_

fix #4036

### _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 #4037 from jiaoqingbo/kyuubi4036.

Closes #4037

f3e550d2 [jiaoqingbo] [KYUUBY #4036] Remove redundant Casting session to KyuubiSession

Authored-by: jiaoqingbo <1178404354@qq.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-12-29 10:41:53 +08:00
Yikf
c65a1a96f7
[KYUUBI #4025] Tidy up the Are you willing to submit PR option in the issue template
### _Why are the changes needed?_

This pr aims to tidy up the `Are you willing to submit PR` option in the issue template.

Currently, The `Are you willing to submit PR` option of some Apache kyuubi issue templates has three options as follow:
 - [ ] Yes. I can submit a PR independently to improve.
 - [ ] Yes. I would be willing to submit a PR with guidance from the Kyuubi community to improve.
 - [ ] No. I cannot submit a PR at this time.

The intent of `Are you willing to submit PR` option is to confirm whether the questioner can submit PR at now, So two options are enough.

### _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 #4025 from Yikf/issue-template.

Closes #4025

11b08ee8 [Yikf] Tidy up the Are you willing to submit PR option in the issue template

Authored-by: Yikf <yikaifei1@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-12-28 10:21:37 +08:00
dnskr
68bd64c944
[KYUUBI #4034] [K8S][HELM] Move helm chart to dedicated directory
### _Why are the changes needed?_
The changes are needed to be compliant with Helm recommendations:
1. https://helm.sh/docs/topics/charts/#the-chart-file-structure
```
The directory name is the name of the chart (without versioning information).
Thus, a chart describing WordPress would be stored in a wordpress/ directory.
```
2. https://helm.sh/docs/howto/chart_releaser_action/#repository-changes
```
The charts should be placed under /charts directory at the top-level of the directory tree.
```

### _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 #4034 from dnskr/move_helm_chart_to_dedicated_directory.

Closes #4034

b6f4b661 [dnskr] [K8S][HELM] Move helm chart to dedicated directory

Authored-by: dnskr <dnskrv88@gmail.com>
Signed-off-by: ulysses-you <ulyssesyou@apache.org>
2022-12-28 09:20:50 +08:00
fwang12
70bd55dd68 [KYUUBI #4031] [PYSPARK] Refactor the python process watcher
### _Why are the changes needed?_

Before:
<img width="1096" alt="image" src="https://user-images.githubusercontent.com/6757692/209627576-1eb2759c-48cd-446a-bbec-4dd219a8bec9.png">

After:
<img width="956" alt="image" src="https://user-images.githubusercontent.com/6757692/209627658-2c9c09e6-a9b0-478e-ae13-f1c6e7538a3e.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 #4031 from turboFei/inter_exception.

Closes #4031

c551c45cb [fwang12] refactor
c490a40d0 [fwang12] ignore interrupted exception for watcher

Authored-by: fwang12 <fwang12@ebay.com>
Signed-off-by: fwang12 <fwang12@ebay.com>
2022-12-27 16:33:12 +08:00
fwang12
a5a3e201a7 [KYUUBI #4026] [PYSPARK] Fail if the session python worker process has been exited
### _Why are the changes needed?_

Before, if the pyspark environment is not set up correctly,the python response was always `None`.
In this pr, fail if the session python worker process has been exited.

BTW: Filter the empty log.
<img width="1422" alt="image" src="https://user-images.githubusercontent.com/6757692/209502683-49aa9088-8686-4a54-b88c-85881a3fb089.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 #4026 from turboFei/python_exec.

Closes #4026

499e19b54 [fwang12] more insights
17cefc02e [fwang12] Fail if the session python worker has been exited

Authored-by: fwang12 <fwang12@ebay.com>
Signed-off-by: fwang12 <fwang12@ebay.com>
2022-12-27 15:01:36 +08:00
fwang12
79091332ce [KYUUBI #4028] [PYSPARK] Fix internal python code issue
### _Why are the changes needed?_

1. wrap the code with correct delimiter

Before:
```
{"code":"spark.sparkContext.setJobGroup(07753dd9-804e-478f-b84f-bf0735732334, ..., true)","cmd":"run_code"}
```

After:
```
{"code":"spark.sparkContext.setJobGroup('07753dd9-804e-478f-b84f-bf0735732334', '...', True)","cmd":"run_code"}
```

2. using cancelJobGroup for pyspark

Before:
```
'SparkContext' object has no attribute 'clearJobGroup'
```
After:
Using SparkContext.cancelJobGroup

3. Simplify the internal python code and throw exception on failure
We can not trust the user code is formatted correctly and we shall ensure the internal python code is simple and correct to prevent code correctness and even cause result out of sequence.
Such as, the user code might be below(maybe user invoke executePython api)
```
spark.sql('123\'\n\b\t'
```

It is difficult to escape the user code and set the job description as the statement as.
So, in this pr, I simplify the job description, just record its statementId, user can check the original code from log or on UI I think.
### _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 #4028 from turboFei/python_async_debug.

Closes #4028

51a4c5ea5 [fwang12] typo
6da88d1b3 [fwang12] code style
83f5a48f7 [fwang12] fail the internal python code
5f2db042c [fwang12] remove debug code
3a798cf6c [fwang12] Simplify the statement
c3b4640ca [fwang12] do not lock for close
009f66aaa [fwang12] add ReentrantLock for SessionPythonWorker run python code
39bd861a1 [fwang12] fix
4116dabbc [fwang12] job desc
f16c656fc [fwang12] escape
81db20ccb [fwang12] fix 'SparkContext' object has no attribute 'clearJobGroup'
985118e92 [fwang12] escape for python
f7250c114 [fwang12] revert withLocalProperties
13228f964 [fwang12] debug
e318c698a [fwang12] Revert "prevent timeout"
f81c605e0 [fwang12] prevent timeout
2ca5339e3 [fwang12] test
1390b0f21 [fwang12] remove not needed
26ee60275 [fwang12] remove not needed
93c08ff08 [fwang12] debug

Authored-by: fwang12 <fwang12@ebay.com>
Signed-off-by: fwang12 <fwang12@ebay.com>
2022-12-27 11:03:32 +08:00
liangbowen
a0a52befbe
[KYUUBI #3989] [Authz] extract catalog for ResolvedTable and DataSourceV2Relation
### _Why are the changes needed?_

extract catalog for ResolvedTable and DataSourceV2Relation in tableExtractors

### _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 #3989 from bowenliang123/catalog-v2table.

Closes #3989

88392051c [liangbowen] update
e32dbd54a [liangbowen] revert catalogExtractor and remove spark session for input
0e36e2fb3 [liangbowen] style
90a671640 [liangbowen] remove CurrentCatalogExtractor
77e0f864a [liangbowen] add package name in comments for extractor
5c2642b38 [liangbowen] update CurrentCatalogExtractor
8bdb7d767 [liangbowen] fix ut error and cancel fetching catalog inside IdentifierTableExtractor
6be3496f3 [liangbowen] check catalog for TableIdentifierTableExtractor with DescribeColumnCommand
5ee473de3 [liangbowen] fill catalog in IdentifierTableExtractor/CatalogTableTableExtractor/TableIdentifierTableExtractor
802ea065d [liangbowen] 1. fill catalog for table with current catalog name if None catalog return after catalogdesc extracted 2. implement CurrentCatalogExtractor
273875ae1 [liangbowen] use CatalogPluginCatalogExtractor in ResolvedDbObjectNameTableExtractor
0368ac513 [liangbowen] remove unnecessary seq in ut
0b0ca7802 [liangbowen] revert relevant changes in ResolvedDbObjectNameTableExtractor
7ebcc92f0 [liangbowen] revert relevant changes in ResolvedDbObjectNameTableExtractor
bd13a1ef8 [liangbowen] lint
551153d0d [liangbowen] add ut for DataSourceV2RelationTableExtractor
e13987f86 [liangbowen] extract catalog for DataSourceV2Relation
cdbc705d8 [liangbowen] add ut for ResolvedTableTableExtractor
85f26947a [liangbowen] extract catalog for ResolvedTable

Authored-by: liangbowen <liangbowen@gf.com.cn>
Signed-off-by: Kent Yao <yao@apache.org>
2022-12-27 10:42:27 +08:00
Fu Chen
c28cc6b3b3 [KYUUBI #4019] Binding python/sql spark session
### _Why are the changes needed?_

Bind python and SQL spark session, then the variables we set on the python side can be visited on the SQL side

After this PR, we can change the execution mode from python to sql by running

```python
spark.sql("SET kyuubi.operation.language=SQL").show()
```

![5091671606960_ pic_hd](https://user-images.githubusercontent.com/8537877/208873580-bf6d8a09-63ad-4788-bce7-c1fe2705f0b2.jpg)

### _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 #4019 from cfmcgrady/binding-sql.

Closes #4019

2fd16a8e2 [Fu Chen] address comment
2136dfd64 [Fu Chen] fix style
cf8a612ee [Fu Chen] fix ut
57c592ed6 [Fu Chen] fix ut
fed7614dd [Fu Chen] binding python/sql spark session

Authored-by: Fu Chen <cfmcgrady@gmail.com>
Signed-off-by: Fu Chen <cfmcgrady@gmail.com>
2022-12-26 10:16:49 +08:00
yongqian
182227bd16
[KYUUBI #4024] [DOCS] Update the rules documentation for Kyuubi Spark SQL extension
### _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.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #4024 from QianyongY/features/update-outdated-docs.

Closes #4024

0ad7173f [yongqian] [DOCS] Update the rules documentation for Kyuubi Spark SQL extension

Authored-by: yongqian <yongqian@trip.com>
Signed-off-by: ulysses-you <ulyssesyou@apache.org>
2022-12-26 09:40:34 +08:00
sychen
9fd3b80785
[KYUUBI #4021] Fix asynchronous start engine failure resulting in inaccurate operation metrics
### _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 #4021 from cxzl25/op_metric.

Closes #4021

a8f54ea5 [sychen] operation metrics

Authored-by: sychen <sychen@ctrip.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-12-22 21:35:00 +08:00
John Caveman
4d6942cb2b
[KYUUBI #3973] Fix a conf fallback for kyuubi-ctl list server when kyuubi-defaults.conf use deprecated zk key
### _Why are the changes needed?_

To fix https://github.com/apache/incubator-kyuubi/issues/3973, we found similar problem during upgrade from 1.5 to 1.6

### _How was this patch tested?_
Manual test on internal cluster, UT will be added later on

- [ ] 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 #3997 from CavemanIV/kyuubi-3973.

Closes #3973

7dae77cf [John Caveman] fix validation for ut
96adf586 [John Caveman] use conf.get
0b0df721 [John Caveman] style fix
f0f167fb [John Caveman] replace for-conf-key-lambda to option chain for a more consistent coding style
6a308d5c [John Caveman] revert ut, command only read conf from kyuubi-defaults directly
ff999221 [John Caveman] fix kyuubi-ctl list fall back to HA_ZK_QUORUM in kyuubi-default.conf when HA_ADDRESSES is not set

Authored-by: John Caveman <selnteer@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-12-22 11:36:37 +08:00
fwang12
3a0f08e367
[KYUUBI #4018] Execute python code supports asynchronous and query timeout
### _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

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

Closes #4018 from turboFei/python_async.

Closes #4018

2afe3979 [fwang12] move ut
0d9d2f10 [fwang12] only OK
46d14f4c [fwang12] add ut
0e3a0399 [fwang12] add ut
0f2eba5e [fwang12] add ut
e2718ab2 [fwang12] async python

Authored-by: fwang12 <fwang12@ebay.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-12-22 00:01:09 +08:00
dnskr
9e7a8f25b4
[KYUUBI #4004] [K8S][HELM] Add configuration files support to helm chart
### _Why are the changes needed?_
The changes allow to:
1. set Kyuubi configuration files:
    - `kyuubi-env.sh`
    - `kyuubi-defaults.conf`
    - `log4j2.xml`
2. restart (recreate) Kyuubi server pods if configuration files have changed
    - this probably should be revisited after https://github.com/apache/incubator-kyuubi/pull/3983

### _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 #4004 from dnskr/helm_conf_files_support.

Closes #4004

83678254 [dnskr] [K8S][HELM] Add configuration files support to helm chart

Authored-by: dnskr <dnskrv88@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-12-21 20:39:16 +08:00
Kent Yao
be5c3aaab6 [KYUUBI #3992] Fix spelling(steaming -> streaming) in kyuubi_ecosystem figure
### _Why are the changes needed?_

Fix spelling(steaming -> streaming) in kyuubi_ecosystem figure

### _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 #3992 from yaooqinn/eco.

Closes #3992

d2d95147a [Kent Yao] Fix spelling in kyuubi_ecosystem pic
c1db38a9e [Kent Yao] Fix spelling in kyuubi_ecosystem pic
390d175fe [Kent Yao] Fix spelling in kyuubi_ecosystem pic
d9538ba38 [Kent Yao] Fix spelling in kyuubi_ecosystem pic
77cac723e [Kent Yao] Fix spelling in kyuubi_ecosystem pic

Authored-by: Kent Yao <yao@apache.org>
Signed-off-by: fwang12 <fwang12@ebay.com>
2022-12-20 20:51:42 +08:00
wForget
a494aa9b87 [KYUUBI #4006] Fix the incorrect execution of the source command
### _Why are the changes needed?_

close #4006

refer 7c343471aa/beeline/src/java/org/apache/hive/beeline/Commands.java (L856)

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

Successfully executed after fix:
![image](https://user-images.githubusercontent.com/17894939/208376659-fc5e5a2f-bec6-416e-a8e5-74082c70f24b.png)

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

Closes #4007 from wForget/KYUUBI-4006.

Closes #4006

0a9710503 [wForget] Fix comment extra never reads next line
47b30247f [wForget] [KYUUBI-4006] Fix the incorrect execution of the source command

Authored-by: wForget <643348094@qq.com>
Signed-off-by: fwang12 <fwang12@ebay.com>
2022-12-20 20:49:37 +08:00
fwang12
14faff24b3 [KYUUBI #4011] Refactor the kyuubi session type
### _Why are the changes needed?_

Now, we support SQL, Scala and Python.

In this pr, refactor the session type: `SQL` => `INTERACTIVE`.

### _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 #4011 from turboFei/interactive_session_type.

Closes #4011

e4a4cae88 [fwang12] doc
106019d65 [fwang12] fix ut
7e8fa36c2 [fwang12] please
da4876449 [fwang12] retest
8cfe30b18 [fwang12] SQL => interactive

Authored-by: fwang12 <fwang12@ebay.com>
Signed-off-by: fwang12 <fwang12@ebay.com>
2022-12-20 20:48:36 +08:00
maming
d87a6c7567 [KYUUBI #3615][FOLLOWUP] Client close session when retry to open failed
### _Why are the changes needed?_
Client will retry to open the engine when encountering a special error in [KYUUBI #3615](https://github.com/apache/incubator-kyuubi/pull/3618), but it will lead to `TProtocol` leaks when the attempt failed.

### _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 #4017 from mattshma/close_client_when_retry_fail.

Closes #3615

769e4ca50 [maming] reformat code style
6bf81dff1 [maming] optimize warn log
088105e90 [maming] optimize code
fc98810e3 [maming] Client close session when retry to open failed

Authored-by: maming <maming@ctrip.com>
Signed-off-by: fwang12 <fwang12@ebay.com>
2022-12-20 20:47:24 +08:00
sychen
6e61238d41 [KYUUBI #4016] Print engine id when get service node info
### _Why are the changes needed?_

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

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

- [ ] Add screenshots for manual tests if appropriate

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

Closes #4016 from cxzl25/print_engine_id.

Closes #4016

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

Authored-by: sychen <sychen@ctrip.com>
Signed-off-by: fwang12 <fwang12@ebay.com>
2022-12-20 20:45:47 +08:00