Skip to content

Commit

Permalink
tests for taskSummary
Browse files Browse the repository at this point in the history
  • Loading branch information
squito committed Apr 1, 2015
1 parent ad27de8 commit 63eb4a6
Show file tree
Hide file tree
Showing 7 changed files with 12,144 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
[ {
"id" : "local-1427397477963",
"name" : "Spark shell",
"startTime" : "2015-03-26T19:17:57.184GMT",
"endTime" : "2015-03-26T19:20:02.949GMT",
"sparkUser" : "irashid",
"completed" : true
}, {
"id" : "local-1426533911241",
"name" : "Spark shell",
"startTime" : "2015-03-16T19:25:10.242GMT",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"quantiles" : [ 0.05, 0.25, 0.5, 0.75, 0.95 ],
"executorDeserializeTime" : [ 0.0, 0.0, 0.0, 1.0, 3.0 ],
"executorRunTime" : [ 6.0, 6.0, 7.0, 10.0, 48.0 ],
"resultSize" : [ 930.0, 930.0, 930.0, 930.0, 930.0 ],
"jvmGcTime" : [ 0.0, 0.0, 0.0, 0.0, 7.0 ],
"resultSerializationTime" : [ 0.0, 0.0, 0.0, 0.0, 0.0 ],
"memoryBytesSpilled" : [ 0.0, 0.0, 0.0, 0.0, 0.0 ],
"diskBytesSpilled" : [ 0.0, 0.0, 0.0, 0.0, 0.0 ],
"shuffleWriteMetrics" : {
"writeBytes" : [ 9598.0, 9599.0, 9600.0, 9601.0, 9603.0 ],
"writeRecords" : [ 100.0, 100.0, 100.0, 100.0, 100.0 ],
"writeTime" : [ 278805.0, 308809.0, 327953.0, 367487.0, 944783.0 ]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"quantiles" : [ 0.01, 0.5, 0.99 ],
"executorDeserializeTime" : [ 0.0, 0.0, 25.0 ],
"executorRunTime" : [ 5.0, 7.0, 123.0 ],
"resultSize" : [ 930.0, 930.0, 930.0 ],
"jvmGcTime" : [ 0.0, 0.0, 14.0 ],
"resultSerializationTime" : [ 0.0, 0.0, 1.0 ],
"memoryBytesSpilled" : [ 0.0, 0.0, 0.0 ],
"diskBytesSpilled" : [ 0.0, 0.0, 0.0 ],
"shuffleWriteMetrics" : {
"writeBytes" : [ 9597.0, 9600.0, 9614.0 ],
"writeRecords" : [ 100.0, 100.0, 100.0 ],
"writeTime" : [ 260991.0, 327953.0, 8980526.0 ]
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
[ {
"id" : "local-1427397477963",
"name" : "Spark shell",
"startTime" : "2015-03-26T19:17:57.184GMT",
"endTime" : "2015-03-26T19:20:02.949GMT",
"sparkUser" : "irashid",
"completed" : true
}, {
"id" : "local-1426533911241",
"name" : "Spark shell",
"startTime" : "2015-03-16T19:25:10.242GMT",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
[ {
"id" : "local-1427397477963",
"name" : "Spark shell",
"startTime" : "2015-03-26T19:17:57.184GMT",
"endTime" : "2015-03-26T19:20:02.949GMT",
"sparkUser" : "irashid",
"completed" : true
}, {
"id" : "local-1426533911241",
"name" : "Spark shell",
"startTime" : "2015-03-16T19:25:10.242GMT",
Expand Down
12,083 changes: 12,083 additions & 0 deletions core/src/test/resources/spark-events/local-1427397477963

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ class HistoryServerSuite extends FunSuite with BeforeAndAfter with Matchers with
"failed stage list json" -> "applications/local-1422981780767/stages?status=failed",
"one stage json" -> "applications/local-1422981780767/stages/1",
"one stage attempt json" -> "applications/local-1422981780767/stages/1/0",
"stage task summary" -> "applications/local-1427397477963/stages/20/0/taskSummary",
"stage task summary w/ custom quantiles" ->
"applications/local-1427397477963/stages/20/0/taskSummary?quantiles=0.01,0.5,0.99",
"stage list with accumulable json" -> "applications/local-1426533911241/stages",
"stage with accumulable json" -> "applications/local-1426533911241/stages/0/0",
"rdd list storage json" -> "applications/local-1422981780767/storage/rdd",
Expand Down Expand Up @@ -150,6 +153,13 @@ class HistoryServerSuite extends FunSuite with BeforeAndAfter with Matchers with
badStageId2._1 should be (HttpServletResponse.SC_NOT_FOUND)
// will take some mucking w/ jersey to get a better error msg in this case


val badQuantiles = getContentAndCode(
"applications/local-1427397477963/stages/20/0/taskSummary?quantiles=foo,0.1")
badQuantiles._1 should be (HttpServletResponse.SC_BAD_REQUEST)
badQuantiles._3 should be (Some("Bad value for parameter \"quantiles\". Expected a double, " +
"got \"foo\""))

getContentAndCode("foobar")._1 should be (HttpServletResponse.SC_NOT_FOUND)
}

Expand Down

0 comments on commit 63eb4a6

Please sign in to comment.