Davis-Zhang-Onehouse commented on code in PR #12826:
URL: https://github.com/apache/hudi/pull/12826#discussion_r1972688176
##########
hudi-cli/src/main/java/org/apache/hudi/cli/commands/RestoresCommand.java:
##########
@@ -98,9 +97,8 @@ public String showRestore(
private void addDetailsOfCompletedRestore(HoodieActiveTimeline
activeTimeline, List<Comparable[]> rows,
HoodieInstant restoreInstant)
throws IOException {
HoodieRestoreMetadata instantMetadata;
- Option<byte[]> instantDetails =
activeTimeline.getInstantDetails(restoreInstant);
instantMetadata = TimelineMetadataUtils
- .deserializeAvroMetadata(instantDetails.get(),
HoodieRestoreMetadata.class);
+
.deserializeAvroMetadata(activeTimeline.getInstantContentStream(restoreInstant),
HoodieRestoreMetadata.class);
Review Comment:
fixed
##########
hudi-cli/src/main/java/org/apache/hudi/cli/commands/DiffCommand.java:
##########
@@ -118,14 +117,12 @@ private String printDiffWithMetadata(HoodieTimeline
timeline, Integer limit, Str
.getInstantsAsStream().sorted(instantComparator.requestedTimeOrderedComparator().reversed()).collect(Collectors.toList());
for (final HoodieInstant commit : commits) {
- Option<byte[]> instantDetails = timeline.getInstantDetails(commit);
- if (instantDetails.isPresent()) {
- HoodieCommitMetadata commitMetadata =
layout.getCommitMetadataSerDe().deserialize(commit, instantDetails.get(),
HoodieCommitMetadata.class);
- for (Map.Entry<String, List<HoodieWriteStat>> partitionWriteStat :
- commitMetadata.getPartitionToWriteStats().entrySet()) {
- for (HoodieWriteStat hoodieWriteStat :
partitionWriteStat.getValue()) {
- populateRows(rows, commit, hoodieWriteStat, diffEntity,
diffEntityChecker);
- }
+ HoodieCommitMetadata commitMetadata =
layout.getCommitMetadataSerDe().deserialize(
+ commit, timeline.getInstantContentStream(commit), () ->
timeline.isEmpty(commit), HoodieCommitMetadata.class);
Review Comment:
fixed
--
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]