xabriel commented on a change in pull request #432: Allow writers to control
size of files generated
URL: https://github.com/apache/incubator-iceberg/pull/432#discussion_r321021289
##########
File path: spark/src/main/java/org/apache/iceberg/spark/source/Writer.java
##########
@@ -425,17 +498,18 @@ public WriterCommitMessage commit() throws IOException {
@Override
public void abort() throws IOException {
+ closeCurrent();
+
// clean up files created by this writer
Tasks.foreach(completedFiles)
.throwFailureWhenFinished()
.noRetry()
.run(file -> fileIo.deleteFile(file.path().toString()));
+ }
- if (currentAppender != null) {
- currentAppender.close();
- this.currentAppender = null;
- fileIo.deleteFile(currentFile.encryptingOutputFile());
- }
+ private void openCurrent() {
Review comment:
I though about this, but was not sure that this PR should fix that. You ok
if I do it as a follow up PR, or you'd rather have it taken care of here?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]