This is an automated email from the ASF dual-hosted git repository.

ulyssesyou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-kyuubi.git


The following commit(s) were added to refs/heads/master by this push:
     new 8a44b6bfe [KYUUBI #2440] [Improvement] spark engine event add endTime 
when it is stopped
8a44b6bfe is described below

commit 8a44b6bfe0f6f87456f8c56838b07035133a39a6
Author: Min Zhao <[email protected]>
AuthorDate: Mon Apr 25 11:48:38 2022 +0800

    [KYUUBI #2440] [Improvement] spark engine event add endTime when it is 
stopped
    
    ### _Why are the changes needed?_
    
    spark engine event add endTime when it is stopped
    ### _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 #2441 from zhaomin1423/fix_spark_event.
    
    Closes #2440
    
    4ca2ec61 [Min Zhao] [KYUUBI #2440] [Improvement] spark engine event add 
endTime when it is stopped
    
    Authored-by: Min Zhao <[email protected]>
    Signed-off-by: ulysses-you <[email protected]>
---
 .../src/main/scala/org/apache/kyuubi/engine/spark/SparkSQLEngine.scala | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/SparkSQLEngine.scala
 
b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/SparkSQLEngine.scala
index 9b257575f..151733f8b 100644
--- 
a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/SparkSQLEngine.scala
+++ 
b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/SparkSQLEngine.scala
@@ -289,7 +289,8 @@ object SparkSQLEngine extends Logging {
           case e: KyuubiException => currentEngine match {
               case Some(engine) =>
                 engine.stop()
-                val event = EngineEvent(engine).copy(diagnostic = e.getMessage)
+                val event = EngineEvent(engine)
+                  .copy(endTime = System.currentTimeMillis(), diagnostic = 
e.getMessage)
                 EventBus.post(event)
                 error(event, e)
               case _ => error("Current SparkSQLEngine is not created.")

Reply via email to