srowen commented on a change in pull request #24982: [SPARK-28181][CORE] Add a
filter interface to KVStore to speed up the entities retrieve
URL: https://github.com/apache/spark/pull/24982#discussion_r298581970
##########
File path: core/src/main/scala/org/apache/spark/status/AppStatusStore.scala
##########
@@ -415,9 +410,18 @@ private[spark] class AppStatusStore(
offset: Int,
length: Int,
sortBy: Option[String],
- ascending: Boolean): Seq[v1.TaskData] = {
+ ascending: Boolean,
+ status: Option[String] = None): Seq[v1.TaskData] = {
val stageKey = Array(stageId, stageAttemptId)
- val base = store.view(classOf[TaskDataWrapper])
+ val base = status match {
+ case Some(expected) =>
+ store.viewWithCondition(classOf[TaskDataWrapper], (t: TaskDataWrapper)
=> {
+ t.status.toLowerCase(Locale.ROOT) ==
expected.toLowerCase(Locale.ROOT)
+ })
+ case None =>
+ store.view(classOf[TaskDataWrapper])
+ }
+ store.view(classOf[TaskDataWrapper])
Review comment:
Remove this
----------------------------------------------------------------
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]