Davis-Zhang-Onehouse commented on code in PR #12900:
URL: https://github.com/apache/hudi/pull/12900#discussion_r1978169045


##########
hudi-io/src/main/java/org/apache/hudi/common/util/FileIOUtils.java:
##########
@@ -191,8 +191,8 @@ public static void createFileInPath(HoodieStorage storage,
     }
   }
 
-  public static void createFileInPath(HoodieStorage storage, StoragePath 
fullPath, Option<byte[]> content) {
-    createFileInPath(storage, fullPath, content.map(bytes -> (outputStream) -> 
outputStream.write(bytes)), false);
+  public static void createFileInPath(HoodieStorage fileSystem, StoragePath 
fullPath, Option<HoodieInstantWriter> contentWriter) {

Review Comment:
   done



##########
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:
   done



-- 
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]

Reply via email to