Skip to content

Commit 0e25f93

Browse files
colinmjjGitHub Enterprise
authored andcommitted
[HADP-53427] AppId is missing when Show extended session (apache#349)
1 parent a2ef87c commit 0e25f93

File tree

1 file changed

+3
-2
lines changed
  • sql/core/src/main/scala/org/apache/spark/sql/execution/command

1 file changed

+3
-2
lines changed

sql/core/src/main/scala/org/apache/spark/sql/execution/command/session.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,9 @@ case class ShowSessionCommand(extended: Boolean = false)
4343
override def run(sparkSession: SparkSession): Seq[Row] = {
4444
val sessionId = sparkSession.sparkContext.getLocalProperty(SparkHadoopUtil.HIVE_SESSION_ID)
4545
if (extended) {
46-
val application = sparkSession.sqlContext.conf.getConfString("spark.yarn.app.id", "");
47-
val queue = sparkSession.sqlContext.conf.getConfString("spark.yarn.queue", "");
46+
val application = System.getProperty("spark.yarn.app.id",
47+
sparkSession.sqlContext.conf.getConfString("spark.yarn.app.id", ""))
48+
val queue = sparkSession.sqlContext.conf.getConfString("spark.yarn.queue", "")
4849
val user = sparkSession.sessionState.catalog.getCurrentUser
4950
Row("session", sessionId, "session id") ::
5051
Row("app", application, "application id") ::

0 commit comments

Comments
 (0)