satishkotha commented on a change in pull request #2678: URL: https://github.com/apache/hudi/pull/2678#discussion_r594753875
########## File path: hudi-cli/src/main/java/org/apache/hudi/cli/commands/CommitsCommand.java ########## @@ -431,4 +442,20 @@ public String syncCommits(@CliOption(key = {"path"}, help = "Path of the table t return "Load sync state between " + HoodieCLI.getTableMetaClient().getTableConfig().getTableName() + " and " + HoodieCLI.syncTableMetadata.getTableConfig().getTableName(); } + + /* + Checks whether a commit or replacecommit action exists in the timeline. + * */ + private Option<HoodieInstant> getCommitOrReplaceCommitInstant(HoodieTimeline timeline, String instantTime) { Review comment: consider changing signature to return Option of HoodieCommitMetadata and deserialize instant details inside this method. This would avoid repetition to get instant details in multiple places. You can also do additional validation. for example: for replace commit, deserialize using HoodieReplaceCommitMetadata class -- 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: us...@infra.apache.org