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

Add java-storage implementation for get buckets and object methods. #1089

Conversation

shilpi23pandey
Copy link
Contributor

No description provided.

@shilpi23pandey shilpi23pandey marked this pull request as draft December 19, 2023 18:53
@shilpi23pandey shilpi23pandey force-pushed the move-to-java-storage-get-info branch 4 times, most recently from ca8fb72 to a008e09 Compare December 21, 2023 19:30
@shilpi23pandey
Copy link
Contributor Author

/gcbrun

@shilpi23pandey shilpi23pandey force-pushed the move-to-java-storage-get-info branch 2 times, most recently from ca026c4 to b7dbda6 Compare December 21, 2023 20:44
@shilpi23pandey
Copy link
Contributor Author

/gcbrun

@shilpi23pandey shilpi23pandey force-pushed the move-to-java-storage-get-info branch 2 times, most recently from 4a90385 to 61d196b Compare December 22, 2023 06:54
@shilpi23pandey
Copy link
Contributor Author

/gcbrun

@shilpi23pandey
Copy link
Contributor Author

/gcbrun

@shilpi23pandey shilpi23pandey marked this pull request as ready for review December 22, 2023 08:17
return new ArrayList<>();
}

Map<StorageResourceId, GoogleCloudStorageItemInfo> itemInfos = new ConcurrentHashMap<>();
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: we can consider setting the capacity since it is known.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

"Somehow missing resourceId '%s' from map: %s",
resourceId,
itemInfos);
sortedItemInfos.add(itemInfos.get(resourceId));
Copy link
Contributor

Choose a reason for hiding this comment

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

What will happen if getting this resourceId failed? it will not be present in the map, correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In cases where fetching the resource failed, the exceptions will be added as part of innerExceptions https://github.com/GoogleCloudDataproc/hadoop-connectors/pull/1089/files/b118ae14967f9a6299f10c87e6b8ee24b17787ec#diff-23a518b24b3819c111aacec5ec168906787ef291585a52e128c1ce776b8ed0fbR601 and these lines wont be executed.

@shilpi23pandey
Copy link
Contributor Author

/gcbrun

@shilpi23pandey
Copy link
Contributor Author

/gcbrun

// Blob field that are used in GoogleCloudStorageItemInfo.
static final List<BlobField> BLOB_FIELDS =
ImmutableList.of(
BlobField.BUCKET,
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Consider keeping this sorted.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@shilpi23pandey
Copy link
Contributor Author

/gcbrun

@shilpi23pandey
Copy link
Contributor Author

/gcbrun

@shilpi23pandey shilpi23pandey merged commit 000e849 into GoogleCloudDataproc:master Jan 7, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants