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



##########
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:
       How about replacing `SparkException` with `NoSuchElementException` 
[here](https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/status/AppStatusStore.scala#L45)?
   That method threw `NoSuchException` before #28444 so I think it's better to 
keep the type of exception.
   @HyukjinKwon suggested `NoSuchException` 
[here](https://github.com/apache/spark/pull/28444#discussion_r423451687) but 
finally `SparkException` is used somehow.

##########
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:
       How about replacing `SparkException` with `NoSuchElementException` 
[here](https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/status/AppStatusStore.scala#L45)?
   That method threw `NoSuchElementException` before #28444 so I think it's 
better to keep the type of exception.
   @HyukjinKwon suggested `NoSuchElementException` 
[here](https://github.com/apache/spark/pull/28444#discussion_r423451687) but 
finally `SparkException` is used somehow.

##########
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:
       I've tried replacing `SparkException` with `NoSuchException` as I 
suggested and I can get the same error message as the screenshot shown 
[here](https://github.com/apache/spark/pull/28444#issuecomment-627630639) 
except the type of exception.
   <img width="1151" alt="nosuchelement" 
src="https://user-images.githubusercontent.com/4736016/84170749-efaaba00-aab4-11ea-9313-44c0ce3e1e2e.png";>
   

##########
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:
       I've tried replacing `SparkException` with `NoSuchElementException` as I 
suggested and I can get the same error message as the screenshot shown 
[here](https://github.com/apache/spark/pull/28444#issuecomment-627630639) 
except the type of exception.
   <img width="1151" alt="nosuchelement" 
src="https://user-images.githubusercontent.com/4736016/84170749-efaaba00-aab4-11ea-9313-44c0ce3e1e2e.png";>
   




----------------------------------------------------------------
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to