Commit Graph

520 Commits

Author SHA1 Message Date
liangbowen
3fae1845e7
[KYUUBI #3820] [Subtask] [PySpark] Skip missing MagicNode and code improvements
### _Why are the changes needed?_

to close #3820 .

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

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

- [ ] Add screenshots for manual tests if appropriate

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

Closes #3819 from bowenliang123/imrove-pyspark.

Closes #3820

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

Authored-by: liangbowen <liangbowen@gf.com.cn>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-11-22 10:16:52 +08:00
liangbowen
a54f214bc5
[KYUUBI #3818] [Subtask] [PySpark] set local properties to spark context for python scripts
### _Why are the changes needed?_

to close #3818 .
- add `withLocalProperties` in `ExecutePython`
- set Spark local properties `kyuubi.session.user`, `kyuubi.statement.id`, `spark.scheduler.pool`, `spark.scheduler.pool` in withLocalProperties for other feature relied on it , e.g. Authz plugin.

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

- [ ] Add screenshots for manual tests if appropriate

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

Closes #3817 from bowenliang123/pyspark-sessionuser.

Closes #3818

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

Authored-by: liangbowen <liangbowen@gf.com.cn>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-11-20 19:08:07 +08:00
liangbowen
bfd7f7b6b1
[KYUUBI #3807][Subtask][PySpark] Support get Python path from config and prefer PYSPARK_DRIVER_PYTHON env
### _Why are the changes needed?_

to close #3807

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

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

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

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

- [ ] Add screenshots for manual tests if appropriate

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

Closes #3808 from bowenliang123/3807-pysparkpython.

Closes #3807

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

Authored-by: liangbowen <liangbowen@gf.com.cn>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-11-16 19:29:53 +08:00
lcy999
979881d687 [KYUUBI #3801] Correctly calculate active stages in SQLOperationListener
### _Code of Conduct_
- [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)

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

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

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

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

Closes #3801 from lcy999/bug_1113.

Closes #3801

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

Authored-by: lcy999 <1501989483@qq.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-11-13 11:30:22 +00:00
Fu Chen
7295049c9f
[KYUUBI #3795][PYSPARK] Python 3.8+ support
### _Why are the changes needed?_

to close #3795

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

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

- [ ] Add screenshots for manual tests if appropriate

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

Closes #3797 from cfmcgrady/kyuubi-3795.

Closes #3795

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

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

close #3790

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

- [ ] Add screenshots for manual tests if appropriate

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

Closes #3793 from df-Liu/flink_table.

Closes #3790

317434d2 [df_liu] flink table from

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

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

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

- [x] Add screenshots for manual tests if appropriate

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

40 directories, 211 files
```

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

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

Closes #3776

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

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-11-11 10:05:23 +08:00
Fu Chen
70590f71ef
[KYUUBI #3782][PYSPARK] Initial support PySpark
### _Why are the changes needed?_

Close #3758 #3782

Limitations:
- only support kyuubi beeline

Examples:

![截屏2022-11-04 下午5 16 11](https://user-images.githubusercontent.com/8537877/199936938-f0fc9b7e-3886-461b-8197-bd39970f5a6f.png)

![截屏2022-11-04 下午5 16 32](https://user-images.githubusercontent.com/8537877/199936970-b3c14844-6864-4c67-8428-716d632a14db.png)

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

- [ ] Add screenshots for manual tests if appropriate

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

Closes #3762 from cfmcgrady/python-support.

Closes #3782

83839a80 [Fu Chen] double check
3e4d6e3f [Fu Chen] multi-line
ec56b3c2 [Fu Chen] address comment
4d204b68 [Fu Chen] fix style
aa6aedfb [Fu Chen] address comment
db786fe3 [Fu Chen] resolve conflict
af0d1d9f [Fu Chen] revert kyuubi-hive-beeline/src/main/java/org/apache/hive/beeline/KyuubiCommands.java
8687a825 [Fu Chen] address comment
8954fed8 [Fu Chen] get conn_info_file from env
2952eb9f [Fu Chen] pythonExec
a919f1ad [Fu Chen] fix ga
47543bf0 [Fu Chen] remove findspark dependency
003bf343 [Fu Chen] [GA] setup python
594e3cdc [Fu Chen] add ut
427e1e96 [Fu Chen] pass SPARK_HOME environment variable.
69dd7dfb [Fu Chen] license
b8e44fd1 [Fu Chen] fix style
df33efcd [Fu Chen] PySpark support

Authored-by: Fu Chen <cfmcgrady@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-11-08 20:08:42 +08:00
senmiaoliu
ce74e27a50
[KYUUBI #3774] Output OpenSessionCount when Engine is waiting for exit because it reaches the Max lifetime
### _Why are the changes needed?_

When the Engine reaches the maximum running time, it can output the OpenSessionCount while waiting to exit

### _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 #3774 from lsm1/features/info_opensession_count.

Closes #3774

ae6e12a0 [senmiaoliu] info openSession count before engine shutdown because life time too long

Authored-by: senmiaoliu <senmiaoliu@trip.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-11-07 19:43:52 +08:00
waywtdcc
a2604b1a89
[KYUUBI #3717] Support flink engine see primary keys
### _Why are the changes needed?_

*Support flink engine see primary keys*

### _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 #3718 from waywtdcc/support_flink_primarykeys.

Closes #3717

e71e5b16 [waywtdcc] 1.Support flink engine look primary keys,fix error
2deff414 [waywtdcc] 1.Support flink engine look primary keys,fix error
e7cf40fa [waywtdcc] 1.Support flink engine look primary keys,fix order
94e9ed7e [waywtdcc] 1.Support flink engine look primary keys,fix error
9861c5e9 [waywtdcc] 1.Support flink engine look primary keys,fix error
41db5621 [waywtdcc] 1.Support flink engine look primary keys,fix error
e148e108 [waywtdcc] Merge branch 'master' of https://github.91chi.fun/https://github.com/apache/incubator-kyuubi into support_flink_primarykeys
2c23a09b [waywtdcc] 1.Support flink engine look primary keys,reviews update
a98faef2 [waywtdcc] 1.Support flink engine look primary keys,add more test
2863772e [waywtdcc] 1.Support flink engine look primary keys
195271a8 [waywtdcc] 1.Support flink engine look primary keys
dfe7686b [waywtdcc] 1.Support flink engine look primary keys
dc670e55 [waywtdcc] 1.Support flink engine look primary keys,error message
562e8ebc [waywtdcc] 1.Support flink engine look primary keys
ca19da6c [waywtdcc] 1.Support flink engine look primary keys

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

Expose the engine id when registering the service.

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

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

- [ ] Add screenshots for manual tests if appropriate

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

Closes #3684 from turboFei/extra_info.

Closes #3684

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

Authored-by: Fei Wang <fwang12@ebay.com>
Signed-off-by: Fei Wang <fwang12@ebay.com>
2022-11-03 14:22:05 +08:00
Cheng Pan
223e54e9b3 Revert "[KYUUBI #3385] Set spark.kubernetes.executor.podNamePrefix if missing"
This reverts commit c454bfdcbe.
2022-11-02 04:26:43 +00:00
jiaoqingbo
f21ad832a3 [KYUUBI #3730] Change the parameter annotation of the runRemoveJarOperation method to Remove-jar operation instead of Add-jar operation
### _Why are the changes needed?_

fix #3730

### _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 #3731 from jiaoqingbo/kyuubi3730.

Closes #3730

94e5a871 [jiaoqingbo] [KYUUBI #3730] Change the parameter annotation of the runRemoveJarOperation method to Remove-jar operation instead of Add-jar operation

Authored-by: jiaoqingbo <1178404354@qq.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-10-31 13:37:22 +00:00
jiaoqingbo
a5d7d72628 [KYUUBI #3727] Extract the common variables of GetTables in flink and spark to ResultSetSchemaConstant
### _Why are the changes needed?_

fix #3727

### _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 #3729 from jiaoqingbo/kyuubi3727.

Closes #3727

cb494c82 [jiaoqingbo] [KYUUBI #3727] Extract the common variables of GetTables in flink and spark to ResultSetSchemaConstant

Authored-by: jiaoqingbo <1178404354@qq.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-10-31 13:36:10 +00:00
jiaoqingbo
fa9f626ee6 [KYUUBI #3732] Add logic for judging flink version in AddJarOperation and ShowJarsOperation
### _Why are the changes needed?_

fix #3732

### _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 #3733 from jiaoqingbo/kyuubi3732.

Closes #3732

1b1625b0 [jiaoqingbo] [KYUUBI #3732] Add logic for judging flink version in AddJarOperation and ShowJarsOperation

Authored-by: jiaoqingbo <1178404354@qq.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-10-31 13:34:33 +00:00
hongdongdong
555ccb5da0
[KYUUBI #3714] Use ServicesResourceTransformer to concatenating service entries
### _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 #3714 from hddong/use-ServicesResourceTransformer.

Closes #3714

d4c0ed27 [hongdongdong] Use ServicesResourceTransformer to concatenating service entries

Authored-by: hongdongdong <hongdd@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-10-31 11:32:42 +08:00
Yikf
b8b9a2123d [KYUUBI #3711] PlanOnly should output engine logs to log files
### _Why are the changes needed?_

Fix https://github.com/apache/incubator-kyuubi/issues/3711
PlanOnly should output engine logs to log files so that they can be pulled from the front end.

### _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 #3712 from Yikf/planOnly-log-out.

Closes #3711

8469de9a [Yikf] planOnly should output engine logs to log files so that they can be pulled from the front end

Authored-by: Yikf <yikaifei1@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-10-29 10:41:37 +00:00
Cheng Pan
214d238902
[KYUUBI #3514] Support Flink 1.16
### _Why are the changes needed?_

Close https://github.com/apache/incubator-kyuubi/issues/3513

https://www.mail-archive.com/devflink.apache.org/msg61009.html

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

- [ ] Add screenshots for manual tests if appropriate

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

Closes #3514 from pan3793/flink-1.16.

Closes #3514

184b3397 [Cheng Pan] url
01e09268 [Cheng Pan] ga
2d0978bd [Cheng Pan] Bump Flink 1.16.0 RC2
ffd32845 [Cheng Pan] Support Flink 1.16

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-10-27 01:54:07 +08:00
Bowen Liang
e00e380286
[KYUUBI #3671] [TEST] assert error message for SCHEMA_NOT_FOUND and TABLE_OR_VIEW_NOT_FOUND for Spark 3.4
### _Why are the changes needed?_

to close #3671.

- fix assert message for '[SCHEMA_NOT_FOUND]' and '[TABLE_OR_VIEW_NOT_FOUND]'
- introduce SparkVersionUtil in kyuubi-common test for checking Spark version

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

- [ ] Add screenshots for manual tests if appropriate

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

Closes #3676 from bowenliang123/3671-notfound.

Closes #3671

c505098f [Bowen Liang] update
a950abbf [Bowen Liang] fix typo
56464e84 [Bowen Liang] update SparkVersionUtil
2190a93e [Bowen Liang] fix assert message for '[SCHEMA_NOT_FOUND]' and '[TABLE_OR_VIEW_NOT_FOUND]', introduce SparkVersionUtil for checking spark version in kyuubi-common test

Authored-by: Bowen Liang <liangbowen@gf.com.cn>
Signed-off-by: ulysses-you <ulyssesyou@apache.org>
2022-10-21 12:15:55 +08:00
Hanna Liashchuk
c454bfdcbe
[KYUUBI #3385] Set spark.kubernetes.executor.podNamePrefix if missing
### _Why are the changes needed?_
In Spark, if Kubernetes executor pod is not conforming to Kubernetes naming conventions, a user gets the next error:
```
org.apache.kyuubi.KyuubiSQLException: org.apache.kyuubi.KyuubiSQLException: java.lang.IllegalArgumentException: 'kyuubi-connection-spark-sql-USER-8fc2847d-b65d-4a46-bb41-4a86385cb61c-988995839f29e15f' in spark.kubernetes.executor.podNamePrefix is invalid.
```
It can be fixed by manually setting 'spark.kubernetes.executor.podNamePrefix' in configurations, but since you cannot dynamically set a value for every user to contain their username, it will miss this essential information that helps to distinguish executors one from another. I suggest Kyuubi server adds this config automatically if it's not coming from user.

### _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 #3590 from hanna-liashchuk/master.

Closes #3385

94613145 [Hanna Liashchuk] Fixed style check
4b2281ce [Hanna Liashchuk] Merged if clauses
2c52988d [hanna-liashchuk] Merge branch 'apache:master' into master
f397cdc7 [Hanna Liashchuk] Added if clause
8b91109c [Hanna Liashchuk] Added EpochMilli to the podNamePrefix
13e8fb53 [hanna-liashchuk] Merge branch 'apache:master' into master
dcef3e10 [Hanna Liashchuk] Set executor.podNamePrefix for k8s if missing

Lead-authored-by: Hanna Liashchuk <g.liashchuk@temabit.com>
Co-authored-by: hanna-liashchuk <47921651+hanna-liashchuk@users.noreply.github.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-10-20 17:30:39 +08:00
Bowen Liang
fe431b2a36
[KYUUBI #3635] Delete temp directories on exit in test suites with Utils.createTempDir
### _Why are the changes needed?_

to close #3635 .
- change test suits to  to use Utils.createTempDir of kyuubi-common module to create temp dir with delete on exit to prevent disk usage leaking
- change signature Utils.createTempDir by making `prefix` param from second place to the first, to make it friendly to use without repeating param name itself. The name`prefix` is more closer to Java's style in `Files.createTempDirectory`

### _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 #3660 from bowenliang123/3635-deletetmp.

Closes #3635

8947fb0f [Bowen Liang] remove unused imports
c06769d4 [Bowen Liang] nit
dac266c9 [Bowen Liang] - change test suits to to use Utils.createTempDir of kyuubi-common module to create temp dir with delete on exit to prevent disk usage leaking - change signature Utils.createTempDir by making prefix param from second place to the first, to make it friendly to use without repeating param name itself. The nameprefix is more closer to Java's style in Files.createTempDirectory

Authored-by: Bowen Liang <liangbowen@gf.com.cn>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-10-18 22:19:07 +08:00
Cheng Pan
84297ea466
Revert "[KYUUBI #3635] Delete files on exit in test suites with Utils.createTempDir"
This reverts commit 1de59bf6ec.
2022-10-17 22:37:21 +08:00
Cheng Pan
33c573cfb2
[KYUUBI #3627] Support vanilla Jetty for Spark packaged by sbt
### _Why are the changes needed?_

Fix #3627.

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

manual test, and the class not found error is gone.

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

Closes #3630 from pan3793/jetty.

Closes #3627

bf9e4f9b [Cheng Pan] private
f6c496f6 [Cheng Pan] nit
25a7c8cf [Cheng Pan] [KYUUBI #3627] Support vanilla Jetty for Spark packaged by sbt

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-10-17 16:35:33 +08:00
Bowen Liang
1de59bf6ec
[KYUUBI #3635] Delete files on exit in test suites with Utils.createTempDir
### _Why are the changes needed?_

to close #3635 .
- change test suits to  to use Utils.createTempDir of kyuubi-common module to create temp dir with delete on exit to prevent disk usage leaking
- change signature Utils.createTempDir by making `prefix` param from second place to the first, to make it friendly to use without repeating param name itself. The name`prefix` is more closer to Java's style in `Files.createTempDirectory`

### _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 #3636 from bowenliang123/3635-tempdir.

Closes #3635

5f84a16f [Bowen Liang] nit
b82a149f [Bowen Liang] rename `namePrefix` param to `prefix` of `Utils.createTempDir` method, and make it in first place
76d33143 [Bowen Liang]  delete files on exit in test suits with Utils.createTempDir

Authored-by: Bowen Liang <liangbowen@gf.com.cn>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-10-17 10:00:49 +08:00
zwangsheng
e80a7db146
[KYUUBI #3600] [SPARK][K8S] Respect default static port for web UI on Spark K8s cluster mode
### _Why are the changes needed?_

Now kyuubi will help set web ui port to 0 while scalaing up spark sql engine, which is good for the general situation, help avoid port conflicts.

But on k8s case, kyuubi should respect the user's default settings, here means web ui should be `4040`.

### _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 #3600 from zwangsheng/improve/fix_spark_sql_engine_web_ui_on_k8s.

Closes #3600

0174e22f [zwangsheng] comment
ac2dbedc [zwangsheng] fix
1a2bff70 [zwangsheng] fix
bd4c35c2 [zwangsheng] fix

Authored-by: zwangsheng <2213335496@qq.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-10-10 19:59:08 +08:00
Cheng Pan
2cb34c4d00
[KYUUBI #3597] Engine should prefer ip for registering on K8s cluster mode
### _Why are the changes needed?_

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

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

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

Close #3578

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

- [ ] Add screenshots for manual tests if appropriate

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

Closes #3597 from pan3793/k8s.

Closes #3597

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

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-10-10 12:04:41 +08:00
jiaoqingbo
f76834415a
[KYUUBI #3504] Extend JDBC URL to support catalog
### _Why are the changes needed?_

fix #3504

### _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 #3516 from jiaoqingbo/kyuubi3504.

Closes #3504

93fba696 [jiaoqingbo] remove outdated comment
af3e6a16 [jiaoqingbo] code review
894877b7 [jiaoqingbo] code review
856b28fc [jiaoqingbo] code review
60876a95 [jiaoqingbo] [KYUUBI #3504] Extend JDBC URL to support catalog

Authored-by: jiaoqingbo <1178404354@qq.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-10-08 16:05:03 +08:00
Min Zhao
5ec0c86b39
[KYUUBI #3568] [Bug] [Doris Engine] Fix return decimal, date, timestamp using string
### _Why are the changes needed?_

close https://github.com/apache/incubator-kyuubi/issues/3568#issue-1388744898

### _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 #3569 from zhaomin1423/fix_doris_type.

Closes #3568

f83cc481 [Min Zhao] fix style
d0447473 [Min Zhao] [KYUUBI #3568] [Bug] [Doris Engine] Fix return decimal, date, timestamp using string

Authored-by: Min Zhao <zhaomin1423@163.com>
Signed-off-by: Kent Yao <yao@apache.org>
2022-09-30 15:39:36 +08:00
Yikf
b677148835
[KYUUBI #3566] Shade Zookeeper into spark engine jar
### _Why are the changes needed?_

Close https://github.com/apache/incubator-kyuubi/issues/3566.

### _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 #3570 from Yikf/shade-spark-engine.

Closes #3566

0290cbc9 [Yikf] shade zookeeper in spark-engine

Authored-by: Yikf <yikaifei1@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-09-28 18:35:54 +08:00
sychen
8419b7bafd
[KYUUBI #3519] Flink SQL Engine - GetColumns Operation
### _Why are the changes needed?_
#1322
#2129

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

- [x] Add screenshots for manual tests if appropriate

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

Closes #3519 from cxzl25/flink_get_columns.

Closes #3519

ab81776f [sychen] add column size
efdf1b90 [sychen] indent
630e907a [sychen] refactor
48a79d5b [sychen] add ut
69763bd3 [sychen] GetColumns
8e5e6c51 [sychen] GetColumns

Authored-by: sychen <sychen@ctrip.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-09-28 14:13:19 +08:00
df_liu
d06c656cc6
[KYUUBI #3560] Flink SQL engine supports run DDL across versions
### _Why are the changes needed?_

Followup #3230

### _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 #3560 from df-Liu/flink_ddl.

Closes #3560

0dbdfb3f [df_liu] flink ddl

Authored-by: df_liu <df_liu@trip.com>
Signed-off-by: Shaoyun Chen <csy@apache.org>
2022-09-27 15:28:37 +08:00
Cheng Pan
ef55e4a7d2
[KYUUBI #3521] [TEST] Fix Flink flaky test - select count
### _Why are the changes needed?_

Fix the flaky test

```
- execute statement - select count *** FAILED ***
  92 did not equal 100 (FlinkOperationSuite.scala:663)
```

### _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 #3521 from pan3793/flink-flaky.

Closes #3521

b0ad7e8a [Cheng Pan] Test: Fix flay test execute statement - select count

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-09-26 19:21:18 +08:00
Cheng Pan
ec999017f4
[KYUUBI #3549][FOLLOWUP] Simplify test
### _Why are the changes needed?_

Simplify test by using helper method `withJdbcStatement`

### _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 #3556 from pan3793/followup.

Closes #3549

75103f85 [Cheng Pan] nit
449a2563 [Cheng Pan] [KYUUBI #3549][FOLLOWUP] Simplify test

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-09-26 18:06:06 +08:00
Paul Lin
b29eb3e761
[KYUUBI #3549] Support query id in Flink engine
### _Why are the changes needed?_

Flink engine now doesn't support query id. This PR fixes the problem.

### _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 #3550 from link3280/KYUUBI-3549.

Closes #3549

4f583cbe [Paul Lin] Update externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/FlinkSQLOperationManager.scala
b8808d73 [Paul Lin] [KYUUBI #3549] Simplify code
a68bc59b [Paul Lin] [KYUUBI #3549] Fix typo in the comments
e6217db2 [Paul Lin] [KYUUBI #3549] Support query id in Flink engine

Authored-by: Paul Lin <paullin3280@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-09-26 15:14:51 +08:00
Paul Lin
5f436661e0
[KYUUBI #3547] Fix Flink statements results validation
### _Why are the changes needed?_

The statement results were not available with Flink 1.14 because of a bug, but as we upgraded to Flink 1.15, now we could validate the result sets.

### _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 #3548 from link3280/KYUUBI-3547.

Closes #3547

b0796a23 [Paul Lin] [KYUUBI #3547] Fix broken test for Flink 1.14
bbb3077e [Paul Lin] [KYUUBI #3547] Fix Flink statements results validation

Authored-by: Paul Lin <paullin3280@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-09-26 12:23:54 +08:00
yikf
0e07d27e9f
[KYUUBI #3451] Implement GetInfo for JDBC engine
### _Why are the changes needed?_

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

This pr aims to implement GetInfo for JDBC engine.

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

- [ ] Add screenshots for manual tests if appropriate

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

Closes #3538 from Yikf/jdbc-getinfo.

Closes #3451

cd6e1e75 [yikf] Support getInfo in jdbc

Authored-by: yikf <yikaifei1@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-09-23 11:45:13 +08:00
sychen
dce40c3704
[KYUUBI #3498] Fix GetTables operation in Flink
### _Why are the changes needed?_
#1646

In Flink, the schema returned by `GetTables` is incorrect, causing some database management tools to not see the table.

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

- [x] Add screenshots for manual tests if appropriate

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

Closes #3498 from cxzl25/flink_get_tables.

Closes #3498

6e51487f [sychen] compile
cba06130 [sychen] toArray
37bd6aa2 [sychen] style
93fb80ce [sychen] GetTables

Authored-by: sychen <sychen@ctrip.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-09-17 18:42:38 +08:00
yikf
1ff8cc01ea
[KYUUBI #3452] Implement GetInfo for Trino engine
### _Why are the changes needed?_

close https://github.com/apache/incubator-kyuubi/issues/3452, this pr aims to implement `GetInfo` for Trino 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.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #3477 from Yikf/trino-getinfo.

Closes #3452

ab696a3d [yikf] Trino get info

Authored-by: yikf <yikaifei1@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-09-13 19:49:22 +08:00
Min
9440d1b708
[KYUUBI #3309] Add configs of engine event logger for each engine
### _Why are the changes needed?_

The default value of kyuubi.engine.event.loggers is SPARK, but it can't be used outside the spark engine, so we add the config for each engines.
### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible

- [ ] Add screenshots for manual tests if appropriate

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

Closes #3309 from zhaomin1423/add_engine_logger_conf.

Closes #3309

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

Lead-authored-by: Min <zhaomin1423@163.com>
Co-authored-by: Xiao Zhao <zhaomin1423@163.com>
Signed-off-by: ulysses-you <ulyssesyou@apache.org>
2022-09-09 09:58:50 +08:00
Wang Zhen
8f7a4f5589 [KYUUBI #3051][FOLLOWUP] Remove redundant serverIpAddress method in SparkSessionImpl
### _Why are the changes needed?_

Followup #3051 according to https://github.com/apache/incubator-kyuubi/pull/3048#discussion_r964128135

### _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 #3455 from wForget/KYUUBI-3051-followup.

Closes #3051

51e0cba6 [Wang Zhen] [KYUUBI-3051][FOLLOWUP] Remove redundant serverIpAddress method in SparkSessionImpl

Authored-by: Wang Zhen <wangzhen07@qiyi.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-09-08 09:07:19 +00:00
Cheng Pan
6a90b3e824 [KYUUBI #3122] GetInfo supports return server/engine info
### _Why are the changes needed?_

Workaround for #3032, close #3323

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

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

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

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

- [x] Add screenshots for manual tests if appropriate

Testing w/ PowerBI

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

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

Closes #3122 from pan3793/info.

Closes #3122

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

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-09-08 02:14:38 +00:00
Fei Wang
f61806283f [KYUUBI #3064] Fix scala NPE issue when adding non-local jar URI to class loader
### _Why are the changes needed?_

Close #3064

Refer the comments by cxzl25

Spark uses the code
 `URL.setURLStreamHandlerFactory(new FsUrlStreamHandlerFactory(hadoopConf))` supports the class path from HDFS.
But because the scala compiler only supports adding file schema urls to the class path, non-file schema urls will cause NPE.

```java
Error: Error operating ExecuteScala: java.lang.NullPointerException
	at scala.tools.nsc.classpath.FileUtils$AbstractFileOps$.isJarOrZip$extension(FileUtils.scala:32)
	at scala.tools.nsc.classpath.ClassPathFactory$.newClassPath(ClassPathFactory.scala:90)
	at scala.tools.nsc.Global.$anonfun$extendCompilerClassPath$1(Global.scala:832)
```

scala.tools.nsc.Global#extendCompilerClassPath
```scala
AbstractFile.getURL(u)
```

scala.reflect.io.AbstractFile#getURL
```scala
  def getURL(url: URL): AbstractFile =
    if (url.getProtocol == "file") {
      val f = new java.io.File(url.toURI)
      if (f.isDirectory) getDirectory(f)
      else getFile(f)
    } else null
```

spark-shell supports --jars hdfs jar. At this time, submit will download the remote jar to the local and pass it to spark-shell through the `spark.repl.local.jars` configuration.

In this pr, I localize the remote jar url at first, and then add it into repl class path.
### _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 #3292 from turboFei/scala_npe.

Closes #3064

095c40d8 [Fei Wang] filter
37637f76 [Fei Wang] add non-exist
ec87ea85 [Fei Wang] add ut
5a823d3b [Fei Wang] save

Authored-by: Fei Wang <fwang12@ebay.com>
Signed-off-by: Fei Wang <fwang12@ebay.com>
2022-09-06 17:29:52 +08:00
yikf
331f1a3bdf
[KYUUBI #3414] Tidy up plan only related modes and styles
### _Why are the changes needed?_

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

Currently, Kyuubi supports output of planOnly in different modes in different styles, As more and more modes and styles are supported, defining enumerations in kyuubiConf is a bit messy and not easy to extend, so this pr aims to tidy up these

### _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 #3415 from Yikf/tidy-up.

Closes #3414

e81142e5 [yikf] Tidy up plan only related modes and styles

Authored-by: yikf <yikaifei1@gmail.com>
Signed-off-by: Kent Yao <yao@apache.org>
2022-09-06 13:51:42 +08:00
senmiaoliu
b3ecaef35e
[KYUUBI #3311] Operation language should set UNKONWN when language value is incorrect
### _Why are the changes needed?_

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

### _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 #3324 from lsm1/fix/operation_language_incorrect.

Closes #3311

9192f61f [senmiaoliu] revert delete PlanOnlyOperationSuite.scala
9d0079b1 [senmiaoliu] move ut in SparkQueryTests
e8b160da [senmiaoliu] add unknown for operation language

Authored-by: senmiaoliu <senmiaoliu@trip.com>
Signed-off-by: Kent Yao <yao@apache.org>
2022-09-05 15:02:58 +08:00
yikf
cc60a15363
[KYUUBI #3376] PlanOnly supports output in different styles
### _Why are the changes needed?_

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

This pr aims support planOnly output in different styles (Users can perform SQL scheduling based on the JSON description of TreeNode)

### _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 #3377 from Yikf/planOnly-support-json.

Closes #3376

b63ae718 [yikf] Support json_description for PlanOnlyStatement

Authored-by: yikf <yikaifei1@gmail.com>
Signed-off-by: Kent Yao <yao@apache.org>
2022-09-05 15:01:31 +08:00
Fei Wang
9d615e5b21 [KYUUBI #3354] Support to get engine id, name, url in KyuubiConnection
### _Why are the changes needed?_

Support to get engine id, name, url in KyuubiConnection.

It is helpful and friendly for BI.

### _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 #3354 from turboFei/lanch_engine_result.

Closes #3354

4966de28 [Fei Wang] comments
984b5d35 [Fei Wang] fix ut
963217af [Fei Wang] filter null
a2c0ce2c [Fei Wang] fix
4f2a8b18 [Fei Wang] get from engine side
61607c7c [Fei Wang] return

Authored-by: Fei Wang <fwang12@ebay.com>
Signed-off-by: Fei Wang <fwang12@ebay.com>
2022-08-29 16:07:10 +08:00
yikf
8f57c431b8
[KYUUBI #3357]Improve doc description for configuration kyuubi.operation.plan.only.mode
### _Why are the changes needed?_

Fix https://github.com/apache/incubator-kyuubi/issues/3357
This pr aims to improve doc description for configuration kyuubi.operation.plan.only.mode

### _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 #3358 from Yikf/planOnly-doc.

Closes #3357

571f4e0c [yikf] Improve doc description for configuration `kyuubi.operation.plan.only.mode`

Authored-by: yikf <yikaifei1@gmail.com>
Signed-off-by: Kent Yao <yao@apache.org>
2022-08-29 11:19:40 +08:00
sychen
53bbff8022
[KYUUBI #3336] Use StageAttempt instead of StageId in SQLOperationListener
### _Why are the changes needed?_
Now `activeStages` only has the stageid, and does not record and output the number of stage retries, which may cause errors when the stage fails to retry.

### _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 #3336 from cxzl25/spark_listener_stage_attempt.

Closes #3336

a6da472a [sychen] use StageAttempt instead of StageId

Authored-by: sychen <sychen@ctrip.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-08-26 11:06:26 +08:00
wangjunbo
8870183ed7
[KYUUBI #3128] Support CostMode for PlanOnlyStatement
### _Why are the changes needed?_
close https://github.com/apache/incubator-kyuubi/issues/3128

### _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 #3304 from Kwafoor/master.

Closes #3128

88a5ebe9 [wangjunbo] [kyuubi-3128] Support CostMode for PlanOnlyStatement

Authored-by: wangjunbo <wangjunbo@qiyi.com>
Signed-off-by: Kent Yao <yao@apache.org>
2022-08-24 14:06:40 +08:00
hongdongdong
b01022d8f3
[KYUUBI #3254] Supplement the licenses of support etcd discovery
### _Why are the changes needed?_

Supplement the licenses.

### _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 #3254 from hddong/supplement-license.

Closes #3254

b9dfef64 [hongdongdong] remove netty-transport-native-kqueue from license-binary
2185c964 [hongdongdong] Fix
adb8f479 [hongdongdong] Fix
0eeeb0f5 [hongdongdong] Update notice
c296f78e [hongdd] Update license and notice
88482efe [hongdongdong] Supplement the licenses of support etcd discovery

Lead-authored-by: hongdongdong <hongdd@apache.org>
Co-authored-by: hongdd <hongdd@hongdddeMac-mini.local>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-08-23 20:08:30 +08:00