pramodbiligiri commented on code in PR #7868:
URL: https://github.com/apache/hudi/pull/7868#discussion_r1099863259


##########
hudi-cli/src/main/java/org/apache/hudi/cli/commands/RestoresCommand.java:
##########
@@ -0,0 +1,100 @@
+package org.apache.hudi.cli.commands;
+
+import org.apache.hudi.avro.model.HoodieRestoreMetadata;
+import org.apache.hudi.cli.HoodieCLI;
+import org.apache.hudi.cli.HoodiePrintHelper;
+import org.apache.hudi.cli.HoodieTableHeaderFields;
+import org.apache.hudi.cli.TableHeader;
+import org.apache.hudi.common.table.timeline.HoodieActiveTimeline;
+import org.apache.hudi.common.table.timeline.HoodieInstant;
+import org.apache.hudi.common.table.timeline.HoodieTimeline;
+import org.apache.hudi.common.table.timeline.TimelineMetadataUtils;
+import org.springframework.shell.standard.ShellComponent;
+import org.springframework.shell.standard.ShellMethod;
+import org.springframework.shell.standard.ShellOption;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
+import static 
org.apache.hudi.common.table.timeline.HoodieTimeline.RESTORE_ACTION;
+
+/**
+ * CLI command to display info about restore actions.
+ */
+@ShellComponent
+public class RestoresCommand {
+
+  @ShellMethod(key = "show restores", value = "List all restore instants")
+  public String showRestores(
+          @ShellOption(value = {"--limit"}, help = "Limit #rows to be 
displayed", defaultValue = "10") Integer limit,
+          @ShellOption(value = {"--sortBy"}, help = "Sorting Field", 
defaultValue = "") final String sortByField,
+          @ShellOption(value = {"--desc"}, help = "Ordering", defaultValue = 
"false") final boolean descending,

Review Comment:
   Done. There's a "show restores --inflight" option for the same.
   
   If at all there are any UX related asks for this feature (not sub-features 
like the inflight one), I'd like to take them all in one batch and preferably 
in a separate PR after adding it as a story/task. I find it inefficient to 
tweak the UX one bit at a time. Causes a lot of back-and-forth chatter and 
wasteful rewrites of the same code piece.



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

Reply via email to