TheR1sing3un commented on code in PR #12394:
URL: https://github.com/apache/hudi/pull/12394#discussion_r1881300295
##########
hudi-io/src/main/java/org/apache/hudi/storage/HoodieStorage.java:
##########
@@ -309,11 +309,15 @@ public final StorageConfiguration<?> getConf() {
@PublicAPIMethod(maturity = ApiMaturityLevel.EVOLVING)
public final void createImmutableFileInPath(StoragePath path,
Option<byte[]> content) throws
HoodieIOException {
+ createImmutableFileInPath(path, content, needCreateTempFile());
+ }
+
+ @PublicAPIMethod(maturity = ApiMaturityLevel.EVOLVING)
+ public final void createImmutableFileInPath(StoragePath path,
+ Option<byte[]> content, boolean
needTempFile) throws HoodieIOException {
OutputStream fsout = null;
StoragePath tmpPath = null;
- boolean needTempFile = needCreateTempFile();
Review Comment:
> We have assumption that the storage has two categories: HDFS and Object
Store, the later should always be atomic for file creation so that the renaming
is only needful for HDFS.
>
> If you think there is other fs system we need to support, at least to fix
the `HoodieStorage::needCreateTempFile` itself.
I fix `HoodieStorage::needCreateTempFile` to for all storage without
write-transaction should create temp file.
--
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]