Skip to content


== [[ApplicationCache]] ApplicationCache

ApplicationCache is...FIXME

ApplicationCache is <> exclusively when HistoryServer is[created].

ApplicationCache uses[Google Guava 14.0.1] library for the internal <>.

[[internal-registries]] .ApplicationCache's Internal Properties (e.g. Registries, Counters and Flags) [cols="1,2",options="header",width="100%"] |=== | Name | Description

| appLoader | [[appLoader]] Google Guava's[CacheLoader] with a custom ++[load] which is simply <>.

Used when...FIXME

| removalListener | [[removalListener]]

| appCache a| [[appCache]] Google Guava's[LoadingCache] of CacheKey keys and CacheEntry entries

Used when ApplicationCache is requested for the following:

  • <> given appId and attemptId IDs

  • FIXME (other uses)

| metrics | [[metrics]] |===

=== [[creating-instance]] Creating ApplicationCache Instance

ApplicationCache takes the following when created:

  • [[operations]][ApplicationCacheOperations]
  • [[retainedApplications]] retainedApplications
  • [[clock]] Clock

ApplicationCache initializes the <>.

=== [[loadApplicationEntry]] loadApplicationEntry Internal Method

[source, scala]

loadApplicationEntry(appId: String, attemptId: Option[String]): CacheEntry


NOTE: loadApplicationEntry is used exclusively when ApplicationCache is requested to <>.

=== [[load]] Loading Cached Spark Application UI -- load Method

[source, scala]

load(key: CacheKey): CacheEntry

NOTE: load is part of Google Guava's[CacheLoader] to retrieve a CacheEntry, based on a CacheKey, for <>.

load simply relays to <> with the appId and attemptId of the input CacheKey.

=== [[get]] Requesting Cached UI of Spark Application (CacheEntry) -- get Method

[source, scala]

get(appId: String, attemptId: Option[String] = None): CacheEntry


NOTE: get is used exclusively when ApplicationCache is requested to <>.

=== [[withSparkUI]] Executing Closure While Holding Application's UI Read Lock -- withSparkUI Method

[source, scala]

withSparkUIT(fn: SparkUI => T): T


NOTE: withSparkUI is used when HistoryServer is requested to[withSparkUI] and[loadAppUi].