Skip to content

HDDS-8887. Support --all option in ListOptions. #4931

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 20, 2023

Conversation

ashishkumar50
Copy link
Contributor

@ashishkumar50 ashishkumar50 commented Jun 19, 2023

What changes were proposed in this pull request?

Currently ListOptions provide -l option to override number of results return.
In this PR providing a way to return all results by providing --all option applicable for command which is using ListOptions like ListVolume, ListBucket, ListKeys.

  • Using --all option for listKeys

ozone sh key list --all o3://localhost:9862/vol11/bucket1
[ {
"volumeName" : "vol11",
"bucketName" : "bucket1",
"name" : "key1",
"dataSize" : 0,
"creationTime" : "2023-06-19T11:04:46.584Z",
"modificationTime" : "2023-06-19T11:04:46.640Z",
"replicationConfig" : {
"replicationFactor" : "THREE",
"requiredNodes" : 3,
"replicationType" : "RATIS"
},
"metadata" : { }
}, {
"volumeName" : "vol11",
"bucketName" : "bucket1",
"name" : "key2",
"dataSize" : 0,
"creationTime" : "2023-06-19T11:04:50.748Z",
"modificationTime" : "2023-06-19T11:04:50.779Z",
"replicationConfig" : {
"replicationFactor" : "THREE",
"requiredNodes" : 3,
"replicationType" : "RATIS"
},
"metadata" : { }
} ]

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-8887

How was this patch tested?

Using integration test and also local test using docker cluster.

@ashishkumar50
Copy link
Contributor Author

@adoroszlai, Please help to review, Thanks.

Copy link
Contributor

@adoroszlai adoroszlai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ashishkumar50 for the patch, mostly looks good.

Please also consider making --length and --all mutually exclusive.

@ashishkumar50
Copy link
Contributor Author

Thanks @ashishkumar50 for the patch, mostly looks good.

Please also consider making --length and --all mutually exclusive.

@adoroszlai, Thanks for the suggestion, Updated to use "mutually exclusive" and tested.

@adoroszlai adoroszlai merged commit f9ec90c into apache:master Jun 20, 2023
@adoroszlai
Copy link
Contributor

Thanks @ashishkumar50 for the patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants