TheR1sing3un commented on code in PR #12394:
URL: https://github.com/apache/hudi/pull/12394#discussion_r1879334345
##########
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:
> why we need an explicit flag for this?
`HoodieStorage::needCreateTempFile` only be true for HDFS, but for other fs,
such as local fs, we should also avoid visiting the intermediate state of the
file. So completely, regardless of the underlying file system, we will always
use the temp file method to create files in this scenario.
--
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]