jolshan commented on code in PR #15384:
URL: https://github.com/apache/kafka/pull/15384#discussion_r1496555226
##########
tools/src/main/java/org/apache/kafka/tools/TransactionsCommand.java:
##########
@@ -436,16 +436,26 @@ public String name() {
@Override
public void addSubparser(Subparsers subparsers) {
- subparsers.addParser(name())
+ Subparser subparser = subparsers.addParser(name())
.help("list transactions");
+
+ subparser.addArgument("--duration-filter")
+ .help("Duration (in millis) to filter by: if < 0, all
transactions will be returned; " +
+ "otherwise, only transactions running longer than
this duration will be returned")
+ .action(store())
+ .type(Long.class)
+ .required(false);
}
@Override
public void execute(Admin admin, Namespace ns, PrintStream out) throws
Exception {
+ ListTransactionsOptions options = new ListTransactionsOptions();
+
Optional.ofNullable(ns.getLong("duration_filter")).ifPresent(options::durationFilter);
Review Comment:
please update this line as well to reflect the new name
--
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]