You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/07/22 11:56:45 UTC

[GitHub] [pulsar] horizonzy commented on a diff in pull request #16130: [improve][pulsar-client-tools][ISSUE-16082] - Updated set retention time description and added test cases including default time

horizonzy commented on code in PR #16130:
URL: https://github.com/apache/pulsar/pull/16130#discussion_r927574297


##########
pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdNamespaces.java:
##########
@@ -741,8 +741,13 @@ private class SetRetention extends CliCommand {
         private java.util.List<String> params;
 
         @Parameter(names = { "--time",
-                "-t" }, description = "Retention time in minutes (or minutes, hours,days,weeks eg: 100m, 3h, 2d, 5w). "
-                        + "0 means no retention and -1 means infinite time retention", required = true)
+                "-t" }, description = "Retention time with optional time unit suffix "

Review Comment:
   This file retention size doc miss update.



##########
pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdTopics.java:
##########
@@ -1812,11 +1812,18 @@ private class SetRetention extends CliCommand {
         private java.util.List<String> params;
 
         @Parameter(names = { "--time",
-                "-t" }, description = "Retention time in minutes (or minutes, hours,days,weeks eg: 100m, 3h, 2d, 5w). "
-                + "0 means no retention and -1 means infinite time retention", required = true)
+                "-t" }, description = "Retention time with optional time unit suffix "
+                + "eg: 100m, 3h, 2d, 5w. "
+                + "The suffix character can be s for seconds, m for minutes, h for hours, "
+                + "d for days, w for weeks or y for years. "
+                + "If no time unit is specified the default is seconds, eg: "
+                + "-t 120 will set retention to 2 minutes. "
+                + "0 means no retention and -1 means infinite time retention.", required = true)
         private String retentionTimeStr;
 
-        @Parameter(names = { "--size", "-s" }, description = "Retention size limit (eg: 10M, 16G, 3T). "
+        @Parameter(names = { "--size", "-s" }, description = "Retention size limit with optional size unit suffix "
+                + "eg: 4096, 10M, 16G, 3T.  The size unit suffix character can be k/K, m/M, g/G, or t/G.  "

Review Comment:
   t/G -> t/T



##########
pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdTopicPolicies.java:
##########
@@ -466,11 +466,18 @@ private class SetRetention extends CliCommand {
         private List<String> params;
 
         @Parameter(names = { "--time",
-                "-t" }, description = "Retention time in minutes (or minutes, hours,days,weeks eg: 100m, 3h, 2d, 5w). "
-                + "0 means no retention and -1 means infinite time retention", required = true)
+                "-t" }, description = "Retention time with optional time unit suffix "
+                + "eg: 100m, 3h, 2d, 5w. "
+                + "The suffix character can be s for seconds, m for minutes, h for hours, "

Review Comment:
   > "The suffix character can be s for seconds, m for minutes, h for hours, d for days, w for weeks or y for years. "  
   
   I think it is not necessary.



-- 
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: commits-unsubscribe@pulsar.apache.org

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