Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Yohahaha committed Aug 22, 2024
1 parent bd26d83 commit 6485161
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,8 @@ class VeloxMetricsApi extends MetricsApi with Logging {

def genWriteFilesTransformerMetrics(sparkContext: SparkContext): Map[String, SQLMetric] =
Map(
"physicalWrittenBytes" -> SQLMetrics.createMetric(sparkContext, "number of written bytes"),
"physicalWrittenBytes" -> SQLMetrics.createSizeMetric(sparkContext, "number of written bytes"),
"wallNanos" -> SQLMetrics.createNanoTimingMetric(sparkContext, "time of write"),
"numWrittenFiles" -> SQLMetrics.createMetric(sparkContext, "number of written files")
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class WriteFilesMetricsUpdater(val metrics: Map[String, SQLMetric]) extends Metr
if (opMetrics != null) {
val operatorMetrics = opMetrics.asInstanceOf[OperatorMetrics]
metrics("physicalWrittenBytes") += operatorMetrics.physicalWrittenBytes
metrics("wallNanos") += operatorMetrics.wallNanos
metrics("numWrittenFiles") += operatorMetrics.numWrittenFiles
}
}
Expand Down

0 comments on commit 6485161

Please sign in to comment.