Skip to content

Commit 8a44b6b

Browse files
zhaomin1423ulysses-you
authored andcommitted
[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 4ca2ec6 [Min Zhao] [KYUUBI #2440] [Improvement] spark engine event add endTime when it is stopped Authored-by: Min Zhao <zhaomin1423@163.com> Signed-off-by: ulysses-you <ulyssesyou@apache.org>
1 parent dcea90b commit 8a44b6b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/SparkSQLEngine.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,8 @@ object SparkSQLEngine extends Logging {
289289
case e: KyuubiException => currentEngine match {
290290
case Some(engine) =>
291291
engine.stop()
292-
val event = EngineEvent(engine).copy(diagnostic = e.getMessage)
292+
val event = EngineEvent(engine)
293+
.copy(endTime = System.currentTimeMillis(), diagnostic = e.getMessage)
293294
EventBus.post(event)
294295
error(event, e)
295296
case _ => error("Current SparkSQLEngine is not created.")

0 commit comments

Comments
 (0)