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/05/25 06:09:34 UTC

[GitHub] [pulsar] 315157973 commented on a diff in pull request #15657: [improve][admin] Enable users to specify TTL options in units other than seconds

315157973 commented on code in PR #15657:
URL: https://github.com/apache/pulsar/pull/15657#discussion_r881252099


##########
pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdNamespaces.java:
##########
@@ -386,14 +386,27 @@ private class SetMessageTTL extends CliCommand {
         @Parameter(description = "tenant/namespace", required = true)
         private java.util.List<String> params;
 
-        @Parameter(names = { "--messageTTL", "-ttl" }, description = "Message TTL in seconds. "
-                + "When the value is set to `0`, TTL is disabled.", required = true)
-        private int messageTTL;
+        @Parameter(names = { "--messageTTL", "-ttl" },
+                description = "Message TTL in seconds (or minutes, hours, days, weeks eg: 100m, 3h, 2d, 5w). "
+                        + "When the value is set to `0`, TTL is disabled.", required = true)
+        private String messageTTLStr;

Review Comment:
   Will there be compatibility issues? Some scripts written by users cannot be used now because they do not contain units.
   
   



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