yihua commented on code in PR #12900:
URL: https://github.com/apache/hudi/pull/12900#discussion_r1977974006
##########
hudi-common/src/main/java/org/apache/hudi/common/table/timeline/HoodieActiveTimeline.java:
##########
@@ -204,31 +202,29 @@ HoodieInstant
transitionLogCompactionInflightToComplete(boolean shouldLock,
*
* @param shouldLock Whether to hold the lock when performing transition
* @param inflightInstant Inflight instant
- * @param data Extra Metadata
+ * @param metadata metadata to write into the instant file
* @return commit instant
*/
- HoodieInstant transitionCleanInflightToComplete(boolean shouldLock,
HoodieInstant inflightInstant,
- Option<byte[]> data);
+ <T> HoodieInstant transitionCleanInflightToComplete(boolean shouldLock,
HoodieInstant inflightInstant, Option<T> metadata);
/**
* Transition Clean State from requested to inflight.
*
* @param requestedInstant requested instant
- * @param data Optional data to be stored
+ * @param metadata metadata to write into the instant file
* @return commit instant
*/
- HoodieInstant transitionCleanRequestedToInflight(HoodieInstant
requestedInstant, Option<byte[]> data);
+ <T> HoodieInstant transitionCleanRequestedToInflight(HoodieInstant
requestedInstant, Option<T> metadata);
/**
* Transition Rollback State from inflight to Committed.
*
* @param shouldLock Whether to hold the lock when performing transition
* @param inflightInstant Inflight instant
- * @param data Extra Metadata
+ * @param metadata metadata to write into the instant file
* @return commit instant
*/
- HoodieInstant transitionRollbackInflightToComplete(boolean shouldLock,
- HoodieInstant
inflightInstant, Option<byte[]> data);
+ <T> HoodieInstant transitionRollbackInflightToComplete(boolean shouldLock,
HoodieInstant inflightInstant, Option<T> metadata);
Review Comment:
For all the APIs on a particular action, e.g., rollback, should they take a
particular metadata class and avoid `Option` if not expecting `Opiton.empty()`,
e.g., `HoodieRollbackMetadata` in this case?
--
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]