Github user steveloughran commented on a diff in the pull request:
https://github.com/apache/spark/pull/6935#discussion_r46673155
--- Diff:
core/src/main/scala/org/apache/spark/deploy/history/FsHistoryProvider.scala ---
@@ -175,18 +180,34 @@ private[history] class FsHistoryProvider(conf:
SparkConf, clock: Clock)
// Disable the background thread during tests.
if (!conf.contains("spark.testing")) {
// A task that periodically checks for event log updates on disk.
+ logDebug(s"Scheduling update thread every $UPDATE_INTERVAL_S
seconds")
pool.scheduleWithFixedDelay(getRunner(checkForLogs), 0,
UPDATE_INTERVAL_S, TimeUnit.SECONDS)
if (conf.getBoolean("spark.history.fs.cleaner.enabled", false)) {
// A task that periodically cleans event logs on disk.
pool.scheduleWithFixedDelay(getRunner(cleanLogs), 0,
CLEAN_INTERVAL_S, TimeUnit.SECONDS)
}
+ } else {
+ logDebug("Background update thread disabled for testing")
}
}
override def getListing(): Iterable[FsApplicationHistoryInfo] =
applications.values
- override def getAppUI(appId: String, attemptId: Option[String]):
Option[SparkUI] = {
+ /**
+ * Look up an application attempt
+ * @param appId application ID
+ * @param attemptId Attempt ID, if set
+ * @return the matching attempt, if found
+ */
+ def lookup(appId: String, attemptId: Option[String]):
Option[FsApplicationAttemptInfo] = {
+ applications.get(appId).flatMap { appInfo =>
+ appInfo.attempts.find(_.attemptId == attemptId)
+ }
+ }
+
+ override def getAppUI(appId: String, attemptId: Option[String])
+ : Option[(SparkUI, Long, Option[Any])] = {
--- End diff --
yeah, I was thinking that as more stuff went in...
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]