Skip to content
Snippets Groups Projects
Commit 6dbfc407 authored by Raafat Akkad's avatar Raafat Akkad Committed by Andrew Or
Browse files

[SPARK-13052] waitingApps metric doesn't show the number of apps currently in the WAITING state

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

Closes #10959 from RaafatAkkad/master.
parent 7a4b37f0
No related branches found
No related tags found
No related merge requests found
......@@ -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]
......
......@@ -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% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment