ssdong commented on a change in pull request #2784:
URL: https://github.com/apache/hudi/pull/2784#discussion_r611792855



##########
File path: 
hudi-common/src/test/java/org/apache/hudi/common/testutils/FileCreateUtils.java
##########
@@ -157,11 +157,19 @@ public static void createReplaceCommit(String basePath, 
String instantTime, Hood
   }
 
   public static void createRequestedReplaceCommit(String basePath, String 
instantTime, HoodieRequestedReplaceMetadata requestedReplaceMetadata) throws 
IOException {
-    createMetaFile(basePath, instantTime, 
HoodieTimeline.REQUESTED_REPLACE_COMMIT_EXTENSION, 
serializeRequestedReplaceMetadata(requestedReplaceMetadata).get());
+    if (null != requestedReplaceMetadata) {
+      createMetaFile(basePath, instantTime, 
HoodieTimeline.REQUESTED_REPLACE_COMMIT_EXTENSION, 
serializeRequestedReplaceMetadata(requestedReplaceMetadata).get());
+    } else {
+      createMetaFile(basePath, instantTime, 
HoodieTimeline.REQUESTED_REPLACE_COMMIT_EXTENSION, new byte[0]);

Review comment:
       Nice catch. it isn't needed 😅 




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to