yihua commented on code in PR #13007:
URL: https://github.com/apache/hudi/pull/13007#discussion_r2017706830
##########
hudi-common/src/test/java/org/apache/hudi/common/testutils/FileCreateUtils.java:
##########
@@ -98,6 +98,22 @@ private static <T> void createMetaFile(HoodieTableMetaClient
metaClient, String
metadata.flatMap(m ->
metaClient.getCommitMetadataSerDe().getInstantWriter(m)));
}
+ public static String markerFileName(String fileName, IOType ioType) {
+ return String.format("%s%s.%s", fileName,
HoodieTableMetaClient.MARKER_EXTN, ioType.name());
+ }
+
+ public static String dataFileMarkerFileName(String instantTime, String
fileId, IOType ioType, String fileExtension, String writeToken) {
+ return markerFileName(FSUtils.makeBaseFileName(instantTime, writeToken,
fileId, fileExtension), ioType);
+ }
+
+ public static String logFileMarkerFileName(String instantTime, String
fileId, IOType ioType, int logVersion) {
+ return logFileMarkerFileName(instantTime, fileId, ioType,
HoodieLogFile.DELTA_EXTENSION, logVersion);
+ }
+
+ public static String logFileMarkerFileName(String instantTime, String
fileId, IOType ioType, String fileExtension, int logVersion) {
+ return markerFileName(FSUtils.makeLogFileName(fileId, fileExtension,
instantTime, logVersion, WRITE_TOKEN), ioType);
+ }
Review Comment:
Do we need all these utils, i.e., before this PR we also create log file
marker with `CREATE` type?
--
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]