dlg99 opened a new issue, #3237:
URL: https://github.com/apache/bookkeeper/issues/3237
**BUG REPORT**
`LedgerCommand` supports following flags:
```
public static class LedgerFlags extends CliFlags {
@Parameter(names = { "-id", "--ledgerId" }, description = "Specific
ledger id", required = true)
private long ledgerId;
@Parameter(names = { "-m", "--meta" }, description = "Print meta
information")
private boolean meta;
@Parameter(names = { "-l", "--ledgeridformatter" }, description =
"Set ledger id formatter")
private String ledgerIdFormatter = "";
}
```
`ListLedgersCmd` (used by CLI to call `LedgerCommand`):
```
ListLedgersCmd() {
super(CMD_LISTLEDGERS);
lOpts.addOption("m", "meta", false, "Print metadata");
lOpts.addOption("bookieid", true, "List ledgers residing in this
bookie");
}
```
on attempt to use that option one gets
```
[main] ERROR org.apache.bookkeeper.bookie.BookieShell - Error parsing
command line arguments :
org.apache.commons.cli.UnrecognizedOptionException: Unrecognized option:
--ledgerIdFormatter
at org.apache.commons.cli.Parser.processOption(Parser.java:363)
~[commons-cli-commons-cli-1.2.jar:1.2]
at org.apache.commons.cli.Parser.parse(Parser.java:199)
~[commons-cli-commons-cli-1.2.jar:1.2]
at org.apache.commons.cli.Parser.parse(Parser.java:85)
~[commons-cli-commons-cli-1.2.jar:1.2]
at
org.apache.bookkeeper.bookie.BookieShell$MyCommand.runCmd(BookieShell.java:237)
[org.apache.bookkeeper-bookkeeper-server-4.14.3.jar:4.14.3]
at org.apache.bookkeeper.bookie.BookieShell.run(BookieShell.java:2275)
[org.apache.bookkeeper-bookkeeper-server-4.14.3.jar:4.14.3]
at org.apache.bookkeeper.bookie.BookieShell.main(BookieShell.java:2366)
[org.apache.bookkeeper-bookkeeper-server-4.14.3.jar:4.14.3]
usage: listledgers [-meta] [-bookieid <bookieaddress>]
-bookieid <arg> List ledgers residing in this bookie
-m,--meta Print metadata
```
**Expected**: ledgeridformatter as usable option.
**same problem with `ListUnderreplicatedCmd` and possibly other commands**
--
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]