garyli1019 commented on a change in pull request #795: HUDI-171 delete tmp file
after split merge failure
URL: https://github.com/apache/incubator-hudi/pull/795#discussion_r305074639
##########
File path:
hoodie-common/src/main/java/com/uber/hoodie/common/util/collection/DiskBasedMap.java
##########
@@ -106,7 +106,16 @@ private void initFile(File writeOnlyFileHandle) throws
IOException {
if (!writeOnlyFileHandle.getParentFile().exists()) {
writeOnlyFileHandle.getParentFile().mkdir();
}
- writeOnlyFileHandle.createNewFile();
+ // create the file
+ try {
+ writeOnlyFileHandle.createNewFile();
Review comment:
I think the issue I had was caused by this line. The job failed to create
the tmp file and died in the halfway, so the incomplete tmp file was left
behind. It didn't have the chance to reach `writeOnlyFileHandle.delete()` and
`addShutDownHook()` below. The failure point is
https://github.com/apache/incubator-hudi/pull/795/files#diff-673dd1309d6ea3874ce463a67eeae36cR228.
You could also check with the stack trace I attached on the JIRA ticket.
----------------------------------------------------------------
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