n3nash commented on a change in pull request #1288: [HUDI-117] Close file
handle before throwing an exception due to append…
URL: https://github.com/apache/incubator-hudi/pull/1288#discussion_r372190260
##########
File path:
hudi-common/src/main/java/org/apache/hudi/common/table/log/HoodieLogFormatWriter.java
##########
@@ -256,7 +280,22 @@ private void handleAppendExceptionOrRecoverLease(Path
path, RemoteException e)
throw new HoodieException(e);
}
} else {
- throw new HoodieIOException("Failed to open an append stream ", e);
+ // When fs.append() has failed and an exception is thrown, by closing
the output stream
+ // we shall force hdfs to release the lease on the log file. When Spark
driver retries this task (with
Review comment:
Instead of Spark driver, lets just say when "spark retries.."
----------------------------------------------------------------
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