leesf commented on a change in pull request #1624:
URL: https://github.com/apache/incubator-hudi/pull/1624#discussion_r425183116



##########
File path: hudi-cli/src/main/java/org/apache/hudi/cli/commands/SparkMain.java
##########
@@ -282,6 +293,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));
+      return 1;

Review comment:
       any reason to return 1?




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