Skip to content

Conversation

@cloud-fan
Copy link
Contributor

What changes were proposed in this pull request?

Part of the reason why TaskMetrics and its callers are complicated are due to the optional metrics we collect, including input, output, shuffle read, and shuffle write. I think we can always track them and just assign 0 as the initial values. It is usually very obvious whether a task is supposed to read any data or not. By always tracking them, we can remove a lot of map, foreach, flatMap, getOrElse(0L) calls throughout Spark.

This patch also changes a few behaviors.

  1. Removed the distinction of data read/write methods (e.g. Hadoop, Memory, Network, etc).
  2. Accumulate all data reads and writes, rather than only the first method. (Fixes SPARK-5225)

How was this patch tested?

existing tests.

This is bases on #12388, with more test fixes.

@cloud-fan
Copy link
Contributor Author

cc @rxin

fetchWaitTime = internal.fetchWaitTime,
remoteBytesRead = internal.remoteBytesRead,
totalBlocksFetched = internal.totalBlocksFetched,
recordsRead = internal.recordsRead
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looks like the internal and external shuffle read metrics don't match, the localBytesRead is missing.

@SparkQA
Copy link

SparkQA commented Apr 15, 2016

Test build #55926 has finished for PR 12417 at commit cbc154f.

  • This patch fails Scala style tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Apr 15, 2016

Test build #55931 has finished for PR 12417 at commit 2711075.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

} else {
JNothing
}
val shuffleWriteMetrics: JValue = if (taskMetrics.shuffleWriteMetrics.isUpdated) {
Copy link
Contributor

Choose a reason for hiding this comment

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

can't we always output the metrics, and just fix the json protocol test?

@SparkQA
Copy link

SparkQA commented Apr 15, 2016

Test build #2791 has finished for PR 12417 at commit 2711075.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Apr 15, 2016

Test build #2793 has finished for PR 12417 at commit 2711075.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@rxin
Copy link
Contributor

rxin commented Apr 15, 2016

Going to merge this first. We can fix the test thing later.

@asfgit asfgit closed this in 8028a28 Apr 15, 2016
asfgit pushed a commit that referenced this pull request Apr 18, 2016
## What changes were proposed in this pull request?

This PR is a follow up for #12417, now we always track input/output/shuffle metrics in spark JSON protocol and status API.

Most of the line changes are because of re-generating the gold answer for `HistoryServerSuite`, and we add a lot of 0 values for read/write metrics.

## How was this patch tested?

existing tests.

Author: Wenchen Fan <wenchen@databricks.com>

Closes #12462 from cloud-fan/follow.
lw-lin pushed a commit to lw-lin/spark that referenced this pull request Apr 20, 2016
…te metrics

## What changes were proposed in this pull request?

Part of the reason why TaskMetrics and its callers are complicated are due to the optional metrics we collect, including input, output, shuffle read, and shuffle write. I think we can always track them and just assign 0 as the initial values. It is usually very obvious whether a task is supposed to read any data or not. By always tracking them, we can remove a lot of map, foreach, flatMap, getOrElse(0L) calls throughout Spark.

This patch also changes a few behaviors.

1. Removed the distinction of data read/write methods (e.g. Hadoop, Memory, Network, etc).
2. Accumulate all data reads and writes, rather than only the first method. (Fixes SPARK-5225)

## How was this patch tested?

existing tests.

This is bases on apache#12388, with more test fixes.

Author: Reynold Xin <rxin@databricks.com>
Author: Wenchen Fan <wenchen@databricks.com>

Closes apache#12417 from cloud-fan/metrics-refactor.
lw-lin pushed a commit to lw-lin/spark that referenced this pull request Apr 20, 2016
## What changes were proposed in this pull request?

This PR is a follow up for apache#12417, now we always track input/output/shuffle metrics in spark JSON protocol and status API.

Most of the line changes are because of re-generating the gold answer for `HistoryServerSuite`, and we add a lot of 0 values for read/write metrics.

## How was this patch tested?

existing tests.

Author: Wenchen Fan <wenchen@databricks.com>

Closes apache#12462 from cloud-fan/follow.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants