Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GLUTEN-3637][VL] Fix whole stage pipeline metric #3661

Merged
merged 1 commit into from
Nov 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import org.apache.spark.{InterruptibleIterator, TaskContext}
import org.apache.spark.sql.execution.metric.SQLMetric
import org.apache.spark.util.TaskResources

import java.util.concurrent.TimeUnit
import java.util.concurrent.atomic.{AtomicBoolean, AtomicLong}

private class PayloadCloser[A](in: Iterator[A])(closeCallback: A => Unit) extends Iterator[A] {
Expand Down Expand Up @@ -110,8 +111,10 @@ private class PipelineTimeAccumulator[A](in: Iterator[A], pipelineTime: SQLMetri
}

private def tryFinish(): Unit = {
pipelineTime += accumulatedTime.getAndSet(
0L
pipelineTime += TimeUnit.NANOSECONDS.toMillis(
accumulatedTime.getAndSet(
Copy link
Contributor

@zhouyuan zhouyuan Nov 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so this is due to accumulatedTime is changed during these days and it's nano-seconds(should use milliseconds)?
CC: @JkSelf

0L
)
) // make sure the accumulated time is submitted once
}
}
Expand Down
Loading