pvary commented on code in PR #5166:
URL: https://github.com/apache/iceberg/pull/5166#discussion_r911078152
##########
core/src/main/java/org/apache/iceberg/hadoop/HadoopFileIO.java:
##########
@@ -73,8 +73,7 @@ public OutputFile newOutputFile(String path) {
@Override
public void deleteFile(String path) {
Path toDelete = new Path(path);
- FileSystem fs = Util.getFs(toDelete, hadoopConf.get());
- try {
+ try (FileSystem fs = Util.getFs(toDelete, hadoopConf.get())) {
Review Comment:
This will remove the FileSystem from the cache.
If we delete multiple files on S3, closing the FS every time will become
costly
--
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]