[ 
https://issues.apache.org/jira/browse/HDDS-11446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17882051#comment-17882051
 ] 

Ren Koike edited comment on HDDS-11446 at 9/16/24 1:49 PM:
-----------------------------------------------------------

This seems to be caused by a bug in picocli 4.7.6 version.
The similar issue is reported on picocli Github: 
[https://github.com/remkop/picocli/issues/2309]
It works properly with the version 4.7.5:
{code:java}
<picocli.version>4.7.5</picocli.version>{code}
output:
{code:java}
bash-4.2$ ozone sh key list -h
Usage: ozone sh key list [-hV] [-p=<prefix>] [-s=<startItem>] [[-l=<limit>] |
                         [-a]] <value>
list all keys in a given volume or bucket or snapshot
      <value>               URI of the volume or bucket.
                            Ozone URI could either be a full URI or short URI.
                            Full URI should start with o3://, in case of non-HA
                            clusters it should be followed by the host name and
                            optionally the port number. In case of HA clusters
                            the service id should be used. Service id provides a
                            logical name for multiple hosts and it is defined
                            in the property ozone.om.service.ids.
                            Example of a full URI with host name and port number
                            for a key:
                            o3://omhostname:9862/vol1/bucket1/key1
                            With a service id for a volume:
                            o3://omserviceid/vol1/
                            Short URI should start from the volume.
                            Example of a short URI for a bucket:
                            vol1/bucket1
                            Any unspecified information will be identified from
                            the config files.

  -a, --all                 List all results
  -h, --help                Show this help message and exit.
  -l, --length=<limit>      Maximum number of items to list
                              Default: 100
  -p, --prefix=<prefix>     Prefix to filter the items
  -s, --start=<startItem>   The item to start the listing from.
                            This will be excluded from the result.
  -V, --version             Print version information and exit.
bash-4.2$  {code}


was (Author: JIRAUSER306135):
This seems to be caused by a bug in picocli 4.7.6 version.
The similar issue is reported on picocli Github: 
[https://github.com/remkop/picocli/issues/2309]
It works properly with the version 4.7.5:
{code:java}
<picocli.version>4.7.5</picocli.version>{code}
output:
{code:java}
bash-4.2$ ozone sh key list -h
Usage: ozone sh key list [-hV] [-p=<prefix>] [-s=<startItem>] [[-l=<limit>] |
                         [-a]] <value>
list all keys in a given volume or bucket or snapshot
      <value>               URI of the volume or bucket.
                            Ozone URI could either be a full URI or short URI.
                            Full URI should start with o3://, in case of non-HA
                            clusters it should be followed by the host name and
                            optionally the port number. In case of HA clusters
                            the service id should be used. Service id provides a
                            logical name for multiple hosts and it is defined
                            in the property ozone.om.service.ids.
                            Example of a full URI with host name and port number
                            for a key:
                            o3://omhostname:9862/vol1/bucket1/key1
                            With a service id for a volume:
                            o3://omserviceid/vol1/
                            Short URI should start from the volume.
                            Example of a short URI for a bucket:
                            vol1/bucket1
                            Any unspecified information will be identified from
                            the config files.

  -a, --all                 List all results
  -h, --help                Show this help message and exit.
  -l, --length=<limit>      Maximum number of items to list
                              Default: 100
  -p, --prefix=<prefix>     Prefix to filter the items
  -s, --start=<startItem>   The item to start the listing from.
                            This will be excluded from the result.
  -V, --version             Print version information and exit.
bash-4.2${code}
 

> Issue with ozone key list redundant options
> -------------------------------------------
>
>                 Key: HDDS-11446
>                 URL: https://issues.apache.org/jira/browse/HDDS-11446
>             Project: Apache Ozone
>          Issue Type: Bug
>          Components: Ozone CLI
>    Affects Versions: 1.5.0
>            Reporter: Soumitra Sulav
>            Assignee: Ren Koike
>            Priority: Major
>
> The ozone key list CLI options printing --all and --length options twice.
> {code:java}
> ssulav@ssulav-MBP16 ozone % de ozone-datanode-1
> bash-4.4$
> bash-4.4$ ozone sh key list -h
> Usage: ozone sh key list [-hV] [-p=<prefix>] [-s=<startItem>] [[-l=<limit>] |
>                          [-a]] <value>
> list all keys in a given volume or bucket or snapshot
>       <value>               URI of the volume or bucket.
>                             Ozone URI could either be a full URI or short URI.
>                             Full URI should start with o3://, in case of 
> non-HA
>                             clusters it should be followed by the host name 
> and
>                             optionally the port number. In case of HA clusters
>                             the service id should be used. Service id 
> provides a
>                             logical name for multiple hosts and it is defined
>                             in the property ozone.om.service.ids.
>                             Example of a full URI with host name and port 
> number
>                             for a key:
>                             o3://omhostname:9862/vol1/bucket1/key1
>                             With a service id for a volume:
>                             o3://omserviceid/vol1/
>                             Short URI should start from the volume.
>                             Example of a short URI for a bucket:
>                             vol1/bucket1
>                             Any unspecified information will be identified 
> from
>                             the config files.
>   -a, --all                 List all results
>   -a, --all                 List all results
>   -h, --help                Show this help message and exit.
>   -l, --length=<limit>      Maximum number of items to list
>                               Default: 100
>   -l, --length=<limit>      Maximum number of items to list
>                               Default: 100
>   -p, --prefix=<prefix>     Prefix to filter the items
>   -s, --start=<startItem>   The item to start the listing from.
>                             This will be excluded from the result.
>   -V, --version             Print version information and exit.
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to