Skip to content

Commit 010fbb5

Browse files
committed
Merge pull request apache#43 in BDP/apache-spark from fix_threadpool_metric to netflix/2.1.1-unstable
Squashed commit of the following: commit 9f19629b14cb9823c0115399a43a8116efbe1145 Author: Davis Shepherd <[email protected]> Date: Wed Sep 19 12:20:22 2018 -0700 NETFLIX-BUILD: Expose largest threadPool size in executor metrics
1 parent 5046e81 commit 010fbb5

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

core/src/main/scala/org/apache/spark/executor/ExecutorSource.scala

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,17 @@ class ExecutorSource(threadPool: ThreadPoolExecutor, executorId: String) extends
5858
override def getValue: Int = threadPool.getPoolSize()
5959
})
6060

61-
// Gauge got executor thread pool's largest number of threads that have ever simultaneously
62-
// been in th pool
61+
// Gauge for executor thread pool's maximum allowed number of threads
6362
metricRegistry.register(MetricRegistry.name("threadpool", "maxPool_size"), new Gauge[Int] {
6463
override def getValue: Int = threadPool.getMaximumPoolSize()
6564
})
6665

66+
// Gauge for executor thread pool's largest number of threads that have ever simultaneously
67+
// been in the pool
68+
metricRegistry.register(MetricRegistry.name("threadpool", "largestPool_size"), new Gauge[Int] {
69+
override def getValue: Int = threadPool.getLargestPoolSize()
70+
})
71+
6772
// Gauge for file system stats of this executor
6873
for (scheme <- Array("hdfs", "file")) {
6974
registerFileSystemStat(scheme, "read_bytes", _.getBytesRead(), 0L)

0 commit comments

Comments
 (0)