From e75166fe7a6846fce57dd4f14aebbbd2903eeb0f Mon Sep 17 00:00:00 2001 From: Wang Zhen Date: Thu, 10 Feb 2022 09:36:31 +0800 Subject: [PATCH] [KYUUBI #1873] Fix incorrect applicationId ### _Why are the changes needed?_ fix #1873 ### _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 ![image](https://user-images.githubusercontent.com/17894939/153183584-d90f8038-4f6c-4c08-955f-275788b4cffd.png) - [X] [Run test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request Closes #1882 from wForget/KYUUBI-1873. Closes #1873 5d925cf9 [Wang Zhen] [KYUUBI-1873] Fix incorrect applicationId Authored-by: Wang Zhen Signed-off-by: ulysses-you --- .../scala/org/apache/kyuubi/engine/spark/KyuubiSparkUtil.scala | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/KyuubiSparkUtil.scala b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/KyuubiSparkUtil.scala index 053985821..51752d021 100644 --- a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/KyuubiSparkUtil.scala +++ b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/KyuubiSparkUtil.scala @@ -31,8 +31,7 @@ object KyuubiSparkUtil { def globalSparkContext: SparkContext = SparkSession.active.sparkContext - def engineId: String = - globalSparkContext.applicationAttemptId.getOrElse(globalSparkContext.applicationId) + def engineId: String = globalSparkContext.applicationId lazy val diagnostics: String = { val sc = globalSparkContext