Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
ae0b8b2
SPARK-7889 cache with initial unit tests
steveloughran Jun 22, 2015
72945e2
SPARK-7889 cache tests of refresh interval working.
steveloughran Jun 22, 2015
6764f49
SPARK-7889 switch to explicit scan of SparkUI attempts to determine c…
steveloughran Jun 22, 2015
bd47afb
SPARK-7889 use spark.history.cache.interval as config option; set def…
steveloughran Jun 22, 2015
aaadf64
SPARK-7889 resync with trunk & slightly improve code layout
steveloughran Nov 23, 2015
fe6d9e0
SPARK-7889 scalastyle
steveloughran Nov 23, 2015
f69d391
SPARK-7889 scalastyle on ApplicationCacheSuite
steveloughran Nov 23, 2015
334fc91
SPARK-7889 cleanup of comments and imports & the like
steveloughran Nov 23, 2015
c19fee2
SPARK-7889 intermin checkpoint on changes; about to move cache map fr…
steveloughran Nov 24, 2015
ec5b652
SPARK-7889 Cache designed to ask history server/provider for updates;…
steveloughran Nov 24, 2015
feda232
SPARK-7889 playing losing battles with a test
steveloughran Nov 24, 2015
04d8c64
SPARK-7889 test working, verified other tests in package work, review…
steveloughran Nov 24, 2015
9a7ca9f
SPARK-7889 - stylecheck on tests apparently skipped on mvn
steveloughran Nov 24, 2015
a1024aa
SPARK-7889 style and javadoc only
steveloughran Nov 25, 2015
6e0e26d
SPARK-7889 pull out metrics into own class, make visible for testing
steveloughran Nov 25, 2015
b3c7069
history server web UI update test from @squito
steveloughran Nov 25, 2015
ea2afbb
SPARK-7889 more on the cache suite tests: there is no evidence that e…
steveloughran Nov 25, 2015
d113c5b
SPARK-7889: tests to make sure app eviction is taking place and that …
steveloughran Nov 25, 2015
a128d8c
SPARK-7889 code style check
steveloughran Nov 25, 2015
f1c7fe5
SPARK-7889: adding return type of tests embedded inside a test method…
steveloughran Nov 25, 2015
07f1af4
SPARK-7889 starting to add web filters
steveloughran Dec 1, 2015
a33bdd7
SPARK-7889 ongoing test dev. Looks like the history provider isn't pi…
steveloughran Dec 1, 2015
9166ba6
SPARK-7889: looks like the test is failing because a new history isn'…
steveloughran Dec 1, 2015
523390a
SPARK-7889 address scalastyle warnings
steveloughran Dec 1, 2015
9831ad4
SPARK-7889 : we aren't getting an updated log file on the second para…
steveloughran Dec 1, 2015
6fdaab1
SPARK-7889: filesize update time included in probe; update thread als…
steveloughran Dec 2, 2015
163e218
SPARK-7889: not all filesystems update modtime on a rename; the Event…
steveloughran Dec 2, 2015
bc3a2e3
SPARK-7889 cache update works in tests -unreliably. Traces imply that…
steveloughran Dec 3, 2015
f81cfe1
SPARK-7889 still looking at a race condition in the test. This adds m…
steveloughran Dec 3, 2015
78a463e
SPARK-7889 moved off time differences to a simple generational counte…
steveloughran Dec 3, 2015
61e2e8b
SPARK-7889: this extends the test with
steveloughran Dec 3, 2015
aab129f
SPARK-7889 remove obsolete method that had been commented out
steveloughran Dec 3, 2015
76e7a27
SPARK-7889 review work, plus update documentation for this change and…
steveloughran Dec 4, 2015
5e583db
SPARK-7889 review changes
steveloughran Dec 8, 2015
cfa080c
SPARK-7889 review suggestions, especially removing all timestamp info…
steveloughran Dec 8, 2015
f6bd84d
[SPARK-7889] add a check of the REST API's app/jobs link too
steveloughran Dec 23, 2015
de940d7
[SPARK-7889]: provider is required to return a probe to be invoked d…
steveloughran Dec 23, 2015
4cf3b23
[SPARK-7889] review comments
steveloughran Dec 23, 2015
e99af36
SPARK-7889 lookup with handling for NoSuchElement moved into Applicat…
steveloughran Jan 13, 2016
5091e92
SPARK-7889 javadocs
steveloughran Jan 15, 2016
9f2318d
SPARK-7889 update probe is now a simple () => Boolean function
steveloughran Jan 20, 2016
d258445
[SPARK-7889] cleanup up merges after rebase. Test now failing
steveloughran Feb 4, 2016
c0250e6
[SPARK-7889] minor diagnostics enhancements; cause of test failures i…
steveloughran Feb 4, 2016
2e461e8
[SPARK-7889] working on tests
steveloughran Feb 4, 2016
80fbcf2
[SPARK-7889] switch to JSON API for listing incomplete/complete apps
steveloughran Feb 5, 2016
728b12c
[SPARK-7889] add squito's code & test for redirection on ? parameters
steveloughran Feb 5, 2016
ecbf483
[SPARK-7889] new scalastyle import check faiing
steveloughran Feb 8, 2016
df4b284
SPARK-7889 rm unused functions in test
steveloughran Feb 9, 2016
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

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,42 @@ private[spark] case class ApplicationAttemptInfo(
private[spark] case class ApplicationHistoryInfo(
id: String,
name: String,
attempts: List[ApplicationAttemptInfo])
attempts: List[ApplicationAttemptInfo]) {

/**
* Has this application completed?
* @return true if the most recent attempt has completed
*/
def completed: Boolean = {
attempts.nonEmpty && attempts.head.completed
}
}

/**
* A probe which can be invoked to see if a loaded Web UI has been updated.
* The probe is expected to be relative purely to that of the UI returned
* in the same [[LoadedAppUI]] instance. That is, whenever a new UI is loaded,
* the probe returned with it is the one that must be used to check for it
* being out of date; previous probes must be discarded.
*/
private[history] abstract class HistoryUpdateProbe {
/**
* Return true if the history provider has a later version of the application
* attempt than the one against this probe was constructed.
* @return
*/
def isUpdated(): Boolean
}

/**
* All the information returned from a call to `getAppUI()`: the new UI
* and any required update state.
* @param ui Spark UI
* @param updateProbe probe to call to check on the update state of this application attempt
*/
private[history] case class LoadedAppUI(
ui: SparkUI,
updateProbe: () => Boolean)

private[history] abstract class ApplicationHistoryProvider {

Expand All @@ -49,9 +84,10 @@ private[history] abstract class ApplicationHistoryProvider {
*
* @param appId The application ID.
* @param attemptId The application attempt ID (or None if there is no attempt ID).
* @return The application's UI, or None if application is not found.
* @return a [[LoadedAppUI]] instance containing the application's UI and any state information
* for update probes, or `None` if the application/attempt is not found.
*/
def getAppUI(appId: String, attemptId: Option[String]): Option[SparkUI]
def getAppUI(appId: String, attemptId: Option[String]): Option[LoadedAppUI]

/**
* Called when the server is shutting down.
Expand Down
Loading