LuciferYang commented on code in PR #36237:
URL: https://github.com/apache/spark/pull/36237#discussion_r851851749
##########
core/src/main/scala/org/apache/spark/deploy/history/FsHistoryProvider.scala:
##########
@@ -325,12 +325,18 @@ private[history] class FsHistoryProvider(conf: SparkConf,
clock: Clock)
override def getListing(): Iterator[ApplicationInfo] = {
// Return the listing in end time descending order.
- listing.view(classOf[ApplicationInfoWrapper])
+ // SPARK-38896: tryWithResource cannot be used here
+ // because this method needs to return an `Iterator`.
+ val closeableIter = listing.view(classOf[ApplicationInfoWrapper])
Review Comment:
`tryWithResource` cannot be used here because this method needs to return an
`Iterator`, mixed in `java.io.Closeable` so that the caller can close it
--
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]