Github user arunmahadevan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21622#discussion_r198248243
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/MetricsReporter.scala
 ---
    @@ -39,6 +42,23 @@ class MetricsReporter(
       registerGauge("processingRate-total", _.processedRowsPerSecond, 0.0)
       registerGauge("latency", 
_.durationMs.get("triggerExecution").longValue(), 0L)
     
    +  private val timestampFormat = new 
SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'") // ISO8601
    +  timestampFormat.setTimeZone(DateTimeUtils.getTimeZone("UTC"))
    +
    +  registerGauge("eventTime-watermark",
    +    s => convertStringDateToMillis(s.eventTime.get("watermark")), 0L)
    --- End diff --
    
    1. nit: rename `s` => `progress` to make it clear.
    2. The eventTime-watermark metrics needs to be reported only if the map is 
not empty (event time). Could be skipped if the map is empty (processing time) 
to avoid confusion.



---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to