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/12 10:11:35 UTC

[GitHub] [pulsar] massakam opened a new pull request, #15563: [improve][admin] Enable users to specify some time options in units other than seconds

massakam opened a new pull request, #15563:
URL: https://github.com/apache/pulsar/pull/15563

   ### Motivation
   
   In the `pulsar-admin` command, enable users to specify values for some time-related options not only in seconds, but also in minutes, hours, days, and so on.
   
   e.g.
   ```sh
   # Expire messages older than 3 hours
   $ ./bin/pulsar-admin topics expire-messages -s sub -t 3h persistent://foo/bar/baz
   ```
   
   ### Modifications
   
   Use the existing utility method [RelativeTimeUtil#parseRelativeTimeInSeconds](https://github.com/apache/pulsar/blob/c8d24108b0fb80ad0f8b3a6a8337429efc667a2b/pulsar-common/src/main/java/org/apache/pulsar/common/util/RelativeTimeUtil.java#L31-L67) to parse the given options and convert them to seconds.
   
   ### Verifying this change
   
   - [ ] Make sure that the change passes the CI checks.
   
   ### Documentation
   
   - [ ] `doc` 


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


[GitHub] [pulsar] codelipenghui merged pull request #15563: [improve][admin] Enable users to specify some time options in units other than seconds

Posted by GitBox <gi...@apache.org>.
codelipenghui merged PR #15563:
URL: https://github.com/apache/pulsar/pull/15563


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