leesf commented on a change in pull request #1624:
URL: https://github.com/apache/incubator-hudi/pull/1624#discussion_r426138813
##########
File path: hudi-cli/src/main/java/org/apache/hudi/cli/commands/SparkMain.java
##########
@@ -281,6 +292,19 @@ private static int rollback(JavaSparkContext jsc, String
instantTime, String bas
}
}
+ private static int createSavepoint(JavaSparkContext jsc, String commitTime,
String user,
+ String comments, String basePath) throws Exception {
+ HoodieWriteClient client = createHoodieClient(jsc, basePath);
+ try {
+ client.savepoint(commitTime, user, comments);
+ LOG.info(String.format("The commit \"%s\" has been savepointed.",
commitTime));
+ return 0;
+ } catch (HoodieSavepointException se) {
+ LOG.info(String.format("Failed: Could not create savepoint \"%s\".",
commitTime));
Review comment:
I think we could change to log.warn, wdyt?
##########
File path: hudi-cli/src/main/java/org/apache/hudi/cli/commands/SparkMain.java
##########
@@ -293,6 +317,18 @@ private static int rollbackToSavepoint(JavaSparkContext
jsc, String savepointTim
}
}
+ private static int deleteSavepoint(JavaSparkContext jsc, String
savepointTime, String basePath) throws Exception {
+ HoodieWriteClient client = createHoodieClient(jsc, basePath);
+ try {
+ client.deleteSavepoint(savepointTime);
+ LOG.info(String.format("Savepoint \"%s\" deleted.", savepointTime));
+ return 0;
+ } catch (Exception e) {
+ LOG.info(String.format("Failed: Could not delete savepoint \"%s\".",
savepointTime));
Review comment:
ditto
----------------------------------------------------------------
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]