yihua commented on code in PR #12900:
URL: https://github.com/apache/hudi/pull/12900#discussion_r1978381987
##########
hudi-common/src/test/java/org/apache/hudi/common/testutils/FileCreateUtilsLegacy.java:
##########
@@ -83,11 +81,18 @@ private static void createMetaFile(String basePath, String
instantTime, String s
}
private static void createMetaFile(String basePath, String instantTime,
String suffix) throws IOException {
- createMetaFile(basePath, instantTime, suffix, getUTF8Bytes(""));
+ createMetaFile(basePath, instantTime, suffix, Option.empty());
}
- private static void createMetaFile(String basePath, String instantTime,
String suffix, byte[] content) throws IOException {
- createMetaFile(getTimelinePath(new
StoragePath(basePath)).toUri().getPath(), instantTime,
InProcessTimeGenerator::createNewInstantTime, suffix, content);
+ private static <T> void createMetaFile(String basePath, String instantTime,
String suffix, Option<T> metadata) throws IOException {
+ createMetaFile(getTimelinePath(new
StoragePath(basePath)).toUri().getPath(), instantTime,
+ InProcessTimeGenerator::createNewInstantTime, suffix,
+ metadata.isEmpty() ? Option.empty() :
COMMIT_METADATA_SER_DE.getInstantWriter(metadata.get()));
Review Comment:
nit: use `metadata.map()`
--
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]