Skip to content

Commit

Permalink
[SPARK-13052] waitingApps metric doesn't show the number of apps curr…
Browse files Browse the repository at this point in the history
…ently in the WAITING state

Author: Raafat Akkad <raafat.akkad@gmail.com>

Closes #10959 from RaafatAkkad/master.
  • Loading branch information
RaafatAkkad authored and Andrew Or committed Feb 5, 2016
1 parent 7a4b37f commit 6dbfc40
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ private[deploy] class Master(

val workers = new HashSet[WorkerInfo]
val idToApp = new HashMap[String, ApplicationInfo]
val waitingApps = new ArrayBuffer[ApplicationInfo]
private val waitingApps = new ArrayBuffer[ApplicationInfo]
val apps = new HashSet[ApplicationInfo]

private val idToWorker = new HashMap[String, WorkerInfo]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ private[spark] class MasterSource(val master: Master) extends Source {

// Gauge for waiting application numbers in cluster
metricRegistry.register(MetricRegistry.name("waitingApps"), new Gauge[Int] {
override def getValue: Int = master.waitingApps.size
override def getValue: Int = master.apps.filter(_.state == ApplicationState.WAITING).size
})
}

0 comments on commit 6dbfc40

Please sign in to comment.