You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Krishna Kumar Asawa (Jira)" <ji...@apache.org> on 2024/12/02 04:25:00 UTC

[jira] [Assigned] (HDDS-11782) ozone debug ldb --with-keys defaults to false instead of true

     [ https://issues.apache.org/jira/browse/HDDS-11782?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Krishna Kumar Asawa reassigned HDDS-11782:
------------------------------------------

    Assignee: Tejaskriya Madhan

> ozone debug ldb --with-keys defaults to false instead of true
> -------------------------------------------------------------
>
>                 Key: HDDS-11782
>                 URL: https://issues.apache.org/jira/browse/HDDS-11782
>             Project: Apache Ozone
>          Issue Type: Bug
>            Reporter: Ethan Rose
>            Assignee: Tejaskriya Madhan
>            Priority: Major
>
> *Observed Behavior:*
> Using {{ozone debug ldb}} {{\-\-with\-keys=true}}  or no {{\-\-with\-keys}}  flag will print the keys, but {{\-\-with\-keys}}  will not print the keys, defaulting to the same as {{{}--with-keys=false{}}}.
> *Explanation*
> We use PicoCLI for our CLI and when we define options like {{--with-keys}} there are two options we can set:
>  * [defaultValue|https://picocli.info/apidocs/picocli/CommandLine.Option.html#defaultValue--]: What will be used when the {{--with-keys}}  flag is not specified at all
>  * [fallbackValue|https://picocli.info/apidocs/picocli/CommandLine.Option.html#fallbackValue--]: What will be used when {{--with-keys}}  is specified with no argument
> In the [code|https://github.com/apache/ozone/blob/256aad9df2121946c307daceb512588a8319a81a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/debug/DBScanner.java#L109] we only set the {{defaultValue}}  to {{true}}  which leaves the {{fallbackValue}}  as {{false}}  leading to this unexpected behavior. We should check other CLI flags for this behavior and use acceptance tests to verify proper end-to-end interpretation of CLI flags.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org