-
- Downloads
[SPARK-14628][CORE] Simplify task metrics by always tracking read/write 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 https://github.com/apache/spark/pull/12388, with more test fixes. Author: Reynold Xin <rxin@databricks.com> Author: Wenchen Fan <wenchen@databricks.com> Closes #12417 from cloud-fan/metrics-refactor.
Showing
- core/src/main/java/org/apache/spark/shuffle/sort/BypassMergeSortShuffleWriter.java 1 addition, 1 deletion...ache/spark/shuffle/sort/BypassMergeSortShuffleWriter.java
- core/src/main/java/org/apache/spark/shuffle/sort/UnsafeShuffleWriter.java 1 addition, 1 deletion...va/org/apache/spark/shuffle/sort/UnsafeShuffleWriter.java
- core/src/main/java/org/apache/spark/util/collection/unsafe/sort/UnsafeExternalSorter.java 1 addition, 1 deletion...ark/util/collection/unsafe/sort/UnsafeExternalSorter.java
- core/src/main/scala/org/apache/spark/InternalAccumulator.scala 0 additions, 6 deletions...src/main/scala/org/apache/spark/InternalAccumulator.scala
- core/src/main/scala/org/apache/spark/executor/InputMetrics.scala 4 additions, 23 deletions...c/main/scala/org/apache/spark/executor/InputMetrics.scala
- core/src/main/scala/org/apache/spark/executor/OutputMetrics.scala 4 additions, 11 deletions.../main/scala/org/apache/spark/executor/OutputMetrics.scala
- core/src/main/scala/org/apache/spark/executor/ShuffleReadMetrics.scala 6 additions, 1 deletion.../scala/org/apache/spark/executor/ShuffleReadMetrics.scala
- core/src/main/scala/org/apache/spark/executor/ShuffleWriteMetrics.scala 6 additions, 1 deletion...scala/org/apache/spark/executor/ShuffleWriteMetrics.scala
- core/src/main/scala/org/apache/spark/executor/TaskMetrics.scala 14 additions, 108 deletions...rc/main/scala/org/apache/spark/executor/TaskMetrics.scala
- core/src/main/scala/org/apache/spark/rdd/HadoopRDD.scala 1 addition, 1 deletioncore/src/main/scala/org/apache/spark/rdd/HadoopRDD.scala
- core/src/main/scala/org/apache/spark/rdd/NewHadoopRDD.scala 1 addition, 1 deletioncore/src/main/scala/org/apache/spark/rdd/NewHadoopRDD.scala
- core/src/main/scala/org/apache/spark/rdd/PairRDDFunctions.scala 1 addition, 1 deletion...rc/main/scala/org/apache/spark/rdd/PairRDDFunctions.scala
- core/src/main/scala/org/apache/spark/rdd/RDD.scala 1 addition, 1 deletioncore/src/main/scala/org/apache/spark/rdd/RDD.scala
- core/src/main/scala/org/apache/spark/scheduler/StatsReportListener.scala 23 additions, 23 deletions...cala/org/apache/spark/scheduler/StatsReportListener.scala
- core/src/main/scala/org/apache/spark/shuffle/BlockStoreShuffleReader.scala 1 addition, 1 deletion...la/org/apache/spark/shuffle/BlockStoreShuffleReader.scala
- core/src/main/scala/org/apache/spark/shuffle/hash/HashShuffleWriter.scala 1 addition, 1 deletion...ala/org/apache/spark/shuffle/hash/HashShuffleWriter.scala
- core/src/main/scala/org/apache/spark/shuffle/sort/SortShuffleWriter.scala 1 addition, 1 deletion...ala/org/apache/spark/shuffle/sort/SortShuffleWriter.scala
- core/src/main/scala/org/apache/spark/status/api/v1/AllStagesResource.scala 67 additions, 33 deletions...la/org/apache/spark/status/api/v1/AllStagesResource.scala
- core/src/main/scala/org/apache/spark/storage/ShuffleBlockFetcherIterator.scala 1 addition, 1 deletion...rg/apache/spark/storage/ShuffleBlockFetcherIterator.scala
- core/src/main/scala/org/apache/spark/ui/exec/ExecutorsTab.scala 13 additions, 20 deletions...rc/main/scala/org/apache/spark/ui/exec/ExecutorsTab.scala
Loading
Please register or sign in to comment