You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by GitBox <gi...@apache.org> on 2022/06/12 15:37:39 UTC

[GitHub] [incubator-kyuubi] wForget opened a new pull request, #2860: [KYUUBI #2854] Add exception field in KyuubiSessionEvent

wForget opened a new pull request, #2860:
URL: https://github.com/apache/incubator-kyuubi/pull/2860

   <!--
   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 ...'.
   -->
   
   ### _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.
   -->
   
   close #2854 
   
   ### _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
   


-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [incubator-kyuubi] pan3793 commented on a diff in pull request #2860: [KYUUBI #2854] Add exception field in KyuubiSessionEvent

Posted by GitBox <gi...@apache.org>.
pan3793 commented on code in PR #2860:
URL: https://github.com/apache/incubator-kyuubi/pull/2860#discussion_r895212111


##########
kyuubi-server/src/main/scala/org/apache/kyuubi/events/KyuubiSessionEvent.scala:
##########
@@ -52,7 +52,8 @@ case class KyuubiSessionEvent(
     var engineId: String = "",
     var openedTime: Long = -1L,
     var endTime: Long = -1L,
-    var totalOperations: Int = 0) extends KyuubiEvent {
+    var totalOperations: Int = 0,
+    var exception: Option[Throwable] = None) extends KyuubiEvent {

Review Comment:
   The scaladoc is outdated



-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [incubator-kyuubi] wForget commented on pull request #2860: [KYUUBI #2854] Add exception field in KyuubiSessionEvent

Posted by GitBox <gi...@apache.org>.
wForget commented on PR #2860:
URL: https://github.com/apache/incubator-kyuubi/pull/2860#issuecomment-1153556495

   irrelevant failure
   ```
   StatementSuite:
   - test select *** FAILED ***
     java.sql.SQLException: org.apache.kyuubi.KyuubiSQLException: Error operating EXECUTE_STATEMENT: java.sql.SQLException: errCode = 2, detailMessage = Failed to find enough host with storage medium and tag(HDD/{"location" : "default"}) in all backends. need: 1
   	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129)
   	at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
   	at com.mysql.cj.jdbc.StatementImpl.executeInternal(StatementImpl.java:768)
   	at com.mysql.cj.jdbc.StatementImpl.execute(StatementImpl.java:653)
   	at org.apache.kyuubi.engine.jdbc.operation.ExecuteStatement.org$apache$kyuubi$engine$jdbc$operation$ExecuteStatement$$executeStatement(ExecuteStatement.scala:60)
   	at org.apache.kyuubi.engine.jdbc.operation.ExecuteStatement$$anon$1.run(ExecuteStatement.scala:43)
   	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
   	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
   	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
   	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
   	at java.lang.Thread.run(Thread.java:750)
   	at org.apache.kyuubi.KyuubiSQLException$.apply(KyuubiSQLException.scala:69)
   	at org.apache.kyuubi.engine.jdbc.operation.JdbcOperation$$anonfun$onError$1.applyOrElse(JdbcOperation.scala:84)
   	at org.apache.kyuubi.engine.jdbc.operation.JdbcOperation$$anonfun$onError$1.applyOrElse(JdbcOperation.scala:69)
   	at scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:38)
   	at org.apache.kyuubi.engine.jdbc.operation.ExecuteStatement.org$apache$kyuubi$engine$jdbc$operation$ExecuteStatement$$executeStatement(ExecuteStatement.scala:88)
   	at org.apache.kyuubi.engine.jdbc.operation.ExecuteStatement$$anon$1.run(ExecuteStatement.scala:43)
   	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
   	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
   	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
   	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
   	at java.lang.Thread.run(Thread.java:750)
   Caused by: java.sql.SQLException: errCode = 2, detailMessage = Failed to find enough host with storage medium and tag(HDD/{"location" : "default"}) in all backends. need: 1
   	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129)
   	at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
   	at com.mysql.cj.jdbc.StatementImpl.executeInternal(StatementImpl.java:768)
   	at com.mysql.cj.jdbc.StatementImpl.execute(StatementImpl.java:653)
   	at org.apache.kyuubi.engine.jdbc.operation.ExecuteStatement.org$apache$kyuubi$engine$jdbc$operation$ExecuteStatement$$executeStatement(ExecuteStatement.scala:60)
   	... 6 more
     at org.apache.kyuubi.jdbc.hive.KyuubiStatement.waitForOperationToComplete(KyuubiStatement.java:354)
     at org.apache.kyuubi.jdbc.hive.KyuubiStatement.executeWithConfOverlay(KyuubiStatement.java:200)
     at org.apache.kyuubi.jdbc.hive.KyuubiStatement.execute(KyuubiStatement.java:194)
     at org.apache.kyuubi.engine.jdbc.doris.StatementSuite.$anonfun$new$2(StatementSuite.scala:29)
     at org.apache.kyuubi.engine.jdbc.doris.StatementSuite.$anonfun$new$2$adapted(StatementSuite.scala:24)
     at org.apache.kyuubi.operation.JDBCTestHelper.$anonfun$withMultipleConnectionJdbcStatement$3(JDBCTestHelper.scala:60)
     at org.apache.kyuubi.operation.JDBCTestHelper.$anonfun$withMultipleConnectionJdbcStatement$3$adapted(JDBCTestHelper.scala:60)
     at scala.collection.mutable.ResizableArray.foreach(ResizableArray.scala:62)
     at scala.collection.mutable.ResizableArray.foreach$(ResizableArray.scala:55)
     at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:49)
     ...
   ```


-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [incubator-kyuubi] pan3793 commented on pull request #2860: [KYUUBI #2854] Add exception field in KyuubiSessionEvent

Posted by GitBox <gi...@apache.org>.
pan3793 commented on PR #2860:
URL: https://github.com/apache/incubator-kyuubi/pull/2860#issuecomment-1157262489

   Thanks, merging to master


-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [incubator-kyuubi] wForget commented on a diff in pull request #2860: [KYUUBI #2854] Add exception field in KyuubiSessionEvent

Posted by GitBox <gi...@apache.org>.
wForget commented on code in PR #2860:
URL: https://github.com/apache/incubator-kyuubi/pull/2860#discussion_r895350096


##########
kyuubi-server/src/main/scala/org/apache/kyuubi/events/KyuubiSessionEvent.scala:
##########
@@ -52,7 +52,8 @@ case class KyuubiSessionEvent(
     var engineId: String = "",
     var openedTime: Long = -1L,
     var endTime: Long = -1L,
-    var totalOperations: Int = 0) extends KyuubiEvent {
+    var totalOperations: Int = 0,
+    var exception: Option[Throwable] = None) extends KyuubiEvent {

Review Comment:
   > scaladoc
   
   thanks, updated



-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [incubator-kyuubi] wForget commented on a diff in pull request #2860: [KYUUBI #2854] Add exception field in KyuubiSessionEvent

Posted by GitBox <gi...@apache.org>.
wForget commented on code in PR #2860:
URL: https://github.com/apache/incubator-kyuubi/pull/2860#discussion_r896818922


##########
kyuubi-server/src/main/scala/org/apache/kyuubi/session/KyuubiSession.scala:
##########
@@ -34,4 +34,14 @@ abstract class KyuubiSession(
 
   def getSessionEvent: Option[KyuubiSessionEvent]
 
+  private[kyuubi] def handleSessionException(f: => Unit): Unit = {
+    try {
+      f
+    } catch {
+      case t: Throwable =>
+        getSessionEvent.foreach(_.exception = Some(t))
+        throw t
+    }
+  }
+

Review Comment:
   fixed, thanks



-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [incubator-kyuubi] pan3793 closed pull request #2860: [KYUUBI #2854] Add exception field in KyuubiSessionEvent

Posted by GitBox <gi...@apache.org>.
pan3793 closed pull request #2860: [KYUUBI #2854] Add exception field in KyuubiSessionEvent
URL: https://github.com/apache/incubator-kyuubi/pull/2860


-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [incubator-kyuubi] cxzl25 commented on a diff in pull request #2860: [KYUUBI #2854] Add exception field in KyuubiSessionEvent

Posted by GitBox <gi...@apache.org>.
cxzl25 commented on code in PR #2860:
URL: https://github.com/apache/incubator-kyuubi/pull/2860#discussion_r896374993


##########
kyuubi-server/src/main/scala/org/apache/kyuubi/session/KyuubiSession.scala:
##########
@@ -34,4 +34,14 @@ abstract class KyuubiSession(
 
   def getSessionEvent: Option[KyuubiSessionEvent]
 
+  private[kyuubi] def handleSessionException(f: => Unit): Unit = {
+    try {
+      f
+    } catch {
+      case t: Throwable =>
+        getSessionEvent.foreach(_.exception = Some(t))
+        throw t
+    }
+  }
+

Review Comment:
   nit: remove empty line L46



-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [incubator-kyuubi] codecov-commenter commented on pull request #2860: [KYUUBI #2854] Add exception field in KyuubiSessionEvent

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #2860:
URL: https://github.com/apache/incubator-kyuubi/pull/2860#issuecomment-1153238369

   # [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/2860?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 [#2860](https://codecov.io/gh/apache/incubator-kyuubi/pull/2860?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (d71c1f2) into [master](https://codecov.io/gh/apache/incubator-kyuubi/commit/ce56d700707434e6c3ee22952ab86121897e1d78?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (ce56d70) will **decrease** coverage by `0.00%`.
   > The diff coverage is `100.00%`.
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #2860      +/-   ##
   ============================================
   - Coverage     63.32%   63.32%   -0.01%     
     Complexity      205      205              
   ============================================
     Files           485      485              
     Lines         21692    21700       +8     
     Branches       2859     2860       +1     
   ============================================
   + Hits          13737    13742       +5     
   - Misses         6655     6656       +1     
   - Partials       1300     1302       +2     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-kyuubi/pull/2860?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [.../org/apache/kyuubi/events/KyuubiSessionEvent.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/2860/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-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9ldmVudHMvS3l1dWJpU2Vzc2lvbkV2ZW50LnNjYWxh) | `93.54% <100.00%> (+0.21%)` | :arrow_up: |
   | [...g/apache/kyuubi/operation/BatchJobSubmission.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/2860/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-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9vcGVyYXRpb24vQmF0Y2hKb2JTdWJtaXNzaW9uLnNjYWxh) | `76.00% <100.00%> (+0.83%)` | :arrow_up: |
   | [...ala/org/apache/kyuubi/operation/LaunchEngine.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/2860/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-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9vcGVyYXRpb24vTGF1bmNoRW5naW5lLnNjYWxh) | `90.32% <100.00%> (+0.32%)` | :arrow_up: |
   | [...cala/org/apache/kyuubi/session/KyuubiSession.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/2860/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-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXNzaW9uL0t5dXViaVNlc3Npb24uc2NhbGE=) | `100.00% <100.00%> (ø)` | |
   | [.../org/apache/kyuubi/operation/KyuubiOperation.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/2860/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-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9vcGVyYXRpb24vS3l1dWJpT3BlcmF0aW9uLnNjYWxh) | `68.00% <0.00%> (-1.34%)` | :arrow_down: |
   | [.../engine/spark/session/SparkSQLSessionManager.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/2860/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-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9zZXNzaW9uL1NwYXJrU1FMU2Vzc2lvbk1hbmFnZXIuc2NhbGE=) | `79.01% <0.00%> (-1.24%)` | :arrow_down: |
   | [...he/kyuubi/engine/spark/shim/CatalogShim\_v3\_0.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/2860/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-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9zaGltL0NhdGFsb2dTaGltX3YzXzAuc2NhbGE=) | `88.04% <0.00%> (-0.85%)` | :arrow_down: |
   | [...in/scala/org/apache/kyuubi/config/KyuubiConf.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/2860/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-a3l1dWJpLWNvbW1vbi9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9jb25maWcvS3l1dWJpQ29uZi5zY2FsYQ==) | `96.89% <0.00%> (-0.11%)` | :arrow_down: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/2860?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/2860?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 [ce56d70...d71c1f2](https://codecov.io/gh/apache/incubator-kyuubi/pull/2860?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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org