You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by ul...@apache.org on 2022/02/10 01:36:55 UTC

[incubator-kyuubi] branch branch-1.4 updated: [KYUUBI #1873] Fix incorrect applicationId

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

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


The following commit(s) were added to refs/heads/branch-1.4 by this push:
     new e9fd985  [KYUUBI #1873] Fix incorrect applicationId
e9fd985 is described below

commit e9fd9853de10556233553e2628d3f3fe0e507443
Author: Wang Zhen <wa...@qiyi.com>
AuthorDate: Thu Feb 10 09:36:31 2022 +0800

    [KYUUBI #1873] Fix incorrect applicationId
    
    <!--
    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.
    -->
    
    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 <wa...@qiyi.com>
    Signed-off-by: ulysses-you <ul...@apache.org>
    (cherry picked from commit e75166fe7a6846fce57dd4f14aebbbd2903eeb0f)
    Signed-off-by: ulysses-you <ul...@apache.org>
---
 .../main/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 84a415c..bfd0274 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
@@ -28,8 +28,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