codope commented on a change in pull request #3695:
URL: https://github.com/apache/hudi/pull/3695#discussion_r713741677



##########
File path: 
hudi-common/src/test/java/org/apache/hudi/common/testutils/HoodieTestTable.java
##########
@@ -214,6 +308,40 @@ public HoodieTestTable addRollback(String instantTime, 
HoodieRollbackMetadata ro
     return this;
   }
 
+  public HoodieRollbackMetadata getRollbackMetadata(String 
instantTimeToDelete, Map<String, List<String>> partitionToFilesMeta) throws 
Exception {
+    HoodieRollbackMetadata rollbackMetadata = new HoodieRollbackMetadata();
+    
rollbackMetadata.setCommitsRollback(Collections.singletonList(instantTimeToDelete));
+    rollbackMetadata.setStartRollbackTime(instantTimeToDelete);
+    Map<String, HoodieRollbackPartitionMetadata> partitionMetadataMap = new 
HashMap<>();
+    for (Map.Entry<String, List<String>> entry : 
partitionToFilesMeta.entrySet()) {
+      HoodieRollbackPartitionMetadata rollbackPartitionMetadata = new 
HoodieRollbackPartitionMetadata();
+      rollbackPartitionMetadata.setPartitionPath(entry.getKey());
+      rollbackPartitionMetadata.setSuccessDeleteFiles(entry.getValue());
+      rollbackPartitionMetadata.setFailedDeleteFiles(new ArrayList<>());
+      rollbackPartitionMetadata.setWrittenLogFiles(new HashMap<>());

Review comment:
       Sure thing. Will take it up as the next task. Tracking here: 
https://issues.apache.org/jira/browse/HUDI-2481
   




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