FANNG1 commented on code in PR #5801:
URL: https://github.com/apache/gravitino/pull/5801#discussion_r1881586021
##########
bundles/aws-bundle/src/main/java/org/apache/gravitino/s3/credential/S3TokenProvider.java:
##########
@@ -104,6 +104,10 @@ private StsClient createStsClient(S3CredentialConfig
s3CredentialConfig) {
if (StringUtils.isNotBlank(region)) {
builder.region(Region.of(region));
}
+ String stsEndpoint = s3CredentialConfig.stsEndpoint();
+ if (StringUtils.isNotBlank(stsEndpoint)) {
+ builder.endpointOverride(URI.create(stsEndpoint));
Review Comment:
1, if `stsEndpoint` is empty, `URI.create` will not be invoked because we
had check whether it is empty or not
```java
if (StringUtils.isNotBlank(stsEndpoint)) {
builder.endpointOverride(URI.create(stsEndpoint));
}
```
2, I agree with the point that we should try process the exception when it
happens, but in this scenarios, no resource is created yet(like S3 client),
seems we could do nothing.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]