yihua commented on code in PR #12826:
URL: https://github.com/apache/hudi/pull/12826#discussion_r1976129518
##########
hudi-common/src/main/java/org/apache/hudi/common/util/CleanerUtils.java:
##########
@@ -107,21 +109,18 @@ public static HoodieCleanMetadata
convertCleanMetadata(String startCleanTime,
*/
public static HoodieCleanMetadata getCleanerMetadata(HoodieTableMetaClient
metaClient, HoodieInstant cleanInstant)
throws IOException {
- CleanMetadataMigrator metadataMigrator = new
CleanMetadataMigrator(metaClient);
- HoodieCleanMetadata cleanMetadata =
TimelineMetadataUtils.deserializeHoodieCleanMetadata(
-
metaClient.getActiveTimeline().readCleanerInfoAsBytes(cleanInstant).get());
- return metadataMigrator.upgradeToLatest(cleanMetadata,
cleanMetadata.getVersion());
+ HoodieCleanMetadata cleanMetadata =
metaClient.getActiveTimeline().loadHoodieCleanMetadata(cleanInstant);
+ return upgradeCleanMetadata(metaClient, cleanMetadata);
}
- /**
- * Get Latest Version of Hoodie Cleaner Metadata - Output of cleaner
operation.
- * @return Latest version of Clean metadata corresponding to clean instant
- * @throws IOException
- */
- public static HoodieCleanMetadata getCleanerMetadata(HoodieTableMetaClient
metaClient, byte[] details)
+ public static HoodieCleanMetadata getCleanerMetadata(HoodieTableMetaClient
metaClient, InputStream inputStream)
throws IOException {
+ HoodieCleanMetadata cleanMetadata = deserializeAvroMetadata(inputStream,
HoodieCleanMetadata.class);
+ return upgradeCleanMetadata(metaClient, cleanMetadata);
+ }
Review Comment:
Got it.
--
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]