akashchamp commented on code in PR #20220:
URL: https://github.com/apache/hudi/pull/20220#discussion_r4348281229
##########
hudi-cli/src/main/java/org/apache/hudi/cli/commands/ExportCommand.java:
##########
@@ -176,17 +289,34 @@ private int copyArchivedInstants(List<StoragePathInfo>
pathInfoList,
log.error("Could not load metadata for action {} at instant
time {}", action, instantTime);
continue;
}
- final String outPath = localFolder + StoragePath.SEPARATOR +
instantTime + "." + action;
- writeToFile(outPath, HoodieAvroUtils.avroToJson(metadata, true));
+ byte[] json = HoodieAvroUtils.avroToJson(metadata, true);
+ if (descending) {
+ fileEntries.add(new String[] {instantTime, action});
+ fileJsons.add(json);
Review Comment:
Good point. In c25006c68d6 a legacy archive file now keeps only the last
(limit - exported) completed entries in a bounded deque when --desc has a
limit, and writes entries straight away when there is no limit. I could not run
the module tests locally, so CI has to confirm.
--
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]