nsivabalan commented on code in PR #13007:
URL: https://github.com/apache/hudi/pull/13007#discussion_r2017615208
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/io/HoodieWriteHandle.java:
##########
@@ -290,7 +290,8 @@ protected LogFileCreationCallback getLogCreationCallback() {
@Override
public boolean preFileCreation(HoodieLogFile logFile) {
WriteMarkers writeMarkers =
WriteMarkersFactory.get(config.getMarkersType(), hoodieTable, instantTime);
- return writeMarkers.createIfNotExists(partitionPath,
logFile.getFileName(), IOType.CREATE,
+ IOType ioType =
getHoodieTableMetaClient().getTableConfig().getTableVersion().lesserThan(HoodieTableVersion.EIGHT)
? IOType.APPEND : IOType.CREATE;
+ return writeMarkers.createIfNotExists(partitionPath,
logFile.getFileName(), ioType,
Review Comment:
Are you suggesting we also pass if the file being passed in is data file or
log file as an additional argument?
we don't have two diff apis to create marker for. base file and log file.
the api just takes in a file name and IOType.
so, it makes it difficult. unless we parse the file name and deduce whether
its a log file or base file. which the caller already knows it.
lmk what do you think. I feel it might add unnecessary complication within
the impl of createMakers in WriteMarkers.
--
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]