Skip to content
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

Move list bucket methods to java-storage. #1076

Conversation

shilpi23pandey
Copy link
Contributor

No description provided.

@shilpi23pandey shilpi23pandey marked this pull request as draft November 23, 2023 09:14
@arunkumarchacko
Copy link
Contributor

/gcbrun

@shilpi23pandey shilpi23pandey marked this pull request as ready for review November 23, 2023 10:00
checkNotNull(storageOptions.getProjectId(), "projectId must not be null");
List<Bucket> allBuckets = new ArrayList<>();
try {
Page<Bucket> buckets =
Copy link
Contributor

Choose a reason for hiding this comment

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

can there be more than one page or is it taken care of by the iterator?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

try {
Page<Bucket> buckets =
storage.list(
BucketListOption.pageSize(storageOptions.getMaxListItemsPerCall()),
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the max allowed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

1000 for bucket fields without acl and 200 with acl. We use non-acl fields so it is 1000 for this use case.

@arunkumarchacko
Copy link
Contributor

/gcbrun

@shilpi23pandey
Copy link
Contributor Author

/gcbrun

@shilpi23pandey shilpi23pandey merged commit 5eec76a into GoogleCloudDataproc:master Dec 11, 2023
4 checks passed
@shilpi23pandey shilpi23pandey deleted the move-to-java-storage-buckets branch December 11, 2023 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants