danny0405 commented on code in PR #13413:
URL: https://github.com/apache/hudi/pull/13413#discussion_r2136781237
##########
hudi-io/src/main/java/org/apache/hudi/common/util/FileIOUtils.java:
##########
@@ -169,19 +169,12 @@ public static void createFileInPath(HoodieStorage storage,
StoragePath fullPath,
Option<HoodieInstantWriter>
contentWriter, boolean ignoreIOE) {
try {
- // If the path does not exist, create it first
- if (!storage.exists(fullPath)) {
- if (storage.createNewFile(fullPath)) {
- LOG.info("Created a new file in meta path: {}", fullPath);
- } else {
- throw new HoodieIOException("Failed to create file " + fullPath);
- }
- }
-
if (contentWriter.isPresent()) {
try (OutputStream out = storage.create(fullPath, true)) {
contentWriter.get().writeToStream(out);
}
+ } else {
+ storage.createNewFile(fullPath);
Review Comment:
Okay, the title is kind of misleading.
--
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]