You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by GitBox <gi...@apache.org> on 2022/01/30 07:37:14 UTC
[GitHub] [incubator-kyuubi] link3280 opened a new pull request #1859: [KYUUBI #1838] Clean up query results after query operations finish
link3280 opened a new pull request #1859:
URL: https://github.com/apache/incubator-kyuubi/pull/1859
<!--
Thanks for sending a pull request!
Here are some tips for you:
1. If this is your first time, please read our contributor guidelines: https://kyuubi.readthedocs.io/en/latest/community/contributions.html
2. If the PR is related to an issue in https://github.com/apache/incubator-kyuubi/issues, add '[KYUUBI #XXXX]' in your PR title, e.g., '[KYUUBI #XXXX] Your PR title ...'.
3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][KYUUBI #XXXX] Your PR title ...'.
-->
Query results would be cached in memory, and we should clean it up when all rows are fetched.
### _Why are the changes needed?_
<!--
Please clarify why the changes are needed. For instance,
1. If you add a feature, you can talk about the use case of it.
2. If you fix a bug, you can clarify why it is a bug.
-->
This is a sub-task of KPIP-2 #1322.
### _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
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] yanghua commented on a change in pull request #1859: [KYUUBI #1838] Clean up query results after query operations finish
Posted by GitBox <gi...@apache.org>.
yanghua commented on a change in pull request #1859:
URL: https://github.com/apache/incubator-kyuubi/pull/1859#discussion_r800341613
##########
File path: externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/ExecuteStatement.scala
##########
@@ -209,6 +218,15 @@ class ExecuteStatement(
setState(OperationState.FINISHED)
}
+ private def cleanupQueryResult(resultId: String): Unit = {
+ try {
+ executor.cancelQuery(sessionId, resultId)
+ } catch {
+ case _: Throwable =>
+ // ignore further exceptions for cleanup
Review comment:
+1 for sharing more information makes sense
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] link3280 commented on a change in pull request #1859: [KYUUBI #1838] Clean up query results after query operations finish
Posted by GitBox <gi...@apache.org>.
link3280 commented on a change in pull request #1859:
URL: https://github.com/apache/incubator-kyuubi/pull/1859#discussion_r802213431
##########
File path: externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/ExecuteStatement.scala
##########
@@ -209,6 +218,15 @@ class ExecuteStatement(
setState(OperationState.FINISHED)
}
+ private def cleanupQueryResult(resultId: String): Unit = {
+ try {
+ executor.cancelQuery(sessionId, resultId)
+ } catch {
+ case t: Throwable =>
+ warn("Failed to clean result set " + resultId + " in session " + sessionId, t)
Review comment:
@pan3793 thx. Updated as suggested.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] SteNicholas commented on a change in pull request #1859: [KYUUBI #1838] Clean up query results after query operations finish
Posted by GitBox <gi...@apache.org>.
SteNicholas commented on a change in pull request #1859:
URL: https://github.com/apache/incubator-kyuubi/pull/1859#discussion_r795147134
##########
File path: externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/ExecuteStatement.scala
##########
@@ -115,33 +115,42 @@ class ExecuteStatement(
}
private def runQueryOperation(operation: QueryOperation): Unit = {
- val resultDescriptor = executor.executeQuery(sessionId, operation)
-
- val resultID = resultDescriptor.getResultId
-
- val rows = new ArrayBuffer[Row]()
- var loop = true
- while (loop) {
- Thread.sleep(50) // slow the processing down
-
- val result = executor.snapshotResult(sessionId, resultID, 2)
- result.getType match {
- case TypedResult.ResultType.PAYLOAD =>
- rows.clear()
- (1 to result.getPayload).foreach { page =>
- rows ++= executor.retrieveResultPage(resultID, page).asScala
- }
- case TypedResult.ResultType.EOS => loop = false
- case TypedResult.ResultType.EMPTY =>
+ var resultId: String = null
+ try {
+ val resultDescriptor = executor.executeQuery(sessionId, operation)
+
+ resultId = resultDescriptor.getResultId
+
+ val rows = new ArrayBuffer[Row]()
+ var loop = true
+
+ while (loop) {
+ Thread.sleep(50) // slow the processing down
Review comment:
Could the sleep time be configurable?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] codecov-commenter edited a comment on pull request #1859: [KYUUBI #1838] Clean up query results after query operations finish
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1859:
URL: https://github.com/apache/incubator-kyuubi/pull/1859#issuecomment-1025093165
# [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1859?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#1859](https://codecov.io/gh/apache/incubator-kyuubi/pull/1859?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (c6253de) into [master](https://codecov.io/gh/apache/incubator-kyuubi/commit/53d59a02bf04bc5e1b81119ee56cdc6e819c4d8a?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (53d59a0) will **increase** coverage by `0.24%`.
> The diff coverage is `95.45%`.
[](https://codecov.io/gh/apache/incubator-kyuubi/pull/1859?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #1859 +/- ##
============================================
+ Coverage 59.46% 59.71% +0.24%
+ Complexity 272 270 -2
============================================
Files 277 282 +5
Lines 13853 13983 +130
Branches 1776 1782 +6
============================================
+ Hits 8238 8350 +112
- Misses 4911 4924 +13
- Partials 704 709 +5
```
| [Impacted Files](https://codecov.io/gh/apache/incubator-kyuubi/pull/1859?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...uubi/engine/flink/operation/ExecuteStatement.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1859/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1mbGluay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9mbGluay9vcGVyYXRpb24vRXhlY3V0ZVN0YXRlbWVudC5zY2FsYQ==) | `78.09% <95.45%> (+0.54%)` | :arrow_up: |
| [...e/authentication/KyuubiAuthenticationFactory.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1859/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLWNvbW1vbi9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2aWNlL2F1dGhlbnRpY2F0aW9uL0t5dXViaUF1dGhlbnRpY2F0aW9uRmFjdG9yeS5zY2FsYQ==) | `75.86% <0.00%> (-2.32%)` | :arrow_down: |
| [...apache/kyuubi/service/TBinaryFrontendService.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1859/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLWNvbW1vbi9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2aWNlL1RCaW5hcnlGcm9udGVuZFNlcnZpY2Uuc2NhbGE=) | `85.10% <0.00%> (-0.32%)` | :arrow_down: |
| [...he/kyuubi/engine/flink/operation/GetCatalogs.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1859/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1mbGluay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9mbGluay9vcGVyYXRpb24vR2V0Q2F0YWxvZ3Muc2NhbGE=) | `83.33% <0.00%> (ø)` | |
| [.../kyuubi/engine/flink/operation/GetTableTypes.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1859/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1mbGluay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9mbGluay9vcGVyYXRpb24vR2V0VGFibGVUeXBlcy5zY2FsYQ==) | `100.00% <0.00%> (ø)` | |
| [...ache/kyuubi/engine/flink/result/OperationUtil.java](https://codecov.io/gh/apache/incubator-kyuubi/pull/1859/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1mbGluay1zcWwtZW5naW5lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL2ZsaW5rL3Jlc3VsdC9PcGVyYXRpb25VdGlsLmphdmE=) | | |
| [...ation/EngineSecureAuthenticationProviderImpl.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1859/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLWNvbW1vbi9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2aWNlL2F1dGhlbnRpY2F0aW9uL0VuZ2luZVNlY3VyZUF1dGhlbnRpY2F0aW9uUHJvdmlkZXJJbXBsLnNjYWxh) | `0.00% <0.00%> (ø)` | |
| [...on/ZooKeeperEngineSecuritySecretProviderImpl.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1859/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLWhhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL3NlcnZpY2UvYXV0aGVudGljYXRpb24vWm9vS2VlcGVyRW5naW5lU2VjdXJpdHlTZWNyZXRQcm92aWRlckltcGwuc2NhbGE=) | `0.00% <0.00%> (ø)` | |
| [.../authentication/EngineSecuritySecretProvider.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1859/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLWNvbW1vbi9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2aWNlL2F1dGhlbnRpY2F0aW9uL0VuZ2luZVNlY3VyaXR5U2VjcmV0UHJvdmlkZXIuc2NhbGE=) | `100.00% <0.00%> (ø)` | |
| ... and [10 more](https://codecov.io/gh/apache/incubator-kyuubi/pull/1859/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1859?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1859?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [53d59a0...c6253de](https://codecov.io/gh/apache/incubator-kyuubi/pull/1859?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] link3280 commented on pull request #1859: [KYUUBI #1838] Clean up query results after query operations finish
Posted by GitBox <gi...@apache.org>.
link3280 commented on pull request #1859:
URL: https://github.com/apache/incubator-kyuubi/pull/1859#issuecomment-1025089515
Now Flink backend does not have very good testabilities, so I manually verify the modification via operation logs.
<img width="1061" alt="截屏2022-01-30 15 07 40" src="https://user-images.githubusercontent.com/13482005/151691177-58fea840-0094-409a-ad06-3b8dc298c3a7.png">
I'd like to add a test suite for Flink engine backend in another issue and add some tests about result cleanups after that.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] SteNicholas commented on a change in pull request #1859: [KYUUBI #1838] Clean up query results after query operations finish
Posted by GitBox <gi...@apache.org>.
SteNicholas commented on a change in pull request #1859:
URL: https://github.com/apache/incubator-kyuubi/pull/1859#discussion_r795147185
##########
File path: externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/ExecuteStatement.scala
##########
@@ -209,6 +218,15 @@ class ExecuteStatement(
setState(OperationState.FINISHED)
}
+ private def cleanupQueryResult(resultId: String): Unit = {
+ try {
+ executor.cancelQuery(sessionId, resultId)
+ } catch {
+ case _: Throwable =>
+ // ignore further exceptions for cleanup
Review comment:
Any exception could be logged?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] codecov-commenter edited a comment on pull request #1859: [KYUUBI #1838] Clean up query results after query operations finish
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1859:
URL: https://github.com/apache/incubator-kyuubi/pull/1859#issuecomment-1025093165
# [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1859?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#1859](https://codecov.io/gh/apache/incubator-kyuubi/pull/1859?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (3cef076) into [master](https://codecov.io/gh/apache/incubator-kyuubi/commit/53d59a02bf04bc5e1b81119ee56cdc6e819c4d8a?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (53d59a0) will **increase** coverage by `0.23%`.
> The diff coverage is `95.45%`.
[](https://codecov.io/gh/apache/incubator-kyuubi/pull/1859?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #1859 +/- ##
============================================
+ Coverage 59.46% 59.70% +0.23%
+ Complexity 272 269 -3
============================================
Files 277 282 +5
Lines 13853 13984 +131
Branches 1776 1782 +6
============================================
+ Hits 8238 8349 +111
- Misses 4911 4925 +14
- Partials 704 710 +6
```
| [Impacted Files](https://codecov.io/gh/apache/incubator-kyuubi/pull/1859?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...uubi/engine/flink/operation/ExecuteStatement.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1859/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1mbGluay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9mbGluay9vcGVyYXRpb24vRXhlY3V0ZVN0YXRlbWVudC5zY2FsYQ==) | `78.09% <95.45%> (+0.54%)` | :arrow_up: |
| [...e/authentication/KyuubiAuthenticationFactory.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1859/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLWNvbW1vbi9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2aWNlL2F1dGhlbnRpY2F0aW9uL0t5dXViaUF1dGhlbnRpY2F0aW9uRmFjdG9yeS5zY2FsYQ==) | `75.86% <0.00%> (-2.32%)` | :arrow_down: |
| [...rg/apache/kyuubi/engine/trino/TrinoStatement.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1859/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS10cmluby1lbmdpbmUvc3JjL21haW4vc2NhbGEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL3RyaW5vL1RyaW5vU3RhdGVtZW50LnNjYWxh) | `64.70% <0.00%> (-1.18%)` | :arrow_down: |
| [...ache/kyuubi/engine/spark/SparkProcessBuilder.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1859/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9lbmdpbmUvc3BhcmsvU3BhcmtQcm9jZXNzQnVpbGRlci5zY2FsYQ==) | `87.15% <0.00%> (-0.76%)` | :arrow_down: |
| [...apache/kyuubi/service/TBinaryFrontendService.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1859/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLWNvbW1vbi9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2aWNlL1RCaW5hcnlGcm9udGVuZFNlcnZpY2Uuc2NhbGE=) | `85.10% <0.00%> (-0.32%)` | :arrow_down: |
| [...n/scala/org/apache/kyuubi/engine/ProcBuilder.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1859/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9lbmdpbmUvUHJvY0J1aWxkZXIuc2NhbGE=) | `87.25% <0.00%> (-0.15%)` | :arrow_down: |
| [...he/kyuubi/engine/flink/operation/GetCatalogs.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1859/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1mbGluay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9mbGluay9vcGVyYXRpb24vR2V0Q2F0YWxvZ3Muc2NhbGE=) | `83.33% <0.00%> (ø)` | |
| [.../kyuubi/engine/flink/operation/GetTableTypes.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1859/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1mbGluay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9mbGluay9vcGVyYXRpb24vR2V0VGFibGVUeXBlcy5zY2FsYQ==) | `100.00% <0.00%> (ø)` | |
| [...ache/kyuubi/engine/flink/result/OperationUtil.java](https://codecov.io/gh/apache/incubator-kyuubi/pull/1859/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1mbGluay1zcWwtZW5naW5lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL2ZsaW5rL3Jlc3VsdC9PcGVyYXRpb25VdGlsLmphdmE=) | | |
| ... and [13 more](https://codecov.io/gh/apache/incubator-kyuubi/pull/1859/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1859?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1859?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [53d59a0...3cef076](https://codecov.io/gh/apache/incubator-kyuubi/pull/1859?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] pan3793 commented on a change in pull request #1859: [KYUUBI #1838] Clean up query results after query operations finish
Posted by GitBox <gi...@apache.org>.
pan3793 commented on a change in pull request #1859:
URL: https://github.com/apache/incubator-kyuubi/pull/1859#discussion_r801479319
##########
File path: externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/ExecuteStatement.scala
##########
@@ -209,6 +218,15 @@ class ExecuteStatement(
setState(OperationState.FINISHED)
}
+ private def cleanupQueryResult(resultId: String): Unit = {
+ try {
+ executor.cancelQuery(sessionId, resultId)
+ } catch {
+ case t: Throwable =>
+ warn("Failed to clean result set " + resultId + " in session " + sessionId, t)
Review comment:
`s"xxx $var"`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] link3280 commented on a change in pull request #1859: [KYUUBI #1838] Clean up query results after query operations finish
Posted by GitBox <gi...@apache.org>.
link3280 commented on a change in pull request #1859:
URL: https://github.com/apache/incubator-kyuubi/pull/1859#discussion_r795159128
##########
File path: externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/ExecuteStatement.scala
##########
@@ -115,33 +115,42 @@ class ExecuteStatement(
}
private def runQueryOperation(operation: QueryOperation): Unit = {
- val resultDescriptor = executor.executeQuery(sessionId, operation)
-
- val resultID = resultDescriptor.getResultId
-
- val rows = new ArrayBuffer[Row]()
- var loop = true
- while (loop) {
- Thread.sleep(50) // slow the processing down
-
- val result = executor.snapshotResult(sessionId, resultID, 2)
- result.getType match {
- case TypedResult.ResultType.PAYLOAD =>
- rows.clear()
- (1 to result.getPayload).foreach { page =>
- rows ++= executor.retrieveResultPage(resultID, page).asScala
- }
- case TypedResult.ResultType.EOS => loop = false
- case TypedResult.ResultType.EMPTY =>
+ var resultId: String = null
+ try {
+ val resultDescriptor = executor.executeQuery(sessionId, operation)
+
+ resultId = resultDescriptor.getResultId
+
+ val rows = new ArrayBuffer[Row]()
+ var loop = true
+
+ while (loop) {
+ Thread.sleep(50) // slow the processing down
Review comment:
I think so, but it's out of the scope of the PR (maybe another issue to discuss?). Actually, this snippet is the same as the original one. I'm wrapping it with try-finally.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] SteNicholas commented on a change in pull request #1859: [KYUUBI #1838] Clean up query results after query operations finish
Posted by GitBox <gi...@apache.org>.
SteNicholas commented on a change in pull request #1859:
URL: https://github.com/apache/incubator-kyuubi/pull/1859#discussion_r795180217
##########
File path: externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/ExecuteStatement.scala
##########
@@ -115,33 +115,42 @@ class ExecuteStatement(
}
private def runQueryOperation(operation: QueryOperation): Unit = {
- val resultDescriptor = executor.executeQuery(sessionId, operation)
-
- val resultID = resultDescriptor.getResultId
-
- val rows = new ArrayBuffer[Row]()
- var loop = true
- while (loop) {
- Thread.sleep(50) // slow the processing down
-
- val result = executor.snapshotResult(sessionId, resultID, 2)
- result.getType match {
- case TypedResult.ResultType.PAYLOAD =>
- rows.clear()
- (1 to result.getPayload).foreach { page =>
- rows ++= executor.retrieveResultPage(resultID, page).asScala
- }
- case TypedResult.ResultType.EOS => loop = false
- case TypedResult.ResultType.EMPTY =>
+ var resultId: String = null
+ try {
+ val resultDescriptor = executor.executeQuery(sessionId, operation)
+
+ resultId = resultDescriptor.getResultId
+
+ val rows = new ArrayBuffer[Row]()
+ var loop = true
+
+ while (loop) {
+ Thread.sleep(50) // slow the processing down
Review comment:
@link3280, I think you could push another commit for the configurable sleep time here because the changes in this pull request cover this logic.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] link3280 commented on a change in pull request #1859: [KYUUBI #1838] Clean up query results after query operations finish
Posted by GitBox <gi...@apache.org>.
link3280 commented on a change in pull request #1859:
URL: https://github.com/apache/incubator-kyuubi/pull/1859#discussion_r795160590
##########
File path: externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/ExecuteStatement.scala
##########
@@ -209,6 +218,15 @@ class ExecuteStatement(
setState(OperationState.FINISHED)
}
+ private def cleanupQueryResult(resultId: String): Unit = {
+ try {
+ executor.cancelQuery(sessionId, resultId)
+ } catch {
+ case _: Throwable =>
+ // ignore further exceptions for cleanup
Review comment:
I thought of logging the exception, but Flink SQL Client ignores it for some reason (maybe to reduce the noises), so I keep aligned with Flink SQL Client. Either way is okay to me.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] SteNicholas commented on a change in pull request #1859: [KYUUBI #1838] Clean up query results after query operations finish
Posted by GitBox <gi...@apache.org>.
SteNicholas commented on a change in pull request #1859:
URL: https://github.com/apache/incubator-kyuubi/pull/1859#discussion_r795180025
##########
File path: externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/ExecuteStatement.scala
##########
@@ -209,6 +218,15 @@ class ExecuteStatement(
setState(OperationState.FINISHED)
}
+ private def cleanupQueryResult(resultId: String): Unit = {
+ try {
+ executor.cancelQuery(sessionId, resultId)
+ } catch {
+ case _: Throwable =>
+ // ignore further exceptions for cleanup
Review comment:
@link3280, I don't think that this should keep aligned with Flink SQL Client. We could log here for the cancel exception so that the users could know canceling query cause the exception which may not cancel successfully.
cc @pan3793 @yaooqinn
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] yanghua closed pull request #1859: [KYUUBI #1838] Clean up query results after query operations finish
Posted by GitBox <gi...@apache.org>.
yanghua closed pull request #1859:
URL: https://github.com/apache/incubator-kyuubi/pull/1859
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] codecov-commenter commented on pull request #1859: [KYUUBI #1838] Clean up query results after query operations finish
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #1859:
URL: https://github.com/apache/incubator-kyuubi/pull/1859#issuecomment-1025093165
# [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1859?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#1859](https://codecov.io/gh/apache/incubator-kyuubi/pull/1859?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (e0b1866) into [master](https://codecov.io/gh/apache/incubator-kyuubi/commit/53d59a02bf04bc5e1b81119ee56cdc6e819c4d8a?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (53d59a0) will **increase** coverage by `0.24%`.
> The diff coverage is `95.65%`.
[](https://codecov.io/gh/apache/incubator-kyuubi/pull/1859?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #1859 +/- ##
============================================
+ Coverage 59.46% 59.70% +0.24%
+ Complexity 272 270 -2
============================================
Files 277 282 +5
Lines 13853 13983 +130
Branches 1776 1782 +6
============================================
+ Hits 8238 8349 +111
- Misses 4911 4924 +13
- Partials 704 710 +6
```
| [Impacted Files](https://codecov.io/gh/apache/incubator-kyuubi/pull/1859?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...uubi/engine/flink/operation/ExecuteStatement.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1859/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1mbGluay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9mbGluay9vcGVyYXRpb24vRXhlY3V0ZVN0YXRlbWVudC5zY2FsYQ==) | `78.09% <95.65%> (+0.54%)` | :arrow_up: |
| [...ache/kyuubi/operation/KyuubiOperationManager.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1859/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9vcGVyYXRpb24vS3l1dWJpT3BlcmF0aW9uTWFuYWdlci5zY2FsYQ==) | `92.50% <0.00%> (-2.50%)` | :arrow_down: |
| [...e/authentication/KyuubiAuthenticationFactory.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1859/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLWNvbW1vbi9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2aWNlL2F1dGhlbnRpY2F0aW9uL0t5dXViaUF1dGhlbnRpY2F0aW9uRmFjdG9yeS5zY2FsYQ==) | `75.86% <0.00%> (-2.32%)` | :arrow_down: |
| [...apache/kyuubi/service/TBinaryFrontendService.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1859/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLWNvbW1vbi9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2aWNlL1RCaW5hcnlGcm9udGVuZFNlcnZpY2Uuc2NhbGE=) | `85.10% <0.00%> (-0.32%)` | :arrow_down: |
| [...he/kyuubi/engine/flink/operation/GetCatalogs.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1859/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1mbGluay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9mbGluay9vcGVyYXRpb24vR2V0Q2F0YWxvZ3Muc2NhbGE=) | `83.33% <0.00%> (ø)` | |
| [.../kyuubi/engine/flink/operation/GetTableTypes.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1859/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1mbGluay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9mbGluay9vcGVyYXRpb24vR2V0VGFibGVUeXBlcy5zY2FsYQ==) | `100.00% <0.00%> (ø)` | |
| [...ache/kyuubi/engine/flink/result/OperationUtil.java](https://codecov.io/gh/apache/incubator-kyuubi/pull/1859/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1mbGluay1zcWwtZW5naW5lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL2ZsaW5rL3Jlc3VsdC9PcGVyYXRpb25VdGlsLmphdmE=) | | |
| [...ervice/authentication/EngineSecurityAccessor.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1859/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLWNvbW1vbi9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2aWNlL2F1dGhlbnRpY2F0aW9uL0VuZ2luZVNlY3VyaXR5QWNjZXNzb3Iuc2NhbGE=) | `82.00% <0.00%> (ø)` | |
| [...ation/EngineSecureAuthenticationProviderImpl.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1859/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLWNvbW1vbi9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2aWNlL2F1dGhlbnRpY2F0aW9uL0VuZ2luZVNlY3VyZUF1dGhlbnRpY2F0aW9uUHJvdmlkZXJJbXBsLnNjYWxh) | `0.00% <0.00%> (ø)` | |
| ... and [11 more](https://codecov.io/gh/apache/incubator-kyuubi/pull/1859/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1859?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1859?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [53d59a0...e0b1866](https://codecov.io/gh/apache/incubator-kyuubi/pull/1859?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] SteNicholas commented on a change in pull request #1859: [KYUUBI #1838] Clean up query results after query operations finish
Posted by GitBox <gi...@apache.org>.
SteNicholas commented on a change in pull request #1859:
URL: https://github.com/apache/incubator-kyuubi/pull/1859#discussion_r795180025
##########
File path: externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/ExecuteStatement.scala
##########
@@ -209,6 +218,15 @@ class ExecuteStatement(
setState(OperationState.FINISHED)
}
+ private def cleanupQueryResult(resultId: String): Unit = {
+ try {
+ executor.cancelQuery(sessionId, resultId)
+ } catch {
+ case _: Throwable =>
+ // ignore further exceptions for cleanup
Review comment:
@link3280, I don't think that this should keep aligned with Flink SQL Client. We could log here for the cancel exception so that the users could know canceling query cause the exception which may not cancel successfully.
cc @pan3793
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] link3280 commented on a change in pull request #1859: [KYUUBI #1838] Clean up query results after query operations finish
Posted by GitBox <gi...@apache.org>.
link3280 commented on a change in pull request #1859:
URL: https://github.com/apache/incubator-kyuubi/pull/1859#discussion_r801456097
##########
File path: externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/ExecuteStatement.scala
##########
@@ -209,6 +218,15 @@ class ExecuteStatement(
setState(OperationState.FINISHED)
}
+ private def cleanupQueryResult(resultId: String): Unit = {
+ try {
+ executor.cancelQuery(sessionId, resultId)
+ } catch {
+ case _: Throwable =>
+ // ignore further exceptions for cleanup
Review comment:
@SteNicholas @yanghua Sorry for the late reply. Fixed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] SteNicholas commented on a change in pull request #1859: [KYUUBI #1838] Clean up query results after query operations finish
Posted by GitBox <gi...@apache.org>.
SteNicholas commented on a change in pull request #1859:
URL: https://github.com/apache/incubator-kyuubi/pull/1859#discussion_r795180025
##########
File path: externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/operation/ExecuteStatement.scala
##########
@@ -209,6 +218,15 @@ class ExecuteStatement(
setState(OperationState.FINISHED)
}
+ private def cleanupQueryResult(resultId: String): Unit = {
+ try {
+ executor.cancelQuery(sessionId, resultId)
+ } catch {
+ case _: Throwable =>
+ // ignore further exceptions for cleanup
Review comment:
@link3280, I don't think that this should keep aligned with Flink SQL Client. We could log here for the cancel exception so that the users could know canceling query cause the exception which may not cancel successfully.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org