LuciferYang commented on code in PR #43371:
URL: https://github.com/apache/spark/pull/43371#discussion_r1360177836
##########
common/network-shuffle/src/main/java/org/apache/spark/network/shuffle/RemoteBlockPushResolver.java:
##########
@@ -537,7 +540,9 @@ void closeAndDeleteOutdatedPartitions(
partitions
.forEach((partitionId, partitionInfo) -> {
synchronized (partitionInfo) {
- partitionInfo.closeAllFilesAndDeleteIfNeeded(true);
+ AppShufflePartitionInfo.closeAllFilesAndDeleteIfNeeded(true,
partitionInfo.dataFile,
Review Comment:
Perhaps we could split `closeAllFilesAndDeleteIfNeeded` into two methods
`closeAllFiles` and `deleteAllFiles`, then `closeAllFiles` can be moved into
`ResourceCleaner.run()`.
This way, they don't have to be static. Here, we can change it to call
```
partitionInfo.cleanable.clean();
partitionInfo.deleteAllFiles();
```
and other places only need to call `partitionInfo.cleanable.clean()`.
--
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]