You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "adoroszlai (via GitHub)" <gi...@apache.org> on 2023/06/19 12:22:35 UTC
[GitHub] [ozone] adoroszlai commented on a diff in pull request #4931: HDDS-8887. Support --all option in ListOptions.
adoroszlai commented on code in PR #4931:
URL: https://github.com/apache/ozone/pull/4931#discussion_r1233975496
##########
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/shell/volume/ListVolumeHandler.java:
##########
@@ -76,7 +72,7 @@ protected void execute(OzoneClient client, OzoneAddress address)
}
Iterator<? extends OzoneVolume> volumeIterator;
- if (userName != null && !listAllVolumes) {
+ if (userName != null && (Integer.MAX_VALUE != listOptions.getLimit())) {
Review Comment:
Would be nice to add `isAll()` in `ListOptions` and use that here.
##########
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/shell/ListOptions.java:
##########
@@ -39,7 +39,14 @@ public class ListOptions {
description = "Prefix to filter the items")
private String prefix;
+ @CommandLine.Option(names = {"--all", "-a"},
+ description = "List all results")
+ private boolean bListAll;
+
public int getLimit() {
+ if (bListAll) {
Review Comment:
Nit:
```suggestion
private boolean all;
public int getLimit() {
if (all) {
```
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org