LuciferYang opened a new pull request, #36237:
URL: https://github.com/apache/spark/pull/36237

   ### What changes were proposed in this pull request?
   Similar to SPARK-38847, this pr aims to accelerate the recycling of 
`KVStoreIterator` resources by using `tryWithResource`. The main change of this 
pr as follows:
   
   1. Use Java `tryWithResource` and Spark `Utils.tryWithResource` to recycling 
`KVStoreIterator` opened by `RocksDB.view(Class<T> type).iterator` and 
`RocksDB.view(Class<T> type).iterator`
   2. Introduce a `count` function for KVUtils, this function will counts the 
number of elements in the KVStoreView which satisfy a predicate and close 
`KVStoreIterator` in time.
   
   ### Why are the changes needed?
   Close `KVStoreIterator` in time.
   
   
   ### Does this PR introduce _any_ user-facing change?
   No
   
   
   ### How was this patch tested?
   Pass GA
   


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to