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_r298213952
##########
File path:
common/kvstore/src/main/java/org/apache/spark/util/kvstore/KVStore.java
##########
@@ -117,6 +118,11 @@
*/
<T> KVStoreView<T> view(Class<T> type) throws Exception;
+ /**
+ * Returns a configurable view with condition for iterating over entities of
the given type.
+ */
+ <T> KVStoreView<T> viewWithCondition(Class<T> type, Predicate<T> condition)
throws Exception;
Review comment:
I was going to ask, why not a `filter` method in `KVStoreView`, but that
could be hard to get right given its logic around skip, first and last.
----------------------------------------------------------------
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]