You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by an...@apache.org on 2016/02/05 01:09:35 UTC

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

Repository: spark
Updated Branches:
  refs/heads/master 7a4b37f02 -> 6dbfc4077


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

Author: Raafat Akkad <ra...@gmail.com>

Closes #10959 from RaafatAkkad/master.


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/6dbfc407
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/6dbfc407
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/6dbfc407

Branch: refs/heads/master
Commit: 6dbfc40776514c3a5667161ebe7829f4cc9c7529
Parents: 7a4b37f
Author: Raafat Akkad <ra...@gmail.com>
Authored: Thu Feb 4 16:09:31 2016 -0800
Committer: Andrew Or <an...@databricks.com>
Committed: Thu Feb 4 16:09:31 2016 -0800

----------------------------------------------------------------------
 core/src/main/scala/org/apache/spark/deploy/master/Master.scala    | 2 +-
 .../main/scala/org/apache/spark/deploy/master/MasterSource.scala   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/6dbfc407/core/src/main/scala/org/apache/spark/deploy/master/Master.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/org/apache/spark/deploy/master/Master.scala b/core/src/main/scala/org/apache/spark/deploy/master/Master.scala
index 202a1b7..0f11f68 100644
--- a/core/src/main/scala/org/apache/spark/deploy/master/Master.scala
+++ b/core/src/main/scala/org/apache/spark/deploy/master/Master.scala
@@ -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]

http://git-wip-us.apache.org/repos/asf/spark/blob/6dbfc407/core/src/main/scala/org/apache/spark/deploy/master/MasterSource.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/org/apache/spark/deploy/master/MasterSource.scala b/core/src/main/scala/org/apache/spark/deploy/master/MasterSource.scala
index 66a9ff3..39b2647 100644
--- a/core/src/main/scala/org/apache/spark/deploy/master/MasterSource.scala
+++ b/core/src/main/scala/org/apache/spark/deploy/master/MasterSource.scala
@@ -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
   })
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org