-
Notifications
You must be signed in to change notification settings - Fork 28.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SPARK-23121][core] Fix for ui becoming unaccessible for long running streaming apps #20330
Changes from 6 commits
94d50b4
d60ae4f
832378d
6525ef4
d5fdabb
f19d3a1
c733ac9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,12 +23,10 @@ import java.util.concurrent.TimeUnit | |
import javax.servlet.http.HttpServletRequest | ||
|
||
import scala.collection.mutable.{HashMap, HashSet} | ||
import scala.xml.{Elem, Node, Unparsed} | ||
import scala.xml.{Node, Unparsed} | ||
|
||
import org.apache.commons.lang3.StringEscapeUtils | ||
|
||
import org.apache.spark.SparkConf | ||
import org.apache.spark.internal.config._ | ||
import org.apache.spark.scheduler.TaskLocality | ||
import org.apache.spark.status._ | ||
import org.apache.spark.status.api.v1._ | ||
|
@@ -1002,4 +1000,12 @@ private object ApiHelper { | |
} | ||
} | ||
|
||
def lastStageNameAndDescription(store: AppStatusStore, job: JobData): (String, String) = { | ||
store.asOption(store.lastStageAttempt(job.stageIds.max)) match { | ||
case Some(lastStageAttempt) => | ||
(lastStageAttempt.name, lastStageAttempt.description.getOrElse(job.name)) | ||
case None => ("", "") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Before, you were doing Now, when the last stage is not in the store, the call site is getting an empty string as the description, instead of using the job name. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This would probably be simpler:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed, thanks for catching. |
||
} | ||
} | ||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to check for empty description here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lastStageDescription
may be empty, but it will not cause problems,makeDescription
will handle it properly, just like in the version before lastStageAttempt was used:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, but don't you want the same behavior as above here (falling back to the job name)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've moved this logic to
lastStageNameAndDescription
, so it's uniform.