Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Change the desplay name
  • Loading branch information
xuanyuanking committed Dec 11, 2018
commit 8d6dac92d8787dbd7f9b576545a6fbe6999861af
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ object SQLShuffleReadMetricsReporter {
* Create all shuffle read relative metrics and return the Map.
*/
def createShuffleReadMetrics(sc: SparkContext): Map[String, SQLMetric] = Map(
REMOTE_BLOCKS_FETCHED -> SQLMetrics.createMetric(sc, "remote blocks fetched"),
LOCAL_BLOCKS_FETCHED -> SQLMetrics.createMetric(sc, "local blocks fetched"),
REMOTE_BLOCKS_FETCHED -> SQLMetrics.createMetric(sc, "remote blocks read"),
LOCAL_BLOCKS_FETCHED -> SQLMetrics.createMetric(sc, "local blocks read"),
REMOTE_BYTES_READ -> SQLMetrics.createSizeMetric(sc, "remote bytes read"),
REMOTE_BYTES_READ_TO_DISK -> SQLMetrics.createSizeMetric(sc, "remote bytes read to disk"),
LOCAL_BYTES_READ -> SQLMetrics.createSizeMetric(sc, "local bytes read"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ class SQLMetricsSuite extends SparkFunSuite with SQLMetricsTestUtils with Shared
"avg hash probe (min, med, max)" -> "\n(1, 1, 1)"))
val shuffleExpected1 = Map(
"records read" -> 2L,
"local blocks fetched" -> 2L,
"remote blocks fetched" -> 0L,
"local blocks read" -> 2L,
"remote blocks read" -> 0L,
"shuffle records written" -> 2L)
testSparkPlanMetrics(df, 1, Map(
2L -> (("HashAggregate", expected1(0))),
Expand All @@ -114,8 +114,8 @@ class SQLMetricsSuite extends SparkFunSuite with SQLMetricsTestUtils with Shared
"avg hash probe (min, med, max)" -> "\n(1, 1, 1)"))
val shuffleExpected2 = Map(
"records read" -> 4L,
"local blocks fetched" -> 4L,
"remote blocks fetched" -> 0L,
"local blocks read" -> 4L,
"remote blocks read" -> 0L,
"shuffle records written" -> 4L)
testSparkPlanMetrics(df2, 1, Map(
2L -> (("HashAggregate", expected2(0))),
Expand Down Expand Up @@ -175,8 +175,8 @@ class SQLMetricsSuite extends SparkFunSuite with SQLMetricsTestUtils with Shared
1L -> (("Exchange", Map(
"shuffle records written" -> 2L,
"records read" -> 2L,
"local blocks fetched" -> 2L,
"remote blocks fetched" -> 0L))),
"local blocks read" -> 2L,
"remote blocks read" -> 0L))),
0L -> (("ObjectHashAggregate", Map("number of output rows" -> 1L))))
)

Expand All @@ -187,8 +187,8 @@ class SQLMetricsSuite extends SparkFunSuite with SQLMetricsTestUtils with Shared
1L -> (("Exchange", Map(
"shuffle records written" -> 4L,
"records read" -> 4L,
"local blocks fetched" -> 4L,
"remote blocks fetched" -> 0L))),
"local blocks read" -> 4L,
"remote blocks read" -> 0L))),
0L -> (("ObjectHashAggregate", Map("number of output rows" -> 3L))))
)
}
Expand Down Expand Up @@ -216,8 +216,8 @@ class SQLMetricsSuite extends SparkFunSuite with SQLMetricsTestUtils with Shared
"number of output rows" -> 4L))),
2L -> (("Exchange", Map(
"records read" -> 4L,
"local blocks fetched" -> 2L,
"remote blocks fetched" -> 0L,
"local blocks read" -> 2L,
"remote blocks read" -> 0L,
"shuffle records written" -> 2L))))
)
}
Expand Down