Github user zsxwing commented on a diff in the pull request:
https://github.com/apache/spark/pull/20189#discussion_r160829544
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/MetricsReporter.scala
---
@@ -39,14 +35,18 @@ class MetricsReporter(
// Metric names should not have . in them, so that all the metrics of a
query are identified
// together in Ganglia as a single metric group
- registerGauge("inputRate-total", () =>
stream.lastProgress.inputRowsPerSecond)
- registerGauge("processingRate-total", () =>
stream.lastProgress.processedRowsPerSecond)
- registerGauge("latency", () =>
stream.lastProgress.durationMs.get("triggerExecution").longValue())
-
- private def registerGauge[T](name: String, f: () => T)(implicit num:
Numeric[T]): Unit = {
+ registerGauge("inputRate-total", (lastProgress) =>
lastProgress.inputRowsPerSecond, 0.0)
--- End diff --
nit: `registerGauge("inputRate-total", _.inputRowsPerSecond, 0.0)`
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]