You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/06/09 16:41:49 UTC

[GitHub] [spark] SaurabhChawla100 commented on a change in pull request #28768: [SPARK-31941][CORE]Add the code change to handle the SparkException

SaurabhChawla100 commented on a change in pull request #28768:
URL: https://github.com/apache/spark/pull/28768#discussion_r437290253



##########
File path: core/src/main/scala/org/apache/spark/ui/SparkUI.scala
##########
@@ -86,6 +86,7 @@ private[spark] class SparkUI private (
         .orElse(store.environmentInfo().systemProperties.toMap.get("user.name"))
         .getOrElse("<unknown>")
     } catch {
+      case sparkException: SparkException => "<unknown>"
       case _: NoSuchElementException => "<unknown>"

Review comment:
       this is needed since store.environmentInfo() , can throw NoSuchElementException 

##########
File path: core/src/main/scala/org/apache/spark/ui/SparkUI.scala
##########
@@ -86,6 +86,7 @@ private[spark] class SparkUI private (
         .orElse(store.environmentInfo().systemProperties.toMap.get("user.name"))
         .getOrElse("<unknown>")
     } catch {
+      case sparkException: SparkException => "<unknown>"
       case _: NoSuchElementException => "<unknown>"

Review comment:
       done

##########
File path: core/src/main/scala/org/apache/spark/ui/SparkUI.scala
##########
@@ -86,7 +86,7 @@ private[spark] class SparkUI private (
         .orElse(store.environmentInfo().systemProperties.toMap.get("user.name"))
         .getOrElse("<unknown>")
     } catch {
-      case _: NoSuchElementException => "<unknown>"
+      case _: SparkException => "<unknown>"

Review comment:
       Sure , I have replaced SparkException with NoSuchElementException. Please validate




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org