lucasbru commented on code in PR #19646:
URL: https://github.com/apache/kafka/pull/19646#discussion_r2137274974


##########
tools/src/main/java/org/apache/kafka/tools/streams/StreamsGroupCommandOptions.java:
##########
@@ -50,24 +55,55 @@ public class StreamsGroupCommandOptions extends 
CommandDefaultOptions {
     public static final String MEMBERS_DOC = "Describe members of the group. 
This option may be used with the '--describe' option only.";
     public static final String OFFSETS_DOC = "Describe the group and list all 
topic partitions in the group along with their offset information." +
         "This is the default sub-action and may be used with the '--describe' 
option only.";
+    private static final String RESET_OFFSETS_DOC = "Reset offsets of streams 
group. The instances should be inactive" + NL +
+        "Has 2 execution options: --dry-run (the default) to plan which 
offsets to reset, and --execute to update the offsets." + NL +
+        "You must choose one of the following reset specifications: 
--to-datetime, --by-duration, --to-earliest, " +
+        "--to-latest, --shift-by, --from-file, --to-current, --to-offset." + 
NL +
+        "To define the scope use --all-topics or --topic. One scope must be 
specified unless you use '--from-file'.";

Review Comment:
   --all-input-topics and --input-topic



##########
tools/src/main/java/org/apache/kafka/tools/streams/StreamsGroupCommandOptions.java:
##########
@@ -50,24 +55,55 @@ public class StreamsGroupCommandOptions extends 
CommandDefaultOptions {
     public static final String MEMBERS_DOC = "Describe members of the group. 
This option may be used with the '--describe' option only.";
     public static final String OFFSETS_DOC = "Describe the group and list all 
topic partitions in the group along with their offset information." +
         "This is the default sub-action and may be used with the '--describe' 
option only.";
+    private static final String RESET_OFFSETS_DOC = "Reset offsets of streams 
group. The instances should be inactive" + NL +

Review Comment:
   Should we specify that this deletes internal topics?



##########
tools/src/main/java/org/apache/kafka/tools/streams/StreamsGroupCommandOptions.java:
##########
@@ -33,13 +33,18 @@
 import static org.apache.kafka.tools.ToolsUtils.minus;
 
 public class StreamsGroupCommandOptions extends CommandDefaultOptions {
+    private static final String NL = System.lineSeparator();
     public static final Logger LOGGER = 
LoggerFactory.getLogger(StreamsGroupCommandOptions.class);
 
     public static final String BOOTSTRAP_SERVER_DOC = "REQUIRED: The server(s) 
to connect to.";
     public static final String GROUP_DOC = "The streams group we wish to act 
on.";
+    private static final String ALL_GROUPS_DOC = "Apply to all streams 
groups.";
+    private static final String INPUT_TOPIC_DOC = "The input topic whose 
streams group information should be deleted or topic that should be included in 
the reset offset process. " +

Review Comment:
   ```suggestion
       private static final String INPUT_TOPIC_DOC = "The input topic whose 
committed offset should be deleted or reset. In `reset-offsets` case, 
partitions can be specified using this format: `topic1:0,1,2`, where 0,1,2 are 
the partition to be included in the process. Multiple input topics can be 
specified. Supported operations: delete-offsets, reset-offsets."
   ```
   
   Can you not use `delete-offsets` with specific partitions? Not sure what you 
meant by `The input topic whose streams group information should be deleted`.



##########
tools/src/main/java/org/apache/kafka/tools/streams/StreamsGroupCommandOptions.java:
##########
@@ -33,13 +33,18 @@
 import static org.apache.kafka.tools.ToolsUtils.minus;
 
 public class StreamsGroupCommandOptions extends CommandDefaultOptions {
+    private static final String NL = System.lineSeparator();
     public static final Logger LOGGER = 
LoggerFactory.getLogger(StreamsGroupCommandOptions.class);
 
     public static final String BOOTSTRAP_SERVER_DOC = "REQUIRED: The server(s) 
to connect to.";
     public static final String GROUP_DOC = "The streams group we wish to act 
on.";
+    private static final String ALL_GROUPS_DOC = "Apply to all streams 
groups.";
+    private static final String INPUT_TOPIC_DOC = "The input topic whose 
streams group information should be deleted or topic that should be included in 
the reset offset process. " +
+        "In `reset-offsets` case, partitions can be specified using this 
format: `topic1:0,1,2`, where 0,1,2 are the partition to be included in the 
process. " +
+        "Reset-offsets also supports multiple topic inputs.";
+    private static final String ALL_INPUT_TOPICS_DOC = "Consider all topics 
assigned to a group in the `reset-offsets` process.";

Review Comment:
   `delete-offsets` as well? Maybe use the format `Supported operations: 
delete-offsets, reset-offsets.` as in the other options. Also, topics aren't 
really assigned to a group. How about:
   
   ```Consider all source topics used in the topology of the group.```



-- 
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: jira-unsubscr...@kafka.apache.org

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

Reply via email to