Skip to content
Closed
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions core/src/main/scala/org/apache/spark/ui/SparkUI.scala
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package org.apache.spark.ui

import java.util.Date

import org.apache.spark.{SecurityManager, SparkConf, SparkContext}
import org.apache.spark.{SecurityManager, SparkConf, SparkContext, SparkException}
import org.apache.spark.internal.Logging
import org.apache.spark.internal.config.UI._
import org.apache.spark.scheduler._
Expand Down Expand Up @@ -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>"

@sarutak sarutak Jun 9, 2020

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about replacing SparkException with NoSuchElementException here?
That method threw NoSuchElementException before #28444 so I think it's better to keep the type of exception.
@HyukjinKwon suggested NoSuchElementException here but finally SparkException is used somehow.

@sarutak sarutak Jun 9, 2020

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tried replacing SparkException with NoSuchElementException as I suggested and I can get the same error message as the screenshot shown here except the type of exception.
nosuchelement

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure , I have replaced SparkException with NoSuchElementException. Please validate

}
}

Expand Down