Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/18565#discussion_r126286235
--- Diff:
common/network-shuffle/src/main/java/org/apache/spark/network/shuffle/OneForOneBlockFetcher.java
---
@@ -151,14 +167,21 @@ private void failRemainingBlocks(String[]
failedBlockIds, Throwable e) {
}
}
+ public void cleanup() {
+ for (File file: shuffleFiles) {
+ file.delete();
+ }
+ }
+
private class DownloadCallback implements StreamCallback {
private WritableByteChannel channel = null;
private File targetFile = null;
private int chunkIndex;
- DownloadCallback(File targetFile, int chunkIndex) throws IOException {
- this.targetFile = targetFile;
+ DownloadCallback(int chunkIndex) throws IOException {
+ this.targetFile = tmpFileCreater.createTempBlock();
+ shuffleFiles.add(targetFile);
--- End diff --
ditto, we will create unique temp files, so `shuffleFiles` can be a list
instead of set.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]