errose28 commented on PR #4157:
URL: https://github.com/apache/ozone/pull/4157#issuecomment-1401415898

   > For now I think adding extra flags that are client side only should be ok.
   
   The problem is that our current compatibility guarantees mean we cannot just 
add CLI flags "for now". Once they are released they must be there forever, so 
we should put more thought in to how we handle these cases.
   
   > We should add more documentation and samples for how to use jq if we want 
that to be the primary way forward.
   
   Definitely. I can add the documentation, or @SaketaChalamchala may want to 
do it as well. A link to jq docs and some example filters added as a section to 
the bottom of the [CLI 
docs](https://ozone.apache.org/docs/current/interface/cli.html) should do it.
   
   With some doc examples simple queries should be fairly straightforward. For 
example, here is how you get the info for all buckets that are not links: 
`ozone sh bucket list /vol1 | jq '.[] | select(.link==false)`.  Generalizing 
and expanding is straightforward once given a basic example since our json 
structure is pretty basic:  `ozone sh bucket list /vol1 | jq '.[] | 
select(.link==false and .bucketLayout=="LEGACY")`
   
   I think that would be a more simple and worthwhile change than this one. If 
we continue to follow this PR's precedent for client side filtering our CLI 
will be even more messy, and users may not even be aware that there is a more 
powerful way to filter results beyond what is built in to Ozone.


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


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

Reply via email to