-
Notifications
You must be signed in to change notification settings - Fork 2.9k
storage: add list GCS objects in Java S3 SDK #1351
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
Conversation
// 1. Change the endpoint URL to use the Google Cloud Storage XML API endpoint. | ||
// 2. Use Cloud Storage HMAC Credentials. | ||
AmazonS3 interopClient = | ||
AmazonS3ClientBuilder.standard() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: unnecessary line break
AmazonS3ClientBuilder.standard() | |
AmazonS3ClientBuilder.standard() = AmazonS3ClientBuilder.standard() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done also applied to list buckets sample.
// Explicitly clean up client resources. | ||
interopClient.shutdown(); | ||
|
||
return objects; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New sample formats shouldn't return anything - tests should verify output via std out
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done also applied to list buckets sample.
String googleAccessKeySecret) { | ||
|
||
// String googleAccessKeyId = "GOOGTS7C7FUP3AIRVJTE2BCD"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these real keys? Maybe something like this would make it more clear they need to replace with there own:
// String googleAccessKeyId = "GOOGTS7C7FUP3AIRVJTE2BCD"; | |
// String googleAccessKeyId = "your-google-access-key-id"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They're close but not active/usable. I thought it made sense to show what they look like rather than their name.
I pulled these from cloud storage documentation.
…java-docs-samples into s3-sdk-list-objects
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Hi,
Sample to list objects in GCS using S3 SDK.