cloud-fan commented on a change in pull request #27716:
[SPARK-30964][Core][WebUI] Accelerate InMemoryStore with a new index
URL: https://github.com/apache/spark/pull/27716#discussion_r385199591
##########
File path:
core/src/test/scala/org/apache/spark/status/AppStatusStoreSuite.scala
##########
@@ -78,6 +82,26 @@ class AppStatusStoreSuite extends SparkFunSuite {
assert(store.count(classOf[CachedQuantile]) === 2)
}
+ test("InMemoryStore should build index from Stage ID to Task data") {
+ val store = new InMemoryStore()
+ (0 until 1000).map { sId =>
+ (0 until 1000).map { taskId =>
+ val task = newTaskData(sId * 1000 + taskId, "SUCCESS", sId)
+ store.write(task)
+ }
+ }
+ val appStatusStore = new AppStatusStore(store)
+ failAfter(Span(200, Millis)) {
+ appStatusStore.taskSummary(1, attemptId, Array(0, 0.25, 0.5, 0.75, 1))
+ }
+ val stageIds = Seq(1, 11, 66, 88)
+ val stageKeys = stageIds.map(Array(_, attemptId))
+ failAfter(Span(10, Millis)) {
Review comment:
up to my experience, this can be flaky as it assumes some code should be
executed within some time. I think the benchmark result in PR description is
good enough.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]