rdblue commented on code in PR #4071:
URL: https://github.com/apache/iceberg/pull/4071#discussion_r841291985


##########
api/src/main/java/org/apache/iceberg/ManageSnapshots.java:
##########
@@ -80,4 +80,98 @@
    * wapId
    */
   ManageSnapshots cherrypick(long snapshotId);
+
+  /**
+   * Create a new branch pointing to the given snapshot id.
+   *
+   * @param name branch name
+   * @param snapshotId id of the snapshot which will be the head of the branch
+   * @return this for method chaining
+   * @throws IllegalArgumentException if a branch with the given name already 
exists
+   */
+  ManageSnapshots createBranch(String name, long snapshotId);
+
+  /**
+   * Create a new tag pointing to the given snapshot id
+   *
+   * @param name tag name
+   * @param snapshotId snapshotId for the head of the new branch.
+   * @return this for method chaining
+   * @throws IllegalArgumentException if a tag with the given name already 
exists
+   */
+  ManageSnapshots createTag(String name, long snapshotId);
+
+  /**
+   * Remove a branch by name
+   *
+   * @param name branch name
+   * @return this for method chaining
+   * @throws IllegalArgumentException if the branch does not exist
+   */
+  ManageSnapshots removeBranch(String name);
+
+  /**
+   * Rename a branch
+   *
+   * @param name name of branch to rename
+   * @param newName the desired new name of the branch
+   * @throws IllegalArgumentException if the branch to rename does not exist 
or if there is already a branch
+   * with the same name as the desired new name.
+   */
+  ManageSnapshots renameBranch(String name, String newName);
+
+  /**
+   * Remove the tag with the given name.
+   *
+   * @param name tag name
+   * @return this for method chaining
+   * @throws IllegalArgumentException if the branch does not exist
+   */
+  ManageSnapshots removeTag(String name);
+
+  /**
+   * Replaces the tag with the given name to point to the specified snapshot
+   * @param name Tag to replace
+   * @param snapshotId new snapshot id for the given tag
+   * @return this for method chaining
+   */
+  ManageSnapshots replaceTag(String name, long snapshotId);
+
+  /**
+   * Replaces the branch with the given name to point to the specified snapshot
+   * @param name Branch to replace
+   * @param snapshotId new snapshot id for the given branch
+   * @return this for method chaining
+   */
+  ManageSnapshots replaceBranch(String name, long snapshotId);
+
+  /**
+   * Updates the minimum number of snapshots to keep for a branch.
+   *
+   * @param branchName branch name
+   * @param minSnapshotsToKeep minimum number of snapshots to retain on the 
branch
+   * @return this for method chaining
+   * @throws IllegalArgumentException if the branch does not exist
+   */
+  ManageSnapshots setMinNumberOfSnapshotsToKeep(String branchName, int 
minSnapshotsToKeep);

Review Comment:
   I don't think we need "NumberOf" isn't that omitted elsewhere?



-- 
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: dev-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to