You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by do...@apache.org on 2023/05/07 20:59:37 UTC
[spark] branch master updated: [SPARK-43181][SQL] Show UI WebURL in `spark-sql` shell
This is an automated email from the ASF dual-hosted git repository.
dongjoon pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push:
new 92ccc60cde5 [SPARK-43181][SQL] Show UI WebURL in `spark-sql` shell
92ccc60cde5 is described below
commit 92ccc60cde5c6da2c08b44096f9a34f19c72aa1a
Author: panbingkun <pb...@gmail.com>
AuthorDate: Sun May 7 13:59:23 2023 -0700
[SPARK-43181][SQL] Show UI WebURL in `spark-sql` shell
### What changes were proposed in this pull request?
The pr aims to display `the Spark WEB UI address` when spark-sql startup.
### Why are the changes needed?
Promoting user experience.
Like `spark-shell`, it would be great if `spark-sql` show the UI information.
```
$ bin/spark-sql
Setting default log level to "WARN".
To adjust logging level use sc.setLogLevel(newLevel). For SparkR, use setLogLevel(newLevel).
23/05/07 13:58:26 WARN NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
23/05/07 13:58:27 WARN HiveConf: HiveConf of name hive.stats.jdbc.timeout does not exist
23/05/07 13:58:27 WARN HiveConf: HiveConf of name hive.stats.retries.wait does not exist
23/05/07 13:58:28 WARN ObjectStore: Version information not found in metastore. hive.metastore.schema.verification is not enabled so recording the schema version 2.3.0
23/05/07 13:58:28 WARN ObjectStore: setMetaStoreSchemaVersion called but recording version is disabled: version = 2.3.0, comment = Set by MetaStore dongjoon127.0.0.1
Spark Web UI available at http://localhost:4040
Spark master: local[*], Application Id: local-1683493106875
spark-sql (default)>
```
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Pass GA & Manually test.
Closes #40844 from panbingkun/SPARK-43181.
Authored-by: panbingkun <pb...@gmail.com>
Signed-off-by: Dongjoon Hyun <do...@apache.org>
---
.../org/apache/spark/sql/hive/thriftserver/SparkSQLCLIDriver.scala | 3 +++
1 file changed, 3 insertions(+)
diff --git a/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLCLIDriver.scala b/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLCLIDriver.scala
index c7c905312b7..2302482bb72 100644
--- a/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLCLIDriver.scala
+++ b/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLCLIDriver.scala
@@ -454,6 +454,9 @@ private[hive] class SparkSQLCLIDriver extends CliDriver with Logging {
def printMasterAndAppId(): Unit = {
val master = SparkSQLEnv.sparkContext.master
val appId = SparkSQLEnv.sparkContext.applicationId
+ SparkSQLEnv.sparkContext.uiWebUrl.foreach {
+ webUrl => console.printInfo(s"Spark Web UI available at $webUrl")
+ }
console.printInfo(s"Spark master: $master, Application Id: $appId")
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org