tgravescs commented on a change in pull request #26843:
[SPARK-30209][SQL][WEB-UI] Display stageId, attemptId and taskId for max
metrics in Spark UI.
URL: https://github.com/apache/spark/pull/26843#discussion_r356615733
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/metric/SQLMetrics.scala
##########
@@ -142,31 +145,44 @@ object SQLMetrics {
// probe avg (min, med, max):
// (1.2, 2.2, 6.3)
val acc = new SQLMetric(AVERAGE_METRIC)
- acc.register(sc, name = Some(s"$name (min, med, max)"), countFailedValues
= false)
+ acc.register(sc, name = Some(s"$name (min, med,
max(stageId(attemptId):taskId)"),
+ countFailedValues = false)
acc
}
+ private def toNumberFormat(value: Long): String = {
+ val numberFormat = NumberFormat.getNumberInstance(Locale.US)
+ numberFormat.format(value.toDouble / baseForAvgMetric)
+ }
+
+ def metricNeedsMax(metricsType: String): Boolean = {
+ metricsType != SUM_METRIC
+ }
+
/**
* A function that defines how we aggregate the final accumulator results
among all tasks,
* and represent it in string for a SQL physical operator.
- */
- def stringValue(metricsType: String, values: Array[Long]): String = {
+ */
+ def stringValue(metricsType: String, values: Array[Long], maxMetrics:
Array[Long]): String = {
+
Review comment:
remove extra newline
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]