Closed turtlemonvh closed 5 years ago
I confirmed the mode of failure. Here is a simple script to reproduce the error.
import ch.cern.sparkmeasure.{ StageMetrics, TaskMetrics }
val taskMetrics = TaskMetrics(spark)
taskMetrics.begin
val report = taskMetrics.report
println("report", report)
This fails with the same error: scala.MatchError: (elapsedTime,null) (of class scala.Tuple2)
.
I am happy to submit a PR for the fix if you can confirm that fixing the match statement (as mentioned above) is ok with you.
Thanks @turtlemonvh for reporting this. Please go ahead with the PR.
I am seeing an occasional exception when using the
.report
method on aTaskMetrics
to render the metrics data as a string.The problem seems to be associated with this line: https://github.com/LucaCanali/sparkMeasure/blob/master/src/main/scala/ch/cern/sparkmeasure/taskmetrics.scala#L206
Here is the top of the stacktrace.
It looks like this is probably likely caused by calling
.report
when there are no records inlistenerTask.taskMetricsData
(I'll try to confirm this).If this is the case, there are a few options for fixing. The most obvious one is to change the match statement to something like:
But there are, of course, other options.