leesf commented on code in PR #8722:
URL: https://github.com/apache/hudi/pull/8722#discussion_r1195144430
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/BaseHoodieWriteClient.java:
##########
@@ -609,36 +609,64 @@ public void savepoint(String user, String comment) {
* <p>
* Savepoint should be on a commit that could not have been cleaned.
*
- * @param instantTime - commit that should be savepointed
- * @param user - User creating the savepoint
- * @param comment - Comment for the savepoint
+ * @param instantTime Commit that should be savepointed
+ * @param user User creating the savepoint
+ * @param comment Comment for the savepoint
*/
public void savepoint(String instantTime, String user, String comment) {
HoodieTable<T, I, K, O> table = createTable(config, hadoopConf);
table.savepoint(context, instantTime, user, comment);
}
+ /**
+ * Delete a savepoint based on the latest commit action on the savepoint
timeline.
+ */
+ public void deleteSavepoint() {
+ HoodieTable<T, I, K, O> table = createTable(config, hadoopConf);
+ HoodieTimeline savePointTimeline =
table.getActiveTimeline().getSavePointTimeline();
+ if (savePointTimeline.empty()) {
+ throw new HoodieSavepointException("Could not savepoint. Commit timeline
is empty");
Review Comment:
`Could not delete savepoint, savepoint timeline is empty?`
--
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]